query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Display a listing of the resource.
public function index() { $this->statusText = 'success'; $this->statusCode = 200; return response()->json([ 'status_code' => $this->statusCode, 'status' => $this->statusText, 'data' => Book::all() ])->setStatusCode($this->statusCode, $this->statusText); }
{ "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
Store a newly created resource in storage.
public function store(BookPostRequest $request) { try { $book = Book::create( $request->only([ 'name','isbn','authors','country','number_of_pages','publisher','release_date' ]) ); $this->statusCode = 201; $this->statusText = 'success'; } catch(Exception $exception) { Log::alert("Something went wrong. Book not created. " . $exception->getMessage()); } return response()->json([ 'status_code' => $this->statusCode, 'status' => $this->statusText, 'data' => ["book" => $book] ])->setStatusCode(201, 'success'); }
{ "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) { try { $book = Book::find($id); $this->statusCode = 200; $this->statusText = 'success'; } catch (Exception $e) { Log::alert("Something went wrong. " . $e->getMessage()); } return response()->json([ 'status_code' => $this->statusCode, 'status' => $this->statusText, 'data' => $book == null ?[]:$book // If book is null return empty array ]); }
{ "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
Update the specified resource in storage.
public function update(BookPostRequest $request, $id) { try { $book = Book::find($id); $book->update( $request->only([ 'name','isbn','authors','country','number_of_pages','publisher','release_date' ]) ); $this->statusCode = 200; $this->statusText = 'success'; $this->message = 'The book My First Book was updated successfully'; } catch (Exception $exception) { Log::alert("Something went wrong. " . $exception->getMessage()); } catch (Error $error) { Log::alert("An error occured. " . $error->getMessage()); } return response()->json([ 'status_code' => $this->statusCode, 'status' => $this->statusText, 'message' => $this->message, 'data' => $book == null ?[]:$book // If book is null return empty array ])->setStatusCode($this->statusCode, $this->statusText); }
{ "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 }", "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(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 }", "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 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 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(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(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($id);", "public function update($id);", "public function put($path, $data = null);", "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 }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\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 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 $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 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.7423347", "0.70622426", "0.70568657", "0.6896551", "0.65835553", "0.64519453", "0.6348333", "0.6212436", "0.61450946", "0.6122591", "0.6114199", "0.6101911", "0.60876113", "0.60528636", "0.60177964", "0.6006609", "0.59725446", "0.594558", "0.59395295", "0.5938792", "0.5893703", "0.5862337", "0.58523124", "0.58523124", "0.5851579", "0.5815571", "0.58067423", "0.5750728", "0.5750728", "0.5736541", "0.5723664", "0.5715135", "0.56949675", "0.5691129", "0.56882757", "0.5669375", "0.5655524", "0.56517446", "0.5647158", "0.5636521", "0.563466", "0.5632965", "0.56322825", "0.56291395", "0.56202215", "0.56087196", "0.56020856", "0.5591966", "0.5581127", "0.5581055", "0.558085", "0.5575458", "0.55706805", "0.55670804", "0.55629116", "0.5562565", "0.5558853", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.555572", "0.5555007", "0.5553948", "0.5553837", "0.5553147", "0.55429846", "0.5541925", "0.5540208", "0.5539145", "0.5536157", "0.55350804", "0.5534241", "0.5523782", "0.5518406", "0.55147856", "0.5513397", "0.550961", "0.55072165", "0.55067354", "0.5503418", "0.5501671", "0.55010796", "0.54998124", "0.5497327", "0.54942787", "0.54942036", "0.54942036", "0.54935455", "0.549267", "0.5491964", "0.5489983", "0.54833627", "0.54794145", "0.5478835", "0.5478348", "0.5465178", "0.54648995", "0.54607797", "0.54571307" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $book = Book::find($id); try { $book->delete(); $this->statusCode = 200; $this->statusText = 'success'; $this->message = 'The book My First Book was deleted successfully'; $book = null; } catch (Exception $exception) { Log::alert("Something went wrong. " . $exception->getMessage()); } catch (Error $error) { Log::alert("An error occured. " . $error->getMessage()); } return response()->json([ 'status_code' => $this->statusCode, 'status' => $this->statusText, 'message' => $this->message, 'data' => is_null($book) ? []:$book ])->setStatusCode($this->statusCode, $this->statusText); }
{ "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
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { // retrieve the username from the option $username = $this->option('username'); // if no username was passed to the option, prompt the user to enter the username if (!$username) $username = $this->ask('what is the user\'s username?'); // retrieve the user with the specified email $user = User::where('username', $username)->first(); if (!$user) { // show an error and exist if the user does not exist $this->error('No user with that username.'); return; } // Print a warning $this->info('A new secret will be generated for '.$user->username); $this->info('This action will invalidate the previous secret key.'); // ask for confirmation if not forced if (!$this->option('force') && !$this->confirm('Do you wish to continue?')) return; // initialise the 2FA class $google2fa = app('pragmarx.google2fa'); // generate a new secret key for the user $user->google2fa_secret = $google2fa->generateSecretKey(); // save the user $user->save(); // show the new secret key $this->info('A new secret has been generated for '.$user->username); $this->info('The new secret is: '.$user->google2fa_secret); }
{ "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\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\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 // 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 $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\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\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 $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 $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 $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 $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\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 // 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 \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 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 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 $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 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 $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 {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\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()\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(Command $command);", "public function handle(Command $command);", "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 $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 //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\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 // 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 $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 if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\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 $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\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.6469971", "0.64641356", "0.6427384", "0.6349752", "0.63188183", "0.62750113", "0.6261585", "0.6261214", "0.6235854", "0.6225116", "0.6222161", "0.6214144", "0.6193531", "0.6191337", "0.6183868", "0.61772275", "0.61766857", "0.6172786", "0.6149171", "0.6148903", "0.61484134", "0.61469173", "0.6138112", "0.61347705", "0.61316174", "0.61158997", "0.6113888", "0.6110495", "0.6108539", "0.61056405", "0.6102598", "0.61022663", "0.61016774", "0.6096468", "0.6094955", "0.60922974", "0.6088507", "0.6083433", "0.6082336", "0.6077499", "0.60767883", "0.6075641", "0.6073871", "0.6072606", "0.60701466", "0.60694647", "0.60693175", "0.6067332", "0.6061484", "0.6059711", "0.6059688", "0.60574067", "0.60503477", "0.6042625", "0.6040687", "0.6032303", "0.60306066", "0.602774", "0.60255086", "0.60207987", "0.60190594", "0.6018816", "0.60144967", "0.60144013", "0.6014115", "0.6011956", "0.60092497", "0.6007996", "0.60079277", "0.60061836", "0.60051036", "0.6001119", "0.6001112", "0.6000026", "0.5999729", "0.5991934", "0.59873074", "0.5987054", "0.59868026", "0.59868026", "0.59856236", "0.59836555", "0.5980716", "0.5976703", "0.5976261", "0.5973673", "0.5969664", "0.59683484", "0.5966431", "0.5965345", "0.59645647", "0.59615767", "0.5960291", "0.59555584", "0.59549415", "0.5952351", "0.59519506", "0.594845", "0.5946748", "0.5946337", "0.5944945" ]
0.0
-1
Alterar dados de SicasConsultaMedica
public function alterar($oSicasConsultaMedica = NULL){ if($oSicasConsultaMedica == NULL){ // recebe dados do formulario $post = DadosFormulario::formSicasConsultaMedica(NULL, 2); // valida dados do formulario $oValidador = new ValidadorFormulario(); if(!$oValidador->validaFormSicasConsultaMedica($post,2)){ $this->msg = $oValidador->msg; return false; } // cria variaveis para validacao com as chaves do array foreach($post as $i => $v) $$i = utf8_encode($v); // cria objeto para grava-lo no BD $oSicasAtendimento = new SicasAtendimento($cd_atendimento); $oSicasMedico = new SicasMedico($cd_medico); $oSicasTipoAtendimento = new SicasTipoAtendimento($cd_tipo_atendimento); $oSicasConsultaMedica = new SicasConsultaMedica($cd_consulta_medica,$oSicasAtendimento,$dt_consulta,$oSicasMedico,$qp_paciente,$exame_fisico,$exame_solicitado,$diag_paciente,$oSicasTipoAtendimento,$resultado,$tratamento,$status); } $oSicasConsultaMedicaBD = new SicasConsultaMedicaBD(); if(!$oSicasConsultaMedicaBD->alterar($oSicasConsultaMedica)){ $this->msg = $oSicasConsultaMedicaBD->msg; return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Alterar() {\n $SQL = \"UPDATE dd_dados_domicilio SET \n IDTIPOLOGRADOURO ='\" . $this->IDTIPOLOGRADOURO . \"',\n NOMELOGRADOURO ='\" . $this->NOMELOGRADOURO . \"',\n NUMDOMICILIO ='\" . $this->NUMDOMICILIO . \"',\n COMPLEMENTO ='\" . $this->COMPLEMENTO . \"',\n BAIRRO ='\" . $this->BAIRRO . \"',\n CEP ='\" . $this->CEP . \"',\n IDESTADO ='\" . $this->IDESTADO . \"',\n IDMUNICIPIO ='\" . $this->IDMUNICIPIO . \"',\n REFERENCIA ='\" . $this->REFERENCIA . \"',\n IDCONSTRUCAO ='\" . $this->IDCONSTRUCAO . \"',\n IDESTCONSERVACAO ='\" . $this->IDESTCONSERVACAO . \"',\n IDUTILIZACAO ='\" . $this->IDUTILIZACAO . \"',\n IDTIPOUSO ='\" . $this->IDTIPOUSO . \"',\n IDESPECIEDOMICILIO ='\" . $this->IDESPECIEDOMICILIO . \"',\n DATAINICIOMORARMUNICIP ='\" . $this->DATAINICIOMORARMUNICIP . \"',\n DATAINICIOMORARDOMICILIO ='\" . $this->DATAINICIOMORARDOMICILIO . \"',\n QUANTCOMODOS ='\" . $this->QUANTCOMODOS . \"',\n QUANTDORMIT ='\" . $this->QUANTDORMIT . \"',\n IDTIPOMATERIALPISOINT ='\" . $this->IDTIPOMATERIALPISOINT . \"',\n IDTIPOMATERIALPAREDEEXT ='\" . $this->IDTIPOMATERIALPAREDEEXT . \"',\n QTAGUACANALIZADA ='\" . $this->QTAGUACANALIZADA . \"',\n IDFORMAABASTECIMENTO ='\" . $this->IDFORMAABASTECIMENTO . \"',\n IDFORMAESCOASANITARIO ='\" . $this->IDFORMAESCOASANITARIO . \"',\n IDDESTINOLIXO ='\" . $this->IDDESTINOLIXO . \"',\n IDILUMINACAOCASA ='\" . $this->IDILUMINACAOCASA . \"',\n VALAGUAESGOTO ='\" . $this->VALAGUAESGOTO . \"',\n VALENERGIA ='\" . $this->VALENERGIA . \"',\n VALALUGUEL ='\" . $this->VALALUGUEL . \"',\n NUMFAMILIAS ='\" . $this->NUMFAMILIAS . \"',\n IDDADOSOLICITANTE ='\" . $this->IDDADOSOLICITANTE . \"'\n WHERE IDDADODOMICILIO='\" . $this->codigo . \"'\";\n\n //die($SQL);\n\n $con = new gtiConexao();\n $con->gtiConecta();\n $con->gtiExecutaSQL($SQL);\n $con->gtiDesconecta();\n }", "protected function alterar(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $sets = \"\";\n $id_registro = '';\n $contador = \"\";\n $count = 1;\n foreach ($execute as $contar) {\n if ($contar->Key != 'PRI') {\n $atributos_field = $contar->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n $contador = $contador + 1;\n }\n }\n }\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n if ($count != $contador) {\n $sets .= $attr->Field . \" = '\" . $this->$get() . \"',\";\n } else {\n $sets .= $attr->Field . \" = '\" . $this->$get().\"'\";\n }\n $count = $count + 1;\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $update = \"UPDATE \".$this->table.\" SET \".$sets.\" WHERE \".$id_registro.\" = \".$this->getIdTable();\n\n $execute_into = conexao::toConnect()->executeQuery($update);\n if (count($execute_into) > 0) {\n return $execute_into;\n }else{\n return false;\n }\n }", "public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }", "public function alterar(){\r\n // recebe dados do formulario\r\n $post = DadosFormulario::formularioCadastroSicasEspecialidadeMedica(2);\r\n // valida dados do formulario\r\n $oValidador = new ValidadorFormulario();\r\n if(!$oValidador->validaFormularioCadastroSicasEspecialidadeMedica($post, 2)){\r\n $this->msg = $oValidador->msg;\r\n return false;\r\n }\r\n // cria variaveis para validacao com as chaves do array\r\n foreach($post as $i => $v) $$i = utf8_encode($v);\r\n \r\n // cria objeto para grava-lo no BD\r\n $oSicasEspecialidadeMedica = new SicasEspecialidadeMedica($cd_especialidade_medica, $nm_especialidade, $status);\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n if(!$oSicasEspecialidadeMedicaBD->alterar($oSicasEspecialidadeMedica)){\r\n $this->msg = $oSicasEspecialidadeMedicaBD->msg;\r\n return false;\r\n }\r\n return true;\r\n }", "public function alterarDados($conexao,$id_pessoa){\n $query = \"update empresa_startup set modelo_negocio = ?,publico_alvo = ?, momento = ?, segmento_principal = ?, segmento_secundario = ?, tamanho_time = ?, faturamento_anual = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getModeloNegocio(),$this->getPublicoAlvo(),$this->getMomento(),$this->getSegmentoPricipal(),$this->getSegmentoSecundario(),$this->getTamanhoTime(),$this->getFaturamentoAnual(),$id_pessoa]);\n }", "protected function migrarDados()\n {\n $serviceDemanda = $this->getService('OrdemServico\\Service\\DemandaFile');\n try {\n $serviceDemanda->begin();\n $arrUsuario = $this->getService('OrdemServico\\Service\\UsuarioFile')->fetchPairs([], 'getNoUsuario', 'getIdUsuario');\n $OrdemSevicoSevice = $this->getService('OrdemServico\\Service\\OrdemServicoDemandaFile');\n $arrDemanda = $serviceDemanda->findBy([], ['id_demanda' => 'asc']);\n $serviceDemanda::setFlush(false);\n foreach ($arrDemanda as $demanda) {\n $intIdUsuario = $arrUsuario[$demanda->getNoExecutor()];\n if ($intIdUsuario) {\n $demanda->setVlComplexidade(null)\n ->setVlImpacto(null)\n ->setVlCriticidade(null)\n ->setVlFatorPonderacao(null)\n ->setVlFacim(null)\n ->setVlQma(null)\n ->setIdUsuario($intIdUsuario);\n $serviceDemanda->getEntityManager()->persist($demanda);\n $arrDemandaServico = $OrdemSevicoSevice->findBy(['id_demanda' => $demanda->getIdDemanda()]);\n if ($arrDemandaServico) {\n $ordemServicoDemanda = reset($arrDemandaServico);\n $ordemServicoDemanda->setIdUsuarioAlteracao($demanda->getIdUsuario())\n ->setDtAlteracao(Date::convertDateTemplate($demanda->getDtAbertura()));\n $OrdemSevicoSevice->getEntityManager()->persist($demanda);\n }\n }\n }\n $serviceDemanda::setFlush(true);\n $serviceDemanda->commit();\n } catch (\\Exception $exception) {\n $serviceDemanda->rollback();\n var_dump($exception->getMessage());\n die;\n }\n }", "public function alterarDadosGerais($conexao,$id_pessoa){\n $query = \"update empresa_startup set nome = ?, razao_social = ?, cnpj = ?, email = ?, data_fundacao = ?, telefone = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getNome(),$this->getRazaoSocial(),$this->getCnpj(),$this->getEmail(),$this->getDataFundacao(),$this->getTelefone(),$id_pessoa]);\n }", "public function update($maeMedico);", "function normalizarCodificacionPlaneServicios($cadenaBusqueda,$cadenaReemplazo) {\n\t\t// Busca y reemplaza ocurrencias en una tabla\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"UPDATE ContratacionSalud.PlaneServicios SET nombreplan = replace( nombreplan,'$cadenaBusqueda','$cadenaReemplazo')\";\n\t\t\t\n\t\t\t$res = pg_query($cnx , $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\techo \"<p class='error1'> Error en la normalizacion de la codificacion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$consUTF8.\"<br/> <br/> <br/>\"; \n\t\t\t\t}\n\n\t\t}", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "private function ajustarDataReporte()\r\n\t\t{\r\n\t\t\tself::setConexion();\r\n\t\t\t$this->_conn->open();\r\n\t\t\t$this->_transaccion = $this->_conn->beginTransaction();\r\n\r\n\t\t\t$tabla = $this->tableName();\r\n\r\n\t\t\t//lapso=2 and ano_impositivo<year(fecha_pago) and impuesto=9 and fecha_pago>='2014-06-01\r\n\t\t\t$sql = \"UPDATE {$tabla} SET codigo=301035900, nombre_impuesto='Deuda Morosa Por Tasas'\r\n\t\t\t WHERE lapso=2 AND ano_impositivo<year(fecha_pago) AND impuesto=9 AND fecha_pago>='2014-06-01'\";\r\n\r\n\t\t\t$result = $this->_conn->createCommand($sql)->execute();\r\n\t\t\tif ( $result ) {\r\n\t\t\t\t$this->_transaccion->commit();\r\n\t\t\t} else {\r\n\t\t\t\t$this->_transaccion->rollBack();\r\n\t\t\t}\r\n\t\t\t$this->_conn->close();\r\n\t\t\treturn $result;\r\n\t\t}", "public function recalcula() {\n\n //Si el cliente no está sujeto a iva\n //pongo el iva a cero en las líneas para evitar que por cambio\n //de cliente se aplique indebidamente\n $cliente = new Clientes($this->IDCliente);\n if ($cliente->getIva()->getIDTipo() == '0') {\n $lineas = new FemitidasLineas();\n $lineas->queryUpdate(array(\"Iva\" => 0, \"Recargo\" => 0), \"`IDFactura`= '{$this->IDFactura}'\");\n unset($lineas);\n }\n //Si el cliente no está sujeto a recargo de equivalencia\n //lo pongo a cero en las líneas para evitar que por cambio\n //de cliente se aplique indebidamente\n elseif ($cliente->getRecargoEqu()->getIDTipo() == '0') {\n $lineas = new FemitidasLineas();\n $lineas->queryUpdate(array(\"Recargo\" => 0), \"`IDFactura`= '{$this->IDFactura}'\");\n unset($lineas);\n }\n unset($cliente);\n\n //SI TIENE DESCUENTO, CALCULO EL PORCENTAJE QUE SUPONE RESPECTO AL IMPORTE BRUTO\n //PARA REPERCUTUIRLO PORCENTUALMENTE A CADA BASE\n $pordcto = 0;\n if ($this->getDescuento() != 0)\n $pordcto = round(100 * ($this->getDescuento() / $this->getImporte()), 2);\n\n //Calcular los totales, desglosados por tipo de iva.\n $this->conecta();\n if (is_resource($this->_dbLink)) {\n $lineas = new FemitidasLineas();\n $tableLineas = \"{$lineas->getDataBaseName()}.{$lineas->getTableName()}\";\n $articulos = new Articulos();\n $tableArticulos = \"{$articulos->getDataBaseName()}.{$articulos->getTableName()}\";\n unset($lineas);\n unset($articulos);\n\n $query = \"select sum(Importe) as Bruto,sum(ImporteCosto) as Costo from {$tableLineas} where (IDFactura='\" . $this->getIDFactura() . \"')\";\n $this->_em->query($query);\n $rows = $this->_em->fetchResult();\n $bruto = $rows[0]['Bruto'];\n\n $query = \"select Iva,Recargo, sum(Importe) as Importe from {$tableLineas} where (IDFactura='\" . $this->getIDFactura() . \"') group by Iva,Recargo order by Iva\";\n $this->_em->query($query);\n $rows = $this->_em->fetchResult();\n $totbases = 0;\n $totiva = 0;\n $totrec = 0;\n $bases = array();\n\n foreach ($rows as $key => $row) {\n $importe = $row['Importe'] * (1 - $pordcto / 100);\n $cuotaiva = round($importe * $row['Iva'] / 100, 2);\n $cuotarecargo = round($importe * $row['Recargo'] / 100, 2);\n $totbases += $importe;\n $totiva += $cuotaiva;\n $totrec += $cuotarecargo;\n\n $bases[$key] = array(\n 'b' => $importe,\n 'i' => $row['Iva'],\n 'ci' => $cuotaiva,\n 'r' => $row['Recargo'],\n 'cr' => $cuotarecargo\n );\n }\n\n $subtotal = $totbases + $totiva + $totrec;\n\n // Calcular el recargo financiero según la forma de pago\n $formaPago = new FormasPago($this->IDFP);\n $recFinanciero = $formaPago->getRecargoFinanciero();\n $cuotaRecFinanciero = $subtotal * $recFinanciero / 100;\n unset($formaPago);\n\n $total = $subtotal + $cuotaRecFinanciero;\n\n //Calcular el peso, volumen y n. de bultos de los productos inventariables\n switch ($_SESSION['ver']) {\n case '0': //Estandar\n $columna = \"Unidades\";\n break;\n case '1': //Cristal\n $columna = \"MtsAl\";\n break;\n }\n $em = new EntityManager($this->getConectionName());\n $query = \"select sum(a.Peso*l.{$columna}) as Peso,\n sum(aVolumen*l.{$columna}) as Volumen,\n sum(Unidades) as Bultos \n from {$tableArticulos} as a,{$tableLineas} as l\n where (l.IDArticulo=a.IDArticulo)\n and (a.Inventario='1')\n and (l.IDFactura='{$this->IDFactura}')\";\n $em->query($query);\n $rows = $em->fetchResult();\n $em->desConecta();\n\n $this->setImporte($bruto);\n $this->setBaseImponible1($bases[0]['b']);\n $this->setIva1($bases[0]['i']);\n $this->setCuotaIva1($bases[0]['ci']);\n $this->setRecargo1($bases[0]['r']);\n $this->setCuotaRecargo1($bases[0]['cr']);\n $this->setBaseImponible2($bases[1]['b']);\n $this->setIva2($bases[1]['i']);\n $this->setCuotaIva2($bases[1]['ci']);\n $this->setRecargo2($bases[1]['r']);\n $this->setCuotaRecargo2($bases[1]['cr']);\n $this->setBaseImponible3($bases[2]['b']);\n $this->setIva3($bases[2]['i']);\n $this->setCuotaIva3($bases[2]['ci']);\n $this->setRecargo3($bases[2]['r']);\n $this->setCuotaRecargo3($bases[2]['cr']);\n $this->setTotalBases($totbases);\n $this->setTotalIva($totiva);\n $this->setTotalRecargo($totrec);\n $this->setRecargoFinanciero($recFinanciero);\n $this->setCuotaRecargoFinanciero($cuotaRecFinanciero);\n $this->setTotal($total);\n $this->setPeso($rows[0]['Peso']);\n $this->setVolumen($rows[0]['Volumen']);\n $this->setBultos($rows[0]['Bultos']);\n\n $this->save();\n }\n }", "public function desenfocarCamaraAlumnos1() {\n\n self::$alumnos1->desenfocar();\n\n }", "public function alterarResponsavel($idPessoaResponsavel, Responsavel $responsavel) {\n $obj_conecta = new bd();\n $obj_conecta->conecta();\n $obj_conecta->seleciona_bd();\n\n //echo \"<br> Chegou no metodo IdPessoaResponsavel = [\".$idPessoaResponsavel.\"] <br><br>\";\n\n $sql = \"UPDATE `sigar`.`responsavel` SET `categoria` = '\" . $responsavel->getCategoria() . \"', `telefoneTrabalho` = '\" . $responsavel->getTelTrabalho() . \"' WHERE `responsavel`.`idPessoa` =\" . $idPessoaResponsavel . \";\";\n\n $alteraTabResponsavel = mysql_query($sql);\n if ($alteraTabResponsavel) {\n //echo \"<br> Tabela RESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> ERRO alteração tabela RESPONSAVEL <br>\"; \n }\n\n\n $sql = \"UPDATE `pessoa` SET `nome` = '\" . $responsavel->getNome() . \"', `email` = '\" . $responsavel->getEmail() . \"', `telefoneResidencial` = '\" . $responsavel->getTelefoneResidencial() . \"', \n `telefoneCelular` = '\" . $responsavel->getCelular() . \"', `sexo` = '\" . $responsavel->getSexo() . \"', `dataNascimento` = '\" . $responsavel->getNascimento() . \"', `cpf` = '\" . $responsavel->getCpf() . \"' WHERE `pessoa`.`idPessoa` = \" . $idPessoaResponsavel . \";\";\n\n $alteraTabPessoaResp = mysql_query($sql);\n if ($alteraTabPessoaResp) {\n //echo \" <br> Tabela PESSOARESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> EROO alteração tabela PESSOARESPONSAVEL <br>\"; \n }\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function AlterarADM($id) {\n// if($this->GetClienteCPF($this->getCli_cpf())>0 && $this->getCli_cpf() != $_REQUEST['CLI']['cli_cpf']):\n// echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n// Sistema::VoltarPagina();\n// echo '</div>';\n// exit();\n// endif;\n \n //se o email for diferente da sessao----------------------\n// if($this->GetClienteEmail($this->getCli_email())>0 && $this->getCli_email() != $_REQUEST['CLI']['cli_email']):\n// echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n// Sistema::VoltarPagina();\n// echo '</div>';\n// exit();\n// endif;\n \n \n \n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"UPDATE \".$this->prefix.\"clientes SET cli_nome=:cli_nome,\n cli_sobrenome=:cli_sobrenome,\n cli_data_nasc=:cli_data_nasc,\n cli_rg=:cli_rg,\n cli_cpf=:cli_cpf,\n cli_ddd=:cli_ddd,\n cli_fone=:cli_fone,\n cli_celular=:cli_celular,\n cli_endereco=:cli_endereco,\n cli_numero=:cli_numero,\n cli_bairro=:cli_bairro,\n cli_cidade=:cli_cidade,\n cli_uf=:cli_uf,\n cli_cep=:cli_cep,\n cli_email=:cli_email \n WHERE cli_id =:cli_id\";\n \n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n \n ':cli_id' => (int)$id\n \n \n );\n \n //echo $query;\n \n \n if($this->ExecuteSQL($query, $params)):\n return true;\n else:\n return false;\n endif;\n \n \n }", "function setDeleteSocio(){\n\t\t$socio\t\t= $this->mCodigo;\n\t\t$msg \t\t= \"\";\n\t\t$msg \t\t.= \"================== ELIMINANDO UN NUMERO DE SOCIO \\r\\n\";\n\t\t$msg \t\t.= \"================== SOCIO $socio \\r\\n\";\n\t\t$xRuls\t= new cReglaDeNegocio();\n\t\t$xRuls->reglas()->RN_ELIMINAR_PERSONA;\t\t\n\t\t/**\n\t\t * Elimina un socio de las Tabla de Socios\n\t\t */\n\t\t//Eliminar Socio\n\t\t$sqlD[] = \"DELETE FROM socios_general WHERE codigo=$socio \";\n\t\t//Eliminar Relaciones\n\t\t$sqlD[] = \"DELETE FROM socios_relaciones WHERE socio_relacionado=$socio \";\n\t\t//Eliminar\n\t\t$sqlD[] = \"DELETE FROM socios_vivienda WHERE socio_numero=$socio \";\n\t\t//Eliminar actividad economica\n\t\t$sqlD[] = \"DELETE FROM socios_aeconomica WHERE socio_aeconomica=$socio \";\n\t\t//Eliminar Patrimonio\n\t\t$sqlD[] = \"DELETE FROM socios_patrimonio WHERE socio_patrimonio=$socio \";\n\t\t$sqlD[]\t= \"DELETE FROM creditos_solicitud WHERE numero_socio = $socio \";\n\t\t\n\t\t$sqlD[]\t= \"DELETE FROM captacion_cuentas WHERE numero_socio = $socio \";\n\t\t$sqlD[]\t= \"DELETE FROM captacion_sdpm_historico WHERE numero_de_socio = $socio \";\n\t\t$sqlD[]\t= \"DELETE FROM creditos_flujoefvo WHERE socio_flujo = $socio \";\n\t\t$sqlD[]\t= \"DELETE FROM creditos_garantias WHERE socio_garantia = $socio \";\n\t\t$sqlD[]\t= \"DELETE FROM creditos_lineas WHERE numero_socio = $socio \";\n\t\t\n\t\t//Eliminar Memos\n\t\t$sqlD[] = \"DELETE FROM socios_memo WHERE numero_socio=$socio \";\n\t\t$sqlD[] = \"DELETE FROM operaciones_mvtos WHERE socio_afectado =$socio \";\n\t\t$sqlD[] = \"DELETE FROM operaciones_recibos WHERE numero_socio =$socio \";\n\t\t//Nuevos\n\t\t$sqlD[] = \"DELETE FROM socios_baja WHERE numero_de_socio = $socio\";\n\t\t//creditos\n\t\t$sqlD[]\t= \"DELETE FROM creditos_parametros_negociados \t\t\t\t\t\tWHERE numero_de_socio=$socio\";\n\t\t$sqlD[]\t= \"DELETE FROM creditos_sdpm_historico \t\t\t\t\t\t\t\tWHERE numero_de_socio = $socio \";\n\t\t\n\t\t$sqlD[]\t= \"DELETE FROM `seguimiento_compromisos` \t\t\t\t\t\t\tWHERE `socio_comprometido`=$socio\";\n\t\t$sqlD[]\t= \"DELETE FROM `seguimiento_llamadas` \t\t\t\t\t\t\t\tWHERE `numero_socio`=$socio\";\n\t\t$sqlD[]\t= \"DELETE FROM `seguimiento_notificaciones` \t\t\t\t\t\tWHERE `socio_notificado`=$socio\";\n\n\t\t$sqlD[]\t= \"DELETE FROM `socios_memo` \t\t\t\t\t\t\t\t\t\tWHERE `numero_socio`=$socio\";\n\t\t$sqlD[]\t= \"DELETE FROM `socios_otros_parametros`\t\t\t\t\t\t\tWHERE `clave_de_persona`=$socio\";\n\t\t\n\t\t$sqlD[]\t= \"DELETE FROM `personas_documentacion`\t\t\t\t\t\t\tWHERE `clave_de_persona`=$socio\";\n\t\t$sqlD[]\t= \"DELETE FROM `personas_perfil_transaccional`\t\t\t\t\t\tWHERE `clave_de_persona`=$socio\";\n\t\t\n\t\t$sqlD[]\t= \"UPDATE contable_polizas_proforma SET socio=\" . DEFAULT_SOCIO . \" WHERE socio=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `usuarios_web_notas` SET `socio`=\" . DEFAULT_SOCIO . \" \tWHERE `socio`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `socios_aeconomica_dependencias` SET `clave_de_persona`\t\t=\" . DEFAULT_SOCIO . \" \tWHERE `clave_de_persona`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `socios_grupossolidarios` SET `representante_numerosocio`\t\t=\" . DEFAULT_SOCIO . \" \tWHERE `representante_numerosocio`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `socios_grupossolidarios` SET `vocalvigilancia_numerosocio`\t=\" . DEFAULT_SOCIO . \" WHERE `vocalvigilancia_numerosocio`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `socios_grupossolidarios` SET `clave_de_persona`\t\t=\" . DEFAULT_SOCIO . \" \tWHERE `clave_de_persona`=$socio\";\n\t\t\n\t\t$sqlD[]\t= \"UPDATE `aml_alerts` SET `persona_de_destino`\t=\" . DEFAULT_SOCIO . \" WHERE `persona_de_destino`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `aml_alerts` SET `persona_de_origen`\t=\" . DEFAULT_SOCIO . \" WHERE `persona_de_origen`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `aml_risk_register` SET `persona_relacionada`\t=\" . DEFAULT_SOCIO . \" WHERE `persona_relacionada`=$socio\";\n\t\t$sqlD[]\t= \"UPDATE `bancos_operaciones` SET `numero_de_socio`\t=\" . DEFAULT_SOCIO . \" WHERE `numero_de_socio`=$socio\";\n\t\t\n\t\t$sqlD[]\t= \" UPDATE creditos_solicitud SET persona_asociada = \" . DEFAULT_SOCIO . \" WHERE persona_asociada = $socio \";\n\t\t$sqlD[]\t= \" UPDATE `t_03f996214fba4a1d05a68b18fece8e71` SET `codigo_de_persona` = \" . DEFAULT_SOCIO . \" WHERE `codigo_de_persona` = $socio \";\n\t\t$sqlD[]\t= \" UPDATE `tesoreria_cajas_movimientos` SET `persona` = \" . DEFAULT_SOCIO . \" WHERE `persona` = $socio \";\n\t\t$sqlD[]\t= \" UPDATE `socios_relaciones` SET `numero_socio` = \" . DEFAULT_SOCIO . \" WHERE `numero_socio` = $socio \";\n\t\t\n\t\t$sqlD[]\t= \" UPDATE `general_sucursales` SET `clave_de_persona` = \" . DEFAULT_SOCIO . \" WHERE `clave_de_persona` = $socio \";\n\t\t$sqlD[]\t= \" UPDATE `operaciones_recibos` SET `persona_asociada` = \" . DEFAULT_SOCIO . \" WHERE `persona_asociada` = $socio \";\n\t\t$sqlD[]\t= \" UPDATE `socios_aeconomica_dependencias` SET `clave_de_persona` = \" . DEFAULT_SOCIO . \" WHERE `clave_de_persona` = $socio \";\n\t\t\n\t\t//$sqlD[] = \" UPDATE operaciones_mvtos SET socio_afectado = \" . DEFAULT_SOCIO . \" WHERE socio_afectado =$socio \";\n\t\t//$sqlD[] = \" UPDATE operaciones_recibos SET numero_socio = \" . DEFAULT_SOCIO . \" WHERE numero_socio =$socio \";\n\t\t//\n\t\t\n\t\t//Cambiar referencias, garantias\n\t\tforeach ($sqlD as $key => $send){\n\t\t\t$x\t= my_query($send);\n\t\t\t$msg\t.= $x[SYS_INFO];\n\t\t}\n\t\treturn $msg;\n\t}", "public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sSqlSubsidio = \"select c16_mes, \";\n $sSqlSubsidio .= \" c16_ano,\";\n $sSqlSubsidio .= \" c16_subsidiomensal,\";\n $sSqlSubsidio .= \" c16_subsidioextraordinario,\";\n $sSqlSubsidio .= \" z01_nome, \";\n $sSqlSubsidio .= \" z01_cgccpf \";\n $sSqlSubsidio .= \" from padsigapsubsidiosvereadores \"; \n $sSqlSubsidio .= \" inner join cgm on z01_numcgm = c16_numcgm \"; \n $sSqlSubsidio .= \" where c16_ano = {$iAno} \";\n $sSqlSubsidio .= \" and c16_mes <= $iMes\"; \n $sSqlSubsidio .= \" and c16_instit = {$sListaInstit}\";\n $sSqlSubsidio .= \" order by c16_ano, c16_mes\";\n $rsSubsidio = db_query($sSqlSubsidio); \n $iTotalLinhas = pg_num_rows($rsSubsidio);\n for ($i = 0; $i < $iTotalLinhas; $i++) {\n \n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n $oSubSidio = db_utils::fieldsMemory($rsSubsidio, $i);\n \n $oRetorno = new stdClass();\n $oRetorno->subCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oRetorno->subMesAnoMovimento = $sDiaMesAno;\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oSubSidio->c16_mes, $oSubSidio->c16_ano); \n $oRetorno->subMesAnoReferencia = $oSubSidio->c16_ano.\"-\".str_pad($oSubSidio->c16_mes, 2, \"0\", STR_PAD_LEFT).\"-\".\n str_pad($iUltimoDiaMes, 2, \"0\", STR_PAD_LEFT);\n $oRetorno->subNomeVereador = substr($oSubSidio->z01_nome, 0, 80); \n $oRetorno->subCPF = str_pad($oSubSidio->z01_cgccpf, 11, \"0\", STR_PAD_LEFT); \n $oRetorno->subMensal = $this->corrigeValor($oSubSidio->c16_subsidiomensal, 13); \n $oRetorno->subExtraordinario = $this->corrigeValor($oSubSidio->c16_subsidioextraordinario, 13); \n $oRetorno->subTotal = $this->corrigeValor(($oSubSidio->c16_subsidioextraordinario+\n $oSubSidio->c16_subsidiomensal), 13);\n array_push($this->aDados, $oRetorno); \n }\n return true;\n }", "public function alterar($oSicasAtendimento = NULL){\r\n\t\tif($oSicasAtendimento == NULL){\r\n\t\t\t// recebe dados do formulario\r\n\t\t\t$post = DadosFormulario::formSicasAtendimento(NULL, 2);\t\t\r\n\t\t\t// valida dados do formulario\r\n\t\t\t$oValidador = new ValidadorFormulario();\r\n\t\t\tif(!$oValidador->validaFormSicasAtendimento($post,2)){\r\n\t\t\t\t$this->msg = $oValidador->msg;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// cria variaveis para validacao com as chaves do array\r\n\t\t\tforeach($post as $i => $v) $$i = utf8_encode($v);\r\n\t\t\t// cria objeto para grava-lo no BD\r\n\t\t\t$oSicasMedico = new SicasMedico($cd_medico);\r\n\t\t\t$oSicasPessoa = new SicasPessoa($cd_pessoa);\n\t\t\t$oSicasAtendimento = new SicasAtendimento($cd_atendimento, $oSicasPessoa, $dt_ini_atendimento, $dt_fim_atendimento, $oSicasMedico, $status);\r\n\t\t}\t\t\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\r\n\t\tif(!$oSicasAtendimentoBD->alterar($oSicasAtendimento)){\r\n\t\t\t$this->msg = $oSicasAtendimentoBD->msg;\r\n\t\t\treturn false;\t\r\n\t\t}\t\t\r\n\t\treturn true;\t\t\r\n\t}", "public function alterarRede($conexao,$id_pessoa){\n $query = \"update empresa_startup set website = ?,linkedin = ?, facebook = ?, app_store = ?, google_play = ?, youtube = ?, instagram = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getWebsite(),$this->getLinkedin(),$this->getFacebook(),$this->getAppStore(),$this->getGooglePlay(),$this->getYoutube(),$this->getInstagram(),$id_pessoa]);\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}", "public function editarProducto($datos){\n $con= new conectar();\n $conexion= $con->conexion();\n $sql= \"UPDATE producto set nombre='$datos[0]',descripcion='$datos[1]',imagen='$datos[2]', \n codigo_categoria='$datos[3]', stock='$datos[4]', precio='$datos[5]' WHERE id='$datos[6]'\";\n return $result= mysqli_query($conexion, $sql);\n }", "function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}", "function registrarMedicacion($dosis,$hora,$viaAdministracion,$cantidadUnidades,$idDetalleKit,$idHistoriaClinica){\n $sql = \"insert into tbl_medicamento(dosis,hora,viaAdministracion,cantidadUnidades,idDetalleKit,idHistoriaClinica) values(:dosis,:hora,:viaAdministracion,:cantidadUnidades,:idDetalleKit,:idHistoriaClinica);\";\n // \"CALL spRegistrarMedicacionDmc\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(\":dosis\",$dosis,PDO::PARAM_STR);\n $query->bindParam(\":hora\",$hora,PDO::PARAM_STR);\n $query->bindParam(\":viaAdministracion\",$viaAdministracion,PDO::PARAM_STR);\n $query->bindParam(\":cantidadUnidades\",$cantidadUnidades,PDO::PARAM_STR);\n $query->bindParam(\":idDetalleKit\",$idDetalleKit,PDO::PARAM_STR);\n $query->bindParam(\":idHistoriaClinica\",$idHistoriaClinica,PDO::PARAM_STR);\n $query->execute();\n $sql = \"update tbl_detallekit dt1,(select cantidadFinal-:cantidadUnidades as nuevaCantidad from tbl_detallekit where idDetallekit = :idDetalleKit)as dt2 set dt1.cantidadFinal = dt2.nuevaCantidad where idDetallekit = :idDetalleKit;\";\n //\"CALL spActualizarMedicacionDmc\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(\":cantidadUnidades\",$cantidadUnidades,PDO::PARAM_INT);\n $query->bindParam(\":idDetalleKit\",$idDetalleKit,PDO::PARAM_STR);\n $query->execute();\n }", "function ActuzalizarMascotas($nombre_mascota, $idgenero, $idraza, $sexo, $tipo_sangre, $color, $fecha_creo, $usuario_creo){\n $conexion = Conectar();\n $sql = \"UPDATE mascotas SET nombre_mascota=:nombre_mascota and idgenero=:idgenero and idraza=:idraza and sexo=:sexo and tipo_sangre=:tipo_sangre and color=:color and fecha_creo=:fecha_creo and usuario_creo=:usuario_creo\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':nombre_mascota', $nombre_mascota);\n $statement->bindParam(':idgenero', $idgenero);\n $statement->bindParam(':idraza', $idraza);\n $statement->bindParam(':sexo', $sexo);\n $statement->bindParam(':tipo_sangre', $tipo_sangre);\n $statement->bindParam(':color', $color);\n $statement->bindParam(':fecha_creo', $fecha_creo);\n $statement->bindParam(':usuario_creo', $usuario_creo);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_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_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\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 establecer_m2_reservas_concretadas() {\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_promotor like 'NET%'\");\n// $reservas = FUNCIONES::lista_bd_sql(\"select res_id,zon_precio from reserva_terreno\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_multinivel = 'si' and res_monto_m2=0\");\n\n\n\n $reservas = FUNCIONES::lista_bd_sql(\"select res_id,ven_metro from reserva_terreno\n\n inner join venta on (ven_res_id=res_id)\n\n where res_monto_m2=0 and res_estado in ('Concretado') and ven_estado in ('Pendiente','Pagado')\");\n\n\n\n $conec = new ADO();\n\n foreach ($reservas as $res) {\n\n $conec->ejecutar(\"update reserva_terreno set res_monto_m2=$res->ven_metro where res_id=$res->res_id\");\n }\n}", "static public function mdlEditarServicios($tabla, $datos){\n$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombre_servicio = :nombre_servicio, precio = :precio\n WHERE id = :id\");\n\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":nombre_servicio\", $datos[\"nombre_servicio\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":precio\", $datos[\"precio\"], PDO::PARAM_INT);\n\t\t\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "function alterFotoFisi($conexao, $foto_coment, $foto_nome, $foto_tel, $foto_cel, $foto_cpf, $foto_end, $foto_num, $foto_estado, $foto_cidade, $foto_email, $foto_especi, $foto_img,$foto_emp='', $foto_cep=''){\n\t\techo \"<br/>Dentro do foto_especi: \".print_r($foto_especi).\"<br/>\";\n\n\t\t$sql_update = sprintf(\"\n\t\t\t\tupdate fotografo f, fotografo_fisico fs, localizacao_foto lf\n\t\t\t\tset f.foto_comentario = '%s', f.foto_img_perf = '%s',\n\t\t\t\t fs.foto_fisi_nome = '%s', fs.foto_fisi_tel = '%s', fs.foto_fisi_cel = '%s', fs.foto_fisi_cpf = '%s',\n\t\t\t\t lf.loca_end_foto = '%s',lf.loca_num_foto = '%s', lf.loca_estado_foto = %u, lf.loca_cidade_foto = %u,\n\t\t\t\t fs.foto_fisi_nome_emp = '%s', lf.loca_cep_foto = '%s'\n\t\t\t\twhere f.foto_cod = fs.foto_cod\n\t\t\t\tand f.foto_cod\t = lf.foto_cod\n\t\t\t\tand fs.foto_fisi_email = '%s' \", $foto_coment, $foto_img,$foto_nome, $foto_tel, $foto_cel, $foto_cpf, $foto_end, $foto_num, $foto_estado, $foto_cidade, $foto_emp, $foto_cep, $foto_email);\n\t\t$resultado_update = mysqli_query($conexao, $sql_update) or die(mysqli_error($conexao).\"<br/>\".$sql_update);\n\t\t$resulUpEspeci \t = atualizarEspecialidadeFotografo($conexao,$foto_email,$foto_especi);\n\n\t\tif($resultado_update){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function desenfocarCamaraAlumnos2() {\n\n self::$alumnos2->desenfocar();\n\n }", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "function carregarDadosEquip($idSimEquip){\n\n // CRIA UM OBJETO DE DA CLASSE DE CONEXAO\n $connBase = new EficazDB;\n\n // $query = \"SELECT equip.nomeEquipamento, equip.modelo, tipoEquip.tipo_equipamento, simEquip.ambiente,clieInfo.nome AS ´cliente´, fili.nome AS 'filial'\n // FROM tb_equipamento equip\n // JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n // JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n // LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n // JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n // WHERE simEquip.id = '$idSimEquip'\";\n\n // $query = \"SELECT equip.nomeEquipamento, equip.modelo, tipoEquip.tipo_equipamento, simEquip.ambiente,clieInfo.nome AS 'cliente', fili.nome AS 'filial'\n // FROM tb_equipamento equip\n // JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n // JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n // LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n // JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n // WHERE simEquip.id = '$idSimEquip'\";\n\n //QUERY ATUALIZADA\n\n $query = \"SELECT equip.nomeModeloEquipamento, tipoEquip.tipo_equipamento, simEquip.ambiente, clieInfo.nome AS 'cliente', fili.nome AS 'filial'\n FROM tb_equipamento equip\n JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n WHERE simEquip.id = '$idSimEquip'\";\n\n // Monta a result\n $result = $connBase->select($query);\n\n // Verifica se existe valor de retorno\n if (@mysql_num_rows ($result) > 0)\n {\n /* ARMAZENA NA ARRAY */\n while ($row = @mysql_fetch_assoc ($result))\n {\n $retorno[] = $row;\n }\n\n }else{\n // Se nao existir valor de retorno\n // Armazena 0 no vetor\n $retorno[] = 0;\n }\n\n // Fecha a conexao\n $connBase->close();\n\n return $retorno;\n}", "function evt__pantallas_ei__modificacion($datos)\n\t{\n\t\t$busqueda = $this->get_entidad()->tabla('objetos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->eliminar_fila($id);\n\t\t}\n\n\t\t//Seteo los cursores correspondientes y doy de alta los registros\n\t\t$this->get_entidad()->tabla('pantallas')->set_cursor($this->get_pant_actual());\n\t\t$orden = 0;\n\t\tforeach ($datos as $dato) {\n\t\t\t$id = $this->get_entidad()->tabla('dependencias')->get_id_fila_condicion(array('identificador' => $dato['dependencia']));\n\t\t\t$this->get_entidad()->tabla('dependencias')->set_cursor(current($id));\n\t\t\t$this->get_entidad()->tabla('objetos_pantalla')->nueva_fila(array('orden' => $orden, 'dependencia' => $dato['dependencia']));\n\t\t\t$orden++;\n\t\t}\n\t\t//Reseteo el cursor asi no se queda apuntando a donde no debe\n\t\t$this->get_entidad()->tabla('dependencias')->resetear_cursor();\n\t}", "static public function mdlSinAdquisicionLogistica($tabla, $datos){\r\n\t\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set statusCompras = :statusCompras,estadoCompras = :estadoCompras where idPedido = :idPedido AND serie = :serie\");\r\n\r\n\t\t$stmt->bindParam(\":statusCompras\", $datos[\"statusCompras\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":estadoCompras\", $datos[\"estadoCompras\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\r\n\t\tif($stmt->execute()){\r\n\r\n\t\t\treturn \"ok\";\t\r\n\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\r\n\t\t\r\n\t\t}\r\n\r\n\t\t$stmt->close();\r\n\t\t\r\n\t\t$stmt = null;\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "public function enfocarCamaraAlumnos1() {\n\n self::$alumnos1->enfocar();\n\n }", "function establecer_m2_reservas() {\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_promotor like 'NET%'\");\n// $reservas = FUNCIONES::lista_bd_sql(\"select res_id,zon_precio from reserva_terreno\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_multinivel = 'si' and res_monto_m2=0\");\n\n\n\n $reservas = FUNCIONES::lista_bd_sql(\"select res_id,zon_precio from reserva_terreno\n\n inner join lote on (res_lot_id=lot_id)\n\n inner join zona on (lot_zon_id=zon_id)\n\n where res_monto_m2=0 and res_estado in ('Pendiente','Habilitado')\");\n\n\n\n $conec = new ADO();\n\n foreach ($reservas as $res) {\n\n $conec->ejecutar(\"update reserva_terreno set res_monto_m2=$res->zon_precio where res_id=$res->res_id\");\n }\n}", "public function deshuso(){\n try{\n $gestion = isset($_GET['gestion']) ? $_GET['gestion'] : date('Y');\n $almacen = isset($_GET['almacen']) ? $_GET['almacen'] : 0;\n $datos = \\DB::table('articulos_movimientos')->join('users', 'articulos_movimientos.id_usuario', '=', 'users.id')\n ->join('movimientos', 'articulos_movimientos.id_movimiento', '=', 'movimientos.id')\n ->join('almacenes', 'articulos_movimientos.id_almacen', '=', 'almacenes.id')\n ->join('aperturas', 'articulos_movimientos.id_apertura', '=', 'aperturas.id')\n ->join('clasificadores', 'articulos_movimientos.id_clasificador','=', 'clasificadores.id')\n ->join('conceptos', 'movimientos.id_concepto', '=', 'conceptos.id')\n ->where('articulos_movimientos.observacion', '!=', '' )\n ->where('articulos_movimientos.id_gestion', '=', $gestion)\n ->where('articulos_movimientos.id_almacen', '=', $almacen)\n ->select('articulos_movimientos.id', 'articulos_movimientos.*', 'movimientos.fecha as movimientoFecha', 'movimientos.movimiento as movimientoTipo',\n 'conceptos.tipo', 'conceptos.concepto', 'users.name', 'movimientos.nro_moviento',\n 'clasificadores.codigo as clasificadorCodigo',\n 'aperturas.codigo as aperturaCodigo', 'aperturas.*',\n 'almacenes.*')\n ->orderBy('articulos_movimientos.id_almacen', 'asc')\n ->get();\n\n $bienes = \\DB::table('bienes')->join('users', 'bienes.id_usuario', '=', 'users.id')\n ->join('unidades', 'bienes.id_unidad', '=', 'unidades.id')\n ->join('articulos_movimientos', 'bienes.id', '=', 'articulos_movimientos.id_bien')\n ->join('clasificadores', 'articulos_movimientos.id_clasificador','=', 'clasificadores.id')\n ->where('articulos_movimientos.observacion', '!=', '' )\n ->where('bienes.id_gestion', '=', $gestion)\n ->select('bienes.id', 'bienes.codigo', 'bienes.bien', 'unidades.unidad', 'users.name',\n 'clasificadores.codigo as clasificadorCodigo', 'articulos_movimientos.id_almacen')\n ->groupBy('bienes.id')->get();\n\n $configuracion = \\DB::table('configuraciones')->first();\n $almacenes = \\App\\Almacenes::find($almacen);\n $gestion = Gestiones::find($gestion);\n\n $pdf = \\PDF::loadView('reporte.deshusoReporte', compact('datos', 'configuracion', 'bienes', 'apertura', 'almacenes', 'gestion') )\n ->setPaper('letter')->setOrientation('portrait')\n ->setOption('page-width', '216mm')\n ->setOption('page-height', '279mm')\n ->setOption('margin-right', '10mm')\n ->setOption('margin-left', '14mm')\n ->setOption('margin-bottom', '25mm')\n ->setOption('header-spacing', 15)\n ->setOption('footer-spacing', 1)\n ->setOption('footer-html', asset('pie.php'));\n\n return $pdf->inline('Codigo4060_Apertura'.date('Ymdhis').'.pdf');\n }catch(\\Exception $e){\n return \"<script> alert('Error R0008: Reporte de bienes en deshuso \\n\".$e->getMessage().\"'); location.href='\".asset('index.php/Reportes').\"'; </script>\";\n }\n }", "function editar_marca($id_editar, $marca, $moneda){\r\n\r\n\t\t\r\n\t$sql_marca=\"SELECT marca FROM marcadeherramientas WHERE id=$id_editar \";\r\n\t$resultado_marca=mysql_query($sql_marca);\r\n\r\n\twhile($row_marca=mysql_fetch_array($resultado_marca)){\r\n\t\r\n\t$marca_anterior=$row_marca['marca'];\t\r\n\t\r\n\t}\r\n\tif($marca_anterior != $marca){\r\n\t\t// si cambia el nombre de la marca que tambien cambie el nombre de su tabla\r\n\t\t\t$sql_nombre_tabla=\"RENAME TABLE precio\".$marca_anterior.\" TO precio\".$marca.\"\";\r\n\t\t if(!$resultado = mysql_query($sql_nombre_tabla)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t\t}\r\n\r\n\r\n$sql_marca=\"UPDATE `marcadeherramientas` SET `marca` = '\".$marca.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t$sql_marca=\"UPDATE `marcadeherramientas` SET `moneda` = '\".$moneda.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar moneda de la marca ')</script>\";\t\r\n\tdie();\r\n } \r\n \r\n //Actualiza tabla Productos\r\n \r\n $sqlActualiza=\"UPDATE productos SET moneda='\".$moneda.\"' , marca='\".$marca.\"' \r\n WHERE IdMarca=\".$id_editar.\"\r\n \";\r\n \r\n\tif(!$resultado = mysql_query($sqlActualiza)) {\r\n\techo\"<script>alert('Error al editar tabla productos')</script>\";\t\r\n\tdie();\r\n } \r\n\t\t\r\n\t\t\r\necho\"<script>alert('Los registros fueron modificados')</script>\";\t\t\r\n\techo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=../precios.php\\\">\"; \t\r\n\t\r\n\t\t}", "public function editarpersonal($datos){\n $c= new conectar();\n $conexion=$c->conexion();\n\n $sql=\"UPDATE personal set nombres='$datos[0]',ape_pat='$datos[1]',ape_mat='$datos[2]',dni='$datos[3]',celular='$datos[4]',correo='$datos[5]'\n where id_personal=$datos[6]\";\n return $result=mysqli_query($conexion,$sql);\n\n }", "function modificarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_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_metodologia','id_metodologia','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','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}", "function modificarAnuncio($titulo, $descripcion, $imagen, $id_poi, $id_usuario) {\n $sql = \"UPDATE anuncio SET titulo='\" . $titulo . \"',descripcion='\" . $descripcion . \"',imagen='\" . $imagen\n . \"' WHERE id_usuario='\" . $id_usuario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function modificarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_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_analisis_porque_det','id_analisis_porque_det','int4');\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','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 alterarDescricao($conexao,$id_pessoa){\n $query = \"update empresa_startup set descricao_curta = ?, descricao = ?, tags = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getDescricaoCurta(),$this->getDescricao(),$this->getTags(),$id_pessoa]);\n }", "public function ConstruirSQL(string $tipoConsulta, string $nombretabla, array $datosRecibidos){\n $instruccionSql= \"\";\n $campos = array();\n\n $camposTabla = $this->ObtenerCamposTabla($nombretabla);\n\n switch ($tipoConsulta){\n case \"I\":\n\n $nuevoDato=array(); \n\n foreach ($camposTabla as $claveCampos => $campo) {\n \n if( !array_key_exists ( $campo , $datosRecibidos ) ) $datosRecibidos[$campo] = 'NULL';\n else if( is_null($datosRecibidos[$campo]) ) $datosRecibidos[$campo] = 'NULL';\n else $datosRecibidos[$campo] = \"'\".$datosRecibidos[$campo].\"'\";\n\n $nuevoDato[] = $datosRecibidos[$campo];\n\n }\n\n $informacion = implode ( \",\" , $nuevoDato );\n $instruccionSql = \"INSERT INTO $nombretabla ( \".implode ( \",\" , $camposTabla ).\" ) VALUES ( $informacion )\";\n \n break;\n case \"A\":\n\n $nuevoDato=array();\n\n foreach ($camposTabla as $claveCampos => $campo) {\n\n if( !array_key_exists ( $campo , $datosRecibidos ) ) $datosRecibidos[$campo] = 'NULL';\n else if (is_null($datosRecibidos[$campo]) ) $datosRecibidos[$campo] = $campo.\" = NULL\";\n else $datosRecibidos[$campo] = $campo.\" = '\".$datosRecibidos[$campo].\"'\";\n \n $nuevoDato[] = $datosRecibidos[$campo];\n\n }\n\n $informacion = implode ( \",\" , $nuevoDato );\n $instruccionSql = \"UPDATE $nombretabla SET $informacion WHERE \".$datosRecibidos['id'];\n\n break;\n case \"E\":\n\n $instruccionSql = \"DELETE FROM $nombretabla WHERE id = \".$datosRecibidos['id'];\n\n break; \n }\n\n return $instruccionSql;\n }", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "public function actionUpdate($id)\n {\n\t\t$idFase \t= Yii::$app->request->get('idFase');\n\t\t\n\t\t$anio \t\t= Yii::$app->request->get('anio');\n\t\t$esDocente \t= Yii::$app->request->get('esDocente');\n\t\t\n\t\t$ciclos = new SemillerosTicCiclos();\n\t\t\n\t\t$dataResumen = [];\n\t\t\n\t\t/**\n\t\t * Estructura de datos\n\t\t * Aquí formo como están estructurados los datos para guardar\n\t\t *\n\t\t * Un diario de campo tiene muchos movimientos\n\t\t */\n\t\t$diarioCampo \t= null;\n\t\t$movimientos\t= [];\n\t\t/**/\n\t\t\n\t\t//Si hay un idFase, significa que se debe buscar los datos guardados\n\t\t//Se hace por que significa que el usuario cambio la fase en el select de la vista _form\n\t\tif( $id )\n\t\t{\n\t\t\t//Busco diario de campo según los datos suministrados\n\t\t\t$diarioCampo \t= SemillerosTicDiarioDeCampoEstudiantes::findOne($id);\n\t\t\t$diarioCampo->isNewRecord =true;\n\t\t\tvar_dump( $diarioCampo->isNewRecord );\n\t\t\t\n\t\t\t$idFase = $diarioCampo->id_fase;\n\t\t\t\n\t\t\t//Consulto todas las Sesiones por ejecuciones de Fase\n\t\t\tswitch( $idFase )\n\t\t\t{\n\t\t\t\tcase 1: $idFaseFase = 14; break;\n\t\t\t\tcase 2: $idFaseFase = 15; break;\n\t\t\t\tcase 3: $idFaseFase = 16; break;\n\t\t\t}\n\t\t\t\n\t\t\t$dataResumen = $this->actionOpcionesEjecucionDiarioCampo( $idFaseFase, $anio, 1, $idFase );\n\t\t\t\n\t\t\t\n\t\t\t//Si no encuentra significa que es un registro nuevo\n\t\t\tif( !$diarioCampo )\n\t\t\t{\n\t\t\t\t$diarioCampo \t= new SemillerosTicDiarioDeCampoEstudiantes();\n\t\t\t\t$diarioCampo->id_fase = $idFase;\n\t\t\t}\n\t\t\t\n\t\t\t//Consulto todas las Sesiones por ejecuciones de Fase\n\t\t\tswitch( $idFase )\n\t\t\t{\n\t\t\t\tcase 1: $tabla = \"i\"; break;\n\t\t\t\tcase 2: $tabla = \"ii\"; break;\n\t\t\t\tcase 3: $tabla = \"iii\"; break;\n\t\t\t}\n\t\t\t\n\t\t\t$datosSesiones\t= DatosSesiones::find()\n\t\t\t\t\t\t\t\t\t->alias('ds')\n\t\t\t\t\t\t\t\t\t->select( 'id_sesion' )\n\t\t\t\t\t\t\t\t\t->innerJoin( 'semilleros_tic.ejecucion_fase_'.$tabla.'_estudiantes ef', 'ef.id_datos_sesion=ds.id' )\n\t\t\t\t\t\t\t\t\t->where( 'ds.estado=1' )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.estado=1' )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.anio='.$anio )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.id_fase='.$idFase )\n\t\t\t\t\t\t\t\t\t->groupby( 'id_sesion' )\n\t\t\t\t\t\t\t\t\t->all();\n\t\t\t\n\t\t\t$sesiones = [];\n\t\t\t\n\t\t\tforeach( $datosSesiones as $key => $value )\n\t\t\t{\n\t\t\t\t$sesiones[] = $value->id_sesion;\n\t\t\t\t\n\t\t\t\t$mov = SemillerosTicMovimientoDiarioCampoEstudiantes::findOne([\n\t\t\t\t\t\t\t\t\t\t\t'id_diario_de_campo_estudiantes' \t=> $diarioCampo->id,\n\t\t\t\t\t\t\t\t\t\t\t'id_sesion' \t\t\t\t\t\t=> $value->id_sesion,\n\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif( !$mov )\n\t\t\t\t{\n\t\t\t\t\t$mov = new SemillerosTicMovimientoDiarioCampoEstudiantes();\n\t\t\t\t\t$mov->id_sesion = $value->id_sesion;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$movimientos[] = $mov;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//se crea una instancia del modelo fases\n\t\t$fasesModel \t\t \t= Fases::findOne( $diarioCampo->id_fase );\n\t\t\n\t\t//se guardan los datos en un array\n\t\t$fases\t \t \t \t= [ $fasesModel->id => $fasesModel->descripcion ];\n\t\t\n\t\t$anios\t= [ $anio => $anio ];\n\t\t\n\t\t$cicloslist = [];\n\t\t\t\n\n return $this->renderAjax('create', [\n 'diarioCampo' \t=> $diarioCampo,\n 'movimientos' \t=> $movimientos,\n\t\t\t'fases' \t\t=> $fases,\n 'fasesModel'\t=> $fasesModel,\n\t\t\t'ciclos' \t\t=> $ciclos,\n 'cicloslist'\t=> $cicloslist,\n 'anios' \t\t=> $anios,\n 'anio' \t\t\t=> $anio,\n 'esDocente' \t=> $esDocente,\n 'dataResumen' \t=> $dataResumen,\n ]);\n }", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}", "public function persistir(Consulta $consulta);", "function Alterar($id) {\n if($this->GetClienteCPF($this->getCli_cpf())>0 && $this->getCli_cpf() <> $_SESSION['CLI']['cli_cpf']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se o email for diferente da sessao----------------------\n if($this->GetClienteEmail($this->getCli_email())>0 && $this->getCli_email() <> $_SESSION['CLI']['cli_email']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n \n \n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"UPDATE \".$this->prefix.\"clientes SET cli_nome=:cli_nome,\n cli_sobrenome=:cli_sobrenome,\n cli_data_nasc=:cli_data_nasc,\n cli_rg=:cli_rg,\n cli_cpf=:cli_cpf,\n cli_ddd=:cli_ddd,\n cli_fone=:cli_fone,\n cli_celular=:cli_celular,\n cli_endereco=:cli_endereco,\n cli_numero=:cli_numero,\n cli_bairro=:cli_bairro,\n cli_cidade=:cli_cidade,\n cli_uf=:cli_uf,\n cli_cep=:cli_cep,\n cli_email=:cli_email,\n cli_data_cad=:cli_data_cad,\n cli_hora_cad=:cli_hora_cad,\n cli_pass=:cli_senha \n WHERE cli_id =:cli_id\";\n \n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n ':cli_id' => (int)$id\n \n \n );\n \n //echo $query;\n \n \n if($this->ExecuteSQL($query, $params)):\n return true;\n else:\n return false;\n endif;\n \n \n }", "public static function update_nombre($id_medio,$nombre){\n global $baseDatos;\n \n $res = $baseDatos->query(\" UPDATE `art_venta_medio` SET `nombre`='$nombre' WHERE id_medio = $id_medio\"); \n \n return $res;\n }", "public function efectuarConsulta($consulta){\n\n mysqli_query($this->conexion, \"SET lc_time_names = 'es_ES'\" ); \n //Añade el uso de caracteres especiales como tildes con el formato utf8\n mysqli_query($this->conexion, \"SET NAMES 'utf8'\");\n mysqli_query($this->conexion, \"SET CHARACTER 'utf8'\");\n\n $this->resultadoConsulta = mysqli_query($this->conexion, $consulta);\n \n \n return $this->resultadoConsulta; \n }", "function EDIT()\n{ //COMPROBAR SI EXISTEN TODOS MEDIANTE EL SELECT\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\t//si no guardamos un mensaje de error en la variable resultado\n\t\t\tif($result = $this->mysqli->query($sql)){\t\n\t//si se cumple la condicion\n\tif ($result->num_rows == 0){ // existe el usuario\n\t\t$sql = \"UPDATE PROF_ESPACIO SET DNI = '$this->DNI',CODESPACIO = '$this->CODESPACIO' WHERE DNI= '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"'\";\n\t//si se cumple la condicion\n\t\tif ($this->mysqli->query($sql))\n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';//guarda mensaje de error en la variable resultado\n\t}\n\treturn $resultado;\n\t}\n\t//si no\n\telse\n\t{\n\t\treturn 'El elemento no existe en la BD';//devuelve el mensaje\n\t}\n\t}//si no\n\telse{\n\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "function autorizar_producto_san_luis($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen,deposito_destino\r\n from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_origen = $res->fields[\"deposito_origen\"];\r\n $id_deposito_destino = $res->fields[\"deposito_destino\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM Producto San Luis nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"]; \r\n ///////////////////////////////////////\r\n $sql = \"select id_recibidos_mov,cantidad\r\n from recibidos_mov where id_detalle_movimiento=$id_detalle_movimiento \r\n and ent_rec=0\";\r\n $detalle_rec = sql($sql) or fin_pagina();\r\n $id_recibido_mov = $detalle_rec->fields[\"id_recibidos_mov\"];\r\n if($id_recibido_mov==\"\") {\r\n\t \t //insert\r\n\t\t $sql = \"select nextval('recibidos_mov_id_recibidos_mov_seq') as id_recibido_mov\";\r\n\t\t $res_1 = sql($sql) or fin_pagina();\r\n\t\t $id_recibido_mov = $res_1->fields[\"id_recibido_mov\"];\r\n\t\t $sql=\"insert into recibidos_mov(id_recibidos_mov,id_detalle_movimiento,cantidad,ent_rec)\r\n\t\t values($id_recibido_mov,$id_detalle_movimiento,$cantidad,0)\";\r\n }else {\r\n\t //update\r\n\t $sql=\"update recibidos_mov set cantidad=cantidad+$cantidad\r\n\t where id_recibidos_mov=$id_recibido_mov\";\r\n }//del else\r\n sql($sql) or fin_pagina();\r\n $sql =\"insert into log_recibidos_mov(id_recibidos_mov,usuario,fecha,cantidad_recibida,tipo)\r\n values($id_recibido_mov,'\".$_ses_user[\"name\"].\"','$fecha_hoy',$cantidad,'entrega')\";\r\n sql($sql) or fin_pagina();\r\n /////////////////////////////////////// \r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_origen,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n $comentario = \"Producto San Luis perteneciente al PM nro: $id_mov\";\r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$id_deposito_destino,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "public function indexAsistenciaDiaria()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $ciclo = $dbm->getRepositoriosById(\"Ciclo\", \"activo\", 1);\n $nivel = $dbm->getRepositoriosModelo(\"Nivel\", \n [\"d.nivelid, d.nombre\"], \n [[\"nivelid is not null and cn.asistenciapordia = 1 and d.activo = 1 \"]], false, true, [\n [\"entidad\" => \"CeConfiguracionnivel\", \"alias\" => \"cn\", \"left\" => false, \"on\" => \"cn.configuracionnivelid = d.configuracionnivelid\"]\n ]);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n\t\t\t$periodoeval = $dbm->getRepositoriosModelo(\"CePeriodoevaluacion\", [\"d.periodoevaluacionid, d.descripcion, IDENTITY(c.cicloid) as cicloid, GROUPCONCAT(DISTINCT IDENTITY(g.gradoid)) as gradoid\"],\n\t\t\t\t[], false, false, [\n\t\t\t\t[\"entidad\" => \"CeConjuntoperiodoevaluacion\", \"alias\" => \"c\", \"left\" => false, \"on\" => \"c.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n\t\t\t\t[\"entidad\" => \"CeGradoporconjuntoperiodoescolar\", \"alias\" => \"g\", \"left\" => false, \"on\" => \"g.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n ], 'd.periodoevaluacionid');\n $param = $dbm->getRepositorioById('Parametros', 'parametrosid', 156);\n\n\n $array = array(\"ciclo\" => $ciclo, \n \"nivel\" => $nivel, \n \"grado\" => $grado, \n \"semestre\" => $semestre,\n \"grupo\" => $grupo,\n \"periodos\" => $periodoeval,\n \"param\" => $param && $param->getValor() ? intval($param->getValor()) : null\n );\n return new View($array, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}", "public function importacionLinea($tipo) {\n //echo \"llego2\";\n $codLin = '02';\n $tipConsult = $tipo;\n $dtActFecha = date(\"Y-m\", strtotime(date()));//'2019-02';//\n //$dtAntFecha = date(\"Y-m\", strtotime(date()));//restarle 1 mes//'2019-01';//\n\t$dtAntFecha = date(\"Y-m\", strtotime('-1 month', strtotime(date())));//Se resta 1 mes.\n //Generar Manualmente\n //$dtActFecha ='2019-04';\n //$dtAntFecha ='2019-03';\n \n \n try {\n $obj_con = new cls_Base();\n $obj_var = new cls_Global();\n $con = $obj_con->conexionServidor();\n //$rawDataANT = array();\n $rawDataACT = array();\n \n $sql = \"SELECT A.COD_LIN, A.COD_TIP, A.COD_MAR, D.NOM_LIN, E.NOM_TIP, F.NOM_MAR,\"\n . \"SUM(A.P_PROME*B.EXI_TOT) AS COS_ACT, \";\n $sql .= \"IFNULL((SELECT X.COSTO_T FROM \" . $obj_con->BdServidor . \".IG0007 X \"\n . \" WHERE X.COD_LIN=A.COD_LIN AND X.COD_MAR=A.COD_MAR AND TIP_CON='$tipConsult' \"\n . \" AND ANO_MES='$dtAntFecha'),0) COS_ANT \"; \n $sql .= \" FROM \" . $obj_con->BdServidor . \".IG0020 A \";\n $sql .= \" INNER JOIN \" . $obj_con->BdServidor . \".IG0022 B ON A.COD_ART=B.COD_ART \";\n $sql .= \" INNER JOIN \" . $obj_con->BdServidor . \".IG0001 D ON A.COD_LIN=D.COD_LIN \";\n $sql .= \" INNER JOIN \" . $obj_con->BdServidor . \".IG0002 E ON A.COD_TIP=E.COD_TIP \";\n $sql .= \" INNER JOIN \" . $obj_con->BdServidor . \".IG0003 F ON A.COD_MAR=F.COD_MAR \";\n $sql .= \" WHERE B.EXI_TOT <> 0 \"; \n $sql .=($codLin!='')?\" AND A.COD_LIN='$codLin' \":\"\";\n $sql .=($tipConsult!='TD')?\" AND A.COD_TIP='$tipConsult' \":\"\";\n $sql .=\" GROUP BY A.COD_LIN,A.COD_MAR ORDER BY COD_LIN,COD_MAR \";\n $sentencia = $con->query($sql);\n if ($sentencia->num_rows > 0) {\n while ($fila = $sentencia->fetch_assoc()) {//Array Asociativo\n $rawDataACT[] = $fila;\n }\n }\n //cls_Global::putMessageLogFile($sql);\n for ($i = 0; $i < sizeof($rawDataACT); $i++) {\n \n $sql=\"INSERT INTO \" . $obj_con->BdServidor . \".IG0007 \n (COD_LIN,COD_TIP,COD_MAR,NOM_MAR,COST_ANT,COST_ACT,COSTO_T,FEC_SIS,TIP_CON,ANO_MES)VALUES \n ('\" . $rawDataACT[$i]['COD_LIN'] . \"',\n '\" . $rawDataACT[$i]['COD_TIP'] . \"',\n '\" . $rawDataACT[$i]['COD_MAR'] . \"',\n '\" . $rawDataACT[$i]['NOM_MAR'] . \"',\n '\" . $rawDataACT[$i]['COS_ANT'] . \"',\n '\" . $rawDataACT[$i]['COS_ACT'] . \"',\n '\" . $rawDataACT[$i]['COS_ACT'] . \"',\n '\" . $dtActFecha . \"-01',\n '\" . $tipConsult . \"',\n '\" . $dtActFecha . \"')\";\n //cls_Global::putMessageLogFile($rawDataACT[$i]['COS_ACT']);\n //cls_Global::putMessageLogFile($sql);\n $command = $con->prepare($sql); \n $command->execute();\n \n \n } \n\n $con->commit();\n $con->close();\n return true;\n } catch (Exception $e) { // se arroja una excepción si una consulta falla\n //return VSexception::messageSystem('NO_OK', $e->getMessage(), 41, null, null);\n $con->rollback();\n $con->close();\n throw $e;\n return false;\n }\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "public function enfocarCamaraAlumnos2() {\n\n self::$alumnos2->enfocar();\n\n }", "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 }", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }", "public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n \n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sWhere = \"o70_instit in ({$sListaInstit})\";\n $iAnoUsu = (db_getsession(\"DB_anousu\")-1);\n $sDataIni = $iAnoUsu.\"-01-01\";\n $sDataFim = $iAnoUsu.\"-12-31\";\n $sSqlBalAnterior = db_receitasaldo(11, 1, 3, true, $sWhere, $iAnoUsu, $sDataIni, $sDataFim, true);\n \n $sSqlAgrupado = \"select case when fc_conplano_grupo($iAnoUsu, substr(o57_fonte,1,1) || '%', 9000 ) is false \"; \n $sSqlAgrupado .= \" then substr(o57_fonte,2,14) else substr(o57_fonte,1,15) end as o57_fonte, \";\n $sSqlAgrupado .= \" o57_descr, \";\n $sSqlAgrupado .= \" saldo_inicial, \";\n $sSqlAgrupado .= \" saldo_arrecadado_acumulado, \"; \n $sSqlAgrupado .= \" x.o70_codigo, \";\n $sSqlAgrupado .= \" x.o70_codrec, \";\n $sSqlAgrupado .= \" coalesce(o70_instit,0) as o70_instit, \";\n $sSqlAgrupado .= \" fc_nivel_plano2005(x.o57_fonte) as nivel \"; \n $sSqlAgrupado .= \" from ({$sSqlBalAnterior}) as x \";\n $sSqlAgrupado .= \" left join orcreceita on orcreceita.o70_codrec = x.o70_codrec and o70_anousu={$iAnoUsu} \";\n $sSqlAgrupado .= \" order by o57_fonte \"; \n $rsBalancete = db_query($sSqlAgrupado);\n $iTotalLinhas = pg_num_rows($rsBalancete);\n for ($i = 1; $i < $iTotalLinhas; $i++) {\n \n $oReceita = db_utils::fieldsMemory($rsBalancete, $i);\n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n \n $oReceitaRetorno = new stdClass();\n \n $oReceitaRetorno->braCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oReceitaRetorno->braMesAnoMovimento = $sDiaMesAno;\n $oReceitaRetorno->braContaReceita = str_pad($oReceita->o57_fonte, 20, 0, STR_PAD_RIGHT);\n $oReceitaRetorno->braCodigoOrgaoUnidadeOrcamentaria = str_pad($oInstituicao->codtrib, 4, \"0\", STR_PAD_LEFT);\n $nSaldoInicial = $oReceita->saldo_inicial;\n $oReceita->saldo_inicial = str_pad(number_format(abs($oReceita->saldo_inicial),2,\".\",\"\"), 13,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaOrcada = $oReceita->saldo_inicial;\n $oReceita->saldo_arrecadado_acumulado = str_pad(number_format(abs($oReceita->saldo_arrecadado_acumulado) \n ,2,\".\",\"\"), 12,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaRealizada = $oReceita->saldo_arrecadado_acumulado;\n $oReceitaRetorno->braCodigoRecursoVinculado = str_pad($oReceita->o70_codigo, 4, \"0\", STR_PAD_LEFT); \n $oReceitaRetorno->braDescricaoContaReceita = substr($oReceita->o57_descr, 0, 255); \n $oReceitaRetorno->braTipoNivelConta = ($oReceita->o70_codrec==0?'S':'A'); \n $oReceitaRetorno->braNumeroNivelContaReceita = $oReceita->nivel;\n $this->aDados[] = $oReceitaRetorno; \n }\n return true;\n }", "public function updateReporMoscasTecnico($POST){\n\t\t// require('../bd/bd.php');\n\t\t$db = new DbCnnx();\n\n @$noFolio=$POST[\"noFolio\"]; \n @$noCliente=$POST[\"noCliente\"]; \n @$Obser=$POST[\"Obser\"]; \n @$horInicio=$POST[\"horInicio\"]; \n @$horFinal=$POST[\"horFinal\"]; \n @$id_object=$POST[\"id_object\"];\n @$ubicacion=$POST[\"ubicacion\"];\n @$consumo=$POST[\"consumo\"];\n\t\t@$valid=$POST[\"valid\"];\n @$limpieza=$POST[\"limpieza\"];\n @$estatus_object=$POST[\"estatus_object\"];\n @$obser_object=$POST[\"obser_object\"];\n\t\t\n\t\t$createId = $noCliente.'MOS'.$id_object;\n\t\t$createIdPrincipal = $noCliente.'MOS';\n\t\tif($noCliente == \"\"){\n\t\t\techo \"\n\t\t\t<script language='javascript'>\n\t\t\t\talert('No se ha podido recibir N° Cliente');\n\t\t\t</script>\";\n\t\t }\n\t\telse{ \n\t\t\t\t\t\n\t\t\t$SQL_insert_report = sprintf(\"UPDATE reportes_fumi SET CONSUMO='$consumo',LIMPIEZA='$limpieza',ESTATUS_OBJECT='$estatus_object',OBSERV_OBJECT='$obser_object',OBSERV_REPORT='$Obser',HORA_INICIO='$horInicio',HORA_FINALIZADO='$horFinal' WHERE ID_REPORTE='$createId' AND NO_FOLIO='$noFolio'\");\t\t\t\n\t\t\t$rec = $db->query($SQL_insert_report);\n\t\t\t$SQL_update_report = sprintf(\"UPDATE reportes_fumi SET OBSERV_REPORT='$Obser',HORA_INICIO='$horInicio',HORA_FINALIZADO='$horFinal',FECHA_REPORTE=NOW() WHERE ID_REPORTE='$createIdPrincipal' AND NO_FOLIO='$noFolio'\");\t\t\t\n\t\t\t$rec = $db->query($SQL_update_report);\n\t\t\t\n\t\t\t// print_r($rec);\n\t\t\tif($rec==1){\n\t\t\t\techo '1#';\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n }", "public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHERE id = 12');\n \n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Abierta', etiqueta='abierta' WHERE id = '7'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Ganada', etiqueta='ganada' WHERE id = '9'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Perdida', etiqueta='perdida' WHERE id = '10'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Anulada', etiqueta='anulada' WHERE id = '11'\");\n \n $this->execute(\"UPDATE cotz_cotizaciones SET estado='abierta' WHERE estado = 'aprobado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='ganada' WHERE estado = 'ganado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='perdida' WHERE estado = 'perdido'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='anulada' WHERE estado = 'anulado'\");\n }", "function alterarPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"UPDATE pessoa SET\"\r\n .\" nome='{$_POST[\"nome\"]}', \"\r\n .\" nascimento='{$_POST[\"nascimento\"]}', \"\r\n .\" endereco='{$_POST[\"endereco\"]}', \"\r\n .\" telefone='{$_POST[\"telefone\"]}'\"\r\n .\" WHERE id='{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function FillByListadoConEdad($dias,$tipoViaje,$Destino,$edad,$edad2,$edad3,$edad4,$inicio,$fin)\r\n\t{\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\t\r\n\t\t\t$recordSett = &$this->conexion->conectarse()->Execute('\r\n\t\t\tSELECT DISTINCT\r\n Productos.Id, Productos.NumeroParte, Productos.Nombre, Productos.Descripcion, Productos.IdMarca, Productos.Idcategoria, \r\n TipoProductoProveedores.IdTipo AS IdtipoProducto, Productos.Caracteristicas, Productos.PrecioUnitario, Productos.IdProveedor, Productos.Modelo, \r\n Productos.Voltaje, Productos.Hertz, Productos.FechaIngreso, Productos.Largo, Productos.Ancho, Productos.Altura, Productos.UMDimencion, Productos.Peso, \r\n Productos.UMPeso, Productos.TipoRecogida, Productos.Comision, Empresas.RazonSocial, Empresas.TipoNacionalidad, \r\n UnidadDimension.Descripcion AS UnidadDimension, UnidadPeso.Descripcion AS UnidadPesos, UnidadPeso.Abreviatura AS ABVPeso, \r\n UnidadDimension.Abreviatura AS ABVDimension, Marcas.Descripcion AS Marca, Productos.Iva, Empresas.IdTipoMonedaImportacion, \r\n Monedas.Descripcion AS NomMoneda, Productos.Arancel, Productos.TipoMoneda, Productos.Link, Categorias.Descripcion AS Categoria, Productos.IdTipoRango, \r\n Productos.DiasIniciales, Productos.DiasFinales, Productos.IdTipoPlan, Productos.CantidadDias, Categorias.EdadFinal, Categorias.EdadInicial, \r\n Categorias.CantidadEdad, Categorias.IdTipoRango AS TipoRangoPoliza, Proveedores.IdManejoMoneda AS TasaCambio, \r\n Empresas.RazonSocial AS Aseguradora\r\nFROM Empresas RIGHT OUTER JOIN\r\n Proveedores ON Empresas.Id = Proveedores.Idempresa INNER JOIN\r\n Productos INNER JOIN\r\n UsuariosGrupos ON Productos.GrupoAsignado = UsuariosGrupos.IdGrupo INNER JOIN\r\n Categorias ON Productos.Idcategoria = Categorias.Id INNER JOIN\r\n TipoProductoProveedores ON Productos.IdTipoProducto = TipoProductoProveedores.Id INNER JOIN\r\n RegionesProducto ON Productos.Id = RegionesProducto.IdProducto ON Empresas.Id = Productos.IdProveedor INNER JOIN\r\n Monedas ON Productos.TipoMoneda = Monedas.Id LEFT OUTER JOIN\r\n UnidadesDeMedida AS UnidadPeso ON Productos.UMPeso = UnidadPeso.Id LEFT OUTER JOIN\r\n UnidadesDeMedida AS UnidadDimension ON Productos.UMDimencion = UnidadDimension.Id LEFT OUTER JOIN\r\n Marcas ON Productos.IdMarca = Marcas.Id\r\n \r\nWHERE \t\t\t((Productos.IdTipoRango = 2 AND '. $dias .' BETWEEN Productos.DiasIniciales AND Productos.DiasFinales OR\r\n Productos.IdTipoRango = 1 AND Productos.CantidadDias = '. $dias .') AND \r\n (Categorias.IdTipoRango = 2 AND '. $edad.' BETWEEN Categorias.EdadInicial AND \r\n Categorias.EdadFinal OR\r\n Categorias.IdTipoRango = 1 AND Categorias.CantidadEdad >= '. $edad.') AND ('. $tipoViaje.' IS NULL OR\r\n TipoProductoProveedores.IdTipo = '. $tipoViaje .') AND (Productos.Activo = 1) AND ('.$Destino.' = -1 OR\r\n RegionesProducto.IdRegion ='.$Destino.')) \r\n OR \r\n ((Productos.IdTipoRango = 2 AND '. $dias .' BETWEEN Productos.DiasIniciales AND Productos.DiasFinales OR\r\n Productos.IdTipoRango = 1 AND Productos.CantidadDias = '. $dias .') AND \r\n (Categorias.IdTipoRango = 2 AND '. $edad2.' BETWEEN Categorias.EdadInicial AND \r\n Categorias.EdadFinal OR\r\n Categorias.IdTipoRango = 1 AND Categorias.CantidadEdad >= '. $edad2.') AND ('. $tipoViaje.' IS NULL OR\r\n TipoProductoProveedores.IdTipo = '. $tipoViaje .') AND (Productos.Activo = 1) AND ('.$Destino.' = -1 OR\r\n RegionesProducto.IdRegion ='.$Destino.'))\r\n OR \r\n ((Productos.IdTipoRango = 2 AND '. $dias .' BETWEEN Productos.DiasIniciales AND Productos.DiasFinales OR\r\n Productos.IdTipoRango = 1 AND Productos.CantidadDias = '. $dias .') AND \r\n (Categorias.IdTipoRango = 2 AND '. $edad3.' BETWEEN Categorias.EdadInicial AND \r\n Categorias.EdadFinal OR\r\n Categorias.IdTipoRango = 1 AND Categorias.CantidadEdad >= '. $edad3.') AND ('. $tipoViaje.' IS NULL OR\r\n TipoProductoProveedores.IdTipo = '. $tipoViaje .') AND (Productos.Activo = 1) AND ('.$Destino.' = -1 OR\r\n RegionesProducto.IdRegion ='.$Destino.')) \r\n OR \r\n ((Productos.IdTipoRango = 2 AND '. $dias .' BETWEEN Productos.DiasIniciales AND Productos.DiasFinales OR\r\n Productos.IdTipoRango = 1 AND Productos.CantidadDias = '. $dias .') AND \r\n (Categorias.IdTipoRango = 2 AND '. $edad4.' BETWEEN Categorias.EdadInicial AND \r\n Categorias.EdadFinal OR\r\n Categorias.IdTipoRango = 1 AND Categorias.CantidadEdad >= '. $edad4.') AND ('. $tipoViaje.' IS NULL OR\r\n TipoProductoProveedores.IdTipo = '. $tipoViaje .') AND (Productos.Activo = 1) AND ('.$Destino.' = -1 OR\r\n RegionesProducto.IdRegion ='.$Destino.'))\r\n ORDER BY PrecioUnitario');\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn $recordSett;\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo 'Caught exception: ', $e->getMessage(), \"\\n\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "static public function mdlEditarProducto($tabla,$datos){\n\t\t$datos = arrayMapUtf8Decode($datos);\n\t\t$db = new Conexion();\n\t\t$sql = $db->consulta(\"UPDATE $tabla SET cod_tipo_producto = \".$datos[\"cod_tipo_producto\"].\", dsc_producto = '\".$datos[\"dsc_producto\"].\"', cod_usr_modifica = '\".$datos[\"cod_usr_modifica\"].\"', fch_modifica = CONVERT(datetime,'\".$datos[\"fch_modifica\"].\"',21), dsc_detalle = '\".$datos[\"dsc_detalle\"].\"' WHERE cod_producto = '\".$datos[\"cod_producto\"].\"'\");\n\t\tif($sql){\n\t\t\treturn \"ok\";\n\t\t}else{\n\t\t\treturn \"error\";\n\t\t}\n\t\t$db->liberar($sql);\n $db->cerrar();\n\t}", "public function alterarstatus ($dados) {\n\n $c = new CRUD();\n $fim = [];\n\n if ($_SESSION['tipo_id'] > 4) {\n\n $verifica = $c->Selecionar(\"*\", \"agendamento\", \" where status = 3 and tecnico_id = {$_SESSION['id']}\");\n\n if (count($verifica) > 0 and $dados['status'] == 3) {\n $fim['msg'] = \"Não é possível concluir essa ação. Uma solicitação encontra-se em andamento.\";\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n\n return $fim;\n\n }", "public function mudarStatus(){\n //CO_STATUS = 5 se refere ao caso clinico Disponivel na base publica\n\n //busca e atualiza todos os casos clinicos que tenham CO_STATUS = 4 para o CO_STATUS = 5\n CasoClinico::where('CO_STATUS', '=', 4)->update(['CO_STATUS' => '5']);\n }", "function anularVenta_servicio($idFactura, $estado){\n\n\t\t$this->db->set('estado', $estado);\t\n\t\t$this->db->where('idFactura' ,$idFactura);\n\t\t$this->db->update('ventaservicio');\n\t}", "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function cambiosincoseis($id_usuario){\r\n\t\t$sql = \"UPDATE tbl_usuarios SET valorPre='6' WHERE id_usuario='$id_usuario'\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function modificarHistorial($id_diario, $id_poi, $fechaVisitaPoi, $estaEnPoi, $texto, $foto, $video) {\n $sql = \"UPDATE historial SET fechaVisitaPoi='\" . $fechaVisitaPoi . \"',estaEnPoi='\" . $estaEnPoi . \"',texto='\" . $texto . \"',\"\n . \"foto='\" . $foto . \"',video='\" . $video . \"' WHERE id_diario='\" . $id_diario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\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 guardarDatos($datos){\n \n $inscripto = new InscriptosPadronSisa();\n $inscripto->id = $this->convertirEnTexto($datos->id); \n $inscripto->codigosisa = $this->convertirEnTexto($datos->codigoSISA);\n $inscripto->identificadorenaper = $this->convertirEnTexto($datos->identificadoRenaper);\n $inscripto->padronsisa = $this->convertirEnTexto($datos->PadronSISA);\n $inscripto->tipodocumento = $this->convertirEnTexto($datos->tipoDocumento);\n $inscripto->nrodocumento = $this->convertirEnTexto($datos->nroDocumento);\n $inscripto->apellido = $this->convertirEnTexto($datos->apellido);\n $inscripto->nombre = $this->convertirEnTexto($datos->nombre);\n $inscripto->sexo = $this->convertirEnTexto($datos->sexo);\n $inscripto->fechanacimiento = $this->convertirEnTexto($datos->fechaNacimiento);\n $inscripto->estadocivil = $this->convertirEnTexto($datos->estadoCivil);\n $inscripto->provincia = $this->convertirEnTexto($datos->provincia);\n $inscripto->departamento = $this->convertirEnTexto($datos->departamento);\n $inscripto->localidad = $this->convertirEnTexto($datos->localidad);\n $inscripto->domicilio = $this->convertirEnTexto($datos->domicilio);\n $inscripto->pisodpto = $this->convertirEnTexto($datos->pisoDpto);\n $inscripto->codigopostal = $this->convertirEnTexto($datos->codigoPostal);\n $inscripto->paisnacimiento = $this->convertirEnTexto($datos->paisNacimiento);\n $inscripto->provincianacimiento = $this->convertirEnTexto($datos->provinciaNacimiento);\n $inscripto->localidadnacimiento = $this->convertirEnTexto($datos->localidadNacimiento);\n $inscripto->nacionalidad = $this->convertirEnTexto($datos->nacionalidad);\n $inscripto->fallecido = $this->convertirEnTexto($datos->fallecido);\n $inscripto->fechafallecido = $this->convertirEnTexto($datos->fechaFallecido);\n $inscripto->donante = $this->convertirEnTexto($datos->donante);\n try {\n $inscripto->save();\n unset($inscripto);\n return TRUE;\n } catch (QueryException $e) {\n return json_encode($e);\n } \n }", "public static function modificaServizi()\n {\n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_servizi.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once \"../view/Master.php\";\n }", "static public function mdlActualizarSinAdquisicion($tabla, $tabla2, $datos){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla2 INNER JOIN $tabla ON $tabla2.folio = $tabla.idPedido and $tabla2.serie = $tabla.serie SET $tabla2.sinAdquisicion = $tabla.sinAdquisicion WHERE $tabla2.folio = :folio and $tabla2.serie = :serie\");\r\n\r\n\t\t\t$stmt->bindParam(\":folio\", $datos[\"folio\"], PDO::PARAM_INT);\r\n\t\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\t\t\t\treturn \"ok\";\r\n\t\t\t}else{\r\n\t\t\t\treturn \"error\";\r\n\t\t\t}\r\n\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\t}", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "function modifyComentario($id_evento,$id_comentario,$contenido){\n $mysqli = Conectar();\n strip_tags($contenido);\n $mysqli -> query(\"Update comentarios Set comentario='$contenido' Where id_evento=$id_evento and id_comentario=$id_comentario\");\n }", "static public function mdlActualizarAdquisicionGenerales($tabla, $tabla2, $datos){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla2 INNER JOIN $tabla ON $tabla2.folio = $tabla.idPedido and $tabla2.serie = $tabla.serie SET $tabla2.sinAdquisicion = $tabla.sinAdquisicion WHERE $tabla2.folio = :idPedido and $tabla2.serie = :serie\");\r\n\r\n\t\t\t$stmt -> bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t\t$stmt -> bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\t\t\t\treturn \"ok\";\r\n\t\t\t}else{\r\n\t\t\t\treturn \"error\";\r\n\t\t\t}\r\n\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\t}", "function RellenaDatosPorEdificio()\n{\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->CODEDIFICIO') \n\t\t\t)\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n}", "function autorizar_venta_directa($id_movimiento_material) {\r\n global $_ses_user,$db; \r\n\r\n \r\n $titulo_pagina = \"Movimiento de Material\";\r\n $fecha_hoy = date(\"Y-m-d H:i:s\",mktime());\r\n \r\n \r\n $sql = \"select deposito_origen from movimiento_material \r\n where id_movimiento_material = $id_movimiento_material\";\r\n $res = sql($sql) or fin_pagina();\r\n $deposito_origen = $res->fields[\"deposito_origen\"];\r\n \r\n \r\n $sql = \"select id_factura from movimiento_factura where id_movimiento_material = $id_movimiento_material\";\r\n $fact = sql($sql) or fin_pagina(); \r\n $id_factura = $fact->fields[\"id_factura\"];\r\n \r\n $sql = \" select id_detalle_movimiento,cantidad,id_prod_esp from detalle_movimiento \r\n where id_movimiento_material = $id_movimiento_material\";\r\n $detalle_mov = sql($sql) or fin_pagina();\r\n \r\n for($i=0; $i < $detalle_mov->recordcount(); $i++) { \t \r\n \t\r\n \t $id_detalle_movimiento = $detalle_mov->fields[\"id_detalle_movimiento\"];\t\r\n \t $cantidad = $detalle_mov->fields[\"cantidad\"];\r\n \t $id_prod_esp = $detalle_mov->fields[\"id_prod_esp\"];\r\n $sql = \"select id_recibidos_mov,cantidad\r\n from recibidos_mov where id_detalle_movimiento=$id_detalle_movimiento \r\n and ent_rec=0\";\r\n $detalle_rec = sql($sql) or fin_pagina();\r\n $id_recibido_mov = $detalle_rec->fields[\"id_recibidos_mov\"];\r\n\r\n if($id_recibido_mov==\"\") {\r\n\t \t //insert\r\n\t\t $sql = \"select nextval('recibidos_mov_id_recibidos_mov_seq') as id_recibido_mov\";\r\n\t\t $res_1 = sql($sql) or fin_pagina();\r\n\t\t $id_recibido_mov = $res_1->fields[\"id_recibido_mov\"];\r\n\t\t $sql=\"insert into recibidos_mov(id_recibidos_mov,id_detalle_movimiento,cantidad,ent_rec)\r\n\t\t values($id_recibido_mov,$id_detalle_movimiento,$cantidad,0)\";\r\n }else {\r\n\t //update\r\n\t $sql=\"update recibidos_mov set cantidad=cantidad+$cantidad\r\n\t where id_recibidos_mov=$id_recibido_mov\";\r\n }//del else\r\n sql($sql) or fin_pagina();\r\n $sql =\"insert into log_recibidos_mov(id_recibidos_mov,usuario,fecha,cantidad_recibida,tipo)\r\n values($id_recibido_mov,'\".$_ses_user[\"name\"].\"','$fecha_hoy',$cantidad,'entrega')\";\r\n sql($sql) or fin_pagina();\r\n //eliminamos las reservas hechas para este movimiento\r\n $comentario_stock=\"Utilización de los productos reservados por el $titulo_pagina Nº $id_movimiento\";\r\n $id_tipo_movimiento=7;\r\n \r\n \r\n //tengo que eliminar del stock los productos correspondientes \r\n descontar_reserva($id_prod_esp,$cantidad,$deposito_origen,$comentario_stock,$id_tipo_movimiento,$id_fila=\"\",$id_detalle_movimiento);\r\n //pongo las banderas de la factura en cuenta asi se produce\r\n //el movimiento correcto en el balance\r\n $detalle_mov->movenext(); \r\n }//del for \r\n \r\n if ($id_factura) {\r\n \r\n $sql = \"update licitaciones.cobranzas \r\n set renglones_entregados=1, licitacion_entregada=1\r\n where cobranzas.id_factura=$id_factura\";\r\n sql($sql) or fin_pagina();\r\n } \r\n \r\n \r\n \r\n\r\n}", "static public function mdlIngresarVenta($tabla, $datos){\r\n\r\n\t\t\r\n\t}", "function modificarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_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_tabla','id_tabla','int4');\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','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}", "function realizarConsultas($sql)\r\n {\r\n $this->resultado = $this->mysqli->multi_query($sql);\r\n }", "static public function mdlEditarCompra($tabla, $datos){\r\n\t\r\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET vendedor = :vendedor, usuario = :usuario, serie = :serie, idPedido = :idPedido, folioCompra = :folioCompra, fechaCotizacion = :fechaCotizacion, cliente = :cliente, secciones = :secciones, cantidad = :cantidad, unidad = :unidad, codigo = :codigo, descripcion = :descripcion, precioUnitario = :precioUnitario, precioCompra = :precioCompra, descuentoProveedor = :descuentoProveedor, cantidad2 = :cantidad2, unidad2 = :unidad2, codigo2 = :codigo2, descripcion2 = :descripcion2, precioUnitario2 = :precioUnitario2, precioCompra2 = :precioCompra2, descuentoProveedor2 = :descuentoProveedor2, cantidad3 = :cantidad3, unidad3 = :unidad3, codigo3 = :codigo3, descripcion3 = :descripcion3, precioUnitario3 = :precioUnitario3, precioCompra3 = :precioCompra3, descuentoProveedor3 = :descuentoProveedor3, cantidad4 = :cantidad4, unidad4 = :unidad4, codigo4 = :codigo4, descripcion4 = :descripcion4, precioUnitario4 = :precioUnitario4, precioCompra4 = :precioCompra4, descuentoProveedor4 = :descuentoProveedor4, cantidad5 = :cantidad5, unidad5 = :unidad5, codigo5 = :codigo5, descripcion5 = :descripcion5, precioUnitario5 = :precioUnitario5, precioCompra5 = :precioCompra5, descuentoProveedor5 = :descuentoProveedor5, tiempoEntrega = :tiempoEntrega, fechaRecepcion = :fechaRecepcion, fechaElaboracion = :fechaElaboracion, fechaTermino = :fechaTermino, status = :status, sinAdquisicion = :sinAdquisicion, observaciones = :observaciones, estado = :estado, pendiente = :pendiente WHERE idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t$stmt->bindParam(\":vendedor\", $datos[\"vendedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":folioCompra\", $datos[\"folioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaCotizacion\", $datos[\"fechaCotizacion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cliente\", $datos[\"cliente\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":secciones\", $datos[\"secciones\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":cantidad\", $datos[\"cantidad\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad\", $datos[\"unidad\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario\", $datos[\"precioUnitario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra\", $datos[\"precioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor\", $datos[\"descuentoProveedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad2\", $datos[\"cantidad2\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad2\", $datos[\"unidad2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo2\", $datos[\"codigo2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion2\", $datos[\"descripcion2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario2\", $datos[\"precioUnitario2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra2\", $datos[\"precioCompra2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor2\", $datos[\"descuentoProveedor2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad3\", $datos[\"cantidad3\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad3\", $datos[\"unidad3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo3\", $datos[\"codigo3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion3\", $datos[\"descripcion3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario3\", $datos[\"precioUnitario3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra3\", $datos[\"precioCompra3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor3\", $datos[\"descuentoProveedor3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad4\", $datos[\"cantidad4\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad4\", $datos[\"unidad4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo4\", $datos[\"codigo4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion4\", $datos[\"descripcion4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario4\", $datos[\"precioUnitario4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra4\", $datos[\"precioCompra4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor4\", $datos[\"descuentoProveedor4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad5\", $datos[\"cantidad5\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad5\", $datos[\"unidad5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo5\", $datos[\"codigo5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion5\", $datos[\"descripcion5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario5\", $datos[\"precioUnitario5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra5\", $datos[\"precioCompra5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor5\", $datos[\"descuentoProveedor5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":tiempoEntrega\", $datos[\"tiempoEntrega\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaRecepcion\", $datos[\"fechaRecepcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaElaboracion\", $datos[\"fechaElaboracion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaTermino\", $datos[\"fechaTermino\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":status\", $datos[\"status\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":sinAdquisicion\", $datos[\"sinAdquisicion\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":observaciones\", $datos[\"observaciones\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":pendiente\", $datos[\"pendiente\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\t}", "function modificarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\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 actualizar_simbolo($id_simbolo, $id_palabra, $tipo_simbolo, $idioma, $estado, $castellano, $registrado, $mayusculas, $marco, $contraste) {\n\t\t\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$UpdateRecords = \"UPDATE simbolos \n\t\tSET id_palabra='$id_palabra', id_tipo_simbolo='$tipo_simbolo', id_idioma='$idioma', estado='$estado', castellano='$castellano',\n\t\tregistrado='$registrado', fecha_modificado='$fecha', mayusculas='$mayusculas', marco='$marco', contraste='$contraste'\n\t\tWHERE id_simbolo='$id_simbolo'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\t\t\t\n\t}", "static public function mdlActualizarAdquisicion($tabla, $tabla2, $datos){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla2 INNER JOIN $tabla ON $tabla2.folio = $tabla.idPedido and $tabla2.serie = $tabla.serie SET $tabla2.sinAdquisicion = $tabla.sinAdquisicion WHERE $tabla2.folio = :idPedido and $tabla2.serie = :serie\");\r\n\r\n\t\t\t$stmt -> bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t\t$stmt -> bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\r\n\t\t\t\treturn \"ok\";\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\treturn \"error\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\t}", "function updateMembroDao(objetoMembro $ace){\r\n \r\n require_once (\"conexao.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $ret=3;\r\n \r\n $matricula = $ace->getMatricula(); $nome = $ace->getNome(); $sexo=$ace->getSexo(); $data=$ace->getData(); $rg=$ace->getRg(); $cpf=$ace->getCpf(); $estadocivil=$ace->getEstadocivil();\r\n\t $natural=$ace->getNatural(); $profissao=$ace->getProfissao(); $escola=$ace->getEscola(); $pai=$ace->getPai(); $mae=$ace->getMae(); $necessidade=$ace->getNecessidade();\r\n\t $fone=$ace->getFone(); $filho=$ace->getFilho(); $formacao=$ace->getFormacao(); $membrasia=$ace->getMembrasia(); $funcao=$ace->getFuncao(); $participou=$ace->getParticipou();\r\n\t $trabalhando=$ace->getTrabalhando(); $viajando=$ace->getViajando(); $congrega=$ace->getCongrega(); $rua=$ace->getRua(); $bairro=$ace->getBairro(); $casa=$ace->getCasa(); $status=$ace->getStatus();$email=$ace->getEmail();\r\n $data1 = date($data); $lider=$ace->getLider();\r\n \r\n $inse = \"UPDATE membros SET Nome = '$nome',Sexo = '$sexo',DataNascimento1 = '$data1',Naturalidade= '$natural',Escolaridade= '$escola',Profissao= '$profissao',Rg = '$rg',Cpf= '$cpf',EstadoCivil= '$estadocivil',Pai= '$pai',Mae= '$mae',NecessidadeEspeciais= '$necessidade',Filho= '$filho',fone= '$fone',formacaoEclesiatica= '$formacao',IntegracaoMembrasia= '$membrasia',Funcao= '$funcao',JaParticipou= '$participou',EstadoAtual= '$viajando',Trabalhando= '$trabalhando',Congrega= '$congrega',Rua= '$rua',Casa= '$casa',Bairro= '$bairro',Status= '$status',tx_email='$email',LiderCelula='$lider' WHERE Matricula = '$matricula'\";\r\n $result = mysql_query($inse) or die (\"Falha na insercao da celula\".mysql_error());\r\n \r\n if ($result)\r\n {\r\n $ret = 1;\r\n \r\n }else{ \r\n $ret = 2;\r\n }\r\n \r\n $obj->freebanco();\r\n \r\n return $ret;\r\n \r\n }", "function EDIT()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio'\";\n \n\n $result = $this->mysqli->query($sql);\n \n //si se cumple la condicion\n if ($result->num_rows == 1) { //Si existe el edificio lo editamos\n //actualizamos los datos\n\t$sql = \"UPDATE EDIFICIO\n\t\t\tSET \n\t\t\tCODEDIFICIO = '$this->codedificio',\n\t\t\tNOMBREEDIFICIO = '$this->nombreedificio',\n\t\t\tDIRECCIONEDIFICIO = '$this->direccionedificio',\n\t\t\tCAMPUSEDIFICIO = '$this->campusedificio' \n\t\t\tWHERE \n\t\t\tCODEDIFICIO= '$this->codedificio'\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\tif ($this->mysqli->query($sql)) //Si la consulta se ha realizado correctamente, mostramos mensaje \n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse //Si no, mostramos mensaje de error\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devolvemos el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "public function ModificarEstado()\n\t{\n\t\t$query=\"UPDATE estado SET idpais=$this->id_pais, estado='$this->estado' , descripcion='$this->descripcion' WHERE idestado=$this->id_estado\";\n\t\t$resp=$this->db->consulta($query);\n\t}", "function actualizarConvenio(){\n \n $nombrePrograAca = $_POST['nombrePrograAca'];\n $fechaIni = $_POST['fechaIni'];\n $fechaFin = $_POST['fechaFin'];\n $codRecaudo = $_POST['codrecaudo'];\n $inversion = $_POST['inversion'];\n $id=$_POST[\"id\"];\n\n\t\t\t//Se consultan todos los convenios\n\t\t\t$conexion=Conexion::getInstance();\n\t\t\t$consulta=\"update programaacademico set `nomprogramaacademico`='$nombrePrograAca', \n `fechainicioprogaca`='$fechaIni', `fechafinprogaca`='$fechaFin', `codigorecaudo`='$codRecaudo', \n `inversion`='$inversion' where `idprogramaacademico`='$id'\";\n \n $res= $conexion->actualizar($consulta);\n if ($res==1){\n echo \"<h2><strong>Actualización exitosa!!!</strong></h2>\";\n }\n\t\t //fin de la funcion\n\t\t}", "function actualizarsoloparesin($idkardex,$talla,$cantidad1,$iddetalleingreso,$idmodelodetalle,$precionuevo,$lineanuevo,$colornuevo,$materialnuevo,$return = false ){\n\n // $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n $sqlA[] = \"UPDATE historialkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla' and idperiodo='3';\";\n $sqlmarca = \" SELECT tabla,mesrango,idperiodo,fechainicio,fechafin FROM administrakardex WHERE idkardex = '$idkardex' \";\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"tabla\");\n $tabla = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"mesrango\");\n $mesrango = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"idperiodo\");\n $idperiodo = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"fechainicio\");\n $fechain = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"fechafin\");\n $fechafin = $opcionkardex['resultado'];\n if($fechafin==null ||$fechafin == \"\"){\n $fechaf = Date(\"Y-m-d\");}\n\n$select1 = \"SUM(i.cantidad) AS Pares\";\n $from1 = \"itemventa i,adicionkardextienda k, ventasdetalle vent\";\n $where1 = \"k.idcalzado = '$iddetalleingreso' AND i.idventa=vent.idventadetalle AND i.idkardextienda=k.idkardextienda AND\nk.talla='$talla' AND vent.fecha >= '$fechain'AND vent.fecha <= '$fechaf' and i.estado!='cambiado' \";\n $sql21 = \"SELECT \".$select1.\" FROM \".$from1. \" WHERE \".$where1;\n $almacenA1 = findBySqlReturnCampoUnique($sql21, true, true, 'Pares');\n $pares1 = $almacenA1['resultado'];\n if($pares1==NULL || $pares1 =='' || $pares1 == \"\"){ $pares1=\"0\"; }\n if($pares1=='0' ||$pares1==0){\n\n $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n\n } else{\n\n $cantidad1=$cantidad1-$pares1;\n $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n}\n//MostrarConsulta($sqlA);\nejecutarConsultaSQLBeginCommit($sqlA);\n\n}", "function Editar($id, $fecha_emision, $condicion_pago, $estado, $fecha_pago, $observaciones_pago, $tipo) {\n $fecha=explode(\"-\", $fecha_emision);\n $fecha_vencimiento=date(\"Y-m-d\",mktime(0,0,0,$fecha[1],$fecha[2]+$condicion_pago,$fecha[0]));\n $q=\"UPDATE \".self::$table.\"\nSET condicionpago='$condicion_pago', fechaemision='$fecha_emision',\nfechavencimiento='$fecha_vencimiento', estado='$estado', fecha_pago='$fecha_pago',\nobservaciones_pago='$observaciones_pago', tipo='$tipo'\nWHERE id=$id\";\n return DBManager::execute($q);\n }", "private function ExibirTamanhos(){\r\n $oDadosCamiseta;\r\n $sSql = \"SELECT * FROM tamanho_camiseta\";\r\n $oDadosCamiseta = $this->Fbd->PesquisarSQL($sSql);\r\n \r\n foreach($oDadosCamiseta as $oRegistro){\r\n echo \"<option value='\".$oRegistro->sigla.\"' class='sctOptTamanho'>\".$oRegistro->nome.\"</option>\";\r\n }\r\n }", "public static function updateServizi()\n {\n //arrivano i servizi modificati\n if (isset($_REQUEST['update_servizi'])) {\n $_SESSION['update_servizi'] = $_REQUEST['update_servizi'];\n }\n // effettua la registrazione dell'azienda\n $update = UtenteFactory::updateServizi();\n if ($update == 1) {\n $_SESSION['errore'] = 6;\n } elseif ($update == 0) {\n $_SESSION['errore'] = 5;\n }\n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_servizi.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once '../view/Master.php';\n }", "function evt__pantallas__modificacion($datos)\n\t{\n\t\t$this->get_entidad()->tabla('pantallas')->set($datos);\n\t}", "function actualizarDeuda($acceso,$id_contrato){\n\treturn;\n\t/*\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select sum(cant_serv * costo_cobro) as deuda from contrato_servicio_deuda where id_contrato='$id_contrato' and status_con_ser='DEUDA'\");\n\t\t\t\t\tif($fila=row($acceso)){\n\t\t\t\t\t\t$deuda = trim($fila['deuda']);\n\t\t\t\t\t\t//echo \"<br>Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\";\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\");\n\t\t\t\t\t}\n\t\t\t\t\t*/\n}" ]
[ "0.6761109", "0.6747411", "0.66255254", "0.6487145", "0.64740616", "0.6313572", "0.6304311", "0.62440556", "0.6227445", "0.6141292", "0.6141292", "0.61313254", "0.61217004", "0.60833186", "0.6046655", "0.5988509", "0.5977099", "0.59689313", "0.5963143", "0.5945785", "0.5943795", "0.5942563", "0.59338844", "0.59276533", "0.5925792", "0.5919356", "0.59187996", "0.59138036", "0.5912843", "0.5909516", "0.5904624", "0.58928263", "0.588798", "0.58879656", "0.58751404", "0.5872418", "0.5871353", "0.58602387", "0.5858428", "0.5853411", "0.5853271", "0.5849656", "0.58451617", "0.584359", "0.58408815", "0.5831822", "0.58285135", "0.5828108", "0.5823355", "0.5822864", "0.5820654", "0.58096254", "0.58023316", "0.5791776", "0.5786968", "0.5777853", "0.5774779", "0.576627", "0.57618386", "0.5757643", "0.5756417", "0.57563937", "0.57563883", "0.5749678", "0.5748878", "0.574361", "0.57413334", "0.57356656", "0.5732181", "0.5729406", "0.5723887", "0.5717214", "0.57128125", "0.57126504", "0.5707879", "0.5706076", "0.5705564", "0.57048845", "0.57046235", "0.5701656", "0.5701026", "0.57003045", "0.57000875", "0.5696915", "0.5693222", "0.5687018", "0.5685277", "0.56834805", "0.5677452", "0.5675751", "0.5666001", "0.5662894", "0.5661573", "0.5661187", "0.5660824", "0.565797", "0.56469226", "0.56437725", "0.5642775", "0.5641991" ]
0.70868915
0
Selecionar registro de SicasConsultaMedica
public function get($cd_consulta_medica){ $oSicasConsultaMedicaBD = new SicasConsultaMedicaBD(); if($oSicasConsultaMedicaBD->msg != ''){ $this->msg = $oSicasConsultaMedicaBD->msg; return false; } if(!$obj = $oSicasConsultaMedicaBD->get($cd_consulta_medica)){ $this->msg = $oSicasConsultaMedicaBD->msg; return false; } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultar($valor){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->consultar($valor);\r\n }", "public function consultar($valor){\r\n\t\t$oSicasConsultaMedicaBD = new SicasConsultaMedicaBD();\t\r\n\t\treturn $oSicasConsultaMedicaBD->consultar($valor);\r\n\t}", "public function select(){\n\t\t$sql=\"SELECT PROGRA_ID,PROGRA_CODIGO, PROGRA_NOMBRE, PROGRA_EMAIL, PROGRA_USUADIGI, PROGRA_FECHDIGI, PROGRA_HORADIGI\n\t\t FROM programa\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "public function select($producto);", "public function select($datos_){\n $id=$datos_->getId();\n\n try {\n $sql= \"SELECT `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`\"\n .\"FROM `datos_`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $datos_->setId($data[$i]['id']);\n $datos_->setNombre_proyecto($data[$i]['nombre_proyecto']);\n $datos_->setNombre_actividad($data[$i]['nombre_actividad']);\n $datos_->setModalidad_participacion($data[$i]['modalidad_participacion']);\n $datos_->setResponsable($data[$i]['responsable']);\n $datos_->setFecha_realizacion($data[$i]['fecha_realizacion']);\n $datos_->setProducto($data[$i]['producto']);\n $semillero = new Semillero();\n $semillero->setId($data[$i]['semillero_id']);\n $datos_->setSemillero_id($semillero);\n\n }\n return $datos_; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }", "public function readMedicoEspecial(){\n $objM=new medicoDAO();\n $resul=$objM->readMedicoEspecialidad();\n return $resul;\n }", "public function selectMedecin(){\n $bdd=Connexion::getInstance();\n $req=\" select * from utilisateur u ,specialite s,service ser \n WHERE u.idSpecialite=s.idSpecialite and s.idService=ser.idService\n AND idStatus=\".self::NIVEAU_1;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "function RellenaDatosPorEdificio()\n{\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->CODEDIFICIO') \n\t\t\t)\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n}", "public function select()\n {\n $sql = \"SELECT * FROM tipousuario\";\n return ejecutarConsulta($sql);\n }", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function select(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\n\t\t\t\twhere equi_tip_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function obtener_colectivo();", "public function select(){\n\t\t$sql = \"SELECT * FROM producto\n\t\t\t\twhere prod_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "function mdatosEjercicioInformacion() {\n\t\t$conexion = conexionbasedatos();\n\t\t\n\t\t$idejercicio = $_GET[\"idejercicio\"];\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO AND FE.IDEJERCICIO = $idejercicio;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function select(){\n\t\t$sql = \"SELECT * FROM cargo\n\t\t\t\twhere car_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "public function select($fisicasuelo);", "function listarSolicitudModalidades()\r\n {\r\n $this->procedimiento = 'adq.f_solicitud_modalidades_sel';\r\n $this->transaccion = 'ADQ_SOLMODAL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_solicitud', 'int4');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('id_solicitud_ext', 'int4');\r\n $this->captura('presu_revertido', 'varchar');\r\n $this->captura('fecha_apro', 'date');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('id_funcionario_aprobador', 'int4');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('id_gestion', 'int4');\r\n $this->captura('tipo', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('justificacion', 'text');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('lugar_entrega', 'varchar');\r\n $this->captura('extendida', 'varchar');\r\n\r\n $this->captura('posibles_proveedores', 'text');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('comite_calificacion', 'text');\r\n $this->captura('id_categoria_compra', 'int4');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('fecha_soli', 'date');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n\r\n $this->captura('id_uo', 'integer');\r\n\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('desc_funcionario_apro', 'text');\r\n $this->captura('desc_uo', 'text');\r\n $this->captura('desc_gestion', 'integer');\r\n $this->captura('desc_moneda', 'varchar');\r\n $this->captura('desc_depto', 'varchar');\r\n $this->captura('desc_proceso_macro', 'varchar');\r\n $this->captura('desc_categoria_compra', 'varchar');\r\n $this->captura('id_proceso_macro', 'integer');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('desc_funcionario_rpc', 'text');\r\n $this->captura('obs', 'text');\r\n $this->captura('instruc_rpc', 'varchar');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('id_proveedor', 'integer');\r\n $this->captura('id_funcionario_supervisor', 'integer');\r\n $this->captura('desc_funcionario_supervisor', 'text');\r\n $this->captura('ai_habilitado', 'varchar');\r\n $this->captura('id_cargo_rpc', 'integer');\r\n $this->captura('id_cargo_rpc_ai', 'integer');\r\n $this->captura('tipo_concepto', 'varchar');\r\n $this->captura('revisado_asistente', 'varchar');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('dias_plazo_entrega', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('precontrato', 'varchar');\r\n $this->captura('update_enable', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('contador_estados', 'bigint');\r\n\r\n $this->captura('nro_po', 'varchar');\r\n $this->captura('fecha_po', 'date');\r\n\r\n $this->captura('importe_total', 'numeric');\r\n $this->captura('prioridad', 'varchar');\r\n $this->captura('id_prioridad', 'integer');\r\n $this->captura('list_proceso', 'integer[]');\r\n\r\n $this->captura('cuce', 'varchar');\r\n $this->captura('fecha_conclusion', 'date');\r\n $this->captura('presupuesto_aprobado', 'varchar');\r\n\r\n $this->captura('tipo_modalidad', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n //echo($this->consulta);exit;\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function select($cotizacion);", "public function buscarDocumento( $txtCodigoCarrera ){\n\t\t\t$sql = \"SELECT E.idestudiantegeneral, ET.codigoestudiante, E.numerodocumento, E.tipodocumento,\n \t\t\tDATE_FORMAT(E.fechanacimientoestudiantegeneral,'%Y-%m-%d') AS fechanacimientoestudiantegeneral, E.telefonoresidenciaestudiantegeneral,\n\t\t\t\tE.telefono2estudiantegeneral, E.tipodocumento, E.nombresestudiantegeneral, E.apellidosestudiantegeneral , E.emailestudiantegeneral, E.celularestudiantegeneral,\n\t\t\t\tD.nombredocumento, E.codigogenero, G.nombregenero\n \t\t\tFROM estudiantegeneral E\n \t\t\tINNER JOIN estudiante ET ON ( ET.idestudiantegeneral = E.idestudiantegeneral )\n \t\t\tINNER JOIN carrera C ON ( C.codigocarrera = ET.codigocarrera )\n \t\t\tINNER JOIN documento D ON ( D.tipodocumento = E.tipodocumento )\n \t\t\tINNER JOIN genero G ON ( G.codigogenero = E.codigogenero )\n \t\t\tWHERE numerodocumento = ? \n \t\t\tAND C.codigocarrera = ? \";\n\t\t\t\n\t\t\t\n\t\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t\t$this->persistencia->setParametro( 0 , $this->getDocumento( ) , false );\n\t\t\t$this->persistencia->setParametro( 1 , $txtCodigoCarrera , false );\n\t\t\t//echo $this->persistencia->getSQLListo( );\n\t\t\t$this->persistencia->ejecutarConsulta( );\n\t\t\t\n\t\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t\t$this->setId( $this->persistencia->getParametro( \"codigoestudiante\" ) );\n\t\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombresestudiantegeneral\" ) );\n\t\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidosestudiantegeneral\" ) );\n\t\t\t\t\n\t\t\t\t$tipoDocumento = new TipoDocumento( null );\n\t\t\t\t$tipoDocumento->setIniciales( $this->persistencia->getParametro( \"tipodocumento\" ) );\n\t\t\t\t$tipoDocumento->setDescripcion( $this->persistencia->getParametro( \"nombredocumento\" ) );\n\t\t\t\t$this->setTipoDocumento( $tipoDocumento );\n\t\t\t}\n\t\t}", "public function consultar($valor){\r\n\t\t$oSicasSalarioMinimoBD = new SicasSalarioMinimoBD();\t\r\n\t\treturn $oSicasSalarioMinimoBD->consultar($valor);\r\n\t}", "public function selecionarAction() { \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia a classes de dados\r\n $menus = new WebMenuSistemaModel();\r\n \r\n // Retorna para a view os menus cadastrados\r\n $this->view->menus = $menus->getMenus();\r\n \r\n // Define os filtros para a cosulta\r\n $where = $menus->addWhere(array(\"CD_MENU = ?\" => $params['cd_menu']))->getWhere();\r\n \r\n // Recupera o sistema selecionado\r\n $menu = $menus->fetchRow($where);\r\n \r\n // Reenvia os valores para o formulário\r\n $this->_helper->RePopulaFormulario->repopular($menu->toArray(), \"lower\");\r\n }", "function rellenaDatos(){\r\n\r\n $stmt = $this->db->prepare(\"SELECT *\r\n\t\t\t\t\tFROM edificio\r\n\t\t\t\t\tWHERE edificio_id = ?\");\r\n\r\n $stmt->execute(array($this->edificio_id));\r\n $edificio = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($edificio != null){\r\n return new EDIFICIO_Model($this->edificio_id, $edificio[\"nombre_edif\"],$edificio[\"direccion_edif\"],$edificio[\"telef_edif\"],\r\n $edificio[\"num_plantas\"],$edificio[\"agrup_edificio\"]);\r\n }else {\r\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\r\n }\r\n\r\n }", "function ADO_Listar_Medico_Por_Sede_Y_Fecha_Cita($arreglo){\n\n $rs=$this->db->query\n (\n \"select ci.idmed ,tra.paternotra||' '||tra.maternotra||' '||tra.nombretra as medico\n from om_general.cp_tb_citas ci inner join om_general.cp_tb_trabajador tra on\n ci.idmed=tra.idtra inner join om_general.cp_tb_contrato co on\n ci.idper=co.idper where ci.fechacita between '\".$arreglo[\"fechadel\"].\"' and '\".$arreglo[\"fechaal\"].\"'\n and ci.idsede='\".$arreglo[\"sedeid\"].\"'\n group by ci.idmed,tra.paternotra,tra.maternotra,tra.nombretra\n order by ci.idmed asc\"\n );\n $flag=false;\n $data=array();\n if($rs->num_rows()>0){\n $flag=true;\n foreach($rs->result() as $row){\n $data[]=array\n (\n \"idmed\"=>$row->idmed,\n \"medico\"=>$row->medico\n );\n }\n }\n\n return array\n (\n \"success\"=>$flag,\n \"data\"=>$data\n );\n\n }", "public function consultar($valor){\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\t\r\n\t\treturn $oSicasAtendimentoBD->consultar($valor);\r\n\t}", "public function consultaSeguimientos(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsSegPaiDer=\"select fecha_seguim_compderecho,seguim_compderecho from seguimiento_compderecho \n\t\twhere id_pai=:id_pai and id_derechocespa=:id_derechocespa and num_doc=:num_doc order by fecha_seguim_compderecho desc\";\n\t\t$segCompDer=$conect->createCommand($sqlConsSegPaiDer);\n\t\t$segCompDer->bindParam(\":id_pai\",$this->id_pai,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":id_derechocespa\",$this->id_derechocespa,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readConsSegPaiDer=$segCompDer->query();\n\t\t$resConsSegPaiDer=$readConsSegPaiDer->readAll();\n\t\t$readConsSegPaiDer->close();\n\t\treturn $resConsSegPaiDer;\n\t}", "function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}", "public function mostrar($idcompra){\n $sql = \"SELECT c.idcompra, c.idordencompra, c.nrofactura, c.idproveedor, p.razonsocial AS proveedor, c.idpersonal, concat(per.nombre, ' ', per.apellido) AS personal, c.idsucursal, suc.descripcion AS sucursal, c.idformapago, fp.descripcion AS formapago, c.idtipodocumento, td.descripcion AS tipodoc, c.iddeposito, d.descripcion AS deposito, date(c.fecha) as fecha, c.obs, c.monto \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal JOIN sucursales suc ON c.idsucursal = suc.idsucursal JOIN formas_pago fp ON c.idformapago = fp.idformapago JOIN tipo_documentos td ON c.idtipodocumento = td.idtipodocumento JOIN depositos d ON c.iddeposito = d.iddeposito \n WHERE idcompra = '$idcompra'\";\n return ejecutarConsultaSimpleFila($sql);\n }", "public function seleccionar(){\n //sql de la consulta\n $sql = \"SELECT * FROM especialidad E WHERE E.Estado = 1;\";\n //preparando la consulta\n $query = $this->conexion->prepare($sql);\n //ejecutandola\n $query->execute();\n //obteniendo el resultado en un arreglo asociativo\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n $this->conexion = null;\n return $result;\n }", "function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }", "function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \";\r\n\r\n if (!empty($Where)) {\r\n $SQL .= \" AND \" . $Where;\r\n\r\n }\r\n\r\n $SQL .= \" ORDER BY sapellido \";\r\n\r\n//ejecutamos la consulta\r\n\r\n\r\n $this->Consulta_ID = @mysql_query($SQL, $Conexion_ID);\r\n\r\n if (!$this->Consulta_ID) {\r\n\r\n $this->Errno = mysql_errno();\r\n\r\n $this->Error = mysql_error();\r\n\r\n }\r\n\r\n/* Si hemos tenido éxito en la consulta devuelve el identificador de la conexión, sino devuelve 0 */\r\n\r\n return $this->Consulta_ID;\r\n\r\n}", "function datos_simbolos_seleccion($id_seleccion,$id_usuario) {\n\t\t$query = \"SELECT seleccion_simbolos.*,repositorio_archivos.*\n\t\tFROM seleccion_simbolos,repositorio_archivos\n\t\tWHERE seleccion_simbolos.id_seleccion = '$id_seleccion'\n\t\tAND seleccion_simbolos.id_file=repositorio_archivos.file_id\n\t\tAND repositorio_archivos.id_usuario='$id_usuario'\n\t\tORDER BY seleccion_simbolos.orden asc\";\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$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}", "function _ConsultarResultadosPruebasIMM1($tipo_prueba, $id_cliente) //consulta el último biotest para imm se necesitan 16 campos.\n\t{\n\t\t$query='\n\t\t\tselect * from sg_pruebas \n\t\t\twhere Tipo_Prueba=\"'.$tipo_prueba.'\" \n\t\t\tand id_cliente=\"'.$id_cliente.'\" order by fecha and id asc limit 16\n\n\t\t';\n\t\t$con=Conectar::_con();\n\t\t$result=$con->query($query) or die(\"Error en: $query \".mysqli_error($query));\n\t\treturn $result;\n\t}", "public function selecionarEmpresaContratada()\n {\n try\n {\n $sql = \"SELECT * FROM empresa_contratada\";\n $busca = $this->conexao->conectar()->prepare($sql);\n $busca->execute();\n return $busca->fetchALL(PDO::FETCH_OBJ);\n }\n catch(PDOException $erro)\n {\n echo \"Erro\" . $erro->getMessage();\n }\n\n }", "public function getServicioMedicoUsuario($id){\n $sql=\"SELECT * FROM servicio_medico WHERE ID_Mt_Ctl= ?\";//Se hace la consulta para validar los datos\n $consulta=$this->db->connect()->prepare($sql);//se asigna una variable para usar el metodo prepare\n $consulta->execute(array($id)); \n \n return !empty($consulta) ? $fila = $consulta->fetch(PDO::FETCH_ASSOC) : false;\n }", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function selectByIdac_consumos($consumo_id){\n\t\t\t$this->connection = Connection::getinstance()->getConn();\n\t\t\t$PreparedStatement = \"SELECT consumo_id, socio_id, nro_medidor, fecha_lectura, fecha_emision, periodo_mes, periodo_anio, consumo_total_lectura, consumo_por_pagar, costo_consumo_por_pagar, estado, fecha_hora_pago, usuario_pago, monto_pagado, pagado_por, ci_pagado_por,\n (SELECT CONCAT(nombres,' ',apellidos) FROM asapasc.ac_socios WHERE socio_id = asapasc.ac_consumos.socio_id) AS socio \n FROM asapasc.ac_consumos WHERE consumo_id = \".Connection::inject($consumo_id).\" ;\";\n\t\t\t$ResultSet = mysql_query($PreparedStatement,$this->connection);\n\t\t\tlogs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);\n\n\t\t\t$elem = new ac_consumosTO();\n\t\t\twhile($row = mysql_fetch_array($ResultSet)){\n\t\t\t\t$elem = new ac_consumosTO();\n\t\t\t\t$elem->setConsumo_id($row['consumo_id']);\n\t\t\t\t$elem->setSocio_id($row['socio_id']);\n\t\t\t\t$elem->setNro_medidor($row['nro_medidor']);\n\t\t\t\t$elem->setFecha_lectura($row['fecha_lectura']);\n\t\t\t\t$elem->setFecha_emision($row['fecha_emision']);\n\t\t\t\t$elem->setPeriodo_mes($row['periodo_mes']);\n\t\t\t\t$elem->setPeriodo_anio($row['periodo_anio']);\n\t\t\t\t$elem->setConsumo_total_lectura($row['consumo_total_lectura']);\n\t\t\t\t$elem->setConsumo_por_pagar($row['consumo_por_pagar']);\n\t\t\t\t$elem->setCosto_consumo_por_pagar($row['costo_consumo_por_pagar']);\n\t\t\t\t$elem->setEstado($row['estado']);\n\t\t\t\t$elem->setFecha_hora_pago($row['fecha_hora_pago']);\n\t\t\t\t$elem->setUsuario_pago($row['usuario_pago']);\n\t\t\t\t$elem->setMonto_pagado($row['monto_pagado']);\n\t\t\t\t$elem->setPagado_por($row['pagado_por']);\n\t\t\t\t$elem->setCi_pagado_por($row['ci_pagado_por']);\n $elem->setSocio($row['socio']);\n\n\t\t\t}\n\t\t\tmysql_free_result($ResultSet);\n\t\t\treturn $elem;\n\t\t}", "public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function select($usuario_has_hojaruta);", "public function indexDiariaAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=2;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n //$entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n $dql = \"SELECT c FROM DGPlusbelleBundle:Consulta c WHERE c.tipoConsulta= :tipo\";\r\n $entities = $em->createQuery($dql)\r\n ->setParameter('tipo',1)\r\n ->getResult();\r\n //var_dump($entities);\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 2,\r\n );\r\n }", "function get_seguro($mes='',$anio='',$id_sucursal=''){\n\t\t$sQuery=\"SELECT \n\t\t\t\tcontrol_salida_extra.*,\n\t\t\t\ttransportista.id as t_id, transportista.nombre as t_nombre , transportista.apellido as t_apellido\n\t\t\t\tFROM control_salida_extra\n\t\t\t\tInner Join transportista ON control_salida_extra.id_transportista = transportista.id\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWHERE control_salida_extra.tipo=1 AND control_salida_extra.status<>'2' \";\n\t\t\n\t\tif($mes) {\t$sQuery.=\" AND month(control_salida_extra.fecha)='$mes' \";\t}\n\t\tif($anio) {\t$sQuery.=\" AND year(control_salida_extra.fecha)='$anio' \";\t}\n\t\tif($id_sucursal) {\t$sQuery.=\" AND control_salida_extra.id_sucursal = '$id_sucursal' \";\t}\n\t\t\n\t\t$sQuery.=\" ORDER BY control_salida_extra.id DESC \";\n\t//\techo ($sQuery);\n\t\t\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\n\t\t\t\t\n\t}", "public function select($calendario);", "function consultaMedida( $accion, $data )\n\t{\n\t\t$validar = new Validar();\n\n\t\t// INICIALIZACIÓN VAR\n\t\t$idMedida = 'NULL';\n\t\t$medida = NULL;\n\n\t\t// SETEO VARIABLES GENERALES\n \t\t$data->medida = isset( $data->medida ) ? (string)$data->medida : NULL;\n\n \t\t// VALIDACIONES\n \t\tif( $accion == 'update' ):\n \t\t\t$data->idMedida = isset( $data->idMedida ) ? (int)$data->idMedida : NULL;\n \t\t\t$idMedida = $validar->validarEntero( $data->idMedida, NULL, TRUE, 'El ID del Menú no es válido, verifique.' );\n \t\tendif;\n\n \t\t$medida = $this->con->real_escape_string( $validar->validarTexto( $data->medida, NULL, TRUE, 3, 45, 'en la descripcíón de la medida' ) );\n\n\t\t// OBTENER RESULTADO DE VALIDACIONES\n \t\tif( $validar->getIsError() ):\n\t \t\t$this->respuesta = 'danger';\n\t \t\t$this->mensaje = $validar->getMsj();\n\n \t\telse:\n\t \t\t$sql = \"CALL consultaMedida( '{$accion}', {$idMedida}, '{$medida}' );\";\n\n\t \t\tif( $rs = $this->con->query( $sql ) ){\n\t \t\t\t$this->con->siguienteResultado();\n\n\t \t\t\tif( $row = $rs->fetch_object() ){\n\t \t\t\t\t$this->respuesta = $row->respuesta;\n\t \t\t\t\t$this->mensaje = $row->mensaje;\n\n\t \t\t\t\tif( $accion == 'insert' AND $this->respuesta == 'success' )\n\t \t\t\t\t\t$this->data = (int)$row->id;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse{\n\t \t\t\t$this->respuesta = 'danger';\n\t \t\t\t$this->mensaje = 'Error al ejecutar la instrucción.';\n\t \t\t}\n\t \t\t\n \t\tendif;\n\n \t\treturn $this->getRespuesta();\n\t}", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "function obtenerSesion(){\n\t\t\n\t\t$query1 = ('select sesion.id, sesion.checkin, sesion.pagada, sesion.id_servicio, sesion.id_usuario, sesion.id_agenda, sesion.ejecutada, usuario.nombre,\n\t\t\t\t\tusuario.apellido, servicio.descripcion , cliente.nombre as nombre_cliente , cliente.apellido as apellido_cliente from sesion \n\t\t\t\t\tInner JOIN usuario\n\t\t\t\t\ton sesion.id_usuario = usuario.id\n\t\t\t\t\tInner Join servicio\n\t\t\t\t\ton sesion.id_servicio = servicio.id\n\t\t\t\t\tInner Join cliente\n\t\t\t\t\ton sesion.id_cliente = cliente.id'); //QUERY PARA OBTENER TODO DE UNA VEZ.\n\t\t$query = $this->db->query($query1);\n\t\t\n\t\t\n\t //$query = $this->db->get('sesion');\n\t if($query-> num_rows() > 0) return $query->result_array();\n\t else return false ;\n\t \n\t \n\t}", "function ColsultarTodosLosID(){///funciona\n try {\n $FKAREA=$this->objRequerimiento->getFKAREA();\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n //$comandoSql = \"select * from Requerimiento where FKAREA = '\".$FKAREA.\"' \";\n $comandoSql = \"SELECT IDREQ ,TITULO,FKEMPLE,FKAREA,FKESTADO,OBSERVACION,FKEMPLEASIGNADO FROM Requerimiento INNER JOIN detallereq ON Requerimiento.IDREQ=detallereq.FKREQ where FKAREA = '\".$FKAREA.\"'\";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n return $rs;\n $objControlConexion->cerrarBd();\n } catch(Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n}", "function SelectMedicoReferente($db_conx, $query = NULL) {\r\n\r\n if ($query == NULL) {\r\n $sql = \"SELECT * FROM tmedicoreferente LIMIT 20\";\r\n $query = mysqli_query($db_conx, $sql);\r\n }\r\n $n_columnas = $query->field_count;\r\n $n_filas = $query->num_rows;\r\n $data = '<tr class=\"row_header\">\r\n <td>COD</td> \r\n <td>Nombre</td>\r\n <td>CodMed</td> \r\n <td>Especialidad</td>\r\n <td>Unidad(es)</td>\r\n <td>Estado</td>\r\n <td>Observacion</td>\r\n <td id=\"custom-action\"></td>\r\n </tr>';\r\n $c = 0;\r\n while ($row = mysqli_fetch_array($query)) {\r\n $data .= '<tr class=\"row_data\">';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_0\">' . $row[0] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_7\">' . $row[7] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_8\">' . $row[8] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_5\">' . $row[5] . '</span> ';\r\n $data .= '<span id=\"td_' . $row[0] . '_6\">' . $row[6] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_1\">' . $row[1] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_2\">' . $row[2] . '</span></td>';\r\n\r\n $cod = \"\";\r\n $uni = \"\";\r\n $unimedarray = SelectValuesUnidadMedicoArray($db_conx, $row[0]);\r\n for ($i = 0; $i < count($unimedarray); $i++) {\r\n $tem = explode(\"*\", $unimedarray[$i]);\r\n $cod .= $tem[0];\r\n $uni .= $tem[1];\r\n if ($i + 1 != count($unimedarray)) {\r\n $cod .= \",\";\r\n $uni .= \",<br>\";\r\n }\r\n }\r\n $data .= '<td><span style=\"display:none;\" id=\"uni_' . $row[0] . '\">' . $cod . '</span>\r\n <span >' . $uni . '</span>\r\n </td>';\r\n\r\n $data .= '<td><span id=\"td_' . $row[0] . '_4\">' . $row[4] . '</span></td>';\r\n $data .= '<td><span id=\"td_' . $row[0] . '_3\">' . $row[3] . '</span></td>';\r\n\r\n $data .= '<td id=\"custom-action\"><button id=\"editar\" onclick=\"editMedicoReferente(' . $row[0] . ')\">Editar</button></td></tr>';\r\n }\r\n echo $data;\r\n}", "public function getRecordatorio() {\n $recordatorio = $this->_db->query(\"SELECT deuda.Id_cliente as dni, nombre as nombre, apellidos as apellido, \n direccion as direccion, telefono as telefono, celular as celular, total as totalDeuda\n FROM pagos as pagos \n INNER JOIN venta as venta ON venta.Id_deuda = pagos.Id_deuda\n INNER JOIN productoventa as prodventa ON venta.cod_busqueda = prodventa.cod_busqueda\n INNER JOIN deuda as deuda ON deuda.Id_deuda = venta.Id_deuda\n INNER JOIN cliente as cliente ON cliente.Id_cliente = deuda.Id_cliente where pagos.estado >= 0 and pagos.Fecha_Pago = CURDATE()\n ORDER BY deuda.Fecha_deuda\"\n );\n return $recordatorio->fetchall();\n }", "function mdatosEjercicios(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\n\t}", "function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }", "function consultarOtro(){\n $queryconsultarOtro=$this->mdlOrdenes->consultarOtro(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryconsultarOtro);\n }", "public function mostrar(){\n\t\t\t$Oconn = new conexaoClass();\n\t\t\t$Oconn -> abrir_conexao();\n\t\t\t$sql = \"SELECT * FROM noticias\";\n\t\t\t$conn = $Oconn -> getconn();\n\t\t\t$this -> resultado = $conn -> query($sql);\n\t\t}", "public function actionSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n $sd = new SeguirDAO();\r\n if($sd->insereSeguir($sm)):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n endif;\r\n endif;\r\n }", "function consultar(){\n\n\n\t\t$this->db->select('p.NUMERO, p.FACULTAD, p.PROGRAMA, p.FORMATO_PROYECTO, c.ESTADO');\n\t\t$this->db->from('PROYECTO p');\n\t\t$this->db->join('VICERRECTORIA_INVESTIGACION c', 'c.FK_PROYECTO = p.NUMERO');\n\n\n\t\t$query = $this->db->get();\n\n\t\treturn $data[]=$query->result();\n\t}", "public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "function tipoAlojamientoInstitucion_get(){\n $id=$this->get('id');\n if (count($this->get())>1) {\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"Demasiados datos enviados\",\n \"validations\" =>array(\n \"id\"=>\"Envia Id (get) para obtener un especifico articulo o vacio para obtener todos los articulos\"\n ),\n \"data\"=>null\n );\n }else{\n if ($id) {\n $data = $this->DAO->selectEntity('Tb_TipoAlojamientoInstitucion',array('idTipoAlojamientoInstitucion'=>$id),true);\n }\n else{\n $data = $this->DAO->selectEntity('Tb_TipoAlojamientoInstitucion',null,false);\n }\n if ($data) {\n $response = array(\n \"status\" => \"success\",\n \"status_code\" => 201,\n \"message\" => \"Articulo Cargado correctamente\",\n \"validations\" =>null,\n \"data\"=>$data\n );\n }else{\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"No se recibio datos\",\n \"validations\" =>null,\n \"data\"=>null\n );\n }\n }\n $this->response($response,200);\n }", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "public function DatosContribuyente()\n {\n\n $buscar = ContribuyenteBase::find()->where(\"id_contribuyente=:idContribuyente\", [\":idContribuyente\" => $_SESSION['idContribuyente']])\n ->asArray()->all();\n\n\n return $buscar[0]; \n\n }", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function selSeguro($idadministra){\r\n\t$sql = \"SELECT * FROM seguros WHERE administra_idadministra = $idadministra\";\r\n\t$ej = mysql_query($sql);\r\n\tif($dt = mysql_fetch_array($ej)){\r\n\treturn $dt;\r\n\t}\r\n}", "function datos_material_tipo($id_tipo) {\n\t\t$query = \"SELECT material_tipo.*\n\t\tFROM material_tipo\n\t\tWHERE id_tipo_material = '$id_tipo'\";\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\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "function requestDadosProduto($produto_id)\n {\n\n $conn = new db_conect();\n //Inserir visualizacao\n $conn->visualizacaoProduto($produto_id);\n\n $query = 'SELECT \n produto.nome AS produto, \n produto.preco, \n qntd_disponivel,\n qntd_min_vendida, \n categoria,\n tipo_venda,\n data_producao,\n data_validade,\n descricao,\n cliente.nome AS vendedor,\n cliente.num_vendas AS vendas_vendedor,\n cliente.avaliacao AS vendedor_avaliacao,\n cliente.cidade,\n cliente.estado,\n produto.data_cadastro AS data_anuncio, \n produto.avaliacao AS avaliacao_produto, \n produto.num_vendas AS num_vendas_produto, \n produto.num_visualizacao AS visualizacoes,\n caminho_foto AS foto \n FROM produto \n INNER JOIN cliente ON cliente.cpf = produto.produtor_fk\n INNER JOIN img_produto ON img_produto.produto_fk = produto.codigo \n WHERE \n produto.codigo = ' . $produto_id . '\n AND \n caminho_foto = (SELECT caminho_foto FROM img_produto WHERE produto_fk = codigo LIMIT 1);';\n\n $result = $conn->selectCustom($query);\n return $result;\n }", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function selecionar($pCodOtica, $pCodMarca, $pCodTipoBusca){\r\n\t\t$stringSQL = \"SELECT * FROM marca WHERE COD_OTICA = \" . $pCodOtica;\r\n\t\tif ($pCodMarca <> \"\") {\r\n\t\t\tswitch ($pCodTipoBusca) {\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\t$stringSQL = $stringSQL . \" AND COD_MARCA = '\" . $pCodMarca . \"'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t$stringSQL = $stringSQL . \" AND COD_MARCA = '\" . $pCodMarca . \"'\";\r\n\t\t\t\t\t$stringSQL = $stringSQL . \" OR DES_MARCA LIKE '\" . $pCodMarca . \"%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} \r\n\t\t$stringSQL = $stringSQL . \" ORDER BY DES_MARCA ;\";\r\n\t\t\r\n\t\t$con = Conexao::getInstanciar();\r\n\t\t$recordSet = $con->executar($stringSQL);\r\n\t\treturn $recordSet;\r\n\t}", "public function seleccionar($conexion){\n\t\t\t$resultado=$conexion->ejecutarConsulta(sprintf(\"\n\t\t\t\tSELECT\n\t\t\t\t a.id_cancion, a.id_album, b.nombre_album, b.album_cover_url,\n\t\t\t\t b.id_artista, c.nombre_artista,\n\t\t\t\t a.id_idioma, d.nombre_idioma, d.abreviatura_idioma,\n\t\t\t\t a.nombre_cancion,\n\t\t\t\t a.id_genero,\n\t\t\t\t e.nombre_genero,\n\t\t\t\t a.url_audio,\n\t\t\t\t a.reproducciones\n\t\t\t\tFROM tbl_canciones a\n\t\t\t\tINNER JOIN tbl_albumes b\n\t\t\t\tON (a.id_album=b.id_album)\n\t\t\t\tINNER JOIN tbl_artistas c\n\t\t\t\tON (b.id_artista=c.id_artista)\n\t\t\t\tINNER JOIN tbl_idioma d\n\t\t\t\tON (a.id_idioma=d.id_idioma)\n\t\t\t\tINNER JOIN tbl_generos e\n\t\t\t\tON (a.id_genero = e.id_genero)\n\t\t\t\tWHERE id_cancion=%s;\n\t\t\t\t\",\n\t\t\t\t$conexion->antiInyeccion($this->getIdCancion())\n\t\t\t));\n\t\t\t$cancion=$conexion->obtenerFila($resultado);\n\t\t\treturn $cancion;\n\t\t}", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "function getByEncomienda($encomienda) {\n $db = $this->getAdapter();\n $db->setFetchMode ( Zend_Db::FETCH_OBJ );\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('i' => 'item_encomienda'), array(\"id_item_encomienda\",\"cantidad\", \"detalle\", \"monto\", \"peso\"));\n $select->where(\"i.encomienda='$encomienda' AND i.estado='Activo'\");\n \n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando manifiestos :\" . $select->__toString());\n return $db->fetchAll($select);\n }", "public function consultar_asistencia()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar asistencia';\n\t\t$datos['contenido'] = 'reportes/consulta_asistencia_form';\n\n\t\t$datos['form_action'] = 'Reportes/registros_asistencia';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_asistencia_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}", "public function selectReserva($idioma, $data_inici, $idCasa)\r\n {\r\n $query = \"SELECT reserva.casa_id, DATE_FORMAT(reserva.data_inici,'%d-%m-%Y') as entrada, DATE_FORMAT(reserva.data_fi,'%d-%m-%Y') as sortida, reserva.preu_final, traduccioCasa.traduccioNom, traduccioCasa.tradDescripcio, reserva.data_reserva, usuari.DNI, usuari.email, poblacio.nom FROM reserva JOIN casa ON reserva.casa_id = casa.id JOIN traduccioCasa ON reserva.casa_id = traduccioCasa.casa_id JOIN usuari ON usuari.id = reserva.usuari_id JOIN poblacio ON poblacio.id = casa.poblacio_id WHERE traduccioCasa.idioma_id = ? AND reserva.data_inici=? AND reserva.casa_id=?\";\r\n $stmt = $this->conexio->prepare($query);\r\n $stmt->bind_param(\"ssi\", $idioma, $data_inici, $idCasa);\r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n return $result;\r\n }", "public function Listar(){\n $dica_saude = new Exame();\n\n //Chama o método para selecionar os registros\n return $dica_saude::Select();\n }", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public static function listOne($id){\n \n $conexion = new Conexion();\n $sql = $conexion->prepare('SELECT nome, imagem, id_aservo FROM ' . self::TABLA . ' WHERE id = :id');\n $sql->bindParam(':id', $id);\n $sql->execute();\n $reg = $sql->fetch(); //Devuelve una única linea (array con cada campo) de la TABLA(id seleccionado).\n return $reg;\n \n }", "function dias_semana (){ \n $sql=\"SELECT nombre FROM dia\";\n return toba::db()->consultar($sql);\n }", "public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }", "public function select($actividades_fuera);", "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 selectCustomizadoDetalle($modo, $condicion = array(), $order = '') {\n \n if ($condicion == '')\n $condicion = array();\n\n $where = '';\n foreach ($condicion as $key => $value) {\n if (($value == 'IS NULL') || (substr($value, 0, 7) == 'BETWEEN')) {\n $where .= \" AND $key \" . $value;\n } else {\n $where .= \" AND $key = '\" . $value . \"' \";\n }\n }\n \n $sql = \"SELECT \n com.`id` comprobante_id,\n cli.`razon_social` cli_razon_social,\n cli.ruc cli_ruc,\n tip.`tipo_documento` tipo_documento,\n serie,\n numero,\n DATE_FORMAT(com.fecha_de_emision, '%d-%m-%Y') AS fecha_de_emision,\n DATE_FORMAT(com.fecha_de_vencimiento, '%d-%m-%Y') AS fecha_de_vencimiento,\n com.total_gravada,\n com.total_igv,\n com.total_a_pagar,\n com.enviado_sunat,\n com.total_detraccion,\n com.tipo_de_cambio,\n IF(estado_sunat = '1', 'Por validar','Validado') estado_sunat,\n com.`enviado_cliente`,\n com.`enviado_equipo`,\n ite.descripcion descripcion, \n tip.`tipo_documento` tipo_documento,\n emp.`empresa` empresa,\n mon.`abreviado`,\n mon.`moneda`,\n mon.`simbolo`\n FROM `comprobantes` com\n JOIN items ite ON com.`id` = ite.`comprobante_id`\n JOIN `clientes` cli ON com.`cliente_id` = cli.`id`\n JOIN `tipo_documentos` tip ON com.`tipo_documento_id` = tip.`id` \n JOIN `empresas` emp ON com.`empresa_id` = emp.`id`\n JOIN `monedas` mon ON com.`moneda_id` = mon.`id`\n WHERE com.eliminado=0 AND com.fecha_delete IS NULL \" . $where . \" \" . $order;\n //echo $sql;exit;\n $query = $this->db->query($sql);\n\n switch ($modo) {\n case '1':\n $resultado = '';\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n $resultado = $row[$campos];\n }\n return $resultado;\n\n case '2':\n $row = array();\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n }\n return $row;\n\n case '3':\n $rows = array();\n foreach ($query->result_array() as $row) {\n $rows[] = $row;\n }\n return $rows;\n }\n }", "function datos_simbolo_especial($id_simbolo) {\n\t\t$query = \"SELECT simbolos_especiales.*, tipos_simbolos.*, palabras.*, idiomas.*\n\t\tFROM simbolos_especiales, tipos_simbolos, palabras, idiomas\n\t\tWHERE simbolos_especiales.id_simbolo = '$id_simbolo'\n\t\tAND simbolos_especiales.id_tipo_simbolo = tipos_simbolos.id_tipo\n\t\tAND simbolos_especiales.id_palabra = palabras.id_palabra\";\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$row = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}", "function selectConciertosEspera(){\n $c = conectar();\n $select = \"select CONCIERTO.FECHA as FECHA, CONCIERTO.HORA as HORA, LOCALES.UBICACION as UBICACION, GENERO.NOMBRE as GENERO, USUARIOS.NOMBRE as NOMBRE, CIUDAD.NOMBRE as CIUDAD, CONCIERTO.ID_CONCIERTO as ID from CONCIERTO \n inner join LOCALES on CONCIERTO.ID_LOCAL = LOCALES.ID_LOCAL\n inner join USUARIOS on LOCALES.ID_USUARIO = USUARIOS.ID_USUARIO\n inner join CIUDAD on USUARIOS.ID_CIUDAD = CIUDAD.ID_CIUDAD\n inner join GENERO on CONCIERTO.ID_GENERO = GENERO.ID_GENERO where CONCIERTO.ESTADO=0 order by CONCIERTO.FECHA,CONCIERTO.HORA\";\n $resultado = mysqli_query($c, $select);\n desconectar($c);\n return $resultado;\n\n}", "function consultarUna(){\n try {\n $IDREQ=$this->objRequerimiento->getIDREQ();\t\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n $comandoSql = \"select FKAREA from Requerimiento where IDREQ = '\".$IDREQ.\"' \";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n $registro = $rs->fetch_array(MYSQLI_BOTH);\n ($registro!=null)?$id = $registro[\"FKAREA\"]:$id = \"undefine\";\n $this->objRequerimiento->setID($id);\n $objControlConexion->cerrarBd();\n return $this->objRequerimiento;\n } catch(PDOException $e) {\n echo \"Error: \" . $e->getMessage();\n }\n }", "function rellenaDatos(){\n\n $stmt = $this->db->prepare(\"SELECT *\n\t\t\t\t\tFROM centro\n\t\t\t\t\tWHERE centro_id = ?\");\n\n $stmt->execute(array($this->centro_id));\n $centro = $stmt->fetch(PDO::FETCH_ASSOC);\n if($centro != null){\n\n return new CENTRO_Model($centro[\"centro_id\"], $centro[\"nombre_centro\"], $centro[\"edificio_centro\"]);\n\n }else{\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\n }\n }", "function getListDiagrammer() {\n\n global $idAnalyst;\n $idProject = $_SESSION[\"permisosDeMenu\"];\n global $diagramerASMController;\n\n //obtenemos con el controlador del diagramador los elementos del select\n //id array para los valores de las opciones\n //array los valores a mostrar\n //action funcion que se desea ejercer en dicho elemento select\n $diagramerASMController = new asmsController;\n $ASMs = $diagramerASMController->getASMstexto($idProject);\n $id = array();\n $array = array();\n for ($i = 0; $i < count($ASMs); $i++) {\n $asm = $ASMs[$i];\n $idASM = $asm->getIdASM();\n $name = $asm->getName();\n $id[] = $idASM;\n $array[] = $name;\n }\n $action = \"lookDiagram(value)\";\n $select = select($id, $array, $action, \"...\");\n return $select;\n}", "public function mostrar(){\n $conectar=Conectar::conexion();\n $sql=\"SELECT i.idingreso, DATE(i.fecha_hora) as fecha, i.idproveedor,\n p.nombre as proveedor, u.idusuario, u.nombre as usuario, i.tipo_comprobante,\n i.serie_comprobante, i.num_comprobante,i.total_compra,i.impuesto,i.estado\n FROM ingreso i INNER JOIN persona p ON i.idproveedor=p.idpersona\n INNER JOIN usuario u ON i.idusuario=u.idusuario\n ORDER BY i.idingreso desc\";\n $sql=$conectar->prepare($sql);\n $sql->execute();\n\n while ($resultado = $sql->fetch()) {\n $this->mostrar[]=$resultado;\n }\n return $this->mostrar;\n }", "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "function datos_seleccion($id_seleccion,$id_usuario) {\n\t\t$query = \"SELECT seleccion.*\n\t\tFROM seleccion\n\t\tWHERE seleccion.id_seleccion = '$id_seleccion'\n\t\tAND seleccion.id_usuario='$id_usuario'\";\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\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public static function seleccionar($campos)\n\t{\n\t\t// A la variable global se le asigna que campos va a traer para la consulta\n\t\tstatic::$consultaSelect = \"SELECT $campos FROM \". static::$tablaConsulta . \"\";\n\n\t\t// Se devuelve el objeto\n\t\treturn new static;\n\t}", "function select() {\r\n\r\n $oc_id = $this->oc_id;\r\n $prov_id = $this->prov_id;\r\n $oc_tipo = $this->oc_tipo;\r\n $oc_estado = $this->oc_estado;\r\n $oc_fecha_entrega = $this->oc_fecha_entrega;\r\n $oc_fecha_entrega_fin = $this->oc_fecha_entrega_fin;\r\n\r\n $sql = \"SELECT * FROM ing_oc p LEFT JOIN efectua_compra h ON p.oc_id=h.oc_id WHERE \";\r\n\r\n if ($oc_estado != null) {\r\n $sql = $sql . \"p.oc_estado = '\" . $oc_estado . \"' \";\r\n } else {\r\n $sql = $sql . \"p.oc_estado > '0' \";\r\n }\r\n if ($oc_id != null) {\r\n $sql = $sql . \"AND p.oc_id = '\" . $oc_id . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND p.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($oc_tipo != null) {\r\n $sql = $sql . \"AND p.oc_tipo = '\" . $oc_tipo . \"' \";\r\n }\r\n if ($oc_fecha_entrega != null) {\r\n if ($oc_fecha_entrega_fin != null) {\r\n $sql = $sql . \"AND P.oc_fecha_entrega BETWEEN '\" . $oc_fecha_entrega . \"' AND '\" . $oc_fecha_entrega_fin . \"' \";\r\n }\r\n $sql = $sql . \"AND P.oc_fecha_entrega = '\" . $oc_fecha_entrega . \"' \";\r\n }\r\n\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringoc[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringoc[$i]['oc_id'] = $datos['oc_id'];\r\n $this->arringoc[$i]['oc_codigo'] = $datos['oc_codigo'];\r\n $this->arringoc[$i]['oc_tipo'] = $datos['oc_tipo'];\r\n $this->arringoc[$i]['oc_empresa'] = $datos['oc_empresa'];\r\n $this->arringoc[$i]['oc_log'] = $datos['oc_log'];\r\n $this->arringoc[$i]['oc_estado'] = $datos['oc_estado'];\r\n $this->arringoc[$i]['oc_fecha_entrega'] = $datos['oc_fecha_entrega'];\r\n $this->arringoc[$i]['oc_solicitante'] = $datos['oc_solicitante'];\r\n $this->arringoc[$i]['oc_observacion'] = $datos['oc_observacion'];\r\n $this->arringoc[$i]['oc_neto'] = $datos['oc_neto'];\r\n $this->arringoc[$i]['oc_iva'] = $datos['oc_iva'];\r\n $this->arringoc[$i]['oc_total'] = $datos['oc_total'];\r\n $this->arringoc[$i]['oc_forma_pago'] = $datos['oc_forma_pago'];\r\n $this->arringoc[$i]['oc_condiciones'] = $datos['oc_condiciones'];\r\n $this->arringoc[$i]['oc_tipo_descuento'] = $datos['oc_tipo_descuento'];\r\n $this->arringoc[$i]['oc_impuesto'] = $datos['oc_impuesto'];\r\n $this->arringoc[$i]['oc_gasto_envio'] = $datos['oc_gasto_envio'];\r\n $this->arringoc[$i]['solc_id'] = $datos['solc_id'];\r\n $i++;\r\n }\r\n\r\n// $this->prov_id = $row->prov_id;\r\n//\r\n// $this->oc_id = $row->oc_id;\r\n//\r\n// $this->oc_codigo = $row->oc_codigo;\r\n//\r\n// $this->oc_tipo = $row->oc_tipo;\r\n//\r\n// $this->oc_empresa = $row->oc_empresa;\r\n//\r\n// $this->oc_log = $row->oc_log;\r\n//\r\n// $this->oc_estado = $row->oc_estado;\r\n//\r\n// $this->oc_fecha_entrega = $row->oc_fecha_entrega;\r\n//\r\n// $this->oc_solicitante = $row->oc_solicitante;\r\n//\r\n// $this->oc_observacion = $row->oc_observacion;\r\n//\r\n// $this->oc_neto = $row->oc_neto;\r\n//\r\n// $this->oc_iva = $row->oc_iva;\r\n//\r\n// $this->oc_total = $row->oc_total;\r\n//\r\n// $this->oc_forma_pago = $row->oc_forma_pago;\r\n//\r\n// $this->oc_condiciones = $row->oc_condiciones;\r\n//\r\n// $this->oc_rut_emision = $row->oc_rut_emision;\r\n//\r\n// $this->oc_rut_aprobacion = $row->oc_rut_aprobacion;\r\n//\r\n// $this->oc_cheque_adjunto = $row->oc_cheque_adjunto;\r\n//\r\n// $this->oc_descuento = $row->oc_descuento;\r\n//\r\n// $this->oc_tipo_descuento = $row->oc_tipo_descuento;\r\n//\r\n// $this->oc_impuesto = $row->oc_impuesto;\r\n//\r\n// $this->oc_gasto_envio = $row->oc_gasto_envio;\r\n//\r\n// $this->oc_estado_pago = $row->oc_estado_pago;\r\n }", "public function ConsultarSoporteMatricula($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVASM($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $rutaFuente= \"<a href='/\".$fila['RutaFuente'].\"'>Descargar Archivo Fuente</a>\";\n $rutaEscaneado= \"<a href='/\".$fila['RutaSoporte'].\"'>Descargar Archivo Soporte</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['Salon'],$rutaFuente, $rutaEscaneado ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "public function mostrarDados(){\n\t\t$sql = \"SELECT cliente.cod_cliente, cliente.nome_cliente, categoria.cod_categoria, categoria.desc_categoria, servico.cod_servico, servico.desc_servico, servico.foto\t\n\t\t\t\tFROM cliente INNER JOIN (categoria INNER JOIN servico ON categoria.cod_categoria = servico.cod_categoria) ON cliente.cod_cliente = servico.cod_cliente\n\t\t\t\twhere cod_servico = '$this->cod_servico'\";\n\t\t$qry= self:: executarSQL($sql);\n\t\t$linha = self::listar($qry);\n\t\t\n\t\t$this-> cod_servico = $linha['cod_servico'];\n\t\t$this-> cod_categoria = $linha['cod_categoria'];\n\t\t$this-> desc_categoria = $linha['desc_categoria'];\n\t\t$this-> cod_cliente = $linha['cod_cliente'];\n\t\t$this-> nome_cliente = $linha['nome_cliente'];\n\t\t$this-> desc_servico = $linha['desc_servico'];\n\t\t$this-> foto = $linha['foto'];\n\t}", "public function get_detalle_aros_rec_ini($numero_venta){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select p.marca,p.color,p.modelo,p.categoria,d.id_producto,d.numero_venta from producto as p join detalle_ventas as d where p.id_producto=d.id_producto and d.numero_venta=? and categoria='aros';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$numero_venta);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function Crud(){\r\n \r\n // if(isset($_REQUEST['Seq_Registro'])){\r\n // $alm = $this->model->Obtener($_REQUEST['Seq_Registro']);\r\n // }\r\n \r\n // require_once 'view/header.php';\r\n // require_once 'view/Registro/Nuevo_registro.php';\r\n // require_once 'view/footer.php';\r\n require_once 'view/medics/create.php';\r\n }", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function datosMulta($datos) {\n $consultaExistenciaMulta = $this->db->select(\"SELECT * FROM multa \"\n . \"WHERE id = '\" . $datos . \"' \");\n\n if ($consultaExistenciaMulta != null) {\n return $consultaExistenciaMulta;\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Ni madres...';\n die;\n }\n }", "function consulta_registro_ventas_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=2\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED)\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }" ]
[ "0.6924992", "0.6905642", "0.66673225", "0.6591213", "0.65494305", "0.6537351", "0.6494126", "0.647959", "0.64312047", "0.6421163", "0.64095503", "0.640615", "0.6396983", "0.6394402", "0.6382237", "0.6377017", "0.63721186", "0.6359905", "0.6354635", "0.6354372", "0.63191575", "0.6310534", "0.6306204", "0.6276159", "0.62753505", "0.6252855", "0.62178063", "0.62163335", "0.6212944", "0.6194489", "0.61725193", "0.614693", "0.6145835", "0.614471", "0.6144279", "0.61423165", "0.61389977", "0.6123113", "0.6098137", "0.60904706", "0.6087381", "0.608661", "0.60763806", "0.60741323", "0.6051316", "0.60494107", "0.60491234", "0.6042961", "0.60354584", "0.603446", "0.6033184", "0.6032755", "0.6029041", "0.6023892", "0.6021076", "0.60186374", "0.60109335", "0.60082865", "0.6003476", "0.6001171", "0.5992193", "0.59919727", "0.59868497", "0.59827995", "0.5979771", "0.5978513", "0.59773564", "0.597339", "0.5972495", "0.59715843", "0.5964053", "0.5963934", "0.59637123", "0.59605503", "0.5955863", "0.594899", "0.59473515", "0.5944384", "0.59400386", "0.59387785", "0.5936465", "0.5929584", "0.59276086", "0.5926125", "0.59230024", "0.5920711", "0.5920032", "0.59072435", "0.5904201", "0.5904039", "0.5903614", "0.5900733", "0.5900071", "0.58957726", "0.5893099", "0.5891311", "0.58899504", "0.5881766", "0.5876398", "0.5874097" ]
0.6116096
38
Consultar registros de SicasConsultaMedica
public function consultar($valor){ $oSicasConsultaMedicaBD = new SicasConsultaMedicaBD(); return $oSicasConsultaMedicaBD->consultar($valor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultar($valor){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->consultar($valor);\r\n }", "public function consultar_asistencia()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar asistencia';\n\t\t$datos['contenido'] = 'reportes/consulta_asistencia_form';\n\n\t\t$datos['form_action'] = 'Reportes/registros_asistencia';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_asistencia_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "function consulta_registro_ventas_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=2\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED)\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }", "function buscar_materiales($registrado,$texto_buscar,$licencia,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND material_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (material_titulo LIKE '%$texto_buscar%' \n\t\t\tOR material_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR material_objetivos LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) FROM materiales\n\t\tWHERE material_licencia = '$licencia'\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "function mdatosEjercicioInformacion() {\n\t\t$conexion = conexionbasedatos();\n\t\t\n\t\t$idejercicio = $_GET[\"idejercicio\"];\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO AND FE.IDEJERCICIO = $idejercicio;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "function consultaMedida( $accion, $data )\n\t{\n\t\t$validar = new Validar();\n\n\t\t// INICIALIZACIÓN VAR\n\t\t$idMedida = 'NULL';\n\t\t$medida = NULL;\n\n\t\t// SETEO VARIABLES GENERALES\n \t\t$data->medida = isset( $data->medida ) ? (string)$data->medida : NULL;\n\n \t\t// VALIDACIONES\n \t\tif( $accion == 'update' ):\n \t\t\t$data->idMedida = isset( $data->idMedida ) ? (int)$data->idMedida : NULL;\n \t\t\t$idMedida = $validar->validarEntero( $data->idMedida, NULL, TRUE, 'El ID del Menú no es válido, verifique.' );\n \t\tendif;\n\n \t\t$medida = $this->con->real_escape_string( $validar->validarTexto( $data->medida, NULL, TRUE, 3, 45, 'en la descripcíón de la medida' ) );\n\n\t\t// OBTENER RESULTADO DE VALIDACIONES\n \t\tif( $validar->getIsError() ):\n\t \t\t$this->respuesta = 'danger';\n\t \t\t$this->mensaje = $validar->getMsj();\n\n \t\telse:\n\t \t\t$sql = \"CALL consultaMedida( '{$accion}', {$idMedida}, '{$medida}' );\";\n\n\t \t\tif( $rs = $this->con->query( $sql ) ){\n\t \t\t\t$this->con->siguienteResultado();\n\n\t \t\t\tif( $row = $rs->fetch_object() ){\n\t \t\t\t\t$this->respuesta = $row->respuesta;\n\t \t\t\t\t$this->mensaje = $row->mensaje;\n\n\t \t\t\t\tif( $accion == 'insert' AND $this->respuesta == 'success' )\n\t \t\t\t\t\t$this->data = (int)$row->id;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse{\n\t \t\t\t$this->respuesta = 'danger';\n\t \t\t\t$this->mensaje = 'Error al ejecutar la instrucción.';\n\t \t\t}\n\t \t\t\n \t\tendif;\n\n \t\treturn $this->getRespuesta();\n\t}", "function consulta_registro_compras_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n\t, prosic_comprobante.referencia_fecha\n\t, prosic_comprobante.referencia_serie\n\t, prosic_comprobante.referencia_nro\n\t, prosic_comprobante.referecia_tipo_doc\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=3\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,prosic_comprobante.codigo_comprobante\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function getRegistros(){\n $query = $this->db->query('select c.orden_servicio,c.p1,c.p2,c.p3,c.p4,c.p5,c.p6,c.p7,r.DISTRIB,r.RAZON,r.CIUCLIEN,r.NUMSERIE,r.TIPORDEN,r.OPER1,r.ORDEN,r.CLIENTE,r.TELCASA,r.TELOFIC,r.TELCEL,r.EMAIL,r.ASESOR,r.RFCASESOR,r.DESCRIP\n from reporte r\n left join calificacion c\n on r.orden like concat(\"%\",c.orden_servicio,\"%\")');\n return $query->result();\n }", "function consulta_personalizada_registro_compras_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=3\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED),prosic_tipo_comprobante.sunat_tipo_comprobante\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "public function Consultar(){\n require_once 'view/include/cabecera_usuario.php';\n require_once 'view/mostrar_estadobien.php';\n require_once 'view/include/pie_mostrar.php';\n }", "function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}", "function _ConsultarResultadosPruebasIMM1($tipo_prueba, $id_cliente) //consulta el último biotest para imm se necesitan 16 campos.\n\t{\n\t\t$query='\n\t\t\tselect * from sg_pruebas \n\t\t\twhere Tipo_Prueba=\"'.$tipo_prueba.'\" \n\t\t\tand id_cliente=\"'.$id_cliente.'\" order by fecha and id asc limit 16\n\n\t\t';\n\t\t$con=Conectar::_con();\n\t\t$result=$con->query($query) or die(\"Error en: $query \".mysqli_error($query));\n\t\treturn $result;\n\t}", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "public function ConsultarSoporteMatricula($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVASM($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $rutaFuente= \"<a href='/\".$fila['RutaFuente'].\"'>Descargar Archivo Fuente</a>\";\n $rutaEscaneado= \"<a href='/\".$fila['RutaSoporte'].\"'>Descargar Archivo Soporte</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['Salon'],$rutaFuente, $rutaEscaneado ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\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 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 buscarMaterias($datos){\n try {\n $parametros = array(\"id_plan\" => $datos[\"id_plan\"] , \n \"anio\" => $datos[\"anio\"]);\n $resultado = $this->refControladorPersistencia->ejecutarSentencia(DbSentencias::BUSCAR_MATERIAS_EC, $parametros);\n $fila = $resultado->fetchAll(PDO::FETCH_ASSOC);\n\n return $fila;\n } catch(Exception $e){\n echo \"Error :\" . $e->getMessage(); \n }\n }", "public function ConsultarAsistenciaDiarias()\n {\n try {\n $datos = $_REQUEST;\n $filtros = array_filter($datos);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n if($filtros['permiso'] != 1) {\n $id = $dbm->BuscarIProfesorTitular($filtros['grupoid']);\n if(!$id) {\n return new View(\"No se han encontrado profesores en el grupo consultado\", Response::HTTP_PARTIAL_CONTENT);\n }\n\n $usuario = $dbm->getRepositorioById('Usuario', 'profesorid', $id[0][\"profesorid\"]);\n if(!$usuario) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n \n }\n if($usuario->getUsuarioid() != $filtros['usuarioid']) {\n return new View(\"Se requiere tener un permiso especial o ser el profesor titular para poder consultar\", Response::HTTP_PARTIAL_CONTENT);\n }\n } \n $respuesta = $this->asistenciasDiarias($filtros, $dbm);\n if($respuesta['error']) {\n return new View($respuesta['mensaje'], Response::HTTP_PARTIAL_CONTENT);\n }\n return new View($respuesta, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "function armar_consulta($pdia,$udia,$anio){\n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n// $sql=\"(SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON ( m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND not exists(SELECT * from novedad t_no\n// where t_no.id_designacion=t_d.id_designacion\n// and (t_no.tipo_nov=1 or t_no.tipo_nov=2 or t_no.tipo_nov=4 or t_no.tipo_nov=5)))\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND t_no.id_designacion=t_d.id_designacion\n// AND (((t_no.tipo_nov=2 or t_no.tipo_nov=5 ) AND (t_no.tipo_norma is null or t_no.tipo_emite is null or t_no.norma_legal is null))\n// OR (t_no.tipo_nov=1 or t_no.tipo_nov=4))\n// )\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// sum((case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen ) as dias_lic,\n// case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// \tAND t_d.carac = t_c.id_car \n// \tAND t_d.uni_acad = t_ua.sigla \n// \tAND t_d.tipo_desig=1 \n// \tAND t_no.id_designacion=t_d.id_designacion \n// \tAND (t_no.tipo_nov=2 or t_no.tipo_nov=5) \n// \tAND t_no.tipo_norma is not null \n// \tAND t_no.tipo_emite is not null \n// \tAND t_no.norma_legal is not null\n// GROUP BY t_d.id_designacion,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\n// )\".\n //--sino tiene novedad entonces dias_lic es 0 case when t_no.id_novedad is null \n //--si tiene novedad tipo 2,5 y no tiene norma entonces dias_lic es 0\n $sql=\" SELECT distinct t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n sum(case when t_no.id_novedad is null then 0 else (case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen end) as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d \n LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\n LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo)\n LEFT OUTER JOIN novedad t_no ON (t_d.id_designacion=t_no.id_designacion and t_no.tipo_nov in (2,5) and t_no.tipo_norma is not null \n \t\t\t\t\tand t_no.tipo_emite is not null \n \t\t\t\t\tand t_no.norma_legal is not null \n \t\t\t\t\tand t_no.desde<='\".$udia.\"' and t_no.hasta>='\".$pdia.\"'),\n docente as t_d1,\n caracter as t_c,\n unidad_acad as t_ua \n WHERE t_d.id_docente = t_d1.id_docente\n AND t_d.carac = t_c.id_car \n AND t_d.uni_acad = t_ua.sigla \n AND t_d.tipo_desig=1 \n GROUP BY t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\".\n\n \" UNION\n (SELECT distinct t_d.id_designacion,0 as por_permuta,t_d.tipo_desig, 'RESERVA'||': '||t_r.descripcion as docente_nombre, 0, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento, t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n 0 as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n caracter as t_c,\n unidad_acad as t_ua,\n reserva as t_r \n \n WHERE t_d.carac = t_c.id_car \n \tAND t_d.uni_acad = t_ua.sigla \n \tAND t_d.tipo_desig=2 \n \tAND t_d.id_reserva = t_r.id_reserva \t\n )\";\n //esto es para las designaciones que tienen mas de un departamento,area,orientacion\n $sql2=\"SELECT distinct sub1.id_designacion,sub1.por_permuta,sub1.tipo_desig,sub1.docente_nombre,sub1.legajo,sub1.nro_cargo,sub1.anio_acad,sub1.desde,sub1.hasta,sub1.cat_mapuche, sub1.cat_mapuche_nombre,\n sub1.cat_estat, sub1.dedic, sub1.carac,case when sub2.id_designacion is not null then sub2.dpto else sub1.id_departamento end as id_departamento,case when sub2.id_designacion is not null then sub2.area else sub1.id_area end as id_area,case when sub2.id_designacion is not null then sub2.orientacion else sub1.id_orientacion end as id_orientacion\n , sub1.uni_acad, sub1.emite_norma, sub1.nro_norma, sub1.tipo_norma, sub1.nro_540, sub1.observaciones, sub1.id_programa, sub1.programa, sub1.porc, sub1.costo_diario, sub1.check_presup, sub1.licencia, sub1.estado, sub1.dias_lic, sub1.dias_des\n FROM (\".$sql.\")sub1\"\n . \" LEFT OUTER JOIN (select d.id_designacion,excepcion_departamento(a.id_designacion)as dpto,excepcion_area(a.id_designacion) as area,excepcion_orientacion(a.id_designacion) as orientacion\n from designacion d,dao_designa a \n where d.desde <='\".$udia.\"' and (d.hasta>='\".$pdia.\"' or d.hasta is null)\n and a.id_designacion=d.id_designacion)sub2 ON (sub1.id_designacion=sub2.id_designacion)\";\n return $sql2;\n }", "function ConsultarMedicamentosAPH(){\n $sql = \"CALL spConsultarMedicamentosAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idReporteAPH);\n $query->execute();\n if ($query->rowCount() > 0) {\n return array('medicamentos' => $query->fetchAll());\n }else{\n return array('medicamentos' => null);\n }\n }", "function consultarFacultades() {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_facultades\",\"\");\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function Listar(){\n $dica_saude = new Exame();\n\n //Chama o método para selecionar os registros\n return $dica_saude::Select();\n }", "function consulta_mc_salud_medicina() {\n\t$consulta = mysql_query(\"SELECT * FROM datos_usuario WHERE Especialidad = 'mc_salud_medicina'\");\n\t$numero_registros =\tmysql_num_rows($consulta);\n\n\t$tamanio_consulta = 5;\n\n\t@$pagina = $_GET['pagina'];\n\tif(!isset($pagina) || empty($pagina)) {\n\n\t\t$inicio = 0;\n\t\t$pagina = 1;\n\t}\n\telse {\n\t\t$inicio = ($pagina -1) * $tamanio_consulta;\n\t}\n\n\t$total_paginas = ceil($numero_registros / $tamanio_consulta);\n\n\t$consulta = mysql_query(\"SELECT * FROM datos_usuario WHERE Especialidad = 'mc_salud_medicina' LIMIT \".$inicio.\",\".$tamanio_consulta);\n\n\twhile($registros = mysql_fetch_array($consulta)) {\n\t\t\n\t\techo \"<div class = 'row'>\n\t\t\t\t\t\t<div class = 'col-md-2'>\n\t\t\t\t\t\t\t<div id = 'foto'>\n\t\t\t\t\t\t\t\t<img src='../usuario/archivos/fotos_perfil/\".$registros['Foto_perfil'].\"'>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class = 'col-md-6 datos_persona col-md-offset-1'>\n\t\t\t\t\t\t\t<label>Nombre: <span>\".$registros['Nombre'].\"</span></label>\n\t\t\t\t\t\t\t<label>Especialidad: <span>\".$registros['Especialidad'].\"</span></label>\n\n\t\t\t\t\t\t\t<div class = 'lin_sep'></div>\n\n\t\t\t\t\t\t\t<label>Número celular: <span>\".$registros['No_movil'].\"</span></label>\n\t\t\t\t\t\t\t<label>Tel casa: <span>\".$registros['Tel_casa'].\"</span></label>\n\t\t\t\t\t\t\t<label>Correo Electrónico: <span>\".$registros['Correo_electronico'].\"</span></label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class = 'col-md-2 col-md-offset-1'>\n\t\t\t\t\t\t\t<a target = '_blank' href='../usuario/archivos/curriculums/\".$registros['Curriculum'].\"'>\n\t\t\t\t\t\t\t\t<img src='../img/search_128.png' class = 'ref_info'>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\";\n\t}\n\n\t$url = \"mc_salud_medicina.php\";\n\n\techo '<div class = \"row\" id = \"indices\">';\n\n\tif ($total_paginas > 1) {\n\n \t\tif ($pagina != 1)\n \t\techo '<a href=\"'.$url.'?pagina='.($pagina-1).'\">Atras</a>';\n \tfor ($i=1;$i<=$total_paginas;$i++) {\n if ($pagina == $i)\n \n echo $pagina;\n\n else \n echo ' <a href=\"'.$url.'?pagina='.$i.'\">'.$i.'</a> ';\n }\n if ($pagina != $total_paginas)\n echo '<a href=\"'.$url.'?pagina='.($pagina+1).'\">Siguiente</a>';\n\t}\n\n\techo '</di>';\n}", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function SEARCH(){\n\t\t$sql = \"SELECT * FROM RESERVA\n\t\t\t\tWHERE FECHA BETWEEN '$this->hoy' AND '$this->hoy_mas6'\n\t\t\t\tORDER BY FECHA\";\n\n if (!($resultado = $this->mysqli->query($sql))){\n $this->mensaje['mensaje'] = 'ERROR: Fallo en la consulta sobre la base de datos';\n return $this->mensaje;\n }\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n return $resultado;\n }\n }", "function llamarRegistrosMySQLPlaneServicios() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t$cons = \"SELECT * FROM Salud.EPS ORDER BY AutoId ASC\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}", "function getRegistros() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleRegistros($this->extra[\"monitor_id\"], $this->extra[\"pagina\"]);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t pg_escape_string($current_usuario_id).\", \".\n\t\t\t pg_escape_string($this->objetivo_id).\", '\".\n\t\t\t pg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t pg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t//print($sql);\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t$monitor_ids = array();\n\t\twhile($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'reg_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleRegistros($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t$orden++;\n\t\t}\n\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "public function consultaSeguimientos(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsSegPaiDer=\"select fecha_seguim_compderecho,seguim_compderecho from seguimiento_compderecho \n\t\twhere id_pai=:id_pai and id_derechocespa=:id_derechocespa and num_doc=:num_doc order by fecha_seguim_compderecho desc\";\n\t\t$segCompDer=$conect->createCommand($sqlConsSegPaiDer);\n\t\t$segCompDer->bindParam(\":id_pai\",$this->id_pai,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":id_derechocespa\",$this->id_derechocespa,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readConsSegPaiDer=$segCompDer->query();\n\t\t$resConsSegPaiDer=$readConsSegPaiDer->readAll();\n\t\t$readConsSegPaiDer->close();\n\t\treturn $resConsSegPaiDer;\n\t}", "public function consultar_inasistencia()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar inasistencia';\n\t\t$datos['contenido'] = 'reportes/consulta_inasistencia_form';\n\n\t\t$datos['form_action'] = 'Reportes/registros_inasistencia';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_inasistencia_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}", "public function consultar($valor){\r\n\t\t$oSicasSalarioMinimoBD = new SicasSalarioMinimoBD();\t\r\n\t\treturn $oSicasSalarioMinimoBD->consultar($valor);\r\n\t}", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "public function Consulta()\n\t{\n $this->vista = 1;\n //formeamos las fechas de inicio y fin\n\t\t$fi = Carbon::parse($this->fecha_ini)->format('Y-m-d').' 00:00:00';\n\t\t$ff = Carbon::parse($this->fecha_fin)->format('Y-m-d').' 23:59:59';\n\n if($this->fecha_ini > $this->fecha_fin)\n \t{\n \t\t$this->emit('msg-warning', 'Falta rango de fechas o rango de fechas no válido, por favor revise las fechas ingresadas.');\n }\n\n //si no se selecciono ningin paciente emitimos un mensaje de error;\n\t\t\t\n //buscamos al paciente\n $paciente = Paciente::where('id',$this->pacienteselected)->get();\n //iteramos para asignar a las variables declaradas\n foreach ($paciente as $p) {\n $this->nombre = $p->name.' '.$p->last_name;\n $this->ci = $p->nro_ci;\n $this->edad = Carbon::parse($p->date_nac)->age;\n }\n //buscamos las solicitudes del paciente en dichas fechas\n $this->solicitudes = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->get();\n //Sacamos el total de ingresos por pacient\n $this->total = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->sum('pago');\n \n\t\t\n }", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function ConsultarSoporteFirmas($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVASF('$busqueda');\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $rutaFuente= \"<a href='/\".$fila['RutaAutorizacion'].\"'>Descargar Archivo</a>\";\n $rutaSoporte= \"<a href='/\".$fila['RutaSoporte'].\"'>Descargar Archivo</a>\";\n\n array_push($registro, $fila['Salon'],$fila['Fecha'],$rutaFuente, $rutaSoporte ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "function mdatosEjercicios(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\n\t}", "public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \";\r\n\r\n if (!empty($Where)) {\r\n $SQL .= \" AND \" . $Where;\r\n\r\n }\r\n\r\n $SQL .= \" ORDER BY sapellido \";\r\n\r\n//ejecutamos la consulta\r\n\r\n\r\n $this->Consulta_ID = @mysql_query($SQL, $Conexion_ID);\r\n\r\n if (!$this->Consulta_ID) {\r\n\r\n $this->Errno = mysql_errno();\r\n\r\n $this->Error = mysql_error();\r\n\r\n }\r\n\r\n/* Si hemos tenido éxito en la consulta devuelve el identificador de la conexión, sino devuelve 0 */\r\n\r\n return $this->Consulta_ID;\r\n\r\n}", "function consultar(){\n\n\n\t\t$this->db->select('p.NUMERO, p.FACULTAD, p.PROGRAMA, p.FORMATO_PROYECTO, c.ESTADO');\n\t\t$this->db->from('PROYECTO p');\n\t\t$this->db->join('VICERRECTORIA_INVESTIGACION c', 'c.FK_PROYECTO = p.NUMERO');\n\n\n\t\t$query = $this->db->get();\n\n\t\treturn $data[]=$query->result();\n\t}", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function buscar_materiales_limit($registrado,$texto_buscar,$licencia,$sql,$inicial,$cantidad) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND material_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (material_titulo LIKE '%$texto_buscar%' \n\t\t\tOR material_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR material_objetivos LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM materiales\n\t\tWHERE material_licencia = '$licencia'\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function mostrar(){\n\t\t\t$Oconn = new conexaoClass();\n\t\t\t$Oconn -> abrir_conexao();\n\t\t\t$sql = \"SELECT * FROM noticias\";\n\t\t\t$conn = $Oconn -> getconn();\n\t\t\t$this -> resultado = $conn -> query($sql);\n\t\t}", "function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function readMedicoEspecial(){\n $objM=new medicoDAO();\n $resul=$objM->readMedicoEspecialidad();\n return $resul;\n }", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function listarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_sel';\n\t\t$this->transaccion='SNX_MAQ_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_maquinaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('potencia','numeric');\n\t\t$this->captura('peso','numeric');\t\t\n\t\t$this->captura('maquinaria','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('valor','numeric');\n\t\t$this->captura('valormat','numeric');\n\t\t$this->captura('id_factorindexacion','int4');\n\t\t$this->captura('desc_factorindexacion','varchar');\n\t\t$this->captura('id_tipopreciomaquinaria','int4');\n\t\t$this->captura('tipopreciomaquinaria','varchar');\n\t\t$this->captura('id_ambitoprecio','int4');\n\t\t$this->captura('ambitoprecio','varchar');\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 verconsulta(){\n\t\techo \"<table border=1>\\n\";\n\t\t// mostramos los nombres de los campos\n\t\tfor ($i = 0; $i < $this->numcampos(); $i++){echo \"<td><b>\".$this->nombrecampo($i).\"</b></td>\\n\";}\n\t\techo \"</tr>\\n\";\n\t\t// mostrarmos los registros\n\t\t\twhile ($row = mysqli_fetch_row($this->Consulta_ID)){\n\t\t\t\techo \"<tr> \\n\";\n\t\t\t\tfor ($i = 0; $i < $this->numcampos(); $i++){echo \"<td>\".$row[$i].\"</td>\\n\";}\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t}\n\t}", "function RellenaDatosPorEdificio()\n{\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->CODEDIFICIO') \n\t\t\t)\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n}", "function reporteCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTREP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('id_persona','int4');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('dir_per', 'varchar');\n\t\t$this->captura('tel_per1', 'varchar');\n\t\t$this->captura('tel_per2', 'varchar');\n\t\t$this->captura('cel_per','varchar');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('nombre_ins','varchar');\n\t\t$this->captura('cel_ins','varchar');\n\t\t$this->captura('dir_ins','varchar');\n\t\t$this->captura('fax','varchar');\n\t\t$this->captura('email_ins','varchar');\n\t\t$this->captura('tel_ins1','varchar');\n\t\t$this->captura('tel_ins2','varchar');\t\t\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('nro_contrato','varchar');\t\t\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }", "function listar_saa() {\n\t\t$query = \"SELECT material_saa.*\n\t\tFROM material_saa\n\t\tORDER BY saa_material asc\";\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 function buscarDocumento( $txtCodigoCarrera ){\n\t\t\t$sql = \"SELECT E.idestudiantegeneral, ET.codigoestudiante, E.numerodocumento, E.tipodocumento,\n \t\t\tDATE_FORMAT(E.fechanacimientoestudiantegeneral,'%Y-%m-%d') AS fechanacimientoestudiantegeneral, E.telefonoresidenciaestudiantegeneral,\n\t\t\t\tE.telefono2estudiantegeneral, E.tipodocumento, E.nombresestudiantegeneral, E.apellidosestudiantegeneral , E.emailestudiantegeneral, E.celularestudiantegeneral,\n\t\t\t\tD.nombredocumento, E.codigogenero, G.nombregenero\n \t\t\tFROM estudiantegeneral E\n \t\t\tINNER JOIN estudiante ET ON ( ET.idestudiantegeneral = E.idestudiantegeneral )\n \t\t\tINNER JOIN carrera C ON ( C.codigocarrera = ET.codigocarrera )\n \t\t\tINNER JOIN documento D ON ( D.tipodocumento = E.tipodocumento )\n \t\t\tINNER JOIN genero G ON ( G.codigogenero = E.codigogenero )\n \t\t\tWHERE numerodocumento = ? \n \t\t\tAND C.codigocarrera = ? \";\n\t\t\t\n\t\t\t\n\t\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t\t$this->persistencia->setParametro( 0 , $this->getDocumento( ) , false );\n\t\t\t$this->persistencia->setParametro( 1 , $txtCodigoCarrera , false );\n\t\t\t//echo $this->persistencia->getSQLListo( );\n\t\t\t$this->persistencia->ejecutarConsulta( );\n\t\t\t\n\t\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t\t$this->setId( $this->persistencia->getParametro( \"codigoestudiante\" ) );\n\t\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombresestudiantegeneral\" ) );\n\t\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidosestudiantegeneral\" ) );\n\t\t\t\t\n\t\t\t\t$tipoDocumento = new TipoDocumento( null );\n\t\t\t\t$tipoDocumento->setIniciales( $this->persistencia->getParametro( \"tipodocumento\" ) );\n\t\t\t\t$tipoDocumento->setDescripcion( $this->persistencia->getParametro( \"nombredocumento\" ) );\n\t\t\t\t$this->setTipoDocumento( $tipoDocumento );\n\t\t\t}\n\t\t}", "private function getMateriais() {\n\n $oDaoMaterial = new cl_matmater();\n $sCampos = \" m60_codmater as codigo, m60_descr as descricao, m61_descr as unidade\";\n\n $sCamposGrupo = \" , 0 as codigogrupo \";\n if ($this->lAgruparGrupoSubgrupo) {\n $sCamposGrupo = \" , m65_sequencial as codigogrupo \";\n }\n $sCampos .= $sCamposGrupo;\n\n $aOrdem = array();\n $aWhere = array();\n $aWhere[] = \" instit = {$this->iInstituicao} \";\n\n $aOrdem[] = \" m60_descr \";\n\n if ($this->sDepartamentos) {\n $aWhere[] = \" m70_coddepto in ({$this->sDepartamentos}) \";\n }\n\n if ($this->sGrupoSubgrupo) {\n $aWhere[] = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n }\n\n $sCampoDepartamento = \", 0 as depto, '' as departamento\";\n if ($this->iQuebraPagina == RelatorioDeDistribuicao::QUEBRA_PAGINA_DEPARTAMENTO) {\n $sCampoDepartamento = \", m70_coddepto as depto, descrdepto as departamento \";\n }\n $sCampos .= $sCampoDepartamento;\n $sWhere = \" where \" . implode(\" and \", $aWhere);\n $sOrdem = \" order by \" . implode(\", \", $aOrdem);\n\n $sql = \" select distinct {$sCampos} \";\n $sql .= \" from matmater \";\n $sql .= \" inner join matunid on m60_codmatunid = m61_codmatunid \";\n $sql .= \" inner join matmatermaterialestoquegrupo on m60_codmater = m68_matmater \";\n $sql .= \" inner join materialestoquegrupo on m68_materialestoquegrupo = m65_sequencial \";\n $sql .= \" inner join db_estruturavalor on db121_sequencial = m65_db_estruturavalor \";\n $sql .= \" inner join matestoque on m60_codmater = m70_codmatmater \";\n $sql .= \" inner join db_depart on coddepto = m70_coddepto \";\n\n\n $sql .= \"{$sWhere} {$sOrdem} \";\n\n $rsMateriais = $oDaoMaterial->sql_record($sql);\n\n $aMateriais = array();\n for ($i = 0; $i < $oDaoMaterial->numrows; $i++) {\n\n $oMaterial = db_utils::fieldsMemory($rsMateriais, $i);\n $oMaterial->totalPeriodo = 0.0;\n $oMaterial->mediaPeriodo = 0.0;\n $aMateriais[] = $oMaterial;\n\n if (!isset($this->aDepartamentos[$oMaterial->depto])) {\n\n $oDeptartamento = new stdClass();\n $oDeptartamento->codigo = $oMaterial->depto;\n $oDeptartamento->descricao = $oMaterial->departamento;\n $oDeptartamento->itens = array();\n $this->aDepartamentos[$oDeptartamento->codigo] = $oDeptartamento;\n }\n }\n return $aMateriais;\n }", "public function consultar($valor){\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\t\r\n\t\treturn $oSicasAtendimentoBD->consultar($valor);\r\n\t}", "public function mostrar($idcompra){\n $sql = \"SELECT c.idcompra, c.idordencompra, c.nrofactura, c.idproveedor, p.razonsocial AS proveedor, c.idpersonal, concat(per.nombre, ' ', per.apellido) AS personal, c.idsucursal, suc.descripcion AS sucursal, c.idformapago, fp.descripcion AS formapago, c.idtipodocumento, td.descripcion AS tipodoc, c.iddeposito, d.descripcion AS deposito, date(c.fecha) as fecha, c.obs, c.monto \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal JOIN sucursales suc ON c.idsucursal = suc.idsucursal JOIN formas_pago fp ON c.idformapago = fp.idformapago JOIN tipo_documentos td ON c.idtipodocumento = td.idtipodocumento JOIN depositos d ON c.iddeposito = d.iddeposito \n WHERE idcompra = '$idcompra'\";\n return ejecutarConsultaSimpleFila($sql);\n }", "public function show($consulta)\n {\n //\n }", "private function f_ListarValidado(){\n $lobj_AccesoZona = new cls_AccesoZona;\n //creo la peticion\n $pet = array(\n 'operacion' => 'buscarZonas',\n 'codigo_usuario' => $_SESSION['Con']['Nombre']\n );\n //guardo los datos en el objeto y gestiono para obtener una respuesta\n $lobj_AccesoZona->setPeticion($pet);\n $zona = $lobj_AccesoZona->gestionar();\n $cadenaBusqueda = ' where codigo_zona in(';\n if($zona['success'] == 1){\n for($x = 0;$x < count($zona['registros']) - 1; $x++){\n $cadenaBusqueda .= $zona['registros'][$x].',';\n }\n $cadenaBusqueda .= $zona['registros'][count($zona['registros']) - 1].' ';\n }\n $cadenaBusqueda .= \") \";\n $cadenaBusqueda .= ($this->aa_Atributos['valor']=='')?'':\"and nombre_finca like '%\".$this->aa_Atributos['valor'].\"%'\";\n $ls_SqlBase=\"SELECT * FROM agronomia.vfinca $cadenaBusqueda\";\n $orden = ' order by codigo_productor,letra';\n $ls_Sql = $this->f_ArmarPaginacion($ls_SqlBase,$orden);\n $x=0;\n $la_respuesta=array();\n $this->f_Con();\n $lr_tabla=$this->f_Filtro($ls_Sql);\n while($la_registros=$this->f_Arreglo($lr_tabla)){\n $la_respuesta[$x]['codigo']=$la_registros['codigo_productor'];\n $la_respuesta[$x]['nombre']=$la_registros['codigo_productor'].'-'.$la_registros['letra'];\n $la_respuesta[$x]['id_finca']=$la_registros['id_finca'];\n $x++;\n }\n $this->f_Cierra($lr_tabla);\n $this->f_Des();\n $this->aa_Atributos['registros'] = $la_respuesta;\n $lb_Enc=($x == 0)?false:true;\n return $lb_Enc;\n }", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "public function graficados($dataSimulacro)\n {\n// print_r($dataSimulacro);\n \n// exit;\n // $consulta=$this->dbAdapter->query(\"select id , folio FROM usuarios where nombre = '\" . $dataUser['nombre'].\"' and correo = '\".$dataUser['correo']. \"'\" ,Adapter::QUERY_MODE_EXECUTE);\n $query =\"SELECT \n s.tiempo_estoy_listo,\n v.nombre\n FROM\n voluntario_simulacro_grupo s\n INNER JOIN\n voluntarioCreador v ON s.idvoluntario = v.id\n INNER JOIN\n (\n SELECT\n MIN(tiempo_estoy_listo) AS minimo,\n MAX(tiempo_estoy_listo) AS maximo\n FROM\n voluntario_simulacro_grupo\n WHERE\n idSimulacro = '\" . $dataSimulacro[0].\"'\n ) m ON s.tiempo_estoy_listo = m.minimo OR s.tiempo_estoy_listo = m.maximo AND s.idSimulacro = '\" . $dataSimulacro[0].\"'\";\n \n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n// print_r($res);exit;\n \n return $res;\n }", "function all2($cod_programa) {\n \n $sql = \"SELECT * FROM inasistencia_grupo_motivos\";\n \n return DB::query($sql);\n }", "function listarFormula(){\r\n\t\t$this->procedimiento='vef.ft_formula_v2_sel';\r\n\t\t$this->transaccion='VF_FORMULAV2_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_formula','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nombre','varchar');\r\n\t\t$this->captura('descripcion','text');\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_ai','int4');\r\n\t\t$this->captura('usuario_ai','varchar');\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('sw_autorizacion','varchar');\r\n\t\t$this->captura('regionales','varchar');\r\n\t\t$this->captura('nivel_permiso','varchar');\r\n\r\n\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 consultarCatalogGru() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('grupos');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Grupos</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>ID Grupo</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Salón</th>\n\t\t\t\t\t\t<th>Hora</th>\n\t\t\t\t\t\t<th>Periodo</th>\n\t\t\t\t\t\t<th>Carrera</th>\n\t\t\t\t\t\t<th>Tutor</th>\n\t\t\t\t\t\t<th>Editar</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t'<td>'.$row[1].'</td>'.\n \t'<td>'.$row[2].'</td>'.\n \t'<td>'.$row[3].'</td>'.\n \t'<td>'.$row[4].'</td>'.\n \t'<td>'.$row[5].'</td>';\n \t\n \tif(empty($row[6])) {\n \t\t$info .= '<td><span class=\"label error\">Sin Tutor</span></td>';\n \t\t}else{\n\t\t\t\t\t\t\t$info .= '<td><b>'.$row[6].' '.$row[7].' '.$row[8].'</b></td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$info .= '<td id=\"'.$row[0].'\"><span id=\"edit-grup\" style=\"cursor: pointer;\" class=\"label warning\"><i class=\"fa fa-gear fa-lg\"></i></span></td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function Catalogo()\n {\n \n try{\n $AccesoAdatos = new AD();\n $vlcScript = \"SELECT * \"\n . \" FROM fve_prod\";\n \n return $AccesoAdatos->RetornarResultado($vlcScript) ;\n } catch (Exception $ex) {\n \n echo $ERROR_MESSAGE; \n \n }\n \n }", "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nro_factura','int4');\r\n\t\t$this->captura('nombre_emisor','varchar');\t\t\r\n\t\t$this->captura('domicilio_emisor','varchar');\r\n\t\t$this->captura('nit_emisor','int4');\r\n\t\t$this->captura('nombre_cliente','varchar');\t\t\r\n\t\t$this->captura('domicilio_cliente','varchar');\r\n\t\t$this->captura('nit_cliente','int4');\r\n\t\t$this->captura('fecha_emision','date');\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\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function afficherAvis(){\r\n\t\t$sql=\"SElECT * From avis\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "function listarSolicitudModalidades()\r\n {\r\n $this->procedimiento = 'adq.f_solicitud_modalidades_sel';\r\n $this->transaccion = 'ADQ_SOLMODAL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_solicitud', 'int4');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('id_solicitud_ext', 'int4');\r\n $this->captura('presu_revertido', 'varchar');\r\n $this->captura('fecha_apro', 'date');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('id_funcionario_aprobador', 'int4');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('id_gestion', 'int4');\r\n $this->captura('tipo', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('justificacion', 'text');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('lugar_entrega', 'varchar');\r\n $this->captura('extendida', 'varchar');\r\n\r\n $this->captura('posibles_proveedores', 'text');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('comite_calificacion', 'text');\r\n $this->captura('id_categoria_compra', 'int4');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('fecha_soli', 'date');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n\r\n $this->captura('id_uo', 'integer');\r\n\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('desc_funcionario_apro', 'text');\r\n $this->captura('desc_uo', 'text');\r\n $this->captura('desc_gestion', 'integer');\r\n $this->captura('desc_moneda', 'varchar');\r\n $this->captura('desc_depto', 'varchar');\r\n $this->captura('desc_proceso_macro', 'varchar');\r\n $this->captura('desc_categoria_compra', 'varchar');\r\n $this->captura('id_proceso_macro', 'integer');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('desc_funcionario_rpc', 'text');\r\n $this->captura('obs', 'text');\r\n $this->captura('instruc_rpc', 'varchar');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('id_proveedor', 'integer');\r\n $this->captura('id_funcionario_supervisor', 'integer');\r\n $this->captura('desc_funcionario_supervisor', 'text');\r\n $this->captura('ai_habilitado', 'varchar');\r\n $this->captura('id_cargo_rpc', 'integer');\r\n $this->captura('id_cargo_rpc_ai', 'integer');\r\n $this->captura('tipo_concepto', 'varchar');\r\n $this->captura('revisado_asistente', 'varchar');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('dias_plazo_entrega', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('precontrato', 'varchar');\r\n $this->captura('update_enable', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('contador_estados', 'bigint');\r\n\r\n $this->captura('nro_po', 'varchar');\r\n $this->captura('fecha_po', 'date');\r\n\r\n $this->captura('importe_total', 'numeric');\r\n $this->captura('prioridad', 'varchar');\r\n $this->captura('id_prioridad', 'integer');\r\n $this->captura('list_proceso', 'integer[]');\r\n\r\n $this->captura('cuce', 'varchar');\r\n $this->captura('fecha_conclusion', 'date');\r\n $this->captura('presupuesto_aprobado', 'varchar');\r\n\r\n $this->captura('tipo_modalidad', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n //echo($this->consulta);exit;\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function consultar($filtro, $codigoModalidadAcademica = NULL) {\n $estudiantes = array();\n\n /* Modified Diego Rivera <[email protected]>\n * Se añade filtor 105(Admitido que no Ingreso) en S.codigosituacioncarreraestudiante NOT IN (100, 101, 102, 103, 108, 109, 112, 302, 400 ) \n * Since October 5,2017\n */\n $sql = \"\n SELECT DISTINCT\n P.idplanestudio,\n EG.idestudiantegeneral,\n E.codigoestudiante,\n CONCAT( EG.apellidosestudiantegeneral, ' ', EG.nombresestudiantegeneral ) AS Nombre,\n C.nombrecarrera,\n PR.semestreprematricula,\n PR.codigoestadoprematricula,\n C.codigocarrera,\n FG.FechaMaximaCumplimiento,\n MAX( PR.codigoperiodo ) AS codigoperiodo,\n FG.FechaGradoId,\n EG.EstadoActualizaDato,\n E.codigosituacioncarreraestudiante,\n FG.TipoGradoId \n FROM\n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN facultad F ON ( F.codigofacultad = C.codigofacultad )\n LEFT JOIN prematricula PR ON ( PR.codigoestudiante = E.codigoestudiante )\n LEFT JOIN detalleprematricula DP ON ( DP.idprematricula = PR.idprematricula )\n INNER JOIN planestudio P ON ( P.codigocarrera = C.codigocarrera )\n INNER JOIN planestudioestudiante PE ON ( PE.idplanestudio = P.idplanestudio AND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200 )\n INNER JOIN situacioncarreraestudiante S ON ( S.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera ) \n WHERE\n S.codigosituacioncarreraestudiante NOT IN ( 100, 101, 102, 103, 108, 109, 112, 302, 400, 105 ) \n AND (\n PR.semestreprematricula BETWEEN ( IF ( C.codigocarrera = 1186, P.cantidadsemestresplanestudio - 9, P.cantidadsemestresplanestudio - 3 ) ) \n AND P.cantidadsemestresplanestudio \n OR E.semestre = P.cantidadsemestresplanestudio \n ) \";\n\n if (empty($codigoModalidadAcademica) || $codigoModalidadAcademica == 200 || $codigoModalidadAcademica == 800) {\n $sql .= \" AND ( DP.codigoestadodetalleprematricula IN (10,30,20) OR DP.codigoestadodetalleprematricula IS NULL )\";\n }\n $sql .= $filtro;\n $sql .= \" AND E.codigoestudiante NOT IN ( \n SELECT\n R.codigoestudiante\n FROM \n registrograduado R\n WHERE\n R.codigoestudiante = E.codigoestudiante AND R.codigoestado = 100\n UNION\n SELECT \n RG.EstudianteId\n FROM \n RegistroGrado RG\n WHERE\n RG.EstudianteId = E.codigoestudiante AND RG.CodigoEstado = 100\";\n \n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 1) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON ( AC.AcuerdoActaId = DC.AcuerdoActaId )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante AND FGR.TipoGradoId = 2 AND DC.CodigoEstado = 100\";\n }\n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 2) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON (\n AC.AcuerdoActaId = DC.AcuerdoActaId\n )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante\n AND FGR.TipoGradoId = 1\n AND DC.CodigoEstado = 100\";\n }\n $sql .= \")\n GROUP BY E.codigoestudiante\n ORDER BY EG.apellidosestudiantegeneral ASC\";\n \n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n \n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setEstadoActualizaDato($this->persistencia->getParametro(\"EstadoActualizaDato\"));\n\n $situacionCarreraEstudiante = new SituacionCarreraEstudiante(null);\n $situacionCarreraEstudiante->setCodigoSituacion($this->persistencia->getParametro(\"codigosituacioncarreraestudiante\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setIdFechaGrado($this->persistencia->getParametro(\"FechaGradoId\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $tipoGrado = new TipoGrado(null);\n $tipoGrado->setIdTipoGrado($this->persistencia->getParametro(\"TipoGradoId\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n $fechaGrado->setTipoGrado($tipoGrado);\n\n $estudiante->setFechaGrado($fechaGrado);\n $estudiante->setSituacionCarreraEstudiante($situacionCarreraEstudiante);\n\n $preMatricula = new PreMatricula(null);\n $preMatricula->setSemestrePreMatricula($this->persistencia->getParametro(\"semestreprematricula\"));\n\n $periodo = new Periodo(null);\n $periodo->setCodigo($this->persistencia->getParametro(\"codigoperiodo\"));\n $preMatricula->setPeriodo($periodo);\n\n $estudiante->setPreMatricula($preMatricula);\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }", "function consultar()\n{\n global $conexao, $tipoServicos;\n\n $tipoServicos = $conexao->query(\"SELECT * FROM tipoServico\") or die($conexao->error);\n}", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function buscar_comprobante_doc_venta($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles,prosic_detalle_comprobante.importe_dolares*prosic_tipo_cambio.venta_financiero)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles*prosic_tipo_cambio.venta_financiero,prosic_detalle_comprobante.importe_dolares)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function listar_reacontrasignados_controlador(/*$privilegio,$codigo*/){\n\t\t\t\t\t\n\t\t\t\t\t$tabla=\"\";\n\t\t\t\t\t$consulta=\"SELECT *,T1.hardwareqr FROM hardware as T1, hardware_ingreso as T2, estado_info_hardware as T3, estado_asignacion_hardware as T4, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, informe_ingreso_hardware as T9, empleados as T10, cargo as T11, departemento as T12, empresa as T13 WHERE T1.hiserie=T2.hiserie AND T2.estadoinfoharcodigo=T3.estadoinfoharcodigo AND T3.estadoinfoharnombre='APROBADO' AND T2.estadoasigharcodigo=T4.estadoasigharcodigo AND T4.estadoasigharnombre='REASIGNADO' AND T2.tipohardwarecodigo=T5.tipohardwarecodigo AND T2.marcahardwarecodigo=T6.marcahardwarecodigo AND T2.modelohardwarecodigo=T7.modelohardwarecodigo AND T2.colorhardwarecodigo=T8.colorhardwarecodigo AND T2.icodigo=T9.icodigo AND T1.empleadocodigo=T10.empleadocodigo AND T10.cargocodigo=T11.cargocodigo AND T11.departamentocodigo=T12.departamentocodigo AND T12.empresacodigo=T13.empresacodigo\n\t\t\t\t\t\";\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>SERIE DEL HARDWARE</th>\n\t\t\t\t\t<th>CÓDIGO QR</th>\n\t\t\t\t\t<th>HARDWARE DE INGRESO</th>\n\t\t\t\t\t<th>MARCA DE HARDWARE</th>\n\t\t\t\t\t<th>MODELO DE HARDWARE</th>\n\t\t\t\t\t<th>COLOR DE HARDWARE</th>\n\t\t\t\t\t<th>FECHA DE INGRESO</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t<th>ACCIONES</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\t\t\t\t\t\n\t\t\t\t\t$contador=0;\n\t\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t\t$a=$rows['hardwareqr'];\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'.$contador.'</td>\n\t\t\t\t\t\t<td>'.$rows['hiserie'].'</td>\n\t\t\t\t\t\t<td>'.$a.'</td>\n\t\t\t\t\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['hifecha'].'</td>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'reasignadosinfo/\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$rows['hiserie'].'\" name=\"codigo\">\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"> Información</button>\n\t\t\t\t\t\t</form> \n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "public function ConsultarCambioEstados($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVACE($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['EstadoAnterior'],$fila['EstadoNuevo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "function listarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_sel';\n\t\t$this->transaccion='SNX_UDOC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_ucedifobracivil','int4');\n\t\t$this->captura('id_ucedifsubgrupo','int4');\n\t\t$this->captura('cantidadobracivil','numeric');\n\t\t$this->captura('id_obracivilmoe','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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');\t\t\n\t\t$this->captura('desc_obracivilmoe','varchar');\n\t\t$this->captura('unidad','varchar');\t\t\n\t\t$this->captura('valortotalrlp','numeric');\n\t\t$this->captura('valortotalrcb','numeric');\t\n\t\t$this->captura('valortotalrsc','numeric');\t\t\n\t\t$this->captura('preciounitariorlp','numeric');\n\t\t$this->captura('preciounitariorcb','numeric');\n\t\t$this->captura('preciounitariorsc','numeric');\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 consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function Afiliados(){\n\t\t\t$consult=oci_parse($conn,\"Ips$_sndCitas.fn_getAfiliados\");\n\t\t\toci_execute($consult);\n\t\t}", "public function Consultar()\n {\n $condicion = $this->obtenerCondicion();\n $sentenciaSql = \"SELECT \n d.id_detalle_orden\n ,d.valor_inventario\n ,d.valor_venta\n ,d.cantidad\n ,d.id_orden\n ,d.id_producto\n ,d.estado\n ,p.descripcion AS nombre_producto \n FROM \n detalle_orden AS d \n INNER JOIN producto AS p ON d.id_producto = p.id_producto \".$condicion;\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n return true;\n }", "function QueryExterna($IdFarmacia,$grupoTerapeutico, $medicina, $IdArea,$FechaInicio,$FechaFin,$IdEstablecimiento,$IdModalidad){\nif($grupoTerapeutico!=0){$comp=\"and mnt_grupoterapeutico.IdTerapeutico='$grupoTerapeutico'\";}else{$comp=\"\";}\nif($medicina!=0){$comp2=\"and farm_catalogoproductos.IdMedicina='$medicina'\";}else{$comp2=\"\";}\n\n\n$querySelect=\"select distinct farm_catalogoproductos.IdMedicina,Codigo,Nombre,Concentracion,FormaFarmaceutica, Presentacion\n\t\t\tfrom farm_catalogoproductos\n\t\t\tinner join mnt_grupoterapeutico\n\t\t\ton mnt_grupoterapeutico.IdTerapeutico=farm_catalogoproductos.IdTerapeutico\n\t\t\tinner join farm_medicinarecetada\n\t\t\ton farm_medicinarecetada.IdMedicina=farm_catalogoproductos.IdMedicina\n\t\t\tinner join farm_recetas\n\t\t\ton farm_recetas.IdReceta=farm_medicinarecetada.IdReceta\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tinner join farm_catalogoproductosxestablecimiento fcpe\n\t\t\t\ton fcpe.IdMedicina=farm_catalogoproductos.IdMedicina\n\n\t\t\t\n\t\t\twhere (farm_recetas.IdEstado='E' or farm_recetas.IdEstado='ER')\n\t\t\tand farm_recetas.IdAreaOrigen='$IdArea'\n\t\t\tand farm_recetas.IdFarmacia='$IdFarmacia'\n\t\t\tand Fecha between '$FechaInicio' and '$FechaFin'\n and farm_recetas.IdEstablecimiento=$IdEstablecimiento\n and farm_recetas.IdModalidad=$IdModalidad\n and fcpe.IdEstablecimiento=$IdEstablecimiento\n and fcpe.IdModalidad=$IdModalidad\n\t\t\t\".$comp.\"\n\t\t\t\".$comp2.\"\n\t\t\torder by farm_catalogoproductos.Codigo\";\n\n\n$resp=pg_query($querySelect);\nreturn($resp);\n}", "public function acessarRelatorios(){\n\n }", "public function consultar ($conexion){\r\n // PROCEDIMIENTO ALMACENADO \r\n $query=\"call consulta_acudiente()\";\r\n $consulta=mysqli_query($conexion, $query);\r\n return $consulta;\r\n }", "function consultarNotasDefinitivas() {\r\n \r\n $cadena_sql = $this->sql->cadena_sql(\"consultarEspaciosCursados\", $this->datosEstudiante['CODIGO']);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\"); \r\n \r\n return $resultado;\r\n \r\n }", "function listar($camposMostrar,$campo,$operador,$valor,$separador,$inicio,$fin)\n\t\t{\n\t\t\t$tablas=\"menciones*\".$this->tabla;\n\t\t\t$campos=\"en.mencion*en.apellidos*en.mencion\".$campo;\n\t\t\t$operadores=\"=*=*=\".$operador;\n\t\t\t$valores=\"me.id*\".$valor;\n\t\t\t$config=new config($tablas,$this->id,\"en.codigo*en.apellidos*en.nombres*en.maestria*me.nombre*en.anoEgreso*en.ofEnlace\",$campos,$operadores,$valores,\"AND*AND\",\"\",\"\",\"me*en\",$inicio,$fin);\n\t\t\t$config->enlazar();\n\t\t\t$a=$config->conn->crearConsultaMultiple();\n\t\t\treturn $a;\n\t\t}", "public function select(){\n\t\t$sql=\"SELECT PROGRA_ID,PROGRA_CODIGO, PROGRA_NOMBRE, PROGRA_EMAIL, PROGRA_USUADIGI, PROGRA_FECHDIGI, PROGRA_HORADIGI\n\t\t FROM programa\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function mafiliados_grilla($datos = array()) {\n $data = array();\n $rp = $datos['rp'];\n $data['page'] = $datos['page']; //numero de pagina\n $data['rp'] = $datos['rp']; //registros por pagina\n $qtype = $datos['qtype']; //campo de busqueda\n $query = $datos['query']; //dato introducido por el usuario\n \n if ($qtype=='afi.cdeno'){\n $query=strtoupper($query);\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype like '$query%'\" : '';\n }else{\n $busqueda = ($qtype != '' && $query != '') ? \"where $qtype = '$query'\" : '';\n }\n $registros = ($datos['page']-1) * $rp;\n $consulta = \"SELECT COUNT(*) as count FROM afiliados afi \" . $busqueda;\n $consulta = $this->db->query($consulta);\n if ($consulta==true){\n foreach ($consulta->result_array() as $row) {\n $total = $row['count'];\n }\n $data['total'] = $total;\n $consulta = \"SELECT afi.cdni,afi.cdeno,afi.ccuil,afi.cnuom,afi.cnume,COUNT(fam.*)::smallint as cfamilia FROM afiliados afi LEFT JOIN familiares fam ON fam.cdnititu=afi.cdni \". $busqueda . \" GROUP BY afi.ciden ORDER BY afi.cdeno limit \". $rp. \" offset \". $registros;\n $query = $this->db->query($consulta);\n $this->load->helper('manejacadena_helper');\n foreach ($query->result_array() as $row) {\n $new_row['dni'] = trim($row['cdni']);\n $new_row['deno'] = reemplazacaracter(trim($row['cdeno']));\n $new_row['cuil'] = trim($row['ccuil']);\n $new_row['nuom'] = trim($row['cnuom']);\n $new_row['nume'] = trim($row['cnume']);\n $new_row['familia'] = trim($row['cfamilia']);\n $data['rows'][] = array(\n 'id' => $new_row['dni'],\n 'cell' => array($new_row['dni'], $new_row['deno'],$new_row['nuom'],$new_row['nume'],\n $new_row['cuil'],$new_row['familia'])\n );\n }\n }\n echo json_encode($data);\n }", "public function mostrarEquipos(){\n return $resultado=$this->conexion->query(\"SELECT Nombre,Ciudad,Conferencia,Division FROM equipos\");\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 }", "public static function estadisticasDesignaciones($ciclo)\n {\n $sql =\"SELECT sed.abreviacion as Sede, car.nombre as Carrera\n , COUNT( DISTINCT per.idpersona) as total\n , COUNT( DISTINCT IF(per.idsexo = 1, per.idpersona, NULL)) as varones\n , COUNT( DISTINCT IF(per.idsexo = 2 , per.idpersona, NULL)) as mujeres\n , td.idtipodesignacion, ded.iddedicacion, td.descripcion as tipo_designacion\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=0, per.idpersona, NULL)) as NivelESinDefinir\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=1, per.idpersona, NULL)) as NivelEPrimario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=2, per.idpersona, NULL)) as NivelESecundario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=3, per.idpersona, NULL)) as NivelETerciario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=4, per.idpersona, NULL)) as NivelEUnivesitarioPreGr\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=5, per.idpersona, NULL)) as NivelEUniversitarioGr\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=6, per.idpersona, NULL)) as NivelEMaestria\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=7, per.idpersona, NULL)) as NivelEDoctorado\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=8, per.idpersona, NULL)) as NivelEEspecializacion\n , COUNT(DISTINCT IF(des.idtipodesignacion IN ( 1,7), des.iddesignacion, NULL)) as Profesor_Titular\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (2,8), des.iddesignacion, NULL)) as Profesor_Asociado\n , COUNT(DISTINCT IF(des.idtipodesignacion IN ( 3,9), des.iddesignacion, NULL)) as Profesor_Adjunto\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (4,10), des.iddesignacion, NULL)) as JTP\n , COUNT(DISTINCT IF(des.idtipodesignacion = 5, des.iddesignacion, NULL)) as Ayudante_Diplomado\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (6,12), des.iddesignacion, NULL)) as Ayudante_Alumno\n , COUNT(DISTINCT IF(des.idtipodesignacion = 11, des.iddesignacion, NULL)) as Auxiliar_Docente\n , COUNT(DISTINCT IF(des.idtipodesignacion = 13, des.iddesignacion, NULL)) as Profesor_Emerito\n , COUNT(DISTINCT IF(des.idtipodesignacion = 14, des.iddesignacion, NULL)) as Profesor_Honorario\n , COUNT(DISTINCT IF(des.idtipodesignacion = 15, des.iddesignacion, NULL)) as Profesor_Consulto\n , COUNT(DISTINCT IF(des.idtipodesignacion = 16, des.iddesignacion, NULL)) as Profesor_Invitado\n , COUNT(DISTINCT IF(des.iddedicacion = 1, des.iddesignacion, NULL)) as Sin_Dedicacion\n , COUNT(DISTINCT IF(des.iddedicacion = 2, des.iddesignacion, NULL)) as Dedicacion_Simple\n , COUNT(DISTINCT IF(des.iddedicacion = 3, des.iddesignacion, NULL)) as Dedicacion_Completa\n , COUNT(DISTINCT IF(des.iddedicacion = 4, des.iddesignacion, NULL)) as Dedicacion_Parcial\n , COUNT(DISTINCT IF(des.iddedicacion = 5, des.iddesignacion, NULL)) as Dedicacion_Semi_Exclusiva\n , COUNT(DISTINCT IF(des.iddedicacion = 6, des.iddesignacion, NULL)) as Dedicacion_Exclusiva\n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona\n LEFT JOIN (SELECT info.idestudio, info.idpersona, info.idnivelestudio FROM (SELECT e.idestudio, e.idpersona, e.idnivelestudio FROM estudios e JOIN niveles_estudios niv ON e.idnivelestudio= niv.idnivelestudio ORDER BY e.idpersona, niv.idordenimportancia DESC) as info GROUP BY info.idpersona) as maxnivelinfo ON per.idpersona = maxnivelinfo.idpersona\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra\n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera\n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion = cd.idcategoriadesignacion\n LEFT JOIN estudios est ON maxnivelinfo.idestudio = est.idestudio \n WHERE YEAR(des.inicio)= \".$ciclo.\" AND des.idestadodesignacion = 5\n GROUP BY sed.idsede, car.idcarrera;\";\n\n //echo $sql;exit;\n\n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n \n return $q;\n }", "function listarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n $this->setParametro('historico','historico','varchar');\n \n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo_entrega','varchar');\n\t\t$this->captura('fecha_coti','date');\n\t\t$this->captura('numero_oc','varchar');\n\t\t$this->captura('id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t\n\t\t$this->captura('fecha_entrega','date');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('fecha_venc','date');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('fecha_adju','date');\n\t\t$this->captura('nro_contrato','varchar');\n\t\t\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_estado_wf','integer');\n\t\t$this->captura('id_proceso_wf','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('tipo_cambio_conv','numeric');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('tiempo_entrega','varchar');\n\t\t$this->captura('funcionario_contacto','varchar');\n\t\t$this->captura('telefono_contacto','varchar');\n\t\t$this->captura('correo_contacto','varchar');\n\t\t$this->captura('prellenar_oferta','varchar');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('requiere_contrato','varchar');\n\t\t$this->captura('total_adjudicado','numeric');\n\t\t$this->captura('total_cotizado','numeric');\n\t\t$this->captura('total_adjudicado_mb','numeric');\n\t\t$this->captura('tiene_form500','varchar');\n\t\t$this->captura('correo_oc','varchar');\n\n\t\t$this->captura('id_gestion','int4');\n\n\t\t$this->captura('cuce','varchar');\n\t\t$this->captura('fecha_conclusion','date');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('justificacion','text');\n\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 m_consulta($p_query){\n\t\t$this->m_seleBD();\n\t\t//echo \"<br><br>funcion m_consulta: \". $p_query .\"<br><br>\";\n\t\t$this->a_resuConsulta = mysql_query($p_query);\n\t\t//echo \"<br><br>resuConsulta: \". $this->a_resuConsulta .\"<br><br>\";\n\t\t$this->a_mensError=mysql_error();\t// si no hay error, se asigna cadena vacía a a_error\n\t\tif($this->a_mensError > \"\"){\n\t\t\t$this->a_mensError .= \" -> \" .$p_query;\n\t\t\t$this->a_bandError = true;\n\t\t}else{\n\t\t\t$this->a_bandError = false;\n\t\t\t$this->a_numRegistros = mysql_num_rows($this->a_resuConsulta);\n\t\t}\n\t}", "public function consultarDadosAnexoIHtml($dados) {\n\n $ano = $dados['ano'];\n\n $campo = $dados['mes'];\n\n // $mes = $dados['mes'];\n switch ($dados['mes']) {\n case 'IMPO_VL_TOTAL_JAN':\n $mes = '01';\n break;\n case 'IMPO_VL_TOTAL_FEV':\n $mes = '02';\n break;\n case 'IMPO_VL_TOTAL_MAR':\n $mes = '03';\n break;\n case 'IMPO_VL_TOTAL_ABR':\n $mes = '04';\n break;\n case 'IMPO_VL_TOTAL_MAI':\n $mes = '05';\n break;\n case 'IMPO_VL_TOTAL_JUN':\n $mes = '06';\n break;\n case 'IMPO_VL_TOTAL_JUL':\n $mes = '07';\n break;\n case 'IMPO_VL_TOTAL_AGO':\n $mes = '08';\n break;\n case 'IMPO_VL_TOTAL_SET':\n $mes = '09';\n break;\n case 'IMPO_VL_TOTAL_OUT':\n $mes = '10';\n break;\n case 'IMPO_VL_TOTAL_NOV':\n $mes = '11';\n break;\n case 'IMPO_VL_TOTAL_DEZ':\n $mes = '12';\n break;\n }\n\n\n $tipo = $dados['tipo'];\n\n $ugMostrar = $dados['ug'] === false ? \"\" : \" AND IMPO_CD_UG = {$dados['ug']}\";\n\n if (!empty($tipo)) {\n $sqlTipo = \" AND IMPA_IC_TP_ARQUIVO = {$tipo} \";\n }\n \n $ugMostrar = $dados['ug'] === false ? \"\" : \" AND IMPO_CD_UG = {$dados['ug']}\";\n \n $sql = $this->retornaSqlRelatorio ( $tipo, $dados );\n\n \n \n \n/* $sql = \"\n\n\nSELECT ALIN_ID_ALINEA, INCI_ID_INCISO,ALIN_VL_ALINEA, ALIN_DS_ALINEA, INCI_VL_INCISO, INCI_DS_INCISO, \nUNGE_CD_UG, UNGE_SG_SECAO, UNGE_SG_UG, UNGE_DS_AUTORIDADE_MAXIMA, UNGE_DS_UG,\nSUM($campo) AS TOTAL\nFROM\n(SELECT C.ALIN_ID_ALINEA, D.INCI_ID_INCISO, C.ALIN_VL_ALINEA, C.ALIN_DS_ALINEA, D.INCI_VL_INCISO, D.INCI_DS_INCISO,\nUNGE_CD_UG, UNGE_SG_SECAO, UNGE_SG_UG, UNGE_DS_AUTORIDADE_MAXIMA, UNGE_DS_UG,\n A.$campo\n \n FROM CEO.CEO_TB_IMPO_IMPORTACAO A\n INNER JOIN CEO.CEO_TB_REGC_REGRA_CNJ B ON A.IMPO_IC_CATEGORIA = B.REGC_IC_CATEGORIA\n INNER JOIN CEO.CEO_TB_ALIN_ALINEA C ON B.REGC_ID_ALINEA = C.ALIN_ID_ALINEA\n INNER JOIN CEO.CEO_TB_INCI_INCISO D ON C.ALIN_ID_INCISO = D.INCI_ID_INCISO\n INNER JOIN CEO.CEO_TB_IMPA_IMPORTAR_ARQUIVO E ON A.IMPO_ID_IMPORT_ARQUIVO = E.IMPA_ID_IMPORT_ARQUIVO\n INNER JOIN CEO_TB_UNGE_UNIDADE_GESTORA UNGE ON A.IMPO_CD_UG = UNGE.UNGE_CD_UG \n \n WHERE \n 1= 1\n $sqlTipo\n AND A.$campo <> 0\n AND A.IMPO_ID_ALINEA IS NULL \n AND A.IMPO_ID_INCISO IS NULL\n $ugMostrar\n UNION\n SELECT C.ALIN_ID_ALINEA, D.INCI_ID_INCISO, C.ALIN_VL_ALINEA, C.ALIN_DS_ALINEA, D.INCI_VL_INCISO, D.INCI_DS_INCISO,\n UNGE_CD_UG, UNGE_SG_SECAO, UNGE_SG_UG, UNGE_DS_AUTORIDADE_MAXIMA, UNGE_DS_UG,\n A.$campo\n \n FROM CEO.CEO_TB_IMPO_IMPORTACAO A\n INNER JOIN CEO.CEO_TB_ALIN_ALINEA C ON C.ALIN_ID_ALINEA = A.IMPO_ID_ALINEA\n INNER JOIN CEO.CEO_TB_INCI_INCISO D ON D.INCI_ID_INCISO = A.IMPO_ID_INCISO\n INNER JOIN CEO.CEO_TB_IMPA_IMPORTAR_ARQUIVO E ON A.IMPO_ID_IMPORT_ARQUIVO = E.IMPA_ID_IMPORT_ARQUIVO\n INNER JOIN CEO_TB_UNGE_UNIDADE_GESTORA UNGE ON A.IMPO_CD_UG = UNGE.UNGE_CD_UG \n WHERE \n 1= 1\n $sqlTipo\n AND A.$campo <> 0\n $ugMostrar)\n GROUP BY ALIN_ID_ALINEA, INCI_ID_INCISO, ALIN_VL_ALINEA, ALIN_DS_ALINEA, INCI_VL_INCISO, INCI_DS_INCISO,UNGE_CD_UG, UNGE_SG_SECAO, UNGE_SG_UG, UNGE_DS_AUTORIDADE_MAXIMA, UNGE_DS_UG\n ORDER BY 1,3 \n \";\n*/\n\n\n $db = Zend_Db_Table::getDefaultAdapter();\n $retorno = $db->fetchAll($sql);\n\n return $retorno;\n }", "private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }", "function listarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_sel';\n\t\t$this->transaccion='SNX_HAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_herrajeaccesorio','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('herrajeaccesorio','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\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}" ]
[ "0.6942287", "0.6733404", "0.6662758", "0.6646386", "0.66270703", "0.6613926", "0.6568316", "0.65396035", "0.6521171", "0.6500633", "0.647779", "0.64602244", "0.64294916", "0.6425878", "0.64187217", "0.6413232", "0.64018667", "0.6383395", "0.63566506", "0.635061", "0.6348245", "0.63425004", "0.63390017", "0.63158697", "0.63122034", "0.6309378", "0.6291725", "0.62898743", "0.62733865", "0.62600195", "0.62520176", "0.62397313", "0.623194", "0.6230704", "0.62299794", "0.62289584", "0.6218035", "0.62122643", "0.6211746", "0.6205978", "0.62047756", "0.61990714", "0.61972535", "0.61965346", "0.6194378", "0.61940336", "0.6193167", "0.61877674", "0.6171885", "0.6167009", "0.6161814", "0.6157282", "0.61521107", "0.61466646", "0.6145756", "0.61430955", "0.6124526", "0.61227655", "0.61214274", "0.6117414", "0.61158574", "0.6115003", "0.61127925", "0.6102845", "0.6096488", "0.60941565", "0.6091258", "0.60871667", "0.6085822", "0.60838455", "0.6083634", "0.6075575", "0.6070554", "0.60692066", "0.60683626", "0.60657614", "0.6063115", "0.6060671", "0.605974", "0.6049134", "0.60448384", "0.60422283", "0.6036896", "0.6033061", "0.6030846", "0.602207", "0.6020171", "0.60144466", "0.6007543", "0.60041463", "0.5997475", "0.5987208", "0.5981366", "0.5977532", "0.59773433", "0.59758633", "0.5973391", "0.5966506", "0.5966129", "0.59646285" ]
0.6920164
1
Total de registros de SicasConsultaMedica
public function totalColecao(){ $oSicasConsultaMedicaBD = new SicasConsultaMedicaBD(); return $oSicasConsultaMedicaBD->totalColecao(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function totalRegistros();", "public function totalColecao(){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->totalColecao();\r\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function reporteMensualTotal(){\n\n }", "public function totcarte()\n {\n $detalle = FacturaDet::join('factura_cab', 'factura_cab.numfac', '=', 'factura_det.numfac')\n ->select(DB::raw('sum(cantserv*valserv) as total'))\n ->where('factura_cab.estfac','<>','0')\n ->where('factura_cab.estfac','<>','1')\n ->first();\n $total=$detalle->total+0;\n $pagos = Pago::select(DB::raw('sum(valpago) as total'))\n ->first();\n if($pagos)\n $pagado = $pagos->total;\n else\n $pagado=0;\n $total = $total - $pagado;\n return $total;\n }", "public static function ctrSumaTotalEgresos()\n {\n\n $tabla = \"finanzas\";\n\n $respuesta = ModeloFinanzas::mdlSumaTotalEgresos($tabla);\n\n return $respuesta;\n\n }", "public function getTotal();", "public function getTotal();", "static public function ctrSumaTotalVentas(){\n\n\t\t$tabla = \"ventas\";\n\n\t\t$respuesta = ModeloVentas::mdlSumaTotalVentas($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "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 ctrSumaTotalVentas(){\n\n\t\t$tabla = \"ventas\";\n\n\t\t$respuesta = ModeloVentas::mdlSumaTotalVentas($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "public function getMaduracionTotal(){\n \n $q = Doctrine_Query::create();\n $q->select('SUM(cantidad_actual) as suma');\n $q->from('Lote');\n $q->where('producto_id = ?', $this->getId());\n $q->andWhere('accion = \"En Maduración\"');\n $cantidad = $q->fetchOne();\n if($cantidad->getSuma() != 0){\n return $cantidad->getSuma();\n }\n else{\n return 0;\n }\n \n }", "public function total();", "public function total();", "public function total();", "function totalboaralla(){\n\n\t$crud = new CRUD();\n\t$crud->disconnect();\n\n\t$crud -> sql(\"select SUM(native_boar) as totalboaralla from farmers_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['totalboaralla'];\n\t}\n\t$crud->disconnect();\n}", "public function totalMes(){\n //$conexao = $c->conexao();\n\n $sql = \" SELECT ifnull(sum(c.valor+c.troco),0) as total from tbpedido_pagamento c WHERE MONTH(c.data_pagamento) = MONTH(now()) and c.status = 'F';\";\n $rstotal = $this->conexao->query($sql);\n $result = $rstotal->fetch_assoc();\n $totalgeral = $result['total'];\n\n return $totalgeral;\n }", "public static function GetTotalVendas(){\n self::$results = self::query(\"SELECT sum(vlTotal) from tbComanda\");\n if (is_array(self::$results) || is_object(self::$results)){\n foreach(self::$results as $result){\n $result[0] = str_replace('.', ',', $result[0]);\n array_push(self::$resultRetorno, $result);\n return $result[0];\n }\n }\n return 0;\n }", "public function formulas_TotalAplicarFiltrosFormulas($fechaInicial, $fechaFinal, $usuarios, $idMedicamento, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idMedicamento != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_medicamentosFormula AS MF ON MF.idFormula = F.idFormula\n\t\t\t\t\t\t\t\t INNER JOIN tb_listadoMedicamentos AS ME ON ME.idMedicamento = MF.idMedicamento\n\t\t\t\t\t\t\t\t WHERE ME.idMedicamento = '$idMedicamento' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND F.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( F.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND F.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(F.idFormula) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_formulas AS F\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON F.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = F.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = F.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$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['totalRegistros'];\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\t\t\t\n }", "public function numTotalDeRegistros(){\r\n return $this->numTotalDeRegistros;\r\n }", "static public function mdlSumaTotales($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n\t$campo=\"id_caja\";\n\t$rsp=array();\n\t\n\t$ventas=self::mdlSumaTotalVentas($tabla, $item, $valor, $cerrado, $fechacutvta);\n\t$ventasgral=$ventas[\"sinpromo\"]>0?$ventas[\"sinpromo\"]:0;\n\t$ventaspromo=$ventas[\"promo\"]>0?$ventas[\"promo\"]:0;\n\t$sumaventasgral=$ventasgral+$ventaspromo;\n\t//array_push($rsp, \"ventasgral\", $sumaventasgral);\n\t$rsp[\"ventasgral\"]=$sumaventasgral; // Se crea la key \n\n\t$vtaEnv = self::mdlSumTotVtasEnv($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasenvases=$vtaEnv[\"total\"]>0?$vtaEnv[\"total\"]:0;\n\t//array_push($rsp, \"ventasenvases\", $ventasenvases);\n\t$rsp[\"ventasenvases\"]=$ventasenvases; // Se crea la key \n\n\t$vtaServ = self::mdlSumTotVtasServ($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasservicios=$vtaServ[\"total\"]>0?$vtaServ[\"total\"]:0;\n\t//array_push($rsp, \"ventaservicios\", $ventasservicios);\n\t$rsp[\"ventaservicios\"]=$ventasservicios; // Se crea la key \n\t\t\t\t\t \n\t$ventasaba=self::mdlSumTotVtasOtros($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventasgralaba=$ventasaba[\"sinpromo\"]>0?$ventasaba[\"sinpromo\"]:0;\n\t$ventaspromoaba=$ventasaba[\"promo\"]>0?$ventasaba[\"promo\"]:0;\n\t$ventasabarrotes=$ventasgralaba+$ventaspromoaba;\n\t//array_push($rsp, \"ventasabarrotes\", $ventasabarrotes);\n\t$rsp[\"ventasabarrotes\"]=$ventasabarrotes; // Se crea la key \n\n\t$vtaCred = self::mdlSumTotVtasCred($tabla, $item, $valor, $cerrado,$fechacutvta);\n\t$ventascredito=$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]>0?$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]:0;\n\t//array_push($rsp, \"ventascredito\", $ventascredito);\n\t$rsp[\"ventascredito\"]=$ventascredito; // Se crea la key \n\n\t$totingyegr=self::mdlTotalingresoegreso($campo, $valor, $cerrado, $fechacutvta);\n\t$ingresodia=$totingyegr[\"monto_ingreso\"]>0?$totingyegr[\"monto_ingreso\"]:0;\n\t//array_push($rsp, \"ingresodia\", $ingresodia);\n\t$rsp[\"ingresodia\"]=$ingresodia; // Se crea la key \n\t$egresodia=$totingyegr[\"monto_egreso\"]>0?$totingyegr[\"monto_egreso\"]:0;\n\t//array_push($rsp, \"egresodia\", $egresodia);\n\t$rsp[\"egresodia\"]=$egresodia; // Se crea la key \n\n\t$totVentaDia=$ventasgral+$ventaspromo+$ventasenvases+$ventasservicios+$ventasgralaba+$ventaspromoaba+$ventascredito;\n\t//array_push($rsp, \"totalventadia\", $totVentaDia);\n\t$rsp[\"totalventadia\"]=$totVentaDia; // Se crea la key \n\n\treturn $rsp;\n \n}", "public function totalColecao(){\r\n\t\t$oSicasSalarioMinimoBD = new SicasSalarioMinimoBD();\r\n\t\treturn $oSicasSalarioMinimoBD->totalColecao();\r\n\t}", "function ObtenerTotales($id_factura) {\n $query=\"SELECT SUM(total) total, SUM(valorseguro) total_seguro\nFROM \".Guia::$table.\" WHERE idfactura=$id_factura\";\n return DBManager::execute($query);\n }", "function ventas_totales(){\n\t\tglobal $link;\n\t\n\t\t$sql =\"SELECT SUM(importe) FROM consumos\";\n\t\t$query = mysqli_query($link,$sql);\n\t\t$total = mysqli_fetch_assoc($query);\n\t\t\n\t\treturn $total[\"SUM(importe)\"];\n}", "public function prixtotal(){\r\n\t\t\t\trequire(\"connexiondatabase.php\");\r\n\t\t/*on fait ici une somme des différent object commandé et on reourne*/\r\n\t\t$prixtotal=0;\r\n\t\t//on recupere les id des produis sélectionner pour faire la requette\r\n\t\t$ids = array_keys($_SESSION['panier']);\r\n\t\tif (empty($ids)) {//si les id sont vide, \r\n\t\t\t$produits=array(); // \r\n\t\t}else{\r\n\r\n\t\t$produits = $connexion->prepare('SELECT id, prix FROM produits WHERE id IN ('.implode(',' ,$ids).')');\r\n\t\t$produits->execute();\r\n\t\t}\r\n\r\n\t\twhile ($produit=$produits->fetch(PDO::FETCH_OBJ)){\r\n\t\t\t$prixtotal +=$produit->prix*$_SESSION['panier'][$produit->id];\r\n\t\t}\r\n\t\treturn $prixtotal;\r\n\t}", "public function calcularCosto(){\n $detalles = DetalleOrden::where('codOrden','=',$this->codOrden)->get();\n $sumaTotal = 0;\n foreach ($detalles as $x) {\n $sumaTotal = $sumaTotal + ($x->precio*$x->cantidad);\n }\n\n return $sumaTotal;\n\n }", "public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}", "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}", "function getCreditosComprometidos(){ return $this->getOEstats()->getTotalCreditosSaldo(); }", "public function getTotalHt()\n {\n\n $conn = $this->getEntityManager()->getConnection();\n $sql = \"SELECT SUM(ht) AS total\n FROM cmdrobydelaiacceptereporte\n WHERE cmdrobydelaiacceptereporte.statut <> 'Terminé'\n \";\n $stmt = $conn->prepare($sql);\n $resultSet = $stmt->executeQuery();\n return $resultSet->fetchOne();\n }", "public function total_reservas_sala_mes($fecha) // reservas sin eliminar // //PDF\n {\n\n $q_string = \"select sala, count(sala) as cant from reservas where month(fecha) = month('\".$fecha.\"') and eliminada ='0' and estado ='1' group by sala\";\n //select sala, count(sala) as cant\n //from reservas where month(fecha) ='6' and eliminada ='0' and estado ='1'\n //group by sala\n\t \t $data = $this->db->query($q_string);\n\t\t return $data;\n\t}", "public function totalSeccional()\n {\n return $this->total_mes_1 + $this->total_mes_2 + $this->total_mes_3;\n }", "public function getTotal() {\n\n }", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, sum(b.no_dias) as no_dias,count(substr(b.fecha_inicio,1,4)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,4)\n ORDER BY substr(b.fecha_inicio,1,4)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$ano]= $cantidad;\n }\n }\n }", "public function getTotalSubeixoRodovias(){\n\t\t$total = 0;\n\t\t$i=0;\n\t\twhile($i<count($this->result)){\n\t\t\tif($this->result[$i]->idn_digs == 1000)\n\t\t\t\t$total++;\n\t\t\t$i++;\n\t\t}\n\t\treturn $total;\n\t}", "function sumar_trimestral_programado($sql){\r\n\t\t$query=new Consulta($sql);\r\n\t\t$num=$query->numregistros();\r\n\t\t\twhile($row=$query->ConsultaVerRegistro()){\r\n\t\t\t//$id_trimestre\r\n\t\t\t$id=$row[id_mes];\r\n\t\t\t\tif($row[total_monto]>0){\r\n\t\t\t\t\t$trimestre[0]=$trimestre[0]+$row[total_monto];\r\n\t\t\t\t\t $Dtrim=DevValTrimestre($id,$row[total_monto]);\r\n\t\t\t\t\t $idtrim=$Dtrim['trimestre'];\r\n\t\t\t\t\t $vartrim=$Dtrim['valor'];\r\n\t\t\t\t\t$trimestre[$idtrim]=$trimestre[$idtrim]+$vartrim;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t}\r\n\t\treturn $trimestre;\r\n\t}", "public function getSumas() {\n $aVot = $this->votos;\n $aCoe = $this->coeficientes;\n \n $asis = 0; $vots = 0; $votn = 0; $pres = 0;\n $opc1 = 0; $opc2 = 0; $opc3 = 0; $opc4 = 0;\n $urb1 = 0; $urb2 = 0; $urb3 = 0; $urb4 = 0;\n $fas1 = 0; $fas2 = 0; $fas3 = 0; $fas4 = 0;\n $blo1 = 0; $blo2 = 0; $blo3 = 0; $blo4 = 0;\n \n foreach ($aVot as $apa => $aDat) {\n $asis += ($aDat[0] == 'S') ? 1 : 0;\n $vots += ($aDat[1] == 'S') ? 1 : 0;\n $votn += ($aDat[1] == 'S') ? 0 : 1;\n $pres += ($aDat[2] == 'S') ? 1 : 0;\n \n $opc1 += ($aDat[3] == 'S') ? 1 : 0;\n $opc2 += ($aDat[4] == 'S') ? 1 : 0;\n $opc3 += ($aDat[5] == 'S') ? 1 : 0;\n $opc4 += ($aDat[6] == 'S') ? 1 : 0;\n \n $urb1 += ($aDat[3] == 'S') ? $aCoe[$apa][0] : 0;\n $urb2 += ($aDat[4] == 'S') ? $aCoe[$apa][0] : 0;\n $urb3 += ($aDat[5] == 'S') ? $aCoe[$apa][0] : 0;\n $urb4 += ($aDat[6] == 'S') ? $aCoe[$apa][0] : 0;\n \n $fas1 += ($aDat[3] == 'S') ? $aCoe[$apa][1] : 0;\n $fas2 += ($aDat[4] == 'S') ? $aCoe[$apa][1] : 0;\n $fas3 += ($aDat[5] == 'S') ? $aCoe[$apa][1] : 0;\n $fas4 += ($aDat[6] == 'S') ? $aCoe[$apa][1] : 0;\n \n $blo1 += ($aDat[3] == 'S') ? $aCoe[$apa][2] : 0;\n $blo2 += ($aDat[4] == 'S') ? $aCoe[$apa][2] : 0;\n $blo3 += ($aDat[5] == 'S') ? $aCoe[$apa][2] : 0;\n $blo4 += ($aDat[6] == 'S') ? $aCoe[$apa][2] : 0;\n }\n $aSumas['asis'] = array($asis, $vots, $votn, $pres);\n $aSumas['opci'] = array($opc1, $opc2, $opc3, $opc4);\n $aSumas['urba'] = array($urb1, $urb2, $urb3, $urb4);\n $aSumas['fase'] = array($fas1, $fas2, $fas3, $fas4);\n $aSumas['bloq'] = array($blo1, $blo2, $blo3, $blo4);\n \n return $aSumas;\n }", "public function getSumas() {\n $aDatos = $this->getAsistentes();\n $aAsi = array();\n $aPer = array();\n $aRep = array();\n $prop = 0;\n $repr = 0;\n $vosp = 0;\n $vonp = 0;\n $vosr = 0;\n $vonr = 0;\n $cofp = 0;\n $cofr = 0;\n \n foreach ($aDatos as $aAsistente) {\n if($aAsistente[3] == 'S') {\n // Representante.\n $repr++; // Numero de respresentantes.\n $aRep[$aAsistente[1]] = $aAsistente[1]; // Para el numero de respresentantes diferentes.\n $vosr += ($aAsistente[4] == 'S') ? 1 : 0; // Representantes con voto.\n $vonr += ($aAsistente[4] == 'N') ? 1 : 0; // Representantes sin voto.\n $cofr += $aAsistente[5]; // Coeficiente fase.\n } else {\n // Propietario.\n $prop++;\n $aPer[$aAsistente[1]] = $aAsistente[1]; // Para el numero de propietarios diferentes.\n $vosp += ($aAsistente[4] == 'S') ? 1 : 0; // Propietarios con voto.\n $vonp += ($aAsistente[4] == 'N') ? 1 : 0; // Propietarios sin voto.\n $cofp += $aAsistente[5]; // Coeficiente fase.\n }\n }\n $aAsi['prop'] = array($prop, count($aPer), $vosp, $vonp, $cofp);\n $aAsi['repr'] = array($repr, count($aRep), $vosr, $vonr, $cofr);\n return $aAsi;\n }", "static public function mdlTotalingresoegreso($item, $valor, $cerrado, $id_fecha){\n\n\tif($id_fecha!=null){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT ing.monto_ingreso, egr.monto_egreso FROM \n\t\t(SELECT SUM(importe_ingreso) AS monto_ingreso FROM ingresos WHERE fecha_ingreso='\".$id_fecha.\"' AND $item = :$item AND id_corte=:id_corte) ing \n\t\tCROSS JOIN \n\t\t(SELECT SUM(importe_egreso) AS monto_egreso FROM egresos WHERE fecha_egreso='\".$id_fecha.\"' AND $item = :$item AND id_corte=:id_corte) egr\"); \n\n\t\t$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_INT);\n\t\t$stmt -> bindParam(\":id_corte\", $cerrado, PDO::PARAM_INT);\n\t\t$stmt -> execute();\n\t\t\n\t\t\treturn $stmt -> fetch();\n\n\n\t\t$stmt = null;\n\t}else{\n\t\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT ing.monto_ingreso, egr.monto_egreso FROM \n\t\t(SELECT SUM(importe_ingreso) AS monto_ingreso FROM ingresos WHERE fecha_ingreso=curdate() AND $item = :$item AND id_corte=:id_corte) ing \n\t\tCROSS JOIN \n\t\t(SELECT SUM(importe_egreso) AS monto_egreso FROM egresos WHERE fecha_egreso=curdate() AND $item = :$item AND id_corte=:id_corte) egr\"); \n\n\t\t$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_INT);\n\t\t$stmt -> bindParam(\":id_corte\", $cerrado, PDO::PARAM_INT);\n\t\t$stmt -> execute();\n\t\t\n\t\t\treturn $stmt -> fetch();\n\n\n\t\t$stmt = null;\n\t}\n}", "public function SumarCarteraCreditos() \n{\n\tself::SetNames();\n\t$sql = \"select\n(select SUM(totalpago) from ventas WHERE tipopagove = 'CREDITO') as totaldebe,\n(select SUM(montoabono) from abonoscreditos) as totalabono\";\n//$sql =\"SELECT SUM(ventas.totalpago) as totaldebe, SUM(abonoscreditos.montoabono) FROM ventas, abonoscreditos WHERE ventas.tipopagove = 'CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getValorTotal(){\n $sum = 0;\n foreach($this->itens as $i):\n $sum += $i->getPreco() * $i->getQuantidade();\n endforeach;\n\n return $sum;\n }", "public function totalRecord(){\n\t\t\t//lay bien ket noi csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc thi truy van\n\t\t\t$query = $conn->query(\"select * from work inner join content_time on work.id=content_time.fk_work_id inner join work_time on work_time.id=content_time.fk_worktime_id\");\n\t\t\t//tra ve tong so luong ban ghi\n\t\t\treturn $query->rowCount();\n\t\t}", "public function get_total()\n {\n }", "public function getTotal(){\n $cantidad = $this->cantidad;\n\t\treturn $this->productos\n\t\t\t\t\t\t->map(function($prod){return $prod->precio;})\n\t\t\t\t\t\t->reduce(function($acum, $elem)use($cantidad){\n return $acum + ($elem * $cantidad);\n });\n\t}", "function totale_retegas_netto(){\r\nglobal $db;\r\n$qry = \"SELECT\r\nSum(retegas_dettaglio_ordini.qta_arr*retegas_articoli.prezzo)\r\nFROM\r\nretegas_dettaglio_ordini\r\nInner Join retegas_articoli ON retegas_dettaglio_ordini.id_articoli = retegas_articoli.id_articoli\";\r\n \r\n$res = $db->sql_query($qry);\r\n$row = $db->sql_fetchrow($res);\r\n\r\nreturn (int) $row[0]; \r\n \r\n}", "function getForResumenTotGen($contrato){\n\t\t\t$tipos = array(\n\t\t\t\t0=>\"CE\",\n\t\t\t\t1=>\"DS\",\n\t\t\t\t2=>\"Q\",\n\t\t\t\t3=>\"AB\",\n\t\t\t\t4=>\"DM\",\n\t\t\t\t5=>\"M\",\n\t\t\t\t6=>\"R\",\n\t\t\t\t7=>\"D\",\n\t\t\t\t8=>\"P\",\n\t\t\t\t9=>\"PA\",\n\t\t\t\t10=>\"EL\",\n\t\t\t\t11=>\"S\",\n\t\t\t\t12=>\"CI\",\n\t\t\t\t13=>\"IP\",\n\t\t\t\t14=>\"IA\",\n\t\t\t\t15=>\"DI\",\n\t\t\t\t16=>\"IPA\",\n\t\t\t\t17=>\"E\",\n\t\t\t\t18=>\"RE\",\n\t\t\t\t19=>\"C\",\n\t\t\t\t20=>\"L\",\n\t\t\t\t21=>\"LA\",\n\t\t\t\t22=>\"I\",\n\t\t\t\t23=>\"IL\",\n\t\t\t\t24=>\"DL\",\n\t\t\t\t25=>\"DE\",\n\t\t\t\t26=>\"CB\",\n\t\t\t\t27=>\"CA\"\n\t\t\t\t);\n\t\t\t$respuesta = array();\n\t\t\tforeach ($tipos as $value) {\n\t\t\t\t$sql = \"select count(*) as total from $this->tabla \n\t\t\t\t\t\tjoin referencias\n\t\t\t\t\t\t\ton referencias.id_referencia = $this->tabla.id_referencia\n\t\t\t\t\t\tjoin areas\n\t\t\t\t\t\t\ton areas.id_area = referencias.id_area\n\t\t\t\t\t\tjoin disciplinas\n\t\t\t\t\t\t\ton disciplinas.id_disciplina = areas.id_disciplina\n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t$this->tabla.tipo_discontinuidad = '\".$value.\"' \n\t\t\t\t\t\t\tand disciplinas.id_contrato=\".$contrato.\"\n\t\t\t\t\";\n\t\t\t\t//echo $sql ;\n\t\t\t\t//echo \"<br><br>\";\n\n\t\t\t\t$resultado = $this->conexion->query($sql);\n\t\t\t\t//echo $sql ;\n\t\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t\t$row=$resultado->fetch_assoc() ;\n\t\t\t\t\tif($row['total']>0){\n\t\t\t\t\t\t$respuesta[$value] = $row['total'] ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn json_encode($respuesta) ;\n\t\t}", "public function consultas_TotalAplicarFiltrosConsultas($fechaInicial, $fechaFinal, $usuarios, $idDxConsulta, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idConsulta != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_consultas_diagnosticos AS DC ON DC.idConsulta = C.idConsulta\n\t\t\t\t\t\t\t\t INNER JOIN tb_panelDiagnosticoConsulta AS PCD ON PCD.idPanelDiagnosticoConsulta = DC.idPanelDiagnosticoConsulta\n\t\t\t\t\t\t\t\t WHERE PCD.idPanelDiagnosticoConsulta = '$idDxConsulta' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND C.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(C.idConsulta) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_consultas AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t \tLEFT JOIN\n\t\t\t\t\t\t tb_examenFisico AS EF ON EF.idConsulta = C.idConsulta\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\";\n\t\t\t\t\t\t\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['totalRegistros'];\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\t\t\t\n }", "abstract public function countTotal();", "public function totalDia(){\n //$conexao = $c->conexao();\n\n $sql = \" SELECT ifnull(sum(c.valor),0) as total, ifnull(sum(c.troco),0) as troco from tbpedido_pagamento c WHERE DAY(c.data_pagamento) = DAY(now()) and c.status = 'F';\";\n $rstotal = $this->conexao->query($sql);\n $result = $rstotal->fetch_array();\n $totalvendas = $result['total'];\n $totaltroco = $result['troco'];\n\n $total = array(\n 'totalvendas' => '',\n 'totaltroco' => '',\n );\n\n $total['totalvendas'] = $totalvendas;\n $total['totaltroco'] = $totaltroco;\n\n //print_r($total);\n return $total;\n\n }", "public function ctrMostrarTotalProducto(){\n\n\n\n\t$tabla = 'productos';\n\n\n\n\t$respuesta = ModeloProducto::mdlMostrarTotalProducto($tabla);\n\n\n\n\treturn $respuesta;\n\n\n\n\t}", "public function desparasitantes_TotalAplicarFiltrosDesparasitantes($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idDesparasitante, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idDesparasitante != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND D.idDesparasitante = '$idDesparasitante' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( D.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( D.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND D.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(D.idDesparasitanteMascota) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_desparasitantesMascotas AS D\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON D.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_desparasitantes AS DD ON DD.idDesparasitante = D.idDesparasitante\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$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['totalRegistros'];\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\t\t\t\n }", "public function cesta_con_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}", "static public function mdlSumaTotalIngresos($tabla){\t\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(total) as total FROM $tabla WHERE banco = 'MercadoPago'\" );\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "public function totCadastrosMes(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT ifnull(count(*),0) as total FROM tbclientes a WHERE MONTH(a.data_cadastro) = Month(now());\";\n $rsclimes = $this->conexao->query($sql);\n $result = $rsclimes->fetch_array();\n $rstotclimes = $result['total'];\n\n return $rstotclimes;\n }", "function cocinar_pago_total() {\n\t\tglobal $bd;\n\t\tglobal $x_idpedido;\n\t\tglobal $x_idcliente;\n\t\t\n\t\t\n\t\t$x_array_pedido_header = $_POST['p_header'];\n\t\t$x_array_tipo_pago = $_POST['p_tipo_pago'];\n\t\t$x_array_subtotales=$_POST['p_subtotales'];\n\t\t$x_array_comprobante=$_POST['p_comprobante'];\n\t\t\n\t\t$id_pedido = $x_idpedido ? $x_idpedido : $x_array_pedido_header['idPedidoSeleccionados'];\n\n\t\t$tipo_consumo = $x_array_pedido_header['tipo_consumo'];\n\t\t$idc=$x_array_pedido_header['idclie'] == ''? ($x_idcliente == '' ? 0 : $x_idcliente) : $x_array_pedido_header['idclie'];\n\t\t// $tt=$x_array_pedido_header['ImporteTotal'];\n\t\t\n\n\t\t// subtotales\n\t\t$sql_subtotales = '';\n\t\t$importe_total=0; // la primera fila es subtotal o total si no hay adicionales\n\t\t$importe_subtotal = $x_array_subtotales[0]['importe'];\n\t\tforeach ( $x_array_subtotales as $sub_total ) {\n\t\t\t$tachado = $sub_total['tachado'] === \"true\" ? 1 : 0; \n\t\t\t$importe_row = $tachado === 1 ? $sub_total['importe_tachado'] : $sub_total['importe'];\n\t\t\t$importe_total = $sub_total['importe'];\n\t\t\t$sql_subtotales = $sql_subtotales.\"(?,\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",'\".$sub_total['descripcion'].\"','\".$importe_row.\"',\".$tachado.\"),\";\t\t\t\n\t\t}\n\n\t\t/// buscamos el ultimo correlativo\n\t\t/// buscamos el ultimo correlativo\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select correlativo + 1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\t\t\n\t\t\t\n\t\t\t// if ($x_array_comprobante['codsunat'] == \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t$sqlrp=\"insert into registro_pago(idorg,idsede,idusuario,idcliente,fecha,total,idtipo_consumo, idtipo_comprobante_serie, correlativo) values (\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",\".$_SESSION['idusuario'].\",\".$idc.\",DATE_FORMAT(now(),'%d/%m/%Y %H:%i:%s'),'\".$importe_total.\"',\".$tipo_consumo.\",\".$idtipo_comprobante_serie.\",'\".$correlativo_comprobante.\"');\";\n\t\t$idregistro_pago=$bd->xConsulta_UltimoId($sqlrp);\n\t\t\n\n \n //registro tipo de pago // efectivo / tarjeta / etc\n $cadena_tp='';\n foreach($x_array_tipo_pago as $item){\n $cadena_tp=$cadena_tp.\"(\".$idregistro_pago.\",\".$item['id'].\",'\".$item['importe'].\"'),\";\n }\n\n $cadena_tp=substr($cadena_tp,0,-1);\n\t\t$cadena_tp=\"insert into registro_pago_detalle (idregistro_pago,idtipo_pago,importe) values \".$cadena_tp.\"; \";\n\t\t\n // registro pago pedido - detalle\n\t\t$sql_idpd=\"select idpedido,idpedido_detalle, cantidad,ptotal from pedido_detalle where idpedido in (\".$id_pedido.\") and (estado=0 and pagado=0)\";\n\t\t$rows_pedido_detalle=$bd->xConsulta2($sql_idpd);\n\t\t$sql_pago_pedido='';\n\t\t//echo $sql_idpd;\n\t\tforeach($rows_pedido_detalle as $fila){ // sacamos el idpedido_detalle y los demas datos\n\t\t\t$sql_pago_pedido=$sql_pago_pedido.\"(\".$idregistro_pago.\",\".$fila['idpedido'].\",\".$fila['idpedido_detalle'].\",'\".$fila['cantidad'].\"','\".$fila['ptotal'].\"'),\";\n }\n \n $sql_pago_pedido=substr($sql_pago_pedido,0,-1);\n $sql_pago_pedido='insert into registro_pago_pedido(idregistro_pago,idpedido,idpedido_detalle,cantidad,total) values '.$sql_pago_pedido.'; ';\n\t\t\n\t\t// subtotal // primero se obtiene $idregistro_pago\n\t\t$sql_subtotales = str_replace(\"?\", $idregistro_pago, $sql_subtotales);\n\t\t$sql_subtotales = substr($sql_subtotales,0,-1);\n\t\t$sql_subtotales = 'insert into registro_pago_subtotal (idregistro_pago,idorg,idsede,descripcion,importe,tachado) values '.$sql_subtotales.'; '; \n\t\n\n\t\t// comprobante de pago | datos\n\t\t// $sql_devolver_correlativo = \"update tipo_comprobante_serie set correlativo=correlativo+1 where (idrog=\".$_SESSION['ido'].\" and idsede=\".$_SESSION['ido'].\") and idtipo_comprobante=\".$x_array_comprobante['idtipo_comprobante'].\" and estado=0;\";\n\n\n\t\t// echo $sql_pago_pedido;\n $bd->xConsulta_NoReturn($sql_pago_pedido);\n\t\t$bd->xConsulta_NoReturn($cadena_tp);\n\t\t$bd->xConsulta_NoReturn($sql_subtotales);\n\t\t\n\t\t// print $correlativo_comprobante.\"|\";\n\n\t\t// $x_respuesta->b = $correlativo_comprobante;\n\t\t// $x_respuesta = ['correlativo_comprobante' => $correlativo_comprobante];\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante, 'idregistro_pago' => $idregistro_pago));\n\t\tprint $x_respuesta.'|';\n\t\t//+++++ info+++++++++ el update pedido idregistropago es un triggers en la tabla registro_pago_pedido\n\n\t}", "public function get_total_discapacitados(){\n\t\t$sql = mysqli_query(Conecta::conx(),\"SELECT COUNT(DISCAPACIDAD) AS discapacitados FROM datos_salud WHERE DISCAPACIDAD = 'SI'\") or die('error en la consulta:' .$sql. mysqli_errno(Conecta::conx()));\n\t\t//$sql .= \"\";\n\t\tif($reg=mysqli_fetch_array($sql)){\n\t\t\t$this->discapacitados=$reg[\"discapacitados\"];\n\t\t}\n\t\treturn $this->discapacitados;\n\n\t\tmysqli_close(Conecta::conx());\n\t\n\t}", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}", "private function _getMCScaricoSalita()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $mc+=$arredo->getMCScaricoSalita();\n }\n //TODO arrotondamento\n return $mc;\n }", "public function GetSaldoTotalProveedores()\n {\n \t\n \n \t// No mostrar Insumos a contabilizar, exite otro procedimiento para tratarlas\n \t// Insumos a contabilizar\n \t$CONST_InsumosAContabilizarId = 5;\n \t\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Proveedor c')\n \t->innerJoin('c.FacturasCompra f')\n \t->andWhere('f.TipoGastoId <> ?', $CONST_InsumosAContabilizarId)\n \t->groupBy('c.Id');\n //echo $q->getSqlQuery();\n \t$cli\t=\t$q->execute();\n \t$total=0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \n \treturn $total;\n }", "public function getCoti_total(){\n return $this->coti_total;\n }", "private function getTotalVendas()\n {\n return $vendas = DB::table('vendas')->where('confirmado', '=' ,'S')->sum('valor_total');\n }", "function total() {\n\t\t$sql = \"\n\t\t\tSELECT SUM(biaya) as totalbiaya FROM tiket \n\t\t\tWHERE tgl_pemesanan >= '\".date(\"Y-m-d\").\"' AND tgl_pemesanan <= '\".date(\"Y-m-d\").\"'\n\t\t\tORDER BY id_tiket ASC\"; \n\t\t\n\t\t$query = $this->db->query($sql);\n\t\t$row = $query->row();\n\t\treturn $row->totalbiaya;\n\t}", "public function reporteDiarioTotal(){\n $transportes = Transporte::where('tipo','=',2)->get();\n $ingresos = IngresoTransporte::all();//todos son unidades(2)\n $egresos = EgresoTransporte::with('transporte')\n ->orderBy('fecha_reporte', 'desc')->get();\n return view('transporte.reporte.diario.index',\n compact('transportes','ingresos','egresos'));\n }", "static public function mdlSumaTotalVentas($tabla, $item, $valor, $cerrado, $fechacutvta){\t\n //CAMBIAR EL FORMATO DE FECHA A yyyy-mm-dd \n //$fechadehoy = explode('/', $valor); \n\t//$valor = $fechadehoy[2].'-'.$fechadehoy[1].'-'.$fechadehoy[0];\n\t/*\n*/\n if($fechacutvta!=null){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo, h.cerrado FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item='\".$fechacutvta.\"' and p.totaliza=1 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }else{\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT h.`fecha_salida`, SUM(IF(h.`es_promo` = 0, h.`cantidad`*h.`precio_venta`,0)) AS sinpromo, \n\t\tSUM(IF(h.`es_promo` = 1, h.`precio_venta`,0)) AS promo FROM $tabla h INNER JOIN productos p ON h.id_producto=p.id \n\t\tWHERE h.$item=curdate() and p.totaliza=1 and h.id_caja=$valor and h.cerrado=$cerrado AND h.id_tipomov=1\");\n }\n //$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n \n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\n\t\t$stmt = null;\n\n}", "function getTotalMeGustas($id) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT SUM(megusta) FROM valoracion_mg where id_contenido=$id && megusta=1\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return 0;\n } \n}", "public function modelTotalRecord(){\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select id from inventory\");\n // tra ve so ban ghi\n return $query->rowCount();\n }", "function suma_monto_total($requerimientos){\n $i=0; $suma=0;\n foreach ($requerimientos as $linea_num => $linea){ \n if($i != 0){\n $datos = explode(\";\",$linea);\n \n if(count($datos)==21){\n $suma=$suma+(float)$datos[7];\n }\n }\n\n $i++;\n }\n\n return $suma;\n }", "public function total_reservas_sala_dia($fecha) // reservas sin eliminar // //PDF\n {\n $q_string = \"select sala, count(sala) as cant from reservas where fecha ='\".$fecha.\"' and eliminada ='0' and estado ='1' group by sala\";\n\t \t $data = $this->db->query($q_string);\n\t\t return $data;\n\t}", "public static function getQtdTotalIngressos()\n {\n $conteudo = self::getConteudo();\n return $conteudo->sum('quantidade');\n }", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, month(b.fecha_inicio) AS mes,b.no_dias,count(substr(b.fecha_inicio,1,7)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND year(b.fecha_inicio) ='\".$this->ano_id.\"' AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,7)\n ORDER BY substr(b.fecha_inicio,1,7)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$mes,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$mes]= $cantidad;\n }\n }\n }", "public function subtotal();", "function total_pagado($ven_id) {\n// sum(ind_capital_desc) as descuento, sum(ind_capital_inc) as incremento ,\n// sum(ind_costo_pagado) as costo\n// from interno_deuda where ind_tabla='venta' and ind_tabla_id=$ven_id \n// \";\n// $pagado = FUNCIONES::objeto_bd_sql($sql_pag);\n $pagado = FUNCIONES::total_pagado($ven_id);\n return $pagado;\n }", "public function getTotal()\n {\n $db = self::getInstance();\n $db = $db->prepare(\"SELECT count(*) as count FROM paciente\");\n $db->execute();\n return $db->fetch(\\PDO::FETCH_ASSOC);\n }", "function getForResumenTotInt( $contrato){\n\t\t\t$tipos = array(\n\t\t\t\t0=>\"CI\",\n\t\t\t\t1=>\"IP\",\n\t\t\t\t2=>\"IA\",\n\t\t\t\t3=>\"DI\",\n\t\t\t\t4=>\"IPA\",\n\t\t\t\t5=>\"E\",\n\t\t\t\t6=>\"RE\",\n\t\t\t\t7=>\"C\",\n\t\t\t\t8=>\"L\",\n\t\t\t\t9=>\"LA\",\n\t\t\t\t10=>\"I\",\n\t\t\t\t11=>\"IL\"\n\t\t\t\t);\n\t\t\t$respuesta = array();\n\t\t\tforeach ($tipos as $value) {\n\t\t\t\t$sql = \"select count(*) as total from $this->tabla \n\t\t\t\t\t\tjoin referencias\n\t\t\t\t\t\t\ton referencias.id_referencia = $this->tabla.id_referencia\n\t\t\t\t\t\tjoin areas\n\t\t\t\t\t\t\ton areas.id_area = referencias.id_area\n\t\t\t\t\t\tjoin disciplinas\n\t\t\t\t\t\t\ton disciplinas.id_disciplina = areas.id_disciplina\n\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t$this->tabla.tipo_discontinuidad = '\".$value.\"' \n\t\t\t\t\t\t\tand disciplinas.id_contrato=\".$contrato.\"\n\t\t\t\t\";\n\n\t\t\t\t$resultado = $this->conexion->query($sql);\n\t\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t\t$row=$resultado->fetch_assoc() ;\n\t\t\t\t\tif($row['total']>0){\n\t\t\t\t\t\t$respuesta[$value] = $row['total'] ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn json_encode($respuesta) ;\n\t\t}", "public function gerencial_valorInventario(){\n\t\t\n\t\t$resultado = 0;\n\t\t\n\t\t$query = \"SELECT cantidad, idProducto\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_productos_sucursal\";\n\t\t\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 \t\n\t\t\t\t$idproducto = $filas['idProducto'];\n\t\t\t\t$cantidad\t= $filas['cantidad']; \n\t\t\t\t\n\t\t\t\t$query2 = \"SELECT precio \n\t\t\t\t\t\t\tFROM tb_productos WHERE idProducto = '$idproducto'\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($res2 = $conexion->query($query2)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t while ($filas2 = $res2->fetch_assoc()) {\n\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t$precio = str_replace('.', '',$filas2['precio']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$subtotal = $precio * $cantidad;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $resultado = $resultado + $subtotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\n } \n \n }//fin if\n\t\t\n return $resultado;\t\n\t\t\n\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}", "function SumaTotal($CardCode){\n\t\t\n\t\t $Total_Pedido = 0;\n\t\t \n\t\tif($this->con->conectar()==true){\n\t\t\t$Resultado = mysql_query(\"SELECT `Total` FROM `Carrito` WHERE `CardCode` = '\" .$CardCode. \"'\");\n\t\t\tif($Resultado){\n\t\t\t while( $Articulos = mysql_fetch_array($Resultado) ) {\n\t\t \t $Total_Pedido = $Total_Pedido + (int) $Articulos['Total'] ;\n\t\t }}\n\t\t\techo number_format($Total_Pedido, 2) ;\n\t\t}\n\t}", "public function total_articulos(){\r\n\t\t\tif (count($this->listArticulos)==0) return 0;\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo)\r\n\t\t\t\t$total+=$elArticulo->unidades;\r\n\t\t\treturn $total;\r\n\t\t}", "function _ConsultarRutinasTotales()\n\t{\n\t\t\n\t\t//Este querie devuelve TODAS las rutinas ordenadas de principiante hasta avanzado.\n\t\t$query = '\n\t\tSELECT\n\t\tRut.id as id_rutina,\n\t\tRut.nb_rutina,\n\t\tRut.desc_rutina,\n\t\tRut.fh_creacion,\n\t\tUsu.nb_nombre,\n\t\tUsu.nb_apellidos,\n\t\tCat.nb_categoriarutina,\n\t\tGen.id as id_genero,\n\t\tGen.nb_tiporutina,\n\t\tcuerpo.id as id_cuerpo,\n\t\tcuerpo.nb_cuerpo,\n\t\tedad.nb_edad\n\t\tFROM sgrutinas Rut\n\t\tleft JOIN sgusuarios Usu\n\t\tON Usu.id=Rut.id_usuariocreacion\n\t\tleft JOIN sgcategoriasrutina Cat\n\t\tON Cat.id=Rut.id_categoriarutina\n\t\tLEFT JOIN sggenerosrutina Gen\n\t\tON Gen.id= Rut.id_generorutina\n\t\tLEFT JOIN sgtipocuerpo cuerpo\n\t\tON cuerpo.id = Rut.id_tipocuerpo\n\t\tLEFT JOIN sgedad edad\n\t\tON edad.id = Rut.id_edad\n\t\twhere Rut.sn_activo=1 order by id_rutina asc\n\t\t';\t\n\t\t$rutinas = $this->EjecutarTransaccionAllNoParams($query);\n\t\treturn $rutinas;\n\t}", "public function total() {\n\t\t$query = \"select count(us.sentimento_id) as total\n\t\t\t\t from usuario_sentimento us where us.sentimento_id = \" . $this->id;\n\t\t$this->db->ExecuteSQL($query);\n\t\t$res = $this->db->ArrayResult();\n\t\treturn $res['total'];\n\t}", "public function cirugias_TotalAplicarFiltrosCirugias($fechaInicial, $fechaFinal, $usuarios, $idCirugia, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idCirugia != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" INNER JOIN tb_diagnosticosCirugias AS DC ON DC.idCirugia = C.idCirugia\n\t\t\t\t\t\t\t\t INNER JOIN tb_panelesCirugiaDiagnosticos AS PCD ON PCD.idPanelCirugiaDiagnostico = DC.idPanelCirugiaDiagnostico\n\t\t\t\t\t\t\t\t WHERE PCD.idPanelCirugiaDiagnostico = '$idCirugia' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($usuarios != \"\"){\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery = \" AND C.idUsuario = '$usuarios' \";\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \"AND ( C.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND C.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(C.idCirugia) as totalRegistros\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_cirugias AS C\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON C.idMascota = M.idMascota\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_sucursales AS SU ON SU.idSucursal = C.idSucursal\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_usuarios AS U ON U.idUsuario = C.idUsuario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$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['totalRegistros'];\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\t\t\t\n }", "function totalboar($municipality_fk){\n\n\t$crud = new CRUD();\n\t$crud->disconnect();\n\n\t$crud -> sql(\"select SUM(native_boar) as totalboar from farmers_tbl where municipality_id_fk='{$municipality_fk}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['totalboar'];\n\t}\n\t$crud->disconnect();\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 get_sum_pagar()\n \t{\n \t $this->db->select([\n \n 'FORMAT(SUM(REPLACE( conta_pagar_valor, \",\",\"\")),2) as conta_pagar_valor',\n\n ]);\n\n $this->db->where('conta_pagar_status',0);\n\n \t return $this->db->get('contas_pagar')->row();\n \n \t}", "public function totClientesCadastrados(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT ifnull(count(*),0) as total FROM tbclientes \";\n $rsclitot = $this->conexao->query($sql);\n $result = $rsclitot->fetch_array();\n $rstotcli = $result['total'];\n\n return $rstotcli;\n }", "function totalvacantes_reclutador($idReclutador){\r\n $funciones = new funciones;\r\n $funciones->conectar();\r\n $sql=\"select \r\n tblmeses.descmes,ifnull(total,0) as total\r\n from\r\n tblmeses\r\n left join\r\n (select \r\n count(tblvacante.folSolici) as total,\r\n idmes,\r\n descmes,\r\n idReclutador\r\n from\r\n tblmeses\r\n left join tblsolicitud ON month(tblsolicitud.iniSolici) = tblmeses.idmes\r\n left join tblvacante ON tblvacante.folSolici = tblsolicitud.folSolici\r\n where\r\n idReclutador =\".$idReclutador.\"\r\n group by idmes , idReclutador) as t1 ON t1.idmes = tblmeses.idmes\r\n group by tblmeses.idmes\r\n \";\r\n $result = mysql_query($sql) or die(mysql_error());\r\n $datos = array();\r\n while($fila = mysql_fetch_array($result)){\r\n $datos[]=$fila;\r\n }\r\n return $datos;\r\n \r\n }", "function montant_total(){\n\n\t$total = 0;\n\n\tfor( $i = 0; $i < sizeof( $_SESSION['panier']['id_produit']); $i++ ){\n\n\t\t$total += $_SESSION['panier']['quantite'][$i] * $_SESSION['panier']['prix'][$i];\n\t\t//A chaque tour de boucle (qui correspond au nombre de produit dans le panier), on ajoute le montant (quantite * prix ) pour chaque produit dans la variable $total\n\t}\n\n\treturn $total;\n}", "public function recursos_totales() {\r\n $this->db->select('count(*) as total');\r\n $query = $this->db->get(\"publicacion\");\r\n //return $query->num_rows();\r\n $resultados = $query->result();\r\n if(!empty($resultados)){\r\n return $resultados[0]->total;\r\n } else {\r\n return false;\r\n }\r\n }", "public function vacunas_TotalAplicarFiltrosVacunas($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idVacuna, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = 0;\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idVacuna != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idVacuna = '$idVacuna' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t count(V.idMascotaVacunas) as totalRegistros\n\t\t\t\t\t\t FROM\n\t\t\t\t\t\t tb_mascotas_vacunas AS V\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON V.idMascota = M.idMascota\n\t\t\t\t\t\t \tINNER JOIN\n\t\t\t\t\t\t tb_vacunas AS VV ON V.idVacuna = VV.idVacuna\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$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['totalRegistros'];\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\t\t\t\n }", "public function totalq1($modalite)\r\n\t{\r\n\t$conge = new Default_Model_Conge();\r\n\t$debut_mois = $this->getAnnee_reference().'-01-01';\r\n\t$fin_mois = $this->getAnnee_reference().'-12-31'; // il faut la remplacer par l'annee de reference\r\n\t\r\n\t\r\n\t$jours_ouvres_de_annee_ref = $conge->joursOuvresDuMois($debut_mois,$fin_mois);\r\n\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t$personne = new Default_Model_Personne();\r\n\t$id_entite =1; // MBA : pourquoi entite 1 pour personne? \r\n\t$personne = $personne->fetchall('id_entite ='.$id_entite. '&&'. 'id ='.$this->getPersonne()->getId());\r\n\t//var_dump($personne);\r\n\tif (null!==$personne)\r\n\t\r\n\t{\r\n\t\tif ($modalite == 4)\r\n\t\t{\r\n\t\t\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t\t\tif($nbr_heurs_ouvrees_annee >1607)\r\n\t\t\t{\r\n\t\t\t\treturn 0.5;\r\n\t\t\t}\r\n\t\t\telseif($nbr_heurs_ouvrees_annee <1607.5)\r\n\t\t\t{\r\n\t\t\t\treturn 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 5 ||$modalite == 6 )\r\n\t\t{\r\n\t\t\t$nbr_jours_ouvrees_annee = $jours_ouvres_de_annee_ref-243;\r\n\t\t\tif($nbr_jours_ouvrees_annee < 10)\r\n\t\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t\t}\r\n\t\t\telseif($nbr_jours_ouvrees_annee >10)\r\n\t\t\t{\r\n\t\t\t\treturn $nbr_jours_ouvrees_annee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 1 ||$modalite == 2 ||$modalite == 3)\r\n\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\telse return 0;\r\n\t\r\n\t}", "function valore_costi_totali_amico($id_ordine,$id_user,$id_amico){\r\n $costo_trasporto = valore_costo_trasporto_ordine_amico($id_ordine,$id_user,$id_amico);\r\n $costo_gestione = valore_costo_gestione_ordine_amico($id_ordine,$id_user,$id_amico);\r\n $costo_mio_gas = valore_costo_mio_gas_amico($id_ordine,$id_user,$id_amico);\r\n $costo_maggiorazione = valore_costo_maggiorazione_mio_gas_amico($id_ordine,$id_user,$id_amico);\r\n $costi_totali = $costo_trasporto +\r\n $costo_gestione +\r\n $costo_mio_gas +\r\n $costo_maggiorazione;\r\n return (float)$costi_totali; \r\n}", "public function suma_compras_anio_mes_grafica($fecha){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n //se usa para traducir el mes en la grafica\n //imprime la fecha por separado ejemplo: dia, mes y año\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n \n\n //SI EXISTE EL ENVIO POST ENTONCES SE MUESTRA LA FECHA SELECCIONADA\n if(isset($_POST[\"year\"])){\n\n $fecha=$_POST[\"year\"];\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }\n\n\n } else {\n\n\n//sino se envia el POST, entonces se mostraria los datos del año actual cuando se abra la pagina por primera vez\n\n $fecha_inicial=date(\"Y\");\n\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }//cierre del foreach\n\n\n }//cierre del else\n\n\n }", "public function StatsDelaiMoyenTotal($jour,$partenaire){\r\n $connexion=$this->getEntityManager()->getConnection();\r\n\t\t$sql = \"select avg(DATEDIFF(dateInstruction, dateReception)) as val from transmission_dossier t, type_decision n where PERIOD_DIFF(date_format(now(),'%Y%m'),date_format(dateTransmission,'%Y%m'))<'$jour' and decision_id=n.id and dateInstruction is not null $partenaire\"; \r\n $statement = $connexion->query($sql);\r\n\t\t//dump($sql);\r\n return $statement->fetch();\r\n\t}", "public function NumAdeudos(){\n\t\t$UsCg = new HomeController();\n\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t$UsCfechaactual = date('Y-m-d');\n\t\t$UsCseccion = DB::table(\"colegiatura\")->where(\"Alumno_idAlumno\",Session::get(\"usuario\"));\n\t\t$UsCcolegiaturas = $UsCseccion->orderBy('periodo_idperiodo', 'asc')->get();\n\t\t$UsCconcole = $UsCseccion->count();\n\t\t$UsCusuario = DB::table(\"alumno\")->where(\"idAlumno\",Session::get(\"usuario\"))->first();\n\t\t$UsCadeudo = ($UsCg->restaFechas($UsCusuario->fecha, $UsCfechaactual))-$UsCconcole;\n\t\tif ($UsCadeudo < 0) {$UsCadeudo = 0;}\n\t\treturn \"- Adeudos: \".$UsCadeudo;\n\t}", "public function totalProducto() {\n\t\t$cantidad = $this->input->post('c');\n\t\t$precio = $this->input->post('p');\n\t\t$descuento = $this->input->post('d');\n\t\t$sub = ($precio * $cantidad);\n\t\t$des = ($sub * ($descuento/100));\n\t\t$total_facturacompra = $sub - $des;\n\t\t$data = array(\n\t\t\t'total_facturacompra' => $total_facturacompra, /*subtotal*/\n\t\t\t'des' => $des, /*descuento*/\n\t\t\t'sub' => $sub /*subtoral_sin_desc*/\n\t\t);\n\t\techo json_encode($data);\n\t}", "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 get_total(){\n $total = 0;\n \n // récupert tous les articles de la commande\n $articles = $this->get_all_articles();\n \n // parcourt ces articles\n foreach($articles as $a){\n $price = $a->get_price(true);\n \n // puis calcul le prix\n $total += $a->nb * $price;\n }\n \n return $total;\n }", "public function totalColecao(){\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\r\n\t\treturn $oSicasAtendimentoBD->totalColecao();\r\n\t}", "private function atualizaNumRegistros($sql){\r\n $this->dao = new BannerDao();\r\n $result = $this->conexao->consultaDB($sql);\r\n $this->numTotalDeRegistros = mysql_num_rows($result);\r\n }" ]
[ "0.7712316", "0.72848725", "0.71452045", "0.71007335", "0.7094024", "0.7076156", "0.69729894", "0.69729894", "0.69711214", "0.6940392", "0.6938759", "0.6914168", "0.69066447", "0.6897834", "0.6897834", "0.6897834", "0.68754953", "0.687157", "0.68109006", "0.67490286", "0.67136127", "0.66895276", "0.6667859", "0.6666922", "0.6642814", "0.6633882", "0.6631069", "0.66305244", "0.66238093", "0.66230124", "0.66204166", "0.6616965", "0.6591252", "0.6591215", "0.65901077", "0.6588078", "0.6583663", "0.656793", "0.6558348", "0.65543604", "0.6552075", "0.6548192", "0.6546739", "0.65404004", "0.65351707", "0.652781", "0.65044177", "0.6488114", "0.64875853", "0.6486976", "0.6475801", "0.64673245", "0.6459174", "0.64577997", "0.64559346", "0.64511144", "0.64510673", "0.64502406", "0.644885", "0.64334714", "0.6430904", "0.6420398", "0.64157444", "0.64120996", "0.64072746", "0.63942826", "0.6394235", "0.639293", "0.6392544", "0.6390337", "0.6385641", "0.63829494", "0.6370041", "0.6369172", "0.6366356", "0.6363244", "0.63618183", "0.6357218", "0.63569254", "0.6356791", "0.63532835", "0.6343834", "0.6339154", "0.63388014", "0.6337234", "0.6335558", "0.6335549", "0.63323945", "0.6329073", "0.63288504", "0.6317617", "0.6314107", "0.6313419", "0.6309303", "0.6306246", "0.62779254", "0.6277654", "0.62727773", "0.6266615", "0.6265067" ]
0.7308667
1
Display a listing of the resource.
public function index() { // if (Auth::check()) { $servicios = Servicios::lists('nombre', 'id')->toArray(); $tipovehiculos = TipoVehiculos::lists('nombre', 'id')->toArray(); $carros = Tickets::whereNull('fecha_fin')->where('id_tipo_vehiculo', 2)->count(); $motos = Tickets::whereNull('fecha_fin')->where('id_tipo_vehiculo', 1)->count(); $stock = Configuraciones::find(1); $stock_carros = 0; $stock_motos = 0; if (count($stock) > 0) { $stock_carros = $stock->stock_carros - $carros; $stock_motos = $stock->stock_motos - $motos; } return view('home', compact('tipovehiculos', 'servicios', 'carros', 'motos', 'stock_carros', 'stock_motos')); } $this->configurar(); return view('auth.login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function configurar() { // $count = Perfiles::select()->get()->count(); if ($count == 0) { $permisos = Funcionalidades::select()->get(); Perfiles::create(['nombre' => 'Super Su','usuario'=>1]); foreach ($permisos as $value) { Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]); } User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "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 deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\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 function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\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 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 $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 File::find($id)->remove();\n \n return redirect()->route('files.index');\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 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 delete($path, $data = null);", "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 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 removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\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 destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\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 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(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\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 }", "public function remove($id);", "public function remove($id);", "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 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 }", "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 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 {\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 }", "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 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.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853", "0.58968836", "0.58958197", "0.58958197", "0.58958197", "0.58958197", "0.58800334", "0.5869308", "0.5861188", "0.5811069", "0.5774596", "0.5763277", "0.5755447", "0.5747713", "0.5742094", "0.573578", "0.5727048", "0.57164854", "0.5712422", "0.57092893", "0.57080173", "0.5707143", "0.5704078", "0.5696418", "0.5684556", "0.5684556", "0.56790006", "0.5678463", "0.5658492", "0.564975", "0.5648406", "0.56480885", "0.5641393", "0.5638992", "0.56302536", "0.56228197", "0.5616424", "0.5607389", "0.56033397", "0.5602035", "0.55991143", "0.55988586", "0.5590501", "0.5581284", "0.55681103", "0.5566215", "0.55644745", "0.5563726", "0.55593926", "0.55583876", "0.5548547", "0.5542015", "0.5541403", "0.5541403", "0.55397224", "0.55390894", "0.55376494", "0.5531044", "0.5529739", "0.55279493", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527671", "0.5527155", "0.5526666", "0.55245256", "0.552101", "0.55183184" ]
0.0
-1
/check db if it exists
public function checkRule($attribute , $params){ /* @var $dispoModel Disposale*/ if(!isset($this->$attribute) || empty($this->$attribute)) { $this->addError($attribute, "Can't check rule. You must provide a mobile number"); } $criteria = new CDbCriteria(); $criteria->compare("phone_number", $this->$attribute); $criteria->order = "date_created DESC"; $dispoModel = Disposale::model()->find($criteria); $isValid = true; if($dispoModel && !empty($dispoModel) ){ $dt1Str = date("Y-m-d H:i:s", strtotime($dispoModel->date_created)); $dt2Str = date("Y-m-d H:i:s", strtotime("+0 day" )); $dt1Obj = new DateTime($dt1Str); $dt2Obj = new DateTime($dt2Str); $dateDifference = $dt2Obj->diff($dt1Obj)->format("%a"); $dateDifference = intval($dateDifference); $limitDays = intval(\Yii::app()->params['time_limit']); /*After 182 days , if equal to 182 still not valid*/ if($dateDifference <= $limitDays){ $lastInsertData = $dispoModel->date_created; $this->addError($attribute, "Sorry we cant process your data . You must wait {$limitDays} days before we accept your submittion. Last insert was $lastInsertData. Difference is $dateDifference and limit is $limitDays"); } } return $isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_db() {\n if (ee()->db->table_exists($this->table_name)) {\n return true;\n }\n return $this->make_db();\n }", "function check_db(){\n if( ! $this->database_exists() ){\n $this->create_table();\n }\n }", "private function databaseExists()\n {\n try {\n if (is_numeric(Bookmark::count()) && is_numeric(Tag::count())) {\n return true;\n }\n } catch (Exception $e) {\n return false;\n }\n\n return false;\n }", "public static function dbExists($dbName);", "function Sql_DB_Exists($db=\"\")\n {\n if (empty($db)) { $db=$this->DBHash[ \"DB\" ]; }\n\n $dbs=$this->Sql_DBs_Get();\n\n $res=FALSE;\n if (preg_grep('/^'.$db.'$/',$this->Sql_DBs_Get())) { $res=TRUE; }\n\n return $res;\n }", "public function checkDatabaseFile()\n {\n return file_exists($this->getDatabasePath());\n }", "public function checkDatabaseExists(): bool\n {\n $query = QueryBuilder::new($this->poolName, null, null);\n\n return $query->fromRaw('information_schema.SCHEMATA')\n ->where('SCHEMA_NAME', $this->getDatabaseName())\n ->exists();\n }", "public function _db_exists($dbname){\n if (!is_dir($this->_db_path($dbname)))\n return FALSE;\n return TRUE;\n }", "public function database_exists()\n\t{\n\t\t\n\t\t$mysqli = $this->connect();\n\t\t\n\t\tif($stmt = $mysqli->prepare(\"\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM information_schema.TABLES\n\t\t\tWHERE table_schema = ?\n\t\t\tAND table_name = ?\"))\n\t\t{\n\t\t\n\t\t\t//Workaround since bind_param doesn't accept constants\n\t\t\t$db_name = DB_NAME;\n\t\t\t\n\t\t\t$stmt->bind_param('ss', $db_name, $this->table_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($table_count);\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\t\t\n\t\t}else{\n\t\t\tdie('Error: Could not prepare statement');\n\t\t}\n\t\t\n\t\t$table_exists = ($table_count >= 1) ? true : false;\n\t\t\n\t\tif ($table_exists) :\n\t\t\treturn true;\n\t\telse :\n\t\t\treturn false;\n\t\tendif;\n\t}", "public static function checkDB($name){\nif(!(\\Storage::disk('masterDB')->exists($name))){\nnew \\SQLite3(database_path('master').DS.$name);\n}\n}", "public function hasDatabase($name);", "public function checkDatabaseStructure( );", "public function filterCheckDb()\n {\n App::$Database->addConnection($this->db, 'install');\n\n try {\n App::$Database->getConnection('install')->getDatabaseName();\n } catch (\\Exception $e) {\n return false;\n }\n\n return true;\n }", "public function _dbExist($db)\n {\n return is_dir(\"$this->_LIBPATH/$db\") ? true : false;\n }", "public function dbExists($db)\n {\n return $this->_dbExist($db);\n }", "public function check_db()\n {\n $test = $this->connection->query('SELECT COUNT(*) FROM ' . $this->connection->get_table_prefix() . 'users', null, null, true);\n return !is_null($test);\n }", "private function is_db_available(){\n \t$host = Configuration::DB_HOST;\n\t\t$dbname = Configuration::DB_NAME;\n\t\t$dbuser = Configuration::DB_USER;\n\t\t$dbpass = Configuration::DB_PASS;\n\t\t$con = null;\n\t\ttry{\n\t\t\t$con = new PDO(\"mysql:host=$host;dbname=$dbname\", $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t\t$con = null;\n\t\treturn true;\n }", "private static function check_db() {\n\t\tif (self::$db_installed) {\n\t\t\treturn true;\n\t\t}\n\n\t\tglobal $databases;\n\n\t\t$sth = Database::get()->prepare('SELECT table_name FROM information_schema.tables WHERE table_schema = :database AND table_name = :table');\n\n\t\t$sth->execute(array(\n\t\t\t':database' => $databases['default']['name'],\n\t\t\t':table' => 'brutal_variables',\n\t\t));\n\n\t\t$table = $sth->fetchObject();\n\n\t\tif ($table == false) {\n\t\t\t$query = '\n\t\t\t\tCREATE TABLE IF NOT EXISTS `brutal_variables` (\n\t\t\t\t\t`name` varchar(255) NOT NULL,\n\t\t\t\t\t`value` TEXT NOT NULL,\n\t\t\t\tPRIMARY KEY (`name`))\n\t\t\t';\n\n\t\t\tDatabase::get()->exec($query);\n\t\t}\n\n\t\tself::$db_installed = true;\n\n\t\treturn true;\n\t}", "function checkIntegrityDb()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function database_exists(){\n global $wpdb;\n\n $table_exists = (bool) $wpdb->query( \"SHOW TABLES LIKE '$wpdb->base_prefix$this->table';\" );\n\n return $table_exists;\n }", "public function dbIsInstalled();", "abstract public function hasDatabase(BaseConnectionInfo $connInfo);", "function detectdb() {\r\n\t\t\t$names = array();\r\n\t\t\t$this->db->Halt_On_Error = 'no';\r\n\t\t\t$tables = $this->db->table_names();\r\n\t\t\t\r\n\t\t\tforeach ($tables as $tab_info) {\r\n\t\t\t\t$names[] = $tab_info['table_name'];\r\n\t\t\t}\r\n\t\t\tif(is_array($names) && in_array('s3db_account', $names)) {\r\n\t\t\t\treturn True;\r\n\t\t\t} else {\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\t\t}", "function db_check() {\n global $wpdb;\n $table_name = $wpdb->prefix . \"bl_maintainers\";\n // if tables aren't installed then install them\n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n $this->db_install();\n }\n }", "function db_check() {\n\t\tif(!is_admin() || !$this->db_option || !$this->db_version || !$this->table_schema) return false;\n\t\tglobal $wpdb;\n\t\t$current_db_version = get_option($this->db_option);\n\t\tif($this->db_version != $current_db_version) {\n\t\t\t$this->db_install_options();\n\t\t\t$this->db_install($sql);\n\t\t}\n\t}", "function tableExists($db, $table = 'settings') {\n try {\n $result = $db->query(\"SELECT 1 FROM $table LIMIT 1\"); \n } catch (Exception $e) {\n return false;\n }\n return $result == true;\n }", "private function canUseDatabase()\n {\n return $this->deploymentConfig->get('db');\n }", "function checkIfDatabaseIsCreated(){\n\tglobal $connect;\n\t$query1 = \"create table if not exists Register(id INT AUTO_INCREMENT PRIMARY KEY,firstname VARCHAR(20),lastname VARCHAR(20),email VARCHAR(30),password VARCHAR(20));\";\n\tmysqli_query($connect, $query1) or die (mysqli_error($connect));\n}", "function CreateDatabaseIfNoneExists() {\n $link = mysql_connect($this->servername, $this->username, $this->password);\n \n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n \n //Make Players the current database\n $db_selected = mysql_select_db($this->dbname, $link);\n \n //Checking if the database exists, if it doesn't make it\n if (!$db_selected) {\n $file_content = file('PlayerSpins.sql');\n $query = \"\";\n foreach($file_content as $sql_line){\n if(trim($sql_line) != \"\" && strpos($sql_line, \"--\") === false){\n $query .= $sql_line;\n if (substr(rtrim($query), -1) == ';'){\n //echo $query;\n $result = mysql_query($query)or die(mysql_error());\n $query = \"\";\n }\n }\n }\n }\n mysql_close($link);\n }", "private function checkOpenDB(){\r\n if($this->connected){\r\n return true;\r\n }\r\n \r\n //No database opened yet\r\n return false;\r\n }", "public function doDatabaseCheck()\n {\n $validator = new Validation\\Database();\n $validator->setPathResolver($this->config->app['path_resolver']);\n $validator->setConfig($this->config->app['config']);\n $validator->check();\n }", "public function checkDatabase()\n {\n $isChecked = $this->isDatabaseChecked();\n if (null !== $isChecked) {\n return $isChecked;\n }\n\n $this->dbCheck = SafeDatabaseChecker::tablesExist($this->getConnection(), $this->requiredTables);\n\n return $this->dbCheck;\n }", "public function checkIfTablesExist()\n {\n foreach (self::DB_TABLE_INFO as $tableName => $createSql) {\n try {\n $result = $this->connection->query('SELECT 1 FROM turns LIMIT 1');\n } catch (Exception $e) {\n $result = false;\n }\n\n if ($result === false) {\n $this->connection->exec($createSql);\n }\n }\n }", "function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}", "function connectionExists(){\n\t\tglobal $dbConnection;\n\t\tif($dbConnection == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "public function test_database()\n\t{\n\t\ttry {\n\t\t\treturn (bool) DB::query(Database::SELECT, 'SHOW DATABASES')\n\t\t\t\t->execute()\n\t\t\t\t->count();\n\t\t} catch (Database_Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function testCreateDb()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n $db = Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB now exists\n $response = Sopha_Http_Request::get($this->_url);\n $this->assertEquals(200, $response->getStatus());\n }", "function myplugin_update_db_check()\n\t{\n\n\n\t\t// Get the Current DB and check against this verion\n\t\t$currentDBversion = get_option('agreedMarkingDB_version');\n\t\t$thisDBversion = $this->DBversion;\n\n\t\tif($thisDBversion>$currentDBversion)\n\t\t{\n\n\t\t\t$this->createTables();\n\t\t\tupdate_option('agreedMarkingDB_version', $thisDBversion);\n\t\t}\n\t\t//$this->createTables(); // Testing\n\n\t}", "protected function isDatabaseReady()\n {\n // Such as during setup of testsession prior to DB connection.\n if (!DB::is_active()) {\n return false;\n }\n\n // If we have a DB of the wrong type then complain\n if (!(DB::get_conn() instanceof MySQLDatabase)) {\n throw new Exception('HybridSessions\\Store\\DatabaseStore currently only works with MySQL databases');\n }\n\n // Prevent freakout during dev/build\n return ClassInfo::hasTable('HybridSessionDataObject');\n }", "function createDBIfNotExist($type) {\n if($type !== 'account' && $type !== 'job' && $type !== 'store') {\n die(\"ERROR: createDBIfNotExist($type)\\n\");\n }\n\n global $dbconfig;\n // connect to the mysql host of account\n $host = $dbconfig->$type->host;\n $user = $dbconfig->$type->user;\n $password = $dbconfig->$type->password;\n $dbname = $dbconfig->$type->name;\n\n $conn = get_conn($host, $user, $password);\n\n // select the db of information_schema\n select_db('information_schema', $conn);\n\n // check if the account db exists\n if($res = mysql_query(\"select * from SCHEMATA where SCHEMA_NAME='$dbname'\", $conn)) {\n if($record = mysql_fetch_assoc($res)) {\n echo \"DONE: account db $dbname exists on $host\\n\";\n return false;\n } else {\n echo \"DONE: account db $dbname does not exist on $host\\n\";\n //need to create the account db\n createDB($type, $conn);\n return true;\n }\n } else {\n die(\"ERROR: select * from SCHEMATA where SCHEMA_NAME='$dbname'\");\n }\n\n}", "public function testCreateExistingDbFails()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n try {\n $db = Sopha_Db::createDb($dbname, $host, $port);\n $this->fail(\"createDb was expected to fail with a 409 error code\");\n } catch (Sopha_Db_Exception $e) {\n $this->assertEquals(412, $e->getCode(), \"Error code is not 409\");\n }\n }", "public function exists()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->check_exists();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(DatabaseFileException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isDatabaseRequired()\n {\n return $this->isSomethingRequired(array(\n 'full_backup', 'database'\n ));\n }", "static function using_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\t\treturn $dbConn && (substr($dbConn->currentDatabase(), 0, strlen($prefix) + 5) == strtolower(sprintf('%stmpdb', $prefix)));\n\t}", "function exist($name, $db) {\n $resultSet = $db -> query(\"SELECT * from Pokedex WHERE name = '$name'\");\n $count = $resultSet->rowCount();\n return (!$count == 0);\n }", "public static function dbExists( $sDbName ) {\n\t\t$rRes = mysql_query( sprintf( \"SHOW DATABASES LIKE '%s'\", $sDbName ) );\n\t\treturn mysql_num_rows( $rRes ) ? TRUE : FALSE;\t\n\t}", "function new_db($name) {\n\t\t\t$sql = \"CREATE DATABASE IF NOT EXISTS \".$name;\n\t\t\tif ($this->checkup(\"\", $sql) != true) {\n\t\t\t\treturn $this->error(\"an error occured!\");\n\t\t\t}\n\n\t\t\t#\t\tif ( mysqli_query ($this->CONN, $sql ) ) {\n\t\t\tif ($this->one_query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $this->error(\"error while creating database '$name'!\");\n\t\t\t}\n\t\t}", "public function check_db_existance($database=false, $response=true){\n\t\t\n\t\t$db_selected = $this->set_db($database);\n\t\t\n\t\tif (!$db_selected) {\n\t\t\t\n\t\t\t$result = false;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$result = true;\n\t\t\t\n\t\t}\n\n\t\tif($response){\n\t\t\t\n\t\t\treturn $result;\n\t\t}\n\t\n\t}", "protected function isDatabaseChecked()\n {\n if ($this->installed) {\n return true;\n }\n\n if (null !== $this->dbCheck) {\n return $this->dbCheck;\n }\n\n return null;\n }", "public function testDBTablesExist() {\n\n $tables = array(\n 'pheno_plant',\n 'pheno_plantprop',\n 'pheno_scale_member',\n 'pheno_measurements',\n 'pheno_project_cvterm',\n 'pheno_plant_project',\n 'pheno_project_user',\n 'pheno_backup_file',\n );\n \n foreach($tables as $table) {\n $exists = db_table_exists($table);\n $this->assertTrue($exists, \"Checking that $table table exists.\");\n }\n\n }", "function check_db() \n\t{\n global $wpdb;\n\n\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '\".$this->table_name.\"'\") != $this->table_name) \n\t\t{\n $sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\t\t\t`id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t\t \t`name` TEXT NOT NULL,\n `date` BIGINT( 11 ) NOT NULL\n\t\t\t\t);\";\n\t\t $wpdb->query($sql);\n\t\t}\n\n if($wpdb->get_var(\"DESCRIBE \".$this->table_name.\" WHERE `Field` = 'date'\") != \"date\") // table for books\n\t\t{\n\t\t\t$sql = \"ALTER TABLE `\" . $this->table_name . \"` ADD `date` BIGINT( 11 ) NOT NULL DEFAULT '\".date(\"U\").\"';\";\n\t\t $wpdb->query($sql);\n\t\t}\n\n\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '\".$this->table_img_name.\"'\") != $this->table_img_name) // table for files (images, swf, flv)\n\t\t{\n $sql = \"CREATE TABLE \" . $this->table_img_name . \" (\n\t\t \t\t `id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t\t \t\t `name` TEXT NOT NULL,\n\t\t \t\t `filename` TEXT NOT NULL,\n\t\t \t\t `type` TEXT NOT NULL,\n `date` BIGINT( 11 ) NOT NULL\n\t\t \t\t );\";\n\n\t\t $wpdb->query($sql);\n\t\t}\n\n if($wpdb->get_var(\"DESCRIBE \".$this->table_img_name.\" WHERE `Field` = 'date'\") != \"date\") \n\t\t{\n $sql = \"ALTER TABLE `\" . $this->table_img_name . \"` ADD `date` BIGINT( 11 ) NOT NULL DEFAULT '\".date(\"U\").\"';\";\n\t\t $wpdb->query($sql);\n\t\t}\n }", "public static function existsKphpDB($dbid)\r\n\t{\r\n\t\tif(!self::$_started)\r\n\t\t{\r\n\t\t\tself::addDebug(\"KeepassPHP is not started!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn self::$_kphpdbManager->existsKey($dbid);\r\n\t}", "function xmldatabaseexists($databasename, $path = \".\", $conn = false)\n{\n return (file_exists(\"$path/$databasename\"));\n}", "public function hasDatabase(): bool\n {\n if ($this->hasDatabaseCache !== null) {\n return $this->hasDatabaseCache;\n }\n\n return $this->hasDatabaseCache = App::hasDatabase() &&\n Schema::hasTable(Config::get('database.migrations', 'migrations'));\n }", "protected function preflightDB()\n {\n $check = $this->db->canInstall();\n if ($check !== true) {\n $error = array_shift($check);\n array_unshift($check, $this->translate($error));\n return $this->error(call_user_func_array('sprintf', $check), true);\n }\n $tablename = \"uptest\" . uniqid();\n if (!$this->db->query(\"CREATE TABLE $tablename(a int, b int)\")) {\n $fail = \"Table creation\";\n } elseif (!$this->db->query(\"INSERT INTO $tablename(a,b) VALUES(1,2)\")) {\n $fail = \"Insertion\";\n } elseif (!$this->db->query(\"UPDATE $tablename SET a=2 WHERE a=1\")) {\n $fail = \"Update\";\n } elseif (!$this->db->query(\"DELETE FROM $tablename WHERE a=2\")) {\n $fail = \"Deletion\";\n }\n if ($this->db->tableExists($tablename)) {\n if (!$this->db->query(\"DROP TABLE $tablename\") && empty($fail)) {\n $fail = \"Table deletion\";\n }\n }\n if (!empty($fail)) {\n return $this->error(\"$fail test failed, please check DB permissions.\", true);\n }\n return true;\n }", "protected function checkDbAndTables()\n\t{\n\t\tif (!isset($GLOBALS['egw_info']['apps']))\n\t\t{\n\t\t\t$GLOBALS['egw']->applications->read_installed_apps();\n\t\t}\n\t\tif (version_compare($GLOBALS['egw_info']['apps']['activesync']['version'] , '16.1.001', '<'))\n\t\t{\n\t\t\tthrow new UnavailableException('ZPush tables not yet installed, run setup!');\n\t\t}\n\t\treturn true;\n\t}", "function table_exists()\r\n{\r\n\t$tables = $this->_db->getTableList();\r\n\t$table = self::replaceDbPrefix('#__flexicontact_log');\r\n\tif (self::in_arrayi($table,$tables))\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function checkTableExists($table_name) {\n $sql = sprintf(\"SELECT count(*) FROM sqlite_master WHERE type='table' AND name='%s'\", $table_name);\n\n $ret = $this->query($sql);\n // echo \"<br>\";\n // echo print_r($ret, $return=true);\n // echo \"<br>\";\n if ($ret) {\n $ary = $ret->fetchArray(SQLITE3_NUM);\n if ($ary[0] > 0) {\n return True;\n } else {\n return False;\n }\n }\n }", "private function _createDatabase($dbName) { \n try { \n $this->_openDbConnection();\n\n // Prüfen ob gleichnamige Datenbank existiert\n if (count($this->model->getDatabase($dbName)) !== 0) {\n throw new Exception('Gleichnamige Datenbank existiert schon!');\n }\n\n try {\n $this->model->createDatabase($dbName); \n } catch (Exception $ex) {\n throw new Exception('Erstellen der Datenbank fehlgeschlagen!<br />Möglicherweise hast du keine Berechtigung.');\n }\n $this->model->closeDbConnection($this->model->pdo);\n $return = true;\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return;\n }", "protected function runDatabaseCheck() {\n\t\t$this->showProgressMessage('Going to run database check.');\n\n\t\t$dbOperations = t3lib_div::makeInstance('tx_mnogosearch_dboperations');\n\t\t/* @var $dbOperations tx_mnogosearch_dboperations */\n\t\t$dbOperations->setIndexer($this->indexer);\n\t\t$dbOperations->checkAndCreate();\n\t}", "function IsExisting_UserDetails($dbhandle)\n{\n $logger = LoggerSingleton::GetInstance();\n $logger->LogInfo(\"IsExisting_UserDetails : Enter\");\n\n global $UserDetailsTable_Name;\n\n // check if table exists\n $query = \"SELECT 1 FROM $UserDetailsTable_Name LIMIT 1\";\n $status = $dbhandle->query($query);\n\n $logger->LogInfo(\"IsExisting_UserDetails : Exit - \");\n return $status;\n}", "function testTableExist()\n{\n\tglobal $db,$conf,$langs;\n\t\n\t$checktable = $db->query(\"SHOW TABLES LIKE '\".MAIN_DB_PREFIX.\"materiels'\");\n\tif (($checktable)&&($db->num_rows($checktable)<=0))\n\t{\n\t\t$db->query(\"CREATE TABLE \".MAIN_DB_PREFIX.\"materiels (rowid INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,ref VARCHAR(50) NOT NULL,socid INT(6),marque VARCHAR(50),model VARCHAR(50),noserie VARCHAR(50),options TEXT,note_public TEXT,date_achat DATE,garantie INT(1))\");\n\t}\n}", "public function validateDb()\r\n {\r\n if (!Az::$app->has($this->db)) {\r\n $this->addError('db', 'There is no application component named \"db\".');\r\n } elseif (!Az::$app->get($this->db) instanceof Connection) {\r\n $this->addError('db', 'The \"db\" application component must be a DB connection instance.');\r\n }\r\n }", "public function exists() : bool {\n return DB::tableExists($this->_name);\n }", "private function existsDatabase(string &$databaseName): bool\n {\n return $this->db\n ->newQuery()\n ->selectRaw('SCHEMA_NAME')\n ->fromRaw('INFORMATION_SCHEMA.SCHEMATA')\n ->whereRaw(\"SCHEMA_NAME = '{$databaseName}'\")\n ->count();\n }", "public function valid_db_database()\n\t{\n\t\treturn $this->db_validation(1049, function() {\n\t\t\tee()->form_validation->set_message(\n\t\t\t\t'valid_db_database',\n\t\t\t\tlang('database_invalid_database')\n\t\t\t);\n\t\t});\n\t}", "public static function DatabaseCheck() {\n try {\n // Check if database is initialized!\n if(Database::$instance == null) {\n throw new Exception(\"Database not initialized! Construct Database::\\$instance!\", 70);\n }\n // Check if database is complete\n Database::$instance->query(\"SELECT * \n FROM information_schema.tables\n WHERE table_schema = 'itp-minigames'\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) != 19)\n throw new Exception(\"Database not complete!\n Please add all tables that are needed to database!\", 71);\n \n // Check if platforms are correctly set up\n Database::$instance->query(\"SELECT * FROM `platform` ORDER BY PlatformID ASC\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) != 3)\n throw new Exception(\"Platform table not correctly set up!\", 72);\n else {\n if($result[0]['PlatformID'] != 1 || $result[0]['Name'] != \"Windows\")\n throw new Exception(\"Platform table not correctly set up!\", 73);\n if($result[1]['PlatformID'] != 2 || $result[1]['Name'] != \"Linux\")\n throw new Exception(\"Platform table not correctly set up!\", 74);\n if($result[2]['PlatformID'] != 3 || $result[2]['Name'] != \"Mac OS\")\n throw new Exception(\"Platform table not correctly set up!\", 75);\n }\n \n // Check if default profile picture path is set\n Database::$instance->query(\"SELECT `PictureID`, `SourcePath`, `ThumbnailPath`\n FROM `picture` WHERE `SourcePath` = 'resources/profilePictures/default.png'\n AND `ThumbnailPath` = 'resources/profilePictures/defaultThumbnail.jpeg';\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) == 0)\n throw new Exception(\"No default profile picture database entry found! Inserting default path.\", 76);\n\n // Check for available admin user\n Database::$instance->query(\"SELECT * FROM `user` WHERE `Usertype` = 'admin'\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) == 0)\n throw new Exception(\"No administrator user found! Inserting default administrator.\", 77);\n\n Database::$instance->query(\"SELECT * FROM `forum` WHERE ForumID = 1\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) == 0) {\n throw new Exception(\"ForumID 1 is not in the Database!\", 78);\n }\n\n // Check if developer forum is number 1\n Database::$instance->query(\"SELECT * FROM `game` WHERE FK_ForumID = 1\");\n $result = Database::$instance->fetchAll();\n if(sizeof($result) == 1) {\n throw new Exception(\"ForumID 1 is reserved for the developer forum, please change the ForumID of the specific game to a new one!\", 79);\n }\n\n }\n catch(Exception $e) {\n switch($e->getCode()) {\n // Invalid platform\n case 72:\n case 73:\n case 74:\n case 75:\n // Autogenerate the platform table\n // Clear table platform\n Database::$instance->query(\"DELETE FROM `platform`\");\n // Reset auto increment value\n Database::$instance->query(\"ALTER TABLE `platform` AUTO_INCREMENT = 1\");\n // Insert correct platforms \n Database::$instance->query(\"INSERT INTO `platform` (`PlatformID`, `Name`)\n VALUES ('1', 'Windows'), ('2', 'Linux'), ('3', 'Mac OS')\");\n break;\n case 76:\n Database::$instance->query(\"INSERT INTO `picture`(`SourcePath`, `ThumbnailPath`) VALUES ('resources/profilePictures/default.png','resources/profilePictures/defaultThumbnail.jpeg')\");\n break;\n case 77:\n // Get id of default profile picture\n Database::$instance->query(\"SELECT `PictureID`\n FROM `picture` WHERE `SourcePath` = 'resources/profilePictures/default.png'\n AND `ThumbnailPath` = 'resources/profilePictures/defaultThumbnail.jpeg';\");\n $result = Database::$instance->fetchArray();\n $pictureId = $result['PictureID'];\n $password = password_hash(InitializationService::$defaultAdminPassword, PASSWORD_DEFAULT);\n $username = InitializationService::$defaultAdminUsername;\n Database::$instance->query(\"INSERT INTO `user` (`FirstName`, `LastName`, `Username`, `Email`, `Usertype`, `Password`, `FK_PictureID`) VALUES ('admin', 'admin', '$username', '[email protected]', 'admin', '$password', $pictureId)\");\n break;\n case 78:\n Database::$instance->query(\"INSERT INTO `forum` ( `ForumID` ) VALUES ( 1 )\");\n break;\n }\n throw $e;\n }\n // Return true if everything is correctly set up\n return true;\n }", "public function testExists()\n {\n \t$game_factory = factory(Game::class)->create();\n\n $this->assertDatabaseHas($game_factory->getTable(), ['game_hash_file' => $game_factory->game_hash_file]);\n }", "public function tableExists()\n {\n /**\n * Here we check to see if a table with that name already exists.\n */\n $mysqli = $this->getMysqli();\n $SQL = \"SHOW TABLES LIKE '\".$this->vars['db']['table'].\"'\";\n // echo $SQL;\n if (!$result = $mysqli->query($SQL)) {\n echo $mysqli->error;\n exit();\n }\n return !($result->num_rows == 0);\n }", "public function does_database_have_data() {\n\t\tglobal $wpdb;\n\n\t\t$tableprefix = $wpdb->prefix;\n\t\t$simple_history_table = self::DBTABLE;\n\n\t\t$sql_data_exists = \"SELECT id AS id_exists FROM {$tableprefix}{$simple_history_table} LIMIT 1\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$data_exists = (bool) $wpdb->get_var( $sql_data_exists, 0 );\n\n\t\treturn $data_exists;\n\t}", "public function check_db_tables(){\n\t\t$query = $this->db->prepare(\"SELECT * FROM `nw_users`\");\n\n\t\ttry{\n\t\t\t$query->execute();\n\t\t\t$check = $query->fetch();\n\t\t\tif($check == \"\"){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\t\n\n\t\t}catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "function create_database() {\n\ttry {\n\t\t// Set the data source name.\n\t\t$dsn = 'mysql:host=' . DATABASE_HOST . ';charset=utf8';\n\t\t\n\t\t// Attempt to establish the connection.\n\t\t$db = new PDO($dsn, DATABASE_USER, DATABASE_PASS);\n\n\t\t// We want to catch PDOExceptions.\n\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t// Does the database already exist?\n\t\t$statement = $db->prepare('SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ?');\n\t\t$statement->execute([ DATABASE_NAME ]);\n\n\t\tif ($statement->rowCount() > 0) {\n\t\t\t// Drop it, because we want to reinstall.\n\t\t\t$db->query('DROP DATABASE ' . DATABASE_NAME);\n\t\t}\n\n\t\t// Create the database.\n\t\t$db->query('CREATE DATABASE ' . DATABASE_NAME);\n\t\n\t\t// Set UTF8 as the default character set.\n\t\t$db->query('ALTER DATABASE ' . DATABASE_NAME . ' CHARACTER SET utf8 COLLATE utf8_general_ci');\n\n return true;\n\n\t} catch (PDOException $e) {\n\t\techo '<pre>';\n\t\tprint_r($e);\n\t\techo '</pre>';\n\t\treturn false;\n\n\t} catch (Exception $e) {\n\t\treturn false;\n\t}\n}", "function checkExists($url)\n{\n\t$db = new SQLite3(DB_NAME);\n\t$query = \"SELECT * FROM URL WHERE url='$url' LIMIT 1\";\n\t$exec = $db->query($query);\n\t$count = count($exec->fetchArray());\n\tif($count==1)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t\treturn true;\n}", "public function update_db_check() {\n\t\t// Add a database version to help with upgrades and run SQL install\n\t\tif ( !get_option( 'vfb_pro_db_version' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\n\t\t// If database version doesn't match, update and maybe run SQL install\n\t\tif ( version_compare( get_option( 'vfb_pro_db_version' ), $this->vfb_db_version, '<' ) ) {\n\t\t\tupdate_option( 'vfb_pro_db_version', $this->vfb_db_version );\n\t\t\t$this->install_db();\n\t\t}\n\t}", "function formExists($formName){\r\n\tglobal $db;\r\n\t$sql = \"SELECT form FROM forms WHERE form ='$formName' \";\r\n\r\n\tif(!$db) connectDb();\r\n\ttry {\r\n\t\t$result = $db->query($sql);\r\n\t}\r\n\tcatch (PDOException $e) {\r\n\t\t$error = $e->getMessage();\r\n\t}\r\n\r\n\tif($result!==false) \r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function createDB() {\r\n\t\t\r\n\t\tif( $this->state != 1 ) return false;\r\n\t\t\r\n\t\tglobal $dbName;\r\n\t\t$r = mysql_query( \"CREATE DATABASE `$dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\" );\r\n\t\t$this->connect();\r\n\t\t\r\n\t\treturn $r;\r\n\t}", "public function validateDb()\n {\n if (!Yii::$app->has($this->db)) {\n $this->addError('db', 'There is no application component named \"db\".');\n } elseif (!Yii::$app->get($this->db) instanceof Connection) {\n $this->addError('db', 'The \"db\" application component must be a DB connection instance.');\n }\n }", "function exists($checkdb=false) {\n\t\tif ((int)$this->rs[$this->pkname] < 1)\n\t\t\treturn false;\n\t\tif ((int)$this->rs[$this->ckname] < 1)\n\t\t\treturn false;\n\t\tif (!$checkdb)\n\t\t\treturn true;\n\t\t\t\n\t\t$dbh=$this->getdbh();\n\t\t$sql = 'SELECT 1 FROM '.$this->enquote($this->tablename).' WHERE '\n\t\t.$this->enquote($this->pkname).\"='\".$this->rs[$this->pkname].\"' and \"\n\t\t.$this->enquote($this->ckname).\"='\".$this->rs[$this->ckname].\"'\";\n\t\t$result = $dbh->query($sql)->fetchAll();\n\t\treturn count($result);\n\t}", "function sql_table_exists($table) {\n\t$sql = sql_connect();\n\tif( !$sql ){\n\t\treturn false;\n\t}\n\ttry {\n\t\t$result = $sql->query(sql_select($table, '1'));\n\t} catch (Exception $e) {\n\t\treturn FALSE;\n\t}\n\treturn $result !== FALSE;\n}", "public function testDatabase()\n\t{\n\t\t// Or use putenv('TEST_DATABASE=true') in your tests to throw an error\n\t\tif (env('TEST_DATABASE', false) == true) {\n\t\t\tthrow new Exception('TEST_DATABASE_REGISTER', 422);\n\t\t}\n\t}", "function createDB($db)\n{\n require_once 'Doctrine/lib/Doctrine.php';\n spl_autoload_register(array('Doctrine', 'autoload'));\n\n try {\n $db = Doctrine_Manager::connection(\"sqlite:///$db\");\n $path = '@include_path@/HTTP/Session2/Container/Doctrine';\n$path = '/Applications/xampp/htdocs/phpcvs/pear/HTTP_SESSION2/HTTP/Session2/Container/Doctrine';\n $sql = Doctrine::generateSqlFromModels($path);\n $db->execute($sql);\n } catch (Doctrine_Exception $e) {\n if (!strstr($e->getMessage(), 'already exists')) {\n die(\"createDB sql error: {$e->getMessage()} ({$e->getCode()})\");\n }\n }\n}", "public function ensureExists() {\n\t\t$sql = <<<SQL\nCREATE TABLE IF NOT EXISTS $this->tableName (\n id int(10) NOT NULL AUTO_INCREMENT,\n title varchar(300) NOT NULL UNIQUE,\n year int(4) NOT NULL,\n rating int(2),\n PRIMARY KEY (id));\n\n insert into $this->tableName(title, year, rating)\n values(\"The Maltese Falcon\", 1941, 10),\n (\"Felis Noir\", 2016, 8)\nSQL;\n\n\t\t$this->site->pdo()->query($sql);\n\t}", "private function verify ()\n {\n // test if Database exists\n try {\n $db = $this->getDefaultAdapter();\n } catch (Exception $e) {\n throw new Zend_Exception($e->getMessage());\n }\n \n // test if table exists\n try {\n $result = $db->describeTable($this->_name);\n \n if (empty($result)) {\n $this->createTable();\n $this->insertRows();\n }\n } catch (Exception $e) {\n $this->createTable();\n $this->insertRows();\n }\n }", "function radius_sql_exists($name)\n{\n $exists = false;\n global $environments;\n \n if(!array_key_exists($name, $environments)) return $exists;\n\n $id = $environments[$name]['_id'] . \"@miiicasa.com\";\n\n $dbconn = pg_connect(\"host=localhost port=5432 dbname=radius user=postgres\");\n $result = pg_query_params($dbconn, 'SELECT * FROM radcheck WHERE username = $1', array($id));\n if(pg_num_rows($result) > 0) $exists = true;\n \n pg_close($dbconn);\n\n return $exists;\n}", "function create_database() \r\n {\r\n \t\t\t$this->tx_cbywebdav_devlog(1,\"create_database\",\"cby_webdav\",\"create_database\");\r\n\r\n // TODO\r\n return false;\r\n }", "protected function checkIfDbalExtensionIsInstalled() {}", "private function doTablesExist()\n {\n $query = \"SELECT COUNT(*) AS count FROM sqlite_master WHERE name IN ('games', 'events') AND type = 'table'\";\n $result = $this->oDB->getFirst($query);\n\n return $result['count'] == 2;\n }", "protected function _setupDb()\n {\n // First, delete the DB if it exists\n $this->_teardownDb();\n \n // Then, set up a clean new DB and return it\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n return Sopha_Db::createDb($db, $host, $port);\n }", "static function using_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\treturn $dbConn && (substr($dbConn->currentDatabase(),0,5) == 'tmpdb');\n\t}", "function dbtest() {\n\tif ($dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)) {\n\t\tif (!mysql_select_db(DB_NAME)) {\n\t\t\t$error_str = \"Error: Could not select database: \" . dberror();\n\t\t} else {\n\t\t\tdbclose($dbc);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t$error_str = \"Error: Could not connect to database: \" . dberror();\n\t}\n\treturn false;\n}", "public static function nameAvailable( $name )\n {\n Database::all();\n\n if( !(preg_replace(\"/[^0-9]+/\", \"\", $name) == $name) )\n {\n if( (count($name) <= 16) && (count($name) > 0) )\n {\n if( preg_replace(\"/[^a-z0-9]+/\", \"\", $name) == $name )\n {\n if( !Database::DB( $name ) )\n {\n return true;\n }\n else{ commandResult( 403, \"Database \" . $name . \" already exists.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") must be lower case alphanumeric.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") cannot be longer than 16 characters.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") cannot be a number alone.\" ); }\n\n return false;\n }", "function new_db( $name )\n\t{\n\t $sql = \"CREATE DATABASE \" . $name;\n\t\tif ( $this->checkup( \"\", $sql ) != true ) {\n\t\t\treturn $this->error( \"an error occured!\" );\n\t\t}\n\t\tif ( mysql_query ( $sql , $this->CONN ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn $this->error ( \"error while creating database '$name'!\" );\n\t\t}\n\t}", "function installDatabase()\n\t{\n\t\tif (!$this->setup->getClient()->db_exists)\n\t\t{\n\t\t\tif ($_POST[\"chk_db_create\"])\n\t\t\t{\n\t\t\t\tif (!$this->setup->createDatabase($_POST[\"collation\"]))\n\t\t\t\t{\n\t\t\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);\n\t\t\t\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt(\"database_not_exists_create_first\"), true);\n\t\t\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t\t\t}\n\t\t}\n\t\tif (!$this->setup->installDatabase())\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"database_installed\"), true);\n\t\t}\n\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t}", "function tableExist($table, $database=false){\n if(empty($database)){\n $result = $this->query(\"SELECT DATABASE()\");\n $row = $this->fetchArray($result);\n $database = $row[0];\n }\n $result = $this->query(\"SELECT `table_name` FROM `information_schema`.`tables` WHERE `table_schema` = '{$database}' AND `table_name` = '{$table}'\");\n $numRows = $this->numRows($result);\n return $numRows > 0;\n }", "function VerifyPlayersTable($connection, $dbName) {\r\n if(!TableExists(\"players\", $connection, $dbName)) \r\n { \r\n\techo(\"Can't find players table\");\r\n}\r\n}", "public function exist(): bool { // 返回是否已经在数据库中存在\n return $this->InformationValid;\n }", "function dormTableExists($dormTable) {\n $sql = \"SELECT * FROM $dormTable\";\n if (query($sql) !== FALSE) \n return true;\n else \n return false; \n }", "public function checkDbVersion()\n {\n if ( GALETTE_MODE === 'DEV' ) {\n Analog::log(\n 'Database version not checked in DEV mode.',\n Analog::INFO\n );\n return true;\n }\n try {\n $select = new \\Zend_Db_Select($this->db);\n $select->from(\n PREFIX_DB . 'database',\n array('version')\n )->limit(1);\n $sql = $select->__toString();\n $res = $select->query()->fetch();\n return $res->version === GALETTE_DB_VERSION;\n } catch ( \\Exception $e ) {\n Analog::log(\n 'Cannot check database version: ' . $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "public function testExists()\n {\n $this->assertFalse(TableRegistry::exists('Articles'));\n\n TableRegistry::config('Articles', ['table' => 'articles']);\n $this->assertFalse(TableRegistry::exists('Articles'));\n\n TableRegistry::get('Articles', ['table' => 'articles']);\n $this->assertTrue(TableRegistry::exists('Articles'));\n }", "public function existsInDb($dh) {\n $info = $this->getDbInfo($dh);\n return isset($info[\"user\"]);\n }", "public function testCheckTableExist() {\n\n\t}" ]
[ "0.82061476", "0.8138522", "0.7823927", "0.7654133", "0.7641225", "0.75991696", "0.75792825", "0.7383631", "0.73750216", "0.7296919", "0.726372", "0.7212905", "0.7189636", "0.7186857", "0.7182226", "0.7101757", "0.70768374", "0.7069163", "0.70016026", "0.6931981", "0.6925691", "0.68794996", "0.68385917", "0.68367994", "0.6787438", "0.67805976", "0.6697032", "0.6692183", "0.66700625", "0.6667503", "0.6622828", "0.66009647", "0.6599011", "0.6574888", "0.65567493", "0.65472573", "0.65114063", "0.6503901", "0.6502232", "0.6466116", "0.6465248", "0.64520776", "0.64490205", "0.6437416", "0.6403776", "0.6385668", "0.63833475", "0.6351308", "0.6336424", "0.63312215", "0.63234776", "0.63171196", "0.6299694", "0.62788", "0.6277828", "0.6270525", "0.6270051", "0.626528", "0.6261379", "0.6246836", "0.62439424", "0.62396604", "0.6228257", "0.62203246", "0.6218983", "0.6216695", "0.6196687", "0.61896557", "0.6185688", "0.6164789", "0.615692", "0.6135286", "0.6134561", "0.6132104", "0.6128613", "0.61214614", "0.6119642", "0.61189383", "0.61158615", "0.6109647", "0.6102752", "0.6091239", "0.6090772", "0.6078313", "0.60767937", "0.6068558", "0.60656846", "0.6063256", "0.6061042", "0.60564035", "0.60456294", "0.60384566", "0.60337776", "0.6032515", "0.6031323", "0.6029129", "0.60277134", "0.60108674", "0.6004869", "0.5994496", "0.59786636" ]
0.0
-1
Determine whether the user can view any auth keys.
public function viewAny(User $user) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public function isAuth()\n {\n return !empty($this->getAuth());\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function isAuth();", "public static function isAuth() : bool\n {\n return null !== self::$fullUser;\n }", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }", "function auth_required() {\n $authinconfig = $this->config->taverna->needAuth;\n if (strcasecmp($authinconfig, 'false') == 0) {\n return FALSE; //no authorization required so we are authorized\n }\n return TRUE;\n }", "public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function isAuth() {\n $connector = Mage::getSingleton('vidtest/connector')->getApiModel($this->getApiModelCode());\n return $connector->isLoggedIn();\n }", "public function hasSpecificAuthorization() {\n return $this->_has(10);\n }", "public function isAuth() {}", "public function authorize()\n {\n return request()->user() != null;\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "private function is_authenticated()\n {\n if($this->mode == rabkTwttr::MODE_APP)\n return isset($_SESSION['access_token']);\n \n if($this->mode == rabkTwttr::MODE_USER)\n return isset($_SESSION['access_token']) && isset($_SESSION['access_token_secret']);\n }", "public function isAuthorized() {}", "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 }", "private function needs_auth($key) {\r\n $needs_auth = (phpsaaswrapper()->needs_auth($key) == 'true') ? true : false;\r\n if($needs_auth) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function needsAuth() {\n $v = $this->getVersion();\n return $v['functions']['auth'];\n }", "public function authorize()\n {\n return Auth::user()->hasAnyRole(['kuchar', 'manager']);\n }", "protected function authRequired()\n {\n return true;\n }", "public function is_auth()\r\n\t{\r\n\t\tstatic $authorized = null;\r\n\r\n\t\tif(isset($authorized))\r\n\t\t\treturn $authorized;\r\n\r\n\t\t$authorized = false;\r\n\t\t$token = Options::get('picasa_token_' . User::identify()->id);\r\n\r\n\t\tif($token != null)\r\n\t\t\t$authorized = true;\r\n\r\n\t\treturn $authorized;\r\n\t}", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-inventory', 'manage-inventory'], true);\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "protected function hasAuth()\n {\n return !! $this->options['authentication'];\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function hasAuthorization(): bool;", "public function isAuth() {\n\t\tif($this->auth === null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }", "public function checkAuth() {\n\n /*\n * Dummy stuff - just to test the authentication loop\n */\n if ($_SERVER['PHP_AUTH_USER'] === $this->config['general']['admin']['user'] && $_SERVER['PHP_AUTH_PW'] === $this->config['general']['admin']['password']) {\n return true;\n }\n\n return false;\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function getAuthenticationAvailable();", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function is_auth_required() {\r\n\r\n\t\treturn false;\r\n\t}", "public static function getAuth()\n {\n if( !isset($_SESSION['FOXY_userid']) ) {\n return false;\n }\n return true;\n }", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "public function 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}", "public function isAuthValid() {\n if (is_null($this->getUserId())) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n $contact = $this->route('contact');\n\n return $contact->user_id == auth()->id() || user()->acl < 9;\n }", "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->hasAnyRol([\n 'contractor-superadmin',\n 'contractor-manager',\n 'contractor-worker',\n 'contractor-admin',\n ]);\n }", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "function canDisplayCredentials()\n\t{\n\t\treturn env('SHOW_CREDENTIALS','false') == 'true';\n\t}", "public function checkAuth();", "public function checkAuth();", "public static function getAuthList()\n\t{\n\t\treturn !empty(MHTTPD::$config['Auth']) ? MHTTPD::$config['Auth'] : false;\n\t}", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "protected function needsAuthentication()\n {\n return !empty($this->authType);\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess||Auth::user()->allowAdminAccess);\n }", "protected function authorityControl()\n {\n return Authority::can(Permission::ACTION_R, 'Queries');\n }", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "public static function canDisplayAccountsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ACCOUNT);\n\t}", "private function hasAccess() {\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn $this->userHasAccessToPages() && $this->userHasAccessToTables();\n\t}", "public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "function user_AuthHas(...$args) {\n\tglobal $AUTH;\n\t\n\tif ( !isset($AUTH['permission']) ) {\n\t\treturn false;\n\t}\n\t\n\t// Check if user has all permissions\n\tforeach ( $args as $arg ) {\n\t\tif ( !in_array($arg,$AUTH['permission']) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn true;\n}", "public function authorize()\n {\n return !Auth::guest();\n }", "public function isAuth( ) {\n\t\tif( $this->getName() == null || $this->getId() == -1 ) {\n\t\t\treturn false;\n\t\t} elseif( isset($_SESSION) ) {\n\t\t\t// Make sure we have all the required session values.\n\t\t\tforeach( $this->SESSION_KEYS_USED as $key ){\n\t\t\t\tif( ! array_key_exists($key, $_SESSION) ){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isAuthenticated()\n {\n return $this->getUser() !== null;\n }", "public function checkAccess()\n {\n // Check token in headers\n if (isset($_SERVER['HTTP_TOKEN'])) {\n return $_SERVER['HTTP_TOKEN'] === Configuration::get('MARMIADS_TOKEN');\n }\n\n // Check token in GET or POST\n return Tools::getValue('token') === Configuration::get('MARMIADS_TOKEN');\n }", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "public function isAuthenticate()\n {\n return !empty($this->access_token);\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}", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "public function isRestricted()\n {\n if ($this->_isRestricted !== null) {\n return $this->_isRestricted;\n }\n if ($this->private) {\n $this->_isRestricted = true;\n return true;\n }\n $tabs = array(\n 'source_access_rights',\n 'issues_access_rights',\n 'downloads_access_rights',\n 'wiki_access_rights',\n 'review_access_rights'\n );\n $conf = $this->getConf();\n foreach ($tabs as $tab) {\n if (!in_array($conf->getVal($tab, 'all'),\n array('all', 'none'))) {\n $this->_isRestricted = true;\n return true;\n }\n }\n $this->_isRestricted = false;\n return false;\n }", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }" ]
[ "0.7311336", "0.7311336", "0.6992952", "0.6953791", "0.6908594", "0.689607", "0.68775856", "0.68194455", "0.68071055", "0.67989105", "0.67931837", "0.67931837", "0.6769009", "0.67582893", "0.6753815", "0.67512685", "0.67490816", "0.67455643", "0.67341554", "0.6729043", "0.6722482", "0.6683324", "0.6673822", "0.6650132", "0.66411567", "0.6637403", "0.6627309", "0.66239", "0.662344", "0.6620321", "0.66146094", "0.66026545", "0.6601098", "0.66004324", "0.6598836", "0.659288", "0.6581348", "0.657523", "0.6566093", "0.6563119", "0.65346867", "0.6520814", "0.6520377", "0.6514324", "0.6507528", "0.65027094", "0.6499153", "0.6499153", "0.64955413", "0.64952964", "0.6486655", "0.64849335", "0.64849335", "0.64659214", "0.6463536", "0.6462441", "0.6457582", "0.64567095", "0.64480245", "0.6433868", "0.6428921", "0.6426457", "0.6420299", "0.64170104", "0.64009804", "0.6399368", "0.6396553", "0.6383595", "0.63826954", "0.6379956", "0.6372882", "0.637241", "0.63704324", "0.63678735", "0.63678735", "0.6357185", "0.63477886", "0.6339578", "0.63393676", "0.63373053", "0.6336287", "0.6331988", "0.6330262", "0.6328904", "0.6328478", "0.6322553", "0.6317225", "0.6315397", "0.63108486", "0.6304429", "0.6303649", "0.62973917", "0.62973917", "0.62932456", "0.62918955", "0.62787265", "0.6277834", "0.62746525", "0.62746143", "0.62721825", "0.62696433" ]
0.0
-1
Determine whether the user can view the auth key.
public function view(User $user, ServerAuthKey $key) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "private function needs_auth($key) {\r\n $needs_auth = (phpsaaswrapper()->needs_auth($key) == 'true') ? true : false;\r\n if($needs_auth) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public function is_auth()\r\n\t{\r\n\t\tstatic $authorized = null;\r\n\r\n\t\tif(isset($authorized))\r\n\t\t\treturn $authorized;\r\n\r\n\t\t$authorized = false;\r\n\t\t$token = Options::get('picasa_token_' . User::identify()->id);\r\n\r\n\t\tif($token != null)\r\n\t\t\t$authorized = true;\r\n\r\n\t\treturn $authorized;\r\n\t}", "public function isAuth();", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return $this->user() != null;\n }", "public function isAuthValid() {\n if (is_null($this->getUserId())) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}", "public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }", "public function isAuth() {\n $connector = Mage::getSingleton('vidtest/connector')->getApiModel($this->getApiModelCode());\n return $connector->isLoggedIn();\n }", "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}", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function isAuth() {}", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isAuth()\n {\n return !empty($this->getAuth());\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public static function getAuth()\n {\n if( !isset($_SESSION['FOXY_userid']) ) {\n return false;\n }\n return true;\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\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 }", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "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 auth_required() {\n $authinconfig = $this->config->taverna->needAuth;\n if (strcasecmp($authinconfig, 'false') == 0) {\n return FALSE; //no authorization required so we are authorized\n }\n return TRUE;\n }", "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public static function isAuth() : bool\n {\n return null !== self::$fullUser;\n }", "public function isAuthorized() {\n\t\t\n\t}", "private function is_authenticated()\n {\n if($this->mode == rabkTwttr::MODE_APP)\n return isset($_SESSION['access_token']);\n \n if($this->mode == rabkTwttr::MODE_USER)\n return isset($_SESSION['access_token']) && isset($_SESSION['access_token_secret']);\n }", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n $id = Auth::id();\n $livro = $this->route('livro');\n if ($livro!=NULL) {\n $author = $livro->user_id;\n return $author == $id ? true : false;\n }\n else\n return true;\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }", "public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "static public function current_user_can( $key ) {\n\t\t$user\t = wp_get_current_user();\n\t\t$settings = self::get_saved_settings();\n\n\t\t// Return false if no settings saved.\n\t\tif ( ! isset( $settings[ $key ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Make sure super admins have administrator access.\n\t\tif ( is_multisite() && is_super_admin() && ! in_array( 'administrator', $user->roles ) ) {\n\t\t\t$user->roles[] = 'administrator';\n\t\t}\n\n\t\t// Check the user's roles against the saved settings.\n\t\tforeach ( $user->roles as $role ) {\n\n\t\t\t// Return true if the user has access.\n\t\t\tif ( isset( $settings[ $key ][ $role ] ) && $settings[ $key ][ $role ] ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function hasAuthorization(): bool;", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function isAuthenticated();", "public function isAuthenticated();", "public function isAuthenticated();", "public function isAuthenticated();", "public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "public function isAuth() {\n\t\tif($this->auth === null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public function checkAuth();", "public function checkAuth();", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "public function authorize()\n\t{\n $subjectId = $this->route('subject');\n\n return Subject::find($subjectId)->user->id == Auth::id();\n\t}", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "protected function authRequired()\n {\n return true;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "function canDisplayCredentials()\n\t{\n\t\treturn env('SHOW_CREDENTIALS','false') == 'true';\n\t}", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function needsAuth() {\n $v = $this->getVersion();\n return $v['functions']['auth'];\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-inventory', 'manage-inventory'], true);\n }", "public function authorize(): bool\n {\n return auth('api')->check();\n }", "public function authorize(): bool\n {\n return auth('api')->check();\n }", "public function checkAuth() {\n\n /*\n * Dummy stuff - just to test the authentication loop\n */\n if ($_SERVER['PHP_AUTH_USER'] === $this->config['general']['admin']['user'] && $_SERVER['PHP_AUTH_PW'] === $this->config['general']['admin']['password']) {\n return true;\n }\n\n return false;\n }", "public function authorize(): bool\n {\n return config('fenerum.webhook_auth_username') === $this->getUser() &&\n config('fenerum.webhook_auth_password') === $this->getPassword();\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n return Auth::user()->hasAnyRole(['kuchar', 'manager']);\n }", "public function authorize()\n {\n $contact = $this->route('contact');\n\n return $contact->user_id == auth()->id() || user()->acl < 9;\n }", "public function authorize(): bool\n {\n return \\Auth::check();\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess||Auth::user()->allowAdminAccess);\n }" ]
[ "0.71165687", "0.70232266", "0.70149255", "0.6954253", "0.6951727", "0.69380736", "0.69380736", "0.6935705", "0.6929637", "0.68999326", "0.6896748", "0.6879138", "0.6869468", "0.6834831", "0.6834831", "0.6830553", "0.6830075", "0.6816279", "0.6816279", "0.68064576", "0.6795059", "0.67939043", "0.6789919", "0.6789791", "0.6778241", "0.6772849", "0.67685306", "0.67589396", "0.6744449", "0.6742629", "0.6741077", "0.67348784", "0.6732519", "0.67178625", "0.6712977", "0.6709012", "0.66923475", "0.6661562", "0.6661562", "0.6659235", "0.6644193", "0.6643505", "0.66352147", "0.66225487", "0.66112924", "0.66059065", "0.6605572", "0.6604901", "0.6594859", "0.6594187", "0.65916264", "0.6591013", "0.65824944", "0.65800786", "0.6578005", "0.65714896", "0.6560722", "0.6554614", "0.65521246", "0.6546813", "0.6545621", "0.6542802", "0.65394175", "0.6538887", "0.6538076", "0.6536651", "0.65354115", "0.65354115", "0.65354115", "0.65354115", "0.6522804", "0.652065", "0.65195256", "0.6516022", "0.65101415", "0.6508873", "0.6507476", "0.6500611", "0.6496541", "0.6496541", "0.64953065", "0.6493464", "0.64913696", "0.6481366", "0.6479139", "0.64774936", "0.64774936", "0.64750075", "0.64711744", "0.64668584", "0.64613366", "0.6457399", "0.6457399", "0.64542377", "0.64509773", "0.64504874", "0.644875", "0.6432332", "0.642951", "0.64261335", "0.64255" ]
0.0
-1
Determine whether the user can create auth keys.
public function create(User $user) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }", "public function authorize()\n {\n return request()->user()->tokenCan('user_create');\n }", "public function authorize()\n {\n return $this->user()->can('user.create');\n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "function requiresAuth()\n {\n return parent::requiresAuth() ||\n $this->create || $this->delete;\n }", "public function authorize() : bool\n {\n return auth()->user()->can('create', GroupSetting::class);\n }", "public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }", "public function authorize()\n {\n $user = Auth::user();\n\n $foodAddition = new FoodAddition();\n\n if((!$user->can('create', $foodAddition)) || (!$user->can('create-food-addition'))) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n return auth()->user()->can('create', Task::class);\n }", "private function canCreate()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->user()->can(\"Crear Nómina\");\n }", "public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}", "public function authorize()\n {\n return auth()->user()->can('create-buildings');\n }", "public function authorize()\n {\n return $this->user()->can('create mindoro transaction');\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function create_user_key() : bool {\n\t\t$req = self::init_req( ( (object) self::$URLS )->post );\n\t\tif( is_null( $req ) ){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tself::$httpResponseText = curl_exec( $req );\n\t\t\tself::$httpCode = curl_getinfo( $req, CURLINFO_HTTP_CODE );\n\t\t\tcurl_close( $req );\n\t\t\treturn true;\n\t\t}\n\t}", "public function canManageCredentials()\n {\n return true;\n }", "function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function canCreateAccounts()\n {\n return false;\n }", "function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }", "private function needs_auth($key) {\r\n $needs_auth = (phpsaaswrapper()->needs_auth($key) == 'true') ? true : false;\r\n if($needs_auth) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function canCreate();", "public function canCreate();", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "function auth_required() {\n $authinconfig = $this->config->taverna->needAuth;\n if (strcasecmp($authinconfig, 'false') == 0) {\n return FALSE; //no authorization required so we are authorized\n }\n return TRUE;\n }", "public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }", "public function isAuthValid() {\n if (is_null($this->getUserId())) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function authorize()\n {\n // return auth()->user()->can('create user');\n return true;\n }", "public function authorize(): bool\n {\n return auth()->user()->can('create academic year unit levels');\n }", "public function authorize() {\n\t\treturn $this->user()->can('create', Pdf::class);\n\t}", "public function authorize(): bool\n {\n return $this->user()->can('create_contact');\n }", "public function authorize()\n {\n $user = $this->user();\n return $user->can('add-user');\n }", "protected function authRequired()\n {\n return true;\n }", "public function authorizePost()\n {\n return $this->user()->can('acme.create');\n }", "public function authorize()\n {\n\t\treturn $this->user()->can('create', Collection::class);\n }", "public function authorize(): bool\n {\n return $this->user()->can('create', Role::class);\n }", "public function authorize()\n {\n return auth()->user()->can('create', Pizza::class);\n }", "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "function canCreateAccounts() {\n return false;\n }", "public function authorize(): bool\n {\n return config('fenerum.webhook_auth_username') === $this->getUser() &&\n config('fenerum.webhook_auth_password') === $this->getPassword();\n }", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function authorize()\n\t{\n\t\t// La autorización siempre será true por que cualquier usuario podrá\n\t\t// crear álbumes y nosotros se los asociaremos al usuario\n\t\t// que tiene la sesión creada.\n\t\treturn true;\n\t}", "public function authorize()\n {\n return $this->permissionGuard()->allowsCreate($this->newModelInstance());\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return $this->user()->hasPermission('subscription-service-create-plan');\n }", "public function authorize()\n {\n return Auth::user()->hasAnyRole(['kuchar', 'manager']);\n }", "public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "public function is_auth()\r\n\t{\r\n\t\tstatic $authorized = null;\r\n\r\n\t\tif(isset($authorized))\r\n\t\t\treturn $authorized;\r\n\r\n\t\t$authorized = false;\r\n\t\t$token = Options::get('picasa_token_' . User::identify()->id);\r\n\r\n\t\tif($token != null)\r\n\t\t\t$authorized = true;\r\n\r\n\t\treturn $authorized;\r\n\t}", "public function isAuth();", "public function checkAuth() {\n\n /*\n * Dummy stuff - just to test the authentication loop\n */\n if ($_SERVER['PHP_AUTH_USER'] === $this->config['general']['admin']['user'] && $_SERVER['PHP_AUTH_PW'] === $this->config['general']['admin']['password']) {\n return true;\n }\n\n return false;\n }", "public function is_auth_required() {\r\n\r\n\t\treturn false;\r\n\t}", "public function authorize()\n {\n return $this->user()->can('Crear Departamentos');\n\n }", "public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }", "function user_AuthHas(...$args) {\n\tglobal $AUTH;\n\t\n\tif ( !isset($AUTH['permission']) ) {\n\t\treturn false;\n\t}\n\t\n\t// Check if user has all permissions\n\tforeach ( $args as $arg ) {\n\t\tif ( !in_array($arg,$AUTH['permission']) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn true;\n}", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "protected function canCreate() {}", "public function isAuth() {}", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function needsAuthentication()\n {\n return !empty($this->authType);\n }", "public function authorize()\n {\n return auth()->user()->can('create-product-packages');\n }", "public function authorize(): bool\n {\n return !auth()->check();\n }", "public function create($user)\n {\n return $user->hasPermissionTo('create ' . static::$key);\n }", "public function validateAuthKey($authKey): bool;", "public function create(User $user)\n {\n return $user->can('create user');\n }", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "public function allowCoreToManageKeys(): bool\n {\n return $this->coreKeyManagement;\n }", "public function authorize() : bool\n {\n return Auth::guard('store')->check();\n }", "public function authorize(): bool\n {\n return Auth::check() && Auth::user()->can('web.user.transcripts.update');\n }", "public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "private function checkPermissions()\n {\n $hasPermission = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $permissionObj = new Permission($this->getDb(), $user);\n $hasPermission = $permissionObj->get(\"ettcApi/project/create\");\n }\n\n return $hasPermission;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function hasAuthorization(): bool;", "public function authorize()\n {\n return true;\n //return auth()->user()->can('user-create');\n }", "public function authorize()\n {\n return auth()->user()->can('manage-users');\n }", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "public function authorize()\n {\n return auth()->user()->can('role@create') || auth()->user()->can('role@edit');\n }", "public function isAuth()\n {\n return !empty($this->getAuth());\n }", "#[Pure]\n public function create(User $user): bool\n {\n return $user->noTokenOrTokenCan('create-oauth_clients');\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function create(User $user) : bool\n {\n return $user->isAdmin() || $user->hasPermission('create_user') || $user->hasPermission('create_all');\n }", "public function checkAuth();", "public function checkAuth();", "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}", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }" ]
[ "0.6793201", "0.667927", "0.6672964", "0.66629946", "0.66337085", "0.65405536", "0.65239227", "0.65009564", "0.6405132", "0.63977623", "0.6390538", "0.6382776", "0.63803464", "0.637184", "0.6364304", "0.63537645", "0.6347217", "0.634115", "0.63377446", "0.63377446", "0.6333759", "0.63323927", "0.6329611", "0.6328532", "0.6319436", "0.6313071", "0.6297354", "0.62902856", "0.6277622", "0.6277622", "0.6272571", "0.62704563", "0.6269879", "0.6247082", "0.6230259", "0.6215379", "0.62113607", "0.6202043", "0.61970824", "0.6187973", "0.61818427", "0.6179785", "0.617734", "0.6174136", "0.61724055", "0.61504376", "0.6072322", "0.6062335", "0.60593474", "0.6054197", "0.6048014", "0.60448503", "0.6026076", "0.60240436", "0.6012867", "0.60079753", "0.600537", "0.5993928", "0.5993928", "0.5986125", "0.5984465", "0.59786856", "0.5972347", "0.59653497", "0.5957775", "0.5945393", "0.5917119", "0.5905498", "0.5898037", "0.58966064", "0.5896276", "0.589295", "0.58928514", "0.5892479", "0.5892453", "0.5884032", "0.58820176", "0.58818007", "0.5878695", "0.5873428", "0.5872378", "0.5860064", "0.5858984", "0.5856676", "0.58543396", "0.5850771", "0.58468455", "0.58466923", "0.5839207", "0.58363736", "0.58340967", "0.5829628", "0.5829237", "0.5828613", "0.58241165", "0.5820189", "0.58195645", "0.5813097", "0.5813097", "0.58126354", "0.5812327" ]
0.0
-1
Determine whether the user can update the auth key.
public function update(User $user, ServerAuthKey $key) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return Auth::check();\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }", "public function authorize()\n {\n $user = \\Auth::user();\n \n if($user->can('update', \\App\\Product::class)){\n return true;\n }\n \n return false;\n }", "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function isUpdateSecurityRelevant() {}", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}", "function canUpdateUser($userid){\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//make sure we are trying to edit a user who really belongs to our guild\r\n\t\tif($permissions->guildid != $this->guild->id || !$this->HasPermission(\"AccountSecondaryUsers\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function authorize()\n {\n $user = Auth::user();\n\n if(!$user->can('update-role')) {\n return false;\n }\n\n return true;\n }", "public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }", "public function authorize(): bool\n {\n return Gate::allows('update', $this->product);\n }", "public function authorize(): bool\n {\n return Auth::check() && Auth::user()->can('web.user.transcripts.update');\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "static function canUpdate() {\n // as users can update their onw items\n return Session::haveRightsOr(self::$rightname, [\n CREATE,\n UPDATE,\n self::MANAGE_BG_EVENTS\n ]);\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "public function authorize()\n {\n return auth()->user()->can('update online assessment');\n }", "public function authorize()\n {\n return $this->user()->hasPermission('update-title');\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n if ($this->route()->getName() === 'home.update') {\n $post = Post::findOrFail($this->id);\n return Auth::check() && Auth::user()->isAdminOrOwner($post->user_id);\n }\n return Auth::check();\n }", "function updatesAllowed() {\n\t\treturn $this->getupdatable() == 1 ? true : false;\n\t}", "private function needs_auth($key) {\r\n $needs_auth = (phpsaaswrapper()->needs_auth($key) == 'true') ? true : false;\r\n if($needs_auth) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function verifyKeys() {\n $data = $this->getClientInformation();\n $result = $this->updateSite($data);\n // lastResponseCode will either be TRUE, REQUEST_ERROR, AUTH_ERROR, or\n // NETWORK_ERROR.\n return $this->lastResponseCode === TRUE ? TRUE : $this->lastResponseCode;\n }", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "protected function canUpdate()\n {\n return $this->hasStrategy(self::STRATEGY_UPDATE);\n }", "public function validateAuthKey($authKey): bool;", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "public function isPasswordChangeEnabled();", "function can_change_password() {\n return !empty($this->config->changepasswordurl);\n }", "protected function allowSave($data, $key = 'id')\n\t{\n\t\treturn (JFactory::getUser()->authorise('core.admin', $this->option) && parent::allowSave($data, $key));\n\t}", "public function update(User $user)\n {\n return $user->can('update_customer');\n }", "public function authorize()\n {\n return auth()->user()->can('update', [Category::class, request('category')]);\n }", "public function authorize()\n {\n $hackedRoute = 'admin.media.update';\n if ( ! is_null($this->segment(4))) {\n $hackedRoute = 'admin.media_category.media.update#####' .$this->segment(3);\n }\n return hasPermission($hackedRoute);\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n {\n return true;\n }\n case 'POST':\n {\n return true;\n }\n case 'PUT':\n {\n if (Auth::user()->hasPermissionTo('post_update', 'blog')) {\n return true;\n } else {\n return true;\n }\n }\n default:\n break;\n }\n return true;\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\treturn JFactory::getUser()->authorise('core.manage', $this->option);\n\t}", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function update(User $user)\n {\n if ($user->can('update_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function canUpdate($identifier = null);", "public function canUpdateKount()\n {\n return !Mage::registry('kount_ens_update')\n && Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_merchant_id')\n && Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_api_key');\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function updateAuthKey() {\n $user = self::login($this->login, $this->password);\n if($user) {\n $this->authKey = $user->authKey;\n $this->authExpired = $user->authExpired;\n }\n }", "function canUpdateItem() {\n\n $ticket = new Ticket();\n if (!$ticket->getFromDB($this->fields['tickets_id'])) {\n return false;\n }\n\n // you can't change if your answer > 12h\n if (!is_null($this->fields['date_answered'])\n && ((strtotime(\"now\") - strtotime($this->fields['date_answered'])) > (12*HOUR_TIMESTAMP))) {\n return false;\n }\n\n if ($ticket->isUser(CommonITILActor::REQUESTER, Session::getLoginUserID())\n || ($ticket->fields[\"users_id_recipient\"] === Session::getLoginUserID() && Session::haveRight('ticket', Ticket::SURVEY))\n || (isset($_SESSION[\"glpigroups\"])\n && $ticket->haveAGroup(CommonITILActor::REQUESTER, $_SESSION[\"glpigroups\"]))) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function testUpdateUnauthenticatedAccess(): void { }", "public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }", "function userCanModifyFW( $sessionID ) {\r\n\t\tif($this->getAccessLevel() >= 8) return true;\r\n return false;\r\n\t}", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "public function isAuthed(): bool\n {\n return ($this->status == self::STATUS_AUTHED);\n }", "public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function validateAuthKey($authKey): bool {\n }", "function allowPasswordChange()\n\t{\n\t\tglobal $ilUser, $ilSetting;\n\t\t\n\t\t\n\t\treturn ilAuthUtils::isPasswordModificationEnabled($ilUser->getAuthMode(true));\n\t\t\n\t\t// Moved to ilAuthUtils\n\t\t\n\t\t// do nothing if auth mode is not local database\n\t\tif ($ilUser->getAuthMode(true) != AUTH_LOCAL &&\n\t\t\t($ilUser->getAuthMode(true) != AUTH_CAS || !$ilSetting->get(\"cas_allow_local\")) &&\n\t\t\t($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || !$ilSetting->get(\"shib_auth_allow_local\")) &&\n\t\t\t($ilUser->getAuthMode(true) != AUTH_SOAP || !$ilSetting->get(\"soap_auth_allow_local\")) &&\n\t\t\t($ilUser->getAuthMode(true) != AUTH_OPENID)\n\t\t\t)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->userSettingVisible('password') ||\n\t\t\t$this->ilias->getSetting('usr_settings_disable_password'))\n\t\t{\n\t\t\treturn false;\n\t\t}\t\t\n\t\treturn true;\n\t}", "protected function authenticate()\n\t{\n\t\t$config = $this->getConfig();\n\n\t\tif(empty($config->api->auth->username) && empty($config->api->auth->password))\n\t\t\treturn true;\n\n\t\t$key = $this->getRequest()->getPost('key');\n\t\t$serviceKey = md5($config->api->auth->username . ':' . $config->api->auth->password);\n\t\tif($key && $key == $serviceKey)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }", "public function update(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:update')\n );\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }", "public function update(User $user): bool\n {\n return $user->can('Update Role');\n }", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public function authorize()\n { \n $this->shop = Auth::user()->shop;\n\n if($this->method() == 'PUT' || $this->method() == 'PATCH') {\n $product = Product::findorFail($this->route('product'));\n\n return $product->shop_id == $this->shop->id;\n }\n\n return true;\n }", "static public function current_user_can( $key ) {\n\t\t$user\t = wp_get_current_user();\n\t\t$settings = self::get_saved_settings();\n\n\t\t// Return false if no settings saved.\n\t\tif ( ! isset( $settings[ $key ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Make sure super admins have administrator access.\n\t\tif ( is_multisite() && is_super_admin() && ! in_array( 'administrator', $user->roles ) ) {\n\t\t\t$user->roles[] = 'administrator';\n\t\t}\n\n\t\t// Check the user's roles against the saved settings.\n\t\tforeach ( $user->roles as $role ) {\n\n\t\t\t// Return true if the user has access.\n\t\t\tif ( isset( $settings[ $key ][ $role ] ) && $settings[ $key ][ $role ] ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "private function _update(){\n\t\tif($this->dao->update($this->user->getID(), $this->ident, $this->datahandler)){\n\t\t\t$this->read();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }", "abstract public function isUpdatableByUser(User $user);", "public function authorize(): bool\n {\n return !auth()->check();\n }", "public function authorize()\n {\n if ($this->method() == 'PUT') {\n $categorySlug = $this->route('category');\n $category = $this->categoryRepo->getWithModerator($categorySlug);\n\n return $this->authUserRepo->can('update', $category);\n }\n else {\n return $this->authUserRepo->can('createOrDelete', 'App\\\\Category');\n }\n }" ]
[ "0.7179042", "0.71339506", "0.7041955", "0.70295286", "0.7014738", "0.6918626", "0.6911941", "0.6851657", "0.6848956", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6794654", "0.6789655", "0.6761919", "0.6752804", "0.6739933", "0.670072", "0.669525", "0.6669384", "0.65751684", "0.656412", "0.653085", "0.65262353", "0.6510277", "0.6510277", "0.6502134", "0.64844406", "0.6480213", "0.64782065", "0.6475069", "0.64278454", "0.63659406", "0.63659406", "0.6351516", "0.6276485", "0.6251516", "0.62269384", "0.6208273", "0.62051004", "0.6201755", "0.61912084", "0.61867756", "0.6172304", "0.6164728", "0.61626744", "0.61293447", "0.6125334", "0.6101799", "0.6096488", "0.6085332", "0.6066271", "0.6058554", "0.60098654", "0.5989399", "0.59878385", "0.59841436", "0.5977298", "0.5973353", "0.5967659", "0.5956734", "0.59345245", "0.5921906", "0.591449", "0.59137565", "0.5909497", "0.5908704", "0.5906548", "0.5906199", "0.58947134", "0.5893285", "0.588526", "0.58722264", "0.58613956", "0.5854395", "0.5852406", "0.5851636", "0.58483", "0.58408856", "0.58232284", "0.58076084", "0.5795591", "0.57940394", "0.5790371", "0.5780434", "0.57796574", "0.5775982", "0.5774403", "0.57700765", "0.5767078", "0.5758964", "0.57550913", "0.57547843", "0.5754081", "0.5751986" ]
0.63458
40
Determine whether the user can delete the auth key.
public function delete(User $user, ServerAuthKey $key) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function canDelete()\n {\n return $this->canGet();\n }", "public function authorize()\n {\n return $this->can('delete');\n }", "public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }", "function canDelete() {\n return true;\n }", "public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }", "private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }", "public function canDelete()\n {\n return 1;\n }", "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "public function isDeleteGranted($entity): bool;", "public function canDelete()\n {\n return in_array('delete', $this->actions);\n }", "public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }", "public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }", "function canDelete(User $user) {\n return $user->canManageTrash();\n }", "public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }", "public function delete()\n {\n // Check P_DELETE\n if (!wcmSession::getInstance()->isAllowed($this, wcmPermission::P_DELETE))\n {\n $this->lastErrorMsg = _INSUFFICIENT_PRIVILEGES;\n return false;\n }\n\n if (!parent::delete())\n return false;\n \n // Erase permissions\n $project = wcmProject::getInstance();\n $sql = 'DELETE FROM #__permission WHERE target=?';\n $params = array($this->getPermissionTarget());\n $project->database->executeStatement($sql, $params);\n \n return true;\n\n }", "protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }", "public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }", "function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}", "public function delete(string $key): bool;", "public function delete(string $key): bool;", "public function delete(string $key): bool;", "function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t\treturn Factory::getUser()->authorise(\"core.delete\", \"com_bookingmanager.customer.\" . $record->id);\n\t\t}\n\t}", "public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }", "public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function authorizedToDelete(Request $request)\n {\n return false;\n }", "protected function canDelete($record) { return false; }", "public function delete(string $key) : bool;", "public function canDELETE($collection = null) {\r\n $rights = $this->getRights($collection, 'delete');\r\n return is_bool($rights) ? $rights : true;\r\n }", "function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function delete()\n {\n $success = false;\n if (isset($this->id)) {\n $sql = \"UPDATE email_credential SET deleted = NOW() WHERE id = {$this->id}\";\n $this->execute_query($sql);\n $vars = get_class_vars(get_class($this));\n foreach ($vars as $key=>$value) {\n if ($key != 'readOnly') {\n unset($this->$key);\n }\n }\n $success = true;\n }\n return $success;\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}", "function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }", "public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }", "public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }", "function userCanDeleteContact( $sessionID, $contactID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function allowDeletion()\n {\n return $this->allowDeletion;\n }", "public function canDelete($identifier = null);", "protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }", "public function delete(User $user)\n {\n return $user->can('delete_customer');\n }", "public function isDelete();", "public function delete ($keyName): bool;", "function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "public function isPermDeleted($userid) {\n $recipient = $this->mailboxRecipient($userid);\n if ($this->sender_id == $userid) {\n $flag = $this->sender_del;\n } elseif ($recipient != null) {\n $flag = $recipient->recipient_del;\n }\n\n return is_null($flag) ? true : false;\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }", "protected function canDelete($record)\n {\n return true;\n }", "public function canDelete($userId = \"\")\n {\n\n if ($userId == \"\")\n $userId = Yii::$app->user->id;\n\n if ($this->user_id == $userId)\n return true;\n\n if (Yii::$app->user->isAdmin()) {\n return true;\n }\n\n if ($this->container instanceof Space && $this->container->isAdmin($userId)) {\n return true;\n }\n\n return false;\n }", "public function canDelete($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}", "public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "public function isDelete(): bool {}", "protected function canDelete($record)\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->state != -2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$user = JFactory::getUser();\n\t\t\t\n\t\t\treturn $user->authorise('core.delete', 'com_cooltouraman.course.' . (int) $record->id);\n\t\t}\n\n\t\treturn false;\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::main_index_delete');\n }", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "public function delete($user, $model)\n {\n if( $user->hasPermissionTo('delete ' . static::$key) ) {\n return true;\n }\n\n return false;\n }", "function user_can_delete_post($user_id, $post_id, $blog_id = 1)\n {\n }", "public function delete(User $user)\n {\n return $user->hasPermission('user-delete');\n }", "function canDelete(&$msg, $oid = NULL) {\n\t\t//$tables[] = array( 'label' => 'Users', 'name' => 'users', 'idfield' => 'user_id', 'joinfield' => 'user_company' );\n\t\t//return CDpObject::canDelete( $msg, $oid, $tables );\n\t\treturn true;\n\t}", "function canDelete(User $user) {\n return $user->isFinancialManager();\n }", "public function delete(): bool\n {\n return $this->actionHandler->delete();\n }", "public function delete(User $user, File $file)\n {\n return Permission::anyoneCanAccess($file->id)\n || Permission::userCanAccess($user->id, $file->id, \"write\");\n }", "public function delete(User $user, EduDocument $document)\n {\n\t\treturn $user->id == $document->user_id || $user->can('Edu-document');\n }", "public function delete(int $key): bool\n {\n }", "public function delete(int $key): bool\n {\n }", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "public function canDelete($record = null)\n\t{\n\t\t$record = $record ?: $this->_record;\n\t\t$user = JFactory::getUser();\n\n\t\treturn $record->id < 7\n\t\t\t?\tfalse\n\t\t\t: $user->authorise('flexicontent.deletefield', 'com_flexicontent.field.' . $record->id);\n\t}", "public function delete(User $user): bool\n {\n return $user->can('Delete Role');\n }", "protected function _can_delete($delete_id) {\r\n return true;\r\n }", "function delete ($encoded_key_string)\r\n {\r\n $this->_log->trace(\"delete user (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n # first get the user name\r\n $user_array = $this->select_record($encoded_key_string);\r\n if (count($user_array) == 0)\r\n return FALSE;\r\n\r\n $user_name = $user_array[USER_NAME_FIELD_NAME];\r\n\r\n # delete the user\r\n if (parent::delete($encoded_key_string) == FALSE)\r\n return FALSE;\r\n\r\n # create key string for user_list_permissions\r\n $permission_key_string = USERLISTTABLEPERMISSIONS_USER_NAME_FIELD_NAME.\"='\".$user_name.\"'\";\r\n\r\n if ($this->_user_list_permissions->delete($permission_key_string) == FALSE)\r\n {\r\n # copy error strings from user_list_permissions\r\n $this->error_message_str = $this->_user_list_permissions->get_error_message_str();\r\n $this->error_log_str = $this->_user_list_permissions->get_error_log_str();\r\n $this->error_str = $this->_user_list_permissions->get_error_str();\r\n\r\n return FALSE;\r\n }\r\n\r\n $this->_log->info(\"user deleted (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n return TRUE;\r\n }", "public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }", "public function delete(User $user)\n {\n if ($this->role($user)){\n return $user->hasDirectPermission($this->permission_list['delete']);\n }\n }", "public function delete(User $user)\n {\n return (int)Route::current()->parameters('user')['user'] === $user->id && Auth::guard('admin-api')->user()->token()->client->personal_access_client;\n }", "protected function allowDelete($data = array(), $key = id)\n\t{\n\t\treturn parent::allowDelete($data, $key, array(\n\t\t\t'key_author' => 'created_by'\n\t\t));\n\t}", "public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }", "function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}", "protected function canDelete($record)\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\tif (JFactory::getApplication()->isAdmin())\n\t\t{\n\t\t\treturn $user->authorise('core.delete', 'com_solidres.reservationasset.'.(int) $record->id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn SRUtilities::isAssetPartner($user->get('id'), $record->id);\n\t\t}\n\t}", "function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public function del($key)\n {\n //Not required so just return true\n return true;\n }", "public function delete($key)\n {\n if (!$this->m_active)\n {\n return false;\n }\n\n return apc_delete($this->getRealKey($key));\n }", "public function delete(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:delete')\n );\n }", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function delete(): bool;", "#[Pure]\n public function delete(User $user, Client $oAuthClient): bool\n {\n return $user->noTokenOrTokenCan('delete-oauth_clients')\n && $oAuthClient->isOwner($user);\n }", "public function delete(string $key): bool\n {\n return (bool) $this->getAdapter()->unlink($key);\n }", "protected function check_delete_permission($post)\n {\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }", "public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }", "public function delete($key) {\n\t\treturn (apc_exists($key)) ? apc_delete($key) : true;\n\t}", "public function deleteItem(string $key): bool;", "public function deleteItem(string $key): bool;", "public function delete(User $user)\n {\n return $user->role->can_delete_post == 1;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webiators_DeleteOrdersFromAdmin::delete_order');\n }", "public function canDeleteAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && $this->auth->isSuperAdmin();\n }" ]
[ "0.71674985", "0.7098086", "0.7003756", "0.69318014", "0.6883532", "0.6870792", "0.67175364", "0.6716931", "0.67065954", "0.6683553", "0.66813636", "0.66421056", "0.6630496", "0.66079456", "0.65796137", "0.6564912", "0.65543044", "0.65510374", "0.65465724", "0.6542628", "0.64952344", "0.648602", "0.64629966", "0.64350116", "0.64350116", "0.64350116", "0.641431", "0.64032817", "0.63881403", "0.63698643", "0.63495785", "0.6339127", "0.63379467", "0.63298357", "0.6319237", "0.6310064", "0.6309539", "0.6302874", "0.6299821", "0.62748766", "0.6271122", "0.6256821", "0.622918", "0.6213906", "0.620773", "0.6198134", "0.6196045", "0.6192808", "0.6176374", "0.6175027", "0.61723876", "0.6159487", "0.6155914", "0.6153526", "0.61307096", "0.6125035", "0.6123037", "0.61137474", "0.61104304", "0.61104304", "0.61051375", "0.61032164", "0.6094686", "0.6093391", "0.6090212", "0.60804856", "0.60783374", "0.6064389", "0.6060767", "0.6060767", "0.60603774", "0.60603774", "0.60541856", "0.60530734", "0.60507", "0.60406566", "0.60257757", "0.6021447", "0.60151285", "0.6010822", "0.6007941", "0.60068804", "0.5994966", "0.59943795", "0.59789157", "0.59754103", "0.5966549", "0.5963856", "0.5962329", "0.5961114", "0.5959992", "0.5954604", "0.5951087", "0.59502465", "0.5940033", "0.593547", "0.593547", "0.5935259", "0.5932181", "0.5929844" ]
0.6393031
28
Determine whether the user can restore the auth key.
public function restore(User $user, ServerAuthKey $key) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'restore' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function hasValidResetKey()\n {\n return (boolean) $this->isActive() && $this->_getVar('user_resetkey_valid');\n }", "public function restore(User $user): bool\n {\n return $user->can('Restore Role');\n }", "public function restore(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:restore')\n );\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function restore($user, $model)\n {\n\n if( $user->hasPermissionTo('restore ' . static::$key) ) {\n return true;\n }\n\n return false;\n }", "public function restore(User $user)\n {\n return config('mailcare.auth') && config('mailcare.automations');\n }", "private function needs_auth($key) {\r\n $needs_auth = (phpsaaswrapper()->needs_auth($key) == 'true') ? true : false;\r\n if($needs_auth) {\r\n return true;\r\n }\r\n return false;\r\n }", "protected function isRestoring()\n {\n return $this->option('restore') == 'true';\n }", "private function validateReviewerKey(){\n\t\treturn true;\n\t}", "public function restore(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function restore(User $user, File $file)\n {\n return Permission::anyoneCanAccess($file->id)\n || Permission::userCanAccess($user->id, $file->id, \"write\");\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 hasPersistentLogin();", "public function isPasswordRecoveryEnabled();", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isAuth();", "public function hasCrypt(): bool;", "public function can_reset_password() {\n return false;\n }", "public function resume(): bool\n {\n if ($this->values->offsetExists('principal')) {\n $this->principal = $this->values->get('principal');\n\n $this->logger->info(\n \"Authentication resume: {user}\",\n ['user' => $this->principal]\n );\n $this->publishResume($this->principal, $this->values);\n\n $this->values->offsetSet('lastActive', microtime(true));\n\n return true;\n }\n return false;\n }", "protected function hasAuth()\n {\n return !! $this->options['authentication'];\n }", "public function validateAuthKey($authKey): bool;", "function checkResetKey($username, $key) {\n $attcount = $this->getAttempt($_SERVER['REMOTE_ADDR']);\n if ($attcount[0]->count >= MAX_ATTEMPTS) {\n $auth_error[] = $this->lang['resetpass_lockedout'];\n $auth_error[] = sprintf($this->lang['resetpass_wait'], WAIT_TIME);\n return false;\n } else {\n if (strlen($username) == 0) {\n return false;\n } elseif (strlen($username) > MAX_USERNAME_LENGTH) {\n return false;\n } elseif (strlen($username) < MIN_USERNAME_LENGTH) {\n return false;\n } elseif (strlen($key) == 0) {\n return false;\n } elseif (strlen($key) < RANDOM_KEY_LENGTH) {\n return false;\n } elseif (strlen($key) > RANDOM_KEY_LENGTH) {\n return false;\n } else {\n $query = $this->db->select(\"SELECT resetkey FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $this->logActivity(\"UNKNOWN\", \"AUTH_CHECKRESETKEY_FAIL\", \"Username doesn't exist ({$username})\");\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n $auth_error[] = $this->lang['checkresetkey_username_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $auth_error[] = sprintf($this->lang['checkresetkey_attempts_remaining'], $remaincount);\n return false;\n } else {\n $db_key = $query[0]->resetkey;\n if ($key == $db_key) {\n return true;\n } else {\n $this->logActivity($username, \"AUTH_CHECKRESETKEY_FAIL\", \"Key provided is different to DB key ( DB : {$db_key} / Given : {$key} )\");\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n $auth_error[] = $this->lang['checkresetkey_key_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $auth_error[] = sprintf($this->lang['checkresetkey_attempts_remaining'], $remaincount);\n return false;\n }\n }\n }\n }\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function chkRbac()\n\t{\n\t\treturn $this->chkRbac;\n\t}", "public function isAuth() {}", "public function restore(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('restore interview');\n }", "function can_reset_password() {\n return false;\n }", "function auth(){\n\tif(@!$_SESSION['auth']){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public function needsAuth() {\n $v = $this->getVersion();\n return $v['functions']['auth'];\n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "public function isAuth()\n {\n return !empty($this->getAuth());\n }", "function verifyAuth()\n\t{\n\t\tsanitizeRequest($_POST);\n\t\tsanitizeRequest($_GET);\n\t\t\n\t\t$currentUser = UserService::getInstance()->getCurrentUser();\n\t\tif (!$currentUser || !$currentUser->getSessionId()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$payload = JWT::decode($currentUser->getSessionId(), SERVER_KEY, array('HS256'));\n\t\t\t$sessionId = UserService::getInstance()->getSessionId($currentUser->getId());\n\t\t\tif ($sessionId === $currentUser->getSessionId() &&\n\t\t\t\t\t$currentUser->getId() === $payload->id &&\n\t\t\t\t\t$currentUser->getEmail() === $payload->email) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tif ($currentUser->isRemember() && $e->getMessage() === 'Expired token') {\n\t\t\t\t$currentUser->extendSession();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function checkAuth();", "public function checkAuth();", "public function isValidSecureKey()\n {\n if (Security::isValidToken($this->secure_key, $this->module->recoveryWithin) === true) {\n return ($this->_user = User::findBySecureKey($this->secure_key, 'active')) !== null;\n }\n return false;\n }", "public function getAuthMode();", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public static function hasAuth() {\n\t\treturn (self::$__accessKey !== null && self::$__secretKey !== null);\n\t}", "public function isPrivateKeyPrompt()\n {\n if (isset($this->raw->{'key-pass'})\n && (true === $this->raw->{'key-pass'})) {\n return true;\n }\n\n return false;\n }", "public function restore(Admin $admin, User $model)\n {\n return $admin->hasAccess(['users.restore']);\n\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function hasMaelstromAuthorization() {\n return $this->_has(11);\n }", "private function isAuth()\n\t{\n\t\treturn $this->session->userdata('auth') ? true : false;\n\t}", "protected function hasPrivateKey() {}", "public static function isAuth() : bool\n {\n return null !== self::$fullUser;\n }", "public function hasMaelstromAuthorization() {\n return $this->_has(9);\n }", "public function beforeRestore() : bool\n\t{\n\t\treturn true;\n\t}", "public function getAuthMode() {}", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function restore(User $user)\n {\n return $user->idquyenhan == 2;\n }", "public function restore(User $user, Msg $msg)\n {\n //\n\t\tif(!isset($msg->user_id))return true;\n\t\tif( $user->hasPermission('restore.msg'))return true;\n\t\treturn $user->id == $msg->user_id;\n }", "function isAuth()\n {\n $db = $this->getDatabaseConnection();\n $sesPrefix = $db->dsn['database'];\n if (empty($_SERVER['PHP_AUTH_USER'])) {\n @session_start();\n }\n if (!empty($_SESSION[__CLASS__][$sesPrefix .'-auth'])) {\n // in session...\n $a = unserialize($_SESSION[__CLASS__][$sesPrefix .'-auth']);\n $u = DB_DataObject::factory('core_company');\n if ($u->get($a->id)) { //&& strlen($u->passwd)) {\n return true;\n }\n $_SESSION[__CLASS__][$sesPrefix .'-auth'] = '';\n \n }\n // not in session or not matched...\n \n \n return false;\n \n }", "public function restore(): bool\n {\n return false;\n }", "public function restore(User $user, Upload $upload)\n {\n if ($this->hasPrivilegedRole($user)) {\n return true;\n }\n\n if ($user->id == $upload->user_id) {\n return true;\n }\n\n return false;\n }", "public function restore(Authorizable $user, Withdraw $withdraw)\n {\n return true;\n }", "public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }", "public function regenerateSessionAuthToken(): bool;", "public function allowNonInteractiveKeyManagement(): bool\n {\n return $this->coreAutoKeyManagement;\n }", "public function restore(User $user, Order $order)\n {\n return $user->hasPermission('order.restore');\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 restore(User $user, Employee $employee)\n {\n return $user->role == 'admin';\n }", "public function restore(User $user, User $model)\n {\n return $user->hasPermissionTo('benutzer-bearbeiten');\n }", "function oldPassword() {\n\t\t$fields = $this->_settings['fields'];\n\t\tif (\n\t\t\tSecurity::hash($this->model->data[$this->model->name][$fields['old_password']], null, true) \n\t\t\t== $this->model->field($fields['password'])\n\t\t) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function isAuth() {\n $connector = Mage::getSingleton('vidtest/connector')->getApiModel($this->getApiModelCode());\n return $connector->isLoggedIn();\n }", "function auth_required() {\n $authinconfig = $this->config->taverna->needAuth;\n if (strcasecmp($authinconfig, 'false') == 0) {\n return FALSE; //no authorization required so we are authorized\n }\n return TRUE;\n }", "public function verifyKeys() {\n $data = $this->getClientInformation();\n $result = $this->updateSite($data);\n // lastResponseCode will either be TRUE, REQUEST_ERROR, AUTH_ERROR, or\n // NETWORK_ERROR.\n return $this->lastResponseCode === TRUE ? TRUE : $this->lastResponseCode;\n }", "public function restore(User $user, Show $show): bool\n {\n return $user->isAdmin();\n }", "public function restore(User $user, Module $module)\n {\n return $user->hasPermission('restore-moui-module');\n }", "protected function onRestored()\n {\n return true;\n }", "public function restore(User $user, Operation $operation)\n {\n return Auth::id()->isAdmin();\n }", "public function auth(){\n\t\tif( !isset($_SESSION) || !isset($_SESSION['userId']) ) {\n\t\t\treturn false;\n\t\t} elseif( !parent::fetchFromDB($_SESSION['userId']) ){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn ( $this->checkIp() && $this->checkSessionId() );\n\t\t}\n\t}", "public function restore(User $user, Approval $resource)\n {\n return false;\n }", "public function isAuthValid() {\n if (is_null($this->getUserId())) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "function authEstaAutenticado() {\n return isset($_SESSION['usuario_admin']);\n}", "public function isUserProtected() {\n\t $mobileStatus = $this->getMobileUserStatus($this->getAuthUserId(), $this->getAuthUserEmail());\n\t return ($mobileStatus == RublonMagentoModule::YES ? RublonMagentoModule::PROTECTION_TYPE_MOBILE : RublonMagentoModule::PROTECTION_TYPE_EMAIL); \t \n\t}", "public function validateAuthKey($authKey): bool {\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 restore(User $user, User $targetUser)\n {\n return ! $user->hasRole('Banned') &&\n $user->hasPermission('restore', User::class);\n }", "public function isUnauthorized(): bool\n {\n $body = trim($this->getBody());\n\n $unauthorizedFlag = (false !== strpos(\"[KEY-DID-NOT-EXIST-OR-USER-IS-NOT-ACTIVE]\", $body));\n\n return parent::isUnauthorized() || $unauthorizedFlag;\n }", "public function restore(User $user, Itms $itms)\n {\n return $user->isAdmin;\n }", "public function isAuthed(): bool\n {\n return ($this->status == self::STATUS_AUTHED);\n }", "protected function is_remembered()\r\n {\r\n return false;\r\n }", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "public function restore(User $user, Document $document)\n {\n if ($user->isStaff()) {\n return true;\n }else {\n return $user->id === $document->user_id;\n }\n }", "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}", "public function recover($request)\n\t\t{\n\t\t\tglobal $user;\n\t\t\tif (!isset($request->token))\n\t\t\t{\n\t\t\t\tif (isset($request->email))\n\t\t\t\t{\n\t\t\t\t\t$user = $this->users->recover($request->email);\n\t\t\t\t\tif ($user)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t\t$_SESSION['state'] = AUTH_NONE;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!isset($_SESSION['reset_token']) || $request->token != $_SESSION['reset_token'])\n\t\t\t\treturn false;\n\n\t\t\tif (isset($request->passphrase) && strlen($request->passphrase) > 6)\n\t\t\t{\n\t\t\t\t$this->users->setPassphrase($user->id, $request->passphrase);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (object)['username' => $user->username];\n\t\t\t}\n\t\t}", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function isAuthCodeRevoked($codeId)\n {\n // TODO: Implement isAuthCodeRevoked() method.\n }", "public function allowCoreToManageKeys(): bool\n {\n return $this->coreKeyManagement;\n }", "public function isAccessTokenRevoked($tokenId) {\n $accessToken = $this->model->find($tokenId);\n\n if (null === $accessToken) {\n return true;\n }\n\n return $accessToken['revoked'];\n }", "public function isAlwaysGranted(): bool;", "public function restore(User $user, Appoientment $appoientment)\n {\n return $user->type == User::ADMIN_TYPE;\n }", "public static function getAuth()\n {\n if( !isset($_SESSION['FOXY_userid']) ) {\n return false;\n }\n return true;\n }" ]
[ "0.69855917", "0.6302176", "0.6097778", "0.60794586", "0.6045934", "0.6015025", "0.59512925", "0.5928465", "0.59031117", "0.58317214", "0.5807743", "0.5799083", "0.5779006", "0.5767851", "0.57035506", "0.566946", "0.5643295", "0.5632672", "0.56311005", "0.5609709", "0.5603563", "0.5594496", "0.55905366", "0.55888534", "0.55776054", "0.5575796", "0.55733746", "0.5533381", "0.5533361", "0.55240726", "0.5517402", "0.55154896", "0.55119866", "0.5506165", "0.5505722", "0.5501719", "0.5501507", "0.5501507", "0.55008584", "0.54934895", "0.54911566", "0.54911566", "0.5488651", "0.5472144", "0.545849", "0.5445259", "0.544404", "0.5439841", "0.54306924", "0.5416785", "0.54151386", "0.54131114", "0.540149", "0.5391069", "0.5389698", "0.5380234", "0.53720886", "0.5359375", "0.53553545", "0.5340223", "0.53401875", "0.5339757", "0.53391266", "0.53343654", "0.53249115", "0.53231794", "0.53223294", "0.53171796", "0.5316044", "0.5312259", "0.5301531", "0.5299844", "0.529927", "0.5292904", "0.5290884", "0.5288524", "0.52834696", "0.5280155", "0.52750003", "0.52728003", "0.5269148", "0.52684903", "0.5264087", "0.5258202", "0.5257734", "0.5257233", "0.5256391", "0.5251764", "0.5251717", "0.5250535", "0.52469045", "0.5244476", "0.52426225", "0.524081", "0.5239754", "0.5229997", "0.52261776", "0.52257234", "0.52240765", "0.52231133" ]
0.6545664
1
Determine whether the user can permanently delete the auth key.
public function forceDelete(User $user, ServerAuthKey $key) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "public function canDelete()\n {\n return $this->canGet();\n }", "public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }", "public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }", "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "function canDelete() {\n return true;\n }", "public function delete()\n {\n // Check P_DELETE\n if (!wcmSession::getInstance()->isAllowed($this, wcmPermission::P_DELETE))\n {\n $this->lastErrorMsg = _INSUFFICIENT_PRIVILEGES;\n return false;\n }\n\n if (!parent::delete())\n return false;\n \n // Erase permissions\n $project = wcmProject::getInstance();\n $sql = 'DELETE FROM #__permission WHERE target=?';\n $params = array($this->getPermissionTarget());\n $project->database->executeStatement($sql, $params);\n \n return true;\n\n }", "public function authorize()\n {\n return $this->can('delete');\n }", "public function canDelete()\n {\n return 1;\n }", "function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}", "function canDelete(User $user) {\n return $user->canManageTrash();\n }", "public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }", "public function delete()\n {\n $success = false;\n if (isset($this->id)) {\n $sql = \"UPDATE email_credential SET deleted = NOW() WHERE id = {$this->id}\";\n $this->execute_query($sql);\n $vars = get_class_vars(get_class($this));\n foreach ($vars as $key=>$value) {\n if ($key != 'readOnly') {\n unset($this->$key);\n }\n }\n $success = true;\n }\n return $success;\n }", "function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }", "protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }", "public function canDelete()\n {\n return in_array('delete', $this->actions);\n }", "public function allowDeletion()\n {\n return $this->allowDeletion;\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function isDeleteGranted($entity): bool;", "function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}", "function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "public function delete(User $user, ServerAuthKey $key)\n {\n return true;\n }", "public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }", "private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }", "public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function delete(string $key): bool;", "public function delete(string $key): bool;", "public function delete(string $key): bool;", "public function delete()\n {\n if($this->enabled === true){\n if (apc_delete($this->key) === true){\n return true; \n }\n else{\n Logger::log(\"Failed to invalidate cache for key: \" . $this->key);\n return false;\n }\n }\n \n return false;\n }", "public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }", "public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }", "public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }", "protected function canDelete($record) { return false; }", "public function isPermDeleted($userid) {\n $recipient = $this->mailboxRecipient($userid);\n if ($this->sender_id == $userid) {\n $flag = $this->sender_del;\n } elseif ($recipient != null) {\n $flag = $recipient->recipient_del;\n }\n\n return is_null($flag) ? true : false;\n }", "private function _delete_auth_cookie()\n {\n // delete authentication user iformations from cookie if available\n if (get_cookie($this->config->item('auth_cookie_id'))) {\n delete_cookie($this->config->item('auth_cookie_id'));\n }\n\n // delete authentication encrypted key from cookie if available\n if (get_cookie($this->config->item('auth_cookie_key'))) {\n delete_cookie($this->config->item('auth_cookie_key'));\n }\n\n return TRUE;\n }", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }", "protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }", "function canDelete(User $user) {\n return $user->isFinancialManager();\n }", "public function authorizedToDelete(Request $request)\n {\n return false;\n }", "public function delete($user, $model)\n {\n if( $user->hasPermissionTo('delete ' . static::$key) ) {\n return true;\n }\n\n return false;\n }", "public function isDelete(): bool {}", "public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }", "protected function deleteFromApiAxle()\n {\n try{\n $apiAxle = new ApiAxleClient(\\Yii::app()->params['apiaxle']);\n if (( ! empty($this->value)) && $this->existsInApiAxle($apiAxle)) {\n $apiAxle->unlinkKeyFromApi($this->value, $this->api->code);\n $apiAxle->unlinkKeyFromKeyring(\n $this->value,\n $this->calculateKeyringName()\n );\n $apiAxle->deleteKey($this->value);\n }\n return true;\n } catch (NotFoundException $e) {\n // If the key was not found, consider the deletion successful.\n \\Yii::log(sprintf(\n 'Key was not found, so deletion was considered successful: (%s) %s',\n $e->getCode(),\n $e->getMessage()\n ), \\CLogger::LEVEL_WARNING);\n return true;\n } catch (\\Exception $e) {\n // Otherwise, consider it not successful.\n $this->addError('value', $e->getMessage());\n return false;\n }\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t\treturn Factory::getUser()->authorise(\"core.delete\", \"com_bookingmanager.customer.\" . $record->id);\n\t\t}\n\t}", "public function delete(string $key) : bool;", "public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }", "public function delete ($keyName): bool;", "function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }", "public function isDelete();", "function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }", "public function canDelete($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}", "public function delete(): bool\n {\n\n return false;\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::main_index_delete');\n }", "function delete ($encoded_key_string)\r\n {\r\n $this->_log->trace(\"delete user (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n # first get the user name\r\n $user_array = $this->select_record($encoded_key_string);\r\n if (count($user_array) == 0)\r\n return FALSE;\r\n\r\n $user_name = $user_array[USER_NAME_FIELD_NAME];\r\n\r\n # delete the user\r\n if (parent::delete($encoded_key_string) == FALSE)\r\n return FALSE;\r\n\r\n # create key string for user_list_permissions\r\n $permission_key_string = USERLISTTABLEPERMISSIONS_USER_NAME_FIELD_NAME.\"='\".$user_name.\"'\";\r\n\r\n if ($this->_user_list_permissions->delete($permission_key_string) == FALSE)\r\n {\r\n # copy error strings from user_list_permissions\r\n $this->error_message_str = $this->_user_list_permissions->get_error_message_str();\r\n $this->error_log_str = $this->_user_list_permissions->get_error_log_str();\r\n $this->error_str = $this->_user_list_permissions->get_error_str();\r\n\r\n return FALSE;\r\n }\r\n\r\n $this->_log->info(\"user deleted (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n return TRUE;\r\n }", "public function delete($key) {\n\t\treturn (apc_exists($key)) ? apc_delete($key) : true;\n\t}", "public function delete(User $user)\n {\n return (int)Route::current()->parameters('user')['user'] === $user->id && Auth::guard('admin-api')->user()->token()->client->personal_access_client;\n }", "public function canDeleteAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && $this->auth->isSuperAdmin();\n }", "public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "function userCanDeleteContact( $sessionID, $contactID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function canDELETE($collection = null) {\r\n $rights = $this->getRights($collection, 'delete');\r\n return is_bool($rights) ? $rights : true;\r\n }", "public function delete(User $user)\n {\n return $user->can('delete_customer');\n }", "public function delete($key)\n {\n if (!$this->m_active)\n {\n return false;\n }\n\n return apc_delete($this->getRealKey($key));\n }", "public function sure_delete_local(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_local();\r\n return $this->module_no_permission();\r\n\t}", "public function permanentlyDeleteById(int $UserId): bool;", "public function delete(): bool\n {\n return $this->actionHandler->delete();\n }", "public function delete() {\n\t\tglobal $wpdb;\n\n\t\t$bp = buddypress();\n\n\t\tdo_action_ref_array( 'xprofile_data_before_delete', array( $this ) );\n\n\t\tif ( !$wpdb->query( $wpdb->prepare( \"DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d\", $this->field_id, $this->user_id ) ) )\n\t\t\treturn false;\n\n\t\tdo_action_ref_array( 'xprofile_data_after_delete', array( $this ) );\n\n\t\treturn true;\n\t}", "public function delete(): bool;", "protected function canDelete($record)\n {\n return true;\n }", "public function delete(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:delete')\n );\n }", "public function delete(User $user)\n {\n return $user->hasPermission('user-delete');\n }", "public function deleteAll()\n {\n if (! $this->m_active) {\n return false;\n }\n\n apc_clear_cache('user');\n return true;\n }", "function userLogOut() {\n try {\n delete_key();\n return 1;\n } catch (Exception $ex) {\n return 0;\n }\n }", "public function delete(User $user, File $file)\n {\n return Permission::anyoneCanAccess($file->id)\n || Permission::userCanAccess($user->id, $file->id, \"write\");\n }", "#[Pure]\n public function delete(User $user, Client $oAuthClient): bool\n {\n return $user->noTokenOrTokenCan('delete-oauth_clients')\n && $oAuthClient->isOwner($user);\n }", "public function delete(int $key): bool\n {\n }", "public function delete(int $key): bool\n {\n }", "public function revokeCurrentApiKey(): bool\n {\n $url = $this->getApiUrl() . 'api-keys/current';\n $headers = $this->getRequestHeaders();\n $method = 'DELETE';\n $response = $this->getHttpClient()->request($method, $url, $headers);\n\n if ($response->getStatus() === 200) {\n return true;\n } else {\n throw $this->getExceptionByStatusCode($method, $url, $response);\n }\n }", "function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public function forceDelete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "protected function canDelete($record)\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->state != -2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$user = JFactory::getUser();\n\t\t\t\n\t\t\treturn $user->authorise('core.delete', 'com_cooltouraman.course.' . (int) $record->id);\n\t\t}\n\n\t\treturn false;\n\t}", "public function delete(string $key): bool\n {\n return (bool) $this->getAdapter()->unlink($key);\n }", "public function delete(): bool\n\t{\n\t\treturn true;\n\t}", "public function delete(User $user)\n {\n if ($this->role($user)){\n return $user->hasDirectPermission($this->permission_list['delete']);\n }\n }", "function canTrash(User $user) {\n if ($this->object->getState() == STATE_TRASHED) {\n return false;\n } // if\n\n\t $user_id = $user->getId();\n\n\t if(!array_key_exists($user_id, $this->can_delete)) {\n\t\t if($this->object->isOwner() || $user->getCompanyId() == $this->object->getId()) {\n\t\t\t $this->can_delete[$user_id] = false;\n\t\t } else {\n\t\t\t $has_last_admin = false;\n\n\t\t\t $users = $this->object->users()->get($user);\n\t\t\t if(is_foreachable($users)) {\n\t\t\t\t foreach($users as $v) {\n\t\t\t\t\t if($v->isLastAdministrator()) {\n\t\t\t\t\t\t $this->can_delete[$user_id] = false;\n\n\t\t\t\t\t\t $has_last_admin = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t } // if\n\t\t\t\t } // foreach\n\t\t\t } // if\n\n\t\t\t if(!$has_last_admin) {\n\t\t\t\t $this->can_delete[$user_id] = $user->isPeopleManager();\n\t\t\t } // if\n\t\t } // if\n\t } // if\n\n\t return $this->can_delete[$user_id];\n }", "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "function checkPermissionDelete() {\n\t\tif ($_SESSION['log_delete']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}", "public function canDelete($userId = \"\")\n {\n\n if ($userId == \"\")\n $userId = Yii::$app->user->id;\n\n if ($this->user_id == $userId)\n return true;\n\n if (Yii::$app->user->isAdmin()) {\n return true;\n }\n\n if ($this->container instanceof Space && $this->container->isAdmin($userId)) {\n return true;\n }\n\n return false;\n }", "function user_can_delete_post($user_id, $post_id, $blog_id = 1)\n {\n }", "public function isDeleted();", "public function isDeleted();", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}" ]
[ "0.6867733", "0.6854661", "0.67626876", "0.66012883", "0.65867436", "0.6525934", "0.6523325", "0.65090764", "0.64961904", "0.6459987", "0.6443412", "0.6424533", "0.6412226", "0.6406179", "0.63955843", "0.638317", "0.63720894", "0.6329093", "0.62502366", "0.6231591", "0.6227769", "0.6214084", "0.6207945", "0.6195401", "0.6166891", "0.6166771", "0.61624306", "0.61489266", "0.61387885", "0.61385566", "0.61385566", "0.61385566", "0.6118895", "0.611641", "0.6085885", "0.6075685", "0.6061688", "0.6045927", "0.6039552", "0.60354847", "0.6031418", "0.60225916", "0.6019326", "0.60169667", "0.6013923", "0.6006754", "0.6005968", "0.6000295", "0.5996864", "0.59928614", "0.5973114", "0.59642303", "0.5960714", "0.59537053", "0.5952479", "0.5951339", "0.59487903", "0.5928966", "0.5924117", "0.5907075", "0.5906674", "0.589993", "0.5889983", "0.58891743", "0.58841705", "0.58808655", "0.58670825", "0.58662564", "0.58640724", "0.58631206", "0.5858004", "0.5844991", "0.5842757", "0.5841494", "0.5833957", "0.58317167", "0.58288383", "0.58269995", "0.5826538", "0.5818549", "0.5813366", "0.580864", "0.580864", "0.57985425", "0.57929975", "0.57870543", "0.57857895", "0.57800436", "0.57769877", "0.5771137", "0.5766067", "0.5761644", "0.5759165", "0.5745926", "0.5744867", "0.5742041", "0.5741267", "0.5741267", "0.57402754", "0.57402754" ]
0.5926593
58
Determine whether the user can add a server host.
public function addServerHost(User $user, ServerAuthKey $key) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasServer(string $name): bool {}", "public function host_exist() {\n return D( 'User/Host' )->host_exist_verifition( array( 'usr_login_id' => get_session_id() ) );\n }", "public function shouldCheckHttpHost()\n {\n return !Director::is_cli() && isset($_SERVER['HTTP_HOST']);\n }", "public function isHoster()\n\t{\n\t\t$hosters = include('OWNER.php');\n\t\treturn in_array($this->getFullName(), $hosters, true);\n\t}", "public static function hostAllowed($conn, $host_id, $user = '') \n { \n Ossim_db::check_connection($conn);\n \n $cnd_1 = (!$_SESSION['_user_vision']['host_where'] || self::only_ff_host());\n $cnd_2 = ($_SESSION['_user_vision']['net_where'] && !self::only_ff_net());\n \n if ($cnd_1 && $cnd_2) \n {\n return Asset_host::is_in_allowed_nets($conn, $host_id); // if host_id is in allowed nets\n }\n \n return self::is_asset_allowed($conn, $host_id, 'host', $user);\n }", "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function isHostConfigured() {}", "public function has_server( $key ) \n\t{\n\t\treturn array_key_exists( strtoupper($key), $this->SERVER );\n\t}", "public function addServerAlias(string $alias): bool {}", "public function supportsHost(string $host) : bool\n {\n return in_array($host, [\n 'android.googleapis.com',\n 'fcm.googleapis.com',\n ]);\n }", "function canAdd() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\tif(!$permission->CanAdd) return false;\r\n\t\treturn true;\r\n\t}", "public function isHostBackend()\n {\n $backendUrl = $this->configInterface->getValue(Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE);\n $backendHost = parse_url(trim($backendUrl), PHP_URL_HOST);\n $host = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';\n return (strcasecmp($backendHost, $host) === 0);\n }", "public function isForServer()\n {\n return $this->server !== null;\n }", "public static function allowServerInfo()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_info'];\n\t}", "function adminChk(){\r\n\treturn $_SERVER[\"REMOTE_ADDR\"] == \"118.36.189.171\" || $_SERVER[\"REMOTE_ADDR\"] == \"39.115.229.173\" || $_SERVER[\"REMOTE_ADDR\"] == \"127.0.0.1\";\r\n}", "public function addNameserverIp(string $ip): bool {}", "public function isLocalhost()\n {\n $whitelist = [ '127.0.0.1', '::1', ];\n return in_array( $this->getServerVar('REMOTE_ADDR' ), $whitelist, true );\n }", "public function hasServerPublicIpAddr()\n {\n return $this->server_public_ip_addr !== null;\n }", "public function canAdd()\n {\n return $this->options->getOption(\"canAdd\");\n }", "function okcomputer($allowed) {\n\n $allowed_hosts = array($allowed);\n if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {\n header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request');\n exit;\n }\n}", "public static function hasAccess(): bool\n {\n return in_array(Helper::getClientIP(), self::$ips);\n }", "protected function canAdd()\n {\n return $this->hasStrategy(self::STRATEGY_ADD);\n }", "public function hasServerKey()\n {\n return $this->server_key !== null;\n }", "public function can_do_default() {\n $context = context_system::instance();\n return has_capability('local/elisprogram:manage', $context);\n }", "public function pushHosts(): bool;", "function is_subdomain_install()\n {\n }", "private function validateCurrentHostname(): bool\n {\n // check that current base url is configured as an allowed hostname\n $baseUrl = $this->url->getBaseUrl();\n foreach ($this->getAllowedBypassHostnames() as $hostname) {\n if (strpos($baseUrl, $hostname) !== false) {\n return true;\n }\n }\n return false;\n }", "public function addServerUser(User $user, ServerAuthKey $key)\n {\n return false;\n }", "public function canManageOwnSubdomain();", "public function checkInServerList()\n {\n $serverList = preg_split('/\\r\\n|[\\r\\n]/', ConfPPM::getConf('server_list'));\n $myIP = array();\n $myIP[] = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['GEOIP_ADDR']) ? $_SERVER['GEOIP_ADDR'] : '127.0.0.1';\n if (empty(array_intersect($serverList, $myIP))) {\n return false;\n } else {\n return true;\n }\n }", "public function addHost(string $hostName): bool\n {\n $contents = file_get_contents($this->path);\n if (!is_writable($this->path)) {\n throw new \\Exception(\"Script must be ran by superuser/root!\");\n } elseif (!str_contains($contents, \"\\t\" . $hostName)) {\n file_put_contents($this->path, $contents . \"\\n127.0.0.1\\t\" . $hostName, FILE_APPEND);\n return true;\n } else {\n return false;\n }\n }", "function canAdd($user) {\n return $user->isPeopleManager();\n }", "function isAddable(){\n return VM_manager_here;\n }", "public function hasAccess() : bool\n\t{\n\t\t$ip = Server::getIP();\n\t\t$access = false;\n\n\t\t// Allow local access\n\t\tif ( Stringify::contains(['127.0.0.1','::1'], $ip) ) {\n\t\t\t$access = true;\n\n\t\t} else {\n\n\t\t\t// Check allowed IPs\n\t\t\t$allowed = $this->applyFilter('access-allowed-ip', $this->getAllowedAccess());\n\t\t\tif ( !empty($allowed) ) {\n\t\t\t\tif ( Stringify::contains($allowed, $ip) ) {\n\t\t\t\t\t$access = true;\n\n\t\t\t\t} else {\n\t\t\t\t\t$access = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Deny access\n\t\t\t\t$denied = $this->applyFilter('access-denied-ip', $this->getDeniedAccess());\n\t\t\t\tif ( Stringify::contains($denied, $ip) ) {\n\t\t\t\t\t$access = false;\n\n\t\t\t\t} else {\n\t\t\t\t\t$access = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$data = ['ip' => $ip, 'access' => $access];\n\t\t$this->doAction('ip-access', $data);\n\t\treturn $access;\n\t}", "private static function wwwCanBeAdded(string $host): bool\n {\n //is an ip?\n if (empty($host) || filter_var($host, FILTER_VALIDATE_IP)) {\n return false;\n }\n //is \"localhost\" or similar?\n $pieces = explode('.', $host);\n\n return count($pieces) > 1 && $pieces[0] !== 'www';\n }", "function is_network_admin()\n {\n }", "protected function isIgnoredServer() {\n\n $isValidHost = true;\n $ignoreList = $this->pluginCommon->optServerExludeList();\n if (count($ignoreList)) {\n // Make sure the match is at the end.\n $adder = '_xzx_';\n $serverTest = $_SERVER['SERVER_NAME'] . $adder;\n // If the current server matches any of the ignored list, then get out.\n foreach ($ignoreList as $cur) {\n $isValidHost = (false === stripos( $serverTest, $cur . $adder ) ? true : false);\n if (!$isValidHost) {\n // debug\n $this->foundHost = $cur;\n break;\n }\n }\n }\n return !$isValidHost;\n }", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "private function checkServer($lolServer){\n\t\tif(in_array(strtolower($lolServer), $this->_lolServers)){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "private function checkIfOnLocalhost() {\n $whitelist = array(\n '127.0.0.1',\n '::1'\n );\n if(in_array($_SERVER['REMOTE_ADDR'], $whitelist)){\n return;\n } else {\n $this->databaseServerName = getenv('DATABASE_SERVER_NAME');\n $this->databaseUserName = getenv('DATABASE_USERNAME');\n $this->databasePassword = getenv('DATABASE_PASSWORD');\n $this->databaseName = getenv('DATABASE_NAME');\n }\n }", "public function canManageSubdomains();", "public function isPublic()\n {\n $allowsAllHosts = false;\n $allowsRListings = false;\n foreach ($this->rules as $rule) {\n if (self::READ & $rule['mask']) {\n if (!empty($rule['rlistings'])) {\n $allowsRListings = true;\n } elseif (!empty($rule['host']) && trim($rule['host']) == '*') {\n $allowsAllHosts = true;\n }\n }\n }\n\n return $allowsAllHosts && $allowsRListings;\n }", "function localhost()\n{\n\t$whitelist = array('127.0.0.1', \"::1\");\n\n\tif(in_array($_SERVER['REMOTE_ADDR'], $whitelist)){\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "public function canCreateSubdomains();", "public static function groupHostAllowed($conn, $group_id) \n { \n // TODO: Review this function, functionality has been changed\n static $groupAllowedCache;\n \n Ossim_db::check_connection($conn); \n \n $user = self::get_session_user();\n \n if (isset($groupAllowedCache[\"$user\"][\"$group_id\"]))\n {\n return $groupAllowedCache[\"$user\"][\"$group_id\"];\n }\n \n $hosts = Asset_group::get_object($conn, $group_id);\n \n if (is_object($hosts) && !empty($hosts) && $hosts->get_num_host($conn) > 0)\n {\n $groupAllowedCache[\"$user\"][\"$group_id\"] = FALSE;\n \n return FALSE;\n }\n else\n {\n $groupAllowedCache[\"$user\"][\"$group_id\"] = TRUE;\n \n return TRUE;\n }\n }", "function can_do_add() {\n //try to obtain the report shortname directly from the url parameter\n //(applies only during the first step of the wizard interface)\n $report_shortname = $this->optional_param('report', '', PARAM_ALPHAEXT);\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }", "public function can_do_add() {\n return false;\n }", "public static function isAdministration()\n {\n $permissions = [\"Vice direzione\", \"Direzione\"];\n return in_array($_SESSION[\"permission\"], $permissions);\n }", "public function hasUrlHost()\n {\n return $this->url_host !== null;\n }", "function isLocalhost($whitelist = array('127.0.0.1', '::1'))\n\t{\n\n\t\tif(php_sapi_name() === \"cli\") return false;\n\n\t\treturn (in_array($_SERVER['REMOTE_ADDR'], $whitelist));\n\n\t}", "public function checkisOnCurrentHostInvalidHosts() {}", "public function hasServerPrivateIpAddr()\n {\n return $this->server_private_ip_addr !== null;\n }", "public function hasRemoteUrl();", "public function canImpersonate();", "public function isRemote();", "public static function hostMatched() {\n\t\t// TODO: add third-party comparison\n\t\t$return = TRUE;\n\t\treturn TRUE;\n\t\tif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_SERVER['HTTP_REFERER']) && isset($_SERVER['HTTP_HOST'])) {\n\t\t\tlist(, , $referer_host) = explode('/', $_SERVER['HTTP_REFERER'], 4);\n\t\t\tif ($_SERVER['HTTP_HOST'] != $referer_host) {\n\t\t\t\t// Request came from a different site.\n\t\t\t\t$return = FALSE;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function hasServerType()\n {\n return $this->server_type !== null;\n }", "public function acceptsGuestEntries()\n {\n return $this->settings['accept-guest-entries'] ?? false;\n }", "public function canAddUnknownPerson();", "public function isInstalled(Server $server): bool;", "function is_dhcp_server_enabled() {\n\tforeach (config_get_path('dhcpd', []) as $dhcpif => $dhcpifconf) {\n\t\tif (empty($dhcpifconf)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (isset($dhcpifconf['enable']) &&\n\t\t\t!empty(config_get_path(\"interfaces/{$dhcpif}\"))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function hasAllowReplication(){\n return $this->_has(3);\n }", "function storage_can_set($sv_user) {\n $allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));\n if (!$allowed) {\n print \"ERROR : Not allowed\";\n }\n return $allowed;\n}", "function trusted() {\n\t//-----------------------------------------------------------\n\t// Check for trusted host\n\tif(getenv('HTTP_REFERRER')) {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERRER'));\n\t\t} else {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERER'));\n\t\t}\n\tif($ref_url_parts['host'] !== $this->accept_host) {\n\t\treturn false;\n\t\t//print \"ERROR - You do not have permission to access this site remotely.\";\n\t\t//exit;\n\t} else {\n\t\treturn true;\n\t}\n}", "public function isTrustedServer($url) {\n\t\treturn $this->dbHandler->serverExists($url);\n\t}", "private function serverNameIsLocalhostOrNumeric() {\r\n\r\n $isDomainNameLocalhost = (strcmp(strtolower($_SERVER['SERVER_NAME']), \"localhost\") == 0);\r\n\r\n if ($isDomainNameLocalhost) {\r\n\r\n return true;\r\n\r\n }\r\n\r\n $matchIsDomainNameNumeric = preg_match(\"/^(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)$/\", $_SERVER['SERVER_NAME']);\r\n\r\n if ($matchIsDomainNameNumeric === false) doDie(\"Could not perform PCRE pattern match on \\$_SERVER['SERVER_NAME'])\", __FILE__, __LINE__, __CLASS__, __METHOD__, __FUNCTION__);\r\n\r\n $isDomainNameNumeric = ($matchIsDomainNameNumeric === 1);\r\n\r\n if ($isDomainNameNumeric) {\r\n\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n\r\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "function check_localhost()\n{\n if ( $_SERVER[\"SERVER_ADDR\"] == '127.0.0.1' )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n}", "public function authorize(): bool\n {\n return null !== $this->getGame()->findPlayerByName($this->request->get('nickname'));\n }", "public static function isValidHost($host)\n {\n }", "public function add(User $user)\n {\n return $user->role->can_add_post == 1;\n }", "private function _isMine(): bool {\n\t\treturn $this->isMyServer() && $this->isMyPID();\n\t}", "public function authorize()\n {\n $user = $this->user();\n return $user->can('add-user');\n }", "function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isUserIPAddressAllowedAccess()\n\t{\n\t\ttry\n {\n $IpBin = new IpBin();\n return $IpBin->isUserIPAddressAllowedAccess($this->getSiteUser()->getId());\n }\n catch(\\Whoops\\Example\\Exception $e)\n {\n Log::error(\"Could not check if ip address is allowed access for user [\" . $this->getSiteUser()->getId() . \"]. \" . $e);\n return FALSE;\n }\n\t}", "public function hasServerPort()\n {\n return $this->server_port !== null;\n }", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function access() {\n if ( ! isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']) ) {\n return false;\n }\n return true;\n }", "public function isHostNameValid($http_host)\n {\n if (empty($http_host)) {\n $result = false;\n } else {\n $result = true;\n }\n\n if (!$result) {\n $app = App::instance();\n $app->setNotification('E', $app->t('error'), $app->t('host_name_cannot_be_empty'), true, 'server_configuration');\n }\n\n return $result;\n }", "public function valid_db_host()\n\t{\n\t\treturn $this->db_validation(2002, function () {\n\t\t\tee()->form_validation->set_message(\n\t\t\t\t'valid_db_host',\n\t\t\t\tlang('database_invalid_host')\n\t\t\t);\n\t\t});\n\t}", "public static function isRequestFromServerLocal() {\n $ip = UtilsNet::fetch_alt_ip();\n return in_array($ip, UtilsNet::getServerLocalIps());\n }", "public function isValidHostName($host) {\r\n \r\n /* Check for null host */\r\n if (is_null($host) || $host == '') {\r\n $this->debug('isValidHostName() has a null hostname.');\r\n $this->setError(self::$NQT_INVALID_HOST);\r\n return false;\r\n }\r\n \r\n /* Check for bogus characters. */\r\n if (preg_match('/[^a-z0-9\\.\\-_]/i', $host)) {\r\n $this->debug('isValidHostName() has a hostname with disallowed chars.');\r\n $this->setError(self::$NQT_INVALID_HOST);\r\n return false;\r\n }\r\n \r\n /* Subdomains are generally forbidden, NQT operates against TLDs */\r\n /*\r\n $tld = strstr($host, '.');\r\n if (substr_count($tld, '.') > 1 && (!in_array($tld, self::$SECOND_LEVEL_TLDS))) {\r\n $this->setError(self::$NQT_TLDS_ONLY);\r\n return false;\r\n }\r\n */\r\n \r\n return true;\r\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "function ticketbud_server_connectivity_ok() {\n\t// skip the check on WPMU because the status page is hidden\n\tglobal $ticketbud_unused_api_key;\n\tif ( $ticketbud_unused_api_key )\n\t\treturn true;\n\t$servers = ticketbud_get_server_connectivity();\n\treturn !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );\n}", "public function canBeImpersonated();", "public function userCanSubmit() {\n\t\tglobal $content_isAdmin;\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($content_isAdmin) return true;\n\t\t$user_groups = icms::$user->getGroups();\n\t\t$module = icms::handler(\"icms_module\")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);\n\t\treturn count(array_intersect($module->config['poster_groups'], $user_groups)) > 0;\n\t}", "function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "function canAdd($user, $to_company) {\n return $user->isAdministrator() || $user->isPeopleManager() || $user->isCompanyManager($to_company);\n }", "public function canUserManageUsage()\n {\n return $this->getUser()->hasAccess('manage', 'newsUsage');\n }", "function checkNginxServer()\n {\n // check nginx is installed\n if (!isNginxInstalled()) {\n return false;\n }\n\n $config = $this->inst()->webServer->getConfig();\n\n return $config && in_array($this->inst()->domain, $config->domains);\n }", "public function allow_inventory_access(){\n if (!empty($this->flags['player_battle'])){ return false; }\n elseif (!empty($this->flags['challenge_battle'])){ return false; }\n return true;\n }", "private function check_players(){\n\t\tforeach($this->clients as $cli){\n\t\t\tif(null!==$cli){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function HostExist($HostServer) { //retourne 1 si une machine existe dans le fichier hosts\n// verifier si HostServer ne peut pas etre plus precis\n\t$filehost = '/etc/backuppc/hosts';\n\t$lignes = file(\"$filehost\");\n\tforeach ($lignes as $num =>$line) {\n\t\tif (preg_match(\"/^$HostServer\\s+/i\",$line)) {\n\t\t\treturn true;\n\t\t} \n\t}\n\treturn false;\n}", "public static function allowServerStatus()\n\t{\n\t\treturn MHTTPD::$config['Admin']['allow_server_status'];\n\t}", "public function isSiteAdmin(){\n\t\treturn $this->rank_user==config('ranks.SITE_ADMIN');\n\t}", "public function canPost()\n {\n $role = $this->role;\n if($role == 'author' || $role == 'admin')\n {\n return true;\n } else {\n return false;\n }\n }", "protected function checkTrustedHostPattern() {}", "protected function allowAdd($data = array())\n\t{\n\t\treturn JFactory::getUser()->authorise('core.admin', $this->option);\n\t}" ]
[ "0.6472003", "0.6393594", "0.63456297", "0.6293234", "0.6217722", "0.6145836", "0.606648", "0.60478276", "0.6045852", "0.60220313", "0.6005659", "0.5988217", "0.59685993", "0.5964756", "0.59636235", "0.5941678", "0.5936683", "0.59210706", "0.5901499", "0.58996457", "0.5896767", "0.58886623", "0.58803886", "0.58603823", "0.584023", "0.5829129", "0.58187824", "0.58139557", "0.580786", "0.5803055", "0.5801998", "0.5800536", "0.57882327", "0.5788113", "0.57783186", "0.57617956", "0.5749223", "0.5735615", "0.572612", "0.57248783", "0.57170546", "0.5698072", "0.5663791", "0.5663744", "0.5657219", "0.5642688", "0.5621556", "0.56111956", "0.5600084", "0.5593985", "0.5572479", "0.5569772", "0.5561059", "0.5560067", "0.5559164", "0.5557564", "0.55570805", "0.55548817", "0.5550724", "0.5543641", "0.5537551", "0.5532736", "0.5528424", "0.5520473", "0.5500083", "0.54927826", "0.5489187", "0.5479443", "0.54724544", "0.54658735", "0.5465215", "0.5457246", "0.54569864", "0.54549", "0.5435933", "0.5430329", "0.542733", "0.5425539", "0.5422113", "0.5421832", "0.5418211", "0.5407856", "0.54071176", "0.5393263", "0.53893197", "0.5381057", "0.5374259", "0.5373293", "0.53725004", "0.53617215", "0.53571546", "0.5353059", "0.5333413", "0.53286636", "0.532379", "0.53195345", "0.531621", "0.53146243", "0.5306673", "0.5306441" ]
0.67002326
0
Determine whether the user can add a server user.
public function addServerUser(User $user, ServerAuthKey $key) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canAdd($user) {\n return $user->isPeopleManager();\n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "static function canAdd(IUser $user, $context = null) {\n return $user instanceof User && $user->isAdministrator();\n }", "function canAdd() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\tif(!$permission->CanAdd) return false;\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n $user = $this->user();\n return $user->can('add-user');\n }", "public function add(User $user): bool {\n if ($user->is_super_admin) {\n return true;\n }else if ($user->tokenCan(['add-registrations-dev', 'add-registrations-stage', 'add-registrations-prod'])) {\n return true;\n }else {\n return false;\n }\n }", "function canAdd($user, $to_company) {\n return $user->isAdministrator() || $user->isPeopleManager() || $user->isCompanyManager($to_company);\n }", "function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function hasUser();", "public function add(User $user)\n {\n return $user->role->can_add_post == 1;\n }", "public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function canAdd()\n {\n return $this->options->getOption(\"canAdd\");\n }", "public function addUser(User $user)\n {\n if($user->auth_id == 1)\n {\n return true;\n }\n return false;\n }", "static function canAddGlobal(User $user) {\n\t\t if ($user instanceof Subcontractor || $user instanceof Client) {\n\t\t\t return false;\n\t\t } // if\n\n\t\t return parent::canAddGlobal($user);\n\t }", "protected function canAdd()\n {\n return $this->hasStrategy(self::STRATEGY_ADD);\n }", "public function canManageUsers()\n {\n return true;\n }", "static function canAdd(User $user, Calendar $calendar) {\n\t\t if ($user instanceof Subcontractor || $user instanceof Client) {\n\t\t\t return false;\n\t\t } // if\n\n\t\t return parent::canAdd($user, $calendar);\n\t }", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function hasUseradditem(){\n return $this->_has(24);\n }", "function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }", "public function addServerHost(User $user, ServerAuthKey $key)\n {\n return false;\n }", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }", "public function can_do_add() {\n return false;\n }", "protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }", "public function canUserAssignUsage()\n {\n $user = $this->getUser();\n\n return $user->isAdmin || \\in_array('tl_news::usage', $user->alexf, true);\n }", "public function canUserManageUsage()\n {\n return $this->getUser()->hasAccess('manage', 'newsUsage');\n }", "function addUser($user, $password) {\n return true;\n }", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function isGetUserStep(ServerRequest $request);", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function add(User $user)\n {\n return $user->isAbleTo('product.add');\n }", "private function canCreate()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function 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 checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "public function hasuser()\n {\n return is_object($this->luser);\n }", "public function add(User $user, $model)\n {\n return $user->hasPermission('add_settings');\n }", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "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}", "function storage_can_set($sv_user) {\n $allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));\n if (!$allowed) {\n print \"ERROR : Not allowed\";\n }\n return $allowed;\n}", "public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function isUserManager()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'M');\n\t}", "private function isMyServer(): bool {\n\t\ttry {\n\t\t\treturn Server::singleton($this->application)->id() === $this->memberInteger('server');\n\t\t} catch (Throwable) {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function allowAdd($data = array())\n\t{\n\t\treturn JFactory::getUser()->authorise('core.admin', $this->option);\n\t}", "public function userCanSubmit() {\n\t\tglobal $content_isAdmin;\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($content_isAdmin) return true;\n\t\t$user_groups = icms::$user->getGroups();\n\t\t$module = icms::handler(\"icms_module\")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);\n\t\treturn count(array_intersect($module->config['poster_groups'], $user_groups)) > 0;\n\t}", "public function isUserOrGroupSet() {}", "public function register_user()\n {\n \n return true;\n \n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function authorize()\n {\n $user = Auth::user();\n\n $foodAddition = new FoodAddition();\n\n if((!$user->can('create', $foodAddition)) || (!$user->can('create-food-addition'))) {\n return false;\n }\n\n return true;\n }", "public function authorize(): bool\n {\n return null !== $this->getGame()->findPlayerByName($this->request->get('nickname'));\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function canAddUnknownPerson();", "public function authorize()\n {\n return $this->user()->can(\"Crear Nómina\");\n }", "function wp_sub_user_exists_on_site( int $user_id, int $site_id ) : bool {\n\t$allowed = in_array( $site_id, get_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::SITE_META_KEY, false ) );\n\n\treturn apply_filters( 'wp_sub_user_exists_on_network', $allowed, $user_id, $site_id );\n}", "public function create(User $user) : bool\n {\n return $user->isAdmin() || $user->hasPermission('create_user') || $user->hasPermission('create_all');\n }", "public function canImpersonate(): bool\n {\n return $this->can('impersonate-users');\n }", "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 }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "public function create(User $user)\n {\n return $user->can('create user');\n }", "public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function authorize()\n {\n return $this->user()->can('user.create');\n }", "function isAddable(){\n return VM_manager_here;\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 check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function create($user)\n {\n return $user->hasPermissionTo('create ' . static::$key);\n }", "public function supports_users() {\n return true;\n }", "public static function canAddRoot()\n\t{\n\t\treturn static::restrictionCheck( 'add' );\n\t}", "function wp_sub_user_exists_on_network( int $user_id, int $network_id ) : bool {\n\t$networks = (array) get_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::NETWORK_META_KEY, false );\n\t$networks = array_filter( $networks );\n\n\t$allowed = in_array( $network_id, $networks );\n\treturn apply_filters( 'wp_sub_user_exists_on_network', $allowed, $user_id, $network_id );\n}", "public function create(?User $user): bool\n {\n return optional($user)->isAdmin() || !optional($user)->isEndUser();\n }", "public function create(User $user)\n {\n if ($user->can('create_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "function canUpdateUser($userid){\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//make sure we are trying to edit a user who really belongs to our guild\r\n\t\tif($permissions->guildid != $this->guild->id || !$this->HasPermission(\"AccountSecondaryUsers\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function userExists( $user_name ) { return true;}", "public function canUpload()\n {\n return $this->checkFrontendUserPermissionsGeneric('userGroupAllowUpload');\n }", "public function canAdd()\n\t{\n\t\t/* If there is no parent/child relationship and no subnode class, you can't add a child */\n\t\tif( static::$databaseColumnParent === NULL AND static::$subnodeClass === NULL )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn static::restrictionCheck( 'add' );\n\t}", "public function hasUser(): bool\n {\n return ! is_null($this->user);\n }", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n\t\treturn $this->user()->can('create', Collection::class);\n }", "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( \"core\",\"members\" );\n\t}", "public function hasUserLimit()\n {\n return $this->user_limit !== null;\n }", "protected function isUserAllowedToLogin() {}", "public function canPost()\n {\n $role = $this->role;\n if($role == 'author' || $role == 'admin')\n {\n return true;\n } else {\n return false;\n }\n }", "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 permissions()\n\t{\n\t\t// add any additional custom permission checking here and \n\t\t// return FALSE if user doesn't have permission\n\t\n\t\treturn TRUE;\n\t}", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "static function user_has_added_user($user1, $user2) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' \n FROM `relationship` \n WHERE `user1` = \".$user1.\" AND `user2` = \".$user2.\" AND `relationship`.`type` = 1;\";\n $query = mysqli_query($con, $sql);\n return (mysqli_fetch_object($query)->count == 1);\n }", "function addToDatabase() {\n\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$add_query = \"INSERT INTO user_table \n\t\t(user_name, \n\t\t user_password,\t\n\t\t isAdmin,\t\n\t\t user_first_name,\n\t\t user_last_name) \n\t\tVALUES \n\t\t('$this->username', \n\t\t '$this->password',\t\n\t\t '$this->isAdmin',\t\n\t\t '$this->firstName',\t\n\t\t '$this->lastName');\";\n\n\t\t$result = mysqli_query($db, $add_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}", "function uservalidationbyadmin_allow_new_user_can_edit($hook, $type, $value, $params) {\n\t// $params['user'] is the user to check permissions for.\n\t// we want the entity to check, which is a user.\n\t$user = elgg_extract('entity', $params);\n\n\tif (!($user instanceof ElggUser)) {\n\t\treturn;\n\t}\n\n\t$context = elgg_get_context();\n\tif ($context == 'uservalidationbyadmin_new_user' || $context == 'uservalidationbyadmin_validate_user') {\n\t\treturn TRUE;\n\t}\n\n\treturn;\n}", "function check_permission()\n\t{\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\tif( ! addPermission( $CFG[\"sector\"][\"add\"] ) )\n\t\t{\n\t\t\t$this->form_validation->set_message('check_permission', _e('access denied'));\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\t}", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }" ]
[ "0.70821613", "0.704561", "0.6672832", "0.6655912", "0.6635948", "0.6586314", "0.657896", "0.6531571", "0.6461797", "0.63717586", "0.633014", "0.6312042", "0.6239829", "0.6237385", "0.6187394", "0.6161564", "0.6125677", "0.61196476", "0.6110488", "0.60980946", "0.6093692", "0.60254645", "0.60123926", "0.600989", "0.59972143", "0.5995626", "0.5993659", "0.597275", "0.5971299", "0.59445626", "0.59397715", "0.59324753", "0.59257066", "0.5916919", "0.5894935", "0.589458", "0.58755016", "0.58752686", "0.5867928", "0.5861745", "0.58589417", "0.5852066", "0.5834787", "0.58177125", "0.58071834", "0.58058953", "0.57850826", "0.57775915", "0.57673013", "0.57660097", "0.576001", "0.5758981", "0.5752572", "0.5745161", "0.57306385", "0.5730407", "0.5729538", "0.57293385", "0.5726537", "0.5725416", "0.5721636", "0.5719876", "0.5718734", "0.57143736", "0.5708184", "0.57077426", "0.57077426", "0.57077426", "0.57077426", "0.5706342", "0.5706004", "0.570098", "0.5690994", "0.56884974", "0.56861866", "0.5685657", "0.5684046", "0.56781304", "0.567391", "0.5668731", "0.56667316", "0.56587946", "0.565248", "0.5636238", "0.56360596", "0.5631775", "0.56244034", "0.5619759", "0.5618151", "0.56128323", "0.5607694", "0.56055665", "0.5596849", "0.5594457", "0.55940896", "0.55894035", "0.5585743", "0.5585743", "0.5585743", "0.5585743" ]
0.6936872
2
Belongsto relations with Login.
public function lastLogin() { return $this->belongsTo(Login::class, 'last_login_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function user()\n {\n return $this->belongsTo(Login::class);\n }", "public function user()\n {\n return $this->belongsTo('App\\User', 'User_id', 'login');\n }", "public function user(): BelongsTo;", "public function user(){\n\n //class midwife belongs to class user\n \n return $this->belongsTo(User::class);\n}", "public function initialize()\n {\n $this->belongsTo('loginAttemptUserID', 'Users', 'userID', ['alias' => 'Users']);\n }", "public function users(){\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust.role_user_table'),Config::get('entrust.role_foreign_key'),Config::get('entrust.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust.role_user_table'));\n }", "public function utilisateur() {\n $relation = $this->belongsTo(\"Utilisateur\");\n return $relation;\n }", "public function user()\n {\n return $this->belongsTo(User::class);//relacionamento da ordem 1\n }", "public function user(){\n return $this->belongsTo('Corp\\Models\\User');\n }", "public function user() : BelongsTo\n {\n return $this->belongsTo(ForUser::class, 'id_person', 'id_phperson');\n }", "public function user()\n {\n \treturn $this -> belongsTo( User :: class );\n }", "public function relations()\n {\n return array( \n 'usuarios'=>array(self::BELONGS_TO, 'Usuarios', 'usuarios_id_usuario'),\n 'habilidades'=>array(self::BELONGS_TO, 'Habilidades' , 'habilidades_id_habilidad'),\n );\n }", "public function users()\n {\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust-branch.role_user_table'),Config::get('entrust-branch.role_foreign_key'),Config::get('entrust-branch.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust-branch.role_user_table'));\n }", "public function initialize()\n {\n $this->hasMany('groep_id', 'Gebruikers', 'groep_id', array('alias' => 'Gebruikers'));\n $this->hasMany('groep_id', 'Groep_permissies', 'groep_id', array('alias' => 'Groep_permissies'));\n }", "public function usuario(){\n return $this->belongsTo(User::class,'idusuario','id');\n }", "public function user(): BelongsTo\n {\n return $this->belongsTo(User::class, 'id_owner', 'id');\n }", "public function user(){\n return $this->belongsTo('App/User','id_users');\n }", "function userJoins() { \n $model = config('auth.model');\n return $model::data();\n }", "public function belongsTo($class, $foreignKey = null, $otherKey = null);", "public function user_R(){\n $this->belongsTo('App\\User');\n }", "public function usuario(){\n return $this->belongsTo(User::class, 'user_id');\n }", "public function relations()\n {\n return array(\n 'business' => array(self::BELONGS_TO, 'User', 'businessId'),\n );\n }", "public function oponente()\n {\n return $this->belongsTo('App\\User', 'oponente_id');\n }", "public function user(){\n return $this->belongsTo(User::class, 'id_aplicacion_usuario');\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo(SocialPassport::getAuthProviderModel(), 'owner_id');\n }", "public function user(){\n return $this->hasMany('App\\User');//un rol puede pertenecer a varios usuarios\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function user(){\n \treturn $this->belongsTo(User::class);\n }", "public function user(){\n \treturn $this->belongsTo(User::class);\n }", "public function user() : BelongsTo\n {\n return $this->belongsTo(User::class);\n }", "public function user() : BelongsTo\n {\n return $this->belongsTo(User::class);\n }", "public function user() \n { \n return $this->belongsTo('User'); \n }", "public function usuario() {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function user(): BelongsTo\n {\n return $this->belongsTo(User::class, 'id', 'id');\n }", "public function users(){\n return $this->belongsToMany('cms\\User');\n }", "public function admin(){\n return $this->belongsToOne('App\\User');\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function users()\n {\n return $this->belongsTo('p4\\User');\n }", "public function cliente()\n {\n \treturn $this->belongsTo('App\\User', 'id_cliente');\n }", "public function fromUser()\n {\n return $this->belongsTo('App\\User',\"from_user\", \"id\");\n }", "public function user()\n {\n return $this->belongsTo(\"App\\User\");\n }", "public function user() : BelongsTo\n {\n return $this->belongsTo('App\\Models\\User');\n }", "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "public function initialize()\n {\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('alias' => 'Datospersonales'));\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('foreignKey' => true));\n }", "public function user(){\n\t\treturn $this->belongsto('App\\Entities\\User\\User');\n\t}", "public function init(){\n $s = $this->schema();\n\n $s->hasMany('roles')\n ->className('net\\mediaslave\\authentication\\app\\models\\Role', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruRole', true);\n\n $s->hasMany('users')\n ->className('net\\mediaslave\\authentication\\app\\models\\User', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruUser', true);\n\n\n }", "public function initialize()\n {\n $this->belongsTo('user_id', 'Users', 'id');\n }", "public function user() {\n \treturn $this->belongsTo(User::class);\n }", "public function user() {\n \treturn $this->belongsTo(User::class);\n }", "public function User(){\n return $this->belongsTo(User::class);\n }", "public function User(){\n return $this->belongsTo(User::class);\n }", "public function usuarios()\n {\n return $this->belongsTo('App\\Usuario');\n }", "public function usuario(){\n return $this->belongsTo('App\\Personal','user_id');\n }", "public function users(){\n\t\treturn $this->belongsTo('\\\\bundles\\\\lincko\\\\api\\\\models\\\\data\\\\Users', 'parent_id');\n\t}", "public function head(): BelongsTo\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function user() : BelongsTo\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function user() {\n return $this->belongsTo('App\\Models\\User');\n }", "function relUser(){\n return $this->hasOne('App\\User', 'id', 'id_user');\n }", "public function user()\n {\n return $this->belongsTo('ScreenTec\\Models\\User');\n }", "public function owner()\n {\n \treturn $this->belongsTo('App\\User', 'user');\n }", "public function user() {\n return $this->belongsTo('User','userID','userID');\n }", "public function relations() {\n\t\t return array(\n\t\t\t\t 'account' => array('type' => self::BELONGS_TO, 'model' => 'GO\\Email\\Model\\Account', 'field' => 'account_id')\n\t\t );\n\t }", "public function user()\n {\n return $this->belongsTo('LRC\\Data\\Users\\User','user_id');\n }", "public function user(){\n \treturn $this->belongsTo('App\\User');\n }", "public function user(){\n \treturn $this->belongsTo('App\\User');\n }", "public function account()\n {\n return $this->belongsTo(CommunityFacade::getUserClass(), 'account_id');\n }", "public function user(){\n return $this->belongsTo(\"App\\User\");\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user(){\n return $this->belongsTo(User::class);\n }", "public function user()\n {\n \treturn $this->hasMany('App\\User');\n }", "public function doctor()\n {\n return $this->belongsTo('App\\User');\n }", "public function usuarios(){\n return $this->hasMany('App\\Models\\User');\n }", "public function user()\n {\n return $this->belongsTo('App/User');\n }", "public function initiator()\n{\n return $this->belongsTo('App\\User', 'user_id', 'id');\n}", "public function user()\n {\n \treturn $this->belongsTo(User::class);\n }", "public function user()\n {\n \treturn $this->belongsTo(User::class);\n }", "public function empresaCliente(){\n return $this->belongsTo('App\\EmpresaCliente','empresaCliente_id');\n }", "public function entreprise_user()\n {\n return $this->belongsTo(users::class, \"id\" );\n }", "public function user() {\n return $this->belongsTo('App\\User');\n }", "public function user()\n {\n \t// belongsTo(RelatedModel, foreignKey = to_user_id, keyOnRelatedModel = user_id)\n \treturn $this->belongsTo('App\\User','to_user_id','user_id');\n }", "public function user () {\n \treturn $this->belongsTo('App\\User');\n }", "public function user(): BelongsTo\n {\n return $this->belongsTo(\\App\\Models\\User::class);\n }", "public function coach() {\n return $this->belongsTo(User::class, 'users_id');\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo(Hotstream::userModel(), 'user_id');\n }", "public function auth()\n {\n \treturn $this->morphTo();\n }", "public function user(){\n return $this->belongsTo('App\\user');\n }", "public function user(){\n return $this->belongsTo(User::class, 'user_id', 'id');//https://laravel.com/docs/5.8/eloquent-relationships#one-to-many\n }", "public function user(){\n return $this->belongsTo(User::class);\n\n }", "public function user() {\n \treturn $this->belongsTo('App\\Models\\User');\n }", "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "public function user(){\n\n $this->belongsTo('App\\User');\n\n }", "public function autorPedido()\n {\n return $this->belongsTo(User::class, 'user_id'); // FK de esta tabla\n }", "public function userJoin() {\n return $this->belongsToMany('App\\Model\\User', 'trip_users');\n }" ]
[ "0.69116247", "0.6444018", "0.6379764", "0.6277993", "0.62036026", "0.6177529", "0.6175737", "0.617133", "0.60704774", "0.6066184", "0.60560846", "0.6048374", "0.596342", "0.59607387", "0.59390515", "0.59387124", "0.59165674", "0.59137344", "0.5902882", "0.588653", "0.58856714", "0.587844", "0.5867111", "0.5856681", "0.58389294", "0.5830485", "0.58228976", "0.58178526", "0.58178526", "0.5807716", "0.5807716", "0.58053035", "0.5793194", "0.5791068", "0.57799834", "0.5778942", "0.57757187", "0.57756674", "0.5775157", "0.57750624", "0.577378", "0.5771195", "0.57700723", "0.57671946", "0.5762708", "0.5755414", "0.5753867", "0.57530785", "0.57530785", "0.5751128", "0.5751128", "0.5750395", "0.5747422", "0.57461977", "0.5740493", "0.5740425", "0.5739824", "0.5737043", "0.5733907", "0.5730227", "0.57266676", "0.57258916", "0.57246137", "0.57223314", "0.57223314", "0.5721585", "0.5716375", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57101524", "0.57091707", "0.5708537", "0.5708161", "0.5702722", "0.5700851", "0.5699034", "0.5699034", "0.5696261", "0.56915563", "0.56912774", "0.56903356", "0.5688946", "0.5685932", "0.56852883", "0.5684171", "0.56821233", "0.5681932", "0.5680123", "0.567947", "0.5672159", "0.5671381", "0.56689817", "0.56688267", "0.56684333" ]
0.57055295
79
HasOne relations with Company.
public function company() { return $this->hasOne(Company::class, 'user_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function company()\n {\n return $this->hasOne('Company', 'id', 'id_company');\n }", "public function company(){\n return $this->hasOne(Company::class,\"id\",\"company_id\");\n }", "public function company()\n {\n return $this->hasOne('App\\Company', 'ID', 'CompanyID')->with('Country');\n }", "public function getCompany()\n {\n return $this->hasOne(CompanyProfile::className(), ['id' => 'company_id']);\n }", "public function Company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n\t{\n\t\treturn $this->belongsTo('App\\Company');\n\t}", "public function company()\n {\n return $this->belongsTo('App\\Models\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Models\\Company');\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo('\\App\\Company', 'id_company');\n }", "public function company(){\n\n return $this->belongsTo('App\\Company');\n \n }", "public function company() {\n\t\treturn $this->has_one('Company_User');\n\t}", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo('App\\CompanyDetail', 'company_detail_id');\n }", "public function company(){\n return $this->belongsTo('\\App\\Company');\n }", "public function company_profile()\n {\n return $this->hasOne('App\\Models\\CompanyProfile');\n }", "public function company()\n {\n return $this->belongsTo(CompanyProxy::modelClass(), 'company_id');\n }", "public function getCompany() {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n $this->belongsTo(Company::class);\n }", "public function company(){\n\n\t\t// belongsTo(RelatedModel, foreignKey = company_id, keyOnRelatedModel = id)\n\t\treturn $this->belongsTo(Company::class);\n\t}", "public function company(){\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class, 'company_id');\n }", "public function company()\n {\n return $this->belongsTo(\\Fleetbase\\Models\\Company::class);\n }", "public function company()\n {\n \treturn $this->belongsTo(Company::class, 'company_id');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }", "public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }", "public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }", "public function get_company() {\n\t\t\treturn $this->belongsTo(Company::class);\n\t}", "public function company()\n {\n return $this->belongsTo('App\\JobHunt\\Company');\n }", "public function company()\n {\n return $this->belongsTo(Company::class, 'project_company_id');\n }", "public function company()\n {\n return ($this->entity_type == 'c') ? $this->belongsTo('App\\Models\\Company\\Company', 'entity_id') : null;\n }", "public function companies(){\n return $this->belongsTo(Company::class);\n }", "public function companies(){\n return $this->belongsTo(Company::class);\n }", "public function companies(){\n\n return $this->belongsTo(Company::class, 'company_id');\n }", "public function company() \n\t{\n\t\treturn $this->belongsTo('Company', 'object_id')->where('soft_deleted', 0);\n\t}", "public function hasOne($class, $foreignKey = null, $localKey = null);", "public function company()\n {\n return $this->hasMany('\\App\\Company', 'id_plan');\n }", "public function companies()\n {\n return $this->belongsTo(Company::class, 'company_id','id');\n }", "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "public function company()\n {\n return $this->belongsTo('App\\Rolesentry_company', 'rolesentry_companies_id');\n }", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function category(): HasOne\n {\n return $this->hasOne(Category::class, 'id', 'category_id');\n }", "public function contact(){\n return $this->hasOne(Contact::class,'id','contact_id');\n }", "public function getCompanyTypeDoc()\n {\n return $this->hasOne(CompanyTypeDocument::className(), ['id' => 'company_type_doc_id']);\n }", "public function getCompany() : \\App\\Domain\\Model\\Company\n {\n return $this->getRef('from__company_id__to__table__companies__columns__id', 'products');\n }", "public function one_to_one()\n {\n }", "public function contact(): \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n {\n return $this->hasOne('App\\Models\\UserContactDetail');\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function Brand()\n { \n// $this->hasOne($relatedTo, $foreignKey, $localKey)\n return $this->hasOne('App\\Models\\Brand', 'brand_id', 'brand_id');\n }", "public function curso1()\n{\n return $this->hasOne(Curso::class, 'tipo_curso_id');\n}", "public function casos()\n\t{\n\t\treturn $this->hasOne('App\\Caso');\n\t}", "public function agencyBranch()\n {\n return $this->hasOne('App\\AgencyBranch');\n }", "public function cover(): HasOne\n\t{\n\t\treturn $this->hasOne('App\\Models\\Photo', 'id', 'cover_id');\n\t}", "public static function hasOne($model) {\n return new static(['type' => DbRelations::HAS_ONE, 'model' => $model]);\n }", "public function cliente(){\n return $this->hasOne('App\\Cliente','cuentaUsuario','cuentaUsuario');\n }", "public function initialize()\n {\n $this->belongsTo('company_id', 'Baka\\Auth\\Models\\Companies', 'id', ['alias' => 'company']);\n }", "public function getCorpOne()\n\t\t{\n\t\t\treturn $this->hasOne(Corp::className(), ['CORP_ID' => 'EMP_CORP_ID']);\n\t\t}", "public function getBranch()\n {\n return $this->hasOne(CompanyBranches::className(), ['BranchID' => 'BranchID']);\n }", "public function parent(): HasOne\n {\n return $this->hasOne(Category::class, 'id', 'parent_id');\n }", "public function blog()\n {\n return $this->hasOne('App\\Blog');\n }", "public function post(): HasOne\n {\n return $this->hasOne(\\Forme\\Framework\\Models\\Post::class);\n }", "public function user(): HasOne\n {\n return $this->hasOne(User::class);\n }", "public function parent() : HasOne\n {\n return $this->hasOne('App\\Category', 'parent_id');\n }", "public function invoice(){\n return $this->hasOne(Invoice::class);\n }", "public function palmares() {\n $relation = $this->hasOne(\"Palmares\");\n return $relation;\n }", "public function country() {\n return $this->hasOne(Country::class);\n }", "public function client()\n {\n return $this->hasOne('App\\Repositories\\client', 'id', 'client_id');\n }", "public function corporate()\n {\n return $this->belongsTo('App\\CorporateAccount');\n }", "public function picture(): HasOne\n {\n return $this->hasOne(Picture::class, 'id', 'picture_id');\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function agency()\n {\n return $this->hasOne('App\\Agency');\n }", "public function agency()\n {\n return $this->hasOne('App\\Agency');\n }", "public function NombreConsignacion(){\n return $this->hasOne('App\\Models\\Consignacion','id','id_consignacion')->with(\"InfoCliente\");\n }", "public function brand()\n {\n return $this->hasOne(Brands::class, 'id','brand_id');\n }", "public function carpeta(){\n return $this->hasOne('App\\CarpetaAdjuntos','id_carpeta_adjuntos','id_carpeta_adjuntos');\n }", "public function model()\n {\n return Company::class;\n }", "public function morphOne($class, $prefix, $typeAttribute = null, $foreignKey = null);", "public function hasOne($model, $foreignKey = '', $localKey = '')\n {\n // the default local key would look like `user_id`\n // for a model named User\n if (!$foreignKey) {\n $inflector = Inflector::get();\n $foreignKey = strtolower($inflector->underscore(static::modelName())).'_id';\n }\n\n if (!$localKey) {\n $localKey = self::DEFAULT_ID_PROPERTY;\n }\n\n return new HasOne($model, $foreignKey, $localKey, $this);\n }", "function has_one($field, $options = null) {\n\t\t$this->associations[$field] = &new HasOneAssociation($this, $field, $options);\n\n\t\treturn true;\n\t}", "public function getCompany()\n {\n return $this->company;\n }", "function getCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function client()\n {\n return $this->hasOne(Client::class);\n }", "public function designation(): HasOne\n {\n return $this->hasOne(Designation::class, 'designation_id');\n }", "public function country() {\n return $this->hasOne('App\\Country', 'id', 'country_id');\n }", "public function companyrole()\n {\n return $this->belongsTo('App\\CompanyRole', 'company_role_id');\n }" ]
[ "0.82446015", "0.8226465", "0.77412397", "0.7544776", "0.7363962", "0.73254365", "0.7307821", "0.7307821", "0.7307821", "0.7307821", "0.7307821", "0.7307821", "0.72803974", "0.72589546", "0.72589546", "0.72477114", "0.72477114", "0.72477114", "0.72477114", "0.72477114", "0.7227661", "0.7221631", "0.72097576", "0.72054857", "0.71859235", "0.71804786", "0.71773565", "0.71668214", "0.71654713", "0.71440667", "0.7137739", "0.7136391", "0.7127824", "0.70497566", "0.70436734", "0.7028505", "0.7028505", "0.7028505", "0.7020252", "0.7020252", "0.7020252", "0.7002564", "0.6923738", "0.6830773", "0.6754287", "0.65960413", "0.65960413", "0.65734255", "0.6538283", "0.6491117", "0.64492553", "0.6419759", "0.63336056", "0.6294712", "0.61457336", "0.61334395", "0.60985297", "0.60389704", "0.5994808", "0.59560674", "0.59245604", "0.5901247", "0.5852013", "0.5848339", "0.5809583", "0.5799682", "0.5795833", "0.579463", "0.5792752", "0.57861024", "0.5781319", "0.5765352", "0.5754489", "0.5732589", "0.571463", "0.56941134", "0.5688165", "0.5665997", "0.56599784", "0.5658985", "0.56392574", "0.5632433", "0.5624393", "0.5608859", "0.5608859", "0.5601534", "0.5601534", "0.559863", "0.5595958", "0.55891705", "0.5588168", "0.55712515", "0.5570316", "0.55696934", "0.5569454", "0.55625194", "0.5561856", "0.555992", "0.55589354", "0.55559677" ]
0.7528057
4
HasMany relations with Supplier.
public function suppliers() { return $this->hasMany(Supplier::class, 'user_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ingredientSuppliers(){\n return $this->hasMany(SupplierStock::class);\n }", "public function suppliers()\n {\n return $this->hasMany(Supplier::class, 'company_id');\n }", "public function supplierCategories()\n {\n return $this->hasMany(SupplierCategory::class);\n }", "public function Supplier()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Supplier');\n\t}", "public function supplier()\n {\n \treturn $this->belongsTo('App\\Supplier');\n }", "public function supplies(){\n return $this->hasMany('CValenzuela\\Supply');\n }", "public function supplier()\n\t{\n\t\treturn $this->belongsTo('App\\Supplier');\n\t}", "public function supplier()\n {\n return $this->belongsTo('App\\Supplier');\n }", "public function supplier()\n {\n return $this->belongsTo('App\\Models\\Supplier');\n }", "public function supplier()\n {\n return $this->belongsTo(Supplier::class);\n }", "public function supplier()\n {\n return $this->belongsTo(Supplier::class);\n }", "public function supplies()\n {\n return $this->hasMany(Supply::class);\n }", "public function purchaseItems(): \\Illuminate\\Database\\Eloquent\\Relations\\HasMany\n {\n return $this->hasMany('Easy\\Commerce\\Models\\Supplier\\Purchase\\PurchaseItems', 'purchase_id', 'id');\n }", "public function contacts()\n\t{\n\t\treturn $this->hasMany(SupplierContact::class);\n\t}", "public function products(): HasMany\n {\n return $this->hasMany(Product::class);\n }", "public function assets()\n {\n return $this->hasMany(Asset::class, 'supplier_id','id');\n }", "public function products()\n {\n return $this->hasMany('App\\Product', 'main_supplier_id')->orderby('name', 'asc');\n }", "public function packageProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\SellerProductRelation','sp_id','sp_id');\n }", "public function getHasMany()\n {\n return $this->hasMany;\n }", "public function products(): MorphToMany;", "public function products()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = brand_id, localKey = id)\n return $this->hasMany(Product::class);\n }", "public function products() {\r\n return $this->belongsToMany('App\\Product');\r\n }", "public function supplier(): \\Illuminate\\Database\\Eloquent\\Relations\\BelongsTo\n {\n return $this->belongsTo('Easy\\Commerce\\Models\\Supplier\\Supplier', 'supplier_id', 'id');\n }", "public function products()\n {\n return $this->hasMany('App\\Core\\Catalog\\Entities\\Product', 'company_id', 'id');\n }", "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n 'items' => array(self::MANY_MANY, 'Item', 'receiving_item(receive_id, item_id)'),\n 'supplier' => array(self::BELONGS_TO, 'Supplier', 'supplier_id'),\n );\n }", "public function hasMany($class, $foreignKey = null, $localKey = null);", "public function products()\n {\n return $this->hasMany('fooCart\\src\\Product', 'tax_id', 'tax_id');\n }", "public function purchase_products()\n {\n return $this->hasMany('App\\Client\\Purchase\\Product');\n\n }", "public function stocks(): HasMany\n {\n return $this->hasMany('Ronmrcdo\\Inventory\\Models\\InventoryStock');\n }", "public function products()\r\n {\r\n return $this->hasMany('App\\Models\\Product');\r\n }", "public function productSellers(){\n return $this->hasMany(\"App\\Product_Seller\", \"id_seller\");\n }", "public function getProducts() {\n return $this->hasMany(Product::className(), ['brand_id' => 'id']); // second param - field in dependent table\n }", "public function materials()\n {\n return $this->hasMany('App\\Material', 'supplier_id', 'id');\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Products');\n }", "protected function products()\r\n {\r\n return $this->hasMany('App\\Models\\Product');\r\n }", "public function relations()\n {\n return $this->belongsToMany(Product::class, 'product_relations', 'product_id', 'related_product_id')\n ->using(ProductRelation::class);\n }", "public function products(){\n\t\treturn $this->hasMany('Product');\t\n\t}", "public function products()\n {\n return $this->belongsToMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Product');\n }", "public function products(){\n return $this->hasMany('App\\Product');\n }", "public function products() \n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->belongsToMany('App\\Models\\Product');\n }", "public function product_features()\n {\n return $this->belongsToMany('App\\Models\\ProductFeature', 'feature_product');\n }", "public function Products()\n\t{\n\t\treturn $this->hasMany('App\\Models\\Product');\n\t}", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function companies()\n {\n return $this->belongsToMany('Villato\\Company', 'company_region_product', 'product_id', 'company_id');\n }", "public function images(): HasMany\n {\n return $this->hasMany('App\\Models\\ProductImage');\n }", "public function products(){\n return $this->belongsToMany('App\\Product', 'enumber_products', 'enumber_id', 'products_id');\n }", "public function products() {\n return $this->hasMany(Product::class, 'invoice_id', 'id');\n }", "public function offers()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n \treturn $this->hasMany('App\\Offer','sp_id','sp_id');\n }", "public function products()\n {\n return $this->hasMany(ProductProxy::modelClass());\n }", "public function products()\n {\n return $this->belongsToMany('App\\models\\Product', 'product_variants');\n }", "public function SPOPtionRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany(SPOPtionRelation::class,'sp_id','sp_id');\n }", "public function ingredients()\n {\n return $this->hasMany('App\\Models\\Product');\n }", "public function products(){\n \t\n \treturn $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function initialize(){\n $this->hasMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\",\n array(\n \"reusable\" => true\n )\n );\n \n $this->hasManyToMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\", \n \"vendor_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Vendor\", \n \"vendor_id\",\n array(\n \"reusable\" => true,\n \"alias\" => \"AliasVendorPro\"\n )\n );\n }", "public function products() {\n return $this->hasMany(Product::class);\n }", "public function products() {\n return $this->hasMany(Product::class);\n }", "public function products()\n\t{\n\t\treturn $this->hasMany('Product');\n\t}", "public function regions()\n {\n return $this->belongsToMany('Villato\\Region', 'company_region_product', 'product_id', 'region_id');\n }", "public function products()\n {\n return $this->hasMany('App\\ProductLocation', 'productLocation', 'id');\n }", "public function products(){\n return $this->hasMany(Product::class);\n }", "public function clients()\n {\n return $this->belongsToMany('App\\Product')->using('App\\ClientProduct');\n }", "public function products()\n {\n return $this->hasMany('App\\Product', 'id');\n }", "public function sellerStockHistories()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n return $this->hasMany('App\\SellerStockHistory','spsd_id','spsd_id');\n }", "public function warehouse()\n {\n return $this->belongsToMany('App\\Warehouse', 'product_has_warehouse', 'product_id', 'warehouse_id');\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n return $this->hasMany(Product::class);\n }", "public function products()\n {\n // if the intermediate table is called differently an SQl error is raised\n // to use a custom table name it should be passed to \"belongsToMany\" method as the second argument\n return $this->belongsToMany(Product::class, 'cars__products');\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Product', 'gproduct_id', 'id');\n }", "public function produtos() \n \t{\n \t\treturn $this->belongsToMany(Produto::class);\n \t}", "public function products()\n {\n return $this->hasMany('App\\Product', 'restaurant_id');\n }", "public function productPrices()\n {\n return $this->belongsToMany(ProductPrice::class, 'product_prices', null, 'product_id');\n }", "public function defineRelations()\n\t{\n\t\treturn [\n\t\t\t'deliveries' => [\n\t\t\t\tstatic::HAS_MANY,\n\t\t\t\t'Courier_DeliveryRecord',\n\t\t\t\t'blueprintId',\n\t\t\t\t'order' => 'dateCreated DESC'\n\t\t\t],\n\t\t];\n\t}", "public function enterprises(): HasMany\n {\n return $this->hasMany(Enterprise::class, 'categoria_id');\n }", "public function categoryProductRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = cate_id, localKey = cate_id)\n return $this->hasMany('App\\CategoryProductRelation','cate_id','cate_id');\n }", "public function products()\n {\n \t// y dinh : phuong thuc se lien ket quan he one - to - many voi bang product\n \treturn $this->hasMany('App\\Models\\Products');\n }", "public function products()\n {\n return $this->belongsToMany(\n Product::class,\n 'order_product',\n 'order_id',\n 'product_id'\n );\n }", "public function purchases(){\n return $this->hasMany(IngredientPurchase::class);\n }", "public function charges(): BelongsToMany\n {\n return $this->belongsToMany(Charge::class);\n }", "public function provider()\n {\n return $this->hasMany(Provider::class);\n }", "public function originPrices()\n {\n return $this->hasMany('App\\Price', 'origin_country_id');\n }", "public function products() {\n \treturn $this->belongsToMany(Product::class, 'items_product', 'item_id', 'product_id');\n }", "public function kinosei_suppliers() {\n\t\treturn $this->hasMany(M303KinoseiSupplier::class, 'kinosei_cd')\n\t\t\t->where(M303KinoseiSupplier::getTableName().'.del_flg', config('constant.flg.no'));\n\t}" ]
[ "0.7359611", "0.7352941", "0.7278318", "0.6679716", "0.6664582", "0.6633591", "0.6619525", "0.6559151", "0.6543436", "0.6474368", "0.64389324", "0.6331953", "0.63283694", "0.63153934", "0.62894416", "0.6273715", "0.6272637", "0.621121", "0.6205322", "0.6191232", "0.6136154", "0.6093755", "0.60927945", "0.60784805", "0.60744673", "0.60711366", "0.60497427", "0.60209703", "0.60170597", "0.6014883", "0.60013664", "0.6000625", "0.59832066", "0.5967036", "0.5949198", "0.5947935", "0.5938271", "0.59325206", "0.5916309", "0.5911387", "0.59025276", "0.58968556", "0.58968556", "0.58968556", "0.58968556", "0.58968556", "0.58968556", "0.58968556", "0.58917916", "0.5886013", "0.5875202", "0.5869502", "0.586181", "0.58563465", "0.5831853", "0.58220905", "0.58108246", "0.5809522", "0.5805174", "0.5802198", "0.5800193", "0.5796783", "0.5790736", "0.5790736", "0.5790736", "0.5790736", "0.5784137", "0.57749873", "0.57749873", "0.57729936", "0.5765301", "0.5758655", "0.5752672", "0.5743968", "0.5739343", "0.5735661", "0.5727822", "0.5726894", "0.5726894", "0.5726894", "0.5726894", "0.5726894", "0.5726894", "0.5726894", "0.57251763", "0.57185024", "0.569662", "0.5694685", "0.5689105", "0.56766796", "0.56723386", "0.5668839", "0.5641694", "0.563812", "0.5636514", "0.56336075", "0.5629064", "0.56286794", "0.5620535", "0.56115264" ]
0.7179051
3
Belongsto relations with Role.
public function role() { return $this->belongsTo(Role::class, 'role_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function roles(){\n return $this->belongsToMany('App\\Role');\n }", "public function user(): BelongsTo;", "public function role(){\n return $this->belongsTo('App\\Role');\n }", "public function roles() {\n return $this->belongsToMany('Models\\Role');\n }", "public function role() {\n return $this->belongsTo('App\\Role');\n }", "public function roles(){\n return $this->belongsToMany(Role::class);\n }", "public function role(){\n return $this->belongsTo(Rol::class);\n }", "public function Role(){\n return $this->belongsTo('App\\Role','role_id');\n }", "public function role() {\n return $this->belongsTo('App\\Role');\n }", "public function role()\n {\n return $this->belongsTo('Role');\n }", "public function role() {\n return $this->belongsTo(Role::class);\n }", "public function role() {\n return $this->belongsTo(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role', 'role_user');\n \n }", "public function role()\n {\n return $this->belongsTo('App\\Role');\n }", "public function roles(){\n return $this->belongsToMany('App\\Role', 'role_user', 'user_id', 'role_id');\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function role()\n {\n return $this->belongsTo(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles(): MorphToMany;", "public function role(){\n return $this->belongsToMany('App\\Models\\Role','permission_role','permission_id', 'role_id');\n }", "public function role(){\n return $this->belongsTo('App\\Role', 'role-id');\n }", "public function roles() {\n return $this->belongsToMany('App\\Role');\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(\n Config::get('laratrust.models.role'),\n Config::get('laratrust.tables.permission_role'),\n Config::get('laratrust.foreign_keys.permission'),\n Config::get('laratrust.foreign_keys.role')\n );\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(Role::class, 'role_user');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role');\n }", "public function user_roles()\n {\n return $this->belongsTo('App\\UserRole', 'role_id');\n }", "public function roles()\n {\n \treturn $this->belongsToMany(Role::class);\n }", "public function role()\n {\n return $this->hasMany('App\\Role', 'role_user');\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function role()\n {\n return $this->belongsTo('\\\\Neoflow\\\\CMS\\\\Model\\\\RoleModel', 'role_id');\n }", "public function role()\n {\n return $this->belongsTo('\\\\Neoflow\\\\CMS\\\\Model\\\\RoleModel', 'role_id');\n }", "public function roles()\n {\n \treturn $this->belongsTo('App\\Models\\User','roles','id');\n }", "public function role() //<- role + _id == role_id\n {\n return $this->belongsTo(Role::class);\n }", "public function roles() {\n return $this->belongsToMany('App\\Models\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role', 'user_roles');\n\t}", "public function user_role(){\n return $this->hasMany('App\\UserRoles','user_id','id');\n }", "public function role()\n {\n return $this->belongsTo(Role::class, 'role_id', 'role_id');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Model\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Models\\Role');\n }", "public function roles(){\n return $this->belongsToMany('App\\Roles', 'user_role', 'users_id', 'roles_id');\n }", "public function roles()\n {\n return $this->belongsToMany(\n Config::get('able.role'),\n Config::get('able.role_group_table'),\n Config::get('able.group_foreign_key'),\n Config::get('able.role_foreign_key')\n );\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(\n config('acl.models.role'),\n config('acl.table_names.role_has_permissions')\n );\n }", "public function role()\n {\n return $this->belongsTo(\"App\\Models\\Role\", \"role_id\", \"id\");\n }", "public function roles()\n {\n return $this->belongsToMany(config('gate.models.role'));\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class);\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Rol', 'etapa_rol', 'etapa_id', 'rol_id');\n }", "public function role(){\n $obj = $this->hasMany(UserRole::class,'user_id','id')\n ->join('role', 'role.id', '=', 'role_id')->with('permissions');\n return $obj;\n }", "public function role()\n {\n return $this->belongsTo('App\\Roles', 'role_id');\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'role_user');\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(\n config('permission.models.role'),\n config('permission.table_names.role_has_permissions')\n );\n }", "public function roles(){\n return $this->belongsToMany('App\\Roles', 'aspnetuserroles', 'UserId', 'RoleId');\n }", "public function user_role (){\n return $this->hasOne(Role::class);// relates to role model\n }", "public function roles()\n {\n return $this->hasMany('App\\Model\\Role');\n }", "public function roles(): BelongsToMany\n {\n $role = $this->aclRoleModelInstance();\n\n return $this->belongsToMany(\n $this->aclRoleModel(),\n $this->aclTable('roles_permissions'),\n $this->getForeignKey(),\n $role->getForeignKey()\n );\n }", "public function order(): BelongsTo;", "public function roles(): BelongsToMany\n {\n $pivotTable = config('stand-admin.database.role_users_table');\n\n $relatedModel = config('stand-admin.database.roles_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'role_id');\n }", "public function role()\n {\n return $this->belongsToMany(Role::class)->withTimestamps();\n }", "public function roles()\n {\n return $this->belongsToMany(\\App\\Entities\\GreenBilling\\Role::class)->withTimestamps();\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role', 'role_user', 'user_id', 'role_id');\n }", "public function role()\n {\n return $this->hasOne('App\\Roles','id','role');\n }", "public function roles()\n {\n return $this->hasMany(UserRole::class);\n }", "public function getUserRole() \r\n {\r\n return $this->hasMany(\\common\\models\\UserRole::className(), ['user_id'=>'id']);\r\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'role_user', 'user_id', 'role_id');\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'role_user', 'user_id', 'role_id');\n }", "public function roles()\n {\n return $this->hasMany('Role');\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'user__role', 'user_id', 'role_id');\n }", "public function roles()\n {\n return $this->belongsToMany(Role::class, 'role_users');\n }", "public function roles()\n {\n return $this->belongsToMany(Config::get('laracancan.role_model', 'Hamedmehryar\\Laracancan\\Models\\Role'), 'lcc_role_user', 'user_id', 'role_id');\n }", "public function roleaccess()\n {\n return $this->belongsTo('App\\RoleAccess');\n }", "public function users(){\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust.role_user_table'),Config::get('entrust.role_foreign_key'),Config::get('entrust.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust.role_user_table'));\n }", "public function actors(){\n return $this->belongsToMany(User::class,'cast_crews', 'role_id', 'user_id');\n }", "public function roles() : BelongsToMany\n {\n $pivotTable = config('permission.table_names.role_has_menus');\n\n return $this->belongsToMany(RbacRole::class, $pivotTable, 'menu_id', 'rbac_role_id');\n }", "public function companyrole()\n {\n return $this->belongsTo('App\\CompanyRole', 'company_role_id');\n }", "public function roles()\n {\n return $this->belongsToMany(config('access.role'), config('access.role_user_table'), 'user_id', 'role_id');\n }", "public function parentrole()\n {\n return $this->belongsTo(self::class, 'parent_id');\n }", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "public function role()\n {\n return $this->hasOne('App\\Models\\Role');\n }", "public function roles()\n {\n return $this->belongsToMany(config('rpac.models.role'))->withTimestamps();\n }", "public function roles(): BelongsToMany\n {\n return $this->belongsToMany(\n config('admin.database.roles_model'),\n config('admin.database.role_menu_table'),\n 'menu_id',\n 'role_id'\n );\n }", "public function roles()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.role'), config('bootstrap-menu.relations.permission_role'))->withTimestamps();\r\n }" ]
[ "0.6871722", "0.68545955", "0.68347853", "0.68115896", "0.6788262", "0.6772199", "0.67279565", "0.6720843", "0.67184514", "0.6687727", "0.6687497", "0.6687497", "0.6674111", "0.66615576", "0.6648316", "0.6640452", "0.6640452", "0.6640452", "0.6640452", "0.6640452", "0.6640452", "0.6640452", "0.6640452", "0.66157717", "0.66154677", "0.66118133", "0.6608205", "0.6604715", "0.65836966", "0.6580621", "0.65697753", "0.6537313", "0.6537313", "0.6537313", "0.6537313", "0.65372455", "0.65351474", "0.6531751", "0.6515097", "0.6510482", "0.6510482", "0.65061086", "0.6503206", "0.64944315", "0.64703614", "0.6465729", "0.6456451", "0.6441626", "0.64325345", "0.6426333", "0.6424173", "0.64208615", "0.63995606", "0.6391533", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.638379", "0.6361497", "0.6346369", "0.632709", "0.63209283", "0.6308634", "0.6306706", "0.630592", "0.63052255", "0.62998325", "0.629926", "0.6287988", "0.62816286", "0.62465215", "0.6245755", "0.62361664", "0.62336016", "0.6220679", "0.62175196", "0.62175196", "0.6216781", "0.62142247", "0.6212593", "0.6212193", "0.62120533", "0.6211576", "0.62113637", "0.6195011", "0.6179917", "0.6174668", "0.61730534", "0.61637884", "0.6162518", "0.6154036", "0.6127571", "0.6127107" ]
0.63597524
66
vendor/bin/phpunit filter testloginSuccess tests/Feature/LoginTest.php
public function testloginSuccess(){ $param = ['username' => 'vinhpd5', 'password' => 'Vinh12345']; $response = $this->json("post",'/api/v1/login',$param) ->assertStatus(200); $response->dump(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLogin(): void { }", "public function testProfileUnilogin()\n {\n\n }", "public function testRuns()\n {\n $this->assertTrue(true);\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testLoginWrongPassword(): void { }", "public function test_welcome()\n {\n $this->assertTrue(true);\n }", "public function testLogin() {\n $this->assert_title(\"Login\");\n\n //Failed login\n testMacros::login($this->driver, \"[email protected]\", \"passwordwrong\");\n $this->assert_title(\"Login\");\n\n //Successful Login\n testMacros::login($this->driver, \"[email protected]\", \"password1\");\n $this->assert_title(\"CheckinChildren\");\n\n //Logout\n $this->get_element(\"name=profile\")->click();\n $this->get_element(\"name=logout\")->click();\n }", "public function testBasicTest()\n {\n\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testNothing(){\n $this->assertTrue(TRUE);\n }", "public function testProcessLogin(){\n\n $credentials = [\n 'email' => '[email protected]',\n 'password' => 'password',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n $response->assertSessionHas('success');\n $response->assertRedirect(route('dashboard'));\n }", "public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tinebase_Log_Filter_FilterTest');\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }", "public function testGetAll() {\n }", "public function testBasicTest()\r\n {\r\n $this->assertTrue(true);\r\n }", "public function testProfileLogout()\n {\n\n }", "public function testGetVendorComplianceSurveyByFilter()\n {\n }", "public function testFindUsers()\n {\n\n }", "public function testDummy()\n {\n $this->assertTrue(true);\n }", "function test0()\n {\n $this->assertTrue(true);\n }", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testBasicTest()\n {\n $this->assertTrue(true);\n }", "public function testLoginWrongEmail(): void { }", "public function testLoginTest()\n {\n $this->browse(function (Browser $browser) {\n $browser\n // ->visit('logout')\n ->visit('/login')\n ->type('email','[email protected]')\n ->type('password','123456')\n ->click('#btnsubmit')\n ->waitForText('Welcome')\n ->assertSee('Welcome');\n });\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function testGetUnitDetails()\n {\n }", "private static function test()\n {\n $files = ['TestCase'];\n $folder = static::$root.'Testing'.'/';\n\n self::call($files, $folder);\n }", "public function preTest() {}", "public function testUserLogin()\n {\n $response = $this->get('/login')\n ->assertStatus(200)\n ->assertSee('Login');\n }", "public function testLogin()\n {\n $this->loginHelper('dummy', 'foo', 'http://localhost/login', 200);\n $this->loginHelper('dummy', 'dummy', 'http://localhost/jury', 200);\n }", "public function testGetUser()\n {\n\n }", "public function testSuccess()\n {\n }", "public function testGetPayrun()\n {\n }", "public function testGetSuperfunds()\n {\n }", "public function testGetUsers()\n {\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function test()\n {\n $this->executeScenario();\n }", "function testLoginSuccess()\r\n\t{\r\n \t$state = $this->User->login('[email protected]', 'password');\r\n\t\t$this->assertTrue($state);\r\n\t}", "public function test_getCustomerByFilter() {\n\n }", "public function testBasicTest()\n {\n\n $response = $this->post('/admin/admin-action-login', ['email' => '[email protected]', 'password' => '12341234']);\n\n $response->assertLocation('/admin/home');\n }", "public function testBasicTest()\n {\n $response = $this->withHeaders([\n 'X-Header' => 'LaravelAcademy',\n ])->json('POST', '/api/login', ['email' => '[email protected]', 'password' => 'toptal']);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'data' => [\n 'name' => 'admin'\n ],\n ]);\n }", "public function testSeeLoginTest()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n $response->assertSeeText(config('app.name'));\n }", "public function testGetPackingPlanByFilter()\n {\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function testTest()\n {\n $this->assertEquals(1, 1);\n }", "public function testGetUser()\n {\n }", "function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "public function testGetSelfServiceBrowserLoginRequest()\n {\n }", "public function run_tests()\n {\n }", "public function testFakeTest() {\n\t\t$this->assertTrue( true );\n\t}", "public function testGetNetworkMerakiAuthUsers()\n {\n }", "public function test_getAccountInformation() {\n\n }", "public function testGetChallengeActivities()\n {\n }", "public function testGetPayruns()\n {\n }", "public function testLoginSuccessfulFunctionality()\n {\n\tunset($_SESSION);\n $email = '[email protected]';\n $ctrl = new Controller();\n $ctrl->login($email,'ooo');\n\n $this->assertEquals($_SESSION['email'], $email);\n\n }", "public function test_getOrderLineActivityByFilter() {\n\n }", "public function testLoginname(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => '',\r\n\t\t\t\t'password' => ''\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "public function testLoginApi()\n {\n $response = $this->post(\n \n '/api/auth/login', \n [\n 'email'=>'[email protected]',\n 'password'=>'1020301'//incorrect password\n ]);\n\n \n $response->assertSuccessful();\n \n \n }", "public function testGetSuperfund()\n {\n }", "public function preTesting() {}", "public function test_login()\n {\n $response = $this->json('POST', 'api/v1/login',\n [\n 'email' => '[email protected]',\n 'password' => '123456'\n ]\n );\n $response->assertStatus(200);\n }", "public function testCanLogOut() {\n // TBA\n }", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "public function testSomethingIsTrue()\n\t{\n\t\t$this->assertTrue(true);\t\n\t}", "public function testGetAuthorizationDivisionsHome()\n {\n }", "public function test_login8()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('1','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function testGetReplenishmentByFilter()\n {\n }", "public function testLoginValid(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => 'Wrong'\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertTrue($validLogin);\r\n\t\t}", "public function test_admin_monitoring()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Home', 'member_dsc_summary']);\n $this->assertResponseCode(404);\n }", "public function testMain()\n {\n echo \"\\n >----------- Test Main : ---------> \\n\";\n// $this->getRandomNumber();\n// $this->getLoggedUserMail();\n// $this->saveVerificationCode();\n// $this->verification();\n// $this->checkEmailVerification();\n// $this->checkSendCode();\n }", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "public function testGetWebhook()\n {\n }", "public function testGetAuthorizationProducts()\n {\n }", "public function testGetChallengeActivity()\n {\n }", "public function testGetAuthorizationRoleUsers()\n {\n }", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testLogin()\n {\n $data= [\n 'email' => '[email protected]',\n 'password' => '12345678',\n ];\n\n /* @var $responce \\Illuminate\\Foundation\\Testing\\TestResponse */\n $responce = $this->json('post', '/api/auth/login', $data);\n\n $content = $responce->getContent();\n print \"\\n\" . $content . \"\\n\";\n $this->assertNotTrue(boolval(strstr($content, 'errors')));\n //$responce->assertOk();\n }", "public function testGetAuthorizationDivision()\n {\n }", "public function test_getCartonActivityByFilter() {\n\n }", "public function testLogin()\n {\n $response = $this->json('post', '/api/login',\n ['email' => '[email protected]', 'password' => 'password']);\n $response->assertStatus(200)\n ->assertJsonStructure(['access_token']);\n }", "public function testProfileFind()\n {\n\n }", "public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }", "public function test_admin_login_submission()\n {\n $this->assertTrue(true);\n $response = $this->call('POST', '/login/save');\n $this->assertEquals(302, $response->status());\n // $this->assertRedirectedToRoute(\"admin.dashboard.index\");\n }", "public function testGetTimelogsForAccount()\n {\n\n }", "private function runTests(){\n $process = new Process(['./vendor/bin/phpunit --filter '.$this->params['model_name'].'Test']);\n $process->start();\n foreach($process as $type => $data){\n if($process::OUT !== $type){\n $this->error($data);\n continue;\n }\n $this->info($data);\n }\n }" ]
[ "0.6651927", "0.6591212", "0.65688473", "0.6525722", "0.6520796", "0.65022594", "0.64440554", "0.64282894", "0.64226294", "0.64029247", "0.6368482", "0.63472927", "0.63465667", "0.62917674", "0.6288201", "0.62816435", "0.62756354", "0.6270722", "0.6257606", "0.6234697", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.62287164", "0.6221586", "0.6216243", "0.6192251", "0.6192251", "0.6192251", "0.6192251", "0.6164944", "0.6155002", "0.6150451", "0.61400014", "0.61330396", "0.6105864", "0.60974586", "0.60916364", "0.6082261", "0.6076288", "0.60677457", "0.60643214", "0.60592556", "0.60566956", "0.6053355", "0.6051419", "0.60457855", "0.6042188", "0.60279375", "0.6026482", "0.6012629", "0.60104346", "0.60072136", "0.6004823", "0.6004424", "0.6000163", "0.59944737", "0.59932435", "0.5991782", "0.5978064", "0.59778255", "0.5974319", "0.59684515", "0.5966931", "0.5959711", "0.59509295", "0.59366715", "0.5933684", "0.59324235", "0.5926767", "0.5923095", "0.591653", "0.59120834", "0.5909548", "0.58984786", "0.58952665", "0.58952665", "0.58952665", "0.58952665", "0.58952665", "0.58952665", "0.58884734", "0.58844674", "0.5879549", "0.5876614", "0.5873018", "0.5868783", "0.5867827", "0.58667547", "0.58634925", "0.58569133", "0.5849837", "0.5849399", "0.58475673", "0.5847416" ]
0.6163566
36
Lista pedidos para a tabela
public function tableList() { $list = (self::MODEL)::orderBy('clientes.created_at', 'DESC'); $list = $this->handleRequest($list); return $this->listResponse(ClientTransformer::tableList($list)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tableList()\n {\n $list = (self::MODEL)::with(['cliente', 'endereco'])\n ->join('clientes', 'clientes.id', '=', 'pedidos.cliente_id')\n ->leftJoin('pedido_notas', 'pedido_notas.pedido_id', '=', 'pedidos.id')\n ->orderBy('pedidos.created_at', 'DESC');\n\n $list = $this->handleRequest($list);\n\n return $this->listResponse(OrderTransformer::tableList($list));\n }", "public function getListOfTables() {}", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\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 tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "function listarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_sel';\n\t\t$this->transaccion='WF_TABLAINS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_' . $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'],'int4');\n\t\t\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] == 'maestro') {\n\t\t\t\t\n\t\t\t$this->captura('estado','varchar');\n\t\t\t$this->captura('id_estado_wf','int4');\n\t\t\t$this->captura('id_proceso_wf','int4');\n\t\t\t$this->captura('obs','text');\n\t\t\t$this->captura('nro_tramite','varchar');\n\t\t}\n\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t\n\t\t\t$this->captura($value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\n\t\t\t//campos adicionales\n\t\t\tif ($value['bd_campos_adicionales'] != '' && $value['bd_campos_adicionales'] != null) {\n\t\t\t\t$campos_adicionales = explode(',', $value['bd_campos_adicionales']);\n\t\t\t\t\n\t\t\t\tforeach ($campos_adicionales as $campo_adicional) {\n\t\t\t\t\t\n\t\t\t\t\t$valores = explode(' ', $campo_adicional);\n\t\t\t\t\t$this->captura($valores[1],$valores[2]);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$this->captura('estado_reg','varchar');\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function ListarMostrador()\n\t{\n\t\tself::SetNames();\n\t$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente as cliente, ventas.codmesa, ventas.totalpago, ventas.cocinero, ventas.delivery, ventas.repartidor, ventas.observaciones, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, salas.nombresala, mesas.nombremesa, GROUP_CONCAT(cantventa, ' | ', producto SEPARATOR '<br>') AS detalles FROM ventas INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente LEFT JOIN mesas ON mesas.codmesa = ventas.codmesa LEFT JOIN salas ON mesas.codsala = salas.codsala WHERE ventas.cocinero = '1' GROUP BY detalleventas.codventa\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "public function getDepartamentosTodos(){\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$consulta=\"SELECT * FROM departamentos\";\n\t\t\t\t\n\n\t\t\t\t$query=$this->db->preparar($consulta);\n\t\t\t\t$query->execute();\n\t\t\t\t\n\t\t\t\t$tClientes = $query->fetchAll();\n\t\t\t\t\n\t\t\t\t//obtiene todas las tuplas de la tabla clientes\n\t\t\t\t//y devuelve el array $tClientes\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Se ha producido un errro\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$tablaClientes=array(); //inicializamos la tabla de salida\n\t\t\tforeach ($tClientes as $fila) {\n\t\t\t\t$c=new Departamento($fila[0], $fila[1], \n\t\t\t\t\t$fila[2], $fila[3]);\n\t\t\t\tarray_push($tablaClientes, $c);\n\t\t\t}\n\t\t\treturn $tablaClientes;\n\t\t}", "function getAllPedidos()\n {\n $query = $this->db->prepare(\"SELECT * FROM pedido\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "abstract protected function _listTables();", "private function listarTodosParticipante(){\n print_r($this->participantePDO->findAll());\n }", "protected function getCleanableTableList() {}", "static public function mdlMostraPedidosTablas($valor){\n\n\t\tif($valor != null){\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\t\tt.id,\n\t\t\t\t\t\tt.codigo,\n\t\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\t\tc.nombre,\n\t\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\t\tc.documento,\n\t\t\t\t\t\tt.lista,\n\t\t\t\t\t\tt.vendedor,\n\t\t\t\t\t\tt.op_gravada,\n\t\t\t\t\t\tt.descuento_total,\n\t\t\t\t\t\tt.sub_total,\n\t\t\t\t\t\tt.igv,\n\t\t\t\t\t\tt.total,\n\t\t\t\t\t\tROUND(\n\t\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t\t2\n\t\t\t\t\t\t) AS dscto,\n\t\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\t\tcv.descripcion,\n\t\t\t\t\t\tt.estado,\n\t\t\t\t\t\tt.usuario,\n\t\t\t\t\t\tt.agencia,\n\t\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\t\tcv.dias,\n\t\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\t\tFROM\n\t\t\t\t\t\ting_sal t\n\t\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\t\tON t.cliente = c.codigo\n\t\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\t\tON t.usuario = u.id\n\t\t\t\t\tWHERE t.estado = '$valor'\n\t\t\t\t\tORDER BY fecha DESC\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll();\n\n\t\t}else{\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\tt.id,\n\t\t\t\t\tt.codigo,\n\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\tc.nombre,\n\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\tc.documento,\n\t\t\t\t\tt.lista,\n\t\t\t\t\tt.vendedor,\n\t\t\t\t\tt.op_gravada,\n\t\t\t\t\tt.descuento_total,\n\t\t\t\t\tt.sub_total,\n\t\t\t\t\tt.igv,\n\t\t\t\t\tt.total,\n\t\t\t\t\tROUND(\n\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t2\n\t\t\t\t\t) AS dscto,\n\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\tcv.descripcion,\n\t\t\t\t\tt.estado,\n\t\t\t\t\tt.usuario,\n\t\t\t\t\tt.agencia,\n\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\tcv.dias,\n\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\tFROM\n\t\t\t\t\ting_sal t\n\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\tON t.cliente = c.codigo\n\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\tON t.usuario = u.id\n\t\t\t\tWHERE t.codigo = $valor\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t}\n\n\t\t$stmt=null;\n\n\t}", "public function listForTable (){\r\n //generamo la query final que precisamos\r\n $queryResult= \"SELECT id,dni,nombre,apellido,mail FROM usuario.usuario ORDER BY id;\";\r\n\r\n //Ejecutamos la query\r\n $this->stmt=pg_query($this->link,$queryResult) or die(\"Error en la consulta,function listForTable :\".preg_last_error());\r\n\r\n return $this->stmt;\r\n }", "public function listar_mis_pedidos() {\n \n try {\n $sql = \"\n select \n c.nro_documento,\n c.nombre,\n c.correo,\n c.telefono_celular,\n p.direccion_entrega,\n p.referencia_entrega,\n p.observacion,\n d.descripcion,\n c.cod_distrito,\n f.descripcion,\n p.importe_total,\n p.fecha_pedido,\n p.nro_pedido,\n p.cantidad_productos,\n p.estado,\n p.id_pedido\n from \n cliente c inner join pedido p\n on\n c.id_cliente = p.id_cliente inner join distrito d\n on\n c.cod_distrito = d.cod_distrito inner join forma_pago f\n on\n f.id_forma_pago = p.id_forma_pago\n where\n p.estado = 'PENDIENTE' and c.id_cliente = '$_SESSION[cliente_id]'; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "public function listtabelTAPAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('TATA PERSURATAN');\n }", "public function mostrarTablas(){\t\r\n\r\n\t\t$item = null;\r\n \t\t$valor = null;\r\n\r\n \t\t$proveedores = ControladorProveedores::ctrMostrarProveedores($item, $valor);\r\n\r\n\r\n \t\t$datosJson = '{\r\n\t\t \r\n\t \t\"data\": [ ';\r\n\r\n\t \tfor($i = 0; $i < count($proveedores); $i++){\r\n\r\n\t \t\t/*=============================================\r\n\t\t\tDEVOLVER DATOS JSON\r\n\t\t\t=============================================*/\r\n\r\n\t\t\t$datosJson\t .= '[\r\n\t\t\t\t \"'.($i+1).'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"codigo\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"rfc\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"razonSocial\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"fechaAlta\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"limiteCredito\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"diasCredito\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"rfc2\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"curp\"].'\"\r\n\t\t\t\t ],';\r\n\r\n\t \t}\r\n\r\n\t \t$datosJson = substr($datosJson, 0, -1);\r\n\r\n\t\t$datosJson.= ']\r\n\t\t\t \r\n\t\t}'; \r\n\r\n\t\techo $datosJson;\r\n\r\n \t}", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "public function listaPedidos()\n\t{\n\t\ttry{\n\t\t\treturn Pedido::all();\n\t\t} catch (\\Exception $ex){\n\t\t\tLog::error($ex);\n\t\t}\n\t\treturn null;\n\t}", "public function lista() {\n $sql = \"SELECT * FROM cliente\";\n $qry = $this->db->query($sql); // query do pdo com acesso ao bd\n\n //return $qry->fetchAll(); // retorna todos os registros\n return $qry->fetchAll(\\PDO::FETCH_OBJ); // retorna todos os registros a nível de objeto\n }", "public function listarTodos()\n\t{\n\t\t$inst_table = BDD::getInstance()->query(\"select * from system.\". self::claseMinus());\n\t\t$i = 0;\n\t\twhile ($fila = $inst_table->_fetchRow())\n\t\t{\n\t\t\tforeach ($fila as $campo => $valor)\n\t\t\t{\n\t\t\t\t$data[$i][$campo] = $valor;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\techo (json_encode($data));\n\t}", "function listTables();", "public function listar(){\n $sql = \"CALL sp_ListarTipoPago\";\n return ejecutarConsulta($sql);\n }", "public function consultaTodos()\n\t{\n\t\t$sql = \"SELECT * FROM \" . $this->tabela;\n\n\t\t// $this->resultado = mysqli_query($this->conn, $sql);\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\treturn $this->resultado->execute();\n\t}", "public static function listAll(){//le todos os dados da tabela\n\n\t\t$sql = new Sql();\n\n\t\treturn $sql->select(\n\t\t\t\"SELECT * FROM tb_products ORDER BY desproduct\" \n\t\t\t);\n\t}", "public function list_unidades_es($estado_ppto){\n $unidades=$this->model_proyecto->list_gasto_corriente();\n $tabla='';\n \n $color=''; \n if($estado_ppto==1){\n $color='#e2f4f9';\n }\n\n $tabla.='\n <table id=\"dt_basic3\" class=\"table1 table-bordered\" style=\"width:100%;\">\n <thead>\n <tr style=\"height:50px;\">\n <th style=\"width:1%;\" bgcolor=\"#474544\" title=\"\">#</th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"\"></th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"VER PPTO\">VER PARTIDAS</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"APERTURA PROGRAM&Aacute;TICA\">CATEGORIA PROGRAM&Aacute;TICA '.$this->gestion.'</th>\n <th style=\"width:25%;\" bgcolor=\"#474544\" title=\"DESCRIPCI&Oacute;N\">DESCRIPCI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"NIVEL\">NIVEL</th>\n <th style=\"width:15%;\" bgcolor=\"#474544\" title=\"TIPO DE ADMINISTRACIÓN\">TIPO DE ADMINISTRACI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD ADMINISTRATIVA\">UNIDAD ADMINISTRATIVA</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD EJECUTORA\">UNIDAD EJECUTORA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($unidades as $row){\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $nro++;\n $tabla.='<tr bgcolor='.$color.'>';\n $tabla.='<td style=\"height:30px;\" align=center>'.$nro.'</td>';\n $tabla.='<td>';\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='\n <center><a data-toggle=\"modal\" data-target=\"#'.$row['aper_id'].'\" title=\"PARTIDAS ASIGNADAS\" ><img src=\"'.base_url().'assets/img/select.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></center>\n <div class=\"modal fade bs-example-modal-lg\" tabindex=\"-1\" id=\"'.$row['aper_id'].'\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\">\n <div class=\"modal-dialog modal-lg\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close text-danger\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">';\n if($this->gestion>2019){\n $tabla.=$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'];\n }\n else{\n $tabla.=$row['proy_nombre'];\n }\n $tabla.='\n </h4>\n </div>\n <div class=\"modal-body no-padding\">\n <div class=\"well\">\n '.$this->partidas($row['aper_id'],1).' \n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:abreVentana(\\''.site_url(\"\").'/mnt/rep_partidas/'.$row['aper_id'].'\\');\" class=\"btn btn-primary\" title=\"IMPRIMIR PARTIDAS\">IMPRIMIR PARTIDAS</a>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td>';\n if($this->tp_adm==1){\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='<center><a href=\"'.site_url(\"\").'/mnt/edit_ptto_asig/'.$row['proy_id'].'\" title=\"MODIFICAR PRESUPUESTO ASIGNADO\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n else{\n $tabla.='<center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td><center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</center></td>';\n if($this->gestion>2019){\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['tipo'].' '.$row['act_descripcion'].' '.$row['abrev'].'</b></td>';\n }\n else{\n $tabla.='<td style=\"font-size: 8pt;\"><b>'.$row['proy_nombre'].'</b></td>';\n }\n $tabla.='<td>'.$row['nivel'].'</td>';\n $tabla.='<td>'.$row['tipo_adm'].'</td>';\n $tabla.='<td>'.strtoupper($row['dep_departamento']).'</td>';\n $tabla.='<td>'.strtoupper($row['dist_distrital']).'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n\n return $tabla;\n }", "function listar_tabla($tabla,$order_by) {\n\t\t$query = \"SELECT \".$tabla.\".*\n\t\tFROM \".$tabla.\"\n\t\tORDER BY \".$order_by.\"\";\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 function getPedidos()\n {\n try\n {\n \t$result = array();\n\n \t$stm = $this->pdo->prepare(\"SELECT * FROM pedidos\");\n \t$stm->execute();\n\n \tforeach($stm->fetchAll(PDO::FETCH_OBJ) as $r)\n \t{\n \t\t$ped = new Pedido($r->id);\n\n \t\t$ped->__SET('estado', $r->estado);\n \t\t$ped->__SET('cliente',$r->cliente);\n \t\t$ped->__SET('fecha', $r->fecha);\n\n \t\t$result[] = $ped;\n \t}\n\n \treturn $result;\n }\n catch(Exception $e)\n {\n \tdie($e->getMessage());\n }\n }", "public function listado() {\n $sql = \"SELECT * FROM tiendas ORDER BY nombre ASC\";\n $data = ModeloConexion::ejecutar( $sql , DB_NAME ,DB_SELECT);\n $respuesta = array();\n for ( $i = 0; $i < $data['TOTAL']; $i++) {\n $rp = new stdClass();\n $rp->tienda_nombre = $data['LISTA'][$i]->nombre;\n $rp->latitud = $data['LISTA'][$i]->latitud;\n $rp->longitud = $data['LISTA'][$i]->longitud;\n $rp->tienda_id = $data['LISTA'][$i]->id;\n $respuesta[] = $rp;\n }\n \treturn $respuesta;\n }", "public function listtabelAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('%');\n }", "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "public function pegaTodos(){\n\t\treturn $this->resultado->fetchAll();\n\t}", "public function listartrabajador_all()\n\t{\n\t\t$sql = \"call sp_s_trabajador_all\";\n\t\ttry {\n\t\t\t$PrepareStatement = $this->cnn->getPrepareStatement($sql);\n\t\t\t$PrepareStatement->execute();\n\t\t\treturn $PrepareStatement->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \" . $e;\n\t\t\treturn false;\n\t\t}\n\t}", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function listarTodos(){\n\t\t\n\t\t$sql = 'SELECT * FROM itempedido';\n\t\t$consulta = $this->conn->prepare($sql);\n\t\t$consulta->execute();\n\t\treturn ($consulta->fetchAll(PDO::FETCH_ASSOC));\n\t}", "function listaEstablecimientos() {\n\t\t$establecimiento = new Establecimiento();\n\t\treturn $establecimiento->listar();\n\t}", "function listarServicios()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function findAll() {\r\n $sql = \"SELECT * FROM $this->tabela\";\r\n $stm = DB::prepare($sql);\r\n $stm->execute();\r\n return $stm->fetchAll();\r\n }", "public function list_ptto_poa_final($tp_id){\n $lista_aper_padres = $this->model_proyecto->list_prog();//lista de aperturas padres \n $tabla ='';\n foreach($lista_aper_padres as $rowa){\n $proyectos=$this->model_ptto_sigep->acciones_operativas($rowa['aper_programa'],$tp_id);\n if(count($proyectos)!=0){\n $tabla .='<tr bgcolor=\"#99DDF0\" height=\"30\">';\n $tabla .='<td></td>';\n if($this->tp_adm==1){\n $tabla .='<td></td>';\n }\n $tabla .='<td><center>'.$rowa['aper_programa'].''.$rowa['aper_proyecto'].''.$rowa['aper_actividad'].'</center></td>';\n $tabla .='<td>'.$rowa['aper_descripcion'].'</td>';\n $tabla .='<td>'.$rowa['aper_sisin'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='</tr>';\n $nro=0;\n foreach($proyectos as $row){\n $nro++;\n // $fase = $this->model_faseetapa->get_id_fase($row['proy_id']);\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla .= '<tr height=\"50\">';\n $tabla .= '<td align=center><center><img id=\"loadd'.$row['proy_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></center></td>';\n if($this->tp_adm==1){\n if(count($aper)!=0){\n $tabla .='<td><center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center></td>';\n }\n else{\n $tabla .='<td></td>';\n }\n }\n $tabla .= '<td align=center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>';\n $tabla .= '<td>'.$row['proy_id'].' | '.$row['proy_nombre'].'</td>';\n $tabla .= '<td>'.$row['tp_tipo'].'</td>';\n $tabla .= '<td>'.$row['proy_sisin'].'</td>';\n $tabla .= '<td>'.$row['fun_nombre'].' '.$row['fun_paterno'].' '.$row['fun_materno'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .= '</tr>';\n \n\n }\n }\n }\n return $tabla;\n }", "public function listarTodos(){\r\n\t\t$sql = 'SELECT * FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$resultado = $consulta->execute();\r\n\t\treturn ($resultado->fetchAll(PDO::FETCH_ASSOC));\r\n\t}", "public function ListTable()\n {\n echo $this->ListTableText();\n }", "public function listarTodos(){\r\n\t\tinclude(\"../config/conexao.php\");\r\n\t\t$sql = 'SELECT * FROM cliente';\r\n\t\t$consulta = $pdo->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t\treturn ($consulta->fetchAll(PDO::FETCH_ASSOC));\r\n\t}", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "public function readPedidos(){\n $sql='SELECT IdEncabezado, u.Nombre, u.Apellido, Fecha, TipoEstado \n FROM encabezadopedidos en INNER JOIN usuarios u USING (IdUsuario) \n INNER JOIN estadopedidos es USING(IdEstadoPedido) ORDER by IdEncabezado ASC ';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function lista(){\n\t\t\n\t\t$sql = \"SELECT * FROM pagamento_semanal_funcionarios\";\n\n\t\t$conn = new Conexao();\n\t\t$conn->openConnect();\n\t\t\n\t\t$mydb = mysqli_select_db($conn->getCon(), $conn->getBD());\n\t\t$resultado = mysqli_query($conn->getCon(), $sql);\n\t\t\n\t\t$array = array();\n\t\t\n\t\twhile ($row = mysqli_fetch_assoc($resultado)) {\n\t\t\t$array[]=$row;\n\t\t}\n\t\t\n\t\t$conn->closeConnect ();\n\t\treturn $array;\n\t\t\n\t}", "public function listar(){\n $equipamento = new Equipamento();\n // Recuperar dados\n $lista = $equipamento->getEquipamentos();\n // Manipular dados\n // . . .\n\n // Substituindo numero da manutencao pelo tipo dela.\n // foreach ($lista as $key => $value) {\n // $lista[$key]['tipo'] = $value['tipo'] == 1 ? 'Preventiva' : ($value['tipo'] == 2 ? 'Corretiva' : 'Urgente');\n // }\n\n // Invocar/retornar os dados para view.\n include 'view/admin/lista.php';\n }", "public function listarFormasPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpedido_pagamento c,tbformas_pagamento b where c.idpedido = '$idpedido' and c.forma = b.idforma_pagamento; \";\n $sql = $this->conexao->query($sql);\n \n $dados = array();\n\n // $troco = number_format($row['troco'],2,\",\", \".\");\n \n if (mysqli_num_rows($sql) > 0) {\n\n while ($row = $sql->fetch_assoc()){\n $valor = number_format($row['valor'], 2, \",\", \".\");\n $dado = array();\n $dado['forma'] = $row['forma'];\n $dado['forma_descricao'] = $row['forma_descricao'];\n // $dado['troco'] = $troco;\n $dado['status'] = $row['status'];\n $dado['valor'] = $valor;\n $dado['idforma'] = $row['idforma'];\n $dado['idpedido'] = $row['idpedido'];\n $dados[] = $dado;\n\n }\n\n\n }\n\n\n return $dados;\n\n }", "public function gestionPedidos(){\n Utils::isAdmin();\n $gestion = true;\n\n $oPedido = new Pedido();\n $pedidos = $oPedido->getAll();\n\n require_once 'views/pedido/mis_pedidos.php';\n }", "public function listarStatusCelularTodos()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"SELECT Discipulo.nome AS discipulo , TipoStatusCelular.nome AS status FROM Discipulo,StatusCelular, TipoStatusCelular\n WHERE Discipulo.id = StatusCelular.discipuloId And StatusCelular.tipoOferta = TipoStatusCelular.id ORDER BY discipulo\";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n\n $resposta = $stm->execute();\n\n //fechar conexão\n $pdo = null ;\n\n return $stm->fetchAll();\n }", "public function listarStatusCelularTodos()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"SELECT Discipulo.nome AS discipulo , TipoStatusCelular.nome AS status FROM Discipulo,StatusCelular, TipoStatusCelular\n WHERE Discipulo.id = StatusCelular.discipuloId And StatusCelular.tipoOferta = TipoStatusCelular.id ORDER BY discipulo\";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n\n $resposta = $stm->execute();\n\n //fechar conexão\n $pdo = null ;\n\n return $stm->fetchAll();\n }", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "public function listaVentas(){\n\n $respuesta = Datos::mdlListaVentas(\"salidas\");\n $cont =0;\n\n foreach ($respuesta as $row => $item){\n \t$cont ++;\n echo '<tr>\n <td>'.$cont.'</td>\n <td>'.$item[\"noOperacion\"].'</td>\n <td>'.$item[\"cliente\"].'</td>\n <td>'.$item[\"codProducto\"].'</td>\n <td>'.$item[\"kg\"].'</td>\n <td>'.$item[\"origen\"].'</td>\n <td>'.$item[\"destino\"].'</td>\n <td>'.$item[\"precioVenta\"].'</td>\n <td>'.$item[\"costo\"].'</td>\n <td>'.$item[\"total\"].'</td>\n <td>'.$item[\"fecha\"].'</td>\n <td><a href=\"listaVentas.php?idBorrar='.$item[\"cons\"].'\"><button class=\"btn btn-danger\">Borrar</button></a></td>\n </tr>';\n //Boton Borrar\n //Boton Editar <td><a href=\"updtCompra.php?idEditar='.$item[\"cons\"].'\"><button class=\"btn btn-warning\">Editar</button></a></td>\n }\n\n }", "public function listaProveedores(){\n\n $respuesta = Datos::mdlListaProvedores(\"proveedores\");\n $cont =0;\n\n foreach ($respuesta as $row => $item){\n \t$cont ++;\n\n\n echo '<tr>\n <td>'.$cont.'</td>\n <td>'.$item[\"codProveedor\"].'</td>\n <td>'.$item[\"nombre\"].'</td>\n <td>'.$item[\"razonSocial\"].'</td>\n <td>'.$item[\"rfc\"].'</td>\n <td>'.$item[\"direccion\"].'</td>\n <td>'.$item[\"ubicacion\"].'</td>\n <td>'.$item[\"telefono\"].'</td>\n <td>'.$item[\"celular\"].'</td>\n <td>'.$item[\"contacto\"].'</td>\n <td><a href=\"updtProveedor.php?idEditar='.$item[\"id\"].'\"><button class=\"btn btn-warning\">Editar</button></a></td>\n <td><a href=\"listaProveedores.php?idBorrar='.$item[\"id\"].'\" ><button class=\"btn btn-danger\">Borrar</button></a></td>\n </tr>';\n }\n\n }", "public static function traerTodos()\n {\n $query = \"SELECT * FROM posteos ORDER BY idposteo DESC\";\n $db = DBConnection::getConnection();\n $stmt = $db->prepare($query);\n $stmt->execute();\n\n $salida = [];\n\n while($fila = $stmt->fetch()) {\n\n $post = new Posteo();\n\n $post->cargarDatos($fila);\n\n $salida[] = $post;\n }\n\n return $salida;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function listaSecciones()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT * FROM seccion\");\n\t\treturn $data_table;\n\t}", "public function mostrarTodosTrabajos(){\n return Trabajo::all();\n }", "public function listtabelSDMAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('SDM');\n }", "public function mostrarTablaServicios(){\n\n\t\t$item = null;\n \t$valor = null;\n\n \t\t$servicios = ControladorServicios::ctrMostrarServicios($item, $valor);\n\n \t\t$datosJson = '{\n\t\t \"data\": [';\n\n\t\t for($i = 0; $i < count($servicios); $i++){\n\n\t\t \t/*============================================\n\t\t \t= TRAEMOS LAS ACCIONES =\n\t\t \t============================================*/\n\n\t\t \tif(isset($_GET[\"perfilOculto\"]) && $_GET[\"perfilOculto\"] == \"Administrador\"){\n\n\t\t \t\t$botones = \"<div class='btn-group'><button class='btn btn-warning btnEditarServicio' idServicio='\".$servicios[$i][\"idservicio\"].\"' data-toggle='modal' data-target='#modalEditarServicio'><i class='fas fa-edit'></i></button><button class='btn btn-danger btnEliminarServicio' idServicio='\".$servicios[$i][\"idservicio\"].\"'><i class='fas fa-times'></i></button></div>\";\n\n\t\t \t}else{\n\n\t\t \t\t$botones = \"\";\n\n\t\t \t}\n\t\t \t\n\t\t \t/*===== End of TRAEMOS LAS ACCIONES ======*/\n\t\t \t\n\t\t \t$datosJson .= '[\n\t\t \"'.($i+1).'\",\n\t\t \"'.$servicios[$i][\"descripcion\"].'\",\n\t\t \"$ '.number_format($servicios[$i][\"precio\"], 2).'\",\n\t\t \"'.$servicios[$i][\"fecha\"].'\",\n\t\t \"'.$botones.'\"\n\t\t ],';\n\n\t\t }\n\n\t\t $datosJson = substr($datosJson, 0, -1);\n\t\t \n\t\t$datosJson .= ']\n\n\t\t}';\n\n\t\techo $datosJson;\n\n\t}", "public function getTables();", "public function getTables();", "public function getTables();", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "public function listtabelPrncAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('PERENCANAAN');\n }", "public function listar(){\n\n\t\t$data = $this->db->from($this->table)\n\t\t\t\t\t\t ->orderBy('id DESC')\n\t\t\t\t\t\t ->fetchAll();\n\t\tif(empty($data)){\n\t\t $respuesta = array('respuesta' => 0 );\n\t\t return $respuesta;\n\t\t}else{\n\t\t return $data;\n\t\t}\t\t\t\t \n\t// return $data = $this->db_pdo->query('select * from '.$this->table)\n\t//\t\t\t\t\t \t\t\t->fetchAll();\t\t\t\t \t\t\t\t\t\t \n\t}", "public function getEduardoListar($datos)\n {\n $tablas=$this->leerTodos($datos);\n return $tablas;\n }", "public function listaUnidades () {\n \t$Respuesta = Datos::mdlListaUnidades(\"unidades\");\n \t$Contador = 0;\n\n \t\tforeach ($Respuesta as $Row => $Item) {\n \t\t\t$Contador++;\n\n \t\t\techo \"<tr>\n \t\t\t\t\t<td>\".$Contador.\"</td>\n \t\t\t\t\t<td>\".$Item[\"noEconomico\"].\"</td>\n \t\t\t\t\t<td>\".$Item[\"marca\"].\"</td>\n \t\t\t\t\t<td>\".$Item[\"modelo\"].\"</td>\n\t\t\t\t\t\t<td>\".$Item[\"placas\"].\"</td>\n\t\t\t\t\t\t<td>\".$Item[\"kilometraje\"].\"</td>\n\t\t\t\t\t\t<td><a href='updtUnidad.php?idEditar=\".$Item[\"idUnidad\"].\"'><button class='btn btn-warning'>Editar</button></a></td>\n\t\t\t\t\t\t<td><a href='listaUnidades.php?idBorrar=\".$Item[\"idUnidad\"].\"'><button class='btn btn-danger'>Borrar</button></a></td>\n \t\t\t\t</tr>\";\n\n \t\t}\n\n }", "public static function TraerTodoLosAlumnos()\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n $consulta =$objetoAccesoDato->RetornarConsulta(\"select * from alumno\");\n $consulta->execute();\t\t\t\n return $consulta->fetchAll(PDO::FETCH_CLASS, \"alumno\");\t\t\n }", "protected function selectPagos($tabla) {\n $getproducto = $this->_db->query(\"SELECT deuda.Id_cliente as dni, nombre as nombre, apellidos as apellido, \n direccion as direccion, telefono as telefono, celular as celular, deuda.total as deuda\n FROM $tabla as pagos \n INNER JOIN venta as venta ON venta.Id_deuda = pagos.Id_deuda\n INNER JOIN productoventa as prodventa ON venta.cod_busqueda = prodventa.cod_busqueda\n INNER JOIN deuda as deuda ON deuda.Id_deuda = venta.Id_deuda\n INNER JOIN cliente as cliente ON cliente.Id_cliente = deuda.Id_cliente where pagos.estado = 0 and pagos.Fecha_Pago = CURDATE()\n GROUP BY cliente.Id_cliente\n ORDER BY deuda.Fecha_deuda\");\n $this->_db->cerrar();\n return $getproducto->fetchall();\n }", "public function listar_ventas_abono_table($idGenAbono) {\n $dato = [];\n\n //--- Datos del Logeado ---//\n $userdata = $this->session->all_userdata();\n //--- datos ---//\n $ingresos = $this->app_model->get_ingreso_by_idGenAbono($idGenAbono);\n $estados = $this->app_model->get_estados();\n\n if ($ingresos) {\n foreach ($ingresos as $key => $value) {\n $texto = \"\";\n $class = \"\";\n if ($value['idEstado'] == 1) :\n $class = \"btn-success\";\n $texto = \"Cobrado\";\n elseif ($value['idEstado'] == 2):\n $class = \"btn-info\";\n $texto = \"A Cobrar\";\n elseif ($value['idEstado'] == 3):\n $class = \"btn-danger\";\n $texto = \"Vencido\";\n else:\n $class = \"btn-warning\";\n $texto = \"Sin Estado\";\n endif;\n\n $facturaIdIngreso = $this->app_model->get_factura_idGenIngreso($value['idGenIngreso']);\n if ($userdata['idUsuario'] != 28 && $userdata['idUsuario'] != 29 && $facturaIdIngreso == false) {\n $bloque1 = '<li><a href=\"' . base_url() . 'ventas/editar_venta/' . $value['idIngreso'] . '\"><i class=\"icon-cogs\"></i> Editar</a></li>' .\n '<li><a href=\"#modal-delete\" class=\"tip deleteIngreso\" data-id=\"' . $value['idIngreso'] . '\" data-toggle=\"modal\" ><i class=\"icon-close\"></i> Eliminar</a></li>' .\n '<li class=\"divider\"></li>';\n } else {\n $bloque1 = '';\n }\n\n $idGenIngreso = \"'\" . $value['idGenIngreso'] . \"'\";\n if ($userdata['idUsuario'] != 28 && $userdata['idUsuario'] != 29) {\n $bloque2 = '<li><a href=\"#\"><i class=\"icon-notebook\"></i> Crear NC/ND</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-newspaper\"></i> Crear remito</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-clipboard\"></i> Cta Cte</a></li>' .\n '<li class=\"divider\"></li>' .\n '<li><a href=\"#\" onclick=\"generarPdfDetalleVenta(' . $idGenIngreso . ')\"><i class=\"icon-binoculars\"></i> Ver detalle</a></li>' .\n '<li><a href=\"#\"><i class=\"icon-attachment\"></i> Enviar detalle</a></li>';\n }\n\n $opcion = ' <div class=\"btn-group\">' .\n '<button class=\"btn ' . $class . '\" style=\"padding: 3px;font-size: 0.8em;\">' . $texto . '</button>' .\n '<button class=\"btn btn-dark dropdown-toggle\" data-toggle=\"dropdown\" style=\"padding: 3px;font-size: 0.8em;\"><span class=\"caret caret-split\"></span></button>' .\n '<ul class=\"dropdown-menu icons-right\">' .\n $bloque1 .\n '<li><a href=\"#modal-agregar-cobro\" class=\"tip agregarCobro\" data-id=\"' . $value['idGenIngreso'] . '\" data-toggle=\"modal\" ><i class=\"icon-tag5\"></i> Agregar cobranza</a></li>' .\n $bloque2 .\n '</ul>' .\n '</div>';\n\n $dato[] = array(\n $opcion,\n $value['idTipoIngreso'],\n $value['fechaEmision'],\n $value['fechaVtoCobro'],\n $value['nombEmpresa'],\n $value['categoria'],\n \"$\" . number_format($value['total'] + $value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['descuentoTotal'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'], 2, \",\", \".\"),\n \"$\" . number_format($value['aCobrar'], 2, \",\", \".\"),\n \"$\" . number_format($value['total'] - $value['aCobrar'], 2, \",\", \".\"),\n $value['nombreVend'],\n \"DT_RowId\" => $value['idIngreso']\n );\n }\n }\n\n $aa = array(\n 'sEcho' => 1,\n 'iTotalRecords' => count($dato),\n 'iTotalDisplayRecords' => 10,\n 'aaData' => $dato\n );\n echo json_encode($aa);\n }", "public function ListarMesas()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM mesas LEFT JOIN salas ON mesas.codsala = salas.codsala\";\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}", "function listar_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_procesos\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function listarPorId(){\n $query = \"select * from usuario where idusuario=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do id pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->idusuario);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n }", "public function listadeTodasCartaDao(){\r\n \r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $listaMembro = array();\r\n \r\n $string = \"SELECT CodMembro,CodCarta,Nome,datarecebimento FROM membros JOIN recebemcartas ON (CodMembro = Matricula) JOIN cartas ON (CodCarta = Cod_Carta)\";\r\n $resultado = mysql_query($string) or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n\t$i=0; \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n\r\n\t $membro = new objetoMembro(); \r\n $membro->setMatricula($registro['CodMembro']);\r\n $membro->setIdCarta($registro['CodCarta']);\r\n $membro->setNome($registro['Nome']);\r\n $membro->setData($registro['datarecebimento']); \r\n \r\n\t $listaMembro[$i] = $membro;\r\n \r\n $i++;\r\n }\r\n\t\t\r\n\t\tmysql_free_result($resultado);\r\n $obj->freebanco();\r\n return $listaMembro;\r\n }", "public function getAllTabelas() {\n \t$sql = \"select\n \t\t\t\t\ttable_name,\n \t\t\t\t\ttable_schema\n\t\t\t\tfrom\n\t\t\t\t\tINFORMATION_SCHEMA.TABLES\n\t\t\t\twhere\n\t\t\t\t\tTABLE_TYPE = 'BASE TABLE'\";\n \t\n \t$this->execute($sql);\n \t$aDados = array();\n \twhile ($aReg = $this->fetchReg()){\n \t\t$aDados[] = $aReg;\n \t}\n \treturn $aDados;\n }", "public function listarTrabajador($id_empleador_maestro, $WHERE = null, $start = null, $limit = null, $sidx = null, $sord = null) {\n $cadena = null;\n if (is_null($WHERE)) {\n $cadena = $WHERE;\n } else {\n $cadena = \"$WHERE ORDER BY $sidx $sord LIMIT $start, $limit\";\n }\n\n $query = \"\n SELECT \n p.id_persona,\n t.id_trabajador,\n p.cod_tipo_documento,\n td.descripcion_abreviada AS nombre_tipo_documento,\n p.num_documento,\n p.apellido_paterno,\n p.apellido_materno,\n p.nombres\n \n FROM personas AS p \n INNER JOIN tipos_documentos AS td\n ON p.cod_tipo_documento = td.cod_tipo_documento\n\n INNER JOIN empleadores_maestros AS em\n ON p.id_empleador = em.id_empleador\n\n INNER JOIN trabajadores AS t\n ON p.id_persona = t.id_persona\n\n INNER JOIN situaciones AS s\n ON t.cod_situacion = s.cod_situacion\n\n WHERE em.id_empleador_maestro = ?\n AND t.cod_situacion = 1\n \n $cadena\n\";\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $id_empleador_maestro);\n $stm->execute();\n $lista = $stm->fetchAll();\n $stm = null;\n return $lista;\n }", "public function mostrarTablaAsegurados() {\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$asegurados = ControladorAsegurados::ctrMostrarAsegurados($item, $valor);\n\n\t\tif ($asegurados == null) {\n\t\t\t\n\t\t\t$datosJson = '{\n\t\t\t\t\"data\": []\n\t\t\t}';\n\n\t\t} else {\n\n\t\t\t$datosJson = '{\n\t\t\t\"data\": [';\n\n\t\t\tfor ($i = 0; $i < count($asegurados); $i++) { \n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LA EMPRESA\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemEmpleador = \"id\";\n\t\t\t\t$valorEmpleador = $asegurados[$i][\"id_empleador\"];\n\n\t\t\t\t$Empleadores = ControladorEmpleadores::ctrMostrarEmpleadores($itemEmpleadore, $valorEmpresa);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS EL TIPO DE SEGURO\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemSeguro = \"id\";\n\t\t\t\t$valorSeguro = $asegurados[$i][\"id_seguro\"];\n\n\t\t\t\t$seguros = ControladorSeguros::ctrMostrarSeguros($itemSeguro, $valorSeguro);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS LOCALIDADES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemLocalidad = \"id\";\n\t\t\t\t$valorLocalidad = $asegurados[$i][\"id_localidad\"];\n\n\t\t\t\t$localidades = ControladorLocalidades::ctrMostrarLocalidades($itemLocalidad, $valorLocalidad);\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS OCUPACIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemOcupacion = \"id\";\n\t\t\t\t$valorOcupacion = $asegurados[$i][\"id_ocupacion\"];\n\n\t\t\t\t$ocupaciones = ControladorOcupaciones::ctrMostrarOcupaciones($itemOcupacion, $valorOcupacion);\t\t\t\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS ACCIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$botones1 = \"<div class='btn-group'><button class='btn btn-info btnAgregarBeneficiario' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Agregar Beneficiario'><i class='fas fa-check'></i></button></div>\";\n\n\t\t\t\t$botones2 = \"<div class='btn-group'><button class='btn btn-warning btnEditarEmpleador' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Editar'><i class='fas fa-pencil-alt'></i></button><button class='btn btn-danger btnEliminarAsegurado' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Eliminar'><i class='fas fa-times'></i></button></div>\";\n\n\t\t\t\t$datosJson .='[\n\t\t\t\t\t\"'.$botones1.'\",\t\n\t\t\t\t\t\"'.$empleadores[\"razon_social\"].'\",\t\t\t\n\t\t\t\t\t\"'.$seguros[\"tipo_seguro\"].'\",\t\n\t\t\t\t\t\"'.$asegurados[$i][\"matricula\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"documento_ci\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"paterno\"].' '.$asegurados[$i][\"materno\"].' '.$asegurados[$i][\"nombre\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"sexo\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_nacimiento\"].'\",\n\t\t\t\t\t\"'.$Localidades[\"nombre_localidad\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"zona\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"calle\"].' '.$asegurados[$i][\"nro_calle\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"salario\"].'\",\n\t\t\t\t\t\"'.$ocupaciones[\"nombre_ocupacion\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_ingreso\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"estado\"].'\",\n\t\t\t\t\t\"'.$botones2.'\"\n\t\t\t\t],';\n\t\t\t}\n\n\t\t\t$datosJson = substr($datosJson, 0, -1);\n\n\t\t\t$datosJson .= ']\n\t\t\t}';\t\n\n\t\t}\n\n\t\techo $datosJson;\n\t\n\t}", "public function getAll()\n {\n\n $pedido = $this->db->query(\"SELECT * FROM pedidos ORDER BY id DESC\");\n return $pedido;\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "function listarServiciosTerminados()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 0 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function listtabelKeuAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('KEUANGAN');\n }", "public function listaProductos(){\n\n $respuesta = Datos::mdlListaProductos(\"productos\");\n $cont =0;\n\n foreach ($respuesta as $row => $item){\n \t$cont ++;\n\n\n echo '<tr>\n <td>'.$cont.'</td>\n <td>'.$item[\"codProducto\"].'</td>\n <td>'.$item[\"nombre\"].'</td>\n <td>'.$item[\"tipo\"].'</td>\n <td><a href=\"updtProducto.php?idEditar='.$item[\"idProducto\"].'\"><button class=\"btn btn-warning\">Editar</button></a></td>\n <td><a href=\"listaProductos.php?idBorrar='.$item[\"idProducto\"].'\" ><button class=\"btn btn-danger\">Borrar</button></a></td>\n </tr>';\n }\n\n }", "function listar_historial_pedido($id){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial WHERE pertenece_his='$id' ORDER BY id_his ASC\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\t$num=1;\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$resultado['numero']=$num++;\n\t\t\t$resultado['fecha_his']=$this->convertir_fecha($resultado['fecha_his']);\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "public static function traerTodas()\n {\n $query = \"SELECT * FROM nivel\";\n $stmt = DBConnection::getStatement($query);\n $stmt->execute();\n\n $salida = [];\n\n while($datosNiv = $stmt->fetch()) {\n $niv = new Nivel();\n $niv->cargarDatos($datosNiv);\n\n $salida[] = $niv;\n }\n\n return $salida;\n }", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "public function lista(){\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM sedecchamados\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "public function listar(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_decolare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"destinatia\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "function listar2(){\n\t\t\n\t\t$sql = \"SELECT c.id, c.codigo, c.nombre from prd_pasos_producto a\n\t\tinner join prd_pasos_acciones_producto b on b.id_paso=a.id\n\t\tinner join app_productos c on c.id=a.id_producto\n\t\tgroup by a.id_producto;\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "public function getTodos(){\n\t\t\t$this->db->query(\"SELECT * FROM generos\");\n\t\t\treturn $this->db->fetchAll();\n\t\t}", "public function listar() {\n $conexion = new Conexion();\n $consulta = $conexion->prepare('SELECT * FROM facultad');\n $consulta->execute();\n $ces = null;\n\n $tabla_datos = $consulta->fetchAll(PDO::FETCH_ASSOC);\n\n $astraba = array();\n\n\n foreach ($tabla_datos as $con => $valor) {\n $ces = $tabla_datos[$con][\"nombre\"];\n\n array_push($astraba, $ces);\n }\n return $astraba;\n }", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "public function listaVentas()\n {\n $conexion = conexion::conectar();\n $sql = \"SELECT * FROM movimientos WHERE compra_venta ='v' order by id_producto asc;\";\n $stmt = $conexion->prepare($sql);\n $stmt->execute();\n $array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt = null;\n return $array;\n }", "function getAllTablesBar(){\n\n return $this->db->table('mesas')\n ->select('numero_Mesa, forma, personas, alto, ancho')\n ->where('id_puntos = 1')\n ->get()\n ->getResult();\n }", "public function getTableList()\n\t{\n\t\treturn [];\n\t}", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public static function GetTvaListe() {\n\t\t$sql = 'CALL get_all_tva_liste()';\n\t\treturn DatabaseHandler::GetAll($sql);\n\t}", "public function listar_entregados()\n {\n $this->db->where_in('p.estado_pedido', [1,2,3,4]);\n $this->db->join('clientes c', 'p.id_cliente = c.id_cliente');\n return $this->db->get('pedidos p')->result();\n }", "public function getTabularItems()\n {\n return SATabularListM::model()->findAll(array('order'=>'tabularlist_block'),array('tabularlist_aktif'=>TRUE));\n // return Yii::app()->db->createCommand('SELECT tabularlist_id, tabularlist_block FROM tabularlist_m WHERE tabularlist_aktif=TRUE')->queryAll();\n }" ]
[ "0.6800633", "0.6675996", "0.66327876", "0.65428084", "0.65190554", "0.650985", "0.6507186", "0.65030855", "0.6488347", "0.64208376", "0.64027786", "0.63812923", "0.63733274", "0.63321155", "0.6325322", "0.6301346", "0.62995714", "0.62982136", "0.6295512", "0.62880707", "0.6268624", "0.6263261", "0.6255614", "0.6222406", "0.62218714", "0.62157303", "0.6212106", "0.61768186", "0.6176359", "0.61705554", "0.61692256", "0.6163609", "0.6152207", "0.6152207", "0.6152207", "0.61474735", "0.6134309", "0.60950035", "0.609484", "0.60894537", "0.6089072", "0.6087313", "0.607548", "0.6069413", "0.60552716", "0.60528785", "0.6052874", "0.60521597", "0.60423785", "0.6028313", "0.6028313", "0.6024935", "0.60127884", "0.6004429", "0.5984949", "0.59839326", "0.59801114", "0.5975826", "0.59669906", "0.59658045", "0.5961868", "0.5961868", "0.5961868", "0.5955055", "0.59532577", "0.5952568", "0.5951601", "0.5949937", "0.5943029", "0.59409547", "0.59393626", "0.5932596", "0.59293395", "0.59254587", "0.5923463", "0.59233505", "0.5921953", "0.59145176", "0.5913915", "0.5912243", "0.5908639", "0.59034574", "0.5892166", "0.5890326", "0.5889654", "0.5888465", "0.58875054", "0.5884352", "0.58822256", "0.58767235", "0.58766186", "0.58759254", "0.5875628", "0.5875197", "0.58728224", "0.5869588", "0.5865351", "0.58611494", "0.58526456", "0.5848553" ]
0.6079181
42
Altera o email do cliente
public function changeEmail($cliente_id) { try { $email = \Request::get('email'); $data = (self::MODEL)::find($cliente_id); $data->email = $email; $data->save(); return $this->showResponse($data); } catch (\Exception $exception) { return $this->clientErrorResponse([ 'exception' => '[' . $exception->getLine() . '] ' . $exception->getMessage() ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changeEmail()\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['new_email']) || $request['new_email']==\"\")\n throw_error_msg(\"provide new_email\");\n\n if(!isset($request['cnew_email']) || $request['cnew_email']==\"\")\n throw_error_msg(\"provide cnew_email\");\n\n if($request['new_email']!=$request['cnew_email'])\n throw_error_msg(\"new email and confirm email do not match\");\n\n $request['userid'] = userid();\n $userquery->change_email($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\" => \"email 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 setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\n $this->email = $value;\n\n //$this->generateUserId();\n }", "public function changeEmail($newValue){\n\n $this->email = $newValue;\n $this ->save();\n\n }", "public function verificarClienteEmail(ICliente $cliente);", "function changeemail($member,$oldemail,$newemail) {\n\t\n}", "public function setEmail($newEmail){\n\t}", "public function setGiftcardSenderEmail($value);", "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "public function setEmail($value)\n {\n $this->_email = $value;\n }", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "public function cmschangeMailCliente(Request $request){\n $correo = $request->correo;\n $ncorreo = $request->ncorreo;\n $sap_code_sponsor = $request->sap_code_sponsor;\n\n $update = User::Where('email', 'like', '%' . \"$correo\" . '%')\n ->where('client_type', '=', 'CLIENTE')\n ->where('sap_code_sponsor', '=', $sap_code_sponsor)\n ->where('locked', '=', 0)\n ->where('status', '=', 1)\n ->update(['email' => \"$ncorreo\" ]);\n \n return '1';\n }", "public function setUsernameToEmail()\n {\n $this->username = $this->email;\n $this->usernameCanonical = $this->emailCanonical;\n }", "public function resetOriginalEmail() : void;", "private function emailAtLogin() {}", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "public function changeEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('change-email');\n\n $recentEmail = $this->userEngine\n ->getChangeRequestedEmail();\n \n JavaScript::put(['newEmail' => __ifIsset($recentEmail['data'], $recentEmail['data']['new_email'], false)]);\n\n return $this->loadPublicView('user.change-email', $breadCrumb['data']);\n }", "public function change_email()\n {\n if ($this->input->get('email')) {\n $res = $this->_api('user')->update_email([\n 'id' => $this->current_user->_operator_id(),\n 'email' => $this->input->get('email')\n ]);\n if ($res['submit']) {\n $this->_flash_message('メールアドレスを変更しました');\n redirect('setting');\n return;\n }\n }\n\n $view_data = [\n 'form_errors' => []\n ];\n\n\n // Check input data\n if ($this->input->is_post()) {\n // Call API to send verify email\n $res = $this->_api('user')->send_verify_email([\n 'user_id' => $this->current_user->id,\n 'email_type' => 'change_email',\n 'email' => $this->input->post('email'),\n ]);\n if ($res['submit']) {\n redirect('setting/change_email_sent');\n }\n\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n $user_res = $this->get_current_user_detail();\n $view_data['post'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "public function setGiftcardRecipientEmail($value);", "public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }", "public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }", "public function setEmail($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_9'));\n\t\tif(!Validator::AccountEmail($value)) throw new Exception(lang('error_9'));\n\t\t\n\t\t$this->_email = $value;\n\t}", "public static function editMail($data)\n {\n $response = self::send('reservas/editar_email', [\n 'cliente_id' => $data['cliente_id'],\n 'email' => $data['email'],\n ]);\n\n return $response;\n }", "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }", "public function email_must_be_unique_on_update()\n {\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n $this\n ->from(\"nova/resources/users/{$this->user->id}/edit\")\n ->put(\n \"nova-api/users/{$this->user->id}\",\n [\n 'email' => '[email protected]',\n ]\n )\n ->assertRedirect(\"nova/resources/users/{$this->user->id}/edit\")\n ->assertSessionHasErrors('email');\n }", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}", "function change_recipient() {\n\t\treturn \"[email protected]\";\n\t}", "public function setEmail($mail);", "function reset_email()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Reset email\n if ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_new_email_failed'));\n }\n }", "public function editEmail($mail)\n\t\t{\n\t\t\tglobal $email;\n\t\t\tglobal $user_id;\n\t\t\n\t\t\t$mail = addslashes($mail);\n\n\t\t\tif(strlen($mail) <= 120)\n\t\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET email = \"' . $mail;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\t}\n\t\t\n\t\t\t$email = $mail;\n\t\t}", "public function setEmail(?string $value): void {\n $this->getBackingStore()->set('email', $value);\n }", "public function setEmail(UserRepositoryInterface $repository, $newEmail);", "public function setEmailCliente($emailCliente) {\n\t\t$this->cliente['senderEmail'] = $emailCliente;\n\t\t$this->checkoutTransparente['cliente']['senderEmail'] = $emailCliente;\n\t\treturn $this;\n\t}", "public function changeEmail($newEmail){\r\n\t\tif($this::isLoggedIn()){\r\n\t\t\t/* CAMBIO EMAIL*/\r\n\t\t\t\t\r\n\t\t\tdefined(\"INCLUDING\") or\r\n\t\t\tdefine(\"INCLUDING\", 'TRUE');\r\n\t\t\trequire_once \"./database.php\";\r\n\t\t\t\t\r\n\t\t\t$db = Database::getInstance();\r\n\t\t\t$mysqli = $db->getConnection();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t$sql = \"UPDATE UTENTI SET EMAIL=? WHERE ID=?\";\r\n\t\t\t$q = $mysqli->prepare($sql);\r\n\t\t\t$q->bind_param('si', $newEmail,$this->id);\r\n\t\t\tif($q->execute()){\r\n\t\t\t\tif($q->get_result()){\r\n\t\t\t\t\treturn true;}\r\n\t\t\t\telse return false;\r\n\t\t\t}\r\n\t\t\telse throw new Exception(\"Impossibile cambiare email\");\r\n\t\r\n\t\t}\r\n\t}", "public function setUserEmail($user) {\n\t\t$this->userEmail = $user;\n\t}", "public function setEmailToAddress($value) { $this->_emailToAddress = $value; }", "public function altera()\n {\n $data = array();\n\n $data1 = array(\n \"email\" => $this->input->post('email'),\n );\n\n if ($this->input->post('escolha') == true) {\n $senha = $this->encript($this->input->post('senha'));\n $senha2 = $this->encript($this->input->post('senha2'));\n } else {\n $senha = $this->input->post('senha_antiga');\n }\n\n // aqui deixa todos os identificadores cpf e cnpj na mesma variavel dependendo do usuario\n\n if ($this->input->post('tipo_user') == 0) {\n $id_tabela = \"id\";\n $identificador = \"cnpj\";\n\n //chamando para verificar se email já existe \n $this->load->model('Cliente');\n $verifica_email = $this->Cliente->buscar_email($data1, \"administracao\");\n } elseif ($this->input->post('tipo_user') == 1) {\n $id_tabela = \"id\";\n $identificador = \"cpf_cli\";\n\n\n //chamando para verificar se email já existe \n $this->load->model('Cliente');\n $verifica_email = $this->Cliente->buscar_email($data1, \"cliente_cli\");\n } else {\n $id_tabela = \"id_tec\";\n $identificador = \"cpf_tec\";\n\n $this->load->model('Tecnico');\n $verifica_email = $this->Tecnico->buscar_email($data1, \"tecnico\");\n }\n\n\n\n if ($this->input->post('id') == $verifica_email->$id_tabela) {\n } else {\n\n header(\"Location: editar_cadastro?message=err_email\");\n exit;\n }\n\n\n\n // aqui adiciona campos comuns a todas as tabelas \n $data = array(\n $id_tabela => $this->input->post('id'),\n 'tipo_user' => $this->input->post('tipo_user'),\n 'nome' => $this->input->post('nome'),\n 'email' => $this->input->post('email'),\n 'endereco' => $this->input->post('endereco'),\n 'senha' => $senha,\n 'status' => 1,\n $identificador => $this->limpaCPF_CNPJ($this->input->post('cpf')),\n );\n\n\n //adiciona valores adicionais ao array dependendo da tabela que será inserido\n if ($this->input->post('tipo_user') == 1) {\n $entidade = \"cliente_cli\";\n $data['cep'] = $this->input->post('cep');\n $data['telefone'] = $this->input->post('tel');\n $data['celular'] = $this->input->post('cel');\n $table = \"cliente_cli\";\n $model = \"Cliente\";\n } elseif ($this->input->post('tipo_user') == 2) {\n $entidade = \"tecnico\";\n $data['cep'] = $this->input->post('cep');\n $data['telefone'] = $this->input->post('tel');\n $data['celular'] = $this->input->post('cel');\n $table = \"tecnico\";\n $model = \"Tecnico\";\n }\n\n\n //admin\n elseif ($this->input->post('tipo_user') == 0) {\n $entidade = \"adminsitracao\";\n $data['cep'] = $this->input->post('cep');\n $data['telefone'] = $this->input->post('tel');\n $data['celular'] = $this->input->post('cel');\n $table = \"administracao\";\n $model = \"Usuario\";\n }\n\n\n\n\n\n //transforma id em int\n\n $id = intval($this->input->post('id'));\n $this->load->model($model);\n $dados = $this->$model->updatebyid($data, $table);\n\n\n\n if ($dados) {\n //se deu tudo certo inicia uma nova sessao com os dados atualizados\n\n session_start();\n\n $_SESSION['email'] = $data['email'];\n $_SESSION['tipo_user'] = $data['tipo_user'];\n $_SESSION['login'] = $data['nome'];\n\n\n\n // definindo insert de log\n $this->load->model('Movimentacao');\n $id_mov = $this->Movimentacao->BuscabyName(\"movimentacao\", \"alteração\");\n\n $timezone = new DateTimeZone('America/Sao_Paulo');\n $data = new DateTime('now', $timezone);\n $data = $data->format('Y/m/d H:i');\n\n $log = array(\n \"id_tb\" => $id,\n \"NomeEntidade\" => $entidade,\n \"TipoMov\" => $id_mov[0]['id'],\n \"data_mod\" => $data,\n \"responsavel\" => $_SESSION['email'],\n );\n\n $this->load->model('Log');\n $this->Log->setLog($log);\n $this->Log->inserirLog('logs');\n\n // fim insert de log\n\n header(\"Location: editar_cadastro?message=editado\");\n exit;\n } else {\n\n header(\"Location: editar_cadastro?message=erro_edit\");\n exit;\n }\n }", "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "public function setEmailAddress($email);", "public function setEmail($email);", "public function setEmail($email);", "public function setEmail($email);", "function change_sender() {\n\t\treturn \"[email protected]\";\n\n\t}", "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}", "static function add_email(): void {\r\n\t\tself::add_acf_inner_field(self::roles, self::email, [\r\n\t\t\t'label' => 'Email',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => '(Optional)',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '25',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'placeholder' => '[email protected]'\r\n\t\t]);\r\n\t}", "public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }", "public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }", "public function setEmail($value)\n {\n return $this->set(self::EMAIL, $value);\n }", "public function setEmail(?CustomerTextFilter $email): void\n {\n $this->email = $email;\n }", "public function setEmail(?string $email): void;", "public function setEmail(?string $email): void;", "function set_admin_email($email) {\n $this->admin_email = $email;\n }", "public function editEmailProfil()\n {\n $this->form_validation->set_rules('email', '\"Email adress\"', 'required|valid_email|min_length[1]');\n\n if ($this->form_validation->run()) {\n //-----Get my adress mail of my input-----//\n $this->email = $this->input->post('email');\n //---------------------------------------//\n\n //-------------Create my objet--------------//\n $this->modelMembers->setId($this->id_member);\n $this->modelMembers->setEmail($this->email);\n //-----------------------------------------//\n\n $membersModel = $this->modelMembers;\n $this->modelMembers->updateEmailMembers($membersModel);\n\n $this->index();\n\n } else {\n $this->index();\n }\n }", "public static function changeEmail($email, $user_id){\n\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL) === false){\n\t\t return '<p class=\"text-danger light-input-bg\"><b>Niepoprawny adres email</b></p>';\n\t\t}\t\t\n\t\tif(static::findByEmail($email) == false){\n\t\t\t\n\t\t\t$sql = 'UPDATE users \n\t\t\t\tSET email = :email \n\t\t\t\tWHERE id = :user_id';\n\t\t\t$db = static::getDB();\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->bindValue(':email', $email, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':user_id', $user_id, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\treturn '<p class=\"text-success light-input-bg\"><b>Zmieniono adres email</b></p>';\n\t\t} else {\n\t\t\treturn '<p class=\"text-danger light-input-bg\"><b>Wystąpił bład przy wprowadzaniu do bazy</b></p>';\n\t\t}\n\t}", "public function setEmail($value)\n {\n \t$this->email = $value;\n \treturn $this;\n }", "public function changeAccountEmail(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required|string|email|max:191|unique:users',\n ]);\n\n $user = User::find($request->input('id'));\n\n if ($user) {\n\n $user->email = $request->input('email');\n $user->billing_status = 'VerifyRequired';\n $user->facebook_id = null;\n $user->google_id = null;\n $user->twitter_id = null;\n $user->save();\n\n }\n\n return response()->json([\n 'result' => 'success',\n 'email' => $user->email,\n 'billing_status' => $user->billing_status\n ]);\n }", "public function setEmailAttribute($value) {\n \t$this->attributes['email'] = strtolower($value);\n\t}", "function setSenderEmail($email) {\n $parts = $this->_parseEmail($email);\n $this->from_user = $parts[0];\n $this->from_domain = $parts[1];\n }", "public function setUserMail(?string $value): void {\n $this->getBackingStore()->set('userMail', $value);\n }", "public function set_email($email) : void\n {\n try {\n $this->obj_contato_anunciante->set_email(Validador::Contato_Anunciante()::validar_email($email));\n } catch (Exception $e) {\n $this->erros[] = $e->getMessage();\n $this->campos['email'] = \"erro\";\n }\n }", "public function setEmailAttribute($value)\n {\n $this->attributes['email'] = mb_strtolower($value);\n }", "function update_option_new_admin_email($old_value, $value)\n {\n }", "function update_network_option_new_admin_email($old_value, $value)\n {\n }", "public function updateEmail($email)\n {\n $this->email = trim($email);\n $this->update();\n }", "public function setEmailAttribute(string $value): void\n {\n $this->attributes[self::EMAIL] = \\strtolower($value);\n }", "function user_set_email($user_id, $new_email)\n{\n\tif(strcmp($new_email,user_get_email($user_id)))\n\t{\n\t\t//check that no other user has it\n\t\tif(!user_email_exists($new_email))\n\t\t{\n\t\t\t//set it\n\t\t\t$sql=\"UPDATE \".PREFIX.\"user SET email='\".sql_safe($new_email).\"' WHERE id=\".sql_safe($user_id).\";\";\n\t\t\tif(mysql_query($sql))\n\t\t\t\tadd_message(\"New email set\");\n\t\t\telse\n\t\t\t\tadd_error(\"Email could not be set: \".mysql_error());\n\t\t}\n\t\telse\n\t\t\tadd_error(\"Email '$new_email' is already in use.\");\n\t}\n}", "public function setEmailAttribute($value)\n {\n $this->attributes['email'] = strtolower($value);\n }", "public function updateEmail(){\n if(\n !empty($_POST['email'])){\n $email = $_POST['email'];\n $id = $_SESSION['userID'];\n $user = new User();\n $user->updateEmail($email, $id);\n }\n else {\n echo \"false\";\n }\n }", "public function setMail($mail);", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_activated'));\n\t\t\t\t\tredirect('login');\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_failed'));\n\t\t\t\t\tredirect('login');\n\t\t}\n\t}", "public function updateEmail()\n {\n $this->schol->updateEmail( $this->input->post('emp'), $this->input->post('email'));\n return redirect('/affirs/Scholarship/show/'. $this->input->post('schol'));\n\n }", "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "public function setEmail(string $email){\n $this->email = $email;\n }", "public function editUserEmail($email)\n {\n // prevent database flooding\n $email = substr(trim($email), 0, 64);\n\n if (!empty($email) && $email == $_SESSION[\"user_email\"]) {\n $this->errors[] = MESSAGE_EMAIL_SAME_LIKE_OLD_ONE;\n // user mail cannot be empty and must be in email format\n } elseif (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = MESSAGE_EMAIL_INVALID;\n\n } else if ($this->db->isConnected()) {\n // check if new email already exists\n $select = $this->db->row(\n 'SELECT * FROM users WHERE user_email = :user_email',\n array(\"user_email\"=>$email)\n );\n\n // if this email exists\n if (isset($select[\"user_id\"])) {\n $this->errors[] = MESSAGE_EMAIL_ALREADY_EXISTS;\n } else {\n // write users new data into database\n $update = $this->db->query(\n 'UPDATE users SET user_email = :user_email WHERE user_id = :user_id',\n array(\n \"user_email\"=>$email,\n \"user_id\"=>$_SESSION['user_id']\n )\n );\n\n if ($update > 0) {\n $_SESSION['user_email'] = $email;\n $this->messages[] = MESSAGE_EMAIL_CHANGED_SUCCESSFULLY . $email;\n } else {\n $this->errors[] = MESSAGE_EMAIL_CHANGE_FAILED;\n }\n }\n }\n }", "public function setEmail($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->email !== $v) {\n\t\t\t$this->email = $v;\n\t\t\t$this->modifiedColumns[] = UsuarioPeer::EMAIL;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function confirmEmail()\n {\n $this->mail_confirmed = Carbon::now();\n $this->mail_token = null;\n $this->save();\n }", "public function restablecer2(Request $request)\n {\n $email = $request->email;\n $mail = User::where('email',$email)->first();\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($mail->id));\n echo \"Solicitud recibida!!!<br>Se te ha enviado un correo electronico para restablecer la contraseña!!\";\n }else{\n echo \"Correo no válido!!\";\n }\n }", "function set_email($email='*', $obfuscate=1)\r\n{\r\n\t// autoset\r\n\tif ( $email == '*' )\r\n\t{\r\n\t\t// check user name\r\n\t\tif ( empty($this->user_name) ) $this->set_user_name('*');\r\n\t\t\r\n\t\t// obfuscate\r\n\t\t$ob = '';\r\n\t\tif ( $obfuscate )\r\n\t\t{\r\n\t\t\tif ( mt_rand(1,2) == 1 )\r\n\t\t\t{\r\n\t\t\t\t$_ob = '_' . substr(uniqid('69'),-4);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$_ob = mt_rand(10000,99999);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// get domain\r\n\t\t$domain = $this->_get_random_email_domain();\r\n\t\t\r\n\t\t// compile\r\n\t\t$email = strtolower($this->user_name . $_ob . '@' . $domain);\r\n\t}\r\n\t\r\n\t// cheap validity check\r\n\tif ( !strpos($email, '@') || !strpos($email, '.') )\r\n\t{\r\n\t\ttrigger_error(\"invalid email addres [$email]\", E_USER_WARNING);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\t$this->email = $email;\r\n\treturn;\r\n}", "public function updateEmail(Request $request)\n {\n // Validation.\n $this->validate($request, [\n 'email' => 'required|email|unique:user,email',\n ]);\n\n // Obtain the authenticated user's id.\n $id = Auth::id();\n\n // Find the user and update the name from the request.\n $user = User::find($id);\n $user->email = strtolower(request('email'));\n\n // Save the changes.\n $user->save();\n\n // Return true upon success.\n return response()->json([], Response::HTTP_OK);\n }", "public function getEmailEmpresa()\n {\n return $this->emailEmpresa;\n }", "public function setMailTo ($v)\n {\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n if ( $this->mail_to !== $v || $v === '' )\n {\n $this->mail_to = $v;\n }\n }", "private function _setEmail($input) {\n\t\tif(!Validator::Email($input)) throw new Exception(lang('error_9'));\n\t\t$this->_identifier = $input;\n\t}", "private function enviarEmail($msg)\n {\n // setando conteudo do email para avisos\n echo 'Envio email';\n }", "public function set_sender(EmailAddress $address);", "public function editUserEmailAction(Request $request) {\n $this->get('core_user.user_manager')->editUserEmail($this->getUser(), $request->request->get('email'));\n\n $view = $this->view(true, Response::HTTP_OK);\n\n return $this->handleView($view);\n }", "function wpdocs_update_option_new_admin_email( $old_value, $value ) {\n\n update_option( 'admin_email', $value );\n}", "public function setEmail($email)\n\n{\n\n$this->email = $email;\n\n}", "public function setNewEmail($value)\n {\n return $this->set('NewEmail', $value);\n }", "function setCoordinatorEmail($congID, $userID, $email) {\n $sqlQuery = \"UPDATE congregation_coordinator SET coordinatorEmail = :email WHERE congID = :congID AND userID = :userID\";\n $params = array(\":email\" => $email, \":congID\" => $congID, \":userID\" => $userID);\n $result = $this->DB->executeQuery($sqlQuery, $params, \"update\");\n if($result > 0) {\n return true;\n }else {\n return false;\n }\n }", "public function gera_senha_envia_email($dados)\r\n\t{\r\n\t\t//\tGERO A SENHA\r\n\t\t$CaracteresAceitos = 'ABCDZYWZ0123456789'; \r\n\t \t$max = strlen($CaracteresAceitos)-1;\r\n\t \t$password = null;\r\n\t \tfor($i=0; $i < 8; $i++) \r\n\t\t{ \r\n\t\t \t$password .= $CaracteresAceitos{mt_rand(0, $max)};\r\n\t \t}\r\n\t\t\r\n\t\t$senha = md5($password);\r\n\t\t\r\n\t\t//\tATUALIZO A SENHA NO BANCO\r\n\t\t$sql = \"UPDATE $this->nome_tabela SET senha = '$senha' WHERE $this->chave_tabela = '$dados[idlogin]'\";\r\n\t\tparent::executaSQL($sql);\r\n\t\t\r\n\t\t\r\n\t\t//\tENVIO O EMAIL PARA O USUARIO\r\n\t\t$texto_mensagem = \"\r\n\t\t\t\t\t\t\tCaro usuário, como solicitado segua abaixo sua nova senha. <br />\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSenha: $password\r\n\t\t\t\t\t\t\t\";\r\n\t\t\r\n\t\tUtil::envia_email($dados[email], \"Recuperação de senha\", $texto_mensagem, $_SERVER['SERVER_NAME'], \"atendimento@\".$_SERVER['SERVER_NAME']);\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tEFETUA O CADASTRO\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function cadastra($dados)\r\n\t{\r\n\t\t$nome = Util::trata_dados_formulario($dados[nome]);\r\n\t\t$email = Util::trata_dados_formulario($dados[email]);\r\n\t\t$id_grupologin = Util::trata_dados_formulario($dados[id_grupologin]);\r\n\t\t$senha = md5($dados[senha]);\r\n\t\t\r\n\t\t//\tVERIFICO SE O GRUPO JA ESTA CADASTRADO\r\n\t\tif($this->verifica($email) == 0)\r\n\t\t{\t\t\r\n\t\t\t$sql = \"\r\n\t\t\t\t\tINSERT INTO\t\" . $this->nome_tabela. \"\r\n\t\t\t\t\t(nome, senha, email, id_grupologin)\r\n\t\t\t\t\tVALUES\r\n\t\t\t\t\t('$nome', '$senha', '$email', '$id_grupologin')\r\n\t\t\t\t\t\";\r\n\t\t\tparent::executaSQL($sql);\r\n\t\t\t\r\n\t\t\t//\tARMAZENA O LOG\r\n\t\t\tparent::armazena_log(\"tb_logs_logins\", \"CADASTRO DO LOGIN $nome\", $sql, $_SESSION[login][idlogin]);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tEFETUA A ALTERACAO\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function altera($dados)\r\n\t{\r\n\t\t$nome = Util::trata_dados_formulario($dados[nome]);\r\n\t\t$email = Util::trata_dados_formulario($dados[email]);\r\n\t\t$id_grupologin = Util::trata_dados_formulario($dados[id_grupologin]);\r\n\t\t\r\n\t\t//\tVERIFICO SE O GRUPO JA ESTA CADASTRADO\r\n\t\tif($this->verifica_altera($email, $dados[id]) == 0)\r\n\t\t{\t\t\r\n\t\t\t$sql = \"UPDATE \" . $this->nome_tabela. \" SET nome = '$nome', email = '$email', id_grupologin = '$id_grupologin' WHERE \" . $this->chave_tabela. \" = '$dados[id]'\";\r\n\t\t\tparent::executaSQL($sql);\r\n\t\t\t\r\n\t\t\t//\tARMAZENA O LOG\r\n\t\t\tparent::armazena_log(\"tb_logs_logins\", \"ALTERAÇÃO DO LOGIN $dados[id]\", $sql, $_SESSION[login][idlogin]);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tATIVA OU DESATIVA\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function ativar_desativar($id, $ativo)\r\n\t{\r\n\t\tif($ativo == \"SIM\")\r\n\t\t{\r\n\t\t\t$sql = \"UPDATE \" . $this->nome_tabela. \" SET ativo = 'NAO' WHERE \" . $this->chave_tabela. \" = '$id'\";\r\n\t\t\tparent::executaSQL($sql);\r\n\t\t\t\r\n\t\t\t//\tARMAZENA O LOG\r\n\t\t\tparent::armazena_log(\"tb_logs_logins\", \"DESATIVOU O LOGIN $id\", $sql, $_SESSION[login][idlogin]);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql = \"UPDATE \" . $this->nome_tabela. \" SET ativo = 'SIM' WHERE \" . $this->chave_tabela. \" = '$id'\";\r\n\t\t\tparent::executaSQL($sql);\r\n\t\t\t\r\n\t\t\t//\tARMAZENA O LOG\r\n\t\t\tparent::armazena_log(\"tb_logs_logins\", \"ATIVOU O LOGIN $id\", $sql, $_SESSION[login][idlogin]);\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tEXCLUI\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function excluir($id)\r\n\t{\r\n\t\t//\tBUSCA OS DADOS\r\n\t\t$row = $this->select($id);\r\n\t\t\r\n\t\t$sql = \"DELETE FROM \" . $this->nome_tabela. \" WHERE \" . $this->chave_tabela. \" = '$id'\";\r\n\t\tparent::executaSQL($sql);\r\n\t\t\r\n\t\t//\tARMAZENA O LOG\r\n\t\tparent::armazena_log(\"tb_logs_logins\", \"EXCLUSÃO DO LOGIN $id, NOME: $row[nome], Email: $row[email]\", $sql, $_SESSION[login][idlogin]);\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tVERIFICO SE JA POSSUI O GRUPO CADASTRADO\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function verifica($email)\r\n\t{\r\n\t\t$sql = \"SELECT * FROM \" . $this->nome_tabela. \" WHERE email = '$email'\";\r\n\t\treturn mysql_num_rows(parent::executaSQL($sql));\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tVERIFICO SE JA POSSUI O GRUPO CADASTRADO QUANDO ALTERAR\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function verifica_altera($email, $id)\r\n\t{\r\n\t\t\t$sql = \"SELECT * FROM \" . $this->nome_tabela. \" WHERE email = '$email' AND \" . $this->chave_tabela. \" <> '$id'\";\r\n\t\treturn mysql_num_rows(parent::executaSQL($sql));\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tBUSCA OS DADOS\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function select($id = \"\")\r\n\t{\r\n\t\tif($id != \"\")\r\n\t\t{\r\n\t\t\t$sql = \"\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t*\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\" . $this->nome_tabela. \"\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\" . $this->chave_tabela. \" = '$id'\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\tnome\r\n\t\t\t\t\t\";\r\n\t\t\treturn mysql_fetch_array(parent::executaSQL($sql));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql = \"\r\n\t\t\t\tSELECT\r\n\t\t\t\t\t*\r\n\t\t\t\tFROM\r\n\t\t\t\t\t\" . $this->nome_tabela. \"\r\n\t\t\t\tORDER BY\r\n\t\t\t\t\tnome\r\n\t\t\t\t\";\r\n\t\t\treturn parent::executaSQL($sql);\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tEFETUA LOGIN\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function efetuar_login($email, $senha)\r\n\t{\r\n\t\t$email = Util::trata_dados_formulario($email);\r\n\t\t$senha = md5($senha);\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM tb_logins WHERE email = '$email' AND senha = '$senha' AND ativo = 'SIM'\";\r\n\t\t$result = parent::executaSQL($sql);\r\n\t\t\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//\tVERIFICO SE O GRUPO ESTA HABILITADO PARA ACESSAR\r\n\t\t\tif($this->verifica_grupo_ativo($row[id_grupologin]) == true)\r\n\t\t\t{\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$_SESSION[login] = $row;\r\n\t\t\t\t\r\n\t\t\t\t//\tBUSCO AS PERMISSOES DE ACESSO DO USUARIO\r\n\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t tp.*, tmp.nome AS nome_modulo_pagina\r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t tb_grupos_logins_tb_paginas tgltp, tb_paginas tp, tb_modulos_paginas tmp\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t tgltp.id_pagina = tp.idpagina\r\n\t\t\t\t\t\t AND tp.id_modulopagina = tmp.idmodulopagina\r\n\t\t\t\t\t\t AND tgltp.id_grupologin = '$row[id_grupologin]'\r\n\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t tmp.nome, label\r\n\t\t\t\t\t\t\";\r\n\t\t\t\t$result = parent::executaSQL($sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(mysql_num_rows($result) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$i = 0;\r\n\t\t\t\t\twhile($row = mysql_fetch_array($result))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$_SESSION[permissoes][$i][pagina] = $row[pagina];\r\n\t\t\t\t\t\t$_SESSION[permissoes][$i][label] = $row[label];\r\n\t\t\t\t\t\t$_SESSION[permissoes][$i][exibir_menu] = $row[exibir_menu];\r\n\t\t\t\t\t\t$_SESSION[permissoes][$i][id_modulopagina] = $row[id_modulopagina];\r\n\t\t\t\t\t\t$_SESSION[permissoes][$i][nome_modulo_pagina] = $row[nome_modulo_pagina];\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tpublic function verifica_grupo_ativo($id_grupologin)\r\n\t{\r\n\t\t$sql = \"SELECT * FROM tb_grupos_logins WHERE idgrupologin = '$id_grupologin'\";\r\n\t\t$row = mysql_fetch_array(parent::executaSQL($sql));\r\n\t\t\r\n\t\tif($row[ativo] == 'SIM')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tFORMULARIO\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function formulario($dados)\r\n\t{\r\n\t?>\r\n \t\r\n \t<script>\r\n\t\t\tjQuery(document).ready(function(){\r\n\t\t\t\t// binds form submission and fields to the validation engine\r\n\t\t\t\tjQuery(\"#form-dados\").validationEngine();\r\n\t\t\t});\r\n\t\t</script>\r\n \r\n \t<div class=\"class-form-2\">\r\n <ul>\r\n <li>\r\n <p>Nome<span></span></p>\r\n <input type=\"text\" name=\"nome\" id=\"nome\" value=\"<?php echo $dados[nome] ?>\" class=\"validate[required]\" />\r\n </li>\r\n \r\n <li>\r\n <p>Grupo<span></span></p>\r\n <?php Util::cria_select_bd(\"tb_grupos_logins\", \"idgrupologin\", \"nome\", \"id_grupologin\", $dados[id_grupologin], \"validate[required]\") ?>\r\n </li>\r\n \r\n <li>\r\n <p>Email<span></span></p>\r\n <input type=\"text\" name=\"email\" id=\"email\" value=\"<?php echo $dados[email] ?>\" class=\"validate[required]\" />\r\n </li>\r\n \r\n <li> \r\n <p>Senha<span></span></p>\r\n <input type=\"password\" name=\"senha\" id=\"senha\" class=\"validate[required]\" />\r\n </li>\r\n \r\n <li>\r\n <p>Confirme a senha<span></span></p>\r\n <input type=\"password\" name=\"senha2\" id=\"senha2\" class=\"validate[required,equals[senha]]\" />\r\n </li>\r\n </ul>\r\n </div>\r\n <?php\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t/*\t==================================================================================================================\t*/\r\n\t/*\tFORMULARIO\t*/\r\n\t/*\t==================================================================================================================\t*/\r\n\tpublic function formulario_alteracao($dados)\r\n\t{\r\n\t?>\r\n \t\r\n <script>\r\n\t\t\tjQuery(document).ready(function(){\r\n\t\t\t\t// binds form submission and fields to the validation engine\r\n\t\t\t\tjQuery(\"#form-dados\").validationEngine();\r\n\t\t\t});\r\n\t\t</script>\r\n \r\n \t<div class=\"class-form-2\">\r\n <ul>\r\n <li>\r\n <p>Nome<span></span></p>\r\n <input type=\"text\" name=\"nome\" id=\"nome\" value=\"<?php echo $dados[nome] ?>\" class=\"validate[required])\" />\r\n </li>\r\n \r\n <li>\r\n <p>Grupo<span></span></p>\r\n <?php Util::cria_select_bd(\"tb_grupos_logins\", \"idgrupologin\", \"nome\", \"id_grupologin\", $dados[id_grupologin], \"validate[required]\") ?>\r\n </li>\r\n \r\n <li>\r\n <p>Email<span></span></p>\r\n <input type=\"text\" name=\"email\" id=\"email\" value=\"<?php echo $dados[email] ?>\" class=\"validate[required]\" />\r\n </li> \r\n </ul>\r\n </div>\r\n <?php\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n}", "public function setEmail(string $email): void\n {\n $this->email = $email;\n }", "public function setEmailToName($value) { $this->_emailToName = $value; }", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName = $nom_expediteur;\n\t$mail->AddAddress($email_destinataire);\n\t$mail->AddReplyTo($email_retour);\n\t$mail->IsHtml(true);\n\t$mail->Subject = $sujet_email;\n\t$mail->Body= $body_mail;\n\t\n\tif(!$mail->Send())\n\t{ \n\t \treturn FALSE;\n\t}\n\telse\n\t{\t \n\t \treturn TRUE;\n\t}\n}", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }" ]
[ "0.70404285", "0.69316673", "0.6927139", "0.69175583", "0.6824979", "0.6813773", "0.6729215", "0.66532266", "0.66166764", "0.6589006", "0.6583843", "0.6566653", "0.6562603", "0.65510255", "0.65164363", "0.6454262", "0.64516854", "0.64249766", "0.6392025", "0.63789344", "0.63657", "0.63506997", "0.6346708", "0.6334765", "0.6330153", "0.6321162", "0.6320392", "0.6317959", "0.63160855", "0.6312737", "0.630553", "0.6285557", "0.6237497", "0.62336236", "0.6225849", "0.6219241", "0.6217753", "0.6205342", "0.61895573", "0.6187313", "0.6186693", "0.6176609", "0.6176609", "0.6176609", "0.6157364", "0.61559814", "0.61441326", "0.6115942", "0.6115942", "0.6107076", "0.610513", "0.61030257", "0.61030257", "0.6099363", "0.609366", "0.60832727", "0.60610485", "0.6051075", "0.60437393", "0.6038661", "0.6035942", "0.6035531", "0.60321826", "0.60316855", "0.60295147", "0.6022027", "0.60181284", "0.5999983", "0.59985995", "0.5986865", "0.5986752", "0.5985839", "0.5982049", "0.59799707", "0.5976474", "0.5975261", "0.5975261", "0.5971233", "0.5969787", "0.59631324", "0.5962666", "0.5960355", "0.59497035", "0.5947825", "0.59458786", "0.5940363", "0.593964", "0.59350413", "0.5930108", "0.591951", "0.59100395", "0.59044987", "0.590153", "0.5899058", "0.589118", "0.5890733", "0.5885913", "0.5875392", "0.58687997", "0.5866384" ]
0.71975356
0
Search clients by taxvat and name based on term
public function search($term) { try { $list = (self::MODEL) ::with('enderecos') ->where('nome', 'LIKE', "%{$term}%") ->orWhere('taxvat', 'LIKE', "%{$term}%") ->get(); return $this->listResponse(ClientTransformer::directSearch($list)); } catch (\Exception $exception) { return $this->listResponse([]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClientByNameOrSurnameOrDni() {\n $term = Request::input('term', '');\n $results = array();\n $queries = User::where('role_id', 6)\n ->where(function($query) use ($term){\n $query->where('name', 'LIKE', '%'.$term.'%');\n $query->orWhere('surname', 'LIKE', '%'.$term.'%');\n $query->orWhere('dni', 'LIKE', '%'.$term.'%');\n })\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->fullname().' ['.$query->dni.']'];\n return response()->json($results);\n }", "public function findByName() { \n\n $term = Request::input('term');\n $cities = []; \n if (($term) && ($term !== '')) {\n $search_term = Helpers::accentToRegex($term);\n $query_term = '/.*' . $search_term . '*/i';\n $cities = Cities::where('properties.nome_municipio', 'regexp', $query_term)->\n orderBy('properties.nome_municipio')->\n get(array('properties.geo_codigo', 'properties.nome_municipio', 'properties.sigla')); \n }\n\n return Response::json($cities); \n }", "function searchQuery($client, $textoAbuscar)\n {\n echo '<h2>SOLR: This is the result of your search in the Solr database with this text: \"'.$textoAbuscar.'\"</h2><br />';\n // get a select query instance\n $query = $client->createSelect();\n\n // get the facetset component\n $facetSet = $query->getFacetSet();\n\n // create a facet field instance and set options\n $facetSet->createFacetField('Rts')->setField('retweet_count');\n\n // set a query (all prices starting from 12)\n //$query->setQuery('price:[12 TO *]');\n $query->setQuery('full_text: *'.$textoAbuscar.'*');\n\n // set start and rows param (comparable to SQL limit) using fluent interface\n $query->setStart(2)->setRows(20);\n\n // set fields to fetch (this overrides the default setting 'all fields')\n //$query->setFields(array('ID','username','favorite_count', 'description','full_text'));\n\n // sort the results by price ascending\n //$query->addSort('price', $query::SORT_ASC);\n $query->addSort('favorite_count', $query::SORT_ASC);\n\n // this executes the query and returns the result\n $resultset = $client->select($query);\n\n // display the total number of documents found by solr\n echo 'NumFound: '.$resultset->getNumFound();\n\n // show documents using the resultset iterator\n foreach ($resultset as $document) {\n\n echo '<hr/><table>';\n\n // the documents are also iterable, to get all fields\n foreach ($document as $field => $value) {\n // this converts multivalue fields to a comma-separated string\n if (is_array($value)) {\n $value = implode(', ', $value);\n }\n\n echo '<tr><th>' . $field . '</th><td>' . $value . '</td></tr>';\n }\n\n echo '</table>';\n }\n\n // display facet counts\n echo '<hr/>Facet counts for field \"retweet_count\":<br/>';\n $facet = $resultset->getFacetSet()->getFacet('Rts');\n foreach ($facet as $value => $count) {\n echo $value . ' [' . $count . ']<br/>';\n }\n\n }", "public function query($term) {\n $matches = $this->getMatchesService('vienna',$term,array('showSyn'=>false,'NearMatch'=>false,'includeCommonNames'=>true));\n return $matches;\n }", "public function get_trainees_by_taxcode() {\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n $result = $this->classtraineemodel->trainee_user_list_autocomplete($query_string);\n print json_encode($result);\n exit;\n }", "function search() {\n\n /* Start building the query object. We hope to end up with something like:\n $reqeust = '{\n \"from\" : 0,\n \"size\": 10,\n \"query\" : {\n \"terms\" : {\n \"creator\" : [ \"card\" ]\n }\n },\n sort: {\n title: {\n order: \"desc\"\n }\n }\n }';\n */\n $request = array();\n\n // Users can query by specifying an url param like &filter=title:ender\n // TODO: We should allow for multiple filters.\n $key_and_val = explode(\":\", $this->get('GET.filter'));\n if (count($key_and_val) == 2 and !empty($key_and_val[0]) and !empty($key_and_val[1])) {\n $request['query']['query_string']['fields'] = array($key_and_val[0]);\n $request['query']['query_string']['query'] = '*' . $key_and_val[1] . '*';\n $request['query']['query_string']['default_operator'] = 'AND';\n } else {\n $request['query'] = array(\"match_all\" => new stdClass);\n }\n //$request['query']['query_string']['query'] = 'American FactFinder';\n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $incoming_sort = $this->get('GET.sort');\n $sort_field_and_dir = explode(\" \", $this->get('GET.sort'));\n if (count($sort_field_and_dir) == 2) {\n $request['sort'] = array($sort_field_and_dir[0] => array('order' => $sort_field_and_dir[1]));\n }\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n\n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n // callback for jsonp requests\n $incoming_callback = $this->get('GET.callback');\n if (!empty($incoming_callback)) {\n $this->set('callback', $this->get('GET.callback'));\n }\n \n // We don't want dupes. Dedupe based on hollis_id\n //$deduped_docs = $this->dedupe_using_hollis_id($cleaned_results);\n \n // Hopefully we're deduping on intake\n $deduped_docs = $cleaned_results;\n \n $this->set('results', $deduped_docs);\n //$this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n }", "public function queryTaxonSearch(string $searchText, int $maxResponseAmount = 50, int $pageNumber = 1): Result\n {\n $findCommand = $this->fileMaker->newFindCommand($this->search_layout->getName());\n $findCommand->setLogicalOperator(operator: FileMaker::FIND_OR);\n\n # TODO move this to a database and UI to change options\n $taxonFields = match ($this->name) {\n \"avian\", \"herpetology\", \"mammal\" => array('Taxon::order', 'Taxon::family', 'Taxon::phylum', 'Taxon::genus', 'Taxon::class', 'Taxon::specificEpithet', 'Taxon::infraspecificEpithet'),\n \"entomology\" => array('Phylum', 'Class', 'Order', 'Family', 'Genus', 'Species', 'Subspecies'),\n \"algae\" => array('Phylum', 'Class', 'Genus', 'Species', 'Subspecies'),\n \"bryophytes\", \"fungi\", \"lichen\", \"vwsp\" => array('Family', 'Genus', 'Species', 'Subspecies'),\n \"fish\" => array('Class', 'Order', 'Family', 'Subfamily', 'nomenNoun', 'specificEpithet'),\n \"miw\" => array('Phylum', 'Class', 'Family', 'Genus', 'Species'),\n \"mi\" => array('Phylum', 'Class', 'Family', 'Genus', 'Specific epithet'),\n \"fossil\" => array('Phylum', 'Class', 'Family', 'Genus', 'Kingdom', 'Subphylum', 'Superclass', 'Subclass', 'Order', 'Suborder', 'Species', 'Common Name'),\n };\n\n $searchFieldNames = $this->search_layout->listFields();\n\n foreach ($taxonFields as $fieldName) {\n\n # check to make sure the field name is valid in the search layout\n # if a wrong field name is used a (Table not found) error is thrown by FMP\n if (in_array($fieldName, $searchFieldNames)) {\n $findCommand->addFindCriterion(\n fieldName: $fieldName, value: $searchText\n );\n }\n\n }\n\n $findCommand->setRange(skip: ($pageNumber - 1) * $maxResponseAmount, max: $maxResponseAmount);\n\n return $findCommand->execute();\n }", "public function search()\n\t{\n\t\tif(isset($_GET['term']))\n\t\t{\n\t\t\t$result = $this->Busca_Model->pesquisar($_GET['term']);\n\t\t\tif(count($result) > 0) {\n\t\t\tforeach ($result as $pr)$arr_result[] = $pr->nome;\n\t\t\t\techo json_encode($arr_result);\n\t\t\t}\n\t\t}\n\t}", "function get_customer_list_search($terms)\n {\n $this->company_db->select(\"c.*, CONCAT(c.tele_country_code, ' ', c.telephone_number) as telephone_number, CONCAT(c.cell_country_code , ' ', c.cellphone_number) as cellphone_number, CONCAT(c.fname, ' ', c.lname) as name\");\n $this->company_db->from('tbl_customer c');\n //$this->company_db->where('c.void', 'No');\n $column_search = array(\"c.address_line1\", \"CONCAT(c.tele_country_code, ' ', c.telephone_number)\", \"CONCAT(c.cell_country_code , ' ', c.cellphone_number)\", \"CONCAT(c.fname, ' ', c.lname)\");\n\n if(isset($terms) && !empty($terms)) // if datatable send POST for search\n {\n $i = 0;\n foreach ($column_search as $item) // loop column \n { \n if($i===0) // first loop\n {\n $this->company_db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n $this->company_db->like($item, $terms);\n }\n else\n {\n $this->company_db->or_like($item, $terms);\n }\n \n if(count($column_search) - 1 == $i) //last loop\n $this->company_db->group_end(); //close bracket\n \n $i++;\n }\n }\n\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "function listAllWithSearch($term) \r\n {\r\n\r\n $newTerm = \"%\".$term.\"%\";\r\n\r\n //new PDOAgent\r\n $p = new PDOAgent(\"mysql\", DB_USER, DB_PASS, DB_HOST, DB_NAME);\r\n\r\n //Connect to the Database\r\n $p->connect();\r\n\r\n //Setup the Bind Parameters\r\n $bindParams = [\"term\"=>$newTerm];\r\n \r\n //Get the results of the insert query (rows inserted)\r\n $results = $p->query(\"SELECT * FROM Coaches WHERE coachFName LIKE :term OR\r\n coachLName LIKE :term OR salary LIKE :term OR teamName LIKE :term \r\n OR dateStarted LIKE :term OR endOfContract LIKE :term;\", $bindParams);\r\n \r\n //Disconnect from the database\r\n $p->disconnect();\r\n \r\n //Return the objects\r\n return $results;\r\n }", "function search($term, $location, $price, $radius, $categories, $sort) {\n $url_params = array();\n \n $url_params['term'] = $term;\n $url_params['location'] = $location;\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n\t$url_params['open_now'] = true;\n $url_params['price'] = $price;\n $url_params['radius'] = $radius;\n $url_params['categories'] = $categories;\n $url_params['sort_by'] = $sort;\n \n return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\n}", "public function search($term = null);", "public static function getAllSdById($term){\n // ->join('clienttype as ct', function($join){\n // $join->on('c.ClientType', '=', 'ct.ClientTypeID');\n // })\n // ->join('acctstat as as', function($join){\n // $join->on('c.AccountStatus', '=', 'as.AcctStatID');\n // })\n // ->where('c.ClientID', '=', $clientIdSd)\n // ->get();\n\n return DB::table('client as c')\n ->join('clienttype as ct', function($join) {\n $join->on('c.ClientType', '=', 'ct.ClientTypeID');\n })\n ->join('acctstat as acs', function($join){\n $join->on('c.AccountStatus', '=', 'acs.AcctStatID');\n })\n ->where('c.ClientID', '=', $term)\n ->orWhere('c.FName', 'like', '%'.$term.'%')\n ->orWhere('c.LName', 'like', '%'.$term.'%')\n // ->where('c.AccountStatus', '=', $status)\n // ->orWhere('c.AccountStatus', '=', $status)\n // ->orWhere('c.AccountStatus', '=', $status)\n ->paginate(10);\n }", "function customer_search() {\n $suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('term'), 100);\n echo json_encode($suggestions);\n }", "public function getAccountsBasedOnSearchTerm(Request $request)\n {\n $searchTerm = $request -> searchTerm;\n $options;\n if(!isset($request -> searchTerm))\n $options = ChartOfAccount::get();\n else\n {\n $options = ChartOfAccount :: where('description','like','%'.$searchTerm.'%')\n ->Orwhere('general_code','like','%'.$searchTerm.'%')\n ->Orwhere('name','like','%'.$searchTerm.'%')\n ->Orwhere('company_code','like','%'.$searchTerm.'%')\n ->get();\n }\n $data = array();\n foreach($options as $option)\n {\n $data[] = array('id' => $option -> id,'text' => $option -> name.'('.$option -> general_code.')');\n }\n return json_encode($data);\n }", "public function searchAction() {\n\t\n\t if($this->getRequest()->isXmlHttpRequest()){\n\t\n\t $term = $this->getParam('term');\n\t $id = $this->getParam('id');\n\t\n\t if(!empty($term)){\n\t $term = \"%$term%\";\n\t $records = Invoices::findbyCustomFields(\"formatted_number LIKE ? OR number LIKE ?\", array($term, $term));\n\t die(json_encode($records));\n\t }\n\t\n\t if(!empty($id)){\n\t $records = Invoices::find($id);\n\t if($records){\n\t $records = $records->toArray();\n\t }\n\t die(json_encode(array($records)));\n\t }\n\t\n\t $records = Invoices::getAll();\n\t die(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}", "public function getListOfCustomers($term)\n {\n // build find() options\n $filter = NULL;\n if ($term) {\n $regex = new Regex($term, 'i');\n $filter = ['name' => $regex];\n }\n $options = [\n 'sort' => ['name' => 1],\n 'projection' => ['name' => 1]\n ];\n\n // perform find\n $result = [];\n try {\n $cursor = $this->find($this->customers, $filter, $options);\n foreach ($cursor as $document) {\n //$result[] = var_export($document, TRUE);\n $result[$document->name] = $document->name;\n }\n } catch (Throwable $e) {\n error_log(__METHOD__ . ':' . $e->getMessage());\n $result[] = 'ERROR: unable to find customers';\n }\n return $result;\n }", "public function actionCustomerSearch()\t\r\n {// for autocomplete will do DB search for Customers and Lands\r\n\t\t\r\n\t\tif (isset($_GET['term'])) { // first search that \r\n // if user arabic name \r\n // or english name \r\n // or miobile number match\r\n \r\n \r\n $keyword = $_GET[\"term\"];\r\n\r\n $searchCriteria=new CDbCriteria;\r\n // the new library \r\n if (isset($_GET['term'])) \r\n if ($keyword != '') {\r\n $keyword = @$keyword;\r\n $keyword = str_replace('\\\"', '\"', $keyword);\r\n\r\n $obj = new ArQuery();\r\n $obj->setStrFields('CustomerNameArabic');\r\n $obj->setMode(1);\r\n\r\n $strCondition = $obj->getWhereCondition($keyword);\r\n } \r\n\r\n\r\n//\t\t\t$qtxt = 'SELECT CustomerID, Nationality, CustomerNameArabic from CustomerMaster WHERE ('.$strCondition.' OR CustomerNameEnglish LIKE :name OR MobilePhone Like :name) limit 25';\r\n//\t\t\t$command = Yii::app()->db->createCommand($qtxt);\r\n//\t\t\t$command->bindValue(':name','%'.$_GET['term'].'%',PDO::PARAM_STR);\r\n//\t\t\t$res = $command->queryAll();\r\n// if( count($res)<1){//run if no customer found \r\n //search DB if Land ID matches\r\n\r\n $qtxt = 'SELECT LandID lnd from LandMaster WHERE LandID Like :name';\r\n $command = Yii::app()->db->createCommand($qtxt);\r\n $command->bindValue(':name','%'.$_GET['term'].'%',PDO::PARAM_STR);\r\n $res = $command->queryColumn();\r\n\r\n// }\r\n\t\t}\r\n\t\tprint CJSON::encode($res);\r\n \r\n // die ($strCondition);\r\n\t}", "function getCustomers() {\n $filter = $_POST['filter']; // User's selected filter (default \"Amount Owed\")\n $search = $_POST['clientSearch']; // User's entered search term\n\n if ($search === \"\") {\n $stmt = $GLOBALS['con']->prepare(\"SELECT * FROM customerInfo ORDER BY $filter\");\n // $stmt->bind_param(\"s\", $filter);\n } else {\n $stmt = $GLOBALS['con']->prepare(\"SELECT * FROM customerInfo WHERE first_name LIKE ? OR last_name LIKE ? ORDER BY $filter\");\n $stmt->bind_param(\"ss\", $search, $search);\n }\n\n // $result = mysqli_query($GLOBALS[\"con\"], $sql);\n $stmt->execute();\n $result = $stmt->get_result();\n \n if (mysqli_num_rows($result) > 0) {\n return $result;\n }\n }", "public function get_trainees_by_taxcode_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n $this->load->model('trainee_model', 'traineemodel');\n $result = $this->traineemodel->trainee_user_list_autocomplete($query_string);\n print json_encode($result);\n exit;\n }", "function customer_search()\n {\n $suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('term'),100);\n echo json_encode($suggestions);\n }", "function get_term_by($field, $value, $taxonomy = '', $output = \\OBJECT, $filter = 'raw')\n {\n }", "public static function getPersons($term) {\n $sql = \"SELECT \n usuarios.dni, usuarios.nombre_persona, usuarios.dni+' '+usuarios.nombre_persona as label\n FROM\n (select \n persona.CodPer as dni\n ,persona.Nombres\n ,persona.Ape1\n ,persona.Ape2\n ,(RTRIM(persona.Nombres)+' '+RTRIM(persona.Ape1)+' '+RTRIM(persona.Ape2)) as nombre_persona\n from dbo.Identis persona\n left join dbo.permis usuario ON(\n persona.CodPer = usuario.LogIn\n )\n where usuario.FHasta >= GETDATE()\n ) usuarios\n WHERE usuarios.nombre_persona+usuarios.dni LIKE '%{$term}%'\n group BY usuarios.dni, usuarios.nombre_persona \";\n\n $command = Yii::$app->chacad->createCommand($sql);\n return $command->queryAll();\n }", "public function scopeSearch($query, $term);", "function nameSearch($conn, $search_term)\n {\n $query = \"SELECT DISTINCT whwp_Advert.advert_id FROM whwp_Advert \"\n . \"WHERE advert_bookname = :search_term \"\n . \"ORDER BY whwp_Advert.advert_price DESC\";\n $conn->prepQuery($query);\n $conn->bind('search_term', $search_term);\n $advert = $conn->resultset();\n return $advert;\n }", "private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }", "public function filtrarclientes(){\n\n $this->request->allowMethod(['get']);\n \n $keyword = $this->request->query('keyword');\n $activo = $this->request->query('activo');\n\n $condiciones = array();\n\n $condiciones['name like '] = '%'.$keyword.'%';\n\n if($activo){\n $condiciones['borrado = '] = false;\n }\n \n $query = $this->Clientes->find('all', [\n 'conditions' => $condiciones,\n 'order' => [\n 'Clientes.id' => 'ASC'\n ],\n 'limit' => 100\n ]);\n\n $clientes = $this->paginate($query);\n $this->set(compact('clientes'));\n $this->set('_serialize', 'clientes');\n }", "public function search();", "public function search();", "public function search($search_term = \"\"){\r\n\t\tif($search_term != \"\"){\r\n\t\t\t$req = $this->config->getDomain() . \"Search\";\r\n\t\t\t$req .= \"?search_term=\" . $search_term;\r\n\t\t\t$req .= \"&dataType=\" . $this->config->getDataType();\r\n\t\t\t$resp = $this->helper->curlGet($req);\r\n\t\t\t$resultsArray = array();\r\n\t\t\tforeach (json_decode($resp) as $obj){\r\n\t\t\t\t$searchResult = new CurtSearchResult;\r\n\t\t\t\t$sR = $searchResult->castToSearchResult($obj);\r\n\t\t\t\tarray_push($resultsArray, $sR);\r\n\t\t\t}\r\n\t\t\treturn $resultsArray;\r\n\t\t} // end if\r\n\t}", "public function get_alltaxcode() {\n \n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $result = $this->classtraineemodel->get_alluser($this->tenant_id, '', $query_string);\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->tax_code . ' (Name: ' . $row->first_name . ' ' . $row->last_name . ')',\n 'value' => $row->tax_code\n );\n }\n }\n echo json_encode($matches);\n exit();\n }", "public function search($city);", "function ciniki_wineproduction_searchProductNames($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'start_needle'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search'), \n 'limit'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Limit'), \n 'customer_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Customer'), \n 'category_id'=>array('required'=>'no', 'default'=>'0', 'blank'=>'yes', 'name'=>'Category'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'wineproduction', 'private', 'checkAccess');\n $rc = ciniki_wineproduction_checkAccess($ciniki, $args['tnid'], 'ciniki.wineproduction.searchProductNames'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // If a customer is specified, search through past orders to find preferences for customer\n //\n if( $args['start_needle'] == '' && isset($args['customer_id']) && $args['customer_id'] > 0 ) {\n $strsql = \"SELECT ciniki_wineproduction_products.id, \"\n . \"ciniki_wineproduction_products.name AS wine_name, \"\n . \"ciniki_wineproductions.wine_type, \"\n . \"ciniki_wineproductions.kit_length, \"\n . \"order_flags \"\n . \"FROM ciniki_wineproductions, ciniki_wineproduction_products \"\n . \"WHERE ciniki_wineproductions.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_wineproductions.customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND ciniki_wineproductions.product_id = ciniki_wineproduction_products.id \"\n . \"AND ciniki_wineproduction_products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_wineproduction_products.status = 10 \";\n } \n\n //\n // If no customer specified, but a search string is, then search through products for \n // matching names\n //\n else if( $args['start_needle'] != '' ) {\n $strsql = \"SELECT ciniki_wineproduction_products.id, ciniki_wineproduction_products.name AS wine_name, \"\n . \"ciniki_wineproduction_products.wine_type, \"\n . \"ciniki_wineproduction_products.kit_length, \"\n . \"0 AS order_flags \"\n . \"FROM ciniki_wineproduction_products \"\n . \"WHERE ciniki_wineproduction_products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (ciniki_wineproduction_products.name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \" \n . \"OR ciniki_wineproduction_products.name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \" \n . \") \"\n . \"AND ciniki_wineproduction_products.status = 10 \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.19', 'msg'=>'No search specified'));\n }\n\n $strsql .= \"GROUP BY ciniki_wineproduction_products.id \"\n . \"ORDER BY ciniki_wineproduction_products.name \"\n// . \"ORDER BY COUNT(ciniki_wineproductions.id) DESC \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \"; // is_numeric verified\n } else {\n $strsql .= \"LIMIT 25\";\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbRspQuery');\n return ciniki_core_dbRspQuery($ciniki, $strsql, 'ciniki.wineproduction', 'names', 'name', array('stat'=>'ok', 'names'=>array()));\n}", "public function actionDonorAutoComplete($term)\n {\n header('Content-type: application/json');\n\n $criteria = new CDbCriteria();\n $criteria->compare('name', $term, true);\n $criteria->limit = 5;\n\n $data = Donor::model()->findAll($criteria);\n\n $result = array();\n foreach ($data as $m) {\n $result[] = array(\n 'value' => $m->name,\n 'label' => $m->name . ' (' . Lookup::item('DonorshipSource', $m->source) . ')',\n );\n }\n\n echo CJSON::encode($result);\n Yii::app()->end();\n }", "public function getServiceByName() {\n $term = Request::input('term', '');\n\n $results = array();\n $queries = Service::where('name', 'LIKE', '%'.$term.'%')\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->name];\n return response()->json($results);\n }", "function query_api($term, $location) {\r\n $response = json_decode(search($term, $location));\r\n $business_id = $response->businesses[0]->id;\r\n /* \r\n print sprintf(\r\n \"%d local businesses found, querying business info for the top result \\\"%s\\\"\\n\\n <br>\",\r\n count($response->businesses),\r\n $business_id\r\n );\r\n */ \r\n $response = get_business($business_id);\r\n \r\n print sprintf(\"Result for business \\\"%s\\\" found:\\n\", $business_id);\r\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\r\n print \"$pretty_response\\n\";\r\n\r\n return json_decode($response, true);\r\n }", "public function searchByName($query);", "function getSearchTerms(ProductInterface $product);", "public function simple_ontology_search_get($type=\"all\",$field=\"Name\",$search_value)\n {\n $sutil = new CILServiceUtil();\n \n $data = file_get_contents('php://input', 'r');\n $url = $this->config->item('esOntologyPrefix').\"/\".$type.\"/_search\";\n $search_value = str_replace(\"%20\", \" \", $search_value);\n $main = array();\n $termOuter = array();\n $term = array();\n $term[$field] = $search_value;\n $termOuter['term'] = $term;\n $main['query'] = $termOuter;\n $json_str = json_encode($main);\n $json1 = json_decode($json_str);\n \n $response = $sutil->curl_post($url,$json_str);\n $json = json_decode($response);\n \n $this->response($json);\n }", "public function search(){\n if(isset($_POST['text_search'])){\n $title = trim($this->input->post('text_search') , ' ');\n $data = $this->base_model->search_data('deal' , 'customer' , 'deal.* , customer.fullname , unit.name' ,'deal.customer_id = customer.id' , 'left' , array('customer.fullname'=>$title) , NULL , array('deal.id' , 'DESC') , NULL , array('unit','deal.money_id = unit.id'));\n echo json_encode($data);\n }else{\n show_404();\n }\n }", "function get_item_list_search($terms)\n {\n $this->company_db->select(\"i.*\");\n $this->company_db->from('tbl_inventory i');\n //$this->company_db->where('i.void', 'No');\n $column_search = array(\"CONVERT(i.description USING utf8)\", \"i.item_number\");\n\n if(isset($terms) && !empty($terms)) // if datatable send POST for search\n {\n $i = 0;\n foreach ($column_search as $item) // loop column \n { \n if($i===0) // first loop\n {\n $this->company_db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n $this->company_db->like($item, $terms);\n }\n else\n {\n $this->company_db->or_like($item, $terms);\n }\n \n if(count($column_search) - 1 == $i) //last loop\n $this->company_db->group_end(); //close bracket\n \n $i++;\n }\n }\n\n $query = $this->company_db->get();\n \n if($query->num_rows() >= 1)\n {\n foreach ($query->result() as $key => $value) {\n $value->description = strtolower($value->description);\n }\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function searchTenants($request)\n {\n return $this->start()->uri(\"/api/tenant/search\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "function item_search()\n {\n session_write_close();\n $suggestions = $this->Item->get_item_search_suggestions($this->input->get('term'), 'unit_price', 100);\n echo json_encode($suggestions);\n }", "public function search($para1){ \n\t\t$this->layout = false;\t\t\n\t\t$approve_cond = $para1 == 'pending' ? array('is_approve' => 'W','Client.status' => '2') : array('is_approve' => 'A','Client.status' => '0');\n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\t\t\t\n\t\t\t$this->Client->unBindModel(array('belongsTo' => array('Creator')));\n\t\t\t$data = $this->Client->find('all', array('fields' => array('Client.client_name','ContactBranch.branch'),\n\t\t\t'group' => array('Client.client_name','ContactBranch.branch'), 'conditions' => \tarray(\"OR\" => array ('Client.client_name like' => '%'.$q.'%',\n\t\t\t'ContactBranch.branch like' => '%'.$q.'%'), 'AND' => array('Client.is_deleted' => 'N', $approve_cond))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "public function getAll($searchTerm);", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->with = array(\n\t\t\t'taxista.idTaxista',\n\t\t\t'cliente',\n\t\t);\n\t\t$criteria->compare('id_solicitud',$this->id_solicitud);\n\t\t$criteria->compare('latitud_solicitud',$this->latitud_solicitud,true);\n\t\t$criteria->compare('longitud_solicitud',$this->longitud_solicitud,true);\n\t\t$criteria->compare('estado_solicitud',$this->estado_solicitud,true);\n\t\t$criteria->compare('hora_fecha_solicitud',$this->hora_fecha_solicitud,true);\n\t\t$criteria->compare('costo_solcitud',$this->costo_solcitud);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>false,\n\t\t));\n\t}", "function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}", "function search() {}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "function search_vizitki()\n{\n\tglobal $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;\n\n\t// CONSTRUCT QUERY\n $sql = \"\n SELECT\n se_vizitkientries.vizitkientry_id,\n se_vizitkientries.vizitkientry_title,\n se_vizitkientries.vizitkientry_body,\n se_users.user_id,\n se_users.user_username,\n se_users.user_photo,\n se_users.user_fname,\n se_users.user_lname\n FROM\n se_vizitkientries,\n se_users,\n se_levels\n WHERE\n se_vizitkientries.vizitkientry_user_id=se_users.user_id &&\n se_users.user_level_id=se_levels.level_id &&\n (\n se_vizitkientries.vizitkientry_search='1' ||\n se_levels.level_vizitki_search='0'\n ) \n \";\n \n $sql .= \" && MATCH (`vizitkientry_title`, `vizitkientry_body`) AGAINST ('{$search_text}' IN BOOLEAN MODE)\";\n \n /*\n $sql .= \" && (\n vizitkientry_title LIKE '%$search_text%' ||\n vizitkientry_body LIKE '%$search_text%'\n )\n \";\n */\n \n\t// GET TOTAL ENTRIES\n $sql2 = $sql . \" LIMIT 201\";\n $resource = $database->database_query($sql2);\n\t$total_entries = $database->database_num_rows($resource);\n \n\t// IF NOT TOTAL ONLY\n\tif( $t==\"vizitki\" )\n {\n\t // MAKE vizitki PAGES\n\t $start = ($p - 1) * $results_per_page;\n\t $limit = $results_per_page+1;\n \n\t // SEARCH vizitkiS\n $sql3 = $sql . \" ORDER BY vizitkientry_id DESC LIMIT {$start}, {$limit}\";\n $resource = $database->database_query($sql3);\n \n\t while( $vizitkientry_info=$database->database_fetch_assoc($resource) )\n {\n\t // CREATE AN OBJECT FOR AUTHOR\n\t $profile = new se_user();\n\t $profile->user_info['user_id'] = $vizitkientry_info['user_id'];\n\t $profile->user_info['user_username'] = $vizitkientry_info['user_username'];\n\t $profile->user_info['user_photo'] = $vizitkientry_info['user_photo'];\n\t $profile->user_info['user_fname'] = $vizitkientry_info['user_fname'];\n\t $profile->user_info['user_lname'] = $vizitkientry_info['user_lname'];\n\t $profile->user_displayname();\n \n\t // IF EMPTY TITLE\n\t if( !trim($vizitkientry_info['vizitkientry_title']) )\n $vizitkientry_info['vizitkientry_title'] = SE_Language::get(589);\n \n $vizitkientry_info['vizitkientry_body'] = cleanHTML($vizitkientry_info['vizitkientry_body'], '');\n \n\t // IF BODY IS LONG\n\t if( strlen($vizitkientry_info['vizitkientry_body'])>150 )\n $vizitkientry_info['vizitkientry_body'] = substr($vizitkientry_info['vizitkientry_body'], 0, 147).\"...\";\n \n $result_url = $url->url_create('vizitki_entry', $vizitkientry_info['user_username'], $vizitkientry_info['vizitkientry_id']);\n $result_name = 1500118;\n $result_desc = 1500119;\n \n\t $results[] = array(\n 'result_url' => $result_url,\n\t\t\t\t'result_icon' => './images/icons/vizitki_vizitki48.gif',\n\t\t\t\t'result_name' => $result_name,\n\t\t\t\t'result_name_1' => $vizitkientry_info['vizitkientry_title'],\n\t\t\t\t'result_desc' => $result_desc,\n\t\t\t\t'result_desc_1' => $url->url_create('profile', $vizitkientry_info['user_username']),\n\t\t\t\t'result_desc_2' => $profile->user_displayname,\n\t\t\t\t'result_desc_3' => $vizitkientry_info['vizitkientry_body']\n );\n\t }\n \n\t // SET TOTAL RESULTS\n\t $total_results = $total_entries;\n\t}\n\n\t// SET ARRAY VALUES\n\tSE_Language::_preload_multi(1500118, 1500119, 1500120);\n\tif( $total_albums>200 )\n $total_albums = \"200+\";\n \n\t$search_objects[] = array(\n 'search_type' => 'vizitki',\n 'search_lang' => 1500120,\n 'search_total' => $total_entries\n );\n}", "public function search($request) {\n $query = Convert::raw2sql($request->getVar('q'));\n $limit = $this->config()->search_limit;\n $addresses = NZStreetAddress::get()->filter('FullAddress:StartsWith', $query)\n ->limit($limit);\n $output = [];\n foreach($addresses as $address) {\n $output[] = [\n 'AddressID' => $address->AddressID,\n 'FullAddress' => $address->FullAddress,\n 'AddressLine1' => sprintf(\"%s %s\",\n $address->FullAddressNumber,\n $address->FullRoadName\n ),\n 'Suburb' => $address->SuburbLocality,\n 'City' => $address->TownCity\n ];\n }\n\n return json_encode($output);\n }", "public function autocomplete(Request $request)\n {\n if ($request->has('q') && strlen($request->get('q'))) {\n $terms = Term::byVocabulary($request->vocabulary)\n ->select('name', 'id')->where('name', 'LIKE', \"%$request->q%\")->get();\n\n $result = $terms->map(function ($item) {\n return [\n 'text' => $item->name, // 'label' => $item->name,\n 'id' => $item->id, // 'value' => $item->id,\n ];\n })->toArray();\n\n return ['results' => $result];\n }\n\n return ['results' => []];\n }", "public function search_cif_by_account_deposit()\n\t{\n\t\t$keyword = $this->input->post('keyword');\n\t\t$data = $this->model_transaction->search_cif_by_account_deposit($keyword);\n\n\t\techo json_encode($data);\n\t}", "public function test_search_item_result_with_keyword(){\n $this->browse(function (Browser $browser) {\n $browser->visit('/item-search')\n ->assertPathIs('/item-search')\n ->select('type', 1)\n ->value('#keyword', 'truck')\n ->value('#minprice', '10000')\n ->value('#maxprice', '20000')\n ->click('button[type=\"submit\"]')\n ->assertPathIs('/item-search-result')\n ->assertSee(\"Details\");\n });\n }", "public function search(){}", "public function findPublicCalendarsByTerm($term, UserInterface $user)\r\n {\r\n $qb = $this->repository->createQueryBuilder('c');\r\n $qb->select('c.id, c.name, u.username');\r\n $qb->join('c.createdBy', 'u');\r\n $qb->where('c.name LIKE :term');\r\n $qb->orWhere('c.description LIKE :term');\r\n $qb->orWhere('u.username LIKE :term');\r\n $qb->andWhere('c.visible = :visible');\r\n $qb->andwhere('c.createdBy != :user');\r\n $qb->setMaxResults($this->autocompleteMaxResults);\r\n $qb->orderBy('c.name', 'ASC');\r\n $qb->setParameter('term', '%' . $term . '%');\r\n $qb->setParameter('visible', true);\r\n $qb->setParameter('user', $user);\r\n\r\n return $qb->getQuery()->getScalarResult();\r\n }", "function buildTaxonQuery($params) {\n $url = \"https://laji.fi/api/taxa?langFallback=false&selectedFields=vernacularName,id,scientificName,synonyms.scientificName&lang=fi&pageSize=\" . $params['pageSize'] . \"&page=\" . $params['page'];\n debugData($url, __LINE__);\n return $url;\n}", "function search($institution, $queryType, $queryTerm, $start=0, $limit=10)\n\t{\n\t\t\n\t\tif (strcasecmp($institution,'CASENT') == 0) { $institution = 'CASENT'; }\n\t\tif (strcasecmp($institution,'inbiocri') == 0) { $institution = 'CASENT'; }\n\t\tif (strcasecmp($institution,'lacment') == 0) { $institution = 'CASENT'; }\t\n\t\tif (strcasecmp($institution,'jtlc') == 0) { $institution = 'CASENT'; }\t\n\t\t\n\t\t\n\t\t$server = $this->serverURL[$institution];\n\t\t$resource = $this->resourceCode[$institution] ;\n\n\t\t// Build request message\n\t\t$tree = new XML_Tree();\n\n\t\t$root = & $tree->addRoot(\n\t\t\t\"request\",\n\t\t\t'',\n\t\t\tarray(\n\t\t\t\t\t\"xmlns\" => 'http://digir.net/schema/protocol/2003/1.0',\n\t\t\t\t\t\"xmlns:xsd\" => 'http://www.w3.org/2001/XMLSchema',\n\t\t\t\t\t\"xmlns:xsi\" => 'http://www.w3.org/2001/XMLSchema-instance',\n\t\t\t\t\t\"xmlns:digir\" => 'http://digir.net/schema/protocol/2003/1.0',\n\t\t\t\t\t\"xmlns:dwc\" => 'http://digir.net/schema/conceptual/darwin/2003/1.0',\n\t\t\t\t\t\"xmlns:darwin\" => 'http://digir.net/schema/conceptual/darwin/2003/1.0',\n\t\t\t\t\t\"xsi:schemaLocation\" => 'http://digir.net/schema/protocol/2003/1.0',\n\t\t\t\t\t\"xsi:schemaLocation\" => 'http://digir.net/schema/protocol/2003/1.0 http://digir.sourceforge.net/schema/protocol/2003/1.0/digir.xsd http://digir.net/schema/conceptual/darwin/2003/1.0 http://digir.sourceforge.net/schema/conceptual/darwin/2003/1.0/darwin2.xsd',\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t$header = & $root->addChild(\"header\");\n\t\t$header->addChild(\"version\", \"1.0.0\");\n\t\t$header->addChild(\"sendTime\", date(\"Ymd \\TG:i:s\") ); \n\t\t$header->addChild(\"source\", $_SERVER['SERVER_ADDR']); \n\t\t$header->addChild(\"destination\", \n\t\t\t$server,\n\t\t\tarray(\n\t\t\t\t\"resource\" => $resource\n\t\t\t\t)\n\t\t\t); \n\t\t$header->addChild(\"type\", \"search\");\n\n\t\t$search = & $root->addChild(\"search\");\n\t\t$filter = & $search->addChild(\"filter\");\n\t\t$equals = & $filter->addChild(\"equals\");\n\t\t\n\t\tswitch($queryType)\n\t\t{\n\t\t\tcase 'genus':\n\t\t\t\t$equals->addChild(\"darwin:Genus\", $queryTerm);\n\t\t\t\tbreak;\n\t\t\tcase 'family':\n\t\t\t\t$equals->addChild(\"darwin:Family\", $queryTerm);\n\t\t\t\tbreak;\n\t\t\tcase 'class':\n\t\t\t\t$equals->addChild(\"darwin:Class\", $queryTerm);\n\t\t\t\tbreak;\n\t\t\tcase 'country':\n\t\t\t\t$equals->addChild(\"darwin:Country\", $queryTerm);\n\t\t\t\tbreak;\n\t\t\tcase 'specimen':\n\t\t\t\tswitch ($this->schema[$institution])\n\t\t\t\t{\n\t\t\t\t\tcase \"1.14\":\n\t\t\t\t\t\t$equals->addChild(\"darwin:CatalogNumber\", $queryTerm);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$equals->addChild(\"darwin:CatalogNumberText\", $queryTerm);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\n\t\t$records = & $search->addChild(\"records\",\n\t\t\t\"\",\n\t\t\tarray(\n\t\t\t\t\"limit\" => $limit,\n\t\t\t\t\"start\" => $start\n\t\t\t\t)\n\t\t\t);\n\t\t\t\tif ($this->schema[$institution] == '1.12')\n\t\t\t\t{\n\t\t\t\t$records->addChild(\"structure\",\n\t\t\t\t\t\"\",\n\t\t\t\t\tarray(\n\t//\t\t\t\t\t\"schemaLocation\" => \"http://bnhm.berkeley.museum/manis/DwC/darwin2resultfull.xsd\",\n\n\t\t\t\t\t\t\"schemaLocation\" => \"http://digir.sourceforge.net/schema/conceptual/darwin/result/full/2003/darwin2resultfull.xsd\",\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\t$structure = & $records->addChild(\"structure\", \"\");\n\n\t\t\t\t\t$element = & $structure->addChild(\"xsd:element\", \"\", \n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"name\" => \"record\"\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t$complexType = & $element->addChild(\"xsd:complexType\", \"\");\n\t\t\t\t\t$sequence = & $complexType->addChild(\"xsd:sequence\", \"\");\n\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:InstitutionCode\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:CollectionCode\"\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:CatalogNumber\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:ScientificName\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:VerbatimCollectingDate\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:DateLastModified\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:YearCollected\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:MonthCollected\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:DayCollected\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:TimeCollected\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Kingdom\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Phylum\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Class\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Order\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Family\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Genus\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Species\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Subspecies\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Country\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:StateProvince\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:County\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Island\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:IslandGroup\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:ContinentOcean\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Locality\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:HorizontalDatum\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Collector\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Remarks\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:TypeStatus\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:OtherCatalogNumbers\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:CollectorNumber\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:FieldNumber\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:GenBankNum\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Latitude\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Longitude\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Sex\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:Notes\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:IdentifiedBy\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:YearIdentified\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:MonthIdentified\"\n\t\t\t\t\t\t\t));\n\t\t\t\t\t$sequence->addChild(\"xsd:element\", \"\",\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"ref\" => \"darwin:DayIdentified\"\n\t\t\t\t\t\t\t));\n\n\n\n\n\t\t\t\t}\n\t\t$xml = \t$tree->get();\n\n\t\t//echo $xml;\n\n\t\t// Strip XML header\n\t\t$xml = str_replace (\n\t\t\t'<?xml version=\"1.0\"?>', \n\t\t\t'', \n\t\t\t$xml);\n\n\t\t// Remove line breaks\n\t\t$xml = str_replace (\n\t\t\t\"\\n\", \n\t\t\t'', \n\t\t\t$xml);\n\n\t\t// Replace spaces with HEX code\n\t\t$xml = str_replace (\n\t\t\t\" \", \n\t\t\t'%20', \n\t\t\t$xml);\n\n\t\t\t//echo $xml;\n\n\t\t\t$url = \"http://$server?doc=\";\n\t\t\t$url .= $xml;\n\n\t\t//echo $url;\n\n\t\treturn $url;\n\n\n\n\t\t\n\t}", "function filter($request) {\n\t\t//$model = singleton($this->modelClass);\n\t\t$context = $this->dataObject->getDefaultSearchContext();\n\t\t$value = $request->getVar('q');\n\t\t$results = $context->getResults(array(\"Name\"=>$value));\n\t\theader(\"Content-Type: text/plain\");\n\t\tforeach($results as $result) {\n\t\t\techo $result->Name . \"\\n\";\n\t\t}\t\t\n\t}", "function ciniki_petadoptions_animalFieldSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'field'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Field'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search String'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'petadoptions', 'private', 'checkAccess');\n $rc = ciniki_petadoptions_checkAccess($ciniki, $args['tnid'], 'ciniki.petadoptions.animalFieldSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of field values\n //\n if( in_array($args['field'], array('category', 'breed', 'sex', 'years', 'color', 'size')) ) {\n $strsql = \"SELECT DISTINCT \" . $args['field'] . \" AS name \"\n . \"FROM ciniki_petadoption_animals \"\n . \"WHERE ciniki_petadoption_animals.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND \" . $args['field'] . \" <> '' \"\n . \"ORDER BY name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.petadoptions', array(\n array('container'=>'results', 'fname'=>'name', 'fields'=>array('name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['results']) ) {\n return array('stat'=>'ok', 'results'=>array());\n } \n\n return array('stat'=>'ok', 'results'=>$rc['results']);\n }\n\n return array('stat'=>'ok', 'results'=>array());\n}", "public function getSearch();", "public function search() {\n // should not be searched.\n \n $nombre = \"\";\n $apellido = \"\";\n $nombres = explode(\" \",$this->cliente_nombre);\n if(count($nombres) == 1){\n $nombre = $this->cliente_nombre;\n $apellido = $this->cliente_nombre;\n }\n elseif(count($nombres) == 2){\n $nombre = $nombres[0];\n $apellido = $nombres[1];\n }\n \n $criteria = new CDbCriteria;\n $criteria->with = array('departamento', 'tipoContrato', 'cliente');\n $criteria->join .= 'join departamento as d on d.id = t.departamento_id '\n . ' join propiedad as p on p.id = d.propiedad_id'\n . ' join tipo_contrato as tipo on tipo.id = t.tipo_contrato_id '\n . ' join cliente as c on c.id = t.cliente_id '\n . ' join usuario as u on u.id = c.usuario_id ';\n \n $arreglo = explode(\" \",$this->cliente_nombre);\n $nombreApellido = array();\n foreach($arreglo as $palabra){\n if(trim($palabra)!= ''){\n $nombreApellido[]=$palabra;\n }\n }\n $criteriaNombreUser1 = new CDbCriteria();\n $palabras = count($nombreApellido);\n if($palabras == 1){\n $busqueda = $nombreApellido[0];\n if(trim($busqueda) != ''){\n $criteriaNombreUser1->compare('u.nombre',$busqueda,true);\n $criteriaNombreUser1->compare('u.apellido',$busqueda,true,'OR');\n }\n }\n\n if($palabras == 2){\n $nombre = $nombreApellido[0];\n $apellido = $nombreApellido[1];\n $criteriaNombreUser1->compare('u.nombre',$nombre,true);\n $criteriaNombreUser1->compare('u.apellido',$apellido,true);\n }\n\n $criteria->compare('folio', $this->folio);\n $criteria->mergeWith($criteriaNombreUser1,'AND');\n \n $criteria->compare('fecha_inicio', Tools::fixFecha($this->fecha_inicio), true);\n $criteria->compare('p.nombre', $this->propiedad_nombre, true);\n $criteria->compare('d.numero', $this->depto_nombre, true);\n $criteria->compare('c.rut', $this->cliente_rut, true);\n $criteria->compare('t.vigente', 1);\n \n if(Yii::app()->user->rol == 'cliente'){\n $cliente = Cliente::model()->findByAttributes(array('usuario_id'=>Yii::app()->user->id));\n if($cliente!=null){\n $criteria->compare('t.cliente_id',$cliente->id);\n }\n else{\n $criteria->compare('t.cliente_id',-1);\n }\n }\n \n if(Yii::app()->user->rol == 'propietario'){\n $criteriaPropietario = new CDbCriteria();\n $contratos = Contrato::model()->relacionadosConPropietario(Yii::app()->user->id);\n foreach($contratos as $contrato_id){\n $criteriaPropietario->compare('t.id', $contrato_id, false,'OR'); \n }\n $criteria->mergeWith($criteriaPropietario,'AND');\n }\n \n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'attributes' => array(\n 'depto_nombre' => array(\n 'asc' => 'd.numero',\n 'desc' => 'd.numero DESC',\n ),\n 'tipo_nombre' => array(\n 'asc' => 'tipo.nombre',\n 'desc' => 'tipo.nombre DESC',\n ),\n 'cliente_rut' => array(\n 'asc' => 'c.rut',\n 'desc' => 'c.rut DESC',\n ),\n 'cliente_nombre' => array(\n 'asc' => 'u.apellido,u.nombre',\n 'desc' => 'u.apellido DESC,u.nombre DESC',\n ),\n 'propiedad_nombre' => array(\n 'asc' => 'p.nombre',\n 'desc' => 'p.nombre DESC',\n ),\n '*',\n ),\n ),\n ));\n }", "function SearchFood($name)\n{\n $postData = array(\n 'query' => $name,\n \n );\n\n // Setup cURL\n $ch = curl_init('https://trackapi.nutritionix.com/v2/natural/nutrients');\n curl_setopt_array($ch, array(\n CURLOPT_POST => TRUE,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_HTTPHEADER => array(\n 'Content-Type:application/json',\n 'x-app-Id: 3f0a4b18',\n 'x-app-Key:7795b68adeba3faf9a870e02a444cb59'\n ),\n CURLOPT_POSTFIELDS => json_encode($postData)\n ));\n\n // Send the request\n $response = curl_exec($ch);\n\n // Check for errors\n if($response === FALSE){\n die(curl_error($ch));\n }\n\n // Decode the response\n //$responseData = json_decode($response, TRUE);\n\n // Print the date from the response\n return $response;\n}", "public function search()\n {\n $data = [];\n if ($this->request->is('ajax')) {\n $term = $this->request->getQuery('term');\n $this->loadModel('Airobjects');\n $data = $this->Airobjects\n ->find('all')\n ->where(\n [\n 'OR' => [ \n \"code LIKE\" => $term . '%', \n \"city_name LIKE\" => $term . '%', \n \"airport_name LIKE\" => $term . '%', \n ],\n 'AND' => [\n \"code <> \\\"\\\"\" \n ]\n ]\n )\n ->limit(10)\n ->order('code')\n ->toArray(); \n }\n\n $this->set(compact('data'));\n $this->set('_serialize', 'data');\n }", "public static function searchClients($uid, $lastName, $firstName, $address, $phone, $email, $custom) {\n global $login;\n if ($uid == \"\" && $lastName == \"\" && $firstName == \"\" && $address == \"\" && $phone == \"\" && $email == \"\" && $custom == \"\") {\n $sql = SchedDao::SQL_SELECT_CLIENT_ADDRESS;\n $sql .= \" LEFT JOIN client_updates cu ON c.client_id=cu.client_id WHERE c.user_group_id=\" . $login->userGroupId;\n $sql .= \" ORDER BY date DESC LIMIT 16\"; // no criteria specified, just return most recent updates \n } else {\n $sql = SchedDao::SQL_SELECT_CLIENT_ADDRESS . \"WHERE c.user_group_id=\" . $login->userGroupId;\n if ($uid != \"\") {\n $sql .= \" AND c.uid LIKE \" . quote($uid . \"%\");\n } else { \n if ($lastName != \"\") {\n $sql .= \" AND c.last_name LIKE \" . quote(\"%\" . $lastName . \"%\");\n }\n if ($firstName != \"\") {\n $sql .= \" AND c.first_name LIKE \" . quote(\"%\" . $firstName . \"%\");\n }\n }\n if ($address != \"\") {\n $sql .= \" AND (a.addr1 LIKE \" . quote(\"%\" . $address . \"%\") . \" OR a.addr2 LIKE \" . quote(\"%\" . $address . \"%\") . \")\";\n }\n if ($phone != \"\") {\n $sql .= \" AND (a.phone1 LIKE \" . quote(\"%\" . $phone . \"%\") . \" OR a.phone2 LIKE \" . quote(\"%\" . $phone . \"%\") . \")\";\n }\n if ($email != \"\") {\n $sql .= \" AND a.email1 LIKE \" . quote(\"%\" . $email . \"%\");\n }\n if ($custom != \"\") {\n $sql .= \" AND (c.cdata1 LIKE \" . quote(\"%\" . $custom . \"%\") . \" OR c.cdata2 LIKE \" . quote(\"%\" . $custom . \"%\") . \" OR c.cdata3 LIKE \" . quote(\"%\" . $custom . \"%\") . \")\";\n }\n $sql .= \" ORDER BY last_name, first_name\";\n }\n $res = query($sql);\n $dtos = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $dto = SchedDao::buildJClient($row);\n $dtos[] = $dto;\n }\n return new JClients($dtos);\n }", "public function searchCarte()\n {\n $this->utils->Restreindre($this->userConnecter->admin, $this->utils->Est_autoriser(40, $this->userConnecter->profil));\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $params = array('view' => 'compte/search-carte');\n $this->view($params, $data);\n }", "public function get_term()\n {\n }", "function ciniki_ags_exhibitorItemSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'exhibitor_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Exhibitor'),\n 'exhibit_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Exhibit'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'ags', 'private', 'checkAccess');\n $rc = ciniki_ags_checkAccess($ciniki, $args['tnid'], 'ciniki.ags.exhibitorItemSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load maps\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'ags', 'private', 'maps');\n $rc = ciniki_ags_maps($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $maps = $rc['maps'];\n\n $args['start_needle'] = preg_replace(\"/ /\", '%', $args['start_needle']);\n \n //\n // Get the list of items\n //\n if( isset($args['exhibit_id']) && $args['exhibit_id'] != '' ) {\n $strsql = \"SELECT ciniki_ags_items.id, \"\n . \"ciniki_ags_items.exhibitor_id, \"\n . \"ciniki_ags_items.exhibitor_code, \"\n . \"ciniki_ags_items.code, \"\n . \"ciniki_ags_items.name, \"\n . \"ciniki_ags_items.tag_info, \"\n . \"ciniki_ags_items.permalink, \"\n . \"ciniki_ags_items.status, \"\n . \"ciniki_ags_items.status AS status_text, \"\n . \"ciniki_ags_items.flags, \"\n . \"ciniki_ags_items.flags AS flags_text, \"\n . \"(ciniki_ags_items.flags&0x06) AS online_flags_text, \"\n . \"ciniki_ags_items.unit_amount AS unit_amount_display, \"\n . \"ciniki_ags_items.unit_discount_amount AS unit_discount_amount_display, \"\n . \"ciniki_ags_items.unit_discount_percentage AS unit_discount_percentage_display, \"\n . \"ciniki_ags_items.fee_percent AS fee_percent_display, \"\n . \"ciniki_ags_items.taxtype_id, \"\n . \"IFNULL(ciniki_ags_exhibit_items.exhibit_id, 0) AS exhibit_id, \"\n . \"IFNULL(ciniki_ags_exhibit_items.inventory, 0) AS inventory, \"\n . \"IFNULL(tags.tag_name, '') as categories \"\n . \"FROM ciniki_ags_items \"\n . \"LEFT JOIN ciniki_ags_exhibit_items ON (\"\n . \"ciniki_ags_items.id = ciniki_ags_exhibit_items.item_id \"\n . \"AND ciniki_ags_exhibit_items.exhibit_id = '\" . ciniki_core_dbQuote($ciniki, $args['exhibit_id']) . \"' \"\n . \"AND ciniki_ags_exhibit_items.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \" \n . \"LEFT JOIN ciniki_ags_item_tags AS tags ON (\" \n . \"ciniki_ags_exhibit_items.item_id = tags.item_id \" \n . \"AND tags.tag_type = 20 \" \n . \"AND tags.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \" \n . \"WHERE ciniki_ags_items.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_ags_items.exhibitor_id = '\" . ciniki_core_dbQuote($ciniki, $args['exhibitor_id']) . \"' \"\n . \"AND (\"\n . \"name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR exhibitor_code LIKE '%\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR exhibitor_code LIKE '%0\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%-\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%-0\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%00\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n } else {\n $strsql = \"SELECT ciniki_ags_items.id, \"\n . \"ciniki_ags_items.exhibitor_id, \"\n . \"ciniki_ags_items.exhibitor_code, \"\n . \"ciniki_ags_items.code, \"\n . \"ciniki_ags_items.name, \"\n . \"ciniki_ags_items.tag_info, \"\n . \"ciniki_ags_items.permalink, \"\n . \"ciniki_ags_items.status, \"\n . \"ciniki_ags_items.status AS status_text, \"\n . \"ciniki_ags_items.flags, \"\n . \"ciniki_ags_items.flags AS flags_text, \"\n . \"(ciniki_ags_items.flags&0x06) AS online_flags_text, \"\n . \"ciniki_ags_items.unit_amount AS unit_amount_display, \"\n . \"ciniki_ags_items.unit_discount_amount AS unit_discount_amount_display, \"\n . \"ciniki_ags_items.unit_discount_percentage AS unit_discount_percentage_display, \"\n . \"ciniki_ags_items.fee_percent AS fee_percent_display, \"\n . \"ciniki_ags_items.taxtype_id, \"\n . \"0 AS exhibit_id, \"\n . \"0 AS inventory, \"\n . \"'' AS categories \"\n . \"FROM ciniki_ags_items \"\n . \"WHERE ciniki_ags_items.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_ags_items.exhibitor_id = '\" . ciniki_core_dbQuote($ciniki, $args['exhibitor_id']) . \"' \"\n . \"AND (\"\n . \"name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '%-\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR exhibitor_code LIKE '%\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR exhibitor_code LIKE '%0\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%-\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%-0\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '%00\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n }\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.ags', array(\n array('container'=>'items', 'fname'=>'id', \n 'fields'=>array('id', 'exhibitor_id', 'exhibitor_code', 'tag_info', 'code', 'name', 'permalink', \n 'status', 'status_text', 'flags', 'flags_text', 'online_flags_text',\n 'unit_amount_display', 'unit_discount_amount_display', 'unit_discount_percentage_display', \n 'fee_percent_display', 'taxtype_id', 'exhibit_id', 'inventory', 'categories'),\n 'maps'=>array('status_text'=>$maps['item']['status']),\n 'dlists'=>array('categories'=>', '),\n 'flags'=>array('flags_text'=>$maps['item']['flags'],\n 'online_flags_text'=>$maps['item']['flags'],\n ),\n 'naprices'=>array('unit_amount_display', 'unit_discount_amount_display'),\n 'percents'=>array('unit_discount_percentage_display', 'fee_percent_display'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['items']) ) {\n $items = $rc['items'];\n $item_ids = array();\n foreach($items as $iid => $item) {\n $item_ids[] = $item['id'];\n }\n } else {\n $items = array();\n $item_ids = array();\n }\n\n return array('stat'=>'ok', 'items'=>$items, 'nplist'=>$item_ids);\n}", "public function search( $request ) {\n\t\tif( $keyword = is_object($request) ? $request->requestVar('term') : $request ) {\n\t\t\t$geoLocations = GeoLocation::getByKeyword($keyword, 10);\n\t\t\t$response = array();\n\t\t\tforeach( $geoLocations->map('ID', 'getFullTitle') as $id => $label ) {\n\t\t\t\t$response[] = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$response = false;\n\t\t}\n\t\treturn json_encode($response);\n\t}", "public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}", "public function search($q);", "function industry_search($search_term)\n {\n\n $this->db->select('id, name');\n $this->db->like('name', $search_term, 'both');//both, after, before\n $this->db->limit('100');\n $this->db->order_by(\"name\", \"asc\");\n $query = $this->db->get('ref_category');\n $count = $query->num_rows(); \n\n if($query)\n { \n $result_array = array();\n foreach($query->result_array() as $row=>$item)\n {\n $result_array[$row]['id'] = $item['id'];\n $result_array[$row]['text'] = $item['name'];\n }\n $output = json_encode($result_array); \n return $output; \n } \n }", "public function search(Request $req) {\n $result = '';\n $customers = Customer::where('TenKhachHang','like','%'.$req->key.'%')\n ->orWhere('CMND','like','%'.$req->key.'%')->orWhere('GioiTinh','like','%'.$req->key.'%')->orWhere('DiaChi','like','%'.$req->key.'%')->orWhere('DienThoai','like','%'.$req->key.'%')->orWhere('QuocTich','like','%'.$req->key.'%')->get();\n $html = view('admin.customer.search',compact('customers'))->render();\n return response($html); \n }", "public function getCustomerTaxvat();", "public function ajaxCustomerSearch(Request $request)\n {\n// $term = $request->has('term') ? $request->input('term') : null ;\n// $query = $request->has('query') ? $request->input('query') : $term;\n\n// if ( $query )\n\n if ($request->has('customer_id'))\n {\n $search = $request->customer_id;\n\n $customers = Customer::\n // select('id', 'name_fiscal', 'name_commercial', 'identification', 'sales_equalization', 'payment_method_id', 'currency_id', 'invoicing_address_id', 'shipping_address_id', 'shipping_method_id', 'sales_rep_id', 'invoice_sequence_id')\n with('currency')\n ->with('addresses')\n ->find( $search );\n\n $customers->invoice_sequence_id = $customers->getInvoiceSequenceId();\n $customers->shipping_method_id = $customers->getShippingMethodId();\n\n// return $customers;\n// return Product::searchByNameAutocomplete($query, $onhand_only);\n// return Product::searchByNameAutocomplete($request->input('query'), $onhand_only);\n// response( $customers );\n// return json_encode( $customers );\n return response()->json( $customers );\n }\n\n if ($request->has('term'))\n {\n $search = $request->term;\n\n $customers = Customer::select('id', 'name_fiscal', 'name_commercial', 'identification', 'reference_external', 'sales_equalization', 'payment_method_id', 'currency_id', 'invoicing_address_id', 'shipping_address_id', 'shipping_method_id', 'sales_rep_id')\n ->where( 'name_fiscal', 'LIKE', '%'.$search.'%' )\n ->orWhere( 'name_commercial', 'LIKE', '%'.$search.'%' )\n ->orWhere( 'identification', 'LIKE', '%'.$search.'%' )\n ->isNotBlocked()\n ->with('currency')\n ->with('addresses')\n ->take( intval(Configuration::get('DEF_ITEMS_PERAJAX')) )\n ->get();\n\n// return $customers;\n// return Product::searchByNameAutocomplete($query, $onhand_only);\n// return Product::searchByNameAutocomplete($request->input('query'), $onhand_only);\n// response( $customers );\n// return json_encode( $customers );\n return response()->json( $customers );\n }\n\n // Otherwise, die silently\n return json_encode( [ 'query' => '', 'suggestions' => [] ] );\n \n }", "public function findClient(): void\n {\n $message = \"Search client by:\\n\";\n foreach ($this->fieldsToFill as $index => $field) {\n $message .= sprintf(\"%s - %s\\n\", $index, $field['label']);\n }\n\n $value = $this->getConsoleInput($message);\n if (null === $value) {\n return;\n }\n\n $criteria = $this->generateCriteria((int)$value);\n if (null === $criteria) {\n return;\n }\n\n try {\n $result = $this->repository->findBy($criteria);\n if (!empty($result)) {\n $this->printTable($result);\n } else {\n print \"\\nData not find!\\n\\n\";\n }\n } catch (QueryException $e) {\n print $e->getMessage();\n }\n }", "function axWFactoryDomainQuery() {\r\n\tglobal $wgRequest;\r\n\r\n\t$query = $wgRequest->getVal( \"term\", false );\r\n\r\n\t$return = array(\r\n\t\t\"term\" => $query,\r\n\t\t\"suggestions\" => array(),\r\n\t\t\"data\" => array()\r\n\t);\r\n\r\n\t$exact = array( \"suggestions\" => array(), \"data\" => array() );\r\n\t$match = array( \"suggestions\" => array(), \"data\" => array() );\r\n\r\n\t// query terms: wik, wiki, wikia take too much memory\r\n\t// and end up with fatal errors\r\n\tif ( substr(\"wikia\",0,strlen((string)$query)) === $query ) {\r\n\t\t$query = false;\r\n\t}\r\n\r\n\tif( $query ) {\r\n\t\t/**\r\n\t\t * maybe not very effective but used only by staff anyway\r\n\t\t */\r\n\t\t$query = strtolower( $query );\r\n\t\t$dbr = WikiFactory::db( DB_SLAVE );\r\n\t\t$sth = $dbr->select(\r\n\t\t\tarray( \"city_domains\" ),\r\n\t\t\tarray( \"city_id\", \"city_domain\" ),\r\n\t\t\tarray(\r\n\t\t\t\t\"city_domain not like 'www.%'\",\r\n\t\t\t\t\"city_domain not like '%.wikicities.com'\",\r\n\t\t\t\t\"city_domain like '%{$query}%'\"\r\n\t\t\t),\r\n\t\t\t__METHOD__\r\n\t\t);\r\n\r\n\t\twhile( $domain = $dbr->fetchObject( $sth ) ) {\r\n\t\t\t$domain->city_domain = strtolower( $domain->city_domain );\r\n\t\t if( preg_match( \"/^$query/\", $domain->city_domain ) ) {\r\n\t\t\t\t$exact[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$exact[ \"data\" ][] = $domain->city_id;\r\n\t\t }\r\n\t\t\telseif( preg_match( \"/$query/\", $domain->city_domain ) ){\r\n\t\t\t\t$match[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$match[ \"data\" ][] = $domain->city_id;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$return[ \"suggestions\" ] = array_merge( $exact[ \"suggestions\" ], $match[ \"suggestions\" ] );\r\n\t\t$return[ \"data\" ] = array_merge( $exact[ \"data\" ], $match[ \"suggestions\" ] );\r\n\t}\r\n\t// $.ui.autocomplete expects it to be returned as if there is just suggestions, leaving the rest for debug though\r\n\treturn json_encode( $return[\"suggestions\"] );\r\n}", "public function autocompletesearch($sellerid,$name)\n\t {\n\t\t \n\t\t $result4='';\n\t\t\t\t if($name!='')\n\t\t\t\t {\n\t\t\t\t\t $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t\t\t $products = $objectManager->create('Magento\\Catalog\\Model\\ProductFactory')\n\t\t\t\t ->create()\n\t\t\t\t\t\t\t\t\t ->getCollection()\n\t\t\t\t\t\t\t\t\t//->addFieldToFilter('store_id', 1)\n ->addFieldToFilter('name', array(\"like\"=>'%'.$name.'%') );\t\t\t\t\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t //echo \"<pr>\";var_dump($products->getData()); \n\t\t\t\t if(!empty($products->getData())):\n\t\t\t\t foreach($products as $product)\n\t\t\t\t {\n $productId =$product->getId();\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t\t\t\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t\t\t\t\t$connection = $resource->getConnection();\n\t\t\t\t\t\t $quote_sql = \"Select * FROM marketplace_product where mageproduct_id=$productId and seller_id=$sellerid \";\n\t\t\t\t\t\t$result_result = $connection->fetchAll($quote_sql);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($result_result))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$currentproduct = $objectManager->create('Magento\\Catalog\\Model\\Product')->load($productId);\n //echo\"<pre>\";print_r($currentproduct->getData());\n\t\t\t\t\t\t$cats = $currentproduct->getCategoryIds();\n\t\t\t\t\t\t$c=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$categoryname='';\n\t\t\t\t\t\t$categoryId='';\n\t\t\t\t\t\t foreach ($cats as $categoryIds) {\n\t\t\t\t\t\t\tif($categoryIds!=2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($c<1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t//$currentcategory = $objectManager->create('Magento\\Catalog\\Model\\category')->load($categoryIds);\n\t\t\t\t\t\t //$sami=$categoryIds;\n\t\t\t\t\t\t\t //$currentcategory = $objectManager->create('Magento\\Catalog\\Model\\category')->load($sami);\n\t\t\t\t\t\t\t// $categoryname=$currentcategory->getName();\n\t\t\t\t\t\t\t//$categoryId = 3;\n\t\t\t\t\t\t\t$categoryId =$categoryIds;\n\t\t\t\t\t\t\t$_objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t\t\t\t\t\t$object_manager = $_objectManager->create('Magento\\Catalog\\Model\\Category')\n\t\t\t\t\t\t\t->load($categoryId);\n\t\t\t\t\t\t\t//print_r($object_manager->getData());\n\t\t\t\t\t\t\t$categoryname=$object_manager->getName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$c++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\t$producturl=$currentproduct->getProductUrl();\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t//$result4[]=array(\"id\"=>$currentproduct->getId(),\"name\"=>$currentproduct->getName(),\"categoryName\"=>$currentcategory->getName());\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$result4[]=array(\"id\"=>$currentproduct->getId(),\"name\"=>$currentproduct->getName(),\"categoryName\"=>$categoryname,\"categoryid\"=>$categoryId,\"urltag\"=>$name);\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>$result4);\n\t\t return $result; \n else:\n \t\t\t\t \n\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"success\"),'product'=>'No result found!');\n\t\t return $result; \n\t\t\t\t \n\t\t\t\t endif;\n \n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t \n\t\t\t\t\t $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t\t\t\t return $result; \n\t\t\t\t }\n\t\t\t\t \n\t }", "public function searchGlobalTerm ($term){\n $json = new JsonFile ($this->host. '/api/key/' . $term );\n $json->parse();\n \n return $json;\n }", "public function Commesse() {\n $term = Input::get('term');\n\n $results = array();\n\n $queries = \\DB::table('cm_commesse')\n ->join('cm_clienti' , 'cm_clienti.id' , '=' , 'cm_commesse.cliente_id')\n ->where('cm_commesse.id', '>' ,1) //escludo ferie e permessi\n ->where(function ($query) use ($term) {\n $query\n ->orWhere('oggetto', 'LIKE', '%' . $term . '%')\n ->orWhere('protocollo', 'LIKE', '%' . $term . '%')\n ->orWhere('nome', 'LIKE', '%' . $term . '%');\n })\n ->get();\n\n\n foreach ($queries as $query) {\n $results[] = [ 'id' => $query->id, 'value' => $query->protocollo . ' ' . $query->oggetto];\n }\n \\Debugbar::info($results);\n return \\Response::json($results);\n }", "public function search_user(Request $request){\n $search = $request->input('term');\n $users = User::where('name', 'like' , \"%$search%\")\n ->orwhere('username', 'like', \"%$search%\")\n ->get();\n return response()->json($users, 200);\n }", "public function get_all_trainee_names() {\n $matches = array();\n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $result = $this->classtraineemodel->get_all_trainee_details($this->tenant_id, \"\", '', $query_string);\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->first_name . ' ' .$row->last_name. ' (' .$row->tax_code. ')',\n 'value' => $row->first_name . ' ' .$row->last_name\n );\n }\n }\n echo json_encode($matches);\n exit();\n }", "public function search($keyword)\n\t{\n\t\t// $builder = $this->table('tbl_customer');\n\t\t// $builder->like('name', $keyword);\n\t\t// return $builder;\n\n\n\t\treturn $this->table('tbl_suppliers')->like('supplier_name', $keyword)->orLike('address', $keyword)->orLike('no_telp', $keyword);\n\t}", "public function searchContacts($userId, $searchterm)\n { \n $sql = \"SELECT * FROM contacts WHERE ((`firstname` LIKE ?) OR (`lastname` LIKE ?) OR (`phone` LIKE ?) OR (`city` LIKE ?) OR (`birthday` LIKE ?) OR (`email` LIKE ?)) AND (`userid`=?)\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([\"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", $userId]);\n return $stmt->fetchAll();\n }", "function search($term, $fields=array(), $limit=array()) { /* {{{ */\n\t\t$querystr = '';\n\t\t$term = trim($term);\n\t\tif($term) {\n\t\t\t$querystr = substr($term, -1) != '*' ? $term.'*' : $term;\n\t\t}\n\t\tif(!empty($fields['owner'])) {\n\t\t\tif(is_string($fields['owner'])) {\n\t\t\t\tif($querystr)\n\t\t\t\t\t$querystr .= ' ';\n\t\t\t\t$querystr .= 'owner:'.$fields['owner'];\n\t\t\t} elseif(is_array($fields['owner'])) {\n\t\t\t\tif($querystr)\n\t\t\t\t\t$querystr .= ' ';\n\t\t\t\t$querystr .= '(owner:';\n\t\t\t\t$querystr .= implode(' OR owner:', $fields['owner']);\n\t\t\t\t$querystr .= ')';\n\t\t\t}\n\t\t}\n\t\tif(!empty($fields['category'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(category:';\n\t\t\t$querystr .= implode(' OR category:', $fields['category']);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['status'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$status = array_map(function($v){return $v+10;}, $fields['status']);\n\t\t\t$querystr .= '(status:';\n\t\t\t$querystr .= implode(' OR status:', $status);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['user'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(users:';\n\t\t\t$querystr .= implode(' OR users:', $fields['user']);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['rootFolder']) && $fields['rootFolder']->getFolderList()) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(path:';\n\t\t\t$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(path:';\n\t\t\t$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');\n\t\t\t$querystr .= ')';\n\t\t}\n\t\ttry {\n\t\t\t$result = $this->index->find($querystr, $limit);\n\t\t\t$recs = array();\n\t\t\tforeach($result[\"hits\"] as $hit) {\n\t\t\t\t$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->documentid);\n\t\t\t}\n\t\t\treturn array('count'=>$result['count'], 'hits'=>$recs, 'facets'=>array());\n\t\t} catch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "function clients_select_getSearchQuery($ctlData,$searchRow) {\n\tif($ctlData['SEARCHABLE'] != 'no') {\n\t\t$identifier = strtolower($ctlData['IDENTIFIER']);\n\n\t\t## the A part\t\n\t\t$query_A = '';\n\t\t\n\t\t## the B part\n\t\t$query_B = '';\n\t\t\n\t\t## the C part\n\t\t$search_value = $searchRow['value'];\n\t\t$query_C = ' AND ';\n\t\t$query_C .= DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].'.'.$identifier.' like'.\"'%\".$search_value.\"%'\";\n\t\t\n\t\treturn array('partA'=>$query_A,'partB'=>$query_B,'partC'=>$query_C);\n\t}\n}", "public function search(Request $request, RepoHost $rh, $term)\n {\n $args = $request->all();\n\n $maxhits = isset($args['maxhits']) ? $args['maxhits'] : 25;\n $page = isset($args['page']) ? $args['page'] : 0;\n $sort = isset($args['sort']) ? $args['sort'] : 'score';\n\n return $rh->search($term, $maxhits, $page, $sort);\n\n }", "function display_elastic_search ($q, $filter=null, $from = 0, $size = 20, $callback = '')\n{\n\tglobal $elastic;\n\t\n\t$status = 404;\n\t\t\t\t\n\tif ($q == '')\n\t{\n\t\t$obj = new stdclass;\n\t\t$obj->hits = new stdclass;\n\t\t$obj->hits->total = 0;\n\t\t$obj->hits->hits = array();\n\t\t\n\t\t$status = 200;\n\t}\n\telse\n\t{\t\t\n\t\t// query type\t\t\n\t\t$query_json = '';\n\t\t\n\t\tif ($filter)\n\t\t{\n\t\t\tif (isset($filter->author))\n\t\t\t{\n\t\t\t\t// author search is different( but not working yet)\t\n\t\t\t\t$query_json = \t\t\n\t'{\n\t\"size\":50,\n \"query\": {\n \"bool\": {\n \"must\": [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.author\"] \n\t\t\t\t}\n\t\t\t\t}]\n }\n }\n\t}';\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t\t\n\t\t\t// echo $query_json;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// default is search on fulltext fields\n\t\tif ($query_json == '')\n\t\t{\n\t\t\t$query_json = '{\n\t\t\t\"size\":50,\n\t\t\t\t\"query\": {\n\t\t\t\t\t\"bool\" : {\n\t\t\t\t\t\t\"must\" : [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.fulltext\", \"search_data.fulltext_boosted^4\"] \n\t\t\t\t}\n\t\t\t\t}],\n\t\t\t\"filter\": <FILTER>\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"aggs\": {\n\t\t\t\"type\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.type.keyword\" }\n\t\t\t },\n\t\t\t \"year\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.year\" }\n\t\t\t },\n\t\t\t \"container\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.container.keyword\" }\n\t\t\t },\n\t\t\t \"author\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.author.keyword\" }\n\t\t\t },\n\t\t\t \"classification\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.classification.keyword\" }\n\t\t\t } \n\n\t\t\t}\n\n\t\n\t\t\t}';\n\t\t\t\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t}\n\t\n\t$filter_string = '[]';\n\t\n\tif ($filter)\n\t{\n\t\t$f = array();\n\t\t\n\t\tif (isset($filter->year))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.year'} = $filter->year;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\n\t\t// this doesn't work\n\t\tif (isset($filter->author))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.author'} = $filter->author;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\t\t\n\t\t$filter_string = json_encode($f);\n\t}\n\t\n\t$query_json = str_replace('<FILTER>', $filter_string, $query_json);\n\t\n\t\n\t$resp = $elastic->send('POST', '_search?pretty', $post_data = $query_json);\n\t\n\n\t\t$obj = json_decode($resp);\n\n\t\t$status = 200;\n\t}\n\t\n\tapi_output($obj, $callback, 200);\n}", "public abstract function search_items(\\WP_REST_Request $request);", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function index(Request $request)\n {\n if ($request->search !='') {\n $dogovor = Dogovor::query()->whereHas('klient',function ($query) use ($request) {\n // $search = strtolower($request->search);\n $query->where(DB::raw('LOWER(company_name)'),'LIKE',\"%{$request->search}%\");\n })\n ->with('klient',function ($query) use ($request) {{\n // $search = strtolower($request->search);\n $query->where(DB::raw('LOWER(company_name)'),'LIKE',\"%{$request->search}%\");\n }})->get();\n return response()->json([\n 'dogovor' => $dogovor\n ]);\n }\n else {\n $dogovor = Dogovor::query()->with('klient')->orderByDesc('id')->get();\n return response()->json([\n 'dogovor' => $dogovor\n ]);\n }\n\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->with = array('tiposClienteTipoCliente');\n\t\t$criteria->addSearchCondition('concat(nombre, \" \", apellido)', $this->fullName);\n\t\t$criteria->addSearchCondition('concat(nombre, \" \", apellido, \" \", dni, \" \", direccion)', $this->fullNameDniAddress);\n\t\t$criteria->addCondition(\"tiposClienteTipoCliente.nombre_tipo_cliente <> \\\"Inactivo\\\"\");\n\t\t$criteria->addCondition(\"tiposClienteTipoCliente.nombre_tipo_cliente <> \\\"Empleado\\\"\");\n\n\t\t$criteria->compare('usuario_id',$this->usuario_id,true);\n\t\t$criteria->compare('nombre',$this->nombre,true);\n\t\t$criteria->compare('apellido',$this->apellido,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('dni',$this->dni,true);\n\t\t$criteria->compare('telefono_celular',$this->telefono_celular,true);\n\t\t$criteria->compare('telefono_fijo',$this->telefono_fijo,true);\n\t\t$criteria->compare('telefono_alt',$this->telefono_alt,true);\n\t\t$criteria->compare('rol',$this->rol,true);\n\t\t$criteria->compare('comentarios',$this->comentarios,true);\n\t\t$criteria->compare('empleado_funcion',$this->empleado_funcion,true);\n\t\t$criteria->compare('empleado_temporal',$this->empleado_temporal);\n\t\t$criteria->compare('empleado_activo',$this->empleado_activo);\n\t\t\n\t\t$criteria->compare('cliente_sistema_secundario_id',$this->cliente_sistema_secundario_id);\n\t\t$criteria->compare('cliente_factura',$this->cliente_factura,true);\n\t\t$criteria->compare('cliente_razon_social',$this->cliente_razon_social,true);\n\t\t$criteria->compare('cliente_cuit',$this->cliente_cuit);\n\t\t$criteria->compare('tipos_cliente_tipo_cliente_id',$this->tipos_cliente_tipo_cliente_id,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "static function search_terms() {\n\t\tglobal $wpdb;\n\n\t\t$input = filter_input_array( INPUT_POST, array(\n\t\t\t'term' => FILTER_SANITIZE_STRING,\n\t\t\t'taxonomy' => FILTER_SANITIZE_STRING\n\t\t) );\n\n\t\tif( empty( $input['taxonomy'] ) || !taxonomy_exists( $input['taxonomy'] ) ) {\n\t\t\twp_send_json_error();\n\t\t}\n\n\t\t$terms = apply_filters( 'wp_form_pre_search_terms', null );\n\n\t\tif( !isset( $terms ) ) {\n\t\t\t$query_args = array(\n\t\t\t\t'search' => $input['term'],\n\t\t\t\t'hide_empty' => false\n\t\t\t);\n\n\t\t\t$terms = get_terms( $input['taxonomy'], $query_args );\n\t\t}\n\n\t\t$terms = apply_filters( 'wp_form_search_terms', $terms );\n\n\t\twp_send_json_success( $terms );\n\t}", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function searchTerm ($theme, $term){\n $json = new JsonFile ($this->host . '/api/'.$theme.'/key/' . $term);\n $json->parse();\n \n return $json;\n }", "function ciniki_tenants_searchCategory($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'start_needle'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search'), \n 'limit'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Limit'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'checkAccess');\n $rc = ciniki_tenants_checkAccess($ciniki, 0, 'ciniki.tenants.searchCategory'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Search for categories\n //\n $strsql = \"SELECT DISTINCT category AS name \"\n . \"FROM ciniki_tenants \"\n . \"WHERE category like '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"AND category <> '' \"\n . \"ORDER BY category COLLATE latin1_general_cs \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.tenants', array(\n array('container'=>'results', 'fname'=>'name', 'name'=>'result', 'fields'=>array('name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['results']) || !is_array($rc['results']) ) {\n return array('stat'=>'ok', 'results'=>array());\n }\n return array('stat'=>'ok', 'results'=>$rc['results']);\n}", "public function search($searchText){\n\n $sql = $this->db->select()\n ->from(\"job\")\n ->join(array(\"c\"=>\"categories\"), \"job.category_id=c.category_id\")\n ->join(array(\"com\"=>\"company\"), \"job.user_id=com.user_id\")\n ->join(array(\"ci\"=>\"city\"), \"job.city_id=ci.city_id\")\n ->where(\"job_name LIKE '%$searchText%' OR com_name LIKE '%$searchText%' or city_name LIKE '%$searchText%'\")\n// ->where(\" job_close_date > NOW() \")\n ;\n\n return $this->executeQuery($sql)->toArray();\n }", "function search($term, $location) {\r\n $url_params = array();\r\n \r\n $url_params['term'] = $term;\r\n $url_params['location'] = $location;\r\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\r\n \r\n return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\r\n }" ]
[ "0.5964222", "0.58904326", "0.58880407", "0.5870145", "0.5857385", "0.58512956", "0.58434504", "0.58061737", "0.57879436", "0.57647765", "0.5729846", "0.57204103", "0.5701965", "0.56787694", "0.56764734", "0.5640589", "0.5637458", "0.56226903", "0.5610206", "0.5608447", "0.55702066", "0.55365133", "0.55297625", "0.54624265", "0.5450473", "0.54376966", "0.5423939", "0.5419672", "0.54190063", "0.5413779", "0.5413779", "0.5378478", "0.5363787", "0.53616375", "0.53454673", "0.53444934", "0.5336767", "0.5329269", "0.5318088", "0.5317371", "0.53096", "0.5302658", "0.52979094", "0.5287895", "0.52818584", "0.52743286", "0.52700716", "0.52695423", "0.52670735", "0.5251159", "0.5238459", "0.5237288", "0.5233227", "0.522435", "0.52229977", "0.52200234", "0.5213721", "0.52085584", "0.52031624", "0.5198668", "0.5193973", "0.51926666", "0.5186562", "0.5178517", "0.5171745", "0.5170763", "0.51681787", "0.51676804", "0.51553166", "0.5155001", "0.5153183", "0.5148163", "0.5143288", "0.5143038", "0.51336557", "0.51332116", "0.51309186", "0.51252097", "0.5124656", "0.51219046", "0.51202196", "0.5117717", "0.51177156", "0.51103616", "0.51061815", "0.5101142", "0.5093383", "0.5091713", "0.5090947", "0.5089643", "0.5088295", "0.50866365", "0.50832397", "0.50799716", "0.5073696", "0.5060653", "0.5059945", "0.5052611", "0.5039115", "0.5036844" ]
0.62356377
0
constructor that initializes shelves
function __construct() { $this->shelf = new SplFixedArray(10); include("../Database/db_connect.php"); $shelf_id_results = mysqli_query($dbhandle, "SELECT DISTINCT(Shelfid) FROM shelves WHERE Groupnumber = '31' ORDER BY Shelfid") or die(mysql_error()); // $i = 0; // while($row = mysqli_fetch_array($shelf_id_results) && $i < 10) // { // $this->shelf[$i] = new shelf($row['Shelfid']); // $i++; // } for($i = 0; $i < 10; $i++) { $this->shelf[$i] = new shelf($i); } //set copyID to value of highest found copyID $result = mysqli_query($dbhandle, "SELECT * FROM bookscopy WHERE Groupnumber = '31'") or die(mysql_error()); $highest_copyID = 0; while($row = mysqli_fetch_array($result)) { if($row['Copyid'] > $highest_copyID) { $highest_copyID = $row['Copyid']; } } $this->copyid = $highest_copyID; include("../Database/db_close.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->shelfs[0] = new Shelf;\n $this->shelfs[1] = new Shelf;\n $this->shelfs[2] = new Shelf;\n }", "function __construct()\n\t{\n parent::__construct();\n\t\t$this->set_table_name(\"shelf\");\n\n\t}", "public function __construct()\n {\n $this->_storage = new \\SplObjectStorage();\n }", "protected function __construct()\n {\n $this->instances = new Registry;\n }", "public function __construct(/* ... */)\n {\n $this->_storage = new \\SplObjectStorage();\n }", "public function __construct()\n {\n $this->sicBlocks = [];\n $this->cachedInstances = [];\n }", "public function __construct()\n {\n $this->initStorageObjects();\n }", "public function __construct() {\n $this->blueprints = collect([]);\n // Where to store the latest index\n $this->index = collect([]);\n }", "public function __construct() {\n\t\t\t$this->clients = new \\SplObjectStorage;\n\t\t}", "public function __construct(){\n\n $this->routes = new \\SplObjectStorage();\n\n }", "public function __construct()\n\t{\n\t\t$this->clients = new \\SplObjectStorage();\n\t}", "public function __construct() {\n\t\t$this->keysDB = array();\n\t}", "public function __construct()\n {\n $this->roles = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->helpers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function __construct() {\n\t\t@mkdir($this->storage, 0777, true);\n\t}", "protected function initStorageObjects() {\n\t\t$this->spieler = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "public function __construct()\n {\n $this->sharedInstances = [];\n }", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "public function __construct()\n {\n $this->hosts = [];\n $this->directInjectors = [];\n $this->defaultItems = [];\n }", "protected function initStorageObjects() {\n\t\t\n\t}", "protected function initStorageObjects() {\n\t\t\n\t}", "public function initStorage() {}", "public function __construct()\n {\n $this->storage = array();\n }", "protected function _construct()\n {\n $this->_init('varnish/cms_page_store');\n }", "protected function initializeStorageObjects() {}", "public function __construct() {\n $this->_map = [];\n $this->_keys = [];\n }", "protected function initStorageObjects() {\n\t\t$this->konzerts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->singers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n }", "public function __construct() {\n\t\t// creating a collection for storing menus\n\t\t$this->collection = new Collection ();\n\t}", "protected function initStorageObjects()\n {\n \n }", "private function init() {\r\n parent::init();\r\n $this->redisInit();\r\n}", "private function __construct()\n {\n \t$this->storage_dir = $_SERVER[\"DOCUMENT_ROOT\"] . '/storage';\n }", "public function __construct()\n\t{\n\t\t// creating a collection for storing menus\n\t\t$this->collection = new Collection();\n\t}", "public function __construct()\n {\n $this->factories = [];\n }", "public function __construct()\n {\n $items = getenv();\n $this->set($items);\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->randomContents = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\n\t\t$this->randomPages = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function __construct() {\n $this->configs = new ArrayCollection();\n }", "protected static function initStorages()\n {\n $modelName = ClassFinder::getClassBasename(static::class);\n\n static::$storages = [];\n\n foreach (static::$storagesConf as $name => &$storageConf) {\n if (!isset($storageConf['type'])) {\n $storageConf['type'] = $name;\n }\n if (!isset($storageConf['primaryKey'])) {\n $storageConf['primaryKey'] = static::$primaryKey;\n }\n $storageConf['modelClass'] = static::class;\n $storageConf['modelName'] = $modelName;\n\n $class = Storages\\Generic::class;\n $class = substr($class, 0, strrpos($class, '\\\\'))\n . '\\\\' . $storageConf['type'];\n static::$storages[$name] = new $class($storageConf);\n }\n }", "function __construct() {\n\t\tConfigure::load(\"EnbakeAttach.s3\");\n\n\t\t$this->s3 = new S3(Configure::read(\"S3.access_key\"),\n\t\t\t\tConfigure::read(\"S3.secret_key\"));\n\t}", "public function __construct()\n {\n parent::__construct();\n if (empty(self::$tocifiers)) {\n self::$tocifiers = new SplObjectStorage();\n }\n }", "public function initPools()\r\n\t{\r\n\t\tforeach (array_keys($this->getPools()) as $key) {\r\n\t\t\t$this->initPool($key);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "public function __construct()\n {\n $this->storename = 'db.json';\n $this->expiration_time = 5;\n $this->set_storevalues();\n }", "function __construct() {\n $this->dataStack = new SplStack();\n $this->minStack = new SplStack();\n }", "protected function _construct()\n\t{\n\t\t$this->_init('aurednik/cms_home_entity_store');\n\t}", "public function run()\n {\n $list = [\"Women's Shelter\",\"Cooling Center\",\"Warming Center\",\"Homeless Shelter\",\"Men's Shelter\",\"Disaster Shelter\",\"Other Shelter\"]; \n $collection = collect($list)->map(function ($name) {\n $shelter = new \\App\\Shelter;\n $shelter->name = $name;\n $shelter->save();\n });\n }", "public function __construct()\n {\n $this->paths('app/Actions');\n $this->loadedActions = collect();\n }", "public function __construct()\n {\n $this->connection = Shopware()->Models()->getConnection();\n $this->db = Shopware()->Db();\n $this->writer = new TranslationComponent();\n $this->shops = $this->getShops();\n }", "private function __construct()\r\r\n\t{\t\t\r\r\n\t\t$class_name = sprintf(CPF_CACHE_STORAGE_CLASS_FORMAT, Cpf_Core_Config::get_instance()->value('CACHE.STORAGE'));\t\t\r\r\n\t\t$this->_storage = new $class_name();\r\r\n\t}", "protected function addSPLConfigs()\n {\n\n $this['queue'] = $this->factory(\n function () {\n return new \\SplQueue();\n }\n );\n\n $this['objectStorage'] = $this->factory(\n function () {\n return new \\SplObjectStorage();\n }\n );\n\n }", "function __construct()\n\t{\n\t\t// Check repo for any new revisions\n\t\t$this->updateApp();\t\t\n\n\t\t// Create a new amazon connection\t\t\n\t\t$this->amazon();\n\t\t\n\t\t// Configure this server\n\t\t$this->bootstrap();\t\t\n\t}", "public function __construct() {\n $this->content = new Search();\n $this->contentdb = new Content();\n $this->managerStat = new ManagerStat('dsn_stat');\n $this->redisClient = new RedisClient(Configuration::get('redis_db_search'));\n $this->redisClientF = new RedisClient(Configuration::get('redis_db_user'));\n $this->filter = new Filter();\n $this->analyser = new AnalyseRequest();\n $this->urlService = Configuration::get('middleware_json_rpc', null);\n }", "public function __construct()\n {\n $this->init_config();//init cache config set the driver and path/key;\n if($this->driver==\"redis\") {\n $this->redis = new \\Redis();\n $this->redis->connect(\"127.0.0.1\", 6379);\n }\n if($this->driver==\"file\"){\n $this->file=new file();\n $this->path=dirname(dirname(dirname(__FILE__))).\"/$this->path/\";//set file store path\n }\n }", "protected function initCaches() {}", "public function __construct() {\n include Config::create()->load('cache');\n $this->config = $cache;\n $this->mc = new Memcached();\n foreach ($this->config['server'] as $s) {\n $this->mc->addServer($s['host'], $s['port']);\n }\n }", "function __construct() {\n $this->_cache = [];\n }", "protected function initStorageObjects()\n {\n $this->item = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function __construct()\n {\n $this->folderCreator = new FolderCreator();\n }", "public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }", "protected function setShards()\n {\n // Clear shards first\n $this->shards = [];\n\n foreach ($this->getState()[ClusterState::SHARDS_PROP] as $shardName => $shardState) {\n $this->shards[$shardName] = new ShardState([$shardName => $shardState], $this->liveNodes);\n }\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->namespace = 'App\\Services\\\\';\n\n $this->scrappers = collect([\n 'Scrappers\\\\MangaStreamScrapper',\n 'Scrappers\\\\MangaPandaScrapper',\n 'Scrappers\\\\MangaFoxScrapper',\n 'Scrappers\\\\LeoMangaScrapper',\n 'Scrappers\\\\RawSenMangaScrapper',\n 'ApiScrappers\\\\TuMangaOnlineScrapper',\n ]);\n }", "function __construct()\n {\n if ( function_exists('apc_fetch') )\n $this->hostname = apc_fetch('hostname');\n\n // If we didn't have a valid name in the store\n if ( !strlen($this->hostname) )\n {\n // Shell out and get the hostname\n list($this->hostname) = explode('.', shell_exec('hostname'));\n\n // Store it in cache if we have it\n if ( function_exists('apc_store') )\n apc_store('hostname', $this->hostname, 86400);\n }\n }", "protected function initStorageObjects()\n {\n $this->states = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function __construct() {\r\n $this->items = $this->initItems();\r\n }", "private function initH2o() {\n\t\tif($this->engine)\n\t\t\treturn;\n\n\t\t// Configure H20 cache folder\n\t\t$storage = LOTUS_STORAGE;\n\n\t\tif(!file_exists($storage))\n\t\t\tthrow new \\Exception(\"Storage folder on {$storage} does not exist\");\n\n\t\tif(!is_writable($storage))\n\t\t{\n\t\t\tif(!chmod($storage,0777))\n\t\t\t\tthrow new \\Exception(\"Storage folder on $storage is not writable\");\n\t\t}\n\n\t\t// Create ready to use H20 Engine\n\t\t$this->engine = new \\H2o(null, array(\n\t\t 'cache_dir' => $storage,\n\t\t 'searchpath' => $this->path\n\t\t));\n\n\n\t}", "public function __construct()\n {\n $this->users = Cache::remember('admin.users', now()->addHours(1),\n function () {\n return UserResource::collection(User::all())->toJson();\n });\n }", "public function __construct()\n {\n // old usage from Panorama in Rulezonecontainer; fix it later\n $this->zoneStore = new ZoneStore($this);\n $this->zoneStore->setName('zoneStore');\n\n\n $this->appStore = AppStore::getPredefinedStore( $this );\n\n $this->threatStore = ThreatStore::getPredefinedStore( $this );\n\n $this->urlStore = SecurityProfileStore::getPredefinedStore();\n\n $this->_fakeNetworkProperties = new NetworkPropertiesContainer($this);\n\n\n $this->managedFirewallsStore = new ManagedDeviceStore($this, 'managedFirewall', TRUE);\n }", "public function __construct()\n {\n $this->kitchenRecipeRepository = app(KitchenRecipeRepository::class);\n $this->kitchenIngredientRepository = app(KitchenIngredientRepository::class);\n $this->kitchenIngredientKitchenRecipeRepository = app(KitchenIngredientKitchenRecipeRepository::class);\n }", "public function __construct() {\n\t\t$this->tags = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct() {\n $this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();\n $this->setAdditionalData([]);\n }", "public function __construct()\n\t{\n\n\t\tparent::__construct();\n\t\t// \"php ../public_html/index.php cron delete_frozen_files index\"\n\t}", "protected function initStorageObjects()\n {\n \n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function __construct() {\n parent::__construct();\n try {\n $this->storage = Source::series();\n $this->seriesList = $this->storage->list();\n $this->seriesCollection = Series::where('local_title', '!=', null)->get();\n } catch (\\Exception $exception) {\n $this->ready = false;\n }\n }", "public function __construct()\n {\n parent::__construct();\n $this->files = new Filesystem();\n }", "public function __construct() {\n\t\t$this->partyNames = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t$this->addresses = new Tx_Extbase_Persistence_ObjectStorage();\n\t}" ]
[ "0.7105411", "0.6188716", "0.5965632", "0.5897682", "0.58831143", "0.5865134", "0.5843209", "0.58344215", "0.57937664", "0.5765493", "0.57462496", "0.57411635", "0.5698522", "0.5690351", "0.5674755", "0.5655588", "0.5643194", "0.5641339", "0.5641339", "0.5639945", "0.5603471", "0.5603471", "0.5590518", "0.5585123", "0.55690193", "0.55483496", "0.55458033", "0.5537617", "0.55370694", "0.5513286", "0.55109715", "0.5449342", "0.5440265", "0.5436444", "0.54253334", "0.541892", "0.54005235", "0.53870153", "0.53842616", "0.5384245", "0.53752893", "0.53675073", "0.5366504", "0.5362802", "0.5349705", "0.5337315", "0.5331184", "0.5326226", "0.531934", "0.5319335", "0.53169805", "0.5305545", "0.5302898", "0.52977306", "0.529379", "0.5291294", "0.5287794", "0.5287483", "0.5282597", "0.5276572", "0.52674824", "0.5261256", "0.5261173", "0.5260272", "0.524686", "0.5244609", "0.5244092", "0.5243056", "0.52342063", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5233375", "0.5232498", "0.5230821", "0.5229936", "0.52272975", "0.52262115" ]
0.6195977
1
check database for bookID
public function addBook($bookID, $bookTitle, $author) { include("../Database/db_connect.php"); $result = mysqli_query($dbhandle, "SELECT * FROM books WHERE Groupnumber = '31' AND Bookid = '$bookID'") or die (mysql_error()); //if this book doesn't exist, add it to database if(mysqli_num_rows($result) == 0) { mysqli_query($dbhandle, "INSERT INTO books (Groupnumber, Bookid, Booktitle, Author) VALUES ('31', '$bookID', '$bookTitle', '$author')"); } //add this book to first not full shelf with incremented copyID for($i = 0; $i < 10; $i++) { if($this->shelf[$i]->hasSpace()) { $this->shelf[$i]->addBook($bookID, ++$this->copyid, $bookTitle, $author); break; } if($i == 10) { $_SESSION["error"] = "Cannot add book, library full"; } } include("../Database/db_close.php"); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkBooklistID($booklist_id) {\n $query = 'select * from `'. $this->_table1 . '` where booklist_id = ' . $booklist_id . ';';\n\n if ($this->query($query)) return true;\n else return false;\n }", "function isBookExists($book, $connection) {\n $q = mysqli_query($connection, 'SELECT * \n FROM books\n WHERE book_title = \"' . $book . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка!';\n echo mysqli_error($connection);\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return mysqli_fetch_assoc($q)['book_id'];\n }\n }\n}", "function textbook_exists($db, $id)\n{\n\t$sql = 'SELECT * FROM textbooks where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >=1);\n}", "function doesBookExist($bookName)\n{\n\tglobal $UTILS_TABLE_NAME;\n\n\t// Construct & execute MySQL query to detect duplicate.\n\t// Look in table $tableName for entries called $bookName.\n\t$sql = \"SELECT * FROM $UTILS_TABLE_NAME WHERE book_name = '$bookName'\";\n\t$queryResult = mysql_query($sql);\n\n\t// Return whether the results are nonempty.\n\treturn (mysql_num_rows($queryResult) > 0);\n}", "public function book_not_exists($title){\n $select_query = \"SELECT `id`, `title`, `description`, `department`, `faculty`, `author`, `publisher`, `date` FROM `books` WHERE `title`='$title'\";\n //check if book exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if book already exists \n if(mysqli_num_rows($run_select_query) == 0){\n \n return true;\n }else{\n return false;\n }\n }\n }", "private function isBooked() {\n // count all bookings from program\n $statement = 'SELECT COUNT(*) FROM booking WHERE program_id = :program_id AND user_id = :user_id;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array(\n 'user_id' => $this->getUser($this->data['cnp']),\n 'program_id' => $this->data['program']\n ));\n $result = $statement->fetchColumn();\n if ($result) {\n exit('You are already booked');\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n \n return FALSE;\n }", "public function check_existence($id)\n {\n $nr= DB::select(\"Select count(1) a from books where id = \".$id);\n\n if($nr[0]->a==1)\n $msg=\"The book exists\";\n else\n $msg=\"The book does not exist\";\n\n return response($msg,201) ;\n }", "function isReceiptExist()\n\t{\n\t\tglobal $db;\n\n\t\t$query = 'SELECT receipt_id FROM '.receipt_table.' WHERE receipt_id = '.$this->receipt_id;\n\t\t$db->query($query);\n\t\t$result = $db->query($query);\n\n\t\tif(!$result)\n\t\t{\n\t\t\t$err_info = $db->errorInfo();\n\t\t\techo $err_info[2];\n\t\t\terror_log('Function : isReceiptExist, Class : receipt, '.$err_info[2]);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arr = $result->fetch(PDO::FETCH_ASSOC);\n\t\t\t$receipt_id = $arr['receipt_id'];\n\t\t}\n\t\treturn $receipt_id;\n\t}", "public function addBook($book) {\n \n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"INSERT INTO book (title, author, description)\n VALUES(?, ?, ?)\");\n\n $stmt-> bindValue(1, $book->title);\n $stmt-> bindValue(2, $book->author);\n $stmt-> bindValue(3, $book->description);\n $stmt-> execute();\n\n $book-> id = $this->db-> lastInsertId();\n\n return true;\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "private function databaseExists()\n {\n try {\n if (is_numeric(Bookmark::count()) && is_numeric(Tag::count())) {\n return true;\n }\n } catch (Exception $e) {\n return false;\n }\n\n return false;\n }", "function checkQM() {\n try {\n $results = $db->query(\"SELECT * FROM borrower_tbl WHERE id='\" . $borrowerId . \"';\" );\n } catch (Exception $e) {\n echo \"Could not connect to database!: \" . $e->getMessage();\n exit;\n }\n $borrower = $results->fetchAll(PDO::FETCH_ASSOC);\n \n \n \n \n }", "function _existsInDatabase($id)\n {\n $conn = getConn();\n $sql = \"SELECT RubriekID FROM Rubriek WHERE RubriekID = ?\";\n $stmt = sqlsrv_prepare($conn, $sql, array($id));\n if (!$stmt) {\n die(print_r(sqlsrv_errors(), true));\n }\n sqlsrv_execute($stmt);\n if (sqlsrv_execute($stmt)) {\n $row = sqlsrv_has_rows( $stmt );\n if ($row === true){\n return true;\n }\n }\n return false;\n }", "function checkShoppingCartDb($customerID, $bookID){\n\n $dbConnection = parse_ini_file(\"Common/db_connection.ini\");\n extract($dbConnection);\n $myPdo = new PDO($dsn, $user, $password);\n\n\n\n $stmt = $myPdo->prepare(\"SELECT * FROM ShoppingCart WHERE UserId=:userID AND BookId=:bookID\");\n $stmt->execute(['userId' => $customerID, 'bookID'=>$bookID]);\n\n if ($stmt)\n {\n return \"exists\";\n }\n else\n {\n return \"none\";\n }\n\n\n\n}", "function checkIntegrityDb()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function if_user_has_booking($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id';\";\n $result = $db->query($sql);\n return $result;\n}", "function get_textbook_by_id($db, $bookid)\n{\n\n\t$sql = 'SELECT * FROM textbooks where removed=0 and id='.$bookid;\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us[0];\n}", "public function getBookId()\n {\n return $this->bookId;\n }", "function is_exists_doc($doc_id){\n\tif(!filter_var($doc_id, FILTER_VALIDATE_INT)){\n\t\n\treturn false;\n\t\n\t}\n\telse{\n\t\tglobal $prefix_doc;\n\t\t$query = borno_query(\"SELECT * FROM $prefix_doc WHERE id='$doc_id'\");\n\t\t\n\t\t$count = mysqli_num_rows($query);\n\t\tif($count==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\n\t}\n\n}", "private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }", "public function addBook($bookData) {\n $book = Book::firstOrCreate(\n ['isbn10' => $bookData['isbn10']],\n [\n 'title' => $bookData['title'],\n 'author_id' => $bookData['authorid'],\n 'author_name' => $bookData['author'],\n 'summary' => '',\n 'isbn13' => $bookData['isbn13'],\n 'image' => $bookData['image'],\n 'publish' => $bookData['year'],\n 'olid' => $bookData['olid']\n ]\n );\n return $book->id;\n }", "private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }", "public function viewBookId()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t// sql\n\t\t\t$isbn = $_POST['ISBN'];\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT book_id FROM lib_book_unique where isbn = '{$isbn}' and\n\t\t\t\t\tbook_id not in (select book_id from lib_remove);\";\n\t\t\t$return = $book->query($sql);\n\n\t\t\tif ($return) {\n\n\t\t\t\t$return1 = array();\n\t\t\t\tfor ($k = 0; $k < count($return); $k++) {\n\t\t\t\t\t$iid = $return[$k]['book_id'];\n\t\t\t\t\t$temp_num = 100000;\n\t\t\t\t\t$bkid = $iid + $temp_num;\n\t\t\t\t\tarray_push($return1, substr($bkid, 1, 5));\n\t\t\t\t}\n\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return1),\n\t\t\t\t\t'msg' => 'success'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'query error'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function getId_book()\n {\n return $this->id_book;\n }", "function _check_product_in_db($product){\n if (in_array($product, $this->db)){\n // echo 'Product already in the database.';\n return True;\n }\n // echo 'Product not in the database.';\n return False;\n }", "public function checkDatabaseStructure( );", "protected function checkDatabase(){\n //echo \"inCheckDatabaseCourseT \";\n $dataArrays = readFromFile('coursesTakenDB.csv');\n $headersArray = $dataArrays['keysArray'];\n $valuesArray = $dataArrays['valuesArray'];\n\n $resultArray = createAssocArray($headersArray,$valuesArray);\n\n // FIX THIS!!!\n foreach($resultArray as $item){\n if($item['Student Number'] == $this->studentNumber && $item['Course Code'] == $this->courseCode && $item['Course Year'] == $this->courseYear && $item['Course Semester'] == $this->courseSemester && $item['Grade'] == $this->grade){\n return TRUE;\n }\n }\n }", "function remove_book($db, $bookid)\n{\n\t$sql = \"UPDATE textbooks SET removed = 1 where id = :id\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$bookid));\n\treturn;\n}", "public function findByBookId($bookId);", "public function setId_book($id_book)\n {\n $id_book = (int) $id_book;\n if (is_int($id_book) && $id_book > 0) {\n $this->id_book = $id_book;\n }\n }", "function is_deal_booked_by_user($mobile,$deal_id){\n //check this deal is not booked by this user already\n $count = Db::rowCount(\"booked_deals\",array(\n \"mobile\" => $mobile,\n \"deal_id\" => $deal_id\n ),array(\"=\",\"=\"));\n return $count >= 1 ? true : false;\n}", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "public function checkInDB($db)\n\t{\n\t\t$sql = \"SELECT defendantID FROM defendant WHERE SSN='\" . $this->getSSN() . \"'\";\n\t\tif ($GLOBALS['debug'])\n\t\t\tprint $sql;\n\t\t$result = $db->query($sql);\n\t\tif (!$result)\n\t\t{\n\t\t\tif ($GLOBALS['debug'])\n\t\t\t\tdie('Could not check if the Defendant was in the DB:' . $db->error);\n\t\t\telse\n\t\t\t\tdie('Could not check if the Defendant was in the DB');\n\t\t}\n\n\t\t// if there is a row already, then set the person ID, return true, and get out\n\t\tif ($result->num_rows>0)\n\t\t{\n\t\t\t$personID = $result->fetch_array();\n\t\t\t$this->setPersonID($personID[0]);\n\t\t\t$result->close();\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result->close();\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function doubleCheck($author, $title) {\n // search the db for author/title combination\n $check = $this->conn->prepare(\"SELECT COUNT(*) FROM books WHERE author = ? AND title = ?\");\n $check->bindParam(1, $author);\n $check->bindParam(2, $title);\n $check->execute();\n \n // return true if a record is found, false if none is found\n if ($check->fetchColumn() == 0) {\n return false;\n } else {\n return true;\n }\n }", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}", "public function getBookid($book_id){\n $db = new DbConnect();\n $con =$db->connect();\n $books_id = mysqli_real_escape_string($con,$book_id);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where book.book_id = '$books_id'\");\n $books = mysqli_fetch_array($result,MYSQLI_ASSOC);\n return $books;\n\n }", "private function updateDatabase(){\n\t\t$btrn = $this->findBTRN();\n\t\tif (!$btrn){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tprint \"Review Information:\\n\\tTitle: $this->title\\n\\tAuthor: $this->author\\n\\tISBN: $this->isbn\\n\\tBTRN: $btrn\\n\";\t\n\n\n\t\t// INSERT THE REVIEW INTO THE book TABLE\n\t\tdate_default_timezone_set('America/New_York');\n\t\t$dayOfWeek = strftime(\"%A\", strtotime($this->pubDate));\t\n\t\tprint \"$dayOfWeek Review\\n\";\n\n\t\t$sundayReviewLink = $bookReviewLink = NULL;\n\t\t//\tFind out and set whether it was a Sunday Review or just a Book Review, set the variable to reference the Book Review URL\n\t\tif ($dayOfWeek == 'Sunday'){\n\t\t\t$sundayReviewLink = $this->url;\n\t\t}\t\n\t\telse{\n\t\t\t$bookReviewLink = $this->url;\n\t\t}\n\t\t\n\t\t$bookID = $this->insertIntoBooksTable($btrn, $sundayReviewLink, $bookReviewLink);\n\t\tif (!$bookID){\n\t\t\treturn false;\t//\tOur insert attempt was not successful and we can't move on\n\t\t}\n\t\tprint \"Inserted into Book. This is our Book-ID:\\t$bookID\\n\";\n\t\t\n\t\t\n\t\t// FIND ALL THE ISBNs FOR THE BOOK & INSERT INTO THE isbn TABLE\n\t\t$isbns = $this->findISBNwithBTRN($btrn);\n\t\tif (!$isbns){\n\t\t\treturn false;\n\t\t}\n\t\t$this->insertIntoISBNTable($bookID, $isbns);\n\t}", "public function checkbibAction() {\n\t\t$this -> _helper -> layout() -> disableLayout();\n\t\t$this -> _helper -> viewRenderer -> setNoRender(true);\n\n\t\t$postData = $this -> _request -> getParams();\n\t\t$bibNumber = $postData['bib'];\n\t\t$db = Zend_Db_Table_Abstract::getDefaultAdapter();\n\t\t$sql = \"SELECT * FROM participant WHERE bibnumber = '\" . $bibNumber . \"'\";\n\t\t$result = $db -> fetchAll($sql, 2);\n\t\tif (sizeof($result)) {\n\t\t\techo \"true\";\n\t\t} else {\n\t\t\techo \"false\";\n\t\t}\n\t}", "function checkNextReserve($book_no)\n\t{\n\t\t$q = $this->db->query(\"SELECT book_no FROM reserves WHERE book_no LIKE '{$book_no}'\");\n\t\treturn $q->num_rows();\n\t}", "public function delete ()\n {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE book_id = ?\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->book_id);\n\n if($result = $stmt->execute()){\n return true;\n }\n else\n {\n return false;\n }\n }", "function pageIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT private FROM pages WHERE id = ? LIMIT 1\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function deleteBook($bookID)\n {\n \tinclude(\"../Database/db_connect.php\");\n\n\t\t$result = mysqli_query($dbhandle, \"SELECT * FROM books WHERE Groupnumber = '31' AND Bookid='$bookID'\") or die (mysql_error());\n\n \t//if this book doesn't exist, error out\n \tif(mysqli_num_rows($result) == 0)\n \t{\n \t\t$_SESSION[\"error\"] = \"cannot delete book, book doesn't exist\";\n \t}\n\n \t//if it exists get a list of copyID's\n \telse\n \t{\n \t\t$result2 = mysqli_query($dbhandle, \"SELECT * from bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n \t\t$copyIDList = array();\n\n \t\twhile($row = mysqli_fetch_array($result2))\n \t\t{\n \t\t\t$result3 = mysqli_query($dbhandle, \"SELECT * FROM shelves WHERE Groupnumber = '31' AND Copyid = '$row[Copyid]'\") or die (mysql_error());\n \t\t\t$shelf_data = mysqli_fetch_array($result3);\n \t\t\t$copyIDList[$shelf_data['Copyid']] = $shelf_data['Shelfid'];\n \t\t}\n\n \t\t//remove book from database\n //remove copy id's from shelf\n foreach($copyIDList as $copyIDKey => $shelfIDValue)\n {\n for($i = 0; $i < 10; $i++)\n {\n if($this->shelf[$i]->index == $shelfIDValue)\n {\n $this->shelf[$i]->deleteBook($copyIDKey);\n mysqli_query($dbhandle, \"DELETE FROM loanHistory WHERE Groupnumber = '31' AND Copyid = '$copyIDKey'\");\n }\n }\n }\n\n mysqli_query($dbhandle, \"DELETE FROM bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n mysqli_query($dbhandle, \"DELETE FROM books WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n \t}\n\n \tinclude(\"../Database/db_close.php\");\n }", "public function isInDB() {\n\t\t$db = Loader::db();\n\t\treturn (boolean) $db->getOne('select count(*) from '.$this->btTable.' where bID = ?', array($this->bID));\n\t}", "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 checkIDexists($car_id){\n $this->db->query('SELECT `id` FROM ' . CARS_TABLE . ' WHERE `id` = ' .$car_id);\n $this->db->getSingle();\n\n if( $this->db->rowCount() >= 1){\n return true;\n }else{\n return false;\n }\n }", "public function modifyBook($book) {\n\n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"UPDATE book set title = :title, \n author = :author, \n description = :description \n WHERE id = :id\");\n\n $stmt-> bindValue(':id', $book->id);\n $stmt-> bindValue(':title', $book->title);\n $stmt-> bindValue(':author', $book->author);\n $stmt-> bindValue(':description', $book->description);\n\n $stmt-> execute();\n\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "public function checkDatabaseFile()\n {\n return file_exists($this->getDatabasePath());\n }", "public function does_database_have_data() {\n\t\tglobal $wpdb;\n\n\t\t$tableprefix = $wpdb->prefix;\n\t\t$simple_history_table = self::DBTABLE;\n\n\t\t$sql_data_exists = \"SELECT id AS id_exists FROM {$tableprefix}{$simple_history_table} LIMIT 1\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$data_exists = (bool) $wpdb->get_var( $sql_data_exists, 0 );\n\n\t\treturn $data_exists;\n\t}", "function isvalidAlbum($aid, $sqlConnection)\r\n{ $result = array();\r\n\t$sqlSuccess = get_sql_results($result, $sqlConnection,\r\n\t\t\t\"select * from Albums \".\r\n\t\t\t\"where albumID = '$aid'\");\r\n\treturn $sqlSuccess;\r\n}", "function exists() {\r\n\t\t$sql_inicio \t= \" select * from \".$this->table.\" where \";\r\n\t\t$sql_fim \t\t= \" \".($this->get($this->pk) ? \" and \".$this->pk.\" <> \".$this->get($this->pk) : \"\").\" limit 1 \";\r\n\t\t\r\n\t\t$sql \t= \"con_id = \".$this->get(\"con_id\").\" and exa_id = \".$this->get(\"exa_id\").\" \";\r\n\t\tif (mysql_num_rows(Db::sql($sql_inicio.$sql.$sql_fim))){\r\n\t\t\t$this->propertySetError (\"con_id\", \"Já existe no banco de dados.\");\r\n\t\t\t$this->propertySetError (\"exa_id\", \"Já existe no banco de dados.\");\r\n\t\t}\r\n\t}", "public function edit($id)\n {\n $book = DB::select('SELECT tblbooks.id,tblbooks.name,author_id,\n year_of_publish,\n amount,\n isbn,\n medium,\n image,\n users.name as userName,\n tblcatagories.id as cate_id\n FROM tblbooks,users,tblcatagories\n WHERE tblbooks.author_id=users.id \n AND cat_id=tblcatagories.id AND tblbooks.id='.$id);\n\n $check = Book::where('author_id',Auth::id())->first();\n\n\n if (sizeof($book) > 0 && $check->author_id == Auth::id())\n {\n return view('book.edit')->with('book',$book);\n }\n else\n {\n return redirect('/book')->with('error','Book Does not exist!');\n }\n }", "static function exists($ident) {\n\t\n\t\trequire_once 'DBO.class.php';\n\t\n\t\t$db = DBO::getInstance();\n\t\t$ids = $db->prepare('SELECT id FROM projects');\n\t\t$ids->execute();\n\t\tif($ids->errorCode() != 0)\t{\n\t\t\t$error = $ids->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\t\n\t\twhile($id = $ids->fetch())\n\t\t\tif($ident == $id[id])\n\t\t\t\treturn true;\n\t\n\t\treturn false;\n\t}", "function v1_check_db_simple($name, $key, $code, $owners) {\n\t\n\tglobal $warnings;\n\t\n\t// If already in database, send a warning\n\t$id=v1_get_id($key, $code, $owners);\n\t\n\tif (!empty($id)) {\n\t\t// Warning: already in database\n\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t// 1st owner\n\t\tif (!empty($owners[0])) {\n\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t}\n\t\t// 2nd owner\n\t\tif (!empty($owners[1])) {\n\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t}\n\t\t// 3rd owner\n\t\tif (!empty($owners[2])) {\n\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t}\n\t\tarray_push($warnings, $warning_msg);\n\t}\n\t\n}", "function does_id_exist($data1, $data2)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post WHERE (spotlight_post_block = 0) AND (spotlight_post_id = ' . $data1 . ' AND member_id = ' . $data2 . ')';\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$post_exists = 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$post_exists = 0;\r\n\t\t}\r\n\t\treturn $post_exists;\r\n\t}", "function is_rowid_exist($rowid,$db_table='') {\r\n $db_table = $db_table == '' ? $this->db_table : $GLOBALS['dbpre'].$db_table;\r\n $sql = 'select 1 from '.$db_table.' where rowid='.intval($rowid);\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n return mysql_num_rows($res);\r\n }", "function existsInDB($value,$column,$table) {\r\n //connect to mysql database\r\n\t$hostname = \"localhost\";\r\n\t$dbuser=\"root\";\r\n\t$dbpass=\"root\";\r\n\t$db=\"bookstore_test\";\r\n\t$conn = @mysqli_connect($hostname,$dbuser,$dbpass,$db) \r\n\t\t\tor die('Could not connect to MySQL DB -> ' . mysqli_connect_error());\r\n\t\t\t\r\n\t$exists = false;\r\n\t$query = mysqli_query($conn, \"SELECT * FROM \".$table.\" WHERE \".$column.\"='\".$value.\"';\");\r\n if (!$query)\r\n die('Error connecting to database: ' . mysqli_connect_error($conn));\r\n \r\n if(mysqli_num_rows($query) > 0)\r\n\t $exists = true;\r\n \r\n mysqli_close($conn);\r\n\treturn $exists;\r\n}", "public function addBook($book)\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.addBook\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //sends the model to the create function in the data service\n $success = $service->addBookToList($book);\n \n //closes the connection\n $conn = null;\n \n //if it is successful return true\n if ($success == 1) { return true; }\n //else return false\n else { return false; }\n MyLogger::info(\"Exiting OwnedBookBusinessService.addBook\");\n }", "private function check_db() {\n if (ee()->db->table_exists($this->table_name)) {\n return true;\n }\n return $this->make_db();\n }", "function book_offer() {\n\n $collectorId = $_SESSION['demo']['user_id'];\n $offerId = $_GET['offerId'];\n //$date = date('d/m/y');\n //$time =date('h:m:s');\n //$insert = mysql_query(\"INSERT INTO stock(offer_ID, collector_ID,collection_date,amount, remark, status) VALUES(d','$collectorId','$date','$time')\") or die ('Unable to add booking'.mysql_error());\n $check = mysql_query(\"SELECT status from offer WHERE offer_ID='$offerId'\");\n if ($check) {\n if (mysql_result($check, 0, 'status') == \"available\") {\n if (mysql_query(\"UPDATE offer SET status ='booked', collector_id='$collectorId' WHERE offer_ID ='$offerId'\") )\n return 1;\n else\n return -1;\n }\n else\n return -1;\n } else {\n return -1;\n }\n}", "public function isItemBooked(int $itemId): bool\n {\n $isItemBooked = BookingModel::model()->find('play_id = :playId AND item_id = :itemId AND status != :status', array(\n ':playId' => $this->playid,\n ':itemId' => $itemId,\n ':status' => 'declined',\n ));\n\n return !!$isItemBooked;\n }", "private function checkDB($userID) {\n\t\treturn FacebookFriends::find('all', array('conditions' => array('userid' => $userID)));\n\n\t}", "function chk_teach_id(){\n\n\t\t$Q = $this->teach_lgn->chk_teach_id();\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "public static function exists($adinumber=\"\") {\n global $database;\n \n $sql = \"SELECT * FROM \".static::$table_name.\" \";\n $sql .= \"WHERE adinumber = '{$adinumber}' \";\n $sql .= \"LIMIT 1\";\n $result_array = self::find_by_sql($sql);\n return !empty($result_array) ? true : false;\n }", "public function associateToBook(Book $book)\n {\n if (!$this->getId()) {\n try {\n $this->findByName($this->getName());\n } catch (TagNotFoundException $e) {\n // Do noting it's a new tag\n }\n }\n\n return (bool) $this->getRepository()\n ->associateToBook($this, $book);\n }", "function doesUserOwnBook()\n\t{\n\t\tglobal $conn;\n\t\tglobal $myObj;\n\t\tglobal $params_arr;\n\n\t\t$bookTitle = urldecode($_POST['title']);\n\t\t$userID = intval(urldecode($_POST['userid']));\n\n\t\t$sql = \"SET @BOOK_TITLE = '$bookTitle', @USED_ID = '$userID'\";\n\t\t\n\t\tif ($conn->query($sql) === TRUE) \n\t\t{\n\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t\t}\n\n\t\t$sql = \"SELECT TITLE\n\t\t\t\tFROM books JOIN booksowned ON booksowned.book_id = books.id\n\t\t\t\tWHERE booksowned.user_id = @USED_ID AND books.title = @BOOK_TITLE\";\n\n\t\t//Executes query string\n\t\t$result = $conn->query($sql);\n\n\t\t\n\t\tif ($result->num_rows == 1){\n\t\t\techo \"true\";\n\t\t}\n\t\telse{\n\t\t\techo \"false\";\n\t\t}\n\t\t\n\t\t/* Julian backup\n\t\tif ($result->num_rows == 0) \n\t\t{\n\t\t\t$json = array();\n\t \t// convert the data into json object\n\t \twhile($row = $result->fetch_assoc()) \n\t \t{\n\t\t\t\t$bus = array(\n\t\t\t\t\t\"title\" => $row[\"TITLE\"]\n\t\t\t\t);\n\n\t\t\t\tarray_push($json, $bus);\n\t\t\t}\n\n\t\t\t$jsonstring = json_encode($json);\n\t\t\techo $jsonstring;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t echo \"0 results\";\n\t\t}\n\t\t*/\n\n\n\n\t\t$conn->close();\n\t}", "public function islecturersExisting ($id){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM lecturers \";\n $sqlQuery .= \"WHERE id= $id\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }", "public function book($id){\n try{\n $id = Crypt::decryptString($id);\n } catch (DecryptException $e) {\n return 'UPD-E0002';\n }\n \n $book = Book::find($id);\n $authors = Author::all()->where('status', NULL);\n return view('bahai.forms.update.book', compact('book', 'authors'));\n }", "public function addBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$ISBN = $_POST['ISBN'];\n\t\t\t$title = $_POST['title'];\n\t\t\t$author = $_POST['author'];\n\t\t\t$press = $_POST['press'];\n\t\t\t$category = $_POST['category'];\n\t\t\t$pub_date = $_POST['pub_date'];\n\t\t\t$price = $_POST['price'];\n\t\t\t$floor = $_POST['floor'];\n\t\t\t$bookshelf = $_POST['bookshelf'];\n\t\t\t$area_code = $_POST['area_code'];\n\t\t\t$number = $_POST['number'];\n\t\t\t$book = D('Book_species');\n\t\t\t$sql1 = \"select count(*) as a from lib_book_unique\";\n\t\t\t$return23 = $book->query($sql1);\n\t\t\t$num = $return23[0]['a'];\n\t\t\t$newbookid = array();\n\t\t\tfor ($k = 1; $k <= $number; $k++) {\n\t\t\t\t$numnew = $k + $num;\n\t\t\t\t$temp_num = 100000;\n\t\t\t\t$new_num = $numnew + $temp_num;\n\t\t\t\tarray_push($newbookid, substr($new_num, 1, 5));\n\t\t\t}\n\t\t\t$sql2333 = \"select * from lib_book_species where isbn = '{$ISBN}';\";\n\t\t\t$return2333 = $book->query($sql2333);\n\t\t\t$sql = \"insert into lib_book_species(isbn,title,author,press,\n\t\t\t\t\tcategory,pub_date,price,floor,bookshelf,area_code) \n\t\t\t\t\tvalues('{$ISBN}','{$title}','{$author}',\n\t\t\t\t\t'{$press}','{$category}','{$pub_date}',\n\t\t\t\t\t'{$price}','{$floor}','{$bookshelf}','{$area_code}');\";\n\t\t\tif(!$return2333){\n\t\t\t\t$return = $book->execute($sql);\n\t\t\t}\n\t\t\t$return = true;\n\t\t\t$sql1 = \"insert into lib_book_unique(isbn) values('{$ISBN}');\";\n\t\t\tfor ($i = 0; $i < $number; $i++) {\n\t\t\t\t$return1 = $book->execute($sql1);\n\t\t\t\t$return = $return && $return1;\n\t\t\t}\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'msg' => 'Add successfully!',\n\t\t\t\t\t'newbookid' => json_encode($newbookid)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "function donationIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM donation WHERE id = ?\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "function db_checkCSID($csid) {\n $conn = OpenCon();\n \n //$stmt->bind_param( \"ss\", $table_name, $csid );\n $tables = array( 'admin', 'aio', 'professor', 'student' );\n foreach( $tables as $table_name ) {\n\n $st = \"SELECT * FROM `$table_name` WHERE csid='$csid'\";\n\n $result = $conn->query( $st );\n if( !$result ){\n echo \"Database Error. Please contact admin.\\nError details: \" . $conn->error;\n $result->close();\n break;\n }\n elseif( $result->num_rows > 0 ) {\n $result->close();\n return true;\n\n }\n }\n return false;\n }", "function pageIdExists($id)\r\n{\r\n\tglobal $mysqli,$db_table_prefix;\r\n\t$stmt = $mysqli->prepare(\"SELECT private\r\n\t\tFROM \".$db_table_prefix.\"pages\r\n\t\tWHERE\r\n\t\tid = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"i\", $id);\t\r\n\t$stmt->execute();\r\n\t$stmt->store_result();\t\r\n\t$num_returns = $stmt->num_rows;\r\n\t$stmt->close();\r\n\t\r\n\tif ($num_returns > 0)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\t\r\n\t}\r\n}", "function addBook($userid,$bookid,$num=1){\n \t\n \t\n \t$res=$this->fetchAll(\"userid=$userid AND bookid=$bookid\")->toArray();\n \t\n \t\n\n//======means the client has bought this kind of products before\n\t \tif (count($res)>0) { \t\t\t\t\n\t \t\t$data=array(\n\t \t\t\t'nums'=>$res[0]['nums']+1\n\t \t\t);\n\t \t\t$where=\"userid=$userid AND bookid=$bookid\";\n\t \t\t$this->update($data, $where);\n\t \t\treturn true;\n\t \t}else{\n//========means the client buy this kind of products first time\n\t\t \t$date=time();\n\t\t \t$data=array(\n\t\t \t\t\t'userid'=>$userid,\n\t\t \t\t\t'bookid'=>$bookid,\n\t\t \t\t\t'nums'=>$num, \n\t\t \t\t\t'date'=>$date\n\t\t \t);\n\t\t \t\n\t\t \tif ($this->insert($data)>0) {\n\t\t \t\t\n\t\t \t\treturn true;\n\t\t \t}else{\n\t\t \t\treturn false;\n\t\t \t}\n\t \t}\n \t\n }", "function check_deal_id_is_valid($deal_id){\n $count = Db::rowCount(\"deals\",array(\n \"id\" => $deal_id,\n \"active\" => \"y\"\n ),array(\"=\",\"=\"));\n return $count == 1 ? true : false;\n}", "function check_exits_idField($code,$field, $table, &$db)\n{\n\n\t$sql_check = \"SELECT * FROM \".$table.\" WHERE `\".$field.\"` = '\".$code.\"'\";\n\t$sql_check = $db->sql_query($sql_check) or die(mysql_error());\n\t$exits \t = $db->sql_fetchfield(0);\n\tif($exits)return true;\n\telse return false;\n}", "public function checkInTable($param){\n try{\n $this->connect();\n $sql = \"SELECT article_id FROM articles WHERE \" . $param;\n $statement = $this->db->prepare($sql);\n $statement->execute();\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n if (false === $result){\n return true;\n }else{\n return false;\n }\n }catch (PDOException $e){\n echo $e->getMessage();\n }\n }", "function ifAvailable($isbn,$con)\r\n\t{\r\n\t\t$result = mysqli_query($con, \"SELECT * from booksdb where isbn13 IN ('$isbn');\");\r\n\t\t$row = mysqli_fetch_array($result);\r\n\t\tif($row['copies'] == $row['rented'])\r\n\t\t{\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$available = $row['copies'] - $row['rented'];\r\n\t\t\treturn $available;\r\n\t\t}\r\n\t}", "function isAuthorExists($author_name, $connection) {\n $q = mysqli_query($connection, 'SELECT * \n FROM authors\n WHERE author_name = \"' . $author_name . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка!';\n if ($debug) {\n echo mysqli_error($connection);\n }\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return true;\n }\n }\n}", "function isPrimaryKey(): bool;", "function booking_on_hold($book_id)\r\n\t{\r\n\r\n\t}", "public function hasId(){\n return $this->_has(17);\n }", "function IfExists($EquipmentId) {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM account WHERE AccountId = '$AccountId' ;\");\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function _verify(){\n $e = \"\";\n if (isset($_POST['verder'])) {\n foreach($_POST as $key=>$value){\n if($key== 'verder') continue;\n $value = validate($value);\n if(!$this->_existsInDatabase($value)){\n $e = \"ID komt niet voor in Database\";\n }\n }\n }\n return $e;\n }", "public function exists($uid){\n return isset($this->db[$uid]);\n }", "function linkIdExists($id) {\n\t$id = intval($id);\n\treturn(dbResultExists(\"SELECT id FROM links WHERE id=$id\"));\n}", "public function validateSchoolNameExistenceMapToId($schoolName,$id){\n $handle = $this->con->prepare(\"SELECT * FROM school WHERE schoolName = ? AND id != ?\");\n $handle->execute([$schoolName,$id]); \n \n if($handle->rowCount()>0){\n return SCHOOL_NAME_AREADY_EXIST;\n }else{\n return SCHOOL_NAME_DOES_NOT_EXIT;\n }\n }", "public static function is_id_exist($image_id){\n\n\t\t$id_sql = self::_get_connection()->select(\"SELECT ID FROM apine_images WHERE ID=$image_id\");\n\t\tif($id_sql){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\n\t}", "public function actionCheckId() {\n $id = $_POST['id'];\n $row = 0;\n $object = Yii::app()->db->createCommand(\"select * from hobby_new where id=\" . $id)->queryRow();\n if (!empty($object['id'])) {\n $row = 1;\n }\n echo $row;\n }", "public function getbookbyId($id){\n\n\t\t\t$this->db->select('id,name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t->from('tbl_books')\n\t\t\t\t\t->where('id', $id);\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() == 1){\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\t\n\t\t\t}\n\t\t\t\n\t\t}", "public function check_db_existance($database=false, $response=true){\n\t\t\n\t\t$db_selected = $this->set_db($database);\n\t\t\n\t\tif (!$db_selected) {\n\t\t\t\n\t\t\t$result = false;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$result = true;\n\t\t\t\n\t\t}\n\n\t\tif($response){\n\t\t\t\n\t\t\treturn $result;\n\t\t}\n\t\n\t}", "function dbCheck($data){\n\t\t\t\t$sql = \"SELECT UID FROM user_info WHERE email = '$data'\";\n\n\t\t\t\t$result = mysqli_query($GLOBALS['db'], $sql);\n\t\t\t\t$count = mysqli_num_rows($result);\n\t\t\t\tif(!$result || $count == 0){\n\t\t\t\t\treturn \"This user does not exist.\";\n\t\t\t\t}//if\n\t\t\t\telse{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}//ifelse\n\t\t\t\treturn \"\";\n\n\t}", "function ipal_check_active_question(){\r\n global $DB;\r\n global $ipal;\r\n if($DB->record_exists('ipal_active_questions', array('ipal_id'=>$ipal->id))){\r\nreturn(1);\r\n }\r\n else\r\n {\r\n return(0);\r\n }\r\n}", "public function isIdNubmerExist($id_number)\r\n\t{\r\n\t\t$select=$this->select();\r\n\t\t$select->from($this,'id_number')\r\n\t\t\t->where(\"id_number=?\",$id_number);\r\n\t\t$row=$this->fetchRow($select);\r\n\t\tif(!$row) return false;\r\n\t\treturn true;\r\n\t}", "private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }", "private function checkPrimaryKey($load) {\n\t\t$TableConfig = $this->config_crud;\n\t\tif ($TableConfig):\n\t\t\tforeach ($TableConfig->fields as $name=>$field):\n\t\t\t\tif (@$field->key== \"PRI\"):\n\t\t\t\t\tif (!($this->input->get($name))):\n\t\t\t\t\t\treturn false;\n\t\t\t\t\telse:\n\t\t\t\t\t\t$this->data[\"x_\".$name] = $this->input->get($name);\n\t\t\t\t\t\t$this->primaryKey[$name] = $this->input->get($name);\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\tendif;\n\t\t\n\t\treturn true;\n\t}", "function IfExists($ratecode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `paymentrates` WHERE RateCode='$ratecode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }" ]
[ "0.704528", "0.6779156", "0.66037446", "0.655546", "0.63998103", "0.63399404", "0.6162267", "0.6012148", "0.600279", "0.600212", "0.59805155", "0.5972165", "0.5923847", "0.59002465", "0.58707213", "0.5834729", "0.57784534", "0.5762515", "0.57581306", "0.57447696", "0.57383", "0.5735855", "0.5735054", "0.5732227", "0.5725823", "0.5695341", "0.56828445", "0.5678853", "0.566718", "0.56633675", "0.5660651", "0.5654024", "0.565066", "0.5631824", "0.5628623", "0.5621749", "0.56153166", "0.5606756", "0.5601683", "0.55943334", "0.55780655", "0.55770826", "0.5572298", "0.5554984", "0.5548093", "0.5529092", "0.5529006", "0.5507714", "0.5507493", "0.54601336", "0.5455258", "0.5448785", "0.54214245", "0.541763", "0.5412594", "0.5412509", "0.5406126", "0.5405167", "0.539768", "0.5392629", "0.53916156", "0.53896904", "0.5374476", "0.53656197", "0.5362355", "0.5343194", "0.53382427", "0.5337557", "0.53374654", "0.5337152", "0.5323495", "0.5318217", "0.53063846", "0.5304442", "0.5294326", "0.52918357", "0.5282858", "0.5281795", "0.5277426", "0.52771884", "0.5276917", "0.5273158", "0.5271763", "0.5266539", "0.52528536", "0.5252211", "0.5250563", "0.52497464", "0.5248643", "0.5248282", "0.52419734", "0.52402574", "0.5231709", "0.5230041", "0.52292675", "0.52292675", "0.52292675", "0.52292675", "0.52292675", "0.52292675" ]
0.5455936
50
check database for bookID
public function deleteBook($bookID) { include("../Database/db_connect.php"); $result = mysqli_query($dbhandle, "SELECT * FROM books WHERE Groupnumber = '31' AND Bookid='$bookID'") or die (mysql_error()); //if this book doesn't exist, error out if(mysqli_num_rows($result) == 0) { $_SESSION["error"] = "cannot delete book, book doesn't exist"; } //if it exists get a list of copyID's else { $result2 = mysqli_query($dbhandle, "SELECT * from bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'") or die (mysql_error()); $copyIDList = array(); while($row = mysqli_fetch_array($result2)) { $result3 = mysqli_query($dbhandle, "SELECT * FROM shelves WHERE Groupnumber = '31' AND Copyid = '$row[Copyid]'") or die (mysql_error()); $shelf_data = mysqli_fetch_array($result3); $copyIDList[$shelf_data['Copyid']] = $shelf_data['Shelfid']; } //remove book from database //remove copy id's from shelf foreach($copyIDList as $copyIDKey => $shelfIDValue) { for($i = 0; $i < 10; $i++) { if($this->shelf[$i]->index == $shelfIDValue) { $this->shelf[$i]->deleteBook($copyIDKey); mysqli_query($dbhandle, "DELETE FROM loanHistory WHERE Groupnumber = '31' AND Copyid = '$copyIDKey'"); } } } mysqli_query($dbhandle, "DELETE FROM bookscopy WHERE Groupnumber = '31' AND Bookid = '$bookID'") or die (mysql_error()); mysqli_query($dbhandle, "DELETE FROM books WHERE Groupnumber = '31' AND Bookid = '$bookID'") or die (mysql_error()); } include("../Database/db_close.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkBooklistID($booklist_id) {\n $query = 'select * from `'. $this->_table1 . '` where booklist_id = ' . $booklist_id . ';';\n\n if ($this->query($query)) return true;\n else return false;\n }", "function isBookExists($book, $connection) {\n $q = mysqli_query($connection, 'SELECT * \n FROM books\n WHERE book_title = \"' . $book . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка!';\n echo mysqli_error($connection);\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return mysqli_fetch_assoc($q)['book_id'];\n }\n }\n}", "function textbook_exists($db, $id)\n{\n\t$sql = 'SELECT * FROM textbooks where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >=1);\n}", "function doesBookExist($bookName)\n{\n\tglobal $UTILS_TABLE_NAME;\n\n\t// Construct & execute MySQL query to detect duplicate.\n\t// Look in table $tableName for entries called $bookName.\n\t$sql = \"SELECT * FROM $UTILS_TABLE_NAME WHERE book_name = '$bookName'\";\n\t$queryResult = mysql_query($sql);\n\n\t// Return whether the results are nonempty.\n\treturn (mysql_num_rows($queryResult) > 0);\n}", "public function book_not_exists($title){\n $select_query = \"SELECT `id`, `title`, `description`, `department`, `faculty`, `author`, `publisher`, `date` FROM `books` WHERE `title`='$title'\";\n //check if book exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if book already exists \n if(mysqli_num_rows($run_select_query) == 0){\n \n return true;\n }else{\n return false;\n }\n }\n }", "private function isBooked() {\n // count all bookings from program\n $statement = 'SELECT COUNT(*) FROM booking WHERE program_id = :program_id AND user_id = :user_id;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array(\n 'user_id' => $this->getUser($this->data['cnp']),\n 'program_id' => $this->data['program']\n ));\n $result = $statement->fetchColumn();\n if ($result) {\n exit('You are already booked');\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n \n return FALSE;\n }", "public function check_existence($id)\n {\n $nr= DB::select(\"Select count(1) a from books where id = \".$id);\n\n if($nr[0]->a==1)\n $msg=\"The book exists\";\n else\n $msg=\"The book does not exist\";\n\n return response($msg,201) ;\n }", "function isReceiptExist()\n\t{\n\t\tglobal $db;\n\n\t\t$query = 'SELECT receipt_id FROM '.receipt_table.' WHERE receipt_id = '.$this->receipt_id;\n\t\t$db->query($query);\n\t\t$result = $db->query($query);\n\n\t\tif(!$result)\n\t\t{\n\t\t\t$err_info = $db->errorInfo();\n\t\t\techo $err_info[2];\n\t\t\terror_log('Function : isReceiptExist, Class : receipt, '.$err_info[2]);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arr = $result->fetch(PDO::FETCH_ASSOC);\n\t\t\t$receipt_id = $arr['receipt_id'];\n\t\t}\n\t\treturn $receipt_id;\n\t}", "private function databaseExists()\n {\n try {\n if (is_numeric(Bookmark::count()) && is_numeric(Tag::count())) {\n return true;\n }\n } catch (Exception $e) {\n return false;\n }\n\n return false;\n }", "public function addBook($book) {\n \n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"INSERT INTO book (title, author, description)\n VALUES(?, ?, ?)\");\n\n $stmt-> bindValue(1, $book->title);\n $stmt-> bindValue(2, $book->author);\n $stmt-> bindValue(3, $book->description);\n $stmt-> execute();\n\n $book-> id = $this->db-> lastInsertId();\n\n return true;\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "function checkQM() {\n try {\n $results = $db->query(\"SELECT * FROM borrower_tbl WHERE id='\" . $borrowerId . \"';\" );\n } catch (Exception $e) {\n echo \"Could not connect to database!: \" . $e->getMessage();\n exit;\n }\n $borrower = $results->fetchAll(PDO::FETCH_ASSOC);\n \n \n \n \n }", "function _existsInDatabase($id)\n {\n $conn = getConn();\n $sql = \"SELECT RubriekID FROM Rubriek WHERE RubriekID = ?\";\n $stmt = sqlsrv_prepare($conn, $sql, array($id));\n if (!$stmt) {\n die(print_r(sqlsrv_errors(), true));\n }\n sqlsrv_execute($stmt);\n if (sqlsrv_execute($stmt)) {\n $row = sqlsrv_has_rows( $stmt );\n if ($row === true){\n return true;\n }\n }\n return false;\n }", "function checkShoppingCartDb($customerID, $bookID){\n\n $dbConnection = parse_ini_file(\"Common/db_connection.ini\");\n extract($dbConnection);\n $myPdo = new PDO($dsn, $user, $password);\n\n\n\n $stmt = $myPdo->prepare(\"SELECT * FROM ShoppingCart WHERE UserId=:userID AND BookId=:bookID\");\n $stmt->execute(['userId' => $customerID, 'bookID'=>$bookID]);\n\n if ($stmt)\n {\n return \"exists\";\n }\n else\n {\n return \"none\";\n }\n\n\n\n}", "function checkIntegrityDb()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function if_user_has_booking($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id';\";\n $result = $db->query($sql);\n return $result;\n}", "function get_textbook_by_id($db, $bookid)\n{\n\n\t$sql = 'SELECT * FROM textbooks where removed=0 and id='.$bookid;\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us[0];\n}", "public function getBookId()\n {\n return $this->bookId;\n }", "function is_exists_doc($doc_id){\n\tif(!filter_var($doc_id, FILTER_VALIDATE_INT)){\n\t\n\treturn false;\n\t\n\t}\n\telse{\n\t\tglobal $prefix_doc;\n\t\t$query = borno_query(\"SELECT * FROM $prefix_doc WHERE id='$doc_id'\");\n\t\t\n\t\t$count = mysqli_num_rows($query);\n\t\tif($count==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\n\t}\n\n}", "private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }", "public function addBook($bookData) {\n $book = Book::firstOrCreate(\n ['isbn10' => $bookData['isbn10']],\n [\n 'title' => $bookData['title'],\n 'author_id' => $bookData['authorid'],\n 'author_name' => $bookData['author'],\n 'summary' => '',\n 'isbn13' => $bookData['isbn13'],\n 'image' => $bookData['image'],\n 'publish' => $bookData['year'],\n 'olid' => $bookData['olid']\n ]\n );\n return $book->id;\n }", "private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }", "function _check_product_in_db($product){\n if (in_array($product, $this->db)){\n // echo 'Product already in the database.';\n return True;\n }\n // echo 'Product not in the database.';\n return False;\n }", "public function viewBookId()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t// sql\n\t\t\t$isbn = $_POST['ISBN'];\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT book_id FROM lib_book_unique where isbn = '{$isbn}' and\n\t\t\t\t\tbook_id not in (select book_id from lib_remove);\";\n\t\t\t$return = $book->query($sql);\n\n\t\t\tif ($return) {\n\n\t\t\t\t$return1 = array();\n\t\t\t\tfor ($k = 0; $k < count($return); $k++) {\n\t\t\t\t\t$iid = $return[$k]['book_id'];\n\t\t\t\t\t$temp_num = 100000;\n\t\t\t\t\t$bkid = $iid + $temp_num;\n\t\t\t\t\tarray_push($return1, substr($bkid, 1, 5));\n\t\t\t\t}\n\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return1),\n\t\t\t\t\t'msg' => 'success'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'query error'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function checkDatabaseStructure( );", "public function getId_book()\n {\n return $this->id_book;\n }", "protected function checkDatabase(){\n //echo \"inCheckDatabaseCourseT \";\n $dataArrays = readFromFile('coursesTakenDB.csv');\n $headersArray = $dataArrays['keysArray'];\n $valuesArray = $dataArrays['valuesArray'];\n\n $resultArray = createAssocArray($headersArray,$valuesArray);\n\n // FIX THIS!!!\n foreach($resultArray as $item){\n if($item['Student Number'] == $this->studentNumber && $item['Course Code'] == $this->courseCode && $item['Course Year'] == $this->courseYear && $item['Course Semester'] == $this->courseSemester && $item['Grade'] == $this->grade){\n return TRUE;\n }\n }\n }", "function remove_book($db, $bookid)\n{\n\t$sql = \"UPDATE textbooks SET removed = 1 where id = :id\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$bookid));\n\treturn;\n}", "public function findByBookId($bookId);", "function is_deal_booked_by_user($mobile,$deal_id){\n //check this deal is not booked by this user already\n $count = Db::rowCount(\"booked_deals\",array(\n \"mobile\" => $mobile,\n \"deal_id\" => $deal_id\n ),array(\"=\",\"=\"));\n return $count >= 1 ? true : false;\n}", "public function setId_book($id_book)\n {\n $id_book = (int) $id_book;\n if (is_int($id_book) && $id_book > 0) {\n $this->id_book = $id_book;\n }\n }", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "public function checkInDB($db)\n\t{\n\t\t$sql = \"SELECT defendantID FROM defendant WHERE SSN='\" . $this->getSSN() . \"'\";\n\t\tif ($GLOBALS['debug'])\n\t\t\tprint $sql;\n\t\t$result = $db->query($sql);\n\t\tif (!$result)\n\t\t{\n\t\t\tif ($GLOBALS['debug'])\n\t\t\t\tdie('Could not check if the Defendant was in the DB:' . $db->error);\n\t\t\telse\n\t\t\t\tdie('Could not check if the Defendant was in the DB');\n\t\t}\n\n\t\t// if there is a row already, then set the person ID, return true, and get out\n\t\tif ($result->num_rows>0)\n\t\t{\n\t\t\t$personID = $result->fetch_array();\n\t\t\t$this->setPersonID($personID[0]);\n\t\t\t$result->close();\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result->close();\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function doubleCheck($author, $title) {\n // search the db for author/title combination\n $check = $this->conn->prepare(\"SELECT COUNT(*) FROM books WHERE author = ? AND title = ?\");\n $check->bindParam(1, $author);\n $check->bindParam(2, $title);\n $check->execute();\n \n // return true if a record is found, false if none is found\n if ($check->fetchColumn() == 0) {\n return false;\n } else {\n return true;\n }\n }", "function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}", "public function getBookid($book_id){\n $db = new DbConnect();\n $con =$db->connect();\n $books_id = mysqli_real_escape_string($con,$book_id);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where book.book_id = '$books_id'\");\n $books = mysqli_fetch_array($result,MYSQLI_ASSOC);\n return $books;\n\n }", "private function updateDatabase(){\n\t\t$btrn = $this->findBTRN();\n\t\tif (!$btrn){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tprint \"Review Information:\\n\\tTitle: $this->title\\n\\tAuthor: $this->author\\n\\tISBN: $this->isbn\\n\\tBTRN: $btrn\\n\";\t\n\n\n\t\t// INSERT THE REVIEW INTO THE book TABLE\n\t\tdate_default_timezone_set('America/New_York');\n\t\t$dayOfWeek = strftime(\"%A\", strtotime($this->pubDate));\t\n\t\tprint \"$dayOfWeek Review\\n\";\n\n\t\t$sundayReviewLink = $bookReviewLink = NULL;\n\t\t//\tFind out and set whether it was a Sunday Review or just a Book Review, set the variable to reference the Book Review URL\n\t\tif ($dayOfWeek == 'Sunday'){\n\t\t\t$sundayReviewLink = $this->url;\n\t\t}\t\n\t\telse{\n\t\t\t$bookReviewLink = $this->url;\n\t\t}\n\t\t\n\t\t$bookID = $this->insertIntoBooksTable($btrn, $sundayReviewLink, $bookReviewLink);\n\t\tif (!$bookID){\n\t\t\treturn false;\t//\tOur insert attempt was not successful and we can't move on\n\t\t}\n\t\tprint \"Inserted into Book. This is our Book-ID:\\t$bookID\\n\";\n\t\t\n\t\t\n\t\t// FIND ALL THE ISBNs FOR THE BOOK & INSERT INTO THE isbn TABLE\n\t\t$isbns = $this->findISBNwithBTRN($btrn);\n\t\tif (!$isbns){\n\t\t\treturn false;\n\t\t}\n\t\t$this->insertIntoISBNTable($bookID, $isbns);\n\t}", "public function checkbibAction() {\n\t\t$this -> _helper -> layout() -> disableLayout();\n\t\t$this -> _helper -> viewRenderer -> setNoRender(true);\n\n\t\t$postData = $this -> _request -> getParams();\n\t\t$bibNumber = $postData['bib'];\n\t\t$db = Zend_Db_Table_Abstract::getDefaultAdapter();\n\t\t$sql = \"SELECT * FROM participant WHERE bibnumber = '\" . $bibNumber . \"'\";\n\t\t$result = $db -> fetchAll($sql, 2);\n\t\tif (sizeof($result)) {\n\t\t\techo \"true\";\n\t\t} else {\n\t\t\techo \"false\";\n\t\t}\n\t}", "function checkNextReserve($book_no)\n\t{\n\t\t$q = $this->db->query(\"SELECT book_no FROM reserves WHERE book_no LIKE '{$book_no}'\");\n\t\treturn $q->num_rows();\n\t}", "public function delete ()\n {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE book_id = ?\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->book_id);\n\n if($result = $stmt->execute()){\n return true;\n }\n else\n {\n return false;\n }\n }", "function pageIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT private FROM pages WHERE id = ? LIMIT 1\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function isInDB() {\n\t\t$db = Loader::db();\n\t\treturn (boolean) $db->getOne('select count(*) from '.$this->btTable.' where bID = ?', array($this->bID));\n\t}", "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 checkIDexists($car_id){\n $this->db->query('SELECT `id` FROM ' . CARS_TABLE . ' WHERE `id` = ' .$car_id);\n $this->db->getSingle();\n\n if( $this->db->rowCount() >= 1){\n return true;\n }else{\n return false;\n }\n }", "public function modifyBook($book) {\n\n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"UPDATE book set title = :title, \n author = :author, \n description = :description \n WHERE id = :id\");\n\n $stmt-> bindValue(':id', $book->id);\n $stmt-> bindValue(':title', $book->title);\n $stmt-> bindValue(':author', $book->author);\n $stmt-> bindValue(':description', $book->description);\n\n $stmt-> execute();\n\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "public function checkDatabaseFile()\n {\n return file_exists($this->getDatabasePath());\n }", "public function does_database_have_data() {\n\t\tglobal $wpdb;\n\n\t\t$tableprefix = $wpdb->prefix;\n\t\t$simple_history_table = self::DBTABLE;\n\n\t\t$sql_data_exists = \"SELECT id AS id_exists FROM {$tableprefix}{$simple_history_table} LIMIT 1\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$data_exists = (bool) $wpdb->get_var( $sql_data_exists, 0 );\n\n\t\treturn $data_exists;\n\t}", "function exists() {\r\n\t\t$sql_inicio \t= \" select * from \".$this->table.\" where \";\r\n\t\t$sql_fim \t\t= \" \".($this->get($this->pk) ? \" and \".$this->pk.\" <> \".$this->get($this->pk) : \"\").\" limit 1 \";\r\n\t\t\r\n\t\t$sql \t= \"con_id = \".$this->get(\"con_id\").\" and exa_id = \".$this->get(\"exa_id\").\" \";\r\n\t\tif (mysql_num_rows(Db::sql($sql_inicio.$sql.$sql_fim))){\r\n\t\t\t$this->propertySetError (\"con_id\", \"Já existe no banco de dados.\");\r\n\t\t\t$this->propertySetError (\"exa_id\", \"Já existe no banco de dados.\");\r\n\t\t}\r\n\t}", "function isvalidAlbum($aid, $sqlConnection)\r\n{ $result = array();\r\n\t$sqlSuccess = get_sql_results($result, $sqlConnection,\r\n\t\t\t\"select * from Albums \".\r\n\t\t\t\"where albumID = '$aid'\");\r\n\treturn $sqlSuccess;\r\n}", "public function edit($id)\n {\n $book = DB::select('SELECT tblbooks.id,tblbooks.name,author_id,\n year_of_publish,\n amount,\n isbn,\n medium,\n image,\n users.name as userName,\n tblcatagories.id as cate_id\n FROM tblbooks,users,tblcatagories\n WHERE tblbooks.author_id=users.id \n AND cat_id=tblcatagories.id AND tblbooks.id='.$id);\n\n $check = Book::where('author_id',Auth::id())->first();\n\n\n if (sizeof($book) > 0 && $check->author_id == Auth::id())\n {\n return view('book.edit')->with('book',$book);\n }\n else\n {\n return redirect('/book')->with('error','Book Does not exist!');\n }\n }", "static function exists($ident) {\n\t\n\t\trequire_once 'DBO.class.php';\n\t\n\t\t$db = DBO::getInstance();\n\t\t$ids = $db->prepare('SELECT id FROM projects');\n\t\t$ids->execute();\n\t\tif($ids->errorCode() != 0)\t{\n\t\t\t$error = $ids->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\t\n\t\twhile($id = $ids->fetch())\n\t\t\tif($ident == $id[id])\n\t\t\t\treturn true;\n\t\n\t\treturn false;\n\t}", "public function addBook($bookID, $bookTitle, $author)\n {\n \tinclude(\"../Database/db_connect.php\");\n\n\t\t$result = mysqli_query($dbhandle, \"SELECT * FROM books WHERE Groupnumber = '31' AND Bookid = '$bookID'\") or die (mysql_error());\n\n \t//if this book doesn't exist, add it to database\n \tif(mysqli_num_rows($result) == 0)\n \t{\n \t\tmysqli_query($dbhandle, \"INSERT INTO books (Groupnumber, Bookid, Booktitle, Author)\n \t\t\tVALUES ('31', '$bookID', '$bookTitle', '$author')\");\n \t}\n\n \t//add this book to first not full shelf with incremented copyID\n \tfor($i = 0; $i < 10; $i++)\n \t{\n \t\tif($this->shelf[$i]->hasSpace())\n \t\t{\n \t\t\t$this->shelf[$i]->addBook($bookID, ++$this->copyid, $bookTitle, $author);\n \t\t\tbreak;\n \t\t}\n\n \t\tif($i == 10)\n \t\t{\n \t\t\t$_SESSION[\"error\"] = \"Cannot add book, library full\";\n \t\t}\n \t}\n\n \tinclude(\"../Database/db_close.php\");\n\n \treturn;\n }", "function v1_check_db_simple($name, $key, $code, $owners) {\n\t\n\tglobal $warnings;\n\t\n\t// If already in database, send a warning\n\t$id=v1_get_id($key, $code, $owners);\n\t\n\tif (!empty($id)) {\n\t\t// Warning: already in database\n\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t// 1st owner\n\t\tif (!empty($owners[0])) {\n\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t}\n\t\t// 2nd owner\n\t\tif (!empty($owners[1])) {\n\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t}\n\t\t// 3rd owner\n\t\tif (!empty($owners[2])) {\n\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t}\n\t\tarray_push($warnings, $warning_msg);\n\t}\n\t\n}", "function does_id_exist($data1, $data2)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post WHERE (spotlight_post_block = 0) AND (spotlight_post_id = ' . $data1 . ' AND member_id = ' . $data2 . ')';\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$post_exists = 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$post_exists = 0;\r\n\t\t}\r\n\t\treturn $post_exists;\r\n\t}", "function is_rowid_exist($rowid,$db_table='') {\r\n $db_table = $db_table == '' ? $this->db_table : $GLOBALS['dbpre'].$db_table;\r\n $sql = 'select 1 from '.$db_table.' where rowid='.intval($rowid);\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n return mysql_num_rows($res);\r\n }", "function existsInDB($value,$column,$table) {\r\n //connect to mysql database\r\n\t$hostname = \"localhost\";\r\n\t$dbuser=\"root\";\r\n\t$dbpass=\"root\";\r\n\t$db=\"bookstore_test\";\r\n\t$conn = @mysqli_connect($hostname,$dbuser,$dbpass,$db) \r\n\t\t\tor die('Could not connect to MySQL DB -> ' . mysqli_connect_error());\r\n\t\t\t\r\n\t$exists = false;\r\n\t$query = mysqli_query($conn, \"SELECT * FROM \".$table.\" WHERE \".$column.\"='\".$value.\"';\");\r\n if (!$query)\r\n die('Error connecting to database: ' . mysqli_connect_error($conn));\r\n \r\n if(mysqli_num_rows($query) > 0)\r\n\t $exists = true;\r\n \r\n mysqli_close($conn);\r\n\treturn $exists;\r\n}", "public function addBook($book)\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.addBook\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //sends the model to the create function in the data service\n $success = $service->addBookToList($book);\n \n //closes the connection\n $conn = null;\n \n //if it is successful return true\n if ($success == 1) { return true; }\n //else return false\n else { return false; }\n MyLogger::info(\"Exiting OwnedBookBusinessService.addBook\");\n }", "private function check_db() {\n if (ee()->db->table_exists($this->table_name)) {\n return true;\n }\n return $this->make_db();\n }", "function book_offer() {\n\n $collectorId = $_SESSION['demo']['user_id'];\n $offerId = $_GET['offerId'];\n //$date = date('d/m/y');\n //$time =date('h:m:s');\n //$insert = mysql_query(\"INSERT INTO stock(offer_ID, collector_ID,collection_date,amount, remark, status) VALUES(d','$collectorId','$date','$time')\") or die ('Unable to add booking'.mysql_error());\n $check = mysql_query(\"SELECT status from offer WHERE offer_ID='$offerId'\");\n if ($check) {\n if (mysql_result($check, 0, 'status') == \"available\") {\n if (mysql_query(\"UPDATE offer SET status ='booked', collector_id='$collectorId' WHERE offer_ID ='$offerId'\") )\n return 1;\n else\n return -1;\n }\n else\n return -1;\n } else {\n return -1;\n }\n}", "public function isItemBooked(int $itemId): bool\n {\n $isItemBooked = BookingModel::model()->find('play_id = :playId AND item_id = :itemId AND status != :status', array(\n ':playId' => $this->playid,\n ':itemId' => $itemId,\n ':status' => 'declined',\n ));\n\n return !!$isItemBooked;\n }", "private function checkDB($userID) {\n\t\treturn FacebookFriends::find('all', array('conditions' => array('userid' => $userID)));\n\n\t}", "function chk_teach_id(){\n\n\t\t$Q = $this->teach_lgn->chk_teach_id();\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "public static function exists($adinumber=\"\") {\n global $database;\n \n $sql = \"SELECT * FROM \".static::$table_name.\" \";\n $sql .= \"WHERE adinumber = '{$adinumber}' \";\n $sql .= \"LIMIT 1\";\n $result_array = self::find_by_sql($sql);\n return !empty($result_array) ? true : false;\n }", "public function associateToBook(Book $book)\n {\n if (!$this->getId()) {\n try {\n $this->findByName($this->getName());\n } catch (TagNotFoundException $e) {\n // Do noting it's a new tag\n }\n }\n\n return (bool) $this->getRepository()\n ->associateToBook($this, $book);\n }", "function doesUserOwnBook()\n\t{\n\t\tglobal $conn;\n\t\tglobal $myObj;\n\t\tglobal $params_arr;\n\n\t\t$bookTitle = urldecode($_POST['title']);\n\t\t$userID = intval(urldecode($_POST['userid']));\n\n\t\t$sql = \"SET @BOOK_TITLE = '$bookTitle', @USED_ID = '$userID'\";\n\t\t\n\t\tif ($conn->query($sql) === TRUE) \n\t\t{\n\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t\t}\n\n\t\t$sql = \"SELECT TITLE\n\t\t\t\tFROM books JOIN booksowned ON booksowned.book_id = books.id\n\t\t\t\tWHERE booksowned.user_id = @USED_ID AND books.title = @BOOK_TITLE\";\n\n\t\t//Executes query string\n\t\t$result = $conn->query($sql);\n\n\t\t\n\t\tif ($result->num_rows == 1){\n\t\t\techo \"true\";\n\t\t}\n\t\telse{\n\t\t\techo \"false\";\n\t\t}\n\t\t\n\t\t/* Julian backup\n\t\tif ($result->num_rows == 0) \n\t\t{\n\t\t\t$json = array();\n\t \t// convert the data into json object\n\t \twhile($row = $result->fetch_assoc()) \n\t \t{\n\t\t\t\t$bus = array(\n\t\t\t\t\t\"title\" => $row[\"TITLE\"]\n\t\t\t\t);\n\n\t\t\t\tarray_push($json, $bus);\n\t\t\t}\n\n\t\t\t$jsonstring = json_encode($json);\n\t\t\techo $jsonstring;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t echo \"0 results\";\n\t\t}\n\t\t*/\n\n\n\n\t\t$conn->close();\n\t}", "public function islecturersExisting ($id){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM lecturers \";\n $sqlQuery .= \"WHERE id= $id\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }", "public function book($id){\n try{\n $id = Crypt::decryptString($id);\n } catch (DecryptException $e) {\n return 'UPD-E0002';\n }\n \n $book = Book::find($id);\n $authors = Author::all()->where('status', NULL);\n return view('bahai.forms.update.book', compact('book', 'authors'));\n }", "function db_checkCSID($csid) {\n $conn = OpenCon();\n \n //$stmt->bind_param( \"ss\", $table_name, $csid );\n $tables = array( 'admin', 'aio', 'professor', 'student' );\n foreach( $tables as $table_name ) {\n\n $st = \"SELECT * FROM `$table_name` WHERE csid='$csid'\";\n\n $result = $conn->query( $st );\n if( !$result ){\n echo \"Database Error. Please contact admin.\\nError details: \" . $conn->error;\n $result->close();\n break;\n }\n elseif( $result->num_rows > 0 ) {\n $result->close();\n return true;\n\n }\n }\n return false;\n }", "function pageIdExists($id)\r\n{\r\n\tglobal $mysqli,$db_table_prefix;\r\n\t$stmt = $mysqli->prepare(\"SELECT private\r\n\t\tFROM \".$db_table_prefix.\"pages\r\n\t\tWHERE\r\n\t\tid = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"i\", $id);\t\r\n\t$stmt->execute();\r\n\t$stmt->store_result();\t\r\n\t$num_returns = $stmt->num_rows;\r\n\t$stmt->close();\r\n\t\r\n\tif ($num_returns > 0)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\t\r\n\t}\r\n}", "function donationIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM donation WHERE id = ?\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function addBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$ISBN = $_POST['ISBN'];\n\t\t\t$title = $_POST['title'];\n\t\t\t$author = $_POST['author'];\n\t\t\t$press = $_POST['press'];\n\t\t\t$category = $_POST['category'];\n\t\t\t$pub_date = $_POST['pub_date'];\n\t\t\t$price = $_POST['price'];\n\t\t\t$floor = $_POST['floor'];\n\t\t\t$bookshelf = $_POST['bookshelf'];\n\t\t\t$area_code = $_POST['area_code'];\n\t\t\t$number = $_POST['number'];\n\t\t\t$book = D('Book_species');\n\t\t\t$sql1 = \"select count(*) as a from lib_book_unique\";\n\t\t\t$return23 = $book->query($sql1);\n\t\t\t$num = $return23[0]['a'];\n\t\t\t$newbookid = array();\n\t\t\tfor ($k = 1; $k <= $number; $k++) {\n\t\t\t\t$numnew = $k + $num;\n\t\t\t\t$temp_num = 100000;\n\t\t\t\t$new_num = $numnew + $temp_num;\n\t\t\t\tarray_push($newbookid, substr($new_num, 1, 5));\n\t\t\t}\n\t\t\t$sql2333 = \"select * from lib_book_species where isbn = '{$ISBN}';\";\n\t\t\t$return2333 = $book->query($sql2333);\n\t\t\t$sql = \"insert into lib_book_species(isbn,title,author,press,\n\t\t\t\t\tcategory,pub_date,price,floor,bookshelf,area_code) \n\t\t\t\t\tvalues('{$ISBN}','{$title}','{$author}',\n\t\t\t\t\t'{$press}','{$category}','{$pub_date}',\n\t\t\t\t\t'{$price}','{$floor}','{$bookshelf}','{$area_code}');\";\n\t\t\tif(!$return2333){\n\t\t\t\t$return = $book->execute($sql);\n\t\t\t}\n\t\t\t$return = true;\n\t\t\t$sql1 = \"insert into lib_book_unique(isbn) values('{$ISBN}');\";\n\t\t\tfor ($i = 0; $i < $number; $i++) {\n\t\t\t\t$return1 = $book->execute($sql1);\n\t\t\t\t$return = $return && $return1;\n\t\t\t}\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'msg' => 'Add successfully!',\n\t\t\t\t\t'newbookid' => json_encode($newbookid)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "function addBook($userid,$bookid,$num=1){\n \t\n \t\n \t$res=$this->fetchAll(\"userid=$userid AND bookid=$bookid\")->toArray();\n \t\n \t\n\n//======means the client has bought this kind of products before\n\t \tif (count($res)>0) { \t\t\t\t\n\t \t\t$data=array(\n\t \t\t\t'nums'=>$res[0]['nums']+1\n\t \t\t);\n\t \t\t$where=\"userid=$userid AND bookid=$bookid\";\n\t \t\t$this->update($data, $where);\n\t \t\treturn true;\n\t \t}else{\n//========means the client buy this kind of products first time\n\t\t \t$date=time();\n\t\t \t$data=array(\n\t\t \t\t\t'userid'=>$userid,\n\t\t \t\t\t'bookid'=>$bookid,\n\t\t \t\t\t'nums'=>$num, \n\t\t \t\t\t'date'=>$date\n\t\t \t);\n\t\t \t\n\t\t \tif ($this->insert($data)>0) {\n\t\t \t\t\n\t\t \t\treturn true;\n\t\t \t}else{\n\t\t \t\treturn false;\n\t\t \t}\n\t \t}\n \t\n }", "function check_deal_id_is_valid($deal_id){\n $count = Db::rowCount(\"deals\",array(\n \"id\" => $deal_id,\n \"active\" => \"y\"\n ),array(\"=\",\"=\"));\n return $count == 1 ? true : false;\n}", "function check_exits_idField($code,$field, $table, &$db)\n{\n\n\t$sql_check = \"SELECT * FROM \".$table.\" WHERE `\".$field.\"` = '\".$code.\"'\";\n\t$sql_check = $db->sql_query($sql_check) or die(mysql_error());\n\t$exits \t = $db->sql_fetchfield(0);\n\tif($exits)return true;\n\telse return false;\n}", "public function checkInTable($param){\n try{\n $this->connect();\n $sql = \"SELECT article_id FROM articles WHERE \" . $param;\n $statement = $this->db->prepare($sql);\n $statement->execute();\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n if (false === $result){\n return true;\n }else{\n return false;\n }\n }catch (PDOException $e){\n echo $e->getMessage();\n }\n }", "function ifAvailable($isbn,$con)\r\n\t{\r\n\t\t$result = mysqli_query($con, \"SELECT * from booksdb where isbn13 IN ('$isbn');\");\r\n\t\t$row = mysqli_fetch_array($result);\r\n\t\tif($row['copies'] == $row['rented'])\r\n\t\t{\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$available = $row['copies'] - $row['rented'];\r\n\t\t\treturn $available;\r\n\t\t}\r\n\t}", "function isAuthorExists($author_name, $connection) {\n $q = mysqli_query($connection, 'SELECT * \n FROM authors\n WHERE author_name = \"' . $author_name . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка!';\n if ($debug) {\n echo mysqli_error($connection);\n }\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return true;\n }\n }\n}", "function isPrimaryKey(): bool;", "function booking_on_hold($book_id)\r\n\t{\r\n\r\n\t}", "function IfExists($EquipmentId) {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM account WHERE AccountId = '$AccountId' ;\");\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function _verify(){\n $e = \"\";\n if (isset($_POST['verder'])) {\n foreach($_POST as $key=>$value){\n if($key== 'verder') continue;\n $value = validate($value);\n if(!$this->_existsInDatabase($value)){\n $e = \"ID komt niet voor in Database\";\n }\n }\n }\n return $e;\n }", "public function hasId(){\n return $this->_has(17);\n }", "public function exists($uid){\n return isset($this->db[$uid]);\n }", "function linkIdExists($id) {\n\t$id = intval($id);\n\treturn(dbResultExists(\"SELECT id FROM links WHERE id=$id\"));\n}", "public function validateSchoolNameExistenceMapToId($schoolName,$id){\n $handle = $this->con->prepare(\"SELECT * FROM school WHERE schoolName = ? AND id != ?\");\n $handle->execute([$schoolName,$id]); \n \n if($handle->rowCount()>0){\n return SCHOOL_NAME_AREADY_EXIST;\n }else{\n return SCHOOL_NAME_DOES_NOT_EXIT;\n }\n }", "public static function is_id_exist($image_id){\n\n\t\t$id_sql = self::_get_connection()->select(\"SELECT ID FROM apine_images WHERE ID=$image_id\");\n\t\tif($id_sql){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\n\t}", "public function check_db_existance($database=false, $response=true){\n\t\t\n\t\t$db_selected = $this->set_db($database);\n\t\t\n\t\tif (!$db_selected) {\n\t\t\t\n\t\t\t$result = false;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$result = true;\n\t\t\t\n\t\t}\n\n\t\tif($response){\n\t\t\t\n\t\t\treturn $result;\n\t\t}\n\t\n\t}", "public function actionCheckId() {\n $id = $_POST['id'];\n $row = 0;\n $object = Yii::app()->db->createCommand(\"select * from hobby_new where id=\" . $id)->queryRow();\n if (!empty($object['id'])) {\n $row = 1;\n }\n echo $row;\n }", "function dbCheck($data){\n\t\t\t\t$sql = \"SELECT UID FROM user_info WHERE email = '$data'\";\n\n\t\t\t\t$result = mysqli_query($GLOBALS['db'], $sql);\n\t\t\t\t$count = mysqli_num_rows($result);\n\t\t\t\tif(!$result || $count == 0){\n\t\t\t\t\treturn \"This user does not exist.\";\n\t\t\t\t}//if\n\t\t\t\telse{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}//ifelse\n\t\t\t\treturn \"\";\n\n\t}", "function ipal_check_active_question(){\r\n global $DB;\r\n global $ipal;\r\n if($DB->record_exists('ipal_active_questions', array('ipal_id'=>$ipal->id))){\r\nreturn(1);\r\n }\r\n else\r\n {\r\n return(0);\r\n }\r\n}", "public function getbookbyId($id){\n\n\t\t\t$this->db->select('id,name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t->from('tbl_books')\n\t\t\t\t\t->where('id', $id);\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() == 1){\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\t\n\t\t\t}\n\t\t\t\n\t\t}", "public function isIdNubmerExist($id_number)\r\n\t{\r\n\t\t$select=$this->select();\r\n\t\t$select->from($this,'id_number')\r\n\t\t\t->where(\"id_number=?\",$id_number);\r\n\t\t$row=$this->fetchRow($select);\r\n\t\tif(!$row) return false;\r\n\t\treturn true;\r\n\t}", "private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }", "private function checkPrimaryKey($load) {\n\t\t$TableConfig = $this->config_crud;\n\t\tif ($TableConfig):\n\t\t\tforeach ($TableConfig->fields as $name=>$field):\n\t\t\t\tif (@$field->key== \"PRI\"):\n\t\t\t\t\tif (!($this->input->get($name))):\n\t\t\t\t\t\treturn false;\n\t\t\t\t\telse:\n\t\t\t\t\t\t$this->data[\"x_\".$name] = $this->input->get($name);\n\t\t\t\t\t\t$this->primaryKey[$name] = $this->input->get($name);\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\tendif;\n\t\t\n\t\treturn true;\n\t}", "function IfExists($ratecode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `paymentrates` WHERE RateCode='$ratecode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "private function isIdExist($id) {\n\t\tif(!$id){\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$stmt = $this->dbh->prepare(\"SELECT * FROM candidates WHERE id=:id \");\n\t\t$stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t$stmt->execute(array(\":id\"=>$id));\n\t\t$row = $stmt->fetch();\n\t\n\t\treturn !empty($row);\n\t}", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }" ]
[ "0.70448494", "0.67799956", "0.6606398", "0.655717", "0.64013803", "0.6340386", "0.61626315", "0.60127604", "0.6005234", "0.60011965", "0.5981333", "0.59744704", "0.5925375", "0.5903045", "0.58713275", "0.58331156", "0.5772607", "0.5764631", "0.57604665", "0.5741016", "0.57409304", "0.5733514", "0.5731881", "0.5730102", "0.5728967", "0.56984186", "0.56810176", "0.5676155", "0.56639886", "0.5662445", "0.5661652", "0.565553", "0.56516784", "0.56314874", "0.5624866", "0.56218344", "0.5614934", "0.5607347", "0.56005687", "0.5595826", "0.5579456", "0.55746686", "0.5555983", "0.55466557", "0.5533459", "0.5531822", "0.5510819", "0.5509907", "0.5459173", "0.545709", "0.54530543", "0.54513276", "0.542119", "0.5419383", "0.5415591", "0.5410701", "0.54106575", "0.54050195", "0.5397608", "0.53946894", "0.53920937", "0.5391413", "0.5372225", "0.5365113", "0.5363371", "0.5341026", "0.5340959", "0.5338783", "0.5338464", "0.5335601", "0.5321604", "0.5320165", "0.5307144", "0.53062993", "0.5296077", "0.5294441", "0.52826816", "0.5279012", "0.52784324", "0.5278079", "0.52763635", "0.5274984", "0.52725357", "0.5267205", "0.5252541", "0.5252439", "0.5251408", "0.5250353", "0.5249245", "0.52489674", "0.52424127", "0.5242189", "0.5232849", "0.5232835", "0.52287793", "0.5228182", "0.5228182", "0.5228182", "0.5228182", "0.5228182" ]
0.55758774
41
finnBrukere VISNING AV BRUKERE
function visFinnStudenter() { $visning = $_GET['visning']; //sjekker hva som er satt til visning if ($visning == "visAlle") { //vis alle registrerte $svar = 'Dette er en liste over alle registrerte brukere på Hibu Alumni: <!--Luft--> <br /><br /> <!--Viser alle registrerte--> '; //linjeskift for bedre oversikt i kildekoden $tilkobling = kobleTil(); //opprett tilkobling til db //henter ut alle registrerte sortert på etternavn $sql = "SELECT * FROM tblstudent, tblBrukertype,tblCampus, tblFagomrade "; $sql .= "WHERE sbId = bId AND scId = cId "; $sql .= "AND sfId = fId ORDER BY sEtternavn ASC;"; $resultat = mysql_query($sql, $tilkobling); $antall = mysql_num_rows($resultat); $svar .= finnBrukere($antall, $resultat); mysql_close($tilkobling); //lukker tilkobling til db } else if ($visning == "sokNavn") { //søk på navn $svar = visSkjemaNavn(); if (isset($_POST['FINNNAVN']) && $_POST['FINNNAVN'] == "Søk på navn") { //søker på navn $svar = "<br />" . finnVedNavn(); } //if (isset($_POST['FINNNAVN'])) } else { //søk på e-post $svar = visSkjemaEpost(); if (isset($_POST['FINNMAIL']) && $_POST['FINNMAIL'] == "Søk på e-post") { //søker på e-post $svar = "<br />" . finnVedMail(); } //if (isset($_POST['FINNMAIL'])) } //if($visning == "visAlle") return $svar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "function personnaliser_bandeau_bas_fin($flux){\n\tif (defined('_PERSO_BANDEAU_BAS_FIN'))\n\t\treturn afficher_noisettes(_PERSO_BANDEAU_BAS_FIN, $flux, false);\n}", "function personnaliser_bandeau_haut_fin($flux){\n\tif (defined('_PERSO_BANDEAU_HAUT_FIN'))\n\t\treturn afficher_noisettes(_PERSO_BANDEAU_HAUT_FIN, $flux, false);\n}", "function fonctionBaliseFermante($parseur, $nomBalise)\r\n {\r\n global $derniereBaliseRencontree;\r\n global $titre;\r\n global $lien;\r\n global $description;\r\n\r\n switch ($nomBalise) {\r\n case \"ITEM\" :\r\n // nous quittons un bloc item\r\n // nous pouvons afficher le titre de l'article\r\n echo \"<tr><td height='28'><a href=\\\"$lien\\\" target='_blank'>\".$titre.\"</a></td></tr>\";\r\n echo \"<tr><td>$description</td></tr>\";\r\n // et on oublie\r\n $titre = \"\";\r\n $lien = \"\";\r\n $description = \"\";\r\n break;\r\n }\r\n \r\n // On oublie la dernière balise rencontrée\r\n // et tout le reste\r\n $derniereBaliseRencontree = \"\";\r\n }", "function AfficheBatiment(batiment &$batiment, personnage &$oJoueur = NULL, maison &$oMaison = NULL){\r\n\t$ImgSize = 'height';\r\n\t$txt = NULL;\r\n\r\n\t$contenu = 'Ne peut rien contenir';\r\n\t\r\n\t$chkPositionJoueur = false;\r\n\t$nbLigne = 3;\r\n\t\r\n\tif(!is_null($oJoueur)){\t\r\n\t\t$chkPositionJoueur\t\t= $oJoueur->GetCoordonnee() == $batiment->GetCoordonnee();\r\n\t}\r\n\t\r\n\t$chkMarche = false;\r\n\t\r\n\t$lstBatimentAvecEsclaves = array(ferme::ID_BATIMENT, potager::ID_BATIMENT, mine::ID_BATIMENT, carriere::ID_BATIMENT, scierie::ID_BATIMENT);\r\n\r\n\tswitch($batiment->GetIDType()){\r\n\t\tcase maison::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$contenu = '<p>Ne peut rien contenir.</p>';\r\n\t\t\t\t$chkOptions = false;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Si ici que vous devez vous placer pour vous inscrire ou valider une quête.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t/* case 'bank':\r\n\t\t\t$contenu = $batiment->AfficheContenu($oJoueur);\r\n\t\t\tbreak; */\r\n\t\tcase scierie::ID_BATIMENT:\r\n\t\tcase ferme::ID_BATIMENT:\r\n\t\tcase mine::ID_BATIMENT :\r\n\t\tcase potager::ID_BATIMENT:\r\n\t\tcase carriere::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif(!is_null($oJoueur)){\t$contenu = $batiment->AfficheContenu($oJoueur);}\r\n\t\t\tbreak;\r\n\t\tcase marche::ID_BATIMENT:\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$chkMarche = true;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Vous devez vous placez sur son emplacement pour afficher les transactions disponibles.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\tif(in_array($batiment->GetIDType(), $lstBatimentAvecEsclaves))\r\n\t{\r\n\t\t$arLignes[3] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t.(!is_null($oJoueur)?\r\n\t\t$batiment->AfficheAchatEsclave($oJoueur)\r\n\t\t:'Possibilité d\\'acheter des esclaves pour augmenter sa production')\r\n\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$nbLigne++;\r\n\t}\r\n\t\r\n\tif(!is_null($oJoueur))\r\n\t{\r\n\t\t$arLignes[2] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheOptionAmeliorer($oJoueur, $oMaison).'</td></tr>';\r\n\t\t$arLignes[4] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t\t\t\t.'<img alt=\"Barre status\" src=\"./fct/fct_image.php?type=statusetat&amp;value='.$batiment->GetEtat().'&amp;max='.$batiment->GetEtatMax().'\" />'\r\n\t\t\t\t\t.'<br />'\r\n\t\t\t\t\t.$batiment->AfficheOptionReparer($oJoueur)\r\n\t\t\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$arLignes[7] = '\r\n\t\t\t<tr><td>'.$contenu.'</td></tr>';\r\n\t\r\n\t\t$nbLigne+=3;\r\n\t\t\r\n\t\tif($batiment->GetIDType() == marche::ID_BATIMENT)\r\n\t\t{\r\n\t\t\t$arLignes[8] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheTransactions($oJoueur).'</td></tr>';\r\n\t\t\t\r\n\t\t\t$nbLigne++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arLignes[5] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<ul style=\"list-style-type:none; padding:0px; text-align:center; margin:0px;\">\r\n\t\t\t\t\t\t<li style=\"display:inline;\">'.AfficheIcone(objArmement::TYPE_ATTAQUE).' : '.(is_null($batiment->GetAttaque())?'0':$batiment->GetAttaque()).'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DISTANCE).' : '.(is_null($batiment->GetDistance())?'0':$batiment->GetDistance())\t.'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DEFENSE).' : '.(is_null($batiment->GetDefense())?'0':$batiment->GetDefense()).'</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>';\r\n\t$arLignes[6] = '\r\n\t\t\t<tr><td>'.$batiment->GetDescription().'</td></tr>';\r\n\t$arLignes[1] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td rowspan=\"'.$nbLigne.'\" style=\"width:400px;\">\r\n\t\t\t\t\t<img alt=\"'.$batiment->GetType().'\" src=\"./img/batiments/'.$batiment->GetType().'.png\" width=\"400px\" onmouseover=\"montre(\\''.CorrectDataInfoBulle($batiment->GetDescription()).'\\');\" onmouseout=\"cache();\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<th>'\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'<a name=\"'.str_replace(',', '_', $batiment->GetCoordonnee()).'\">'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t\t.$batiment->GetNom((!is_null($oJoueur)?$oJoueur->GetCivilisation():personnage::CIVILISATION_GAULOIS)).(!is_null($oJoueur)?' ('.$batiment->GetNiveau().' / '.$batiment->GetNiveauMax().')':NULL)\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'</a>'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t.'</th>\r\n\t\t\t</tr>';\r\n\t\r\n\t//on trie par keys\r\n\tksort($arLignes);\r\n\t\r\n\treturn implode('', $arLignes);\r\n}", "public function boleta()\n\t{\n\t\t//\n\t}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "function baja_de_interinos($id_desig,$fec){\n $bandera=false;\n $sql=\"select id_designacion from reserva_ocupada_por\"\n . \" where id_reserva=\".$id_desig;\n $res= toba::db('designa')->consultar($sql);\n if(count($res)>0){\n $cadena_desig=implode(\",\",$res[0]);\n $fecha = date($fec);\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $fecha ) ) ;\n $nuevafecha = date ( 'Y-m-j' , $nuevafecha );\n $sql=\"update designacion set nro_540=null, hasta='\".$nuevafecha.\"' where id_designacion in(\".$cadena_desig.\")\";\n toba::db('designa')->consultar($sql);\n $bandera=true;\n }\n return $bandera;\n }", "public function EncabezadoFBM2() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 0, '');\r\n\t\t$this->Celda($ancho-100, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 25, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-85, 6, 'Formulario B.M.2', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-85, 8, 'Relación de Movimiento de Bienes', 0, 1, 'C', true);\r\n\t\t\r\n\t\t$this->Ln(8);\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda($ancho, 26, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '1. Estado: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-25, 5, $this->capitalizar($this->header['estado']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '2. Municipio: ', 0, 0, '', true);\r\n\t\t$this->Celda(50, 5, strtoupper($this->header['municipio']), 'B', 0, '', true);\r\n\t\t$this->Celda(56, 5, '3. Unidad de Trabajo o Dependencia: ', 0, 0, '', true);\r\n\t\t$this->Celda(126, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '4. Servicio: ', 0, 0, '', true);\r\n\t\t$this->Celda(100, 5, 'CONTRALORIA MUNICIPAL DE SUCRE', 'B', 0, '', true);\r\n\t\t$this->Celda(35, 5, '5. Periodo de la cuenta: ', 0, 0, '', true);\r\n\t\t$this->Celda(96, 5, $this->capitalizar($this->header['fecha']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '6. Direccion o Lugar: ', 0, 0, '', true);\r\n\t\t$this->Celda(221, 5, $this->capitalizar($this->header['direccion']), 'B', 0, '', true);\r\n\t\t$this->setY($y2);\r\n\t}", "function personnaliser_bandeau_bas_debut($flux){\n\tif (defined('_PERSO_BANDEAU_BAS_DEBUT'))\n\t\treturn afficher_noisettes(_PERSO_BANDEAU_BAS_DEBUT, $flux, false);\n}", "public function banear ($nom)\n {\n if ($this->nom == \"Pere\") echo \"<b class='color'>Pere ha estat banejat</b>\";\n\n }", "function fonctionBaliseOuvrante($parseur, $nomBalise, $tableauAttributs)\r\n {\r\n // En fait... nous nous conteterons de mémoriser le nom de la balise\r\n // afin d'en tenir compte dans la fonction \"fonctionTexte\"\r\n\r\n global $derniereBaliseRencontree;\r\n\r\n $derniereBaliseRencontree = $nomBalise;\r\n }", "public function EncabezadoFBM1() {\t\r\n\t\t$fs = 10;\r\n\t\t$ancho = 256;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, 'C.M.S.= U.B.M. - 07(09-08-2010)', 0, 0, '');\r\n\t\t\t\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->Celda(156, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 23, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 23, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 68 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-84, 6, 'FORMULARIO B.M.1', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-84, 8, 'INVENTARIO DE BIENES MUEBLES', 0, 1, 'C', true);\r\n\t\t\r\n\t\t$fs = 8;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t$this->Ln(6);\r\n\t\t\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda(256, 28, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '1. Entidad Propietaria: ', 0, 0, '', true);\r\n\t\t$this->Celda(215, 5, 'MUNICIPIO SUCRE', 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '2. Servicio: ', 0, 0, '', true);\r\n\t\t$this->Celda(225, 5, $this->capitalizar($this->header['servicio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(50, 5, '3. Unidad de Trabajo o Dependencia: ', 0, 0, '', true);\r\n\t\t$this->Celda(195, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '4. Estado: ', 0, 0, '', true);\r\n\t\t$this->Celda(120, 5, $this->capitalizar($this->header['estado']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '5. Municipio: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['municipio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '6. Direccion o Lugar: ', 0, 0, '', true);\r\n\t\t$this->Celda(110, 5, $this->capitalizar($this->header['direccion']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '7. Fecha: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['fecha']), 'B', 0, '', true);\r\n\t\t$this->setY($y2);\r\n\t}", "function\tbuche() {\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): begin\") ;\n\t\t$this->_buche( 1) ;\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): end\") ;\n\t}", "function ventasBrutas($fi, $ff){\n $data2=array();\n $this->query= \"SELECT * FROM CLIE03 WHERE TIPO_EMPRESA = 'M'\";\n $rs=$this->EjecutaQuerySimple();\n while($tsarray=ibase_fetch_object($rs)){\n $data[]=$tsarray;\n }\n $facutras = 0;\n foreach ($data as $clie) {\n $cliente = $clie->CLAVE;\n\n $this->query=\"SELECT CLAVE, nombre,\n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as fact from cuen_m03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'C' and num_cpto = 1 and trim(cve_clie) = trim('$cliente') ) as Facturas,\n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as ncs from cuen_det03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'C' and num_cpto =16 and trim(cve_clie) = trim('$cliente') ) as imptNC, \n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as cnp from cuen_det03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'A' and num_cpto >= 23 and trim(cve_clie) = trim('$cliente')) as AbonosNoPagos\n from Clie03\n where trim(clave) = trim('$cliente')\";\n //echo $this->query.'<p>';\n\n \n $rs2=$this->EjecutaQuerySimple();\n while($tsarray= ibase_fetch_object($rs2)){\n $data2[]=$tsarray;\n }\n }\n\n\n\n return $data2;\n }", "public function getBanyakSoal();", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "public function simpan_data_penerima_bansos()\n {\n $noKK = $this->request->getVar('noKK');\n $kepalaKeluarga = $this->request->getVar('kepalaKeluarga');\n $idBansos = $this->request->getVar('idBansos');\n $namaBansos = $this->request->getVar('namaBansos');\n $kategori = $this->request->getVar('kategori');\n $pendamping = $this->request->getVar('pendamping');\n $nominal = $this->request->getVar('nominal');\n $jumlahData = count($noKK);\n $jumlahBerhasil = 0;\n $jumlahGagal = 0;\n $jumlahTerdaftar = 0;\n $jumlahDataKKTidakDitemukan = 0;\n $jumlahDataBansosTidakDitemukan = 0;\n $jumlahBelumDisetujui = 0;\n for ($i = 0; $i < $jumlahData; $i++) {\n // cek apakah fieldnya kosong\n if ($noKK[$i] == 0 || $idBansos[$i] == 0) {\n $jumlahGagal++;\n } else {\n // cek pada database apakah data KK tersebut ada\n $dataKeluarga = $this->KeluargaModel->where('noKK', $noKK[$i])->first();\n if ($dataKeluarga) {\n // cek pada database apakah data bansos ada\n $dataBansos = $this->DataBansosModel->where('idBansos', $idBansos[$i])->first();\n if ($dataBansos) {\n // cek apakah data keluarga sudah\n $status = 'Disetujui';\n $disetujui = $this->KeluargaModel->where('noKK', $noKK[$i])->where('status', $status)->first();\n if ($disetujui) {\n // cek data peserta apakah sudah terdaftar\n $pesertaBansos = $this->BansosModel->where('noKK', $noKK[$i])->where('idBansos', $idBansos[$i])->first();\n if ($pesertaBansos) {\n $jumlahTerdaftar++;\n } else {\n\n $this->BansosModel->save([\n 'noKK' => $noKK[$i],\n 'kepalaKeluarga' => $kepalaKeluarga[$i],\n 'idBansos' => $idBansos[$i],\n 'namaBansos' => $namaBansos[$i],\n 'kategori' => $kategori[$i],\n 'pendamping' => $pendamping[$i],\n 'nominal' => $nominal[$i],\n 'statusAnggota' => 'Aktif'\n ]);\n $jumlahBerhasil++;\n }\n } else {\n $jumlahBelumDisetujui++;\n }\n } else {\n $jumlahDataBansosTidakDitemukan++;\n }\n } else {\n $jumlahDataKKTidakDitemukan++;\n }\n }\n }\n session()->setFlashdata('pesan', '' . $jumlahBerhasil . ' Berhasil Disimpan, ' . $jumlahTerdaftar . ' Telah Terdaftar, ' . $jumlahDataKKTidakDitemukan . ' Data KK Tidak Ditemukan, ' . $jumlahDataBansosTidakDitemukan . ' Data Bansos Tidak Ditemukan dan ' . $jumlahBelumDisetujui . ' Belum Disetujui');\n return redirect()->to('/Admin/penerima_bansos');\n }", "function personnaliser_bandeau_haut_debut($flux){\n\tif (defined('_PERSO_BANDEAU_HAUT_DEBUT'))\n\t\treturn afficher_noisettes(_PERSO_BANDEAU_HAUT_DEBUT, $flux, false);\n}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "public function AddFraisHorsForfait()\r\n {\r\n $frais = new Frais();\r\n //Get le mois\r\n $mois = $this->GetMois(date('m'));\r\n //Ajoute a LigneFraisHorsForfait les données suivantes\r\n $frais->AddLigneFraisHorsForfait($_SESSION['uid'],$mois,$_POST['nom'],$_POST['prix'],$_POST['date']);\r\n \r\n $this->MainPage();\r\n }", "public function verificaFluxo(){\n try{\n $this->load->model(\"modelos/ControladorFluxo\");\n if(!isset($_GET[\"last_visited_block_name\"])){throw new Exception(\"last_visited_block_name não existente\");}\n if(!isset($_GET[\"fluxo\"])){throw new Exception(\"fluxo não existente\");}\n $blocoAtual = $_GET[\"last_visited_block_name\"];\n $fluxo = $_GET[\"fluxo\"];\n echo $this->ControladorFluxo->validaBloco($blocoAtual, $fluxo);\n\n \n }catch (Exception $e){\n $fp = fopen(\"log.txt\", \"a\");\n $escreve = fwrite($fp, \"\\n\".date('Y-m-d H:i:s').\" - \".((isset($_GET[\"Codg_pizzaria\"])) ? \"Codigo da pizzaria = \".$_GET[\"Codg_pizzaria\"] : \"\").\" \".$e->getMessage());\n fclose($fp); \n }\n }", "function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }", "public function AddFraisForfait()\r\n {\r\n $frais = new Frais();\r\n //Get le mois\r\n $mois = $this->GetMois(date('m'));\r\n //Ajoute a LigneFraisForfait les données suivantes\r\n $frais->AddLigneFraisForfait($_SESSION['uid'],$mois,$_POST['typefrais'],$_POST['quantite']);\r\n\r\n $this->MainPage();\r\n }", "function personnaliser_pied_fin($flux){\n\tif (defined('_PERSO_PIED_FIN'))\n\t\treturn afficher_noisettes(_PERSO_PIED_FIN, $flux, false);\n}", "public function bemFoiReavaliacao() {\n\n if ($this->lBemReavaliadao == null) {\n\n $this->lBemReavaliadao = false;\n if ($this->getTotalDeReavaliacoes() > 0) {\n $this->lBemReavaliadao = true;\n }\n }\n return $this->lBemReavaliadao;\n }", "protected function reise()\n\t{\n\t\tredirect::store(\"bydeler#b\");\n\t\t\n\t\t$this->up->fengsel_require_no();\n\t\t$this->up->bomberom_require_no();\n\t\t\n\t\t// finn bydelen\n\t\t$bydel = false;\n\t\tforeach ($this->bydeler as $row)\n\t\t{\n\t\t\tif ($row['id'] == 0 || $row['active'] == 0) continue;\n\t\t\tif ($row['name'] == $_POST['reise'])\n\t\t\t{\n\t\t\t\t$bydel = $row;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!$bydel)\n\t\t{\n\t\t\tess::$b->page->add_message(\"Fant ikke bydelen.\", \"error\");\n\t\t\tredirect::handle();\n\t\t}\n\t\t\n\t\t// allerede i bydelen?\n\t\tif ($bydel['id'] == $this->up->data['up_b_id'])\n\t\t{\n\t\t\t$this->reise_error_in($bydel);\n\t\t}\n\t\t\n\t\t// teleportere?\n\t\tif (isset($_POST['teleporter']) && access::is_nostat())\n\t\t{\n\t\t\t// teleporter\n\t\t\t$a = \\Kofradia\\DB::get()->exec(\"UPDATE users_players SET up_b_id = {$bydel['id']}, up_b_time = \".time().\" WHERE up_id = \".$this->up->id.\" AND up_access_level != 0 AND up_b_id != {$bydel['id']}\");\n\t\t\tif ($a == 0) $this->reise_error_in($bydel);\n\t\t\t\n\t\t\tess::$b->page->add_message('Du teleporterte til <b>'.htmlspecialchars($bydel['name']).'</b>.');\n\t\t\tredirect::handle();\n\t\t}\n\t\t\n\t\t// med bil?\n\t\tif (isset($_POST['gta']))\n\t\t{\n\t\t\tif ($this->gta_count == 0)\n\t\t\t{\n\t\t\t\tess::$b->page->add_message(\"Du har ingen biler i bydelen du oppholder deg i.\", \"error\");\n\t\t\t\tredirect::handle();\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->gta_garage[$bydel['id']]['garage'])\n\t\t\t{\n\t\t\t\tess::$b->page->add_message('Du har ingen garasje på <b>'.htmlspecialchars($bydel['name']).'</b> og kan ikke reise dit med bil.', \"error\");\n\t\t\t\tredirect::handle();\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->gta_garage[$bydel['id']]['garage_free'] == 0)\n\t\t\t{\n\t\t\t\tess::$b->page->add_message('Det er ingen ledige plasser i garasjen på <b>'.htmlspecialchars($bydel['name']).'</b>.', \"error\");\n\t\t\t\tredirect::handle();\n\t\t\t}\n\t\t\t\n\t\t\t// regn ut avstand (km)\n\t\t\t$distance = self::calc_travel_distance($this->up->bydel, $bydel);\n\t\t\t\n\t\t\t// har vi valgt en bil?\n\t\t\tif (isset($_POST['sel']))\n\t\t\t{\n\t\t\t\tif (!isset($_POST['bil']))\n\t\t\t\t{\n\t\t\t\t\tess::$b->page->add_message(\"Du må velge en bil du ønsker å reise med.\", \"error\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->reise_gta_check($bydel, $distance);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// TODO\n\t\t\t}\n\t\t\t\n\t\t\t// vis skjema for å velge en bil å reise med\n\t\t\tess::$b->page->add_title($bydel['name'], \"Reis med bil\");\n\t\t\t\n\t\t\t// hent bilene i garasjen\n\t\t\t$pagei = new pagei(pagei::ACTIVE_POST, \"side\", pagei::PER_PAGE, 10);\n\t\t\t$result = $pagei->query(\"\n\t\t\t\tSELECT s.id, s.time, g.brand, g.model, g.img_mini, g.value, s.damage, g.points\n\t\t\t\tFROM users_gta AS s\n\t\t\t\t\tJOIN gta AS g ON s.gtaid = g.id\n\t\t\t\tWHERE ug_up_id = {$this->up->id} AND s.b_id = {$this->up->data['up_b_id']}\n\t\t\t\tORDER BY g.points*(100-s.damage) DESC\");\n\t\t\t\n\t\t\techo '\n<div class=\"bg1_c xmedium\">\n\t<h1 class=\"bg1\">Reis med bil til '.htmlspecialchars($bydel['name']).'<span class=\"left\"></span><span class=\"right\"></span></h1>\n\t<div class=\"bg1\">\n\t\t<p class=\"c\"><a href=\"bydeler#b\">Tilbake</a></p>\n\t\t<form action=\"bydeler#b\" method=\"post\">\n\t\t\t<input type=\"hidden\" name=\"reise\" value=\"'.htmlspecialchars($bydel['name']).'\" />\n\t\t\t<input type=\"hidden\" name=\"gta\" />\n\t\t\t<table class=\"table center\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th colspan=\"2\">Merke/Modell</th>\n\t\t\t\t\t\t<th>Dato anskaffet</th>\n\t\t\t\t\t\t<th>Skade</th>\n\t\t\t\t\t\t<th>Energi</th>\n\t\t\t\t\t\t<th>Utgifter</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>';\n\t\t\t\t\n\t\t\t$i = 0;\n\t\t\twhile ($row = $result->fetch())\n\t\t\t{\n\t\t\t\t$price = $distance * self::GTA_PRICE_KM * self::get_gta_factor_points($row['points']) * self::get_gta_factor_damage($row['damage']);\n\t\t\t\t$energy = self::get_gta_energy($row['damage']);\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t\t\t<tr class=\"box_handle'.(++$i % 2 == 0 ? ' color' : '').'\">\n\t\t\t\t\t\t<td><input type=\"radio\" id=\"bil_'.$row['id'].'\" name=\"bil\" value=\"'.$row['id'].'\"'.(postval(\"bil\") == $row['id'] ? ' checked=\"checked\"' : '').' />'.(empty($row['img_mini']) ? '&nbsp;' : '<img src=\"'.$row['img_mini'].'\" alt=\"Bilde\" />').'</td>\n\t\t\t\t\t\t<td>'.htmlspecialchars($row['brand']).'<br /><b>'.htmlspecialchars($row['model']).'</b></td>\n\t\t\t\t\t\t<td>'.ess::$b->date->get($row['time'])->format().'</td>\n\t\t\t\t\t\t<td align=\"right\">'.$row['damage'].' %</td>\n\t\t\t\t\t\t<td align=\"right\">'.game::format_num($energy / $this->up->data['up_energy_max'] * 100, 1).' %</td>\n\t\t\t\t\t\t<td align=\"right\">'.game::format_cash($price).'</td>\n\t\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t\t</tbody>\n\t\t\t</table>'.($pagei->pages > 1 ? '\n\t\t\t<p class=\"c\">'.$pagei->pagenumbers(\"input\").'</p>' : '').'\n\t\t\t<p class=\"c\">'.show_sbutton(\"Reis til \".htmlspecialchars($bydel['name']), 'name=\"sel\"').'</p>\n\t\t</form>\n\t</div>\n</div>';\n\t\t\t\n\t\t\tess::$b->page->load();\n\t\t}\n\t\t\n\t\t// ta taxi?\n\t\tif (isset($_POST['taxi']))\n\t\t{\n\t\t\t// har vi ikke nok energi?\n\t\t\tif (!$this->up->energy_check(self::TAXI_ENERGY*1.3)) // pluss på 30 % så man ikke kan ende opp på 0 % energi\n\t\t\t{\n\t\t\t\tess::$b->page->add_message(\"Du har ikke nok energi for å reise med taxi.\", \"error\");\n\t\t\t\tredirect::handle();\n\t\t\t}\n\t\t\t\n\t\t\t// regn ut avstand (km)\n\t\t\t$distance = self::calc_travel_distance($this->up->bydel, $bydel);\n\t\t\t\n\t\t\t// regn ut pris og rankpoeng\n\t\t\t$price = round($distance * self::TAXI_PRICE_KM);\n\t\t\t$points = round($distance * self::TAXI_POINTS_KM * $this->up->rank['number']);\n\t\t\t\n\t\t\t// har ikke nok rank?\n\t\t\tif ($this->up->data['up_points'] < $points * 2) // må ha dobbelte\n\t\t\t{\n\t\t\t\tess::$b->page->add_message(\"Du har ikke nok rank til å reise til \".htmlspecialchars($bydel['name']).\".\", \"error\");\n\t\t\t\tredirect::handle();\n\t\t\t}\n\t\t\t\n\t\t\t// forsøk å reis\n\t\t\t$a = \\Kofradia\\DB::get()->exec(\"UPDATE users_players SET up_cash = up_cash - $price, up_b_id = {$bydel['id']}, up_b_time = \".time().\" WHERE up_id = \".$this->up->id.\" AND up_cash >= $price AND up_b_id != {$bydel['id']}\");\n\t\t\t\n\t\t\t// feilet?\n\t\t\tif ($a == 0)\n\t\t\t{\n\t\t\t\t// allerede i bydelen?\n\t\t\t\t$result = \\Kofradia\\DB::get()->query(\"SELECT up_b_id FROM users_players WHERE up_id = \".$this->up->id);\n\t\t\t\tif ($result->fetchColumn(0) == $bydel['id'])\n\t\t\t\t{\n\t\t\t\t\t$this->reise_error_in($bydel);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// hadde ikke råd\n\t\t\t\t$this->reise_error_cash($bydel);\n\t\t\t}\n\t\t\t\n\t\t\t// energi\n\t\t\t$this->up->energy_use(self::TAXI_ENERGY);\n\t\t\t\n\t\t\t// rank\n\t\t\t$this->up->increase_rank(-$points);\n\t\t\t\n\t\t\t// vellykket\n\t\t\tess::$b->page->add_message(\"Du tok taxi til <b>\".htmlspecialchars($bydel['name']).\"</b>. Det kostet deg <b>\".game::format_cash($price).\"</b> og \".game::format_number($points).\" poeng.\");\n\t\t\tredirect::handle();\n\t\t}\n\t\t\n\t\tess::$b->page->add_message(\"Ukjent reisemetode.\", \"error\");\n\t\tredirect::handle();\n\t}", "public function EncabezadoFBM5() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t//$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 0, '');\r\n\t\t$this->Celda($ancho, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 25, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t//$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-85, 6, $this->header['title'], 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-85, 8, $this->header['title2'], 0, 1, 'C', true);\r\n\t}", "public function isplata($iznos){\n\n $stanjesalimitom=$this->stanje+$this->limit;\n\n if($iznos<=$stanjesalimitom){\n // $novostanje=$stanjesalimitom-$iznos;\n //echo \"Vas iznos je isplacen<br>\";\n // echo \"Novo stanje na racunu je: \".$novostanje;\n if($iznos>$this->stanje){\n // ovde je kontrolno logika ako klijent ulazi u minus\n $zaduzenje=$iznos-$this->stanje;\n $this->limit-=$zaduzenje;\n $this->stanje=0;\n echo \"Vas iznos je isplacen<br>\";\n echo \"Usli ste u dozvoljeni minus, Vas limit iznosi jos: \".$this->limit;\n\n }else{\n // ako trazi manji iznos od stanja koje ima na racunu\n $this->stanje-=$iznos;\n echo \"Vas iznos je isplacen, novo stanje je: \".$this->stanje;\n }\n\n }else{\n echo \"Nemate dovoljno sredstava na racunu\";\n }\n\n\n\n}", "public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }", "function siguienteEstadoBoleta(){\r\n $this->procedimiento='leg.ft_boleta_garantia_dev_ime';\r\n $this->transaccion='LG_POBODEV_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4'); \r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_anexo','id_anexo','int4');\r\n\t\t\r\n\t\t\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function AggiornaPrezzi(){\n\t}", "function ToonFormulierAfspraak()\n{\n\n}", "function fProcesaBanco(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $alDet = fIniDetalle();\n $alDet[\"det_codcuenta\"]\t= $cla->cla_ctaorigen; \n $alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 50) . ' ' . substr($agPar[\"slBenef\"],0,20);\n $alDet['det_idauxiliar']= $agPar[\"com_Emisor\"];\n $alDet[\"det_numcheque\"]\t= $igNumChq;\t\t\t// es el numero de cheque\n $alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n $alDet['det_valdebito']\t= $agPar[\"flValor\"] * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar;\n $alDet['det_valcredito']\t= 0;\n $alDet['det_secuencia']\t= $igSecue;\n\tif(fGetParam(\"pAppDbg\",0)){\n\t\tprint_r($alDet);\n\t}\n\tfInsdetalleCont($db, $alDet);\n}", "public function getUrlaubBisDatum($persnr,$bisDatum){\n $sql = \"select durlaub1.jahranspruch,durlaub1.rest,durlaub1.gekrzt from durlaub1 where `PersNr`=%i\";\n $res = $this->db->query($sql,$persnr);\n if(count($res)>0){\n // should be only 1 row\n $row = $res->fetch();\n $anspruch = $row['jahranspruch'];\n $alt = $row['rest'];\n $gekrzt = $row['gekrzt'];\n }\n else{\n $anspruch = 0;\n $rest = 0;\n $alt = 0;\n $gekrzt = 0;\n }\n\n // holiday day from begin of years to $bisDatum\n // 1. January\n $datvon = substr($bisDatum, 0, 4).\"-\".\"01-01\";\n $sql = \"select count(datum) as hd from dzeit where dzeit.`Datum` between %s and %s and persnr=%i and dzeit.tat='d'\";\n $res = $this->db->query($sql,$datvon,$bisDatum,$persnr);\n $row = $res->fetch();\n $genommenBis = $row['hd'];\n $rest = $anspruch + $alt - $gekrzt - $genommenBis;\n\n return array('rest'=>$rest,'anspruch'=>$anspruch,'alt'=>$alt,'gekrzt'=>$gekrzt,'genommen'=>$genommenBis);\n }", "public function bandeja(){\r\n $folder = \"bandeja_de_entrada\";\r\n\r\n //Tomamos las derivaciones a mostrar\r\n $derivaciones = $this->derivaciones_recibidas();\r\n\r\n //Tomamos el plazo que se tiene para responder cada derivacion\r\n $array_plazo = $this->plazo_restante_derivaciones();\r\n\r\n //Tomamos la cantidad de correspondencia nueva (sin recepcionar)\r\n $bandeja_nuevos_cantidad = $this->bandeja_nuevos_cantidad();\r\n\r\n //Devolvemos la vista con los parametros necesarios\r\n return view(\"chasqui.bandeja_de_entrada\")\r\n ->with(\"bandeja_nuevos_cantidad\", $bandeja_nuevos_cantidad)\r\n ->with(\"folder\", $folder)\r\n ->with(\"derivaciones\", $derivaciones)\r\n ->with(\"array_plazo\", $array_plazo);\r\n }", "public function ambil_satu_baris()\r\n\t{\r\n\t\t$this->jalankan_sql();\r\n\t\treturn $this->kendaraan->fetch(PDO::FETCH_ASSOC);\r\n\t}", "public function verificaSituacaoNota() {\n\n $oDaoBemNota = new cl_bensempnotaitem();\n\n $sWhere = \"e136_bens = \" . $this->getCodigoBem();\n $sSqlBemNota = $oDaoBemNota->sql_query_bens_ativos(null, \"e72_vlrliq\", null, $sWhere);\n $rsBemNota = $oDaoBemNota->sql_record($sSqlBemNota);\n\n if ($oDaoBemNota->numrows == 0) {\n return self::SEMNOTA;\n }\n\n $nValorLiquidado = db_utils::fieldsMemory($rsBemNota, 0)->e72_vlrliq;\n\n if ($nValorLiquidado > 0) {\n\n return self::LIQUIDADO;\n }\n return self::EMLIQUIDACAO;\n }", "public function EncabezadoFBM3() {\t\r\n\t\t$ancho = 256;\r\n\t\t$fs = 10;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t//$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, \"C.M.S.= U.B.M. - 14(17-12-2007)\", 0, 1, '');\r\n\t\t//$this->Celda($ancho-100, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 25, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-108, 25, '', 1, 0, '', true);\r\n\t\t$y3 = $this->getY();\r\n\t\t$x3 = $this->getX();\r\n\t\t$this->Celda(28, 25, '', 1, 1, '', true);\r\n\t\t$y4 = $this->getY();\r\n\t\t$x4 = $this->getX();\r\n\t\t\t\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 78 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-115, 6, 'Formulario B.M.3', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-115, 8, 'RELACION DE BIENES MUEBLES FALTANTES', 0, 1, 'C', true);\r\n\t\t$this->setY($y3);\r\n\t\t$this->setX($x3);\r\n\t\t$this->Celda(28, 8, 'HOJA Nro.', 1, 1, 'C', true);\r\n\t\t$this->setX($x3);\r\n\t\t$this->Celda(28, 17, $this->PageNo(), 1, 1, 'C', true);\r\n\t\t$this->setY($y4);\r\n\t\t$this->setX($x4);\r\n\t\t\r\n\t\t$this->Ln(2);\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda($ancho, 26, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 10, '1. Entidad:', 0, 0, '', true);\r\n\t\t$xt = $this->getX();\r\n\t\t$this->Celda(20, 5, 'Estado ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['estado']), 'B', 1, '', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(20, 5, 'Municipio ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-110, 5, strtoupper($this->header['municipio']), 'B', 0, '', true);\r\n\t\t$xt = $this->getX();\r\n\t\t$this->Ln();\r\n\t\t$yt = $this->getY();\r\n\t\t\r\n\t\t$this->setY($y);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(69, 6, '4. Identificación del Comprobante', 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.5, 'Codigo Concepto Movimiento', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.5, '60', 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.75, 'Numero de Comprobante', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.75, $this->header['comprobante'], 1, 1, 'C', true);\r\n\t\t$this->setX($xt);\r\n\t\t$this->Celda(44, 6.75, 'Fecha de la Operacion', 1, 0, '', true);\r\n\t\t$this->Celda(25, 6.75, $this->header['fecha'], 1, 1, 'C', true);\r\n\t\t\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(40, 5, '2. Unidad de Trabajo: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setY($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(40, 5, '3. Unidad Administrativa: ', 0, 0, '', true);\r\n\t\t$this->Celda($ancho-111, 5, $this->capitalizar($this->header['adm']), 'B', 1, '', true);\r\n\t\t$this->Ln();\r\n\t}", "public function afmelden()\n {\n return true;\n }", "function ukupnoSedista($nizAutobusa)\n {\n $suma = 0;\n foreach ($nizAutobusa as $autobus) {\n $suma += $autobus->getBrojSedista();\n }\n return $suma;\n }", "function get_bestelling_nbet($conn) // vraag tafels op die niet afgehandeld zijn\n\t{\n\t\t$query = \"SELECT tafel,product,aantal FROM bestelling WHERE betaald=0 \";\n\t\treturn mysqli_query($conn,$query);\n\t}", "function berekening(){\n\n\tstatic $kapitaal = 100000;\n\t$rentevoet = 0.08;\n\t$periode = 10;\n\n\tstatic $result = array();\n\n\tstatic $jaren = 1;\n\n\tif ($jaren <= $periode) {\n\n\t\t$rente = floor($kapitaal*$rentevoet);\n\t\t\t\n\t\t$kapitaal = $kapitaal + $rente;\n\n\t\t$result[ ] = 'Na '.$jaren.' jaar heeft Hans '.$kapitaal.'€ op zijn rekening staan. (waarvan '.$rente.'€ rente is)';\n\n\t\t++$jaren;\n\n\t\tberekening();\n\n\t} else {\n\n\t\treturn $result;\n\n\t}\n\t\n\n}", "public function RicercaAvanzata(){\n $view = new VRicerca();\n $view->mostraFiltri();\n }", "public function data_blok()\n {\n $data = ['aktif' => 'blok',\n 'data_blok' => $this->M_prospektus->tampil_data_blok(),\n 'kawasan' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_blok', $data);\n }", "function hitungDenda(){\n\n return 0;\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "function\tunbuche() {\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::unbuche(): begin\") ;\n\t\t$this->_buche( -1) ;\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::unbuche(): end\") ;\n\t}", "function checkOblig(&$falta, &$f, $oblig) {\r\n# versio obligatoris en formulari\r\n foreach (explode(\"#\", $oblig) as $cm) {\r\n if (!$f[$cm])\r\n $falta[$cm][] = 'oblig';\r\n }\r\n return count($falta);\r\n}", "public function calculFrais()\n {\n $frais = $this->compteModel->calculTaxe($this->utils->securite_xss($_POST['montant']), $this->utils->securite_xss($_POST['service']));\n if ($frais > 0) echo $frais;\n else if ($frais == 0) echo 0;\n else echo -2;\n }", "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}", "public function nadar()\n {\n }", "public function eedijalan($bau){\n return $bau.' banget';\n }", "public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL B ON B.VIAGEM = A.HANDLE AND B.EHINICIOVIAGEM = 'S'\n LEFT JOIN OP_VIAGEMPERCURSOFILIAL C ON C.VIAGEM = A.HANDLE AND C.EHTERMINOVIAGEM = 'S'\n WHERE A.HANDLE = '$this->handle' \");\n $query->execute();\n $dataSet = $query->fetch(PDO::FETCH_ASSOC);\n\n $this->filialDestino = $dataSet['FILIALDESTINO'];\n $this->filialOrigem = $dataSet['FILIALORIGEM'];\n }", "function setF_fin($f_fin){\n\t\t\n\t\t$this->f_fin = $f_fin;\n\t\t$this->cambios = true;\n\t}", "public function fracaso()\n\t{\n\t\textract($this->request->data);\n\t\tif ( ! $this->Auth->user() || ! $this->request->is('post') || empty($TBK_ORDEN_COMPRA) )\n\t\t{\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\t/**\n\t\t * Si existe una compra en proceso, en estado pendiente y corresponde\n\t\t * a la oc informada por webpay, cambia el estado a rechazo\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Carro.compra_id') ) && $id == $TBK_ORDEN_COMPRA && ( $this->Compra->pendiente($id) || $this->Compra->rechazada($id) ) )\n\t\t{\n\t\t\t$this->Compra->cambiarEstado($id, 'RECHAZO_TRANSBANK');\n\t\t\t//$this->redirect(array('action' => 'resumen'));\n\t\t}\n\t\t/**\n\t\t * Si no existe la oc o no cumple con las condiciones, informamos numero de oc de webpay\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$id = $TBK_ORDEN_COMPRA;\n\t\t}\n\n\t\t/**\n\t\t * Camino de migas\n\t\t */\n\t\tBreadcrumbComponent::add('Reserva de uniformes', array('action' => 'add'));\n\t\tBreadcrumbComponent::add('Reserva fracasada');\n\t\t$this->set('title', 'Reserva fracasada');\n\t\t$this->set(compact('id'));\n\t}", "function printAktivitetBoks($aktivitet)\n{\n if (eksistererAktivitet($aktivitet)) {\n $akt = hentAktivitet($aktivitet);\n $pris = $akt->Pris > 0 ? $akt->Pris . \"kr\" : \"Gratis!\";\n $dato = new Carbon\\Carbon($akt->Dato);\n $dato = $dato->diffForHumans();\n $prisFarge = $akt->Pris > 0 ? \"Pris Rod\" : \"Pris\";\n\n if ($akt->Statisk === 1)\n $dato = \"<img class='Ikoner' src='img/ikon_lock.png' alt='Statisk aktiviet'/>\";\n ?>\n <div class=\"AktivitetLitenBoks\">\n \n <a class=\"LinkBeskrivelse\" href=\"?side=aktivitet&id=<?= tryggPrint($aktivitet) ?>\">\n <img class=\"bildeBoks\" src=\"<?= tryggPrint($akt->Bilde) ?>\" onerror=\"this.src='img/default_aktivitet.png'\"/>\n \n <div class=\"bildeBoksLag\"></div>\n <div class=\"Beskrivelse\"><?= tryggPrint($akt->Beskrivelse) ?></div>\n </a>\n <div class=\"Tittel\"><b><?= tryggPrint($akt->Tittel) ?></b></div>\n <a class=\"link\" href=\"?side=bruker&id=<?= tryggPrint($akt->Bruker) ?>\">\n <div class=\"Utgiver\">\n <b><?= tryggPrint($akt->Bruker) ?></b>\n <img class=\"Ikoner\" src=\"<?= hentBrukerBildeEx($akt->Bruker) ?>\"</img>\n </div>\n </a>\n <div class=\"Dato\"><?= $dato ?></div>\n <div class=\"Likes\">\n <b><?= tryggPrint(antallStemmer($aktivitet)) ?></b>\n <img class=\"Ikoner\" src=\"img/ikon_hjerte.png\" alt=\"Antall likes\"</img>\n </div>\n \n <div class=\"<?=$prisFarge?>\"><?= $pris ?></div>\n </div>\n\n <?php\n } else {\n echo \"Fant ikke aktivtet: \" . $aktivitet;\n }\n}", "public function verifikasi_pendebetan_angsuran_pembiayaan_koptel()\n\t{\n\t\t$debug = false; // debug non aktif\n\t\t$nik = $this->input->post('nik');\n\t\t$filename = $this->input->post('filename');\n\t\t$akun = $this->input->post('akun');\n\t\t$referensi = $this->input->post('referensi');\n\t\t$seq = $this->input->post('seq');\n\t\t$angsuran_id = $filename;\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t\t$trx_date = $this->datepicker_convert(true,$this->input->post('trx_date'),'/');\n\t\t$ins_data = array();\n\t\t$ins_data_trx = array();\n\n\t\t$this->db->trans_begin();\n\n\t\t/* get angsuran */\n\t\t$angsurans = $this->model_transaction->get_angsuran_temp_by_id($angsuran_id);\n\t\tfor ($i = 0 ;$i < count($angsurans) ; $i++)\n\t\t{\n\t\t\t$angsuran = $angsurans[$i];\n\t\t\t$a_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t$a_jumlah_angsuran = $angsuran['pokok']+$angsuran['margin'];\n\n\t\t\t$data_financing = $this->model_transaction->get_account_financing_by_account($a_account_financing_no,$a_jumlah_angsuran);\n\t\t\tif ($angsuran['pokok'] > 0 || $angsuran['margin']>0)\n\t\t\t{\n\t\t\t\t$b_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t\t$b_angsuran_pokok = $angsuran['pokok'];\n\t\t\t\t$b_angsuran_margin = $angsuran['margin'];\n\t\t\t\t$b_jtempo_angsuran_last = $data_financing['jto_last'];\n\t\t\t\t$b_jtempo_angsuran_next = $data_financing['jto_next'];\n\t\t\t\t$b_jangka_waktu = $data_financing['jangka_waktu'];\n\t\t\t\t$b_counter_angsuran = $data_financing['counter_angsuran'];\n\t\t\t\t$b_saldo_pokok = $data_financing['saldo_pokok'];\n\t\t\t\t$b_saldo_margin = $data_financing['saldo_margin'];\n\t\t\t\t$b_flag_jadwal_angsuran = $data_financing['flag_jadwal_angsuran'];\n\t\t\t\t$b_periode_jangka_waktu = $data_financing['periode_jangka_waktu'];\n\t\t\t\t$b_tanggal_jtempo = $data_financing['tanggal_jtempo'];\n\n\t\t\t\t// generate uuid for history\n\t \t\t$b_trx_detail_id = uuid(false);\n\t\t \t$b_trx_account_financing_id = uuid(false);\n\n\t\t \t// new declare\n\t\t\t\t$b_jumlah_angsuran = $b_angsuran_pokok+$b_angsuran_margin;\n\t\t\t\t// $b_new_counter_angsuran = $b_counter_angsuran+1;\n\t\t\t\t$b_new_counter_angsuran = $b_counter_angsuran;\n\t\t\t\t$b_trx_type = 3;\n\t\t\t\t$b_trx_account_type = 1;\n\t\t\t\t$is_pelunasan = false;\n\t\t\t\t$jtempo_angsuran_next = $b_jtempo_angsuran_next;\n\n\t\t\t\tif ($b_flag_jadwal_angsuran==1) {\n\t\t\t\t\tif($b_periode_jangka_waktu==0){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 days'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==1){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 weeks'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==2){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 month'));\n\t\t\t\t\t}\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$jtempo_angsuran_next = $data_financing['jto_next2'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// collect array for angsuran\n\t\t \t// if this angsuran is pelunasan then this condition will not run\n\t\t \t// else will insert to trx_detail and trx_account_financing\n\t\t \tif ($b_new_counter_angsuran!=$b_jangka_waktu) {\n\t\t \t\t$data_trx = array(\n\t\t\t\t\t\t\t 'b_trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'b_trx_type' => $b_trx_type\n\t\t\t\t\t\t\t,'b_trx_account_type' => $b_trx_account_type\n\t\t\t\t\t\t\t,'b_account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'b_jumlah_angsuran' => $b_jumlah_angsuran\n\t\t\t\t\t\t\t,'b_trx_account_financing_id' => $b_trx_account_financing_id\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t// ,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_last\n\t\t\t\t\t\t\t,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'b_angsuran_pokok' => $b_angsuran_pokok\n\t\t\t\t\t\t\t,'b_angsuran_margin' => $b_angsuran_margin\n\t\t\t\t\t\t\t,'referensi' => $referensi\n\t\t\t\t\t\t\t,'seq' => $seq\n\t\t\t\t\t\t\t,'akun' => $akun\n\t\t\t\t\t\t\t,'b_new_counter_angsuran' => $b_new_counter_angsuran\n\t\t \t\t\t);\n\n\t\t \t\t$ins = $this->get_trx_angsuran_data($data_trx);\n\t\t \t\t$ins_data_trx[] = $ins['ins_data_trx'];\n\t\t \t\t$ins_data[] = $ins['ins_data'];\n\t\t\t\t} else {\n\t\t \t\t$is_pelunasan = true;\n\t\t\t\t}\n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t}\n\n\t\t\t\t// update saldo account pembiayaan\n\t\t\t\t$pembiayaan = array(\n\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok-$b_angsuran_pokok,\n\t\t\t\t\t'saldo_margin'=>$b_saldo_margin-$b_angsuran_margin,\n\t\t\t\t\t'jtempo_angsuran_last'=>$b_jtempo_angsuran_next,\n\t\t\t\t\t'jtempo_angsuran_next'=>$jtempo_angsuran_next,\n\t\t\t\t\t'counter_angsuran'=>$b_new_counter_angsuran\n\t\t\t\t);\n\n\t\t\t\t// begin\n\t\t\t\t// do this section if flag_jadwal_angsuran = non reguler ( 0 )\n\t\t\t\t$param_pembiayaan_schedulle=array();\n\t\t\t\t$pembiayaan_schedulle=array();\n\t\t\t\tif ($b_flag_jadwal_angsuran==0){\n\t\t\t\t\t$param_pembiayaan_schedulle = array(\n\t\t\t\t\t\t'account_no_financing'=>$b_account_financing_no\n\t\t\t\t\t\t,'tangga_jtempo'=>$b_jtempo_angsuran_next\n\t\t\t\t\t);\n\t\t\t\t\t$pembiayaan_schedulle = array(\n\t\t\t\t\t\t\t'status_angsuran'=>1,\n\t\t\t\t\t\t\t'tanggal_bayar'=>$trx_date,\n\t\t\t\t\t\t\t'bayar_pokok'=>$b_angsuran_pokok,\n\t\t\t\t\t\t\t'bayar_margin'=>$b_angsuran_margin\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// end \n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$pembiayaan['status_rekening'] = 2;\n\n\t\t\t\t\t$pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'account_financing_lunas_id'=>$b_trx_account_financing_id,\n\t\t\t\t\t\t\t'account_financing_no'=>$b_account_financing_no,\n\t\t\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok,\n\t\t\t\t\t\t\t'saldo_margin'=>$b_saldo_margin,\n\t\t\t\t\t\t\t'potongan_margin'=>0,\n\t\t\t\t\t\t\t'status_pelunasan'=>1,\n\t\t\t\t\t\t\t'tanggal_lunas'=>$trx_date,\n\t\t\t\t\t\t\t'create_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'created_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'verify_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'verifiy_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'saldo_catab'=>0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'trx_account_financing_id'=>$b_trx_account_financing_id\n\t\t\t\t\t\t\t,'branch_id' => $this->session->userdata('branch_id')\n\t\t\t\t\t\t\t,'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'trx_financing_type' => '2'\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'jto_date' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'pokok' => $b_saldo_pokok\n\t\t\t\t\t\t\t,'margin' => $b_saldo_margin\n\t\t\t\t\t\t\t,'catab' => '0'\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'trx_status' => 1\n\t\t\t\t\t\t\t,'freq' => 1\n\t\t\t\t\t\t\t,'angsuran_ke' => $b_jangka_waktu\n\t\t\t\t\t\t\t,'account_cash_code'=>$akun\n\t\t\t\t\t\t\t,'tipe_angsuran'=>'2'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_detail = array(\n\t\t\t\t\t\t\t'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'trx_type' => '2'\n\t\t\t\t\t\t\t,'trx_account_type' => '3'\n\t\t\t\t\t\t\t,'account_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'flag_debit_credit' => 'C'\n\t\t\t\t\t\t\t,'amount' => ($b_saldo_pokok+$b_saldo_margin)\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif ($debug==true) {\n\t\t\t\t\t\techo 'Pelunasan-------------------------------------<br>';\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($pembiayaan_lunas);\n\t\t\t\t\t\tprint_r($trx_detail);\n\t\t\t\t\t\tprint_r($trx_pembiayaan_lunas);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->model_transaction->insert_account_financing_lunas($pembiayaan_lunas);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_detail($trx_detail);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_account_financing($trx_pembiayaan_lunas);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// end check of if pelunasan\n\n\t\t\t\t$param_pembiayaan = array('account_financing_no'=>$b_account_financing_no);\n\n\t\t\t\tif ($debug==true) {\n\t\t\t\t\techo 'ANGSURAN NORMAL '.$i.' -------------------------------------<br>';\n\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\tprint_r($pembiayaan);\n\t\t\t\t\tprint_r($param_pembiayaan);\n\t\t\t\t\tprint_r($pembiayaan_schedulle);\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_transaction->update_account_financing($pembiayaan,$param_pembiayaan);\n\t\t\t\t\tif (count($pembiayaan_schedulle)>0) {\n\t\t\t\t\t\t$this->model_transaction->update_account_financing_schedulle($pembiayaan_schedulle,$param_pembiayaan_schedulle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$log_payed_data = $this->model_transaction->get_log_payed_data($angsuran_id,$trx_date);\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($ins_data);\n\t\t\tprint_r($ins_data_trx);\n\t\t\tdie();\n\t\t} else {\n\t\t\tif(count($ins_data)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_mfi_trx_financing($ins_data);\n\t\t\t}\n\t\t\tif(count($ins_data_trx)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_trx_detail($ins_data_trx);\n\t\t\t}\n\t\t\tif(count($log_payed_data)>0){\n\t\t\t\t$this->model_transaction->insert_log_trx_pendebetan($log_payed_data);\n\t\t\t}\n\t\t}\n\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($angsuran_id);\n\t\t\tprint_r($akun);\n\t\t\tprint_r($referensi);\n\t\t\tprint_r($param_temp);\n\t\t\t// print_r($param_temp_detail);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->model_transaction->fn_proses_jurnal_angsuran_pyd_koptel($angsuran_id,$akun,$referensi); // proses jurnal transaksi pembiayaan\n\t\t\t// $this->model_transaction->delete_from_mfi_angsuran_temp_detail_unins($param_temp_detail);\n\t\t\t$this->db->update('mfi_angsuran_temp',array('status'=>2),array('angsuran_id'=>$angsuran_id));\n\n\t\t\t$check_tab = $this->model_transaction->get_mfi_angsuran_temp_tab($angsuran_id);\n\t\t\tif($check_tab->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach($check_tab->result_array() as $list){\n\t\t\t\t\t$arrdata = json_decode($list['data'], true);\n\t\t\t\t\t$this->add_setoran_tunai($arrdata);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->db->update('mfi_angsuran_temp_tab',array('status'=>1),array('angsuran_id'=>$angsuran_id));\n\t\t}\n\n\t\tif($this->db->trans_status()==true){\n\t\t\t$this->db->trans_commit();\n\n\t\t\t$this->db->query(\"UPDATE mfi_trx_account_financing SET seq='$seq', reference_no='$no_ref' WHERE trx_account_financing_id='$id_transaksi'\");\n\n\t\t\t$return = array('success'=>true,'trx_date'=>$trx_date);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\n\t\techo json_encode($return);\n\t}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "public function bExamen_e(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='ESPECIALES' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "private function calcul_debut_nouveau($date_courante)\n\t{\n\t\tBral_Util_Log::tour()->trace(get_class($this) . \" calcul_debut_nouveau - enter -\");\n\t\tBral_Util_Log::tour()->debug(get_class($this) . \" calcul_debut_nouveau - this->braldun->date_fin_tour_braldun=\" . $this->braldun->date_fin_tour_braldun);\n\t\tBral_Util_Log::tour()->debug(get_class($this) . \" calcul_debut_nouveau - date_courante=\" . $date_courante);\n\t\tBral_Util_Log::tour()->debug(get_class($this) . \" calcul_debut_nouveau - this->braldun->est_ko_braldun=\" . $this->braldun->est_ko_braldun);\n\t\tif ($this->braldun->date_fin_tour_braldun < $date_courante || $this->braldun->est_ko_braldun == 'oui') {\n\t\t\tBral_Util_Log::tour()->debug(get_class($this) . \" calcul_debut_nouveau - exit - true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tBral_Util_Log::tour()->debug(get_class($this) . \" calcul_debut_nouveau - exit - false\");\n\t\t\treturn false;\n\t\t}\n\t}", "function tache_debut_fin($tache_tmp, $aff_text_infobulle=false)\r\n{\r\n\tif($tache_tmp[\"date_debut\"]!=\"\" || $tache_tmp[\"date_fin\"]!=\"\")\r\n\t{\r\n\t\t////\tAffichage de la période ou date en mode texte\r\n\t\tglobal $trad;\r\n\t\tif($tache_tmp[\"date_debut\"]!=\"\" && $tache_tmp[\"date_fin\"]!=\"\")\t{ $tache_debut_fin = temps($tache_tmp[\"date_debut\"], \"normal\", $tache_tmp[\"date_fin\"], true); }\r\n\t\telseif($tache_tmp[\"date_debut\"]!=\"\")\t\t\t\t\t\t\t{ $tache_debut_fin = temps($tache_tmp[\"date_debut\"], \"normal\", \"\", true); }\r\n\t\telseif($tache_tmp[\"date_fin\"]!=\"\")\t\t\t\t\t\t\t\t{ $tache_debut_fin = $trad[\"fin\"].\" : \".temps($tache_tmp[\"date_fin\"], \"normal\", \"\", true); }\r\n\r\n\t\t////\tAffichage infobulle\r\n\t\tif($aff_text_infobulle==true)\t{ return $tache_debut_fin; }\r\n\t\t////\tBarre de statut du temps\r\n\t\telseif($tache_tmp[\"date_debut\"]!=\"\" && $tache_tmp[\"date_fin\"]!=\"\" && substr($tache_tmp[\"date_debut\"],0,10)!=substr($tache_tmp[\"date_fin\"],0,10))\r\n\t\t{\r\n\t\t\t// Barre d'avancement : (now-debut / fin-debut)*100\r\n\t\t\t$pourcent = round( ((time()-strtotime($tache_tmp[\"date_debut\"])) / (strtotime($tache_tmp[\"date_fin\"])-strtotime($tache_tmp[\"date_debut\"]))) * 100);\r\n\t\t\tif($pourcent<0) $pourcent = 0;\r\n\t\t\t$tache_retardee = tache_retardee($tache_tmp);\r\n\t\t\t$couleur_pourcent = ($tache_retardee==true) ? \"rouge\" : \"jaune\";\r\n\t\t\t// Texte\r\n\t\t\t$txt_barre = \"<img src=\\\"\".PATH_TPL.\"module_tache/date.png\\\" /> \".temps($tache_tmp[\"date_debut\"],\"plugin\",$tache_tmp[\"date_fin\"],true);\r\n\t\t\t$txt_infobulle = \"<img src=\\\"\".PATH_TPL.\"module_tache/date.png\\\" /> &nbsp; \".$tache_debut_fin;\r\n\t\t\tif($tache_retardee==true)\t$txt_infobulle .= \"<br /><br /><img src=\\\"\".PATH_TPL.\"divers/important.png\\\" /> &nbsp; \".$trad[\"TACHE_avancement_retard\"].\" (\".$tache_tmp[\"avancement\"].\" %)\";\r\n\t\t\t// Resultat\r\n\t\t\treturn status_bar($pourcent, $txt_barre, $txt_infobulle, $couleur_pourcent, \"width:150px;\").\" &nbsp; &nbsp;\";\r\n\t \t}\r\n\t \t////\tAffichage texte\r\n\t\telse { return $tache_debut_fin.\"<img src=\\\"\".PATH_TPL.\"divers/separateur.gif\\\" />\"; }\r\n\t}\r\n}", "function ogretmen_odev_getir ()\n {\n // if($odev=$this->vtb->query($sorgu))\n // {\n // $odevlist = $odev->fetchAll();\n\n // foreach ($odevlist as $o)\n // {\n // echo \"<div class='panel_akis_kutusu'>\".\"<p>\" . $o['odevadi'] . \"</p>\" . \"<p>\" . $o['dersadi'] . \"</p><p>\". $o['dtarih'] . \" \". $o['ttarih'] . \"</p></div>\" ;\n // }\n // }\n $sorgu=new sorgubul(\"select * from seviye_odevleri\",\"dersid\",\"=\",$_SESSION['dersler'],\"0,30\",\"or\");\n $sorgu=$sorgu->sorgu;\n\n if ($odev=$this->vtb->query($sorgu))\n {\n $odevlist = $odev->fetchAll();\n\n foreach ($odevlist as $o)\n {\n if ($a=$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid']) and $b =$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid'] . ' and okundumu = 0') )\n {\n $c = $a->fetchColumn();\n $d = $b->fetchColumn();\n $derssev=$this->vtb->prepare(\"select seviyeno,dersid from ders_seviyeler where seviyeid = ?\");\n $derssev->execute(array($o['seviye']));\n $derssev=$derssev->fetch();\n $ders=$this->vtb->prepare(\"select dersadi from dersler where dersid = ?\");\n $ders->execute(array($o['dersid']));\n $ders=$ders->fetchColumn();\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p style='padding: 10px 0px 0px 100px;float:left;'>\". $c . \" kişi teslim etti,\". $d . \" kişiyi okumadınız</p><a style='margin-left:20px;' class='soruonay' href='ogretmen_ders_goruntuleme.php?dersid=\" . $derssev['dersid'] . \"&seviyeno=\" . $derssev['seviyeno'] . \"&dersadi=\" . $ders .\"'>Kontrol et</a></div></div>\" ;\n\n }\n else\n {\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p>Kimse teslim etmedi</p></div></div>\" ;\n }\n }\n }\n\n }", "public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }", "public function reativar($sObservacao = null) {\n\n if (empty($this->iCodigoBem)) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.bem_nao_existe_base_de_dados'));\n }\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.sem_transacao'));\n }\n\n if (!$this->isBaixado()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.bem_nao_esta_baixado'));\n }\n $oDaoBensBaixa = new cl_bensbaix();\n $oDaoBensBaixa->excluir($this->getCodigoBem());\n if ($oDaoBensBaixa->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_reativar_bem', (object)array(\"erro_msg\" => $oDaoBensBaixa->erro_msg)));\n }\n\n $oDataAtual = new DBDate(date('Y-m-d', db_getsession(\"DB_datausu\")));\n $oInstit = new Instituicao(db_getsession(\"DB_instit\"));\n $lIntegracaoFinanceiro = ParametroIntegracaoPatrimonial::possuiIntegracaoPatrimonio($oDataAtual, $oInstit);\n\n $aNotas = $this->getNotasFiscais();\n\n $lRealizouLancamento = false;\n foreach ($aNotas as $oNota) {\n\n /**\n * realiza lancamentos contabens do bem\n * caso o desdobramento da nota do bem esteja no grupo 9 (bem permante)\n */\n if (!empty($oNota) && $this->verificaSituacaoNota() && $oNota->getValorLiquidado() == 0) {\n\n $oGrupo = GrupoContaOrcamento::getGrupoConta($oNota->getDesdobramento(), db_getsession(\"DB_anousu\"));\n if (!empty($oGrupo) && $oGrupo->getCodigo() == 9) {\n\n $sObs = \"Estorno do Lançamento em liquidação do tombamento do bem {$this->getCodigoBem()}.\";\n\n if ($lIntegracaoFinanceiro) {\n\n $nValor = $this->getValorAquisicao();\n if (count($aNotas) > 1) {\n $nValor = $this->getValorItemNota($oNota->getCodigoNota());\n }\n\n $oProcessarLancamento = new stdClass();\n $oProcessarLancamento->iCodigoDotacao = $oNota->getEmpenho()->getDotacao()->getCodigo();\n $oProcessarLancamento->iCodigoElemento = $oNota->getDesdobramento();\n $oProcessarLancamento->iCodigoNotaLiquidacao = $oNota->getCodigoNota();\n $oProcessarLancamento->iFavorecido = $oNota->getEmpenho()->getCgm()->getCodigo();\n $oProcessarLancamento->iNumeroEmpenho = $oNota->getEmpenho()->getNumero();\n $oProcessarLancamento->sObservacaoHistorico = $sObs;\n $oProcessarLancamento->nValorTotal = $nValor;\n $oProcessarLancamento->oClassificacao = $this->getClassificacao();\n $oProcessarLancamento->oGrupo = $oGrupo;\n\n LancamentoEmpenhoEmLiquidacao::processar($oProcessarLancamento);\n $lRealizouLancamento = true;\n }\n }\n }\n }\n\n if (USE_PCASP && !$lRealizouLancamento && $lIntegracaoFinanceiro ) {\n\n /**\n * Realiza acerto nas contas de depreciação e classificação, caso seja necessário\n */\n $oBemAcertoContaClassificacao = new BemAcertoContaClassificacao();\n $oDBData = new DBDate( date(\"d/m/Y\", db_getsession(\"DB_datausu\")) );\n\n $oBemDepreciacao = BemDepreciacao::getInstance($this);\n $nValorAtual = $this->nValorAquisicao;\n\n if (!empty($oBemDepreciacao)) {\n $nValorAtual = $oBemDepreciacao->getValorAtual();\n }\n\n if ($nValorAtual != 0) {\n $oLancamentoauxiliarBem = new LancamentoAuxiliarBem();\n $oLancamentoauxiliarBem->setValorTotal($nValorAtual);\n $oLancamentoauxiliarBem->setBem($this);\n $oLancamentoauxiliarBem->setObservacaoHistorico($sObservacao);\n $oLancamentoauxiliarBem->setEstorno(true);\n $oEventoContabil = new EventoContabil(702, db_getsession('DB_anousu'));\n $aLancamentos = $oEventoContabil->getEventoContabilLancamento();\n $oLancamentoauxiliarBem->setHistorico($aLancamentos[0]->getHistorico());\n $oEventoContabil->executaLancamento($oLancamentoauxiliarBem);\n }\n }\n }", "function get_nbre_conso(){\n\t\tglobal $bd;\n\t\t$req = $bd->query(\"SELECT SUM(nbre) as nbre FROM consommateur WHERE etat = 'present' \");\n\t\t$data = $req->fetch();\n\t\treturn $data['nbre'];\n\t}", "public static function mostraBenvenuto($pagina) {\r\n $operatore = $_SESSION[\"op\"];\r\n $pagina->setHeaderFile(\"./view/header.php\");\r\n $pagina->setContentFile(\"./view/benvenuto.php\");\r\n $pagina->setTitle(\"Benvenuto\");\r\n OperatoreController::setruolo($pagina);\r\n $pagina->setMsg('<div class=\"erroreInput\"><p>Errore, pagina non esistente...</p></div>');\r\n include \"./view/masterPage.php\";\r\n }", "public function briset_Abendahara()\r\n\t{\r\n\t\t$title['title'] = \"Daftar Agenda\";\r\n\t\t$data['user'] = $this->db->get_where('user', ['nik' =>\r\n\t\t$this->session->userdata('nik')])->row_array();\r\n\t\t$data['mbendahara'] = $this->agendaUModel->allData_menurutBendahara();\r\n\t\t$data['briset'] = $this->agendaUModel->allData_menurutBRiset();\r\n\t\t$this->load->view('templates/header', $title);\r\n\t\t$this->load->view('dewanPimpinan/temp_BendaharaDP/sidebar');\r\n\t\t$this->load->view('templates/navbar', $data);\r\n\t\t$this->load->view('dewanPimpinan/agenda_bendahara/briset&pengembangan', $data);\r\n\t\t$this->load->view('templates/footer');\r\n\t}", "public function get_barbe(){ return $this->_barbe;}", "private function _broFist()\n {\n $this->_message(\"..............__\");\n $this->_message(\"......../´¯/''/´`¸\");\n $this->_message(\"...../'/../../..../¨¯\\\\\");\n $this->_message(\"...('(...´..´.¯~/'..')\");\n $this->_message(\"....\\...........'.../\");\n $this->_message(\".....\\...\\.... _.·´\");\n $this->_message(\"......\\.......(\");\n $this->_message(\"BRO FIST\");\n }", "public function berekenOppervlakte() {\n $opp_grondvlak = Figuur::$PI * $this->y * $this->y;\n $opp_mantel = 2 * Figuur::$PI * $this->y * $this->x;\n $opp_totaal = $opp_grondvlak + $opp_grondvlak + $opp_mantel;\n\n return \"De uitgerekende oppervlakte van de cilinder is: \" . $opp_totaal;\n }", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "final function velcom(){\n }", "public function TampilkanNomerRubrik_surat1($noSurat, $f){\n $noSurat=explode('_',$noSurat);\n\t\t$surat=implode('/',$noSurat);\n\t\t$data['Nosurat']='No Rubrik Anda Berhasil Dimasukkan, No Rubrik Anda :'.$surat;\n\t\t$hasil = $this->M_Catatan->lihat_rubrik($f);\n\t\t$data['catatan']=$hasil->result();\n\t\t$fungsi=$this->M_Catatan->lihat_fungsi();\n\t\t$data['fungsi']=$fungsi->result();\n\t\t$data['active']='catatan';\n\t\t$data['active2']='';\n\t\t$data['active3']=$f;\n\t\t$this->load->view('V_Head');\n\t\t$this->load->view('V_Asidebar',$data);\n\t\t$this->load->view('V_TabelNoRubrik_Catatan',$data);\n\t\t$this->load->view('V_Footer');\n\t}", "function calcularPonderacion($instanciaActual=\"\",$instanciaPonderar)\n\t{\n\t\t$personajesutil = new personajepar($this->BG->con);\n\t\t$personajesutil->setronda($instanciaActual);\n\t\t$personajesutil = $personajesutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$batallutil = new batalla($this->BG->con);\n\t\t$batallutil->setronda($instanciaPonderar);\n\t\t$batallutil = $batallutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$totalponderacion=0;\n\t\tfor($i=0;$i<count($batallutil);$i++)\n\t\t{\n\t\t\t$pos[0] = 1500;\n\t\t\t$pos[1] = 600;\n\t\t\t$pos[2] = 400;\n\t\t\t$pos[3] = 300;\n\t\t\t$pos[4] = 200;\n\t\t\t$pos[5] = 100;\n\t\t\t$pos[6] = 100;\n\t\t\t$pos[7] = 20;\n\t\t\t$peleapersonaje = new pelea($this->BG->con);\n\t\t\t$peleapersonaje->setidbatalla($batallutil[$i]->getid());\n\t\t\t$peleapersonaje = $peleapersonaje->read(true,1,array(\"idbatalla\"),1,array(\"votos\",\"DESC\"));\n\t\t\t$k=0;\n\t\t\t$calponderacion = 0;\n\t\t\tfor($j=0;$j<count($peleapersonaje);$j++)\n\t\t\t{\n\t\t\t\tif(comprobararray($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje()))\n\t\t\t\t{\n\t\t\t\t\tif($j>0 && $peleapersonaje[$j]->getvotos() == $peleapersonaje[$j-1]->getvotos())\n\t\t\t\t\t{}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(count($pos)<=$j)\n\t\t\t\t\t\t\t$calponderacion = $pos[count($pos)-1];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calponderacion = $pos[$j];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$calponderacion += $peleapersonaje[$j]->getvotos();\n\t\t\t\t\t}\t\t\n\t\t\t\t\t$totalponderacion+=$calponderacion;\n\t\t\t\t\t$personajemod = arrayobjeto($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje());\n\t\t\t\t\t$personajemod->setponderacion($calponderacion);\n\t\t\t\t\t$personajemod->update(1,array(\"ponderacion\"),1,array(\"id\"));\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$torneoActual = new torneo($this->BG->con);\n\t\t$torneoActual->setactivo(1);\n\t\t$torneoActual = $torneoActual->read(false,1,array(\"activo\"));\n\t\t$torneoActual->setponderacionprom(round($totalponderacion/count($personajesutil)));\n\t\t$torneoActual->update(1,array(\"ponderacionprom\"),1,array(\"id\"));\n\t}", "public function bExamen_i(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='IMAGEN' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function pemrosesanSeleksiUnit()\n {\necho(\"<br/><br/>**********HASIL FILTERING TOKEN / ENTITY*********<br/><br/>\");\n //pemfilteran berdasarkan pilihan kriteria.\n if(Pembantu::gunakanLemma($this->penanda_filter_token_entity)) // gunakan pemfilteran token.\n {\nPembantu::cetakDebug(\"Gunakan Filter Token<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayToken($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n else // gunakan pemfilteran entity.\n {\nPembantu::cetakDebug(\"Gunakan Filter Entity<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayEntity($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n\necho \"<br/><br/>**********HASIL PERHITUNGAN FREKUENSI KEMUNCULAN TOKEN PADA TIAP UNIT STRING*********<br/><br/>\";\n //Hitung Frekuensi kemunculan token berdasarkan string unit.\n $totalHasil = count($this->array_hasil_filtering);\n $this->array_freq_hasil_filtering = array();\n $isMultipleEDU = false;\n $jumlahUnitString = count($this->array_objek_unit[0]->array_unit_string[0]); //menentukan apakah double EDU atau triple EDU.\n\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOUBLE_EDU || $this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // jika unit string adalah double EDU atau Triple EDU\n {\n $isMultipleEDU = true;\n }\n\n for($i=0; $i<$totalHasil;$i++)\n {\n $totalUnitString = count($this->array_objek_unit[$i]->array_unit_string); // jumlah unit string.\n $this->array_freq_hasil_filtering[$i] = array();\n $awalIdxNER = 0;\n\n //abou 25-08-2013 : unused\n// $idxAwalUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya_akhir = 0; //khusus triple EDU\n\necho(\"Total UnitString = $totalUnitString<br/>\");\n for($j=0;$j<$totalUnitString;$j++)\n {\n $this->array_freq_hasil_filtering[$i][$j] = array();\n $jumlahToken = count($this->array_hasil_filtering[$i]);\n $indexAkhirPencarian = count($this->array_objek_unit[$i]->array_unit_string[$j]);\n\n /*\n * abou 25-08-2013 : Tidak perlu digunakan, NER dan POS sudah tersimpan sesuai urutan per kata dalam array unit string.\n * \n if($isMultipleEDU) //aboubakr 20120916 : tentukan awalIdxkata tiap unitnya\n {\n if($this->array_objek_unit[$i]->array_unit_string[$j][0][0] != 'NULL')\n {\n $awalIdxNER = $idxAwalUnitSebelumnya;\n }\n else\n {\n $awalIdxNER = $idxAwalUnitSebelumnya + $jumlahKataUnitSebelumnya;\n }\n\n //aboubakr 20120916 : Hitung jumlah kata Unit sebelumnya\n // jika akhirnya tidak NULL\n if($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1][0] != 'NULL')\n {\n $jumlahKataUnitSebelumnya_akhir = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n\n $idxAwalUnitSebelumnya += $jumlahKataUnitSebelumnya;\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-2]);\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n }\n else\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]); // aboubakr 20120916 : hitung jumlah kata unit terakhir, karena tidak null.\n }\n }\n else // unit terakhir NULL.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][0]); // aboubakr 20120916 : hitung jumlah kata unit awal, karena unit terakhir null. Dipastikan ada.\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][1]); // aboubakr 20120916 : tambahkan untuk triple edu.\n }\n }\n//echo \"Unit ke-$j -> \" . $this->array_objek_unit[$i]->array_unit_string[$j][0][0] . \" :: idxSebelum = $idxAwalUnitSebelumnya , jumlahKataSebelum = $jumlahKataUnitSebelumnya , awalIndex = $awalIdxNER<br/>\";\n }\n */\n \n//Pembantu::cetakDebug(\"[abouDebug] NER Array \" . json_encode($this->array_objek_unit[$i]->array_ner) . \"<br/>\");//suspect 18022013 : ga dicek di fungsi hitungKata!!!\n \n $arrayUnitStringMultiEDU = array(); //abou 25-08-2013 : gunakan sebagai iterator awalIdxNER.\n for($k = 0; $k < $jumlahToken; $k++)\n {\n if($isMultipleEDU) // jika unit string adalah double EDU atau Triple EDU\n {\n if($k==0) //abou 25-08-2013 : cukup sekali proses, gunakan untuk sisa token.\n {\n $totalKataDalamUnit = 0;\n for($x=0;$x<$jumlahUnitString;$x++)\n {\n $jumlahTokenUnitString = count($this->array_objek_unit[$i]->array_unit_string[$j][$x]);\n\n for($y=0;$y<$jumlahTokenUnitString;$y++)\n {\n $totalKataDalamUnit++;\n if($this->array_objek_unit[$i]->array_unit_string[$j][$x][$y] != 'NULL')\n {\n array_push($arrayUnitStringMultiEDU, $this->array_objek_unit[$i]->array_unit_string[$j][$x][$y]);\n }\n }\n }\n }\n\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" , array target cari sampai index ke-$indexAkhirPencarian : \" . json_encode($arrayUnitStringMultiEDU) . \"<br/>\"); \n //16062013 : Pisahkan untuk pengecekan NER dan POS. Jika Filter yang digunakan filter NER, supply array NER untuk parameter ke 3, otherwise, supply array POS.\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n else\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n }\n else // untuk selain multiple EDU.\n {\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" array target cari sampai index ke-$indexAkhirPencarian <br/>\");\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n else\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n }\n }\n\n if(!$isMultipleEDU) //aboubakr 20120916 : jika bukan multiple EDU.\n {\n $awalIdxNER += $indexAkhirPencarian;\n }\n else\n {\n $awalIdxNER += count($arrayUnitStringMultiEDU);\n }\n }\nPembantu::cetakDebug(\"Hasil Frekuensi Untuk File - \" . $this->array_objek_unit[$i]->nama . \" ==> \" . json_encode($this->array_freq_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n\n// Tulis hasil modul seleksi unit.\n $akhiranNamaFile = \"\";\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOKUMEN)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_DOC;\n }\n else if($this->penanda_unit_string == Umum::UNIT_STRING_SENTENCE)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_STC;\n }\n else\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_EDU;\n }\n\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN,0777,true); //buat folder keluaran 1. \n }\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE,0777,true); //buat folder keluaran 2.\n }\n// mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR,0,true); //buat folder keluaran 2 - transpose. No Need\n for($i=0;$i<$totalHasil;$i++)\n {\n TulisHasil::tuliskanHasilSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN . $this->array_objek_unit[$i]->nama . Umum::AKHIRAN_HASIL_SELEKSI_UNIT,$this->array_hasil_filtering[$i],false);\n TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],false);\n// TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],true);\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function beratbadanideal($tb, $g){\n\tif($g == \"Pria\" && $tb >= 160 ||$g == \"Wanita\" && $tb >= 150){\n\t\t$bbi = beratbadanormal($tb) - (0.1 * beratbadanormal($tb));\n\t}else if($g == \"Pria\" && $tb < 160 || $g == \"Wanita\" && $tb < 150){\n\t\t$bbi = beratbadanormal($tb) - 1;\n\t}\n\treturn $bbi;\n}", "public function bidang()\n\t{\n $data_bidang = $this->m_data->tampil_data('bidang')->result();\n\n // di parsing ke view\n $data = array(\n 'bidang' => $data_bidang, \n );\n\n // menampilkan view index\n\t\t$this->load->view('bidang',$data);\n }", "public function verif_fase(){ \n if($this->input->is_ajax_request()){\n $post = $this->input->post();\n $id_f = $post['id_f'];\n\n $nro=$this->model_componente->componentes_nro($id_f);\n\n if($nro == 0){\n echo \"true\"; ///// La fase no tiene dependencias\n }\n else{\n echo \"false\";; //// La fase tiene dependencias\n } \n }else{\n show_404();\n }\n }", "public function reportFrais($Lignefraishorsforfait)\n {\n $visiteur = $Lignefraishorsforfait->getIdvisiteur();\n\n //on vérifie si il y a déjà une fiche pour le mois suivant\n $ficheExist = $this->checkIfNextFicheExist($visiteur, $Lignefraishorsforfait->getMois());\n\n if($ficheExist)\n {\n //On récupère la dernière fiche existante\n $lastMonth = $this->ficheFraisRepository->getLastMonthByVisiteur($visiteur);\n $lastFiche = $this->ficheFraisRepository->findOneBy([\n 'idvisiteur' => $visiteur->getId(),\n 'mois' => $lastMonth,\n ]);\n\n\n //Modification du mois du frais reporté\n $Lignefraishorsforfait->setMois($lastMonth);\n $this->entityManager->persist($Lignefraishorsforfait);\n\n $this->entityManager->flush();\n return 'Frais reportééééé';\n\n }\n\n\n\n //Si elle existe\n if (!$ficheExist) {\n\n //On récupère la dernière fiche existante\n $lastMonth = $this->ficheFraisRepository->getLastMonthByVisiteur($visiteur);\n $lastFiche = $this->ficheFraisRepository->findOneBy([\n 'idvisiteur' => $visiteur->getId(),\n 'mois' => $lastMonth,\n ]);\n\n //On l'a cloture\n if ($lastFiche->getIdetat()->getId() === \"CR\") {\n $lastFiche->setIdetat($this->entityManager->getReference('App\\Entity\\Etat', 'CL'));\n $lastFiche->setDatemodif(new \\DateTime(\"now\"));\n }\n $this->entityManager->persist($lastFiche);\n\n //création de l'objet du visiteur\n $visiteurEntity = $this->entityManager->getReference('App\\Entity\\User', $visiteur->getId());\n\n //On crée une nouvelle fiche pour le mois qui suivera la dernière fiche existante\n $nextMonth = $this->getMoisSuivant($lastMonth);\n $newFiche = new Fichefrais();\n $newFiche->setIdvisiteur($visiteurEntity);\n $newFiche->setMois($nextMonth);\n $newFiche->setIdetat($this->entityManager->getReference('App\\Entity\\Etat', \"CR\"));\n $newFiche->setDatemodif(new \\DateTime(\"now\"));\n $this->entityManager->persist($newFiche);\n\n //Modification du mois du frais reporté\n $Lignefraishorsforfait->setMois($nextMonth);\n $this->entityManager->persist($Lignefraishorsforfait);\n\n $this->entityManager->flush();\n\n return 'Frais reporté';\n } else {\n\n return 'Impossible de cloturer la fiche';\n }\n\n\n }", "public function nomor_baru() {\n\t\t//variabel\n\t\t$data['datas'] = $this->siswa_model->get_many_by('status','Aktif');\n\t\t//select2 js\n\t\t$template_data['js_plugins'] = [\n\t\t\tbase_url('assets/plugins/select2/select2.js'),\n\t\t\tbase_url('assets/js/sms_select2.js')\n\t\t];\n\t\t$template_data['css_plugins'] = [\n base_url('assets/plugins/select2/select2.css')\n ];\n\t\t$template_data['title'] \t= 'SMS Gateway ';\n\t\t$template_data['subtitle'] \t= 'Kirim SMS';\n $template_data['crumb'] \t= ['SMS Gateway' => 'smsgateway','Nomor Baru' => 'smsgateway/kirimsms/nomor_baru',];\n\t\t//view\n\t\t$this->layout->set_wrapper('nomorbaru_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "public function dajStatusSvomPredvidjanju()\n {\n $korisnik=$this->session->get(\"korisnik\");\n $idPred=$_COOKIE['idTek'];\n setcookie(\"idTek\", \"\", time() - 3600);\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanje=$predvidjanjeModel->dohvati_predvidjanja_id($idPred);\n $danas=date(\"Y-m-d H:i:s\");\n //moze da se podeli u tri ifa, radi lepseg ispisa, ali ovde mislim da su svi slucajevi\n if ($danas<$predvidjanje->DatumEvaluacije || $predvidjanje->Status!=\"CEKA\" || $korisnik->IdK!=$predvidjanje->IdK)//ne sme jos da mu daje status\n {\n echo \"GRESKA\";\n return;\n }\n $statusV=$this->request->getVar(\"dane\");\n if($statusV=='DA') $status=\"ISPUNJENO\";\n else $status=\"NEISPUNJENO\";\n $predvidjanjeModel->postavi_status($predvidjanje, $status);\n if ($status==\"ISPUNJENO\")\n {\n $korisnikModel=new KorisnikModel();\n $korisnikModel->uvecaj_skor($korisnik, $predvidjanje->Tezina);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function bancos($periodo,$ejer,$moneda){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3\n\t\t\tand m.IdPoliza=p.id and p.idperiodo in (\".$periodo.\",\".($periodo-=1).\") and p.activo=1 and m.Activo=1\n\t\t\tgroup by m.Cuenta,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "function sobre_planeacion($minimoMes,$maximoMes,$vigencia,$unidades,$tipo_usuario)\n\t\t{\n\t\t\t//$tipo_usuario ALMACENA EL TIPO DE USUARIO( I O E), EN UN ARRAY, ESTE SE CARGA EN LA PAGINA DE PLANEACION DE PROYECTOS (upHTplaneacionProy.PHP)\t\n//echo $unidades[0].\" - $minimoMes - $maximoMes - $vigencia ********************** <br><br>\";\n\t\t?>\n\n<?\t\t\n\t\t$ban_reg=0; //PERMITE IDENTIFICAR, SI SE ENCONTRO ALMENOS, UN USUARIO SOBRE PLANEADO, DE NO SER ASI, NO SE ENVIA EL CORREO\n\t\t$pTema ='<table width=\"100%\" border=\"0\">\n\t\t <tr class=\"Estilo2\" >\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td width=\"5%\" >Asunto:</td>\n\t\t\t<td >Sobre planeaci&oacute;n de participantes.</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t \n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\">Los siguientes participantes, tienen una dedicaci&oacute;n superior a 1 en los siguientes proyectos:</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t </tr>\n\t\t\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\" >\n\t\t\t\t<table width=\"100%\" border=\"1\" >\n\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td colspan=\"5\"></td>\n\t\t\t\t\t<td colspan=\"'.(($maximoMes-$minimoMes)+1).'\" align=\"center\" >'.$vigencia.'</td>\n\t\t\t\t </tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td>Unidad</td>\n\t\t\t\t\t<td>Nombre</td>\n\t\t\t\t\t<td>Departamento</td>\n\t\t\t\t\t<td>Divisi&oacute;n</td>\n\t\t\t\t\t<td>Proyecto</td>';\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$vMeses= array(\"\",\"Ene\",\"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"); \n\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t{\n\n\t\t\t\t\t $pTema = $pTema.'<td>'.$vMeses[$m].' </td>';\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t $pTema = $pTema.' </tr>';\n\t\t\t\t$cur_tipo_usu=0; //CURSOR DEL ARRAY, DEL TIPO DE USUARIO \n\t\t\t\tforeach($unidades as $unid)\n\t\t\t\t{\n//tipo_usuario\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"I\")\t\n\t\t\t\t\t{\n\t\t\t\t\t//CONSULTA SI EL USUARIO ESTA SOBREPLANEADO EN ALMENOS, UN MES DURANTE LA VIGENCIA\n\n\t\t\t\t\t//COSNULTA PARA LOS USUARIOS INTERNOS\n\t\t\t\t\t\t\t$sql_planea_usu=\"select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, Usuarios.nombre, \n\t\t\t\t\t\t\t\t\t\t\tUsuarios.apellidos ,Divisiones.nombre as div,Departamentos.nombre as dep\n\t\t\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t\t inner join Usuarios on PlaneacionProyectos.unidad=Usuarios.unidad \n\t\t\t\t\t\t\t\t\t\t\t inner join Departamentos on Departamentos.id_departamento=Usuarios.id_departamento \n\t\t\t\t\t\t\t\t\t\t\t inner join Divisiones on Divisiones.id_division=Departamentos.id_division \n\t\t\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\t\t//PlaneacionProyectos.id_proyecto,\t\t\t\t\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\t\t\tand esInterno='I'\n\t\t\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,Usuarios.nombre, Usuarios.apellidos,Divisiones.nombre ,Departamentos.nombre \n\t\t\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"E\")\t\n\t\t\t\t\t{\n\t\t\t\t\t\t//COSNULTA PARA LOS USUARIOS EXTERNOS\n\t\t\t\t\t\t$sql_planea_usu=\" select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, TrabajadoresExternos.nombre, \n\t\t\t\t\t\t\t\t\tTrabajadoresExternos.apellidos,'' div, ''dep\n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t inner join TrabajadoresExternos on PlaneacionProyectos.unidad=TrabajadoresExternos.consecutivo \n\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\tand esInterno='E'\n\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,TrabajadoresExternos.nombre, TrabajadoresExternos.apellidos\n\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$cur_planea_usu=mssql_query($sql_planea_usu);\n//echo $sql_planea_usu.\" ---- <br>\".mssql_get_last_message().\" *** \".mssql_num_rows($cur_planea_usu).\"<br>\";\n\t\t\t\t\twhile($datos__planea_usu=mssql_fetch_array($cur_planea_usu))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ban_reg=1; //SI ENCUENTRA ALMENOS UN USUARIO SOBREPLANEADO, ENVIA EL CORREO\n\t\t\t\t\n\t\t\t\t\t\t//CONSULTA LOS PROYECTOS, EN LOS CUALES EL PARTICIAPENTE HA SIDO PLANEADO, ESTO PARA PODER DOBUJAR LA TABLA DE FORMA CORRECTA\n\t\t\t\t\t\t$sql_uu=\" select distinct(id_proyecto),nombre,codigo,cargo_defecto from (select SUM (hombresMes) as total_hombre_mes ,unidad, mes,PlaneacionProyectos.id_proyecto ,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto \n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos\n\t\t\t\t\t\t\t\t\t\tinner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$sql_uu=$sql_uu.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]=0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_uu=$sql_uu.\"0) and unidad in(\".$unid.\") and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by unidad, mes , PlaneacionProyectos.id_proyecto,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto ) aa \";\n// HAVING (SUM (hombresMes)\t>1\t\n\t\t\t\t\t\t$cur_uu=mssql_query($sql_uu);\n\t\t\t\t\t\t$cant_proy=mssql_num_rows($cur_uu);\n//echo \"<br><BR>---//**************--------------\".$sql_uu.\" \".mssql_get_last_message().\"<br>\".$cant_proy.\"<br>\";\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?\n\t\t\t\t//echo $sql_proy_planea.\" ---- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\n\t\t\t\t\t\t$total_planeado= array();\n\t\t\t\t\t\t$cont=0;\n\t\t\t\t\t\twhile($datos_uu=mssql_fetch_array($cur_uu))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($cont==0)\n\t\t\t\t\t\t\t{\n\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\t\t\t\t\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \"> '.$datos__planea_usu[\"unidad\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'.$datos__planea_usu[\"apellidos\"].' '.$datos__planea_usu[\"nombre\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"dep\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"div\"].' </td>';\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" >['.$datos_uu[\"codigo\"].'.'.$datos_uu[\"cargo_defecto\"].'] '. $datos_uu[\"nombre\"].' </td>';\n\n\t\t\t\t\t\t\t//CONSULTA LA INFORMACION DE LO PLANEADO EN CADA MES, DE ACUERDO AL PORYECTO CONSULTADO\n\t\t\t\t\t\t\t$sql_pro=\"select SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.id_proyecto,PlaneacionProyectos.unidad,mes\n\t\t\t\t\t\t\t\t\t\t from PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and PlaneacionProyectos.unidad=\".$unid.\" and id_proyecto=\".$datos_uu[\"id_proyecto\"].\" and mes in(\";\n\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" 0) and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by PlaneacionProyectos.id_proyecto ,PlaneacionProyectos.unidad ,mes order by (mes) \";\n// HAVING (SUM (hombresMes))>1\n\t\t\t\t\t\t\t$cur_proy_planea=mssql_query($sql_pro);\n//\t\t\t\techo $sql_pro.\" --22222222222-- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\t\t\t$m=$minimoMes;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($datos_proy_planea=mssql_fetch_array($cur_proy_planea))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tfor ($m;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($datos_proy_planea[\"mes\"]==$m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]+=( (float) $datos_proy_planea[\"total_hombre_mes\"]);\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" align=\"right\" >'.((float) $datos_proy_planea[\"total_hombre_mes\"] ).'</td>';\n\n\t\t\t\t\t\t\t\t\t\t$m=$datos_proy_planea[\"mes\"];\n\t\t\t\t\t\t\t\t\t\t$m++;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp; </td>';\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m--;\n\t\t\t\t\t\t\tfor ($m++;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t\tunset($datos_proy_planea);\n\n\t\t\t\t\t\t\t $pTema = $pTema.' </tr>';\n\n\t\t\t\t//\t\t\techo $datos_proy_planea[\"total_hombre_mes\"].\"<br>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\n\t\t\t\t\t\t<td colspan=\"4\" >&nbsp;</td>\n\n\t\t\t\t\t\t<td>Total planeaci&oacute;n</td>';\n\n\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($total_planeado[$m]==0)\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>'.$total_planeado[$m].'</td>';\n\t\t\t\t\t\t}\n \n\t\t\t\t\t $pTema = $pTema.' </tr>\n\t\t\t\t\t <tr >\n\t\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t\t </tr>\t';\n\n\t\t\t\t\t}\n\t\t\t\t\t$cur_tipo_usu++;\n\t\t\t\t}\n\t\t\t\t$pTema = $pTema.'\n\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t </tr>\n\t\t<tr class=\"Estilo2\"><td colspan=\"2\" >Para consultar en detalle la planeaci&oacute;n de un participante, en un proyecto especifico, utilice el reporte Usuarios por proyecto, accediendo a el, atravez del boton Consolidados por divisi&oacute;n, ubicado en la parte superior de la pagina principal de la planeaci&oacute;n por proyectos. </td></tr>\n\t\t</table>';\n\n\t\t/*\n\t\t\t\t//consulta la unidad del director y el coordinador de proyecto\n\t\t\t\t$sql=\"SELECT id_director,id_coordinador FROM HojaDeTiempo.dbo.proyectos where id_proyecto = \" . $cualProyecto.\" \" ;\n\t\t\t\t$eCursorMsql=mssql_query($sql);\n\t\t\t\t$usu_correo= array(); //almacena la unidad de los usuarios a los que se le enviara el correo\n\t\t\t\t$i=1;\n\t\t\t\twhile($datos_dir_cor=mssql_fetch_array($eCursorMsql))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_coordinador\"];\n\t\t\t\t\t$i++;\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_director\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\n\t\t\t\t//consulta la unidad porgramadores y ordenadores de gasto\t\t\t\n\t\t//select unidad from HojaDeTiempo.dbo.Programadores where id_proyecto=\".$cualProyecto.\" union\n\t\t\t\t$sql_pro_orde=\" select unidadOrdenador from GestiondeInformacionDigital.dbo.OrdenadorGasto where id_proyecto=\".$cualProyecto;\n\t\t\t\t$cur_pro_orde=mssql_query($sql_pro_orde);\n\t\t\t\twhile($datos_pro_orde=mssql_fetch_array($cur_pro_orde))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_pro_orde[\"unidad\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\t\t\t\n\t\t\n\t\t\t\t$i=0;\n\t\t\t\t//consulta el correo de los usuarios(director,cordinador,ordenadroes de G, y programadores) asociados al proyecto\n\t\t\t\t$sql_usu=\" select email from HojaDeTiempo.dbo.Usuarios where unidad in(\";\n\t\t\t\tforeach($usu_correo as $unid)\n\t\t\t\t{\n\t\t\t\t\tif($i==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" \".$unid;\t\t\n\t\t\t\t\t\t$i=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" ,\".$unid;\n\t\t\t\t}\n\t\t\t\t$sql_usu=$sql_usu.\") and retirado is null\";\n\t\t\t\t$cur_usu=mssql_query($sql_usu);\t\t\t\t\n\t\t\n\t\t\t\t//se envia el correo a el director, cordinador, orenadores de gasto, y programadores del proyecto\t\n\t\t\t\twhile($eRegMsql = mssql_fetch_array($cur_usu))\n\t\t\t\t{\t\t\n\t\t\t\t $miMailUsuarioEM = $eRegMsql[email] ;\n\t\t\t\n\t\t\t\t //***EnviarMailPEAR\t\n\t\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\n\t\t\t\n\t\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\n\t\t\t\n\t\t\t\t //***FIN EnviarMailPEAR\n\t\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t\n\t\t\t\t}\n\t\t*/\n\t\t\tif($ban_reg==1) //SEW ENVIA EL CORREO SI EXISTE ALMENOS UN USUARIO SOBREPLANEADO\n\t\t\t{\n\t\t///////////////////////////**********************************************************PARA QUITAR\n\t\t\t $miMailUsuarioEM = 'carlosmaguirre'; //$eRegMsql[email] ;\t\n\t\t\t\t$pAsunto='Sobre planeaci&oacute;n de proyectos';\n\t\t\t //***EnviarMailPEAR\t\n\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\t\n\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\t\n\t\t\t //***FIN EnviarMailPEAR\n\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t}\n\t\t\n\t\t?>\n\n<?\n}", "public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}", "public function TampilkanNomerRubrik_surat4($noSurat, $f){\n $noSurat=explode('_',$noSurat);\n\t\t$surat=implode('/',$noSurat);\n\t\t$data['Nosurat']='No Rubrik Anda Tidak Diperbarui, No Rubrik Anda :'.$surat;\n\t\t$hasil = $this->M_Catatan->lihat_rubrik($f);\n\t\t$data['catatan']=$hasil->result();\n\t\t$fungsi=$this->M_Catatan->lihat_fungsi();\n\t\t$data['fungsi']=$fungsi->result();\n\t\t$data['active']='catatan';\n\t\t$data['active2']='';\n\t\t$data['active3']=$f;\n\t\t$this->load->view('V_Head');\n\t\t$this->load->view('V_Asidebar',$data);\n\t\t$this->load->view('V_TabelNoRubrik_Catatan',$data);\n\t\t$this->load->view('V_Footer');\n\t}", "public function nahrajObrazkyVyhledavac($textHledani){\t\t\t\n\t\t\t$dotaz = \"SELECT obrazekID,filepath,tabObrazky.uzivatelID,uzivatelJmeno FROM tabObrazky \n\t\t\t\t\tJOIN tabUzivatele ON tabUzivatele.uzivatelID = tabObrazky.uzivatelID WHERE filepath LIKE \".'\"%' . $textHledani.'%\"';\n\t\t\t\n\t\t\t\t//echo \"X \".$dotaz .\" X\";\n\t\t\t\n\t\t\t$vysledek = mysqli_query($this -> pripojeni,$dotaz);\n\t\t\t$vratit = array();\n\t\t\t\n\t\t\tif($vysledek == false){\n\t\t\t\techo(\"During data upload an error occured!\" . mysqli_error($this->pripojeni) );\n\t\t\t}\n\t\telse{\n\t\t\t//case result is mysqli_result\n\t\t\t$pole = $vysledek->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach($pole as $radek ){\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tforeach($radek as $x => $x_value) {\n\t\t\t\t\techo \"Key=\" . $x . \", Value=\" . $x_value;\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$obrazekID = $radek[\"obrazekID\"];\n\t\t\t\t$filePath = $radek[\"filepath\"];\n\t\t\t\t$uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t$jmenoUzivateleCoNahral = $radek[\"uzivatelJmeno\"];\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\techo $obrazekID;\n\t\t\t\techo $filePath;\n\t\t\t\techo $uzivatelID;\n\t\t\t\t*/\n\t\t\t\t//echo '*'.$jmenoUzivateleCoNahral.'*';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$obrazek = new obrazekObjekt($obrazekID, $filePath,$uzivatelID,$jmenoUzivateleCoNahral);\n\t\t\t\t\n\t\t\t\t//echo $obrazek->filePath;\n\t\t\t\t//echo $obrazek->jmenoUzivateleCoNahral;\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$obrazek); \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\treturn\t$vratit;\t\t\n\t\t\n\t}", "function isFallo();", "public function findPagoDetalleInmuebleUrbano()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioInmuebleUrbano();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCeroInmueble($codigoPresupuestario, [2]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Inmuebles Urbanos periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t// $registers = [];\r\n\t\t\t// // Pagos con periodos iguales a cero\r\n\t\t\t// $registers = self::findPagoDetallePeriodoIgualCeroInmueble($codigoPresupuestario, [2]);\r\n\t\t\t// if ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t// \tself::errorCargarData(Yii::t('backend', 'Inmuebles Urbanos periodo iguales a cero'));\r\n\t\t\t// }\r\n\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t$registers = self::findPagoDetalleVarioImpuestoModel([2]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Inmuebles Urbanos por varios'));\r\n\t\t\t}\r\n\r\n\t\t}", "public function hasFreyja(){\n return $this->_has(22);\n }", "function controler_forum_abo($retour)\n{\n\tglobal $visiteur_session;\n\tif ($visiteur_session) {\n\t\t$statut = $visiteur_session['statut'];\n\t\tif (!$statut OR $statut == '5poubelle') {\n\t\t\task_php_auth(_T('forum_acces_refuse'),\n\t\t\t\t _T('forum_cliquer_retour',\n\t\t\t\t\t\tarray('retour_forum' => $retour)));\n\t\t}\n\t} else {\n\t\task_php_auth(_T('forum_non_inscrit'),\n\t\t\t _T('forum_cliquer_retour',\n\t\t\t\t\tarray('retour_forum' => $retour)));\n\t\t}\n}", "public function no_faktur(){\n $tahun_sekarang = date('Y');\n $bulan_sekarang = date('m');\n $tahun_terakhir = substr($tahun_sekarang, 2);\n \n //mengecek jumlah karakter dari bulan sekarang\n $cek_jumlah_bulan = strlen($bulan_sekarang);\n\n //jika jumlah karakter dari bulannya sama dengan 1 maka di tambah 0 di depannya\n if ($cek_jumlah_bulan == 1) {\n $data_bulan_terakhir = \"0\".$bulan_sekarang;\n }\n else{\n $data_bulan_terakhir = $bulan_sekarang;\n }\n \n //ambil bulan dan no_faktur dari tanggal penjualan terakhir\n $penjualan = Penjualan::select([DB::raw('MONTH(created_at) bulan'), 'no_faktur'])->orderBy('id','DESC')->first();\n\n if ($penjualan != NULL) {\n $ambil_nomor = substr($penjualan->no_faktur, 0, -8);\n $bulan_akhir = $penjualan->bulan;\n }\n else{\n $ambil_nomor = 1;\n $bulan_akhir = 13;\n }\n \n /*jika bulan terakhir dari penjualan tidak sama dengan bulan sekarang, \n maka nomor nya kembali mulai dari 1, jika tidak maka nomor terakhir ditambah dengan 1\n */\n if ($bulan_akhir != $bulan_sekarang) {\n $no_faktur = \"1/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n else {\n $nomor = 1 + $ambil_nomor ;\n $no_faktur = $nomor.\"/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n\n return $no_faktur;\n //PROSES MEMBUAT NO. FAKTUR ITEM MASUK\n }", "function BajajFinservPL($strnet_salary, $company, $category, $DOB, $clubbed_emi, $reqtenure, $reqloanamount) {\n list($calterm, $calprint_term) = Calculate_Tenure($DOB, \"5\", \"62\");\n\t\t//for reqd tenure////////////////////////////////////////////////////////////////////////\n\t\tif($reqtenure>0)\n\t\t{\n\t\t\tif($reqtenure>$calprint_term)\n\t\t\t{\n\t\t\t\t$term = $calterm;\n\t\t\t\t$print_term = $calprint_term;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$term = $reqtenure*12;\n\t\t\t\t$print_term = $reqtenure;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$term = $calterm;\n\t\t\t$print_term = $calprint_term;\n\t\t}\n\t\t//for reqd tenure end////////////////////////////////////////////////////////////////////////\n $bflloansmt = round($strnet_salary * 10);\n\t\t////////////////////////////////////////////////////////\n\t\t\tif($reqloanamount>0)\n\t\t\t{\n\t\t\t\tif($reqloanamount>$bflloansmt)\n\t\t\t\t{\n\t\t\t\t\t$bflloansmt=$bflloansmt;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bflloansmt=$reqloanamount;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$bflloansmt=$bflloansmt;\n\t\t\t}\n\t\t\t///////////////////////////////////////////////////////\n $intr1 = 14.50;\n $intr2 = 15.50;\n $bflintr1 = $intr1;\n $bflintr2 = $intr2;\n $bflintrte = \"$intr1% - $intr2%\";\n $getemi1 = round($bflloansmt * ($bflintr1/1200) / (1 - (pow(1/(1 + ($bflintr1/1200)), $term))));//getController()->Common()->getEMI($bflloansmt, $bflintr1, $term);\n $getemi2 = round($bflloansmt * ($bflintr2/1200) / (1 - (pow(1/(1 + ($bflintr2/1200)), $term))));//getController()->Common()->getEMI($bflloansmt, $bflintr2, $term);\n $getemi = \"Rs. \" . $getemi1 . \" - Rs. \" . $getemi2;\n $getterm = $print_term;\n $proc_fee = \"Upto 2%\";\n\t\t$emiperlac = round(100000 * ($bflintrte/1200) / (1 - (pow(1/(1 + ($bflintrte/1200)), $term))));\n\n $details['bank_code'] = \"Bajaj Finserv\";\n $details['interest_rate'] = interestRateFormat($bflintrte);\n $details['emi'] = $getemi;\n $details['emiperlac'] = $emiperlac;\n $details['tenure'] = $getterm;\n $details['loan_amount'] = round($bflloansmt);\n $details['processing_fee'] = $proc_fee;\n $details['category'] = $category;\n return($details);\n }", "public function verAction()\n {\n $view = new ViewModel();\n \n $this->layout()->clase = 'buscar';\n $filtered = $this->params()->fromQuery('q');\n $paginas = $this->params()->fromQuery('page');\n $valor = explode(\" \", $filtered);\n //var_dump($valor);exit;\n if($valor[0]=='restaurante:')\n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3].' '.$valor[4]; \n $texto = $valor[0].'\"'.$buscar.'\"';\n $distrito = '';\n $ruta = $this->_options->data->busqueda .'/busqueda_movil.txt';\n $fp = fopen($ruta,\"a\");\n fwrite($fp, \"$buscar , $distrito\" . PHP_EOL);\n fclose($fp); } \n elseif($valor[0]=='tag:') \n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3];\n $texto = $valor[0].'\"'.$buscar.'\"';}\n elseif($valor[0]=='name:')\n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3].' '.$valor[4];\n $texto = $valor[0].'\"'.$buscar.'\"'; }\n else{ $filtered = strtoupper($filtered);\n $filter = new \\Zend\\I18n\\Filter\\Alnum(true);\n $text = trim($filter->filter($filtered));\n $text = preg_replace('/\\s\\s+/', ' ', $text);\n $busqueda = explode(\" EN \", $text);\n if($this->getRestauranteTable()->ubigeototal2($busqueda[1])>0){\n $distrito=$busqueda[1]; \n }\n\n \n $texto = $busqueda[0];\n $ruta = $this->_options->data->busqueda .'/busqueda_movil.txt';\n $fp = fopen($ruta,\"a\");\n fwrite($fp, \"$texto , $distrito\" . PHP_EOL);\n fclose($fp);\n }\n if($distrito=='LIMA' or $distrito=='lima')\n {$limite = 10;\n if($paginas=='')\n {$start = 0;}\n else{$start=($paginas-1)*10;}\n $resultados = false;\n $buscarsolar= '(('.$texto.') AND en_destaque:si)^100 OR ('.$texto.')';\n $palabraBuscar = isset($buscarsolar) ? $buscarsolar : false;\n $fd = array(\n 'fq' => 'en_estado:activo AND restaurant_estado:activo AND departamento:' .$distrito,\n );\n if ($palabraBuscar == '') {\n $this->redirect()->toUrl('/');\n }\n \n \n if ($palabraBuscar) {\n $solar = \\Classes\\Solr::getInstance()->getSolr();\n if (get_magic_quotes_gpc() == 1) {\n $palabraBuscar = stripslashes($palabraBuscar);\n }\n try {\n $resultados = $solar->search($palabraBuscar,$start, $limite, $fd);\n } catch (Exception $e) {\n $this->redirect()->toUrl('/');\n }\n }\n\n }\n else\n {\n $limite = 10;\n if($paginas=='')\n {$start = 0;}\n else{$start=($paginas-1)*10;}\n $resultados = false;\n $buscarsolar= '(('.$texto.') AND en_destaque:si)^100 OR ('.$texto.')';\n $palabraBuscar = isset($buscarsolar) ? $buscarsolar : false;\n $distrito = ($distrito) ? ' AND distrito:' . $distrito : '';\n $fd = array(\n 'fq' => 'en_estado:activo AND restaurant_estado:activo' . $distrito\n );\n if ($palabraBuscar == '') {\n $this->redirect()->toUrl('/');\n }\n \n \n if ($palabraBuscar) {\n $solar = \\Classes\\Solr::getInstance()->getSolr();\n if (get_magic_quotes_gpc() == 1) {\n $palabraBuscar = stripslashes($palabraBuscar);\n }\n try {\n $resultados = $solar->search($palabraBuscar,$start, $limite, $fd);\n } catch (Exception $e) {\n $this->redirect()->toUrl('/');\n }\n }\n\n \n } \n \n \n \n $form = new Formularios();\n \n if($valor[0]=='restaurante:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n elseif($valor[0]=='tag:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n elseif($valor[0]=='name:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n else {setcookie('q', $text);\n $form->get('q')->setValue($text);\n $valores = $texto;\n }\n $form->get('submit')->setValue('Buscar');\n $paginator = new \\Zend\\Paginator\\Paginator(new \\Zend\\Paginator\\Adapter\\ArrayAdapter($resultados->response->docs));\n $paginator->setCurrentPageNumber((int) $this->params()\n ->fromQuery('page', 1));\n $paginator->setItemCountPerPage($limite);\n \n if($_GET['callback'])\n {\n $view = new ViewModel();\n header('Content-type: application/x-javascript');\n header(\"Status: 200\");\n echo \"jsonpCallback(\".$resultados->getRawResponse().\")\";\n\n exit();\n $view->setTerminal(true);\n return $view;\n }\n \n if ($resultados)\n {\n $total = (int) $resultados->response->numFound;\n $end = count($resultados->response->docs)+$start;\n $inicio = $start+1; \n } \n if ($total <= 10) {\n //$mostrar = 'Mostrando ' . $inicio . ' - ' . $end . ' de ' . $total . ' resultados';\n $mostrar = $total . ' resultados';\n } else {\n // $mostrar = 'Mostrando ' . $inicio . ' - ' . $end . ' de ' . $total . ' resultados';\n $mostrar = $total . ' resultados';\n }\n $listatot = $this->getConfigTable()->cantComentxPlato();\n $listatot = $listatot->toArray();\n \n foreach ($listatot as $key => $value) {\n if ($key < 3) {\n $listades[] = $listatot[$key];\n } else {\n $listadeseg[] = $listatot[$key];\n }\n }\n $view->setVariables(array(\n 'total' => $total,\n 'lista' => $listades,\n 'destacados' => $results,\n 'general' => $paginator,\n 'form' => $form,\n 'nombre' => $text,\n 'masplatosdestacados'=>$consultafinal,\n 'plato' => $valores,\n 'mostrar' => $mostrar,\n 'plat'=>$filtered\n \n ));\n return $view;\n }" ]
[ "0.67214084", "0.64541084", "0.6371226", "0.62604755", "0.62402827", "0.6175199", "0.6042527", "0.5958838", "0.59103376", "0.5881947", "0.5876115", "0.58665204", "0.5863414", "0.58529574", "0.58024865", "0.57831776", "0.5774092", "0.5749593", "0.5729317", "0.5716869", "0.5716382", "0.5687552", "0.5649749", "0.5610213", "0.5606236", "0.56041616", "0.5602909", "0.55910575", "0.55904055", "0.5590361", "0.5586414", "0.55653894", "0.5552837", "0.55504733", "0.55492526", "0.55334175", "0.55099326", "0.5506947", "0.5504931", "0.54997796", "0.54996574", "0.54934967", "0.5491506", "0.5490829", "0.5486574", "0.54840684", "0.5483567", "0.5466549", "0.54634345", "0.5462495", "0.5461423", "0.54536206", "0.54448646", "0.5436887", "0.5413719", "0.53979075", "0.5393241", "0.5391083", "0.5389117", "0.5383317", "0.53778356", "0.53660524", "0.5362251", "0.53554434", "0.53495103", "0.5345223", "0.53444785", "0.5338637", "0.5338167", "0.5336743", "0.53355193", "0.5334386", "0.5331644", "0.5327144", "0.5322213", "0.5322213", "0.53161806", "0.530922", "0.5308341", "0.53079027", "0.5304128", "0.5301213", "0.53000325", "0.5296176", "0.52948976", "0.5294264", "0.5288546", "0.5285583", "0.5271871", "0.52694476", "0.5268316", "0.5266512", "0.52648973", "0.5264015", "0.5263992", "0.5258688", "0.525495", "0.52543", "0.5248687", "0.5248477" ]
0.5315017
77
Run the database seeds.
public function run() { \App\Product::create([ 'name' => "Ireland's Eye Tour - Adult", 'img' => 'images/defalut1', 'price' => 15, 'description' => 'Irelands Eye Adult Fare' ]); \App\Product::create([ 'name' => "Ireland's Eye Tour - Child", 'img' => 'images/defalut1', 'price' => 10, 'description' => 'Irelands Eye Child Fare' ]); \App\Product::create([ 'name' => "Ireland's Eye Tour - Family(1)", 'img' => 'images/defalut1', 'price' => 40, 'description' => 'Irelands Eye Family (2 Adults, 2 Children)' ]); \App\Product::create([ 'name' => "Ireland's Eye Tour - Family(2)", 'img' => 'images/defalut1', 'price' => 50, 'description' => 'Irelands Eye Family (2 Adults, 3 Children)' ]); \App\Product::create([ 'name' => 'Howth Cliffs Cruise', 'img' => 'images/defalut2', 'price' => 25, 'description' => 'Single Fare Cliffs Cruise' ]); \App\Product::create([ 'name' => 'Fishing Trip Half Day', 'img' => 'images/defalut3', 'price' => 300, 'description' => 'Fishing Tip - Half Day' ]); \App\Product::create([ 'name' => 'Fishing Trip Full Day', 'img' => 'images/defalut3', 'price' => 500, 'description' => 'Fishing Tip - Full Day' ]); // factory(App\Product::class, 10)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Create a new component instance.
public function __construct(Banner $banner) { $this->banner = $banner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createComponent($name) {\n\t\trequire_once(\"component/\".$name.\"/\".$name.\".inc\");\n\t\t$c = new $name($name);\n\t\t$this->components[$name] = &$c;\n\t\t$this->{$name} = &$c;\n\t}", "function componentBuilder() { $this->__construct(); }", "public function make()\n {\n if (self::$newComponentCache === null) {\n self::$newComponentCache = new \\IvoPetkov\\BearFramework\\Addons\\HTMLServerComponents\\Internal\\Component();\n }\n return clone (self::$newComponentCache);\n }", "public function createComponent() {\n $component = Component::createComponent();\n return \\Response::json($component);\n }", "public function actionCreate()\n {\n $model = new Component;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Component'])) {\n $model->attributes = $_POST['Component'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->partnumberid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "private static function newComponent($component){\r\n\t\t\r\n\t $return = new script_component(self::$xml_file);\r\n $return->setFilename($component->jsfile);\r\n $return->setTitle($component->title);\r\n\t\t\t\t$return->setIntjs($component->intjs);\r\n $return->setDashboard($component['dashboard']);\r\n $return->setId($component['id']);\r\n $return->setIntmarkup($component->intmarkup);\r\n $return->setName($component->name);\r\n \r\n $ary = array();\r\n \r\n if (count($return->dependenicies) > 0) {\r\n foreach ($return->dependenicies->dependent as $dependent) {\r\n array_push($ary, array('filename'=>$dependent->filename, 'name'=>$dependent->name));\r\n }\r\n $return->dependicies($ary);\r\n }\r\n\t\treturn $return;\r\n\t\t\r\n\t}", "public function makeComponent($class);", "public function getComponent() {\r\n\t\t$parameters = func_get_args();\r\n\t\tif (count($paramters) < 1) {\r\n\t\t\tthrow new tx_auxo_exception('component parameter is missing');\r\n\t\t}\r\n\t\t\r\n\t\t$path = sprintf('%s/class.tx_%s.php', $this->interfaceLibraryPath, $this->interfaceExtension, $parameters[0]);\r\n\t\tif (!is_readable($path)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation component %s not supported', $parameters[0]));\r\n\t\t}\r\n\t\t\r\n\t\t$className = 'tx_' . $this->interfaceExtension . '_' . $parameters[0];\r\n\t\tunset($parameters[0]);\r\n\t\t\r\n\t\trequire_once($path);\r\n\t\t\r\n\t\tif (!class_exists($className)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation class %s is missing', $className));\r\n\t\t}\r\n\t\t\r\n\t\t$object = new $className();\r\n\t\t\r\n\t\tif (method_exists($object, '__construct')) {\r\n\t\t\treturn call_user_func_array($object, '__construct', $parameters);\r\n\t\t}\r\n\t\t\r\n\t\treturn $object;\r\n\t}", "public function create()\n {\n return view('backend.components.create');\n }", "static public function createComponent($name, array $children = array()) {\n\n $name = strtoupper($name);\n $class = 'Sabre\\\\VObject\\\\Component';\n\n if (isset(self::$componentMap[$name])) {\n $class.='\\\\' . self::$componentMap[$name];\n }\n return new $class($name, $children);\n\n }", "final public static function getInstance($component_type_id, $data = array()) {\n $class_name = 'Component' . self::$valid_component_types[$component_type_id];\n return new $class_name($data);\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function create() {\n\t \n }", "protected function getDummyComponent()\n\t{\n\t\treturn new DummyComponent;\n\t}", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function Create()\n {\n parent::Create();\n\n // 1. Verfügbarer HarmonySplitter wird verbunden oder neu erzeugt, wenn nicht vorhanden.\n $this->ConnectParent(\"{03B162DB-7A3A-41AE-A676-2444F16EBEDF}\");\n\t\t\n\t\t$this->RegisterPropertyString(\"Name\", \"\");\n\t\t$this->RegisterPropertyInteger(\"DeviceID\", 0);\n\t\t$this->RegisterPropertyBoolean(\"BluetoothDevice\", false);\t\t\n }", "public function create(){}", "public function createComponent($name) {\n if (preg_match('([a-zA-Z0-9]+Form)', $name)) {\n \n // detect forms \n $classname = \"FrontModule\\\\Components\\\\Forms\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $form = new $classname($this, $name);\n //$form->setTranslator($this->context->translator);\n return $form;\n }\n } else if (preg_match('([a-zA-Z0-9]+DataGrid)', $name)) {\n // detect datagrids\n $classname = \"FrontModule\\\\Components\\\\DataGrids\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $datagrid = new $classname($this, $name);\n //$datagrid->setTranslator($this->context->translator);\n return $datagrid;\n }\n } else if (preg_match('([a-zA-Z0-9]+ConfirmDialog)', $name)) {\n // detect confrim dialogs\n $classname = \"FrontModule\\\\Components\\\\Dialogs\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $dialog = new $classname($this, $name);\n //$dialog->setTranslator($this->context->translator);\n return $dialog;\n }\n } else {\n return parent::createComponent($name);\n }\n }", "protected function createComponent($name)\n {\n $plugins = $this->context->plugins->getPlugins();\n if (in_array($name, $plugins)) {\n return new $name();\n }\n\n return parent::createComponent($name);\n }", "public function create() {\r\n }", "function create_component($type, $application = null)\r\n {\r\n if ($application == null)\r\n {\r\n $application = $this;\r\n }\r\n\r\n $manager_class = get_class($application);\r\n $application_component_path = $application->get_application_component_path();\r\n\r\n $file = $application_component_path . Utilities :: camelcase_to_underscores($type) . '.class.php';\r\n\r\n if (! file_exists($file) || ! is_file($file))\r\n {\r\n $message = array();\r\n $message[] = Translation :: get('ComponentFailedToLoad') . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('File') . ':</b><br />';\r\n $message[] = $file . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('Stacktrace') . ':</b>';\r\n $message[] = '<ul>';\r\n $message[] = '<li>' . Translation :: get($manager_class) . '</li>';\r\n $message[] = '<li>' . Translation :: get($type) . '</li>';\r\n $message[] = '</ul>';\r\n\r\n $application_name = Application :: application_to_class($this->get_application_name());\r\n\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb('#', Translation :: get('TypeName', null, self :: determine_namespace($this->get_application_name()))));\r\n\r\n Display :: header($trail);\r\n Display :: error_message(implode(\"\\n\", $message));\r\n Display :: footer();\r\n exit();\r\n }\r\n\r\n $class = $manager_class . $type . 'Component';\r\n require_once $file;\r\n\r\n if (is_subclass_of($application, 'common\\libraries\\SubManager'))\r\n {\r\n $component = new $class($application->get_parent());\r\n }\r\n else\r\n {\r\n $component = new $class($this->get_user());\r\n $component->set_parameters($this->get_parameters());\r\n }\r\n return $component;\r\n }", "public function create() {}", "public function createComponent()\n {\n return $this->createEmotionComponent(array(\n 'name' => 'Bilder',\n 'xtype' => 'emotion-media-widget',\n 'template' => 'image_widget',\n 'cls' => 'emotion-image-widget',\n 'description' => 'Einfaches Einkaufswelten-Element für Bilder' \n ));\n }", "public function create()\n {}", "function _componentInitialize($instance) {\n $this->CI->ciwy->component_config[$instance]['containerId'] = $instance.'Container'; // Set the container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['outerContainer'] = $instance.'OuterContainer'; // Set the outer container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['inputAttributes'] = array(\n 'name' => $instance.'_input',\n 'id' => $instance.'_input',\n 'value' => '',\n 'maxlength' => '',\n 'size' => '',\n 'style' => '',\n );\n $this->CI->ciwy->component_config[$instance]['Config'] = array();\n log_message('debug', '[' . $this->CI->ciwy->library_name . '] New ' . $this->component_name . ' instance is ' . $instance . '.');\n return $instance;\n }", "public function create() {\n \n }", "public function create() {\n \n }", "public function create()\n {\n //TODO\n }", "public static abstract function createInstance();", "public function newInstance();", "public function newInstance();", "public function create(){\r\n\treturn new $this->class();\r\n }", "public function create()\n\t {\n\t //\n\t }", "public function create() {\n\n\t\t\n\t}", "public static function createByComponents($components) {}", "public function create() {\n\n\t}", "public function create() {\n }", "public function create() {\n }", "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "public function create() {\n\t\t\t//\n\t\t}", "function component_create( $args, $assoc_args ) {\n\t\n\t/**\n\t * Exit if we can't edit the filesystem\n\t */\n\tif ( ! WP_Filesystem() ) {\n\t\tWP_CLI::error( 'Unable to access filesystem' );\n\t\texit;\n\t}\n\t\n\t/**\n\t * Request component details\n\t */\n\t$far = array(); // array os strings to find and replace\n\t$exclude = array(); // files to exclude from scaffold\n\n\t$title = Util\\build_far( $far, array(\n\t\t'question' => 'Title [guess]:',\n\t\t'guess' => 'My Component',\n\t\t'find' => 'template-title',\n\t\t'default' => $assoc_args[ 'component_title' ] ?? '',\n\t) );\n\t$slug = Util\\build_far( $far, array(\n\t\t'question' => 'Slug [guess]:',\n\t\t'guess' => sanitize_title( $title ),\n\t\t'find' => 'template-slug',\n\t\t'default' => $assoc_args[ 'component_slug' ] ?? '',\n\t) );\n\t$dir = Util\\build_far( $far, array(\n\t\t'question' => 'Directory [guess]:',\n\t\t'guess' => $slug,\n\t\t'find' => '_template-component',\n\t\t'default' => $assoc_args[ 'component_dir' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has front-end JavaScript? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-script.js',\n\t\t'default' => $assoc_args[ 'has_js' ] ?? '',\n\t) );\n\t$has_template_part = Util\\exclude( $exclude, array(\n\t\t'question' => 'Has PHP template part? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-markup.php',\n\t\t'default' => $assoc_args[ 'has_template_part' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has admin CSS? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-editor.css',\n\t\t'default' => $assoc_args[ 'has_admin_css' ] ?? '',\n\t) );\n\n\t/**\n\t * Identify paths/dirs (note all paths end with a trailing /)\n\t */\n\t$template_path = get_template_directory();\n\t$library_path = $template_path . '/assets/component-library/';\n\t$cli_path = $template_path . '/includes/cli/templates/';\n\t$template_dir = 'component';\n\t$component_path = $library_path . $dir . '/';\n\t\n\t/**\n\t * Create plugin directory\n\t */\n\tglobal $wp_filesystem;\n\t$wp_filesystem->mkdir( $component_path );\n\n\t// duplicate template's files (minus any we should exclude)\n\tcopy_dir( $cli_path . $template_dir, $component_path, $exclude );\n\n\t/**\n\t * Find and replace strings\n\t */\n\tUtil\\far( $component_path, $far );\n\n\t// loop through the component's directory and replace file prefixes\n\tUtil\\prefix( $component_path, 'template-slug', $slug );\n\n\t// report\n\tWP_CLI::success( 'Component created' );\n\tWP_CLI::line( WP_CLI::colorize( \"\\n%6%k What's next? %n\\n\" ) );\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Restart Parcel and refresh your browser to watch these new files\") );\n\tif ( $has_template_part ) {\n\t\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Include your template part somewhere:%n get_template_part( 'assets/component-library/$dir/$slug-markup' );\") );\n\t}\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Edit your new $title component:%n $component_path\") );\n\tWP_CLI::line( \"\\n\" );\n\n}", "public function create()\r\n {\r\n }", "public function create()\r\n {\r\n }", "public function new()\n\t{\n\t\t//\n\t}", "public function new()\n\t{\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function newInstance(): object;", "protected function create() {\n\t}", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function getComponent()\n {\n }", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function create() {\n //not implemented\n }", "protected function createVueComponent()\n {\n $this->fileGenerateHelper('vue','vue');\n }", "public function create()\n {\n }", "public function create()\n {\n }", "public function create()\r\n {\r\n \r\n }", "public function createComponents() //:void\n {\n $viewFiles = glob($this->viewPath . '*.blade.php');\n\n if (is_array($viewFiles) && !empty($viewFiles)) {\n foreach ($viewFiles as $view) {\n $this->components[$this->getKey($view)] = (object) [\n 'key' => $this->getKey($view),\n 'html' => $this->renderView(\n $view,\n ['lang' => (object) $this->lang]\n )\n ];\n }\n }\n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }" ]
[ "0.7047387", "0.6538835", "0.6472938", "0.64619654", "0.644458", "0.63163316", "0.62928647", "0.62711805", "0.61932147", "0.6130113", "0.60918456", "0.6054137", "0.6054137", "0.6054137", "0.60504675", "0.60455096", "0.6040762", "0.60270166", "0.5991097", "0.59777457", "0.5976308", "0.5939156", "0.5932236", "0.5916881", "0.5912711", "0.5910622", "0.5908905", "0.5900248", "0.5900248", "0.5892039", "0.58885735", "0.5887596", "0.5887596", "0.58868486", "0.5885053", "0.58848464", "0.5882079", "0.5865395", "0.58355606", "0.58355606", "0.5819837", "0.5818686", "0.5807862", "0.58047545", "0.58047545", "0.57952446", "0.57952446", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5791436", "0.5777156", "0.5777156", "0.5777156", "0.5761214", "0.57553095", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57530475", "0.57501364", "0.5727987", "0.5727987", "0.5725634", "0.57256204", "0.57116", "0.5706432", "0.57059693", "0.56980336", "0.56980336", "0.56977797", "0.5695169", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336", "0.56910336" ]
0.0
-1
Get the view / contents that represent the component.
public function render() { $banners = $this->banner->query()->where('banner_type_id', 1)->get(); return view('components.slideshow', [ 'banners' => $banners ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getViewComponent();", "public function getView() {\n\t\treturn $this -> st_view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView()\r\n {\r\n return $this->_controller->getView();\r\n }", "public function getView() {\n return $this->setView();\n }", "protected function getView()\n {\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn $this->view;\n\t}", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\r\n {\r\n return $this->view;\r\n }", "public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}", "public function getView() {\r\n return $this->_view;\r\n }", "public function getView()\n {\n return $this->getService('view');\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n\t{\n\t\treturn $this->_view;\n\t}", "public function getView(){\n\t\treturn $this->view;\n\t}", "protected function getView()\n {\n $this->getBootstrap()->bootstrap('view');\n return $this->getBootstrap()->getResource('view');\n }", "function getView() {\r\n return $this->view;\r\n }", "function getView() {\n\t\treturn $this->View;\n\t}", "public function getView() {\n \t\n \t// Return the current view\n \treturn $this->sView;\n }", "public function getView()\n\t{\n\t\tif( !isset( $this->view ) ) {\n\t\t\tthrow new \\Aimeos\\Client\\Html\\Exception( sprintf( 'No view available' ) );\n\t\t}\n\n\t\treturn $this->view;\n\t}", "private function getView()\n {\n if ($this->view) {\n return $this->view;\n }\n\n $this->view = $this->services->get(View::class);\n return $this->view;\n }", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "public function getView()\r\n {\r\n return parent::getView();\r\n }", "public function getContent()\r\n {\r\n return $this->template;\r\n }", "public function getView() {}", "public function getView() {}", "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = Yii::$app->getView();\n }\n\n return $this->_view;\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public function view()\n {\n return $this->view;\n }", "public function view()\n {\n return $this->view;\n }", "public function getView()\n {\n if (method_exists($this->module, 'getView')) {\n return $this->module->getView();\n }\n\n return parent::getView();\n }", "public function getContent(){\n return $this->getPage();\n }", "public function getView();", "public function render(): mixed\n {\n return $this->view;\n }", "public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }", "public function content(){\n\t\treturn mvc_service_Front::getInstance()->getCurrentActionHtml();\n\t}", "public function getContent()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('content');\n }", "public function Content()\n {\n return new View('dashboard1/Card1.tpl', [\n 'browsers' => $this->model->getBrowserVisits()\n ]);\n }", "public function getView(){ }", "public function viewTest()\n\t{\n\t\treturn $this->viewComponent;\n\t}", "public function get_data() {\n return $this->_view;\n }", "public function getView()\n {\n }", "protected function view()\n {\n return $this->app['view'];\n }", "protected function getRenderedContent()\n {\n try\n {\n return $this->getServiceLocator()\n ->get( 'RenderedContent' );\n }\n catch ( ServiceNotFoundException $ex )\n {\n return null;\n }\n }", "public function getContent() {\r\n\t\treturn PzkParser::parseLayout($this->layout, $this, true);\r\n\t}", "public function getView(): ViewInterface\n {\n return $this->view;\n }", "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "protected function getView(){\n if(!$this->_view){\n $this->_view=new JView();\n }\n return $this->_view;\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function _getView ()\n {\n if (null === $this->_view) {\n $this->_view = Zend_Layout::startMvc()->getView();\n }\n return $this->_view;\n }", "public function render()\n {\n return $this->content;\n }", "public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}", "public function getView()\n {\n return $this->cntView;\n }", "public function get()\n {\n return $this->contents;\n }", "public function render()\n {\n return view('components.testimony-component');\n }", "public function getComponent()\n\t{\n\t\treturn $this->component;\n\t}", "public function render()\n {\n return view('dwbtui::components.html');\n }", "public function component()\n {\n return $this->component;\n }", "public function getContent() {\n\t\treturn $this->current_content;\n\t}", "protected static function getView()\n {\n return null;\n }", "private function view()\n {\n if (isset(static::$view)) {\n return static::$view;\n }\n\n $classNamespace = $this->getModuleName();\n $className = $this->getComponentName();\n\n return \"{$classNamespace}::blocks.{$className}\";\n }", "final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}", "public function getContent () {\r\n\t\treturn $this->content;\r\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "protected function getContent() {\n return $this->content;\n }", "public function getContent()\r\n {\r\n return $this->content;\r\n }", "protected function renderContent()\n\t{\n\n\t\treturn $this->view->render($this->formView, [\n\t\t\t'model'=>$this->model,\n\t\t\t'mode'=>$this->mode,\n\t\t]);\n\t}", "public function getContent() {\r\n\t\treturn $this->content;\r\n\t}", "public function getContent() {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }" ]
[ "0.7673564", "0.7260388", "0.7230339", "0.7230339", "0.72272044", "0.7194038", "0.7191513", "0.718442", "0.71783614", "0.71783614", "0.71783614", "0.71783614", "0.71783614", "0.71783614", "0.71783614", "0.71783614", "0.7155549", "0.71496713", "0.71488863", "0.7143502", "0.71390265", "0.71390265", "0.71390265", "0.71351004", "0.7114384", "0.70917225", "0.70593286", "0.70385724", "0.6951562", "0.69205964", "0.68951946", "0.6885056", "0.68462414", "0.68273497", "0.67830503", "0.67830503", "0.6773812", "0.6759224", "0.6756054", "0.6714729", "0.6714729", "0.66921514", "0.6672867", "0.6656399", "0.6589093", "0.65836275", "0.654649", "0.6531781", "0.65306836", "0.65282243", "0.6517028", "0.65047306", "0.64890283", "0.64801574", "0.64773846", "0.64750326", "0.64733946", "0.647301", "0.64676183", "0.64558625", "0.64558625", "0.64457285", "0.64457285", "0.64457285", "0.6438386", "0.6423922", "0.6422339", "0.64004683", "0.6389939", "0.6368359", "0.63472223", "0.6330217", "0.6328122", "0.63213843", "0.6311426", "0.6306094", "0.62935317", "0.6293322", "0.62927306", "0.62843776", "0.6283386", "0.6283386", "0.6283386", "0.62789553", "0.6275284", "0.62677145", "0.62673336", "0.62656814", "0.62508994", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406", "0.6250406" ]
0.0
-1
Writing data to inaccessible properties is not allowed.
public function __set($name, $value) { throw new \Foundation\Exception\BadMethodCallException('Writing data to inaccessible properties is not allowed.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowProperties() {}", "public function __set($name, $value)\n {\n throw new \\BadMethodCallException( 'Writing data to inaccessible properties is not allowed.' );\n }", "public function __set($name, $value)\n {\n throw new \\BadMethodCallException( 'Writing data to inaccessible properties is not allowed.' );\n }", "public static function set_inaccessible() {\n\t\tset_transient( self::transient_name(), self::INACCESSBILE, HOUR_IN_SECONDS );\n\t}", "protected function _getReadonlyProperties()\n {\n return array();\n }", "public function allowAllProperties() {}", "public function writeable();", "public function allowAllPropertiesExcept() {}", "public function __get($name)\n {\n throw new \\Foundation\\Exception\\BadMethodCallException('Reading data from inaccessible properties is not allowed.');\n }", "public function __get($name)\n {\n throw new \\Foundation\\Exception\\BadMethodCallException('Reading data from inaccessible properties is not allowed.');\n }", "public function __get($name)\n {\n throw new \\Foundation\\Exception\\BadMethodCallException('Reading data from inaccessible properties is not allowed.');\n }", "private function _validateModifiable()\n {\n if(!($this->_getDataSource() instanceof wCrudAdapter))\n {\n throw new Exception('Object is read-only.');\n }\n }", "public function shouldSkipUnknownProperties() {}", "public function enforceOnWrite() { return true; }", "function shouldSkipUnknownProperties() ;", "private function storePrivateAnnotatedProperties()\n {\n $inheritance_tree = $this->getFullInheritanceTree();\n\n foreach ($inheritance_tree as $class_name) {\n $reflection_class = new ReflectionClass($class_name);\n\n $this->storeAnnotatedProperties($reflection_class, $inheritance_tree, ReflectionProperty::IS_PRIVATE);\n }\n }", "abstract protected function properties();", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly() {}", "function testInvalidPropertySet() {\n\t\t$o = new \\Scrivo\\UserRole(self::$context);\n\t\t$o->sabicasElRey = \"el mejor\";\n\t}", "public function getExposedProperties(): array;", "public function isReadonly()\n {\n return false;\n }", "public function isReadOnly()\n {\n }", "public function isReadOnly() {\n\t\treturn false;\n\t}", "public function onBeforeWrite()\n {\n foreach (self::$defaults as $field => $value) {\n if (empty($this->$field)) {\n $this->$field = $value;\n }\n }\n //TODO: prevent non-heirarichal entries, eg country = '*', then state = 'blah'\n parent::onBeforeWrite();\n }", "function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}", "public function setReadOnly()\n {\n $this->_allowModifications = false;\n foreach ($this->_data as $key => $value) {\n if ($value instanceof Zend_Config) {\n $value->setReadOnly();\n }\n }\n }", "function testInvalidPropertyGet() {\n\t\t$o = new \\Scrivo\\UserRole(self::$context);\n\t\t$data = $o->sabicasElRey;\n\t}", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly();", "public function skipUnknownProperties() {}", "public function __wakeup() {\n //Unserializing instances of the class is forbidden\n _doing_it_wrong(__FUNCTION__, __('Word? That aint allowed son!', 'i4'), '0.0.1');\n }", "public function testSetInvalidProperty() {\n $permission = new GroupPermission();\n $permission->set('invalid property', 'a value');\n }", "public function setPublic()\n {\n $this->private = false;\n }", "public function setPrivate()\r\n {\r\n $this->data['security'] = 'private';\r\n }", "public function __wakeup() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Unserializing is forbidden!', 'be-table-ship' ), '4.0' );\n\t\t}", "public function skipProperties() {}", "public function isWriteable(): bool;", "public function wasReadOnlyError() {\n\t\treturn false;\n\t}", "public function setReadOnly ()\n {\n $this->resetNeedsSaving();\n $this->readOnly = true;\n }", "protected function error() {\n trigger_error(\"All properties of previous datastream versions are read only. Please modify parent datastream object.\", E_USER_WARNING);\n }", "protected function checkUnsetProperties()\r\n {\r\n $ar = get_object_vars($this);\r\n if (self::$DEBUG)\r\n {\r\n //echo \"Object Vars:\" .PHP_EOL;\r\n // var_dump(get_object_vars($this));\r\n }\r\n foreach ($ar as $key => $val) {\r\n if (!isset($ar[$key]))\r\n trigger_error(\"{$key} not set in \" . get_class($this) . \". Try setting the value in __construct method.\");\r\n }\r\n }", "public function is_accessible() {\n return $this->_accessible;\n }", "public function __set($name, $value)\n {\n // Don't allow to set attributes\n }", "protected function renderTrustedPropertiesField() {}", "abstract protected function setRequiredGetters();", "public function testUserCantViewAProperty()\n {\n // Create a user with team and one public property\n $userOne = User::factory()->withPersonalTeam()->create();\n $userOne->assignRole(Role::findByName('user'));\n $userOne->assignRole(Role::findByName('team-admin'));\n $team = $userOne->personalTeam();\n $publicProperty = Property::factory()->create([\n 'team_id' => $team->getKey(),\n 'is_private' => false\n ]);\n\n // Create another user to access the public property\n $userTwo = User::factory()->withPersonalTeam()->create();\n $userTwo->assignRole(Role::findByName('user'));\n\n $response = $this->actingAs($userTwo)->get('/properties/' . $publicProperty->getKey());\n $response->assertStatus(403);\n }", "public function setPrivate()\n {\n $this->private = true;\n }", "public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}", "function hasWriteAccess() {\r\n\t\treturn (\r\n\t\t\t\t$this->annonce->associationID == $this->extendedProfile->userID ||\r\n\t\t\t\t$this->extendedProfile instanceof ProfileNiceBenevolat);\r\n\t}", "public function isWriteOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_WRITE_ONLY);\n }", "public function canNotAccessInternalContentObjectMapByReference() {}", "public function setReadOnly($readOnly = true) {}", "public function setReadOnly($readOnly = true) {}", "protected static function set_accessible() {\n\t\t/*\n\t\t * Prefer to set a 0 timeout, but if the timeout was set before WordPress will not delete the transient\n\t\t * correctly when overridden with a zero value.\n\t\t *\n\t\t * Setting a YEAR_IN_SECONDS instead.\n\t\t */\n\t\tset_transient( self::transient_name(), self::ACCESSIBLE, YEAR_IN_SECONDS );\n\t}", "public static function isAllowedWrite(): bool\n {\n if (!isset(self::$definition)) {\n self::$definition = Splash::object(\"Order\")->description();\n }\n if (is_array(self::$definition) && !empty(self::$definition[\"allow_push_updated\"])) {\n return true;\n }\n\n return false;\n }", "public function usrSetData($data) {\n\t\tparent::usrSetData(!!$data);\n\t}", "public function testIsValidSuccessWithoutHasDataChanges()\n {\n $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(false));\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $validator->setReadOnlyProperties(['attr1']);\n $this->assertTrue($validator->isValid($this->_object));\n }", "public function __wakeup() {\r\n\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'Unserializing instances of this class is forbidden.', 'wc_name_your_price' ), '3.0.0' );\r\n\t}", "public function serialize(PropertyHolder $data);", "public function isPrivateValues(): bool;", "public function populatableProperties() : array;", "public function getReadOnlyFields();", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "function allowserialize($propname)\r\n {\r\n return(true);\r\n }", "protected function isObjectAccessorMode() {}", "public function testParentWithPrivatePropertyMapping(): void\n {\n }", "public function __get($name)\n {\n echo \"Lecture de l'attribut $name inaccessible<br/>\";\n }", "public function setReadOnly($readOnly = true);", "public function setReadOnly($readOnly = true);", "public function testAddToDataNotArrayedHiddenMembers()\n {\n $this->document->addToData($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n null, // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $this->document->setResourceCompleted($resource);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n }\n }\n }\nEOL;\n $this->check($expected);\n }", "function properties()\n {\n }", "public function __wakeup() {\n // Unserializing instances of the class is forbidden\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'ninja-forms' ), '2.8' );\n }", "public function readOnly()\n {\n return !$this->_allowModifications;\n }", "function getReadOnly() { return $this->_readonly; }", "abstract function exportableAttributes();", "abstract public function &setRawAdditionalProperties($value);", "public function __set($key, $value)\n {\n throw new \\Exception(\"The {$key} property is read-only, and can't set any value.\");\n }", "protected function fillProperties()\n {\n foreach ($this as $key => $value) {\n if ($this->isPrivate($key)) {\n continue;\n }\n $this->currentProperties[\"{$key}\"] = $value;\n $this->newProperties[\"{$key}\"] = $value;\n }\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function IsReadOnlyDataType($dataType) {\r\n\t return false;\r\n }", "public function getPropData(): array{\n if(!$this->logged) throw new ClientNotLogged();\n else return $this->proprietary;\n }", "public function isReadOnly(): bool;", "public function __wakeup() {\n\t\t$error = new WP_Error('forbidden', 'Unserializing instances of this class is forbidden.');\n\t\treturn $error->get_error_message();\n }", "public function isReadonly(): bool;", "protected function checkForNecessaryProperties()\n {\n if (!property_exists($this, 'data')) {\n throw new IncompatibleParentClass('Parent class must implement $data property.');\n }\n }", "abstract protected function getDirectGetters();", "public function is_allowed_to_set_content_object_rights();", "public function setReadOnlyFlag($readOnly = true) {}", "public function getReadOnlyFlag() {}", "public function set_writable() {\n $this->readonly = false;\n\n return $this;\n }", "public function shouldSkipUnknownProperties(): bool\n {\n return $this->skipUnknownProperties;\n }", "public static function is_accessible() {\n\t\t$value = get_transient( self::transient_name() );\n\n\t\t// If the value is not set, check the table.\n\t\tif ( false === $value ) {\n\t\t\treturn self::check_table();\n\t\t}\n\n\t\treturn $value === self::ACCESSIBLE;\n\t}", "public function setReadOnly($flag);", "public function setAccessible($bool)\n\t{\n\t\t$this->property->setAccessible($bool);\n\t}", "public function canSetProperty($key) {\r\n if(parent::canSetProperty($key)) return true;\r\n $owner=$this->getOwner();\r\n if($owner->getScenario()==='search') {\r\n return($owner->isAttributeSafe($key));\r\n }\r\n return false;\r\n }" ]
[ "0.72508687", "0.69337857", "0.69337857", "0.67343277", "0.6566614", "0.6495448", "0.636735", "0.6366949", "0.633614", "0.633614", "0.633614", "0.62791896", "0.6121855", "0.6091132", "0.6064741", "0.6030389", "0.59832495", "0.5933866", "0.5933866", "0.5932761", "0.59182084", "0.5902457", "0.58780855", "0.5821291", "0.57986563", "0.57928663", "0.57876277", "0.57772434", "0.5775953", "0.5744612", "0.5744612", "0.5744612", "0.5740009", "0.5735394", "0.57281345", "0.5723048", "0.57188165", "0.5699908", "0.5692544", "0.5681338", "0.5676182", "0.5671142", "0.5606431", "0.55774534", "0.55533993", "0.55505747", "0.5550205", "0.5547538", "0.5545056", "0.55373174", "0.5529463", "0.55186814", "0.5516322", "0.5513719", "0.5496711", "0.5496557", "0.5490171", "0.5487967", "0.54568464", "0.54472286", "0.5434882", "0.54246575", "0.5424611", "0.5416793", "0.5414041", "0.5401089", "0.53965694", "0.5382433", "0.5381061", "0.53738403", "0.536611", "0.53657323", "0.53644073", "0.5355833", "0.5348433", "0.5340732", "0.5334347", "0.5334033", "0.5327776", "0.53239423", "0.53066975", "0.530013", "0.52935386", "0.5284293", "0.5280334", "0.52677506", "0.5263481", "0.526153", "0.5251598", "0.52482086", "0.5234051", "0.522565", "0.5224439", "0.522356", "0.521525", "0.52102983", "0.5208366", "0.5205349" ]
0.68128353
4
Reading data from inaccessible properties is not allowed.
public function __get($name) { throw new \Foundation\Exception\BadMethodCallException('Reading data from inaccessible properties is not allowed.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowProperties() {}", "public function shouldSkipUnknownProperties() {}", "abstract protected function getProperties();", "function shouldSkipUnknownProperties() ;", "abstract protected function get_properties();", "protected function _getReadonlyProperties()\n {\n return array();\n }", "abstract protected function properties();", "public function skipUnknownProperties() {}", "abstract public function getProperties();", "function testInvalidPropertyGet() {\n\t\t$o = new \\Scrivo\\UserRole(self::$context);\n\t\t$data = $o->sabicasElRey;\n\t}", "public function allowAllProperties() {}", "private function readLoaderProperties()\n {\n // Read all properties of the loader.\n foreach ((new \\ReflectionClass($this->loader))->getProperties(\\ReflectionProperty::IS_PRIVATE) as $property) {\n $this->properties[$property->name] = static::getObjectAttribute($this->loader, $property->name);\n }\n }", "public function skipProperties() {}", "public function allowAllPropertiesExcept() {}", "public function getPropData(): array{\n if(!$this->logged) throw new ClientNotLogged();\n else return $this->proprietary;\n }", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function readObject();", "abstract public function getRawAdditionalProperties();", "public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}", "private function _validateModifiable()\n {\n if(!($this->_getDataSource() instanceof wCrudAdapter))\n {\n throw new Exception('Object is read-only.');\n }\n }", "public function _getCleanProperties() {}", "public function listInvalidProperties();", "private function loadReadDataIntoMDR() {\r\n \r\n }", "public function getReadOnlyFields();", "public function getExposedProperties(): array;", "public function read()\n {\n }", "public function shouldSkipUnknownProperties(): bool\n {\n return $this->skipUnknownProperties;\n }", "public function __get($name)\n {\n // if the property is declared (automatically not public), we can take it\n if (property_exists($this, $name)) {\n return $this->$name;\n } else {\n // otherwise we indicate that we must go through the getter or attribute does not exist\n trigger_error(\"You are trying to read an existing protected or private attribute without going through its getter! (__get) or a non-existent attribute\", E_USER_NOTICE);\n }\n }", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly() {}", "protected function maybe_read() {\n\t\tparent::maybe_read() ;\n\n\t\t// Reset transition variable.\n\t\t$this->amount_transition_status = false ;\n\t}", "abstract protected function getDirectGetters();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "protected function checkUnsetProperties()\r\n {\r\n $ar = get_object_vars($this);\r\n if (self::$DEBUG)\r\n {\r\n //echo \"Object Vars:\" .PHP_EOL;\r\n // var_dump(get_object_vars($this));\r\n }\r\n foreach ($ar as $key => $val) {\r\n if (!isset($ar[$key]))\r\n trigger_error(\"{$key} not set in \" . get_class($this) . \". Try setting the value in __construct method.\");\r\n }\r\n }", "public function wasReadOnlyError() {\n\t\treturn false;\n\t}", "public function __get(string $name): mixed {\n if(in_array($name, $this->accessible_properties())) {\n if(method_exists($this, $get = 'get' . ucFirst($name)))\n return $this->$get();\n return $this->$name ?? null;\n }\n throw new Error('Unable to get property ' . $this::class . \"::$name\", Error::ACCESSING);\n }", "public function _getProperties() {}", "public function read() {\r\n }", "function readInputData() {\n\t\t$this->readUserVars(array(\n\t\t\t'representativeId',\n\t\t\t'agentRole',\n\t\t\t'supplierRole',\n\t\t\t'representativeIdType',\n\t\t\t'representativeIdValue',\n\t\t\t'name',\n\t\t\t'phone',\n\t\t\t'fax',\n\t\t\t'email',\n\t\t\t'url',\n\t\t\t'isSupplier',\n\t\t));\n\t}", "public function populatableProperties() : array;", "function _getProperties() ;", "public function __get($key)\n {\n $protected_property = \"_\".$key;\n if(property_exists($this,$protected_property))\n {\n if(isset($this->$protected_property)) return $this->$protected_property;\n else\n {\n throw new ExceptionMember($key,\n \"Экземпляр \".__CLASS__.\"::$key не существует!\");\n }\n }\n else\n {\n throw new Exception(\"Свойство \".__CLASS__.\"::$protected_property не найдено!\");\n }\n }", "protected function getData() { }", "protected static function getData()\n {\n }", "public function getFillableProperties(): array;", "public static function set_inaccessible() {\n\t\tset_transient( self::transient_name(), self::INACCESSBILE, HOUR_IN_SECONDS );\n\t}", "protected function checkForNecessaryProperties()\n {\n if (!property_exists($this, 'data')) {\n throw new IncompatibleParentClass('Parent class must implement $data property.');\n }\n }", "function properties()\n {\n }", "abstract protected function propertyGet($name);", "abstract protected function setRequiredGetters();", "public function read()\n {\n }", "public function __get($name) {\n $allowed = ['instance', 'contextlevel', 'context', 'contextname'];\n if (in_array($name, $allowed)) {\n return $this->{'get_'.$name}();\n } else {\n throw new \\coding_exception($name.' is not a publicly accessible property of '.get_class($this));\n }\n }", "public function testUserCantViewAProperty()\n {\n // Create a user with team and one public property\n $userOne = User::factory()->withPersonalTeam()->create();\n $userOne->assignRole(Role::findByName('user'));\n $userOne->assignRole(Role::findByName('team-admin'));\n $team = $userOne->personalTeam();\n $publicProperty = Property::factory()->create([\n 'team_id' => $team->getKey(),\n 'is_private' => false\n ]);\n\n // Create another user to access the public property\n $userTwo = User::factory()->withPersonalTeam()->create();\n $userTwo->assignRole(Role::findByName('user'));\n\n $response = $this->actingAs($userTwo)->get('/properties/' . $publicProperty->getKey());\n $response->assertStatus(403);\n }", "abstract protected function read ();", "public function isReadOnly() {\n\t\treturn false;\n\t}", "public function listInvalidProperties()\n {\n return [];\n }", "abstract protected function getToStringProperties();", "function read_set()\n\t{\n\t\tglobal $REQUEST;\n\t\tif (!$this->writeable)\n\t\t{\n\t\t\tpage_error('Read only attribute ' . $this->name);\n\t\t}\n\t\t$this->value = $REQUEST->read($this->id, $this->mandatory);\n\t\t\n\t\tUtilLogging::getInstance()->debug(\"read_set - Attribute: \". $this->id . \" - value set: \" . $this->value);\n\t}", "public function __get($name) {\n if (array_key_exists(strtolower($name), $this->_data)) {\n return $this->_data[strtolower($name)];\n }\n\n throw new Exception(\"Unknown property: \" . $name);\n }", "private function storePrivateAnnotatedProperties()\n {\n $inheritance_tree = $this->getFullInheritanceTree();\n\n foreach ($inheritance_tree as $class_name) {\n $reflection_class = new ReflectionClass($class_name);\n\n $this->storeAnnotatedProperties($reflection_class, $inheritance_tree, ReflectionProperty::IS_PRIVATE);\n }\n }", "function readInputData() {\n\t\t$this->readUserVars(array('title', 'description', 'journalPath', 'enabled'));\n\t\t$this->setData('enabled', (int)$this->getData('enabled'));\n\n\t\tif (isset($this->journalId)) {\n\t\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t\t$journal =& $journalDao->getById($this->journalId);\n\t\t\t$this->setData('oldPath', $journal->getPath());\n\t\t}\n\t}", "public function isReadOnly()\n {\n }", "protected function isObjectAccessorMode() {}", "protected function _readFormFields() {}", "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'username', 'password', 'password2',\n\t\t\t\t'firstName', 'middleName', 'lastName', 'initials',\n\t\t\t\t'affiliation', 'email', 'userUrl', 'phone', 'fax',\n\t\t\t\t'mailingAddress', 'biography', 'interests', 'userLocales',\n\t\t\t\t'registerAsReader', 'openAccessNotification', 'registerAsAuthor',\n\t\t\t\t'registerAsReviewer', 'existingUser'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($this->getData('userLocales') == null || !is_array($this->getData('userLocales'))) {\n\t\t\t$this->setData('userLocales', array());\n\t\t}\n\t\t\n\t\tif ($this->getData('username') != null) {\n\t\t\t// Usernames must be lowercase\n\t\t\t$this->setData('username', strtolower($this->getData('username')));\n\t\t}\n\t}", "public function __set($name, $value)\n {\n throw new \\BadMethodCallException( 'Writing data to inaccessible properties is not allowed.' );\n }", "public function __set($name, $value)\n {\n throw new \\BadMethodCallException( 'Writing data to inaccessible properties is not allowed.' );\n }", "protected function read()\n {\n return true;\n }", "private function getReadAccessInfo($class, $property)\n {\n $key = $class.'::'.$property;\n\n if (isset($this->readPropertyCache[$key])) {\n $access = $this->readPropertyCache[$key];\n } else {\n $access = array();\n\n $reflClass = new \\ReflectionClass($class);\n $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property);\n $camelProp = $this->camelize($property);\n $getter = 'get'.$camelProp;\n $getsetter = lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item)\n $isser = 'is'.$camelProp;\n $hasser = 'has'.$camelProp;\n\n if ($reflClass->hasMethod($getter) && $reflClass->getMethod($getter)->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD;\n $access[self::ACCESS_NAME] = $getter;\n } elseif ($reflClass->hasMethod($getsetter) && $reflClass->getMethod($getsetter)->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD;\n $access[self::ACCESS_NAME] = $getsetter;\n } elseif ($reflClass->hasMethod($isser) && $reflClass->getMethod($isser)->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD;\n $access[self::ACCESS_NAME] = $isser;\n } elseif ($reflClass->hasMethod($hasser) && $reflClass->getMethod($hasser)->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD;\n $access[self::ACCESS_NAME] = $hasser;\n } elseif ($reflClass->hasMethod('__get') && $reflClass->getMethod('__get')->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY;\n $access[self::ACCESS_NAME] = $property;\n $access[self::ACCESS_REF] = false;\n } elseif ($access[self::ACCESS_HAS_PROPERTY] && $reflClass->getProperty($property)->isPublic()) {\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY;\n $access[self::ACCESS_NAME] = $property;\n $access[self::ACCESS_REF] = true;\n } elseif ($this->magicCall && $reflClass->hasMethod('__call') && $reflClass->getMethod('__call')->isPublic()) {\n // we call the getter and hope the __call do the job\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC;\n $access[self::ACCESS_NAME] = $getter;\n } else {\n $methods = array($getter, $getsetter, $isser, $hasser, '__get');\n if ($this->magicCall) {\n $methods[] = '__call';\n }\n\n $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND;\n $access[self::ACCESS_NAME] = sprintf(\n 'Neither the property \"%s\" nor one of the methods \"%s()\" '.\n 'exist and have public access in class \"%s\".',\n $property,\n implode('()\", \"', $methods),\n $reflClass->name\n );\n }\n\n $this->readPropertyCache[$key] = $access;\n }\n\n return $access;\n }", "public function getRequiredProperties();", "public function testUnfilteredProperties()\n {\n $this->visit('/properties')\n ->see('Victorian townhouse')\n ->see('Five bedroom mill conversion')\n ->see('Shack in the desert');\n }", "public function getShouldFieldBeOverlaidData() {}", "function readDataField() {return $this->_datafield;}", "protected function _after_read(): void\n {\n //it is not supposed to be readable is the object is not readable\n //$this->get_object();//will trigger the permission denied if there is no permission to read the target object\n //TODO - add permission check\n //instantiating the object here may trigger a recursion as the object itself may be creating the alias in its _after_read\n }", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly();", "public function read() {\n\t\t\n\t}", "protected function getPropertyValue() {}", "abstract public function field_props();", "public function listInvalidProperties() {\n\t\treturn array();\n\t}", "public function getReadOnlyFlag() {}", "protected function didReadData() {\n $this->basePriceInCents = (int)$this->basePriceInCents;\n $this->totalPriceInCents = (int)$this->totalPriceInCents;\n }", "abstract protected function loadFields();", "final public static function missingMandatoryData()\n {\n return self::get(2066);\n }", "public function getProperties(): array;", "public function getProperties(): array;", "function getReadOnly() { return $this->_readonly; }", "public function properties() { }", "public function canGetProperty($name) {\r\n return parent::canGetProperty($name)||$this->__isset($name);\r\n }", "abstract public function read();" ]
[ "0.70132905", "0.6672684", "0.6667319", "0.66350776", "0.6629763", "0.65768623", "0.65514445", "0.64856416", "0.63355434", "0.6268636", "0.6250038", "0.6249849", "0.61742264", "0.61074954", "0.5956313", "0.5937971", "0.5937971", "0.5937971", "0.59364015", "0.59116644", "0.5884877", "0.58267313", "0.5774249", "0.5774176", "0.5772645", "0.5753539", "0.5744263", "0.5684921", "0.5677862", "0.5676897", "0.56585985", "0.5657786", "0.5657786", "0.56575096", "0.56497115", "0.56485164", "0.564516", "0.564516", "0.564516", "0.564516", "0.5634849", "0.5634758", "0.5629884", "0.56270325", "0.56179494", "0.5609936", "0.5599643", "0.55978864", "0.55971617", "0.55907625", "0.55859447", "0.5581902", "0.55691195", "0.55641437", "0.55636054", "0.5532696", "0.5528961", "0.5522734", "0.55180013", "0.54927975", "0.5487146", "0.5481065", "0.54745656", "0.547292", "0.5471337", "0.5470147", "0.5467309", "0.5462941", "0.54591185", "0.54558676", "0.54550934", "0.5453879", "0.545161", "0.545161", "0.54481816", "0.5425271", "0.54245836", "0.5419727", "0.54123604", "0.54040134", "0.5391895", "0.5389106", "0.5389106", "0.5389106", "0.53855735", "0.53657037", "0.5365347", "0.5362294", "0.5351456", "0.53513044", "0.5350137", "0.5335343", "0.5333876", "0.5333876", "0.5326619", "0.5324825", "0.5320568", "0.5319367" ]
0.7304745
1
Get max test value.
public function getMax() { return $this->_fMax; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_max_value() {\n return self::MAX_VALUE;\n }", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "public function getMax()\n {\n return $this->_maxValue;\n }", "public function getMax() {\n return $this->max;\n }", "public function getMaxValue();", "public function getMaxValue();", "public function getMaximum()\n {\n return $this->max;\n }", "function getMax() { return $this->readMaxValue(); }", "function max() { return $this->max; }", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getMaximum()\n {\n return $this->maximum;\n }", "protected function max_value() {\n $max = 0;\n foreach ($this->data_collections as $data_collection) {\n foreach ($data_collection->get_items() as $item) {\n if ($max < $item->get_value()) {\n $max = $item->get_value();\n }\n }\n }\n return $max;\n }", "function getMaxValue() { return $this->readMaxValue(); }", "function getMaxValue() { return $this->readMaxValue(); }", "public function testMax()\n {\n $this->ascendingSequence->setMax(1);\n $max = $this->ascendingSequence->getMax();\n $this->assertEquals(1, $max);\n }", "public function getMax(): float;", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "function testMaxval(){\n\t\t#mdx:maxval\n\t\tParam::get('age')->filters()->maxval(150, \"Age cannot be more than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>200])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"more than 150\", $error);\n\t}", "public function getMax(): int;", "public function getMaxScore()\n {\n return $this->result->getMaxScore();\n }", "abstract public function maxMax(): int;", "public function _getMaxScore() {\n\t\treturn $this->_maxScore;\n\t}", "public function getMaxTarget()\n {\n $bits = $this->lowestBits();\n $target = $this->math->getCompact($bits);\n\n return $target;\n }", "public function getMax();", "public function getMaxPrice() {\n return $this->get(self::MAXPRICE);\n }", "public function getMaxPriceInt()\n {\n $stats = $this->_getFieldStats();\n $max = $stats['max'];\n if (!is_numeric($max)) {\n $max = parent::getMaxPriceInt();\n }\n return $max;\n }", "public function usedVO2maxValue()\n {\n if (Configuration::VO2max()->useElevationCorrection()) {\n if ($this->Activity->vo2maxWithElevation() > 0) {\n return $this->Activity->vo2maxWithElevation();\n }\n }\n\n return $this->Activity->vo2maxByHeartRate();\n }", "public function testCanGetMaximumInvestment() : void\n {\n $this->assertEquals(50000, $this->tranche->getMaximumInvestment());\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "public function max(): int|float|null|object|bool|string\n {\n return max($this->internalMap);\n }", "public function getMaxPrice()\n\n {\n\n return $this->maxPrice;\n }", "public function max()\n {\n $maximum = round($this->centre + $this->centre * $this->deviation);\n\n return $this->unsigned ? max($maximum, 0) : $maximum;\n }", "function get_y_max()\n\t{\n\t\treturn count($this->_config[self::VALUES]) -1;\n\t}", "function get_version_max() {\n return $this->version_max;\n }", "public function evalMax()\n {\n $users = User::students()->get();\n $max = 0;\n\n foreach ( $users as $user )\n {\n if ($this->evalGradeExists($user))\n {\n if ($this->userPercentage($user) > $max)\n {\n $max = $this->userPercentage($user);\n }\n\n }\n\n }\n\n return $max;\n }", "public function max(): Option;", "protected function getMax() {\n\n\t\t$max = 0;\n\n\t\tif (!empty($this->tagsArray)) {\n\n\t\t\t$preAmount = 0;\n\n\t\t\tforeach ($this->tagsArray as $key => $value) {\n\n\t\t\t\t$currentAmount = $value['amount'];\n\t\t\t\tif ($currentAmount > $preAmount) {\n\t\t\t\t\t$max = $currentAmount;\n\t\t\t\t\t$preAmount = $currentAmount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $max;\n\t}", "public function testMax() {\n\t\t$array = array();\n\t\t$result = _::max($array);\n\t\t$this->assertEquals(-INF, $result);\n\n\t\t// test an array with elements\n\t\t$array = array(1, 2, 3);\n\t\t$result = _::max($array);\n\t\t$this->assertEquals(3, $result);\n\n\t\t// test an empty countable\n\t\t$arrayObj = new ArrayObject();\n\t\t$result = _::max($arrayObj);\n\t\t$this->assertEquals(-INF, $result);\n\n\t\t// test a countable with elements\n\t\t$arrayObj = new ArrayObject(array(1, 2, 3));\n\t\t$result = _::max($arrayObj);\n\t\t$this->assertEquals(3, $result);\n\n\t\t// test an array with elements and an iterator\n\t\t$array = array('one', 'two', 'three', 'four');\n\t\t$result = _::max($array, function($value) {\n\t\t\treturn strlen($value);\n\t\t});\n\t\t$this->assertEquals('three', $result);\n\t}", "public function max($max=null)\n {\n $max = LambdaUtils::toSelectCallable($max);\n $temp = $this->select($max)->toArray();\n return max($temp);\n }", "public function getMaxValueCharacteristic(){\n\t\t$maxValue = 1;\n\t\t\n\t\tforeach( $this->attributes as $key => $value ){\n\t\t\tif( $key!='knights_id' && $maxValue < $value ) $maxValue = $value; \n\t\t}\t\t\n\t\treturn $maxValue;\n\t}", "function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function getMaxDit() {\n\t\treturn $this->maxDit;\n\t}", "public function getMaximumQuantity()\n {\n return $this->maximumQuantity;\n }", "public function getMaxYValue() {\r\n return $this->chart->getMaxYValue($this);\r\n }", "protected function _getMax()\n {\n $max = 0;\n if (!empty($this->_tagsArray)) {\n $p_size = 0;\n foreach ($this->_tagsArray as $cKey => $cVal) {\n $c_size = $cVal['size'];\n if ($c_size > $p_size) {\n $max = $c_size;\n $p_size = $c_size;\n }\n }\n }\n return $max;\n }", "function getYAxisMax()\n\t{\n\t\treturn $this->y_max;\n\t}", "public function getMaxcount()\n {\n return $this->maxCount;\n }", "public function getMaximalPrice()\n {\n if (!$this->maximalPrice) {\n $maximalPrice = $this->product->getMaximalPrice();\n if ($maximalPrice === null) {\n $maximalPrice = $this->getValue();\n } else {\n $maximalPrice = $this->priceCurrency->convertAndRound($maximalPrice);\n }\n $this->maximalPrice = $this->calculator->getAmount($maximalPrice, $this->product);\n }\n return $this->maximalPrice;\n }", "public static function maxValue()\n {\n if (self::$PHPIntSize === 4) {\n // 32 bit\n return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore\n }\n\n // 64 bit\n return static::create(9999, 12, 31, 23, 59, 59);\n }", "function get_x_max()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$values[] = $value['right'];\n\t\t}\n\n\t\t$x = array_values($values);\n\t\tsort($x);\n\t\treturn array_pop($x);\n\t}", "private function getMaxAvailableVersion()\n {\n echo \"Getting the max available version: \";\n\n $maxAvailableVersion = 0;\n\n foreach ($this->getDeltas() as $deltaNum => $delta) {\n if ($maxAvailableVersion < $deltaNum) {\n $maxAvailableVersion = $deltaNum;\n }\n }\n\n echo \"$maxAvailableVersion.\\n\";\n\n return $maxAvailableVersion;\n }", "function max() {\n static $max = false;\n $max = $max ?: curry(function($a, $b){\n return $a > $b ? $a : $b;\n });\n return _apply($max, func_get_args());\n}", "public function maxSortingNumber(){\n $result = $this->repo->maxSortingNumber();\n return $result;\n }", "public function getCountMax(): int\n {\n return $this->countMax;\n }", "public static function getApproxMaxTour()\n\t{\n\t\t$playersCount = Yii::app()->db->createCommand()\n\t\t\t->select('count(*)')\n\t\t\t->from(Player::tableName())\n\t\t\t->queryScalar();\n\t\t$tourCount=ceil(log($playersCount,2)) + ceil(log(Yii::app()->params['accuracyCount'],2));\n\t\treturn (int)$tourCount;\n\t}", "public function getMaxPoint()\n {\n $maxPoint = 0;\n foreach ($this->jawaban as $jawaban)\n if ($jawaban->poin > $maxPoint)\n $maxPoint = $jawaban->poin;\n\n return $maxPoint;\n }", "public function getMaxResults()\n {\n return $this->max_results;\n }", "private function get_max_price() : float {\n\t\tpreg_match( '/runParams\\.maxPrice=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn floatval( $matches[1] );\n\t}", "public function get_max_product_price()\n\t{\n\t\t$this->db->select('MAX(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}", "static function maxint() {\n /* assumes largest integer is of form 2^n - 1 */\n $to_test = pow(2, 16);\n while (1) {\n $last = $to_test;\n $to_test = 2 * $to_test;\n if (($to_test < $last) || (!is_int($to_test))) {\n return($last + ($last - 1));\n }\n }\n }", "function validMax($value, $max)\n {\n return $value <= $max;\n }", "public function testCheckMaxAmount() {\n $amount = 1000;\n $this->assertTrue($this->tranche->checkMaxAmount($amount));\n }", "protected function getMaxValueAcrossSeries(): float\n {\n if ($this->base) {\n return $this->base;\n }\n\n $maxes = array_map('max', $this->data);\n return max($maxes);\n }", "public function testGetHistogramMax()\n {\n $dice = new DiceGraphic2();\n $this->assertInstanceOf(\"\\Alfs\\Dice2\\Dice2\", $dice);\n\n $res = $dice->getHistogramMax();\n $exp = 6;\n $this->assertEquals($exp, $res);\n }", "function getMaxInShowcase();", "public function getMaxPerUserId()\n {\n return $this->maxPerUserId;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function getMaxSequence()\n {\n return $this->max_sequence;\n }", "public static function _max($value, $field, $max) {\n\t\treturn $value <= $max;\n\t}", "private function chartmax($data){\n\t\t\t$max = 0;\n\t\t\tforeach($data as $row){\n\t\t\t\t$max = max($max,$row['value']);\n\t\t\t}\n\t\t\treturn $max;\n\t\t}", "public function getAutomaticMaximum() {\r\n return $this->automaticMaximum;\r\n }", "function getPriceMax($game_id, $round_number, $product_number, $region_number, $channel_number){\r\n\t\t\t$prices=new Model_DbTable_Decisions_Mk_Prices();\r\n\t\t\t$max=0;\r\n\t\t\t$companies=$this->getCompaniesInGame($game_id);\r\n\t\t\tforeach ($companies as $company) {\r\n\t\t\t\t$result=$prices->getDecision($game_id, $company['id'], $round_number);\r\n\t\t\t\t$result_product=$result['product_'.$product_number];\r\n\t\t\t\t$result_channel=$result_product['channel_'.$channel_number];\r\n\t\t\t\t$result_region=$result_channel['region_'.$region_number];\r\n\t\t\t\t$price=$result_region;\r\n\t\t\t\tif ($price>$max){\r\n\t\t\t\t\t$max=$price;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $max;\r\n\t\t}", "public function high_post_test(){\n\t\t$query = \"\n\t\tSELECT Max(`B`.`PROSCR_VALUE`) AS 'max_post_test', `c`.`MEMBER_NAME`, `c`.`MEMBER_EMAIL`, `B`.`PROSCR_PROTEST_TYPE`,\n\t\t`c`.`PROPAR_PROGRAM_ID` \n\t\tFROM\n\t\t`t_program_testing` AS `A` INNER JOIN `t_program_score` AS `B` ON `A`.`PROTEST_PROGRAM_ID` = `B`.`PROSCR_PROPAR_ID`\n\t\tINNER JOIN `V_PROGRAM_PARTICIPANT` AS `c` ON `B`.`PROSCR_PROPAR_ID` = `c`.`PROPAR_PROGRAM_ID`\n\t\tWHERE\n\t\t`B`.`PROSCR_PROTEST_TYPE` = 2 \";\n\t\treturn $this->db->query($query);\n\t}", "public function getMax()\r\n {\r\n if (count($this->aNotes) === 0) {\r\n return 0;\r\n }\r\n $fMax = $this->aNotes[0];\r\n foreach ($this->aNotes as $fNote) {\r\n if ($fNote > $fMax) {\r\n $fMax = $fNote;\r\n }\r\n }\r\n return $fMax;\r\n }", "abstract protected function getMaxParameter(): int;", "public function test_get_max_version()\n {\n $migrator_util = new Ruckusing_Util_Migrator($this->adapter);\n\n $this->clear_dummy_data();\n $this->assertEquals(null, $migrator_util->get_max_version());\n\n $this->insert_dummy_version_data(array(3));\n $this->assertEquals(\"3\", $migrator_util->get_max_version());\n $this->clear_dummy_data();\n }", "public function getMaxUse(): int\n {\n return $this->max_use;\n }", "public function maxNumber(): int\n {\n try {\n return (int) $this->createQueryBuilder('b')\n ->select('max(b.number) as maxi')\n ->getQuery()\n ->getSingleScalarResult()\n ;\n } catch (NonUniqueResultException $exception) {\n //this should not be reached.\n return 0;\n } catch (NoResultException $exception) {\n return 0;\n }\n }", "public function getProductsMaxPrice()\n {\n return $this->filterData['max'] ?? '';\n }", "public function testGroupByMax() {\n $this->groupByTestHelper('max', [4, 7]);\n }", "function highest()\n\t{\n\t\tend($this->_data);\n\t\treturn key($this->_data);\n\t}", "public function maxBy(callable $callback): Option;", "public function getActualMaximum($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function getMax()\n {\n return memory_get_peak_usage(true);\n }", "public static function getHighestQuality(): int\n {\n return static::$highestQuality;\n }", "function MaxLongitude() {\n return $GLOBALS[\"maxLong\"];\n }", "protected function getCashMax()\n\t{\n\t\treturn $this->ut->up->rank['number'] / count(\\game::$ranks['items']) * $this->cash_max_real / 2 + $this->cash_max_real / 2;\n\t}", "public function getImgMax()\n {\n return $this->_params['imgmax'];\n }", "public function getMaxHealth()\n {\n return $this->maxHealth;\n }", "public function getMaxHealth()\n {\n return $this->maxHealth;\n }", "public function maxNorm() : float\n {\n return $this->abs()->max()->max();\n }", "public function getMaximumOffset() {\r\n return $this->maximumOffset;\r\n }", "function maximo( $resultado, $valor) {\n\t$resultado = ($valor > $resultado ) ? $valor : $resultado; \n\treturn $resultado;\n}", "public function getMaximumLoanAmount()\n\t{\n\t\treturn $this->max_loan_amount;\n\t}", "public function getYMax() {}", "public function getYMax() {}" ]
[ "0.7771248", "0.76428515", "0.75863665", "0.7565985", "0.75242317", "0.75242317", "0.7517526", "0.74832684", "0.7371807", "0.7368707", "0.72871304", "0.7230127", "0.716215", "0.714987", "0.7086326", "0.7067433", "0.70319915", "0.70197314", "0.7018528", "0.6955017", "0.6879785", "0.6855929", "0.67620146", "0.6753617", "0.6730507", "0.6652286", "0.66264355", "0.6609691", "0.66032207", "0.6586309", "0.6586309", "0.6581918", "0.6570518", "0.65300107", "0.65269476", "0.6506038", "0.6500645", "0.6495085", "0.64734364", "0.6471248", "0.64625925", "0.6446385", "0.6426516", "0.6415734", "0.6415734", "0.64120036", "0.633347", "0.6323846", "0.6319695", "0.6294151", "0.628159", "0.62785697", "0.62719154", "0.6257116", "0.6254891", "0.6238004", "0.6237994", "0.62133414", "0.61967117", "0.6177697", "0.615889", "0.6149775", "0.6148419", "0.61461437", "0.6145645", "0.6144862", "0.6141225", "0.61358577", "0.6130398", "0.61267775", "0.61191046", "0.61104697", "0.60807514", "0.607112", "0.6070969", "0.60699326", "0.6069104", "0.60640013", "0.6042493", "0.60275596", "0.6018403", "0.5993283", "0.5974673", "0.59687793", "0.5965223", "0.59639883", "0.59623504", "0.5960964", "0.59384036", "0.59336704", "0.5924785", "0.59202313", "0.59196913", "0.59196913", "0.5918088", "0.5917092", "0.5908369", "0.59042233", "0.5882437", "0.5882437" ]
0.7246587
11
Get min test value.
public function getMin() { return $this->_fMin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_min_value() {\n return self::MIN_VALUE;\n }", "public function getMin()\n {\n return $this->_minValue;\n }", "function getMin() { return $this->readMinValue(); }", "public function getMinimum() {\r\n return $this->minimumvalue;\r\n }", "public function getMin() {\n return $this->min;\n }", "public function getMin();", "public function get_score_min()\n\t{\n\t\treturn $this->score_min;\n\t}", "public function getMinValue();", "public function getMinValue();", "public function getMin(): float;", "public function testMin()\n {\n $this->ascendingSequence->setMin(1);\n $min = $this->ascendingSequence->getMin();\n $this->assertEquals(1, $min);\n }", "function min() { return $this->min; }", "public function getMinimum(): float\n {\n return $this->min;\n }", "public function getMinimum()\n {\n return $this->minimum;\n }", "public function getMin(): int;", "public function getMinNumber()\n {\n return $this->minNumber;\n }", "function getMinValue() { return $this->readMinValue(); }", "public function getMinValue()\n {\n return $this->get('MinValue');\n }", "function getMinValue() { return $this->readMinValue(); }", "protected function getMin() {\n\n\t\t$min = 1;\n\n\t\tif (!empty($this->tagsArray)) {\n\n\t\t\t$preAmount = 999999;\n\n\t\t\tforeach ($this->tagsArray as $key => $value) {\n\t\t\t\t$currentAmount = $value['amount'];\n\t\t\t\tif ($currentAmount < $preAmount) {\n\t\t\t\t\t$min = $currentAmount;\n\t\t\t\t\t$preAmount = $currentAmount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $min;\n\t}", "public function getMinXValue() {\r\n return $this->chart->getMinXValue($this);\r\n }", "public function GetMinVal()\n\t{\n\t\tif (function_exists('bcpow')) {\n\t\t\treturn round(bcpow(10, $this->scale[0], 15), 14);\n\t\t}\n\n\t\treturn round(pow(10, $this->scale[0]), 14);\n\t}", "public function testMin()\n {\n $this->assertEquals(0, EggDropperCalculator::calculate(0, 0));\n $this->assertEquals(0, EggDropperCalculator::calculate(1, 0));\n $this->assertEquals(1, EggDropperCalculator::calculate(0, 1));\n $this->assertEquals(1, EggDropperCalculator::calculate(1, 1));\n $this->assertEquals(0, EggDropperCalculator::calculate(2, 0));\n $this->assertEquals(0, EggDropperCalculator::calculate(0, 2));\n $this->assertEquals(1, EggDropperCalculator::calculate(2, 1));\n $this->assertEquals(2, EggDropperCalculator::calculate(1, 2));\n }", "public function getMinPriceInt()\n {\n $stats = $this->_getFieldStats();\n $min = $stats['min'];\n if (!is_numeric($min)) {\n $min = 0;\n }\n return $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 min($value) {\n return $this->setProperty('min', $value);\n }", "public function min($value) {\n return $this->setProperty('min', $value);\n }", "abstract public function minMin(): int;", "public function min()\n {\n $minimum = round($this->centre - $this->centre * $this->deviation);\n\n return $this->unsigned ? max($minimum, 0) : $minimum;\n }", "public function min(): Option;", "public function getXMin() {}", "public function getXMin() {}", "public function min($min=null)\n {\n $min = LambdaUtils::toSelectCallable($min);\n $temp = $this->select($min)->toArray();\n return min($temp);\n }", "private function get_min_price() : float {\n\t\tpreg_match( '/runParams\\.minPrice=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn floatval( $matches[1] );\n\t}", "function get_x_min()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$values[] = $value['left'];\n\t\t}\n\n\t\t$x = array_values($values);\n\t\trsort($x);\n\t\treturn array_pop($x);\n\t}", "public function getMinLat() {\n return $this->minLat;\n }", "public static function get_default_min()\n\t{\n\t\treturn self::get_value('1970-01');\n\t}", "public function evalMin()\n {\n $users = User::students()->get();\n $min = 100;\n foreach ( $users as $user )\n {\n if ($this->evalGradeExists($user))\n {\n if ($this->userPercentage($user) < $min)\n {\n $min = $this->userPercentage($user);\n }\n }\n\n }\n return $min;\n\n }", "public function getMinimumQuantity()\n {\n return $this->minimumQuantity;\n }", "public function getMinimumQuantity()\n {\n return $this->minimumQuantity;\n }", "public function getAutomaticMinimum() {\r\n return $this->automaticMinimum;\r\n }", "public function getMinPrice();", "public function getLowestTier()\n {\n $intMin = (int) min(array_keys($this->arrTiers));\n\n return $intMin ?: 1;\n }", "public function getLowestTier()\n {\n $intMin = (int) min(array_keys($this->arrTiers));\n\n return $intMin ?: 1;\n }", "public function getMin() {\n\t\t\treturn \"<p>Min: \".$this->min.\"</p>\";\n\t\t}", "public function get_min_product_price()\n\t{\n\t\t$this->db->select('MIN(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}", "public function getProductsMinPrice()\n {\n return $this->filterData['min'] ?? '';\n }", "public function getMin()\r\n {\r\n if (count($this->aNotes) === 0) {\r\n return 0;\r\n }\r\n $fMin = $this->aNotes[0];\r\n foreach ($this->aNotes as $fNote) {\r\n if ($fNote < $fMin) {\r\n $fMin = $fNote;\r\n }\r\n }\r\n return $fMin;\r\n }", "public static function get_default_min()\n\t{\n\t\treturn self::get_value('1970-W01');\n\t}", "function min() {\n static $min = false;\n $min = $min ?: curry(function($a, $b){\n return $a < $b ? $a : $b;\n });\n return _apply($min, func_get_args());\n}", "public function getMinimum() : int\n {\n return $this->getValue('nb_domain_zone_minimum');\n }", "public function getMinimumOffset() {\r\n return $this->minimumOffset;\r\n }", "abstract protected function getMinParameter(): int;", "public function testMin() {\n\t\t$array = array();\n\t\t$result = _::min($array);\n\t\t$this->assertEquals(INF, $result);\n\n\t\t// test an array with elements\n\t\t$array = array(1, 2, 3);\n\t\t$result = _::min($array);\n\t\t$this->assertEquals(1, $result);\n\n\t\t// test an empty countable\n\t\t$arrayObj = new ArrayObject();\n\t\t$result = _::min($arrayObj);\n\t\t$this->assertEquals(INF, $result);\n\n\t\t// test a countable with elements\n\t\t$arrayObj = new ArrayObject(array(1, 2, 3));\n\t\t$result = _::min($arrayObj);\n\t\t$this->assertEquals(1, $result);\n\n\t\t// test an array with elements and an iterator\n\t\t$array = array('one', 'two', 'three', 'four');\n\t\t$result = _::min($array, function($value) {\n\t\t\treturn strlen($value);\n\t\t});\n\t\t$this->assertEquals('one', $result);\n\t}", "public static function minValue()\n {\n if (self::$PHPIntSize === 4) {\n // 32 bit\n return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore\n }\n\n // 64 bit\n return static::create(1, 1, 1, 0, 0, 0);\n }", "public static function min($attribute = null);", "public function min($field)\n {\n $this->field(\"min({$field}) AS min\", false);\n $list = $this->__select();\n $result = 0;\n if (count($list) == 1) {\n $result = intval($list[0]['min']);\n }\n elseif (count($list) > 1) {\n $result = array();\n foreach ($list as $row) {\n $result[] = $row['min'];\n }\n }\n return $result;\n }", "public function getMinPriceInt()\n {\n $minPrice = $this->getData('min_price_int');\n if (is_null($minPrice)) {\n $collection = $this->getLayer()->getProductCollection();\n $minPrice = $collection->clearPriceFilters()->getMinPrice();\n $collection->retrievePriceFilters();\n $minPrice = floor($minPrice);\n $this->setData('min_price_int', $minPrice);\n }\n\n return $minPrice;\n }", "public function getMinLikelihood()\n {\n return $this->min_likelihood;\n }", "public function getMinLikelihood()\n {\n return $this->min_likelihood;\n }", "public function minimalVal( string $column = '' )\n {\n return $this->show()->min( $column );\n }", "public function getStartAtMin(): ?string\n {\n return $this->startAtMin;\n }", "private function min()\n {\n return Carbon::create(1, 1, 1, 0, 0, 0);\n }", "public function getEarliest(): int\n {\n return $this->earliest;\n }", "public function getMinimumQuantity()\n {\n $this->load('product');\n $minimum = $this->product->price()\n ->where('date_start', '<=', 'NOW()')\n ->whereRaw('(date_end > NOW() OR date_end IS NULL)')\n ->where('site_id', $this->invoice->getBaseSiteId())\n ->orderBy('min_quantity')\n ->first();\n return $minimum->min_quantity;\n }", "public function getMinimumCharge()\r\n {\r\n return $this->basket->sCheckMinimumCharge();\r\n }", "function testMinvalRunsOnlyIfNotEmpty(){\n\t\t#mdx:minval2\n\t\tParam::get('age')->filters()->minval(1, \"Age cannot be less than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>null])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertNull($error);\n\n\t}", "private function getLowestPrice()\n {\n $prices = array();\n foreach ($this->performances as $performance) {\n $ticketClasses = $performance->getTicketClass();\n foreach ($ticketClasses as $ticketClass) {\n $prices[] = ($ticketClass->getPrice()) ? $ticketClass->getPrice() : 0;\n }\n }\n sort($prices);\n\n return (float)$prices[0];\n }", "public function getLow(): float\n {\n return $this->low;\n }", "public function getSliderMinPrice()\n {\n if (!$this->getPriceRange()['min']) {\n return $this->getProductsMinPrice();\n }\n return $this->getPriceRange()['min'];\n }", "function minCash(){\n\t\tglobal $driver;\n\t\t$sql\t\t=\t\"SELECT leastcash FROM settings\";\n\tif($leastcash\t=\t$driver->perform_request($sql)):\n\t\t$row\t\t=\t$driver->load_data($leastcash);\n\t\t$mincash\t=\t($row['leastcash']>0)?($row['leastcash']):500000;\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving minimum cash balance.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $mincash; //The minimum cash\n}", "public static function min()\n {\n $args = func_get_args();\n $self = array_shift($args);\n\n //return the minimum of the arguments\n return min($args);\n }", "public function getMinimalPrice()\n {\n if (!$this->minimalPrice) {\n $minimalPrice = $this->product->getMinimalPrice();\n if ($minimalPrice === null) {\n $minimalPrice = $this->getValue();\n } else {\n $minimalPrice = $this->priceCurrency->convertAndRound($minimalPrice);\n }\n $this->minimalPrice = $this->calculator->getAmount($minimalPrice, $this->product);\n }\n return $this->minimalPrice;\n }", "public function getMinPixels() {\r\n return $this->minPixels;\r\n }", "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function getMinimumFeedbackScore()\n {\n return $this->minimumFeedbackScore;\n }", "function get_version_min() {\n return $this->version_min;\n }", "private function get_disc_min_price() : float {\n\t\tpreg_match( '/runParams\\.actMinPrice=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn floatval( $matches[1] );\n\t}", "public static function _min($value, $field, $min) {\n\t\treturn $value >= $min;\n\t}", "function getMinAgeInScore($player_id) {\n return self::getMinOrMaxAgeInLocation($player_id, 'score', 'MIN');\n }", "protected function getMinimumFor($position)\n {\n if ($position === 1\n || $position === 4\n ) {\n $minimum = 1;\n } else {\n $minimum = 0;\n }\n\n return $minimum;\n }", "public function getMinimum($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function getLowestQuality(): int\n {\n return static::$lowestQuality;\n }", "public function getMinPoints(){\n \n $min = 0;\n $awards = $this->getAwards(true);\n if ($awards){\n foreach($awards as $award){\n if ($award->getPoints() < $min || $min == 0){\n $min = $award->getPoints();\n }\n }\n }\n \n return $min;\n \n }", "public function getMinCount()\r\n {\r\n return $this->getOption('mincount');\r\n }", "function exibeAtualMin(){\n return $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n }", "function MinLatitude() {\n return $GLOBALS[\"minLat\"];\n }", "public function minBy(callable $callback): Option;", "public function getMinAge()\n {\n return $this->minAge;\n }", "public function getMinAge()\n {\n return $this->minAge;\n }", "public function min(Query $query, string $field): float;", "public function getMinimumInventoryQuantity()\n {\n return $this->minimumInventoryQuantity;\n }", "function minimo( $resultado, $valor) {\n\t$resultado = ($valor < $resultado ) ? $valor : $resultado; \n\treturn $resultado;\n}", "public function min(string $column): float\n {\n return (float) $this->selection->min($column);\n }", "public function getActualMinimum($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function min($min = null)\n {\n $this->min = $min;\n\n return $this;\n }", "function minimum_amount($minimum_amount=null)\n {\n if (isset($minimum_amount)) $this->minimum_amount = $minimum_amount;\n return $this->minimum_amount;\n }", "public function min($callback, $type = \\SORT_NUMERIC);", "public function getMinOccupancy()\n {\n return $this->minOccupancy;\n }" ]
[ "0.78881514", "0.7673716", "0.76587135", "0.7611042", "0.7573013", "0.7487576", "0.74131024", "0.73673594", "0.73673594", "0.73371464", "0.73365784", "0.7320705", "0.7308258", "0.7258835", "0.7249831", "0.7211859", "0.7182904", "0.7171559", "0.71557456", "0.70183116", "0.6937876", "0.6935737", "0.69213563", "0.6903973", "0.68842643", "0.6820282", "0.6820282", "0.6766148", "0.67601776", "0.667618", "0.66672397", "0.66672397", "0.6661274", "0.6657945", "0.6575094", "0.65530974", "0.64942044", "0.64724684", "0.6433726", "0.6433726", "0.64314187", "0.64110047", "0.6358288", "0.6358288", "0.6354995", "0.6338627", "0.6317909", "0.62903225", "0.6275838", "0.6197476", "0.6195395", "0.618885", "0.61813223", "0.61796814", "0.6176639", "0.6167589", "0.6166905", "0.6159695", "0.61406934", "0.61406934", "0.6132034", "0.61292034", "0.61290723", "0.6105998", "0.60985124", "0.60955054", "0.6095447", "0.60661095", "0.60592556", "0.6045255", "0.6024717", "0.6002731", "0.5986063", "0.5962222", "0.5958957", "0.5958957", "0.5951978", "0.5936405", "0.5934512", "0.59343356", "0.59080875", "0.5880336", "0.5878517", "0.58783895", "0.5863584", "0.5859116", "0.5852527", "0.58463305", "0.58377165", "0.58168226", "0.58168226", "0.5812639", "0.57973236", "0.57871985", "0.5769147", "0.57631105", "0.5761074", "0.57566535", "0.5754412", "0.57268655" ]
0.7437993
6
add measure test values.
public function add($fTimeStart, $fTimeStop) { if (! is_float($fTimeStart) || ! is_float($fTimeStop) || ($fTimeStart <= 0) || ($fTimeStop <= 0)) { throw new \Foundation\Exception\InvalidArgumentException('Bad time values.'); } // Difference of $fTimeStop and $fTimeStart $fDiff = $fTimeStop - $fTimeStart; // Save the difference $this->_aTests[$this->_iIndex++] = $fDiff; // Add $this->_fSum += $fDiff; if (is_null($this->_fMin)) { // First values $this->_fMin = $this->_fMax = $fDiff; } else { // Save the maximum if ($fDiff > $this->_fMax) { $this->_fMax = $fDiff; } // Save the minimum if ($fDiff < $this->_fMin) { $this->_fMin = $fDiff; } }//if( is_float(... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSum() {\n $variable1 = new qti_variable('single', 'integer', array('value' => 5));\r\n $this->assertEquals(15, qti_variable::sum($variable1, $variable1, $variable1)->value);\n }", "static function measureResults(){\n\t\tforeach(self::$measures as $name=>$measure){\n\t\t\t$totalTime = 0;\n\t\t\twhile(($instance = current($measure)) && next($measure)){\n\t\t\t\t$nextInstance = current($measure);\n\t\t\t\tif($nextInstance){\n\t\t\t\t\t$currentCount = count($out[$name]);\n\t\t\t\t\t$totalTime += $nextInstance['time'] - $instance['time'];\n\t\t\t\t\t$out[$name][$currentCount]['timeChange'] = $nextInstance['time'] - $instance['time'];\n\t\t\t\t\t$out[$name][$currentCount]['memoryChange'] = $nextInstance['mem'] - $instance['mem'];\n\t\t\t\t\t$out[$name][$currentCount]['peakMemoryChange'] = $nextInstance['peakMem'] - $instance['peakMem'];\n\t\t\t\t\t$out[$name][$currentCount]['peakMemoryLevel'] = $instance['peakMem'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out[$name]['total']['time'] = $totalTime;\n\t\t}\n\t\treturn $out;\n\t}", "function baseMeasure() {\r\n\r\n\t\tif ($this->expectsPost(array('watchId', 'referenceTimestamp', 'userTimestamp'))) {\r\n\r\n\t\t\t$result['success'] = false;\r\n\r\n\t\t\t$watch = $this->watch->getWatch($this->watchId);\r\n\r\n\t\t\t//Add the base measure\r\n\t\t\tif ($watch && \r\n\t\t\t\t$watch->userId == $this->session->userdata('userId') && \r\n\t\t\t\t$this->measure->addBaseMesure(\r\n\t\t\t\t$this->watchId,\r\n\t\t\t\t$this->referenceTimestamp/1000,\r\n\t\t\t\t$this->userTimestamp/1000)\r\n\t\t\t) {\r\n\r\n\t\t\t\t$result['success'] = true;\r\n\r\n\t\t\t}\r\n\r\n\t\t\techo json_encode($result);\r\n\t\t}\r\n\t}", "public function testAdd()\n {\n $result = $this->calculator->add(1, 2);\n $this->assertEquals(3, $result);\n }", "public function testAddPercent()\n {\n $tests = [\n ['expected' => 112, 'fn' => Math::addPercent(100, 12)],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12')],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12%')],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12 %')],\n ['expected' => 112, 'fn' => Math::addPercent('100 ', '12')],\n ['expected' => 112.5, 'fn' => Math::addPercent('100', '12.5')],\n ['expected' => 88, 'fn' => Math::addPercent('100', -12)],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12')],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12 %')],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12%')],\n ];\n\n foreach ($tests as $test) {\n $this->assertEquals($test['expected'], $test['fn']);\n }\n }", "public function testadd()\r\n {\r\n echo \"\\n---Dummy Test:Test Add---\\n\";\r\n $a=2;\r\n $b=2;\r\n $c=add($a, $b);\r\n $this->assertEquals(4,$c);\r\n }", "public function test_exportValue() {\n /** @var MoodleQuickForm_duration $el */\n $el = $this->mform->addElement('duration', 'testel');\n $values = array('testel' => array('number' => 10, 'timeunit' => 1));\n $this->assertEquals(array('testel' => 10), $el->exportValue($values, true));\n $this->assertEquals(10, $el->exportValue($values));\n $values = array('testel' => array('number' => 3, 'timeunit' => 60));\n $this->assertEquals(array('testel' => 180), $el->exportValue($values, true));\n $this->assertEquals(180, $el->exportValue($values));\n $values = array('testel' => array('number' => 1.5, 'timeunit' => 60));\n $this->assertEquals(array('testel' => 90), $el->exportValue($values, true));\n $this->assertEquals(90, $el->exportValue($values));\n $values = array('testel' => array('number' => 2, 'timeunit' => 3600));\n $this->assertEquals(array('testel' => 7200), $el->exportValue($values, true));\n $this->assertEquals(7200, $el->exportValue($values));\n $values = array('testel' => array('number' => 1, 'timeunit' => 86400));\n $this->assertEquals(array('testel' => 86400), $el->exportValue($values, true));\n $this->assertEquals(86400, $el->exportValue($values));\n $values = array('testel' => array('number' => 0, 'timeunit' => 3600));\n $this->assertEquals(array('testel' => 0), $el->exportValue($values, true));\n $this->assertEquals(0, $el->exportValue($values));\n\n $el = $this->mform->addElement('duration', 'testel', null, array('optional' => true));\n $values = array('testel' => array('number' => 10, 'timeunit' => 1));\n $this->assertEquals(array('testel' => 0), $el->exportValue($values, true));\n $this->assertEquals(0, $el->exportValue($values));\n $values = array('testel' => array('number' => 20, 'timeunit' => 1, 'enabled' => 1));\n $this->assertEquals(array('testel' => 20), $el->exportValue($values, true));\n $this->assertEquals(20, $el->exportValue($values));\n\n // Optional element.\n $el2 = $this->mform->addElement('duration', 'testel', '', ['optional' => true]);\n $values = array('testel' => array('number' => 10, 'timeunit' => 1, 'enabled' => 1));\n $this->assertEquals(array('testel' => 10), $el2->exportValue($values, true));\n $this->assertEquals(10, $el2->exportValue($values));\n $values = array('testel' => array('number' => 10, 'timeunit' => 1, 'enabled' => 0));\n $this->assertEquals(array('testel' => 0), $el2->exportValue($values, true));\n $this->assertEquals(null, $el2->exportValue($values));\n }", "public function testCollect() {\n\t\t$group = new Group();\n\t\t$group->add($this->_paths['testClassTest']);\n\t\t$this->report->group = $group;\n\n\t\tComplexity::apply($this->report, $group->tests());\n\n\t\t$results = Complexity::collect(\n\t\t\t$this->report->results['filters'][$this->_paths['complexity']]\n\t\t);\n\t\t$expected = [$this->_paths['testClass'] => $this->_metrics];\n\t\t$this->assertEqual($expected, $results);\n\t}", "public function add()\n {\n $calculator = new Calculator();\n $this->assertSame(4, $calculator->add(3, 1));\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function add_test($test)\n {\n array_push($this->tests, $test);\n }", "public function test_add_method()\n {\n $decimal = new Decimal(2);\n\n $decimal->add(3);\n\n Should::eq(5.00, $decimal->value);\n }", "public function testAdd()\n {\n $c = $this->_getNewCollection();\n $value = $this->_getNewValue();\n $pre = $c->count();\n $this->assertTrue( $c->add($value) );\n $post = $c->count();\n $this->assertTrue( $pre < $post );\n $this->assertFalse( $c->add($value) );\n }", "final public function addCanMakeATotal(): void\n {\n $this->assertEquals(2, add(1, 1));\n $this->assertEquals(0, add(1, -1));\n $this->assertEquals(-2, add(-1, -1));\n $this->assertEquals(3, add(1, 2));\n $this->assertEquals(-1, add(1, -2));\n $this->assertEquals(1234567940, add(50, 1234567890));\n // Test overflow\n $this->assertEquals(PHP_INT_MIN, add(1, PHP_INT_MAX));\n $this->assertEquals(PHP_INT_MAX, add(-1, PHP_INT_MIN));\n // This add function works on int not floats\n $this->assertEquals(2, add(1.1, 1.1));\n }", "public function new_measure() {\r\n\r\n\t\t$this->_bodyData['watches'] = $this->watch->getWatches(\r\n\t\t\t$this->session->userdata('userId'));\r\n\r\n\t\t$this->event->add(MEASURE_LOAD);\r\n\r\n\t\tarray_push($this->_headerData['javaScripts'], \"input.time.logic\", \"time.api\");\r\n\r\n\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t$this->load->view('measure/new-measure', $this->_bodyData);\r\n\r\n\t\t$this->load->view('footer');\r\n\t}", "function accuracyMeasure() {\r\n\r\n\t\tif ($this->expectsPost(array('measureId', 'referenceTimestamp', 'userTimestamp'))) {\r\n\r\n\t\t\t$result['success'] = false;\r\n\r\n\t\t\t$watch = $this->watch->getWatchByMeasureId($this->measureId);\r\n\r\n\t\t\tif ($watch && \r\n\t\t\t\t$watch->userId == $this->session->userdata('userId')){\r\n\r\n\t\t\t\t//Add the watch measure\r\n\t\t\t\t$watchMeasure = $this->measure->addAccuracyMesure(\r\n\t\t\t\t\t$this->measureId,\r\n\t\t\t\t\t$this->referenceTimestamp/1000,\r\n\t\t\t\t\t$this->userTimestamp/1000\r\n\t\t\t\t);\r\n\r\n\r\n\t\t\t\t// If the computed accuracy makes sense, we return success\r\n\t\t\t\tif (is_numeric($watchMeasure->accuracy)) {\r\n\t\t\t\t\t$result['success'] = true;\r\n\t\t\t\t\t//We store the computed accuracy & percentile\r\n\t\t\t\t\t$result['accuracy'] = $watchMeasure->accuracy;\r\n\t\t\t\t\t$result['percentile'] = $watchMeasure->percentile;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\techo json_encode($result);\r\n\t\t}\r\n\t}", "public function add_data_final()\n\t{\n\t\t$user_id \t\t\t= $this->session->userdata['logged_in']['user_id'];\n\t\t\n\t\t$test_id \t\t\t= $this->input->post('test_id');\n\t\t$count_tests \t\t= count($test_id);\n\t\t\n\t\t$programm_type_id \t= $this->input->post('programm_type_id');\n\t\t$programm_date_id \t= $this->input->post('programm_date_id');\n\t\t$test_values \t\t= $this->input->post('test_value');\n\t\t$test_method \t\t= $this->input->post('methods');\n\t\t$date \t\t\t\t= date('Y-m-d');\n\n\t\t\n\t\tfor ($i=0; $i <$count_tests ; $i++) { \n\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t$this->db->where('programm_type_id', $programm_type_id);\n\t\t\t$this->db->where('programm_date_id', $programm_date_id);\n\t\t\t\n\t\t\t\n\t\t\t$this->db->where('test_id', $test_id[$i]);\n\n\n\t\t\t$this->test_value \t\t\t= $test_values[$i];\n\t\t\t$this->method_id \t\t\t= $test_method[$i];\n\t\t\t$this->date_value_added \t= $date;\n\n\t\t\t$this->db->update('users_programm_dates_tests_evaluations', $this);\n\t\t}\n\t\t\n\n\n\t}", "public function addSamples(\\iface\\Sample $value){\n return $this->_add(1, $value);\n }", "private function addValues($selected){\n $id = $this->answersId[$selected];\n $answersModel = new Answer();\n $answer = $answersModel->find($id);\n\n $this->score['heritage'] += $answer->heritage;\n $this->score['populated'] += $answer->populated;\n $this->score['weather'] += $answer->weather;\n $this->score['relax'] += $answer->relax;\n $this->score['sightseeing'] += $answer->sightseeing;\n }", "function get_measure($id) {\r\n global $measures;\r\n global $measures_stop;\r\n if ($measures_stop[$id] == \"\" || $measures_stop[$id] == NULL)\r\n $tFinish = microtime_float();\r\n else\r\n $tFinish = $measures_stop[$id];\r\n return ($tFinish - $measures[$id]);\r\n}", "public function testSum()\n {\n $dice = new Dice();\n $dice->roll(100);\n $faceValues = $dice->getFaceValues();\n $res = $dice->sum();\n $this->assertEquals(array_sum($faceValues), $res);\n }", "public function store($measures)\n {\n $measureIds = array();\n foreach ($measures as $data) {\n $measure = new Measure;\n $measure->name = trim($data['name']);\n $measure->measure_type_id = $data['measure_type_id'];\n $measure->unit = $data['unit'];\n $measure->description = $data['description'];\n\n try{\n $measure->save();\n $measureIds[] = $measure->id;\n }catch(QueryException $e){\n Log::error($e);\n }\n \n if ($measure->isNumeric()) {\n $val['agemin'] = $data['agemin'];\n $val['agemax'] = $data['agemax'];\n $val['gender'] = $data['gender'];\n $val['rangemin'] = $data['rangemin'];\n $val['rangemax'] = $data['rangemax'];\n $val['interpretation'] = $data['interpretation'];\n\n // Add ranges for this measure\n for ($i=0; $i < count($val['agemin']); $i++) { \n $measurerange = new MeasureRange;\n $measurerange->measure_id = $measure->id;\n $measurerange->age_min = $val['agemin'][$i];\n $measurerange->age_max = $val['agemax'][$i];\n $measurerange->gender = $val['gender'][$i];\n $measurerange->range_lower = $val['rangemin'][$i];\n $measurerange->range_upper = $val['rangemax'][$i];\n $measurerange->interpretation = $val['interpretation'][$i];\n $measurerange->save();\n }\n }else if( $measure->isAlphanumeric() || $measure->isAutocomplete() ) {\n $val['val'] = $data['val'];\n $val['interpretation'] = $data['interpretation'];\n $val['hl7_identifier'] = $data['hl7_identifier'];\n $val['hl7_text'] = $data['hl7_text'];\n $val['hl7_coding_system'] = $data['hl7_coding_system'];\n for ($i=0; $i < count($val['val']); $i++) { \n $measurerange = new MeasureRange;\n $measurerange->measure_id = $measure->id;\n $measurerange->alphanumeric = $val['val'][$i];\n $measurerange->interpretation = $val['interpretation'][$i];\n $measurerange->hl7_identifier = $val['hl7_identifier'][$i];\n $measurerange->hl7_text = $val['hl7_text'][$i];\n $measurerange->hl7_coding_system = $val['hl7_coding_system'][$i];\n $measurerange->save();\n }\n }\n }\n return $measureIds;\n }", "public function testAddOperation1()\n\t{\n\t\t$this->adder->setA(4);\n\t\t$this->adder->setB(5);\n\t\t$this->adder->add();\n\t\t$this->assertEquals(9, $this->adder->getSum(), 'dont added correctly');\n\t}", "public function testAdd(){\n $adder = new Adder();\n $this->assertEquals(5, $adder->add(2, 3));\n }", "public function getTotalAttribute()\n {\n return $this->ca_test_score + $this->ca_exam_score;\n }", "public function testAddOperation()\n\t{\n\t\t$this->adder->setA(42);\n\t\t$this->adder->add();\n\t\t$this->assertEquals(42, $this->adder->getSum(), 'dont added correctly');\n\t}", "public function testAdd(): void\n {\n $stringCalculator = new StringCalc();\n // The actual result of the method.\n $calcResult = $stringCalculator->Add(\"1,2,5\");\n // Assert that the expected result matches the actual result.\n $this->assertEquals(DEFAULT_RESULT, $calcResult);\n }", "public function testIteration() {\n $array = array(100, 101, 102, 103);\n $this->chartData->add($array);\n foreach ($this->chartData->getData() as $index => $value) {\n $this->assertEquals($array[$index], $value);\n }\n }", "public function testAddPoneyFromField($add, $result){\n $this->poneys->addPoneysFromField($add);\n $this->assertEquals($result, $this->poneys->getCount());\n }", "private function testCollect() {\n $custom_data = array();\n\n // Collect all custom data provided by hook_insight_custom_data().\n $collections = \\Drupal::moduleHandler()->invokeAll('acquia_connector_spi_test');\n\n foreach ($collections as $test_name => $test_params) {\n $status = new TestStatusController();\n $result = $status->testValidate(array($test_name => $test_params));\n\n if ($result['result']) {\n $custom_data[$test_name] = $test_params;\n }\n }\n\n return $custom_data;\n }", "private function score_stress_management(){\r\n\t\t$data = $this->data['stress_management'];\r\n\t\t$q27 = $this->scoreValue(array(1,2,4,5),$data['q27']);\r\n\t\t$q28 = $this->scoreValue(array(5,4,2,1),$data['q28']);\r\n\t\t$q29 = $this->scoreValue(array(5,4,2,1),$data['q29']);\r\n\t\t$q30 = $this->scoreValue(array(5,4,2,1),$data['q30']);\r\n\t\t$q31 = $this->scoreValue(array(1,2,4,5),$data['q31']);\r\n\t\t$q32 = $this->scoreValue(array(1,2,4,5),$data['q32']);\r\n\t\t$q33 = $this->scoreValue(array(5,4,2,1),$data['q33']);\r\n\t\t\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('q27' => array($q27,.17),\r\n\t\t\t\t\t\t'q28' => array($q28,.17),\r\n\t\t\t\t\t\t'q29' => array($q29,.17),\r\n\t\t\t\t\t\t'q30' => array($q30,.17),\r\n\t\t\t\t\t\t'q31' => array($q31,.10),\r\n\t\t\t\t\t\t'q32' => array($q32,.05),\r\n\t\t\t\t\t\t'q33' => array($q33,.17)\t\t\t\r\n\t\t);\t\t\t\t\t\t\t\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\t\r\n\t}", "public function add($test_id = 0, $testcat_id = 0)\n\t{\n\t\t$data['tests'] = $this->testModel->get_all_tests();\n\t\t$data['testcats'] = $this->testCatModel->get_all_testcats();\n\n\t\t$data['page_title'] = lang('add_percentile');\n\t\t$data['new_percentile'] = TRUE;\n\t\t$data['action'] = 'percentile/add_submit';\n\t\t$data = add_fields($data, 'percentile');\n\n\t\t$data['test_id'] = $test_id;\n\t\t$data['testcat_id'] = $testcat_id;\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('percentile_edit_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function getMeasures() {\n return $this->measures;\n }", "public function testSetTotalHAnal() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setTotalHAnal(10.092018);\n $this->assertEquals(10.092018, $obj->getTotalHAnal());\n }", "public function calculateWithPriorityToAdditionAndSubtractionDataProvider() {}", "public function testSum()\n {\n $this->assertEquals(6, $this->object->sum(function ($item) {\n return $item;\n }));\n }", "public function AddTotalPoints($points){\r\n\t\t$this -> totalPoints += $points; \r\n\t }", "static function measure($name='std'){\n\t\t$next = count(self::$measures[$name]);\n\t\tself::$measures[$name][$next]['time'] = microtime(true);\n\t\tself::$measures[$name][$next]['mem'] = memory_get_usage();\n\t\tself::$measures[$name][$next]['peakMem'] = memory_get_peak_usage();\n\t}", "public function testApply() {\n\t\t$group = new Group();\n\t\t$group->add($this->_paths['testClassTest']);\n\t\t$this->report->group = $group;\n\n\t\tComplexity::apply($this->report, $group->tests());\n\n\t\t$results = array_pop($this->report->results['filters'][$this->_paths['complexity']]);\n\t\t$expected = [$this->_paths['testClass'] => $this->_metrics];\n\t\t$this->assertEqual($expected, $results);\n\n\t\tFilters::clear($group);\n\t}", "function show_measure($id, $text = \"\") {\r\n /*\r\n if (!$GLOBALS[UL])\r\n return;\r\n if (!$GLOBALS[UL]->get_prop(\"debug\") || !DEBUG_MEASURE)\r\n return;\r\n if ($text == \"\")\r\n $text = $id;\r\n echo \"<br/>\" . $text . \"=>\" . get_measure($id);\r\n * */\r\n}", "public function test(Learner $estimator, Labeled $dataset, Metric $metric) : float;", "public function testAddAmount() {\n $amount = 1000;\n $date = '3/10/2015';\n $this->assertNull( $this->tranche->addAmount($amount, $date));\n }", "public function addTest($test) {\n array_push($this->tests, $test);\n return $this;\n }", "public function testTotalMonthlyPrice()\n {\n }", "public function dataProviderTestAddTimer()\n {\n return array(\n array('addTimer'),\n array('addPeriodicTimer'),\n );\n }", "public function testAddCommandPositive()\n {\n $this->calc->addCommand();\n }", "public static function createMeasure(Measure $measure): bool;", "public function testTemperatureSummary()\n {\n }", "function testCreateCubeDimensionMeasures()\r\n\t{\r\n\t\t$olap = new Olap($this->dbh);\r\n\t\t$olap->deleteCube($this->testCubeName); // Purge cube if already exists\r\n\r\n\t\t// Get new cube\r\n\t\t$cube = $olap->getCube($this->testCubeName);\r\n\r\n\t\t// Now dynamically create dimension\r\n\t\t$dim = $cube->getDimension(\"country\");\r\n\t\t$this->assertTrue($dim->id > 0);\r\n\t\t$this->assertTrue($this->dbh->ColumnExists(\"facts_\".$cube->id, \"dim_\".$dim->id));\r\n\r\n\t\t// Now dynamically create measure\r\n\t\t$meas = $cube->getMeasure(\"count\");\r\n\t\t$this->assertTrue($meas->id > 0);\r\n\t\t$this->assertTrue($this->dbh->ColumnExists(\"facts_\".$cube->id, \"m_\".$meas->id));\r\n\r\n\t\t// Unload data just to make sure nothing is cached\r\n\t\tunset($cube);\r\n\t\t$cube = $olap->getCube($this->testCubeName);\r\n $dim = $cube->getDimension(\"country\", null, false);\r\n\t\t$this->assertTrue($dim->id > 0); // do not create it if it does not exist (second param)\r\n \r\n $meas = $cube->getMeasure(\"count\", false);\r\n\t\t$this->assertTrue($meas->id > 0); // do not create it if it does not exist (second param)\r\n\r\n\t\t$cube->remove();\r\n\t}", "public function testReportsSkillv1reportscalibration()\n {\n\n }", "public function testAnalyze() {\n\t\t$group = new Group();\n\t\t$group->add($this->_paths['testClassTest']);\n\t\t$this->report->group = $group;\n\n\t\tComplexity::apply($this->report, $group->tests());\n\n\t\t$results = Complexity::analyze($this->report);\n\t\t$expected = ['class' => [$this->_paths['testClass'] => 2.7]];\n\t\tforeach ($this->_metrics as $method => $metric) {\n\t\t\t$expected['max'][$this->_paths['testClass'] . '::' . $method . '()'] = $metric;\n\t\t}\n\t\t$this->assertEqual($expected['max'], $results['max']);\n\t\t$result = round($results['class'][$this->_paths['testClass']], 1);\n\t\t$this->assertIdentical($expected['class'][$this->_paths['testClass']], $result);\n\t}", "function update($units, $total){}", "public function getCATotalAttribute()\n {\n return $this->ca_test_score + $this->ca_exam_score;\n }", "public function calculate_the_addition_of_array_values(array $numbers, float $expectedResult)\n {\n $calculator = new Calculator();\n $calculator->setNumbers($numbers);\n $calculator->setOperation(new Addition);\n\n $this->assertEquals($expectedResult, $calculator->process());\n }", "public function new_measure_for_watch(){\r\n\r\n\t\tif($this->expectsPost(array('watchId'))){\r\n\r\n\t\t\t$this->_bodyData['selected_watch'] = $this->watchId;\r\n\r\n\t\t\t$this->new_measure();\r\n\r\n\t\t}\r\n\t}", "public function testGroupBySum() {\n $this->groupByTestHelper('sum', [10, 18]);\n }", "public function addAssertions($assertions) {\n $total = $this->getAssertions() + $assertions;\n $this->setAssertions($total);\n }", "function measurify() {\r\n\t\t// how do notes that span more than one measure work?\r\n\t\t// we could add ids to measures if needed\r\n\t\t// if we have notes that span measure we may need stuff like <notations><tied type=\"stop\"/></notations>\r\n\t\t$count = 0;\r\n\t\tpreg_match_all('/<part([^\\-][^<>]*?)>(.*?)<\\/part>/is', $this->code, $part_matches, PREG_OFFSET_CAPTURE);\r\n\t\t$part_counter = sizeof($part_matches[0]) - 1;\r\n\t\twhile($part_counter > -1) {\r\n\t\t\t$count++;\r\n\t\t\t$duration_sum = 0;\r\n\t\t\t$part = $part_matches[0][$part_counter][0];\r\n\t\t\t$part_offset = $part_matches[0][$part_counter][1];\r\n\t\t\t$part_length = strlen($part);\r\n\t\t\tpreg_match('/<beat\\-type>(.*?)<\\/beat\\-type>/is', $part, $beat_type_matches);\r\n\t\t\t$beat_type = $beat_type_matches[1];\r\n\t\t\tpreg_match('/<divisions>(.*?)<\\/divisions>/is', $part, $divisions_matches);\r\n\t\t\t$divisions = $divisions_matches[1];\r\n\t\t\t$measure_duration = $beat_type * $divisions;\r\n\t\t\tpreg_match_all('/<note(.*?)<\\/note>/is', $part, $note_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\tif(sizeof($note_matches[0]) > 0) {\r\n\t\t\t\t$pre_notes_of_part = substr($part, 0, $note_matches[0][0][1]);\r\n\t\t\t\t$post_notes_of_part = substr($part, $note_matches[0][sizeof($note_matches[0]) - 1][1] + strlen($note_matches[0][sizeof($note_matches[0]) - 1][0]));\r\n\t\t\t\t$part = str_replace('<attributes', '<measure>\r\n<attributes', $pre_notes_of_part);\r\n\t\t\t\tforeach($note_matches[0] as $index => $value) {\r\n\t\t\t\t\t$note = $value[0];\r\n\t\t\t\t\tpreg_match('/<duration([^<>]*?)>(.*?)<\\/duration>/is', $note, $duration_matches);\r\n\t\t\t\t\t$duration = $duration_matches[2];\r\n\t\t\t\t\t$duration_sum += $duration;\r\n\t\t\t\t\tif($duration_sum >= $measure_duration) {\r\n\t\t\t\t\t\t$note .= '\r\n</measure>\r\n<measure>';\r\n\t\t\t\t\t\twhile($duration_sum >= $measure_duration) {\r\n\t\t\t\t\t\t\t$duration_sum -= $measure_duration;\r\n\t\t\t\t\t\t\t//print('duration_sum: ');var_dump($duration_sum);print('<br>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$count++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$part .= $note . '\r\n';\r\n\t\t\t\t}\r\n\t\t\t\t$part .= str_replace('</part>', '</measure>\r\n</part>', $post_notes_of_part);\r\n\t\t\t\t$this->code = substr($this->code, 0, $part_offset) . $part . substr($this->code, $part_offset + $part_length);\r\n\t\t\t} // could do an else to throw a measure on an empty part if needed\r\n\t\t\t$part_counter--;\r\n\t\t}\r\n\t\t$this->logMsgIf('measures applied', $count);\r\n\t}", "public function testGetPointsWhenAddedMultiple()\n {\n $name = \"Computer Harry Potter\";\n $player = new ComputerPlayer($name);\n $player -> addPoints(12);\n $res = $player -> getPoints();\n $this->assertSame(12, $res);\n\n $player -> addPoints(5);\n $res = $player -> getPoints();\n $this->assertSame(12 + 5, $res);\n\n $player -> addPoints(23);\n $res = $player -> getPoints();\n $this->assertSame(12 + 5 + 23, $res);\n }", "public function actionAddmeasurements(){\n\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif (isset($_POST['UserMeasurements'])) {\n \n $model = UserMeasurements::model()->findByAttributes(array('user_id'=>Yii::app()->user->id,'adddate'=>date('Y-m-d H:i:s', strtotime($_POST['measuredate']))));\n $date = date('Y-m-d H:i:s', strtotime($_POST['measuredate']));\n $weight = $model->weight;\n if($model->adddate == $date){\n \n $model->attributes=$_POST['UserMeasurements'];\n if(!empty($_POST['UserMeasurements']['weight'])){\n $model->setAttribute('weight',$_POST['UserMeasurements']['weight']);\n }else{\n $model->setAttribute('weight',$weight);\n }\n $model->setAttribute('user_id',Yii::app()->user->id);\n $model->setAttribute('adddate',date('Y/m/d H:i:s', strtotime($_POST['measuredate']) ));\n if ($model->save())\n $url = Yii::app()->createUrl('users/userdashboard').\"#measurement\";\n $this->redirect($url);\n //$this->redirect(array('users/userdashboard'));\n //$this->redirect(array('users/userdashboard','id'=>Yii::app()->user->id));\n \n }else{\n $model=new UserMeasurements;\n $model->attributes=$_POST['UserMeasurements'];\n $model->setAttribute('user_id',Yii::app()->user->id);\n $model->setAttribute('adddate',date('Y/m/d H:i:s', strtotime($_POST['measuredate']) ));\n if($model->validate()){\n if ($model->save()) {\n $url = Yii::app()->createUrl('users/userdashboard').\"#measurement\";\n $this->redirect($url);\n //$this->redirect(array('users/userdashboard'));\n //$this->redirect(array('users/userdashboard','id'=>Yii::app()->user->id));\n }\n \n }\n }\n }\n }", "public function extra_measureunitsGet()\n {\n $list = $this->productmeasureunits;\n\n // Would be better a hasmanythrou relation...\n // but, how to attach the right value of conversion_rate?\n $units = $list->map(function ($item, $key) {\n $unit = $item->measureunit;\n $unit->conversion_rate = $item->conversion_rate;\n return $unit;\n });\n\n // Not sure if Product (default or stock) Measure Unit is in database, so remove (if present) and add\n $extra_units = $units->reject(function ($value, $key) {\n return $value->id == $this->measure_unit_id;\n });\n\n return $extra_units; // ->pluck('name', 'id')->toArray();\n }", "public function testCreateCubeForUiTest()\r\n\t{\r\n\t\t$olap = new Olap($this->dbh);\r\n\r\n\t\t// Get new cube\r\n\t\t$cube = $olap->getCube(\"tests/report\");\r\n\r\n\t\t// Record an entry for each quarter\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/index.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t\t'time' => date(\"m/d/Y\", strtotime(\"-4 months\")),\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 100);\r\n\t\t$cube->writeData($measures, $data);\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/about.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t\t'time' => date(\"m/d/Y\", strtotime(\"-3 months\")),\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 75);\r\n\t\t$cube->writeData($measures, $data);\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/about.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t\t'time' => date(\"m/d/Y\", strtotime(\"-2 months\")),\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 50);\r\n\t\t$cube->writeData($measures, $data);\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/about.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t\t'time' => date(\"m/d/Y\", strtotime(\"-1 months\")),\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 25);\r\n\t\t$cube->writeData($measures, $data);\r\n\t}", "public function testReportsSkillv1reportsbenchcount()\n {\n\n }", "public function addSamples(\\iface\\ProbabilityOfSample $value){\n return $this->_add(1, $value);\n }", "Public Function AddToTotal($Stats)\n\t{\n\t\tforeach($this->Total as $Key=>$Value)\n\t\t{\n\t\t\t$this->Total->{$Key} += $Stats->{$Key};\n\t\t}\n\t}", "public function addMetaboxes() {}", "public function testAddResult(): void\n {\n $this->collection->setResult($this->timeResult);\n $this->assertEquals(\n $this->timeResult,\n $this->collection->getResult(TimeResult::class)\n );\n }", "public function addInput(KalturaTestDataBase $input)\r\n\t{\r\n\t\tif($this->input == null)\r\n\t\t{\r\n\t\t\t$this->input = array();\r\n\t\t}\r\n\t\t\r\n\t\tprint(\"Adding input \" . print_r($input->getUniqueKey(), true) . \"\\n\");\r\n\t\t\r\n\t\t//TODO: maybe Unique key is not so uniqe....\r\n\t\t$this->input[$input->getUniqueKey()] = $input;\r\n\t}", "public function addMeasurement($userId, $name, $current, $goal){\n\t\t$sql = 'INSERT INTO measurements(user_id, name, current, goal)\n\t\t\tVALUES (:userId, :name, :current, :goal)';\n\n\t\t$pstmt = $this->db->prepare($sql);\n\t\t$pstmt->bindParam(':userId', $userId);\n\t\t$pstmt->bindParam(':name', $name);\n\t\t$pstmt->bindParam(':current', $current);\n\t\t$pstmt->bindParam(':goal', $goal);\n\n\t\t//count\n\t\treturn $pstmt->execute();\n\t}", "function atTestEnd($test_method, &$test) {\n foreach ($this->expected_counts as $method => $expectation) {\n $test->assert($expectation, $this->getCallCount($method));\n }\n foreach ($this->max_counts as $method => $expectation) {\n if ($expectation->test($this->getCallCount($method))) {\n $test->assert($expectation, $this->getCallCount($method));\n }\n }\n }", "public function testCanAdd()\n {\n self::$apcu = [];\n $this->assertTrue($this->sut->add('myKey','myValue'));\n }", "public function add_unit_property()\n\t {\n\t \t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t$query=$this->ApiModel->add_unit_property($data);\n\t $res=array('msg'=>'success','data'=>$query);\n\t echo json_encode($res);\n\t }", "private function addMetric($type, $name, $value, array $opts = [])\n {\n $this->metrics[$type][] = \n array_merge(\n $this->opts,\n $opts,\n ['name' => $name, 'value' => $value]\n );\n }", "public function test_add_item(): void\n {\n // Arrange\n $user = UserFactory::createOne()->object();\n $collectionLevel1 = CollectionFactory::createOne(['owner' => $user]);\n $collectionLevel2 = CollectionFactory::createOne(['parent' => $collectionLevel1, 'owner' => $user]);\n $collectionLevel3 = CollectionFactory::createOne(['parent' => $collectionLevel2, 'owner' => $user]);\n ItemFactory::createOne(['collection' => $collectionLevel3, 'owner' => $user]);\n\n // Act\n $this->refreshCachedValuesQueue->process();\n\n // Assert\n $this->assertSame(1, $collectionLevel1->getCachedValues()['counters']['items']);\n $this->assertSame(1, $collectionLevel2->getCachedValues()['counters']['items']);\n $this->assertSame(1, $collectionLevel3->getCachedValues()['counters']['items']);\n }", "public function testFunctions(): void\n {\n $evaluator = new Evaluator();\n $evaluator->functions = [\n 'sum' => ['ref' => 'EvaluatorTest::sum', 'arc' => null],\n 'min' => ['ref' => 'min', 'arc' => null],\n ];\n self::assertEquals(\n 5,\n $evaluator->execute('sum(1, 2, 3) + min(0, -1, 4)')\n );\n }", "public function get_accuracy() {\r\n\r\n\t\tif($this->expectsPost(array('measureId', 'watchId'))){\r\n\r\n\t\t\t$this->event->add(ACCURACY_LOAD);\r\n\r\n\r\n\t\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\t\tarray_push($this->_headerData['javaScripts'], \"input.time.logic\", \"time.api\",\r\n\t\t\t\"watch.animation\");\r\n\r\n\t\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t\t$this->_bodyData['selectedWatch'] = $this->watch->getWatch($this->input->post('watchId'));\r\n\t\t\t$this->_bodyData['measureId'] = $this->input->post('measureId');\r\n\r\n\t\t\t$this->load->view('measure/get-accuracy', $this->_bodyData);\r\n\r\n\t\t\t$this->load->view('footer');\r\n\r\n\t\t} else {\r\n\t\t\tredirect('/measures/');\r\n\t\t}\r\n\t}", "public function add(string $name, float $value, array $labels = []): void;", "public function addBenchmark(Benchmark $benchmark)\n {\n $this->benchmarks[] = $benchmark;\n }", "public function testIncreaseWithWithFloat()\n {\n $box = $this->box->increase(20.1);\n static::assertEquals(120, $box->getHeight());\n static::assertEquals(120, $box->getWidth());\n }", "private function setResult() {\n $result = 0;\n foreach ($this->process AS $key => $value) {\n $total = $value['pivot'] * $value['adj']['result'];\n if($key == 0) {\n $result = $result + $total;\n }\n elseif($key == 1) {\n $result = $result - $total;\n }\n else {\n if($key % 2 == 0) {\n $result = $result + $total;\n }\n else {\n $result = $result - $total;\n }\n }\n }\n unset($key, $value, $total);\n return $result;\n }", "public function testAddCustomDelimeter(): void\n {\n $stringCalculator = new StringCalc();\n // The actual result of the method.\n $calcResult = $stringCalculator->Add(\"//|\\n1|2|5\");\n // Assert that the expected result matches the actual result.\n $this->assertEquals(DEFAULT_RESULT, $calcResult);\n }", "public static function measurements()\r\n\t{\r\n\t\t$measurements = array(\r\n\t\t\t'g' => array(\r\n\t\t\t\t'singular_abbr' => _x('g','Grams Abbreviation (Singular)','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => _x('g','Grams Abbreviation (Plural)','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('gram','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('grams','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'kg' => array(\r\n\t\t\t\t'singular_abbr' => _x('kg','Kilograms Abbreviation (Singular)','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => _x('kg','Kilograms Abbreviation (Plural)','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('kilogram','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('kilograms','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'mg' => array(\r\n\t\t\t\t'singular_abbr' => __('mg','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('mg','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('milligram','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('milligrams','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'oz' => array(\r\n\t\t\t\t'singular_abbr' => __('oz','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('oz','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('ounce','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('ounces','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'floz' => array(\r\n\t\t\t\t'singular_abbr' => __('fl oz','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('fl oz','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('fluid ounce','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('fluid ounces','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'cup' => array(\r\n\t\t\t\t'singular_abbr' => __('cup','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('cups','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('cup','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('cups','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'tsp' => array(\r\n\t\t\t\t'singular_abbr' => __('tsp','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('tsp','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('teaspoon','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('teaspoons','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'tbsp' => array(\r\n\t\t\t\t'singular_abbr' => __('tbsp','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('tbsp','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('tablespoon','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('tablespoons','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'ml' => array(\r\n\t\t\t\t'singular_abbr' => __('ml','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('ml','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('milliliter','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('milliliters','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'l' => array(\r\n\t\t\t\t'singular_abbr' => __('l','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('l','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('liter','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('liters','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'stick' => array(\r\n\t\t\t\t'singular_abbr' => __('stick','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('sticks','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('stick','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('sticks','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'lb' => array(\r\n\t\t\t\t'singular_abbr' => __('lb','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('lbs','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('pound','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('pounds','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'dash' => array(\r\n\t\t\t\t'singular_abbr' => __('dash','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('dashes','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('dash','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('dashes','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'drop' => array(\r\n\t\t\t\t'singular_abbr' => __('drop','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('drops','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('drop','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('drops','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'gal' => array(\r\n\t\t\t\t'singular_abbr' => __('gal','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('gals','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('gallon','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('gallons','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'pinch' => array(\r\n\t\t\t\t'singular_abbr' => __('pinch','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('pinches','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('pinch','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('pinches','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'pt' => array(\r\n\t\t\t\t'singular_abbr' => __('pt','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('pt','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('pint','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('pints','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t\t'qt' => array(\r\n\t\t\t\t'singular_abbr' => __('qt','blossom-recipe-maker'),\r\n\t\t\t\t'plural_abbr' => __('qts','blossom-recipe-maker'),\r\n\t\t\t\t'singular' => __('quart','blossom-recipe-maker'),\r\n\t\t\t\t'plural' => __('quarts','blossom-recipe-maker'),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$measurements = apply_filters( 'br_recipe_measurement_units', $measurements );\r\n\r\n\t\treturn $measurements;\r\n\r\n\t}", "protected function logMeasurement( $message ) {\n $message = sprintf( \n '%s %s %s', \n $this->getTimeStamp(),\n $this->id,\n $message\n );\n \n $this->messages .= $message.PHP_EOL; \n }", "public function addResult($file, Blerby_TestRunner_Result $result)\r\n {\r\n $this->aResults[$file][] = $result;\r\n }", "function addData($column, $value)\n {\n $this->addColumns($column);\n $this->data[$this->series]['data'][$column] = $value * 1.0;\n }", "public function getTestsSum(): int\n {\n return count($this->tests);\n }", "function addData($name, $value, $colour)\n {\n $value *= 1.0; // Make sure it's a number\n\n if ($value < 0) {\n return;\n }\n\n $this->data[] = array\n (\n 'name' => $name,\n 'value' => $value,\n 'colour' => $this->hexcol($colour),\n );\n\n $this->total += $value;\n }", "function testValue(){\n\t\t#mdx:value\n\t\t$field = new MyField('description');\n\t\t$input = $field\n\t\t\t->context(['description'=>'This is just a test'])\n\t\t\t->value();\n\t\t#/mdx echo $input\n\t\t$this->assertEquals('This is just a test',$input);\n\t}", "public function bodyMeasures($startDate=\"\") {\n \n if(!$this->apiReady()) {\n $this->error(\"bodyMeasures() - API not ready: \".$this->getError());\n return false;\n }\n \n $results = array();\n $start = \"\";\n \n if(!empty($startDate)) {\n \n if(!is_numeric($startDate)) {\n $startDate = strtotime($startDate);\n }\n \n $start = \"&startdate=$startDate\";\n }\n \n $url = \"/measure?action=getmeas&userid={$this->userId}$start\";\n \n $data = $this->get($url);\n \n if($data === false) {\n $this->error(\"bodyMeasures() - problem requesting data: \".$this->getError());\n return false;\n }\n \n $data = json_decode($data);\n \n if(!isset($data->status)) {\n $this->error(\"bodyMeasures() - result is missing status field.\");\n return false;\n }\n \n if($data->status != 0) {\n $this->error(\"bodyMeasures() - withings error ({$data->status}) - \".$this->errorString($data->status));\n return false;\n }\n \n $samples = array();\n $asof = date(\"Y-m-d H:i:s\", $data->body->updatetime);\n $items = $data->body->measuregrps;\n \n /* \n * walk through the groups of measures, usually weight\n * and heart rate etc. are all taken at the same time.\n * \n */\n \n foreach($items as $idx => $item) {\n \n $stamp = date('Y-m-d H:i:s', $item->date);\n $mode = \"manual\";\n \n if(($item->attrib == 0)||($item->attrib == 1)) {\n $mode = \"device\";\n }\n \n /* pick off the actual measures */\n\n foreach($item->measures as $jdx => $datum) {\n \n $value = $datum->value;\n $unit = $datum->unit;\n $type = (int)$datum->type;\n \n /* $unit gives us decimal place adjustment */\n \n if($unit < 0) {\n $value /= (pow(10, abs($unit)));\n } else if($unit > 0) {\n $value *= (pow(10, $unit));\n }\n \n /* type can be converted into a measureent type */\n \n switch($type) {\n \n case 1: \n $type = \"weight\";\n break;\n\n case 4: \n $type = \"height\";\n break;\n\n case 5: \n $type = \"fat_free_mass\";\n\n case 6: \n $type = \"fat_ratio\";\n break;\n\n case 8: \n $type = \"fat_mass_weight\";\n break;\n\n case 9: \n $type = \"diastolic_blood_pressure\";\n break;\n\n case 10: \n $type = \"systolic_blood_pressure\";\n break;\n\n case 11: \n $type = \"heart_pulse\";\n break;\n\n case 54: \n $type = \"sp02\";\n break;\n \n }\n \n /* ok we have everything we need to make a sample */\n \n $sample = (object)array(\n 'stamp' => $stamp,\n 'mode' => $mode,\n 'type' => $type,\n 'value' => $value\n );\n \n $samples[] = $sample;\n }\n \n }\n \n $results = (object)array(\n \"asof\" => $asof,\n \"data\" => $samples\n );\n \n /* pass back */\n \n return $results;\n }", "public function testReportsSkillv1reportscalibrationid()\n {\n\n }", "function __construct($test_line)\n\t{\n\t\t$this->text = trim($test_line);\n\t\tif(strstr($test_line, 'ok') !== false)\n\t\t{\n\t\t $this->has_ok = true;\n\t\t}\n\t\tif(strstr($test_line, 'subtests') !== false || strstr($test_line, 'skipped') !== false)\n\t\t{\n\t\t $this->special_tags = true;\n\t\t}\n\t\tif(strstr($test_line, 'bonus') !== false)\n\t\t{\n\t\t $this->has_bonus = true;\n\t\t}\n\t\t\n\t\t$pos = strpos($this->text, ':');\n\t\t\n\t\tif($pos !== false && $pos != 0)\n\t\t{\n\t\t $tags = trim(substr($this->text, $pos+1));\n\t\t \n\t\t\t$key = substr($this->text, 0, $pos);\n\t\t\t//$tags = substr($this->text, $pos+1);\n\t\t\t\n\t\t\t//if(trim($tags) == ';') return;\n\t\t\t\n\t\t\tif($this->special_tags) return; // if no_tags then dont add this unit test to stats\n\t\t\t\n\t\t\tif(isset(UnitTest::$success_count) && array_key_exists($key, UnitTest::$success_count))\n\t\t\t{\n\t\t\t\tif($this->has_ok)\n\t\t\t\t{\n\t\t\t\t\tUnitTest::$success_count[$key]++;\n \n\t\t\t\t}\n \n UnitTest::$all_count[$key]++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->has_ok)\n\t\t\t\t{\n\t\t\t\t\tUnitTest::$success_count[$key]=1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tUnitTest::$success_count[$key]=0;\n\t\t\t\t}\n \n UnitTest::$all_count[$key]=1;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function measureunitsGet()\n // used by: public function getMeasureunitsAttribute()\n { \n $list = $this->productmeasureunits;\n\n // Would be better a hasmanythrou relation...\n // but, how to attach the right value of conversion_rate?\n $units = $list->map(function ($item, $key) {\n $unit = $item->measureunit;\n $unit->conversion_rate = $item->conversion_rate;\n return $unit;\n });\n\n // Not sure if Product (default or stock) Measure Unit is in database, so remove (if present) and add\n $extra_units = $units->reject(function ($value, $key) {\n return $value->id == $this->measure_unit_id;\n });\n\n // Deault unit first\n return $extra_units->prepend( $this->measureunit ); // ->pluck('name', 'id')->toArray();\n }", "public function test_get_units() {\n $units = $this->element->get_units();\n ksort($units);\n $this->assertEquals($units, array(1 => get_string('seconds'), 60 => get_string('minutes'),\n 3600 => get_string('hours'), 86400 => get_string('days'), 604800 => get_string('weeks')));\n }", "public function testReportsSkillv1reportscalibrationidskillsid2()\n {\n\n }", "public static function __getTotalUnitFail(){\r\n return !is_null(self::$_totalUnitsFail) ? array_sum(self::$_totalUnitsFail) : 0;\r\n }", "public function testGetMarkAverage()\n {\n $affectedProgram = $this->em->getRepository('AppBundle:AffectedProgram')->findOneBy(array('name' => 'Francais'));\n $sequence1 = $this->em->getRepository('AppBundle:Sequence')->findOneBy(array('name' => '1er Trimestre'));\n //Get marks of a student_1 6em from fixture and calculate their average\n $student_1_6em1 = $this->em->getRepository('AppBundle:Student')->findOneBy(array('name' => 'Eleve 6em 1'));\n $marks = $student_1_6em1->getMarksByAffectedProgramAndSequence($affectedProgram, $sequence1, 'Devoir');\n $average = $this->utils->getMarksAverage($marks);\n $this->assertEquals($average, 10.00);\n }", "public function test_queries()\n\t{\n\t\t$this->setup_options_obj($input);\n\t\t$rpt = new Reports_Model($this->options);\n\t\t$rpt->set_option('start_time', 0);\n\t\t$rpt->set_option('end_time', time());\n\t\t$result = $rpt->test_summary_queries();\n\t\techo \"<pre>\\n\";\n\t\t$cnt = count($result);\n\t\techo $cnt . \" total different queries\\n\";\n\t\t$total_rows = 0.0;\n\t\tforeach ($result as $query => $ary) {\n\t\t\techo $query . \"\\n\";\n\t\t\tprint_r($ary);\n\t\t\t$total_rows += $ary['rows'];\n\t\t}\n\t\t$avg_rows = $total_rows / $cnt;\n\t\techo \"Average row-count: $avg_rows\\n\";\n\t\techo \"</pre>\\n\";\n\t\tdie;\n\t}", "public function testAdd()\n {\n $this->add('data', 'stub');\n $this->add('meta', 'stub');\n\n $this->assertEquals($this->data, ['data' => 'stub', 'meta' => 'stub']);\n }", "public function testGetMetricOrDefault(): void\n {\n $this->collection->setResult($this->timeResult);\n $this->assertEquals(100, $this->collection->getMetricOrDefault('UnknownClass', 'barbar', 100));\n }", "public function setYOffset($measure, $unit = null);", "public function addCounts( $value){\n return $this->_add(6, $value);\n }" ]
[ "0.57549894", "0.55907315", "0.5539389", "0.55329645", "0.5356713", "0.5352505", "0.5290971", "0.5281737", "0.52726936", "0.5245316", "0.52375513", "0.52367014", "0.5235069", "0.52315944", "0.5224261", "0.52114034", "0.5206639", "0.5171178", "0.5166256", "0.51408285", "0.51288563", "0.5091759", "0.50891995", "0.50587225", "0.50520307", "0.5051447", "0.50369567", "0.5035592", "0.50314367", "0.5031094", "0.50275326", "0.50215805", "0.5008069", "0.5004102", "0.49841046", "0.49811092", "0.49767008", "0.49308893", "0.49296388", "0.492685", "0.49216065", "0.48996124", "0.488087", "0.48691773", "0.4866811", "0.485921", "0.48587126", "0.48158732", "0.48054105", "0.4804007", "0.47754195", "0.47746634", "0.4702156", "0.4695811", "0.46914518", "0.46848932", "0.4684197", "0.46747327", "0.46587467", "0.465842", "0.46459362", "0.46355635", "0.46284142", "0.46178496", "0.46156225", "0.46141273", "0.4613976", "0.46135244", "0.4610616", "0.46039963", "0.46007037", "0.4587623", "0.45814934", "0.4566147", "0.4549787", "0.45495895", "0.45418286", "0.45327476", "0.45149", "0.45130745", "0.45059916", "0.45035446", "0.44907784", "0.4490136", "0.44889292", "0.44887912", "0.44883493", "0.44815376", "0.44807127", "0.44751465", "0.44630852", "0.4462257", "0.4447764", "0.44460344", "0.44442877", "0.44420037", "0.44364724", "0.4434736", "0.44338825", "0.44270748", "0.44267803" ]
0.0
-1
Wandle das Objekt in ein Array um.
public function toArray();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }", "private function get_object_array($array){\n \n }", "private function createArrayable()\n {\n $this->data = $this->data->toArray();\n\n $this->createArray();\n }", "public function objectToArray()\n {\n return get_object_vars($this);\n }", "private function prepareObjectArray(){\n\t//scorro l' array $this->objarr settando su ciascun oggetto gli attributi children\n\tforeach($this->objarr as $key=>$object){\n\t\t//echo \"-\".$object->getAppendToIndex().\"<br />\";\n\t\t\n\t\tif(($appind=$object->getAppendToIndex()) != \"\"){\n\t\t\n\t\t$object->setIntegrated(true); //indico che l' oggetto è stato incluso come figlio di un altro.\t\n\t\t\n\t\t $objparent=$this->objarr[$appind];\n\t\t\t$objparent->appendChild($object);\t\n\t\t\t//echo $objparent->getIndex();\n\t\t}\n\t}\n}", "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "public function & toArray()\n\t{\n\t\t$x = new ArrayObject($this->data);\n\t\treturn $x;\n\t}", "abstract protected function toArray();", "public function toArray() : array{\n return get_object_vars( $this );\n }", "function toArray($object);", "public function valoracionToArray(){\n\t\t\t$this->arrayValor = array(\n\t\t\t\t\"user\"=> $this->user,\n\t\t\t\t\"object\"=> $this->object,\n\t\t\t\t\"valor\"=>$this->valor\n\t\t\t\t);\n\t\t}", "public function getArrayCopy()\n {\n return $this->object;\n }", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "function toArray() ;", "function toArray() ;", "public function getArrayCopy(){\n return get_object_vars($this);\n }", "public function getArrayCopy(){\n return get_object_vars($this);\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "function toArray ($obj=null) {\n\t\t\tif (is_object($obj)) $obj = (array)$obj;\n\t\t\tif (is_array($obj)) {\n\t\t\t\t$new = array();\n\t\t\t\tforeach ($obj as $key => $val) {\n\t\t\t\t\t$class = get_class($this);\n\t\t\t\t\t$k = $key;\n\t\t\t\t\t$fkey = trim( str_replace( $class,\"\",$k));\n\t\t\t\t\tif( $fkey == \"connection\" || $fkey == \"errors\" || $fkey == \"errorCount\" ){\n\t\t\t\t\t\t//dont add\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$new[$fkey] = $this->toArray($val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$new = $obj;\n\t\t\t}\n\t\t\treturn $new;\n\t\t}", "public function asArray(){\n return $this->data;\n }", "function get_array(){\n return $this->getArrayCopy();\n }", "function get_array(){\n return $this->getArrayCopy();\n }", "public function getArrayCopy()\n {\n \treturn get_object_vars($this);\n }", "public function toArray() {\n return json_decode(json_encode($this), true);\n }", "public function toArray() :array {\n return get_object_vars($this);\n }", "public function getInternalArray() {}", "function objectIntoArray ($object,&$array) {\n $oarray = get_object_vars($object);\n while(list($key,$val)=each($oarray)) {\n $array[$key] = $val;\n }\n}", "function object_array($object){\r\n\t$table_name = $object->gettablename();\r\n\t$arr_column = $object->getcolumnnames();\r\n\t$arr_object = array();\r\n\t$arr = $object->searchbyobject(NULL, NULL, TRUE);\r\n\r\n\tswitch($table_name){\r\n\t\tcase \"itpedido_conf\": $table_name = \"itpedidoconf\";\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif(is_array($arr)){\r\n\t\tforeach($arr as $row){\r\n\t\t\t$ob = objectbytable($table_name, NULL, $object->getconnection());\r\n\t\t\tforeach($arr_column as $column){\r\n\t\t\t\t@call_user_func(array($ob, \"set\".$column), $row[$column]);\r\n\t\t\t}\r\n\t\t\t$arr_object[] = $ob;\r\n\t\t}\r\n\t}\r\n\treturn $arr_object;\r\n}", "public function toArray()\r\n\t{\r\n\t\treturn $this->m_data;\r\n\t}", "public function getArrayCopy(){\n return get_object_vars($this);\n }", "public function getArrayCopy(){\n return get_object_vars($this);\n }", "public function getArrayCopy()\r\n {\r\n \treturn get_object_vars($this);\r\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function asArray()\r\n {\r\n return $this->data;\r\n }", "public function getAsArray();", "public function getArrayCopy() \n {\n return get_object_vars($this->album);\n }", "public function toArray()\n {\n\n }", "public function toArray() // untested\n {\n return $this->data;\n }", "public function toArray()\n {\n\n\n return $this->data;\n }", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "public function getArrayCopy() \n {\n return get_object_vars($this);\n }", "public function getArrayCopy() \n {\n return get_object_vars($this);\n }", "public function getArrayCopy() \n {\n return get_object_vars($this);\n }", "public function toArray()\r\n {\r\n return $this->data;\r\n }" ]
[ "0.6667859", "0.6601735", "0.63734484", "0.6352802", "0.63129896", "0.6243303", "0.6238651", "0.61987364", "0.6157543", "0.61566037", "0.6155527", "0.6148893", "0.6130941", "0.6129876", "0.61292124", "0.61292124", "0.610069", "0.610069", "0.608758", "0.608758", "0.60874826", "0.60874826", "0.60874826", "0.60874826", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60869926", "0.60345185", "0.6032463", "0.60043865", "0.60043865", "0.59901226", "0.5983536", "0.5968952", "0.59661627", "0.59660995", "0.5964601", "0.59603745", "0.59547806", "0.59547806", "0.59539926", "0.5948229", "0.5948229", "0.59453857", "0.59450483", "0.594399", "0.593936", "0.592862", "0.5913414", "0.5902842", "0.58934724", "0.58934724", "0.58934724", "0.58904153" ]
0.59858924
66
Alias, damit Twig auf pId zugreifen kann.
public function getPId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIdHtml($id = null)\n {\n if ($id == null) {\n $id = $this->id;\n }\n\n if (preg_match('/^plg[0-9]+$/', $id)) {\n return '';\n }\n\n return \" id=\\\"$id\\\"\";\n }", "function ID($id)\n {\n if (false !== $ctrl = \\ClickBlocks\\MVC\\Page::$current->view->get($id)) return $ctrl->attr('id');\n }", "public function getViewId();", "function GetPageAliasFromID( $id )\n\t{\n\t\tglobal $gCms;\n\t\t$db = &$gCms->GetDb();\n\n\t\tif (!is_numeric($id) && strpos($id,'.') == TRUE && strpos($id,',') == TRUE)\n\t\t{\n\t\t\treturn $id;\n\t\t}\n\n\t\t$params = array($id);\n\t\t$query = \"SELECT content_alias FROM \".cms_db_prefix().\"content WHERE content_id = ?\";\n\t\t$row = $db->GetRow($query, $params);\n\n\t\tif ( !$row )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $row['content_alias'];\n\t}", "public function getViewId()\n {\n }", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "public function getName()\n {\n return 'ic_core_field.twig.extension.aliasToLabel';\n }", "protected function defineNameId(){\n list($name,$id)=$this->resolveNameID();\n $this->_id=$this->htmlOptions['id']=$id;\n\t\t$this->_name=$this->htmlOptions['name']=$name;\n }", "public function view( $id = null )\n\t{\n\t\t$%Alias = new %Model();\n\t\t$%Alias = $%Alias->findItem( array( 'Id = '.$id ) );\n\t\tif ( !$%Alias->Id )\n\t\t{\n\t\t\t$this->halt();\n\t\t}\n\t\t\n\t\t$this->getView()->set( '%Alias', $%Alias );\n\t\treturn $this->getView()->render();\n\t}", "public function getPageId() {}", "public function getPageId() {}", "function id():string {return $this->_p['_id'];}", "function getLabelFromId($id) {\n return 'field_'.$id;\n }", "function pixelgrade_posts_container_id( $location = array() ) {\n\t\t$posts_container_id = pixelgrade_get_posts_container_id( $location );\n\t\tif ( ! empty( $posts_container_id ) ) {\n\t\t\techo 'id=\"' . esc_attr( $posts_container_id ) . '\"';\n\t\t}\n\t}", "function page_template($id_only=false) {\n\t\t\t$id = 'page_template';\n\t\t\tif($id_only) {\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t\treturn 'jQuery(\"#'.$id.' option:selected\").val()';\n\t\t}", "public function idAction($tagId = null)\n\t{\n\t\t$tag = $this->tags->find($tagId);\n\t\t$tagName = $tag->tag;\n\t\t\n\t\t$tagsQuestions = $this->tags->getQuestonsWithTag($tagName);\n\t\t\t\n\t\t$this->theme->setTitle(\"Visa tagg\");\n\t\t$this->views->add('stack/view-tags', [\n\t\t\t'tag' => $tag,\n\t\t\t'tagsQuestions' => $tagsQuestions\n\t\t]);\n\n\t}", "protected function k_pidSuffix():string {return 'id';}", "protected function getCurrentPageIdFromRootTemplate() {}", "public function idAction($id){\n\t\t/*$posts = $this->tags->query('*','postDetails')\n\t\t\t\t\t->where('anax_postDetails.tag_id = '.$id)\n\t\t\t\t\t->execute();*/\n\t\t$tag = $this->tags->query('anax_tags.name','tags')\n\t\t\t\t\t->where('anax_tags.id = '.$id)\n \t\t\t\t->execute(true);\n\t\t\n\t \t$posts = $this->tags->query('*, anax_postDetails.id as detail_id, anax_user.id as user_id','postDetails')\n\t \t\t\t\t->where('anax_postDetails.tag_id = '.$id)\n \t\t\t->leftJoin('post','anax_postDetails.post_id = anax_post.id')\n \t\t\t->leftJoin('user','anax_post.created_by_user = anax_user.id')\n \t\t\t\t->execute();\n\n \t$this->theme->setTitle('View Tag');\n \t$this->views->add(\n \t\t'tags/view',\n \t\t[\n \t\t\t'title' => 'All questions for <span class=\"text-primary\">'.$tag->name.'</span>',\n \t\t\t'posts' => $posts\n \t\t],\n \t\t'default_page'\n \t);\n\t}", "static function post_tag($p) {\n\t\techo '<a href=\"' . get_permalink($p->ID) . '\">' . $p->post_title . '</a>';\n\t}", "private static function _id($id)\n {\n return ($id == Null)?Null:' id=\"'.$id.'\"';\n }", "public function id()\n {\n return 'idlikethis-post-control';\n }", "function template_tag_handler( $id = \"\", $pos = \"\", $dload = \"\", $play = \"\", $list = \"\" ) {\n\t\t\t\n\t\t\t$this->putTag_runCount++;\n\t\t\tif ( $this->theSettings['disable_template_tag'] == \"true\" ) { return; }\n\t\t\t\n\t\t\tif ( !empty($id) && !is_numeric($id) ) {\n\t\t\t\t$this->external_call = true;\n\t\t\t\t$shortcodes_return = do_shortcode( $id );\n\t\t\t\t$this->external_call = false;\n\t\t\t}\n\t\t\techo $shortcodes_return;\n\t\t\treturn;\t\t\t\n\t\t}", "public function alias($id, $alias);", "public function show($id)\n {\n return 'pagina di visualizzazione singolo post Backoffice. Post con id' . $id ;\n }", "public function getPatternTemplate(string $id) : string;", "public function viewProductAction($id) {\r\n $em=$this->getDoctrine()->getManager();\r\n $product=$em->getRepository('HologramBundle:Product')->find($id);\r\n return $this->render('HologramBundle:Front:oneProduct.html.twig',array('p'=>$product)); \r\n }", "function createSimpleLink($idName) {\n echo '<a href=\"index.php\" id=\"' . $idName . '\" class=\"nested\">homepage</a>';\n }", "function id($name, $echo = true) {\n $id = sprintf('%s_settings_%s', __CLASS__, $name);\n if ($echo) {\n echo $id;\n } else {\n return $id;\n }\n }", "public function render_slider_id( $post ){\r\n \r\n $vars = array();\r\n $vars['post_name'] = $post->post_name;\r\n \r\n $this->view->render('slider-id.php', $vars);\r\n\r\n }", "public function outputId()\n\t{\n\t\techo App::e($this->id);\n\t}", "public function getHtmlId() {\n return Html::getId('draggableviews-table-' . $this->view->id() . '-' . $this->view->current_display);\n }", "function showFilm($Id) {\n\t$loader = new Twig_Loader_Filesystem('views');\n\t$twig = new Twig_Environment($loader);\n\t$film = getFilmById($Id); // Fonction importé depuis film_model.php\n\t$years = listYearsForNav();\n\t$genders = listGendersForNav();\n\t$owners = listOwnersForNav();\n\t// print_r($film); // DEBUG HERE\n\t\n\techo $twig->render('film_view.twig', array('film' => $film, 'years' => $years, 'genders' => $genders, 'owners' => $owners));\n}", "function tincan_lrs_statement_view($id) {\n $content = \"\";\n $entity = entity_load('tincan_statement', array($id));\n \n if (!empty($entity)) {\n $controller = entity_get_controller('tincan_statement');\n $content = $controller->view($entity);\n }\n else {\n $content = '<p>No statement found for drupal id: ' . $id . '</p>';\n }\n \n drupal_set_title($entity[$id]->label());\n\n return $content;\n\n}", "public function id_tarjeta();", "static function lang_post_id($id) {\n\t\tglobal $post;\n\t\t// make this work for any post type\n\t\tif ( isset($post->post_type) ) {\n\t\t\t$post_type = $post->post_type;\n\t\t} else {\n\t\t\t$post_type = 'post';\n\t\t}\n\n\t\tif(function_exists('icl_object_id')) {\n\t\t\treturn icl_object_id($id, $post_type,true);\n\t\t} else {\n\t\t\treturn $id;\n\t\t}\n\t}", "public function viewAction($id) {\n\n return Parent::render($this->templateName,dirname(__DIR__) . '/views/category/views.tpl.php', $id);\n\n\n\n\n }", "public function index($post_id)\n {\n return 'post_id' . $post_id;\n }", "function getTemplateData($id)\r\n {\r\n }", "public function getIdParameter(): string;", "protected function determinePageId() {}", "protected function determinePageId() {}", "public function id() { return $this->post->ID; }", "private function getPageId()\n {\n return $this->getRequest()->getParam('id') ?: $this->getRequest()->getParam('page_id');\n }", "function smarty_modifier_alias($string, $params = null, $query = null, $fragment = null): string {\n if (!is_null($fragment) && substr($fragment, 0, 1) !== '#') {\n $fragment = '#'.$fragment;\n }\n\n $f3 = \\Base::instance();\n\n return GK_SITE_BASE_SERVER_URL.$f3->alias($string, $params ?? [], $query).$fragment;\n}", "static function html_id($name)\r\n\t{\r\n\t\tglobal $smcFunc;\r\n\t\t\r\n\t\t$name = str_replace(array('%3A', '+', '%'), array(':', '_', '.'), urlencode(un_htmlspecialchars($name)));\r\n\t\t\r\n\t\twhile($name[0] == '.')\r\n\t\t\t$name = substr($name, 1);\r\n\t\treturn $name;\r\n\t}", "public function getPageId() {\r\n\t\treturn $this->_id;\r\n\t}", "public function printTags($id){\n\n $consortia = DB::connection('pgsql')->select('SELECT * FROM consortia where id = '. $id);\n\n $consortium = (array) $consortia[0];\n\n\n\n return view('templates.tags')->with('consortium', $consortium);\n }", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "public function getElementId() {}", "function entityName( $id ) ;", "public function getAlias(): string;", "function view( $id = NULL )\n {\n\tif ( !is_numeric( $id ) ) {\n\t $result = $this->_get( 'id' );\n\t $data = $this->page_settings( 'edit', $result, 'result', 'Edit', 'mdl_auth' );\n\t} else {\n\t $result = $this->get_where( $id );\n\t $data = $this->page_settings( 'edit', $result, 'result', 'Edit', 'mdl_auth' );\n\t}\n\n\t$this->templates->frontend( $data );\n }", "function __construct($id=false, $language=false){\n parent::__construct($id, $language);\n parent::registerMetadata('template', 'inherit');\n }", "public function getReplacementId($name);", "function getMention(): string\n\t{\n\t\treturn \"<@\".$this->id.\">\";\n\t}", "public function getTemplateId() : string {\n return $this->templateId;\n }", "public function getName()\n {\n return 'siciarek_js_trans_twig_extension';\n }", "public function getId()\n\t{\n\t\treturn $this->get('templateid');\n\t}", "function smarty_function_itemname($params, $smarty)\n{\n if(isset($params['id'])){\n return aioncp::GetInstance()->get_item_name($params['id']);\n }\n\n}", "public function show(/*$id*/)\n {\n return 'show';\n }", "function get_buzz_id($aliasname) {\n $buzz_page_alias = get_option(\"buzz_page_alias\");\n return $buzz_page_alias[$aliasname];\n}", "function tpl_key ($key) {\n \n return AUTHORING ? \"data-designmode=\\\"$key\\\"\" : '';\n \n }", "public function suprimerId($id)\n {\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "public function show($id)\n {\n return \"show\" . $id;\n }", "public function show($id)\n {\n return 'show'.$id;\n }", "function url($id)\r\n\t{\r\n\t\treturn '';\r\n\t}", "function wpex_footer_builder_id() {\n\tif ( class_exists( 'WPEX_Footer_Builder' ) && $id = WPEX_Footer_Builder::footer_builder_id() ) {\n\t\t$translated_id = wpex_parse_obj_id( $id, 'page' ); // translate\n\t\treturn $translated_id ? $translated_id : $id; // if not translated return original ID\n\t}\n}", "private function id_tag( $prependix = null, $appendix = null )\n {\n $id = $this->get_full_id( $prependix, $appendix );\n if($this->item_id) $id .= '-' . $this->item_id;\n\n echo 'id=\"' . $id . '\"';\n }", "public function getPageId()\n {\n return $this->page_id;\n }", "public function getName()\n {\n return 'adminlist_twig_extension';\n }", "public function id(): string;", "public function id(): string;", "protected function getLabel()\n\t{\n\t\treturn str_replace($this->id, $this->id . '_id', parent::getLabel());\n\t}", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function admin_view($id = null){\n\n\t\t\t// CSRF Protection\n\t\t\tif (!isset($this->params['named']['token']) || ($this->params['named']['token'] != $this->params['_Token']['key'])) {\n\t\t\t\t$blackHoleCallback = $this->Security->blackHoleCallback;\n\t\t\t\t$this->$blackHoleCallback();\n\t\t\t}\n\t\t\tif(!empty($id) && $this->EmailTemplate->hasAny(array('EmailTemplate.id' => $id))){\n\t\t\t\t$this->set('title_for_layout', __('View Email Template', true));\n\t\t\t\t$this->data = $this->EmailTemplate->read(null, $id);\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash(__('Invalid email template id.', true), 'admin_flash_bad');\n\t\t\t\t$this->redirect($this->referer());\n\t\t\t}\t\n\t\t}", "function template_group_name($params,&$smarty)\n {\n extract($params);\n\n $name = group_name($id);\n return $name;\n }", "public function show($id)\n {\n return \"Just \".$id;\n }", "function jet_woo_builder_modify_template_id( $template_id ) {\n\t\t\treturn apply_filters( 'wpml_object_id', $template_id, jet_woo_builder_post_type()->slug(), true );\n\t\t}", "function gen_editalias_page(&$tpl, $edit_id)\r\n{\r\n\tglobal $sql;\r\n\r\n\r\n\t//Get data from sql\r\n\tlist($domain_id) = get_domain_default_props($sql, $_SESSION['user_id']);\r\n\t$res = exec_query($sql, \"select * from domain_aliasses where alias_id=? and domain_id = ?\", array($edit_id, $domain_id));\r\n\r\n\tif ($res->RecordCount() <= 0 ) {\r\n\t\t$_SESSION['aledit'] = '_no_';\r\n \theader( 'Location: manage_domains.php' );\r\n \tdie();\r\n\t}\r\n\t$data = $res->FetchRow();\r\n\t$alias_ip_id = $data['alias_ip_id'];\r\n\r\n\t// Get ip -data\r\n\t$ipres = exec_query($sql, \"select * from server_ips where ip_id=?\", array($alias_ip_id));\r\n\t$ipdat = $ipres->FetchRow();\r\n\t$ip_data = $ipdat['ip_number'].' ('.$ipdat['ip_alias'].')';\r\n\r\n\tif(isset($_POST['uaction']) && ($_POST['uaction'] == 'modify'))\r\n\t\t$url_forward = $_POST['forward'];\r\n\telse\r\n\t\t$url_forward = $data['url_forward'];\r\n\r\n\t// Fill in the fileds\r\n\t$tpl -> assign(\r\n array(\r\n \t'ALIAS_NAME' => $data['alias_name'],\r\n\t\t\t\t\t\t'DOMAIN_IP' => $ip_data,\r\n\t\t\t\t\t\t'FORWARD' => $url_forward == 'no' ? '' : $url_forward,\r\n\t\t\t\t\t\t'ID' => $edit_id\r\n\t\t\t\t\t)\r\n\t\t\t);\r\n\r\n}", "function id() {\n $function = 'get' . get_class($this) . 'Id';\n return $this->$function();\n }", "public function pageRoute($id)\n {\n return 'page_page_show_'.$id;\n }", "public function getAlias() : string;", "static function id(): string { return 'website'; }", "static function lang_post_id( $id ) {\n\t\tif ( function_exists( 'icl_object_id' ) ) {\n\t\t\tglobal $post;\n\t\t\t// make this work for any post type\n\t\t\tif ( isset( $post->post_type ) ) {\n\t\t\t\t$post_type = $post->post_type;\n\t\t\t} else {\n\t\t\t\t$post_type = 'post';\n\t\t\t}\n\n\t\t\treturn icl_object_id( $id, $post_type, true );\n\t\t} else {\n\t\t\treturn $id;\n\t\t}\n\t}", "public function getAlias();", "public function getAlias();", "public function getAlias();", "public function getAlias();", "function idOrSlug(array $resource): string\n{\n global $config;\n return htmlspecialchars($config[\"use_url_rewrite\"] ? $resource[\"slug\"] : $resource[\"id\"]);\n}", "public function getPageID(){\n\t\t\n\t\tif(self::USE_SPLASH)\n\t\t{\n\t\t\t$this->setSplashID();\n\t\t}\n\t\telse $this->setPageID();\n\t\t\n\t}", "public function output_id_column_content( $column_name, $id ) {\n\t\tif ( $column_name === 'wps_post_id' ) {\n\t\t\techo $id;\n\t\t}\n\t}", "function xh_templateMapping($name)\r\n\t{\r\n\t}", "function pagename($id)\n{\n\t$pagename=mysql_fetch_array(mysql_query(\"select page_name from manage_pagename where pn_id='$id'\"));\n\treturn $pagename['page_name'];\n\t}", "public function getReplacementID();", "function accountViewTemplate()\n {\n return $this->AccountIdentifier;\n }", "function person_link(stdClass $person, string $id = 'id'): string {\n\t$text = $person->first_name . ' ' . $person->last_name;\n\t$title = sprintf('View %s\\'s record', $text);\n\t$options = [\n\t\t'title' => $title,\n\t];\n\t$path = 'person/view/' . $person->{$id};\n\treturn create_link($path, $text, $options);\n}", "public function url()\n {\n return backpack_url(\"/page-template/{$this->id}/edit\");\n }", "public function getViewId()\n {\n return $this->view_id;\n }", "function column_template_name($item) {\n $arr_params = array( 'template' => $item->template_id, 'catpdf_action' => 'edit' );\n $editlink = add_query_arg($arr_params);\n\t\t\n $arr_params = array( 'template' => $item->template_id, 'catpdf_action' => 'delete' );\n $deletelink = add_query_arg($arr_params);\n\t\t\n $actions = array(\n 'edit' => '<a href=\"' . $editlink . '\">Edit</a>',\n 'delete' => '<a href=\"' . $deletelink . '\">Delete</a>'\n );\n return sprintf('<strong><a href=\"' . $editlink . '\" title=\"Edit\">%1$s</a></strong> %2$s', $item->template_name, $this->row_actions($actions));\n }" ]
[ "0.58233166", "0.5753074", "0.56468546", "0.5468302", "0.5424321", "0.54222184", "0.5420809", "0.5415787", "0.54107136", "0.53836846", "0.53829163", "0.53718877", "0.53683823", "0.5358299", "0.53443015", "0.532863", "0.5288122", "0.52872103", "0.528619", "0.5279452", "0.52771974", "0.5223687", "0.5220252", "0.5212971", "0.5207337", "0.5187697", "0.5183879", "0.51750517", "0.5142821", "0.5131486", "0.5103394", "0.51016915", "0.5094273", "0.5058414", "0.5053438", "0.5048356", "0.5034697", "0.50239044", "0.5023777", "0.5021716", "0.5021664", "0.5021664", "0.5017695", "0.50157714", "0.50091285", "0.5008079", "0.50053734", "0.49953437", "0.49939024", "0.49879146", "0.49878928", "0.4985781", "0.498415", "0.4969453", "0.49678537", "0.49677637", "0.49642828", "0.4959958", "0.49576274", "0.49573877", "0.49515015", "0.4948549", "0.49460226", "0.49448994", "0.49377722", "0.4931225", "0.4930456", "0.49301368", "0.4929358", "0.49242827", "0.49213654", "0.49127647", "0.49118996", "0.49118996", "0.49092504", "0.490606", "0.4905515", "0.49019632", "0.4901523", "0.48946002", "0.48932043", "0.48914137", "0.48904005", "0.4890024", "0.48857677", "0.488263", "0.48785803", "0.48785803", "0.48785803", "0.48785803", "0.48777175", "0.48770225", "0.4876467", "0.48755643", "0.48717976", "0.48703846", "0.48640898", "0.4859268", "0.4854803", "0.48520803", "0.48475507" ]
0.0
-1
=============Opens the connection to the data base
function sql(){ $this->conn = mysql_connect($this->hostname, $this->username , $this->password); mysql_select_db($this->dbName, $this->conn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function open_db_connection() {\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // cgecking if the connection has errors\n if($this->connection->connect_errno) {\n die(\"Database connection failed\" . $this->connection->connect_error);\n }\n }", "private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }", "private function openconnection(){\r\n $options = array(\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\r\n\r\n // PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n // PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n // PDO::ATTR_EMULATE_PREPARES => false,\r\n );\r\n try{\r\n $this->db = new PDO('mysql' . ':host=' . DBHOST . DBPORT . ';dbname=' . DBNAME.';charset='.CHARSET, DBUSER, DBPASS, $options);\r\n } catch (Exception $e) {\r\n throw new Exception($e->getMessage(), (int)$e->getCode());\r\n }\r\n }", "public function openConnection() {\n\t\t$this->connection = new mysqli($this->host, $this->username, $this->password, $this->database);\n\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"<p>Error:\" . $this->connection->connect_error . \"</p>\");\n\t\t}\n\t }", "public function open_db_connection()\n\t{\n\n\t\t$this->connection = new mysqli(DB_HOST,DB_USER,\n\t\t\tDB_PASS,DB_NAME);\n\n\t\tif ($this->connection->connect_errno):\n\t\t\tdie('database connection failed badly' . $this->connection->connect_error);\n\t\tendif;\n\n\t}", "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "public function open_db_connection() {\n //$this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n //the more \"object oriented\" way of doing this is this next line:\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n if( $this->connection->connect_errno ) {\n die(\"Database connection failed badly\" . $this->connection->connect_error);\n }\n\n }", "private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}", "public function openConnection() {\n $this->connection = new mysqli($this->host, $this->username, $this->password, $this->database);\n\n if ($this->connection->connect_error) {\n die(\"Error: \" . $this->connection->connect_error);\n }\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }", "public function open_connection() {\n try{\n \t\t$conn_string = \"mysql:host=\" . DB_SERVER . \";dbname=\" . DB_NAME . \";charset=utf8\";\n \t\t$this->connection = new PDO($conn_string, DB_USER, DB_PASS);\n \t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n \t} catch (PDOException $e) {\n \t\techo \"Connection failed: \" . $e->getMessage();\n \t}\n }", "public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }", "public static function open_db_connection(){\r\n self::$connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\r\n\t\t}", "public function connectToDB() {}", "private function open_connection(){\n\t\t$this -> conn = new mysqli(self::$SERVER, self::$USER, self::$PASS, $this -> DATABASE);\n\t}", "public function openConnection() {\n $this->mysqli = new mysqli($this->hostname, $this->username, $this->password, $this->database);\n if (mysqli_connect_errno()) {\n header( 'HTTP/1.1 500 DB Error' );\n die(mysqli_connect_error());\n }\n }", "public function open_connection()\n {\n $this->connection = new mysqli(DB_SERVER, DB_USER, DB_USR_PASS, DB_NAME);\n if (mysqli_connect_errno()) \n {\n exit('Connect failed: '. mysqli_connect_error());\n }\n }", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "function Open(){\n\t\t$this->con = pg_connect($this->strCon);\n\t}", "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}", "private function openConnection(){\n if($_SERVER[\"DOCUMENT_ROOT\"]==\"\")\n require \"../utility/connection.php\";\n else\n require $_SERVER[\"DOCUMENT_ROOT\"] . \"/mythos_pr/src/utility/connection.php\";\n\n $this->connessione=$connessione;\n\t\t}", "public function open(){\n $this->load->database();\n }", "private function open_db_connection(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME) \n or\n die(\"database connection failed\" . $this->connection->connect_error);\n \n }", "function openConnection() {\n\t\t$this->conn = new mysqli(self::$host, self::$user, self::$pass, $this->db_name);\n\t\tmysqli_set_charset($this->conn, 'utf8');\n\t}", "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}", "function openDatabaseConnection() {\n\t\t# open connection to MySQL database\n\t\t$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)\n\t\t\tor die(\"Could not connect to the SQL database server help\");\n\t\tmysql_select_db(MYSQL_DATABASE) or die(\"Could not connect to the SQL database server\");\n\t}", "public function __construct(){\n $this->open_db();\n }", "public function open_connection() {\n\t\t$this->connection = mysqli_connect('192.168.0.106', 'root', 'Kabul@123', 'php_quiz_db', 33068);\n\t\tif(!$this->connection) {\n\t\t\tdie(\"Database connection failed: \" . mysqli_error());\n\t\t}\n\t}", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function open() {\n/*\n\t $this->users=$this->db->query(\"select * from connections\");\n\t foreach ($this->users as $row) {\n\t\t $this->userID = $row['userID'];\n\t\t $this->username = $row['username'];\n\t\t $this->emailAddress = $row['emailAddress'];\n }\n \n \n*/\t\n\t\n\t}", "private function openConnexion()\n {\n try {\n $bdd = new PDO($this->db, $this->login, $this->pass);\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $bdd->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->connec = $bdd;\n // return $this->connec;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function open_connection() {\n $this->link = mysql_connect(parent::get_host(), parent::get_user(), parent::get_pass());\n\n # setting charset mysql \n mysql_set_charset('utf8', $this->link);\n }", "function _open() {\n\t\tif (!$this->DbConnection) {\n\t\t\t$db = &GetDatabase();\n\t\t\tif (!$db) return false;\n\t\t\t$this->DbConnection = &$db;\n\t\t}\n\t\treturn true;\n\t}", "public function connectDB() {}", "public function connect_db() {\n }", "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 }", "public function open_db_connection(){\n\n // refer to this class connection -> procedural way\n // $this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // refer to this class connection -> oriented way\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // when error occurs during attempt of database connection\n // if(mysqli_connect_errno()){\n\n // when error occurs during attempt of database connection\n // using connect_errno is a build in function from mysqli\n if($this->connection->connect_errno){ \n // exit with message and error\n // using connect_errno is a build in function from mysqli\n die(\"Database connection failed badly!\" . $this->connection->connect_error);\n }\n }", "function openDB() {\r\n global $db;\r\n if(!is_resource($db)) {\r\n /* Conection String eg.: mysqli(\"localhost\", \"lpaecomms\", \"letmein\", \"lpaecomms\")\r\n * - Replace the connection string tags below with your MySQL parameters\r\n */\r\n $db = new mysqli(\r\n \"localhost\",\r\n \"root\",\r\n \"\",\r\n \"lpa_ecomms\"\r\n );\r\n if ($db->connect_errno) {\r\n echo \"Failed to connect to MySQL: (\" .\r\n $db->connect_errno . \") \" .\r\n $db->connect_error;\r\n }\r\n }\r\n}", "public function openConnection(){\n try {\n $this->con = new PDO (\n $this->server,\n $this->user,\n $this->password, \n $this->options\n );\n \n return $this->con;\n } catch (PDOException $error) {\n echo \"Error connection: \".$error->getMessage();\n }\n }", "public static function open(){\n//\t\techo 'open'.\"\\n<br>\";\n\t\t$db = RuntimeInfo::instance()->connections()->MySQL(RuntimeInfo::instance()->helpers()->Session()->getSessionConfig()->getHosts());\n\t\t\n\t\t// Change this dependant on what the default db type is (ex: mysql 4.o-, 4.1+, or oracle 10g+)\n\t\tif($db instanceof MySQLAbstraction) { return true; } // to true from $db\n\t\treturn false;\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 }", "public function open_connection(){\n $srv=self::$db_host;\n $opc=array(\"Database\"=>$this->db_name, \"CharacterSet\"=>\"UTF-8\", \"UID\"=>self::$db_user, \"PWD\"=>self::$db_pass);\n $this->conn = sqlsrv_connect($srv,$opc) or die (print_r('Error al conectar con la Base de Datos SQLSRV !!! Favor de Informar a Sistemas!!!'));\n #(print_r(sqlsrv_errors(), true));\n }", "public function open()\n {\n if (!isset($this->handle)) {\n $this->stats->benchmark('bedrockWorkerManager.db.open', function () {\n $this->handle = new SQLite3($this->location);\n $this->handle->busyTimeout(15000);\n $this->handle->enableExceptions(true);\n });\n }\n }", "function openDatabaseConnection() \n{\n\t$options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\t\n\t$db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n\n\treturn $db;\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 }", "private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "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 openConnection(){\n\n\ttry {\n\n\t\t$dbh = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASSWORD);\n\n\t} catch (PDOException $e) {\n\n\t\t\techo 'Erro ao conectar com o MySQL: ' . $e->getMessage();\n\t}\n\n\t// Change character set to UTF-8\n\t$dbh->exec(\"set names \" . DB_CHARSET);\n\n\treturn $dbh;\n}", "private function connect() {\n $this->load->database();\n }", "public function openConnection() {\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\", \n\t\t\t\t\t$this->userName, $this->password);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\t$error = \"Connection error: \" . $e->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "public function open_connection() {\n\n $this->connection = mysqli_connect(\"sql7.freemysqlhosting.net\", \"sql7293366\", \"cgApy8fEvJ\") or die(\"Connection failed: \" . mysqli_connect_error());\n \n// $this->connection = mysqli_connect(Config::DB_HOST, Config::DB_USERNAME, Config::DB_PASSWORD) or die(\"Connection failed: \" . mysqli_connect_error());\n// var_dump($this->connection);\n //die :print message \n //mysqli_connect_error():returns the error description from the last connection error if there is no error return null\n// or die('Could not connect: ' . mysqli_error($this->connection));\n $this->select_database();\n }", "public function openConnection() { \n\t\t\t// Try and connect to the database\n\t\t\tif(!isset(self::$connection)) {\n\t\t\t\t// Load configuration as an array. Use the actual location of your configuration file\n\t\t\t\t$config = parse_ini_file(\"../scripts/config.ini\");\n\t\t\t\tself::$connection = new mysqli($config['host'], $config['user'], $config['pass'], $config['db']);\n\n\t\t\t\t// If connection was not successful, handle the error\n\t\t\t\tif(self::$connection === false) {\n\t\t\t\t\t// Handle error\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn self::$connection;\n\t\t\t}\n\t\t}", "public function connect()\n {\n $driver = 'DB'; // default driver\n $dsn = $this->getParameter('dsn');\n\n $do = $this->getParameter('dataobject');\n if ($do && isset($do['db_driver'])) {\n $driver = $do['db_driver'];\n }\n\n if ('DB' == $driver) {\n\n if (!class_exists('DB')) {\n include('DB.php');\n }\n\n $options = PEAR::getStaticProperty('DB', 'options');\n if ($options) {\n $this->connection = DB::connect($dsn, $options);\n } else {\n $this->connection = DB::connect($dsn);\n }\n \n } else {\n\n if (!class_exists('MDB2')) {\n include('MDB2.php');\n }\n \n $options = PEAR::getStaticProperty('MDB2', 'options');\n $this->connection = MDB2::connect($dsn, $options);\n }\n\n if (PEAR::isError($this->connection)) {\n\n throw new AgaviDatabaseException($this->connection->getMessage());\n $this->connection = Null;\n }\n }", "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 }", "public function openConnection() {\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\",\n\t\t\t\t\t$this->userName, $this->password);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\t$error = \"Connection error: \" . $e->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "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 getConnect()\n {\n $this->conn = Registry::get('db');\n }", "public function connectOpen()\n\t{\n\t try {\n\t $this->pdo = new PDO(\"mysql:host=127.0.0.1;port=8889;dbname=kiva\", DBUSER, DBPASS, array(PDO::ATTR_EMULATE_PREPARES => false));\n\t echo \"\\n\\nConnected to database....\\n\\n\";\n\t } catch (Exception $e) {\n\t //error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => 'initial_connect_issue', 'errmsg: ' => $e->getMessage(), 'FAIL' => true)));\n\t $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => $this->pdo->errorCode(), 'errmsg: ' => $this->pdo->errorInfo(), 'FAIL' => true)));\n\t return false;\n\t }\n\t}", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "public function Open()\n {\n if (isset($this->db_link)) {\n echo \"Warning : You already connected to MySql.\";\n } else {\n $this->db_link = mysqli_connect($this->db_host, $this->db_user, $this->db_password, $this->db_database_select);\n if (mysqli_error($this->db_link)) {\n die(\"Connection failed: \" . mysqli_error($this->db_link));\n }\n return true;\n }\n return false;\n }", "public function open_database_connection()\n {\n $server = 'blog';\n $dbname = 'blog';\n $username = 'root';\n $password = 'root';\n\n $link = new \\PDO(\"mysql:host=$server;dbname=$dbname\", $username, $password);\n\n return $link;\n }", "function __construct() {\n $this->open_db_connection();\n }", "public function connect(){\n $this->con = oci_connect($this->user, $this->pass, $this->db, 'AL32UTF8');\n if( !$this->con){\n $e = oci_error();\n throw new Exception(\"Error al conectar db; \"\n . \"User: {$this->user}, Database: {$this->db}, Error: \"\n . $e);\n\n }\n\n }", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function openConnection()\n {\n try {\n $this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\",\n $this->userName, $this->password);\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n $error = \"Connection error: \" . $e->getMessage();\n print $error . \"<p>\";\n unset($this->conn);\n return false;\n }\n return true;\n }", "private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }", "private function dbconnect()\n {\n $this->db = new mysqli(Config::$dbhost, Config::$dbuser, Config::$dbpass, Config::$database);\n if (mysqli_connect_errno()) {\n Log::info(sprintf(\"Connect failed: %s\\n\", mysqli_connect_error()));\n exit();\n }\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}", "function __construct() {\n $this->open_db_connection();\n }", "public function connect () {\n\t\tif(!$this->con) {\n\t\t\t$this->db = mysqli_connect($this->db_host, $this->db_user, $this->db_pass, $this->db_name) or die(mysql_error());\n\t\t\t$this->con = true;\n\t\t}\n\t}", "public function OpenConnection() { \n if ($this->USE_PERMANENT_CONNECTION) { \n $conn = mysql_pconnect($this->SERVER,$this->USERNAME,$this->PASSWORD); \n } else { \n $conn = mysql_connect($this->SERVER,$this->USERNAME,$this->PASSWORD); \n } \n if ((!$conn) || (!mysql_select_db($this->DATABASE,$conn))) { \n $this->ERROR_MSG = \"\\r\\n\" . \"Unable to connect to database - \" . date('H:i:s'); \n $this->debug(); \n return false; \n } else { \n $this->CONNECTION = $conn; \n return true; \n } \n }", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "public function __construct( )\n {\n $this->openConnection();\n }", "function __construct(){\n $this->open_db_connection();\n }", "private function db_connect() {\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : TRUE;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t// Connect to database.\n\t\tif ( DEBUG_MODE ) {\n\t\t\t$this->dbcon = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t} else {\n\t\t\t$this->dbcon = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t}\n\n\t\tif ( mysqli_connect_errno () ) {\n\t\t\t/* ===== Bail ===== */\n\t\t\tif (DEBUG_DISPLAY) {\n\t\t\t\techo (\"Failed to connect to MySQL: \" . mysqli_connect_error() . '<br />');\n\t\t\t}\n\t\t}\n\n\t\t// Set charset.\n\t\tmysqli_set_charset ( $this->dbcon, $this->dbcharset );\n\n\t\t// Set collate.\n\t\t// mysqli_query ( $this->dbcon, \"COLLATE {$this->dbcollate}\" );\n\n\t\t// Set the database as ready for queries.\n\t\t$this->ready = TRUE;\n\t}", "private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }", "private function connect()\n {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->database_name);\n if ($this->db->connect_error) {\n die(\"Connect failed: \". $this->db->connect_error);\n exit();\n }\n }", "function open_database_connection()\n{\n\trequire('models/db_config.php');\n $db = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname . ';charset=utf8', $dbuser, $dbpass);\n\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\n return $db;\n}", "function __construct(){\r\n\t\t\t$this->open_db_connection();\r\n\t\t}", "function connect() {\n trigger_before( 'connect', $this, $this );\n $this->conn = mysql_connect($this->host,$this->user,$this->pass,$this->opt1,$this->opt2);\n if (!$this->conn) {\n $this->db_open = false;\n trigger_error(\"Sorry, the database connection failed. Please check your database connection settings.\".@mysql_error($this->conn), E_USER_ERROR );\n } else {\n $this->db_open = mysql_select_db($this->dbname);\n if (!$this->db_open)\n trigger_error(@mysql_error($this->conn), E_USER_ERROR );\n }\n return $this->db_open;\n }", "private function databaseConnection(){\n \t\tif($this->connection != null){\n \t\t\treturn;\n \t\t} else {\n \t\t\t$this->connection = mysqli_connect(\"127.0.0.1\", \"user\", \"password\", \"database\") or die(\"Error \" . mysqli_error($this->connection));\n \t\t}\n\n\t}", "public function connectToDB()\n {\n $this->dbConnection = @new mysqli(\"localhost\",\"root\", \"\",\"CMS_Project\");\n if (!$this->dbConnection)\n {\n die('Could not connect to the CMS Database: ' .\n $this->dbConnection->connect_errno);\n }\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "function open($connection_id = 0) {\n\t\tif ($connection_id == 0) {\n\t\t\t# get credentials from object variables\n\t\t\t$connection_string = $this->format_pg_connection_string($this->get_object_credentials());\n\t\t}\n\t\telse {\n\t\t\t$this->debug->write(\"Open Database connection with connection_id: \" . $connection_id, 4);\n\t\t\t$this->connection_id = $connection_id;\n\t\t\t$connection_string = $this->get_connection_string();\n\t\t}\n\t\t$this->dbConn = pg_connect($connection_string);\n\t\tif (!$this->dbConn) {\n\t\t\t$this->err_msg = 'Die Verbindung zur PostGIS-Datenbank konnte mit folgenden Daten nicht hergestellt werden: ' . str_replace($credentials['password'], '********', $connection_string);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->debug->write(\"Database connection: \" . $this->dbConn . \" successfully opend.\", 4);\n\t\t\t$this->setClientEncodingAndDateStyle();\n\t\t\t$this->connection_id = $connection_id;\n\t\t\treturn true;\n\t\t}\n\t}", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "function db_open( ) {\n\t$dbinfo['username']=\"username\";\n\t$dbinfo['password']=\"password\";\n\t$dbinfo['dbname']=\"dbname\";\n\t$dbinfo['host']=\"host\";\n // Connecting\n $ret['id'] = mysql_connect( $dbinfo['host'], $dbinfo['username'], $dbinfo['password'] );\n if( !$ret['id'] ) {\n $ret['error'] = \"ERROR: Cannot connect to database!\";\n return $ret;\n }\n\n // Selecting DB\n if ( !mysql_select_db( $dbinfo['dbname'], $ret['id'] ) ) {\n $ret['error'] = \"ERROR: Cannot select database!\";\n return $ret;\n\t\t}\n\n return $ret;\n}", "public function open() {\n\n\t\t$this->openConnection();\n\n\t\tif (parent::ping() === false) {\n\t\t\t$this->openConnection(true);\n\t\t}\n\n\t}", "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 __construct() {\n $this->open_connection();\n }", "private function connect()\n {\n $this->dbh = new PDO('sqlite:' . $this->sqlite);\n return;\n }", "public function open($db_conn_params, $charset = 'utf8')\r\n {\r\n }", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "public function getConnection(){\n \n \n $this->db_conn = OCILogon($this->username, $this->password,$this->db_name); \n \n return $this->db_conn;\n }" ]
[ "0.82821095", "0.81911016", "0.818798", "0.8017345", "0.7972819", "0.7926587", "0.78627294", "0.7813157", "0.77977175", "0.7788649", "0.77702636", "0.7744126", "0.77286124", "0.772785", "0.770578", "0.76958483", "0.76919866", "0.76553005", "0.76535815", "0.7603186", "0.75727856", "0.75328076", "0.75115496", "0.7424627", "0.7361176", "0.7359734", "0.73556995", "0.73356754", "0.7331387", "0.73276687", "0.72959507", "0.7265693", "0.72345847", "0.72334915", "0.72311604", "0.72248185", "0.72183603", "0.7208529", "0.72053134", "0.719533", "0.71884525", "0.71881527", "0.7181897", "0.71515346", "0.7109184", "0.7105597", "0.7093948", "0.7092935", "0.7090705", "0.7090398", "0.70839506", "0.70786726", "0.7047258", "0.7036389", "0.7033702", "0.70281184", "0.70213556", "0.702017", "0.7008978", "0.70055294", "0.7002934", "0.7002062", "0.70019865", "0.6994459", "0.69836605", "0.6980014", "0.6974544", "0.6961917", "0.69560105", "0.6953894", "0.6952136", "0.694837", "0.69472766", "0.6947146", "0.69463855", "0.6945513", "0.6918747", "0.69134486", "0.69081473", "0.6901967", "0.6899306", "0.6897658", "0.6893129", "0.68901855", "0.68893933", "0.6888514", "0.68828696", "0.68794346", "0.68765956", "0.68539536", "0.6846178", "0.684433", "0.6843727", "0.6840866", "0.68349534", "0.68332756", "0.6832876", "0.6829962", "0.68280905", "0.6824699", "0.6824647" ]
0.0
-1
=============Sumbits a query formats the result if there is one
function query($quer){ unset($this->result); unset($this->resultie); $this->result = mysql_query($quer, $this->conn); if(mysql_error()){ return false; } if($this->result){ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function queryFormatter(){\n return $this->querySqlFormatter->getSqlPrepareFormatter($this->SqlPrepareFormatterHandleObject());\n }", "protected function formatResult()\n\t{\n\t\t$this->arResult =& $this->dbResult;\n\t\t$this->arResult['ERRORS'] =& $this->errors;\n\n\t\t$this->arResult['FORM_ID'] = 'CRM_LOC_EDIT_FORM';\n\t\t$this->arResult['GRID_ID'] = 'CRM_LOC_EDIT_GRID';\n\n\t\tforeach($this->componentData['FORM_ROWS'] as $code => $row)\n\t\t{\n\t\t\t$required = $row['required'];\n\n\t\t\tif(!$required && mb_substr($code, 0, 5) == 'NAME_')\n\t\t\t\t$required = true;\n\n\t\t\t$this->arResult['FIELDS'][] = array(\n\t\t\t\t'id' => $code,\n\t\t\t\t'name' => $row['title'],\n\t\t\t\t'value' => Helper::makeSafeDisplay($this->arResult['FORM_DATA'][$code], $code),\n\t\t\t\t'required' => $required,\n\t\t\t\t'type' => 'text' // can and will be redefined at the template\n\t\t\t);\n\t\t}\n\n\t\tif($this->checkIsNonemptyArray($this->arResult['EXTERNAL_SERVICES']))\n\t\t{\n\t\t\t$this->arResult['FIELDS'][] = array(\n\t\t\t\t'id' => 'EXTERNAL',\n\t\t\t\t'required' => false\n\t\t\t);\n\t\t}\n\n\t\t$this->arResult['EXTERNAL_TABLE_COLUMNS'] = Helper::getExternalMap();\n\n\t\tunset($this->componentData);\n\t}", "function summary_query() {\r\n $this->get_query_fields();\r\n \r\n // No way to do summaries on more than one field at a time.\r\n if (count($this->query_fields) > 1) {\r\n return;\r\n }\r\n \r\n $field = $this->query_fields[0]['field'];\r\n $date_handler = $this->query_fields[0]['date_handler'];\r\n \r\n // Get the SQL format for this granularity, like Y-m,\r\n // and use that as the grouping value.\r\n $format = $date_handler->views_formats($this->options['granularity'], 'sql');\r\n $this->formula = $date_handler->sql_format($format, $date_handler->sql_field($field['fullname']));\r\n \r\n // Add the computed field.\r\n $this->base_alias = $this->name_alias = $this->query->add_field(NULL, $this->formula, $field['query_name']);\r\n \r\n return $this->summary_basics(FALSE);\r\n }", "protected function formatListingsQuery()\n\t{\n\t\t$this->connectToDatabase();\n\t\t$this->queryString = \"CALL albumFilteredListingsSelect(\".\n\t\t\t$this->page->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->listingsLength->escapeSQL($this->mysqli).\",\".\n\t\t\t\"NULL,\".\n\t\t\t$this->contentProperties->id->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->gallery->contentProperties->id->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->title->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->date->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->releaseAfter->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->releaseBefore->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->access->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->slot->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->keyword->escapeSQL($this->mysqli).\",\".\n\t\t\t\"@total_matches);SELECT @total_matches AS `total_matches`;\";\n\t\treturn ($this->queryString);\n\t}", "public function getFormattedQueryResults( $queryResults ) {\n\t\t$formattedQueryResults = $queryResults;\n\t\tforeach ( $queryResults as $rowNum => $row ) {\n\t\t\tforeach ( $row as $fieldName => $value ) {\n\t\t\t\tif ( trim( $value ) == '' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( !array_key_exists( $fieldName, $this->mFieldDescriptions ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$fieldDescription = $this->mFieldDescriptions[$fieldName];\n\t\t\t\t$tableName = $this->mFieldTables[$fieldName];\n\t\t\t\t$fieldType = $fieldDescription->mType;\n\n\t\t\t\t$text = '';\n\t\t\t\tif ( $fieldDescription->mIsList ) {\n\t\t\t\t\t// There's probably an easier way to do\n\t\t\t\t\t// this, using array_map().\n\t\t\t\t\t$delimiter = $fieldDescription->mDelimiter;\n\t\t\t\t\t$fieldValues = explode( $delimiter, $value );\n\t\t\t\t\tforeach( $fieldValues as $i => $fieldValue ) {\n\t\t\t\t\t\tif ( trim( $fieldValue ) == '' ) continue;\n\t\t\t\t\t\tif ( $i > 0 ) $text .= \"$delimiter \";\n\t\t\t\t\t\t$text .= self::formatFieldValue( $fieldValue, $fieldType, $fieldDescription, $this->mParser );\n\t\t\t\t\t}\n\t\t\t\t} elseif ( $fieldType == 'Date' || $fieldType == 'Datetime' ) {\n\t\t\t\t\t$datePrecisionField = str_replace( ' ', '_', $fieldName ) . '__precision';\n\t\t\t\t\tif ( array_key_exists( $datePrecisionField, $row ) ) {\n\t\t\t\t\t\t$datePrecision = $row[$datePrecisionField];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$fullDatePrecisionField = $tableName . '.' . $datePrecisionField;\n\t\t\t\t\t\tif ( array_key_exists( $fullDatePrecisionField, $row ) ) {\n\t\t\t\t\t\t\t$datePrecision = $row[$fullDatePrecisionField];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should never\n\t\t\t\t\t\t\t// happen, but if it\n\t\t\t\t\t\t\t// does - let's just\n\t\t\t\t\t\t\t// give up.\n\t\t\t\t\t\t\t$datePrecision = CargoStore::FULL_PRECISION;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$text = self::formatDateFieldValue( $value, $datePrecision, $fieldType );\n\t\t\t\t} else {\n\t\t\t\t\t$text = self::formatFieldValue( $value, $fieldType, $fieldDescription, $this->mParser );\n\t\t\t\t}\n\t\t\t\tif ( $text != '' ) {\n\t\t\t\t\t$formattedQueryResults[$rowNum][$fieldName] = $text;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $formattedQueryResults;\n\t}", "public function queryFormat(): string\n {\n return 'JSONEachRow';\n }", "function summary_query() {\n\n // @TODO The summary values are computed by the database. Unless the database has\n // built-in timezone handling it will use a fixed offset, which will not be\n // right for all dates. The only way I can see to make this work right is to\n // store the offset for each date in the database so it can be added to the base\n // date value before the database formats the result. Because this is a huge\n // architectural change, it won't go in until we start a new branch.\n $this->formula = $this->date_handler->sql_format($this->sql_format, $this->date_handler->sql_field(\"***table***.$this->real_field\"));\n $this->ensure_my_table();\n // Now that our table is secure, get our formula.\n $formula = $this->get_formula();\n\n // Add the field, give it an alias that does NOT match the actual field name or grouping won't work right.\n $this->base_alias = $this->name_alias = $this->query->add_field(NULL, $formula, $this->field . '_summary');\n $this->query->set_count_field(NULL, $formula, $this->field);\n\n return $this->summary_basics(FALSE);\n }", "function formatAndQuery() {\n\tglobal $DB;\n\t$args = func_get_args();\n\t$query = array_shift($args); #remove the first element of the array as its own variable\n\t$query = str_replace(\"%sv\",\"'%s'\",$query);\n\tforeach ($args as $key => $val)\n\t {\n\t $args[$key] = $DB->real_escape_string($val);\n\t\t\t$args[$key] = htmlspecialchars($val);\n\t }\n\t$query = vsprintf($query, $args);\n\t$result = $DB->query($query);\n\tif (!$result)\n\t{\n\tthrow new Exception($DB->error.\" [$query]\");\n\t}\n\treturn $result;\n}", "public function runQuery(){\n \n $query = $this->getQuery();\n $pager = $this->getPager();\n $modify_result = $this->getModifyResult();\n\n // set default number of results so that we don't output NULL as \n // total_results if there are errors\n $pager->setTotalResults( 0 );\n $results = array();\n \n if( !$this->getResponse()->hasErrors() ){\n \t\n \t $count_query = clone $query;\n\t $pager->setTotalResults( $count_query->count() );\n \t $pager->decorateQuery( $query );\n \n\t if( $pager->getPageSize() > 0 ){\n\t $db_results = $query->find();\n\t foreach( $db_results as $model ){\n\t $result_object = array();\n\t $modify_result( $model, $result_object );\n\t $results[] = $result_object;\n\t }\n\t }\n\t \n }\n \n $api_response_body = $this->getResponse()->getResponseBody();\n $api_response_body->setBody($results);\n \n }", "public function formatQuery(string $query): string;", "protected function formatResult()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\t$arResult = array();\n\n\t\t// references\n\t\t$arResult[\"INFO\"][\"STATUS\"] = $this->dbResult['STATUS'];\n\t\t$arResult[\"INFO\"][\"PAY_SYSTEM\"] = $this->dbResult['PAYSYS'];\n\t\t$arResult[\"INFO\"][\"DELIVERY\"] = $this->dbResult['DELIVERY'];\n\t\t$arResult[\"INFO\"][\"DELIVERY_HANDLERS\"] = $this->dbResult['DELIVERY_HANDLERS'];\n\n\t\t$arResult[\"CURRENT_PAGE\"] = $APPLICATION->GetCurPage();\n\t\t$arResult[\"NAV_STRING\"] = $this->dbQueryResult['ORDERS']->GetPageNavString(Localization\\Loc::getMessage(\"SPOL_PAGES\"), $this->arParams[\"NAV_TEMPLATE\"]);\n\n\t\t// bug walkaround\n\t\t$this->arParams[\"PATH_TO_COPY\"] .= (strpos($this->arParams[\"PATH_TO_COPY\"], \"?\") === false ? \"?\" : \"&amp;\");\n\t\t$this->arParams[\"PATH_TO_CANCEL\"] .= (strpos($this->arParams[\"PATH_TO_CANCEL\"], \"?\") === false ? \"?\" : \"&amp;\");\n\n\t\tif(self::isNonemptyArray($this->dbResult['ORDERS']))\n\t\t{\n\t\t\tforeach ($this->dbResult['ORDERS'] as $k => $orderInfo)\n\t\t\t{\n\t\t\t\t$arOrder =& $this->dbResult['ORDERS'][$k]['ORDER'];\n\t\t\t\t$arOBasket =& $this->dbResult['ORDERS'][$k]['BASKET_ITEMS'];\n\n\t\t\t\t$arOrder[\"FORMATED_PRICE\"] = SaleFormatCurrency($arOrder[\"PRICE\"], $arOrder[\"CURRENCY\"]);\n\n\t\t\t\t$this->formatDate($arOrder, $this->orderDateFields2Convert);\n\n\t\t\t\t$arOrder[\"CAN_CANCEL\"] = (($arOrder[\"CANCELED\"] != \"Y\" && $arOrder[\"STATUS_ID\"] != \"F\" && $arOrder[\"PAYED\"] != \"Y\") ? \"Y\" : \"N\");\n\n\t\t\t\t$arOrder[\"URL_TO_DETAIL\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_DETAIL\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"]))));\n\t\t\t\t$arOrder[\"URL_TO_COPY\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_COPY\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"])))).\"COPY_ORDER=Y\";\n\t\t\t\t$arOrder[\"URL_TO_CANCEL\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_CANCEL\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"])))).\"CANCEL=Y\";\n\n\t\t\t\tif(self::isNonemptyArray($arOBasket))\n\t\t\t\t{\n\t\t\t\t\tforeach ($arOBasket as $n => $basketInfo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arBasket =& $arOBasket[$n];\n\n\t\t\t\t\t\t$arBasket[\"NAME~\"] = $arBasket[\"NAME\"];\n\t\t\t\t\t\t$arBasket[\"NOTES~\"] = $arBasket[\"NOTES\"];\n\t\t\t\t\t\t$arBasket[\"NAME\"] = htmlspecialcharsEx($arBasket[\"NAME\"]);\n\t\t\t\t\t\t$arBasket[\"NOTES\"] = htmlspecialcharsEx($arBasket[\"NOTES\"]);\n\t\t\t\t\t\t$arBasket[\"QUANTITY\"] = doubleval($arBasket[\"QUANTITY\"]);\n\n\t\t\t\t\t\t// backward compatibility\n\t\t\t\t\t\t$arBasket[\"MEASURE_TEXT\"] = $arBasket[\"MEASURE_NAME\"];\n\n\t\t\t\t\t\t$this->formatDate($arBasket, $this->basketDateFields2Convert);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arResult[\"ORDERS\"] = $this->dbResult['ORDERS'];\n\t\t}\n\t\telse\n\t\t\t$arResult[\"ORDERS\"] = array();\n\n\t\t$this->arResult = $arResult;\n\t}", "public function _query()\n {\n }", "public function query( $query ) {\n\t\t$result = parent::query( $query );\n\t\t$this->escaped = array();\n\t\t\n\t\treturn $result;\n\t}", "function SQLFormat ($query)\r{\r\t$lowercase = array ('select ', ' max', ' min', ' count', ' avg', ' sum',\r\t\t\t\t\t\t'from ', ' as ',\r\t\t\t\t\t\t'join ', \"left \\nJOIN \", \"right \\nJOIN \", \"inner \\nJOIN \", \"outer \\nJOIN \", ' on ',\r\t\t\t\t\t\t'where ', ' like ', ' and ', ' or ',\r\t\t\t\t\t\t'group by ',\r\t\t\t\t\t\t'order by ', ' asc', ' desc', 'ASC, ', 'DESC, ',\r\t\t\t\t\t\t'limit ',\r\t\t\t\t\t\t\"\\n\\n\");\r\t$uppercase = array ('SELECT ', ' MAX', ' MIN', ' COUNT', ' AVG', ' SUM',\r\t\t\t\t\t\t\"\\nFROM \", ' AS ',\r\t\t\t\t\t\t\"\\nJOIN \", \"\\nLEFT JOIN \", \"\\nRIGHT JOIN \", \"\\nINNER JOIN\", \"OUTER JOIN\", \"\\n\\tON \",\r\t\t\t\t\t\t\"\\nWHERE \", ' LIKE ', ' AND ', ' OR ',\r\t\t\t\t\t\t\"\\nGROUP BY \",\r\t\t\t\t\t\t\"\\nORDER BY\\n\\t\", ' ASC', ' DESC', \"ASC,\\n\\t\", \"DESC,\\n\\t\",\r\t\t\t\t\t\t\"\\nLIMIT \",\r\t\t\t\t\t\t\"\\n\");\r\r\treturn str_replace ($lowercase, $uppercase, $query);;\r}", "public function displayQuery($result)\n\t{\n\n\t\tif(!$result){\n\n\t\t\t$output = 'Database Is Faild :'.mysqli_error($this->connection).'<br>';\n\t\t\t$output .= 'Last Query Is : '.$this->lastQuery;\n\t\t\tdie($output);\n\t\t}else{\n\n\t\t\t$this->affectedRows = mysqli_affected_rows($this->connection);\n\t\t}\n\t}", "function query() {}", "public function query($query,$mode='single'){\n\t\t$this->lastsql=$query;\n\t\t\n\t\tswitch($mode){\n\t\t\tcase 1:\n\t\t\tcase '':\n\t\t\tcase 'single':\n\t\t\t\t$this->qresult=@parent::query($this->lastsql);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\tcase 'multi':\n\t\t\tcase 'multiple':\n\t\t\t\t$ok=@parent::multi_query($query);\n\t\t\t\tdo{\n\t\t\t \t$this->qresult=@parent::store_result();\n\t\t\t if(($ok==true)&&empty($this->qresult)){\n\t\t\t \t$this->qresult=true;\n\t\t\t }\n\t\t\t }while(@parent::next_result());\n\t\t\t break;\n\t\t}\n\t\t\n\t\tif($this->show_sql){\n\t\t\tprint('<br />'.$this->lastsql.'<br />');\n\t\t}\n\t\t\n\t\tif($this->errno!=0){\n\t\t\tif(($this->show_sql==false) && ($this->show_sql_error==true)){\n\t\t\t\tprint('<br />'.$this->lastsql);\n\t\t\t}\n\t\t\tif($this->show_error){\n\t\t\t\tprint('<br />'.$this->error);\n\t\t\t}\n\t\t}\n\t\tif(@$this->num_fields()){ \n\t\t\tfor($f=0;$f<@$this->num_fields();$f++){\n\t\t\t\t$info=@$this->qresult->fetch_field();\n\t\t\t\t$this->qresult->fields[$f]['name']=@$info->name;\n\t\t\t\t$this->qresult->fields[$f]['orgname']=@$info->orgname;\n\t\t\t\t$this->qresult->fields[$f]['table']=@$info->table;\n\t\t\t\t$this->qresult->fields[$f]['orgtable']=@$info->orgtable;\n\t\t\t\t$this->qresult->fields[$f]['def']=@$info->def;\n\t\t\t\t$this->qresult->fields[$f]['max_length']=@$info->max_length;\n\t\t\t\t$this->qresult->fields[$f]['flags']=@$info->flags;\n\t\t\t\t$this->qresult->fields[$f]['type']=@$info->type;\n\t\t\t\t$this->qresult->fields[$f]['decimals']=@$info->decimals;\n\t\t\t\t$this->qresult->table=@trim($this->qresult->fields[0]['table']);\n\t\t\t\tif(empty($this->qresult->table)){\n\t\t\t\t\t$this->qresult->table=$this->xml_root;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@$this->qresult->field_seek(0);\n\t\t}\n\t\t@$this->num_rows=is_object(@$this->qresult)?@$this->qresult->num_rows:null;\n\t\treturn @$this->qresult;\n\t}", "public function formatQuery($query, $table, $tags=array('url'=>'', 'separator'=>', ')) {\n foreach ($query as $key=>$record) {\n // get fields\n $fields = $this->getSchema($table, true);\n \n // format record according to field\n foreach ($fields as $field=>$properties) {\n $parser = new TheMatrixParser;\n if (isset($record[$properties['name']])) {\n // text\n // textlong\n // email\n if ($properties['type'] == 'email') {\n $query[$key][$properties['name']] = '<a href=\"mailto:'.$query[$key][$properties['name']].'\" class=\"email\">'.$query[$key][$properties['name']].'</a>';\n }\n // tags\n if ($properties['type']=='tags') {\n $query[$key][$properties['name']] = $parser->getTags($query[$key][$properties['name']], $tags['separator'], $tags['url']);\n }\n // datetimelocal\n if ($properties['type']=='datetimelocal' && is_numeric($query[$key][$properties['name']])) $query[$key][$properties['name']] = date('r', $query[$key][$properties['name']]);\n // codeeditor\n // bbcodeeditor\n if ($properties['type']=='bbcodeeditor') {\n $query[$key][$properties['name']] = $parser->bbcode($query[$key][$properties['name']]);\n }\n // wiki\n if ($properties['type']=='wikieditor') {\n $query[$key][$properties['name']] = $parser->wiki($query[$key][$properties['name']]);\n }\n // markdown\n if ($properties['type']=='markdowneditor') {\n $query[$key][$properties['name']] = $parser->markdown($query[$key][$properties['name']]);\n }\n // wysiwyg\n // checkbox\n // dropdown\n // file\n // image\n }\n else $query[$key][$properties['name']] = ''; // stops unidentified index errors from coming up\n }\n }\n return $query;\n }", "public function formatQueries($merged) {\n\t\tif (empty($merged)) {\n\t\t\treturn $merged;\n\t\t}\n\t\tforeach ($merged as $key => $value) {\n\t\t\t$params = $value['params'];\n\t\t\t$paramIndex = 0;\n\t\t\t$query = preg_replace_callback('/\\?/', function() use ($params, &$paramIndex) {\n\t\t\t\t$paramValue = isset($params[$paramIndex]) ? $params[$paramIndex] : NULL;\n\t\t\t\t$paramIndex ++;\n\t\t\t\tif (is_string($paramValue)) {\n\t\t\t\t\t$paramValue = '\"' . $paramValue . '\"';\n\t\t\t\t} elseif (is_bool($paramValue)) {\n\t\t\t\t} elseif ($paramValue instanceof \\DateTime) {\n\t\t\t\t\t$paramValue = $paramValue->format(\\DateTime::ISO8601);\n\t\t\t\t} elseif (is_object($paramValue) && method_exists($paramValue, '__toString')) {\n\t\t\t\t\t$paramValue = '\"' . $paramValue . '\"';\n\t\t\t\t} elseif (!is_numeric($paramValue) && !is_bool($paramValue)) {\n\t\t\t\t\t$paramValue = '[' . gettype($paramValue) . ']';\n\t\t\t\t}\n\t\t\t\treturn $paramValue;\n\t\t\t}, $value['query']);\n\t\t\t$query = \\SqlFormatter::format($query);\n\t\t\t$merged[$key]['query'] = $query;\n\t\t}\n\t\treturn $merged;\n\t}", "function createQuery() ;", "abstract public function query();", "public abstract function get_query();", "public function query()\n\t{\n\t\t\n\t}", "protected function formatQuery(SelectInterface $db_query) {\n $output = 'Search API Backend: db; Query: \"' . $db_query->__toString();\n $arguments = $db_query->getArguments();\n if ($arguments) {\n $output .= '\"; Arguments: ' . json_encode($arguments);\n }\n return $output;\n }", "public function result()\n {\n if ($this->_res === false) {\n return false;\n }\n // it did; continue\n else {\n\n // Store rows here\n $rows = [];\n\n // Start showing connections\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n array(5, 'Connections'),\n ),\n );\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n 'Username',\n 'Group',\n array(3,'Machine'),\n ),\n );\n\n // Show them\n if (count($this->_res['connections']) > 0) {\n foreach ($this->_res['connections'] as $conn) {\n $rows[] = array(\n 'type' => 'values',\n 'columns' => array(\n $conn['username'],\n $conn['group'],\n array(3,$conn['hostname'].($conn['hostname'] != $conn['ip'] ? ' <span class=\"perc\">('.$conn['ip'].')</span>' : '')),\n ),\n );\n }\n } else {\n $rows[] = array(\n 'type' => 'none',\n 'columns' => array(\n array(5, 'None found'),\n ),\n );\n }\n\n // Now services\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n array(5, 'Services'),\n ),\n );\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n 'Service',\n 'Machine',\n array(3,'Date'),\n ),\n );\n\n // Show them\n if (count($this->_res['services']) > 0) {\n // Show them\n foreach ($this->_res['services'] as $service) {\n $rows[] = array(\n 'type' => 'values',\n 'columns' => array(\n $service['service'],\n $service['machine'],\n array(3, date($this->_date_format, $service['date'])),\n ),\n );\n }\n } else {\n $rows[] = array(\n 'type' => 'none',\n 'columns' => array(\n array(5, 'None found'),\n ),\n );\n }\n\n // Files time\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n array(5, 'Locked files'),\n ),\n );\n $rows[] = array(\n 'type' => 'header',\n 'columns' => array(\n 'UID',\n 'Mode',\n 'Share',\n 'Filename',\n 'Date',\n ),\n );\n\n // Show them\n if (count($this->_res['files']) > 0) {\n foreach ($this->_res['files'] as $f) {\n\n // See if we can turn the uid into a username\n $username = false;\n if (function_exists('posix_getpwuid')) {\n if ($user_info = @posix_getpwuid($f['uid'])) {\n $username = $user_info['name'];\n }\n }\n\n // Try making better sense of the R/W column\n switch ($f['rw']) {\n case 'RDONLY':\n $rw = 'Read Only';\n break;\n case 'RDWR':\n $rw = 'Read/Write';\n break;\n case 'WRONLY':\n $rw = 'Write Only';\n break;\n default:\n $rw = false;\n break;\n }\n\n // Save entry\n $rows[] = array(\n 'type' => 'values',\n 'columns' => array(\n $f['uid'].($username != false ? ' ('.$username.')' : ''),\n $rw ? $rw : $f['rw'],\n $f['share'],\n $f['filename'],\n date($this->_date_format, $f['date']),\n ), );\n }\n } else {\n $rows[] = array(\n 'type' => 'none',\n 'columns' => array(\n array(5, 'None found'),\n ),\n );\n }\n\n // Give it off\n return array(\n 'root_title' => 'Samba Status',\n 'rows' => $rows,\n );\n }\n }", "function query($query) {\r\n\t\t//\"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}", "public function printquery(){\n\t\techo $this->query.\";\";\n\t}", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "public static function query()\n {\n }", "protected function formatResult()\n\t{\n\t\t$this->arResult['CLIENT_INFO'] = $this->clientInfo;\n\t\t$this->arResult['ERRORS'] = $this->errors;\n\n\t\t$this->arResult['AP_MANAGE_URL'] = static::PATH_AP_MANAGE;\n\n\t\t$this->arResult['CLIENT_ACCESS'] = $this->clientAccess;\n\t}", "function formatcontents($sqlresults, $what, $from, $rid, $page=1, $extra='', $canurl=''){\n\t//what: all, stories, comments, tags, summary\n\t//from: self, feed, classes, class, classmember, following, user, storyname, storyid, comment, frontpage, submissions\n\tif($what==\"all\" && $from==\"story\"){//sqlresults is an array of results for stories, comments and tags\n\t\t$commentresults=$sqlresults[\"comments\"];\n\t\t$tagresults=$sqlresults[\"tags\"];\n\t\t$sqlresults=$sqlresults[\"stories\"];\n\t}\n\t$rows = ($sqlresults)? mysqli_num_rows($sqlresults) : 0;\n\t//echo \"<p>what is $what, from is $from, rid is $rid, and rows is $rows.</p>\";\n\tif($what==\"summary\"){ //do the summary even if we have no rows\n\t\tif($from==\"classes\"){//actually pass the whole result set for the summary\n\t\t\tif($rid==$page) $classcheck=\"self\";//using page to contain the $id information for summaries\n\t\t\telse $classcheck=\"other\";\n\t\t\t//echo \"<p>classcheck before formatcontent was $classcheck page was $page, rid was $rid </p>\";\n\t\t\tif($classcheck=='other' && !$rows) return FALSE;\n\t\t\treturn formatcontent($sqlresults, \"classessummary\", $from, $rid, $classcheck, $extra); \n\t\t}\n\t\telseif($from==\"class\"){\n\t\t\tif($rows){\n\t\t\t\t$chunk=tableheaders(\"sumclass\");\n\t\t\t\t$printtotal=$ntss=$ntgss=$ntcs=$ntgcs=$ntts=0;\n\t\t\t\twhile($assoc=mysqli_fetch_assoc($sqlresults)){\n\t\t\t\t\t$name=htmlspecialchars($assoc[\"MDispName\"]);\n\t\t\t\t\t$cid=$assoc[\"ClassID\"];\n\t\t\t\t\t$nss=(is_null($assoc[\"NSs\"]))? 0: $assoc[\"NSs\"];\n\t\t\t\t\t$gss=(is_null($assoc[\"GSs\"]))? 0: $assoc[\"GSs\"];\n\t\t\t\t\t$ncs=(is_null($assoc[\"NCs\"]))? 0: $assoc[\"NCs\"];\n\t\t\t\t\t$gcs=(is_null($assoc[\"GCs\"]))? 0: $assoc[\"GCs\"];\n\t\t\t\t\t$nts=$nss+$ncs;\n\t\t\t\t\t$gts=$gss+$gcs;\n\t\t\t\t\t$actions=getactions('class', array('cid'=>$cid, 'sname'=>$name, 'rid'=>$rid));\n\t\t\t\t\t$chunk.=\"<tr><td>$name</td><td>$nss</td><td>$gss</td><td>$ncs</td><td>$gcs</td><td>$nts</td><td>$gts</td><td>$actions</td></tr>\";\n\t\t\t\t\t$printtotal++;\n\t\t\t\t\t$ntss+=$nss;\n\t\t\t\t\t$ntgss+=$gss;\n\t\t\t\t\t$ntcs+=$ncs;\n\t\t\t\t\t$ntgcs+=$gcs;\n\t\t\t\t}\n\t\t\t\tif($printtotal>1){\n\t\t\t\t\t$sgclass=($ntgss<$ntss)? \"class=\\\"gradeneed\\\"\" : \"\"; //there are stories to grade\n\t\t\t\t\t$cgclass=($ntgcs<$ntcs)? \"class=\\\"gradeneed\\\"\" : \"\"; //there are comments to grade\n\t\t\t\t\t$nts=$ntss+$ntcs;\n\t\t\t\t\t$tgclass=($ntgss+$ntgcs<$nts)? \"class=\\\"gradeneed\\\"\" : \"\";//there are submissions to grade\n\t\t\t\t\t$actions=getactions('class', array('sname'=>'all', 'cid'=>$cid, 'rid'=>$rid));\n\t\t\t\t\t$params=array('username'=>$_SESSION['UserName'], 'classid'=>$cid);\n\t\t\t\t\t$storieslink=($ntss)? createlink(\"classstories\", $params, $ntss) : $ntss;\n\t\t\t\t\t$commentslink=($ntcs)? createlink(\"classcomments\", $params, $ntcs) : $ntcs;\n\t\t\t\t\t$totalslink=($nts)? createlink(\"classall\", $params, $nts) : $nts;\n\t\t\t\t\t$chunk.=\"<tr class='totalrow'><td>TOTAL:</td><td $sgclass>$storieslink</td><td></td><td $cgclass>$commentslink</td><td></td><td $tgclass>$totalslink</td><td></td><td>$actions</td></tr>\";\n\t\t\t\t}\n\t\t\t\t$chunk.=\"</table>\";\n\t\t\t\treturn $chunk;\n\t\t\t}\n\t\t\telse return \"There are no students currently in this class.\";\n\t\t}\n\t}//end what == summary\n\telseif($rows){\n\t\t$nsfwok=($rid)? $_SESSION['NSFW'] : 0;\n\t\t$output=\"\";\n\t\t$classcheck=($_SESSION['IsInstructor']==1 || $_SESSION['IsStudent']==1)? 1 : 0;\n\t\tif($from==\"story\"){//getting a single story\n\t\t\tif($what==\"stories\" || $what==\"all\"){//do the story part\n\t\t\t\t$assoc=mysqli_fetch_assoc($sqlresults);\n\t\t\t\t$sid=$assoc[\"SID\"];\n\t\t\t\t$stitle=htmlspecialchars($assoc[\"Title\"]);\n\t\t\t\t$snsfw=$assoc[\"SNSFW\"];\n\t\t\t\t$shide=(isset($assoc[\"SHide\"]))? $assoc[\"SHide\"] : 0;\n\t\t\t\t$storychunk=formatcontent($assoc, \"story\", $from, $rid, $classcheck, $extra);\n\t\t\t\tif($what==\"stories\") return $storychunk;\n\t\t\t\t//echo \"<p>The story chunk is $storychunk.</p>\";\n\t\t\t}\n\t\t\tif($what==\"comments\" || $what==\"all\"){//do the comment part\n\t\t\t\t$commentchunk=\"\";\n\t\t\t\t$action=($rid)? \"commentform\" : \"commentlogin\";\n\t\t\t\tif($what==\"all\") $commentrows = ($commentresults)? mysqli_num_rows($commentresults) : 0;\n\t\t\t\telse $commentrows = ($sqlresults)? mysqli_num_rows($sqlresults) : 0;\n\t\t\t\tif($commentrows){\n\t\t\t\t\t$indentlevel=0;\n\t\t\t\t\t$rgt=1;//start right here so we don't close any divs\n\t\t\t\t\twhile($commentrows-->0){\n\t\t\t\t\t\tif($what==\"all\") $assoc = mysqli_fetch_assoc($commentresults);\n\t\t\t\t\t\telse $assoc = mysqli_fetch_assoc($sqlresults);\n\t\t\t\t\t\t$cchunk=formatcontent($assoc, \"comment\", $from, $rid, $classcheck, $extra);\n\t\t\t\t\t\t//get the values from the assoc that we'll need to structure the tree\n\t\t\t\t\t\t$cnsfw=$assoc[\"CNSFW\"];\n\t\t\t\t\t\t$chide=(isset($assoc[\"CHide\"]))? $assoc[\"CHide\"] : 0;\n\t\t\t\t\t\t$cid=$assoc[\"CID\"];\n\t\t\t\t\t\t$scid=$assoc[\"SID\"];\n\t\t\t\t\t\t$lft=$assoc[\"Lft\"];\n\t\t\t\t\t\tif($rgt==1){\n\t\t\t\t\t\t\t$commentchunk.=\"<div id=\\\"story.$scid.comments.reply\\\">\".button($action, \"story.$scid.comments.reply\", \"Submit A Comment\");\n\t\t\t\t\t\t\t$commentchunk.=\" \".button(\"hide\", \"story.$scid.comments.hidet\", \"Hide\", \"\", \"story.$scid.comments.hidet\").\"</div>\\n\";//will work first time through\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$divstoclose=$lft-$rgt;//based on previous rgt value\n\t\t\t\t\t\tif($divstoclose>0){\n\t\t\t\t\t\t\t$commentchunk.=closedivs($divstoclose*2);//won't close divs on first or children Times 2 cause closing the comment div and the comment.contents div\n\t\t\t\t\t\t\t$indentlevel=$indentlevel-$divstoclose;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$rgt=$assoc[\"Rgt\"];\n\t\t\t\t\t\tif($indentlevel++>0)$class=\"comment bumpright\";\n\t\t\t\t\t\t$commentbutton=\"<div id=\\\"story.$scid.comment.$cid.reply\\\" class=\\\"reply\\\">\".button($action, \"story.$scid.comment.$cid.reply\", \"Reply\").\"</div>\";\n\t\t\t\t\t\t$cchunk=altwrapper(\"comment\", \"$cchunk $commentbutton\", \"story.$scid.comment.$cid\", $rid, $cnsfw, $nsfwok, $chide, 0, FALSE);\n\t\t\t\t\t\t$commentchunk.=\"\\n<div id=\\\"story.$scid.comment.$cid\\\" class=\\\"comment\\\">$cchunk\";\n\t\t\t\t\t}\n\t\t\t\t\t$commentchunk.=closedivs($indentlevel*2);\n\t\t\t\t}//end of rows\n\t\t\t\telse{//we had no rows\n\t\t\t\t\t//$theassoc=var_export($assoc, TRUE);\n\t\t\t\t\tif($what==\"all\"){\n\t\t\t\t\t\t$commentbutton.=\"<div id=\\\"story.$sid.comments.reply\\\">\".button($action, \"story.$sid.comments.reply\", \"Submit A Comment\");\n\t\t\t\t\t\t$commentbutton.=\" \".button(\"hide\", \"story.$sid.comments.hidet\", \"Hide\", \"\", \"story.$sid.comments.hidet\").\"</div>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$commentbutton.=\"<div id=\\\"story.$page.comments.reply\\\">\".button($action, \"story.$page.comments.reply\", \"Submit A Comment\");\n\t\t\t\t\t\t$commentbutton.=\" \".button(\"hide\", \"story.$page.comments.hidet\", \"Hide\", \"\", \"story.$page.comments.hidet\").\"</div>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t$commentchunk.=$commentbutton;\n\t\t\t\t}\n\t\t\t\tif($what==\"comments\") return $commentchunk;\n\t\t\t\t//echo \"<p>The comment chunk is $commentchunk.</p>\";\n\t\t\t}\n\t\t\tif($what==\"tags\" || $what==\"all\"){//do the story part\n\t\t\t\t$divid=($what==\"all\")? \"story.$sid.tags\" : \"story.$page.tags\";//using page to contain the story id when not all\n\t\t\t\tif($what==\"all\")$tagrows = ($tagresults)? mysqli_num_rows($tagresults) : 0;\n\t\t\t\telse $tagrows = ($sqlresults)? mysqli_num_rows($sqlresults) : 0;\n\t\t\t\t$tagchunk=button(\"tag\", \"$divid.hide\", \"Hide\", \"closer\");\n\t\t\t\tif($tagrows){\n\t\t\t\t\tif($what==\"all\") $tagchunk.=formatcontent($tagresults, \"tag\", $from, $rid, $classcheck, $extra);\n\t\t\t\t\telse $tagchunk.=formatcontent($sqlresults, \"tag\", $from, $rid, $classcheck, $extra);\n\t\t\t\t}\n\t\t\t\telse $tagchunk.=\"There are no tags yet.\";\n\t\t\t\t$tagchunk.=\"<br>\";\n\t\t\t\t$tagchunk.=($rid)? createform(\"tags\", \"$divid\") : \"Please, login to submit tags.\";\n\t\t\t\tif($what==\"tags\") return $tagchunk;\n\t\t\t}\n\t\t\tif($what==\"all\"){//return the appropriate contents\n\t\t\t\t//wrap the comments\n\t\t\t\t$commentchunk=altwrapper(\"commentgroup\", $commentchunk, \"story.$sid.comments\", 0, 0, 0, 0, 0, TRUE);//don't need fancy options for the comments container\n\t\t\t\t$commentchunk=\"<div id=\\\"story.$sid.comments\\\" class=\\\"comments\\\">$commentchunk</div>\";\n\t\t\t\t//wrap the tags, story, and comments\n\t\t\t\t$tagchunk=opendiv(\"tags\", \"story.$sid.tags\", \"tags\").$tagchunk.closedivs(1);\n\t\t\t\t$allchunk=$tagchunk.$storychunk.$commentchunk;\n\t\t\t\t//$allchunk=<<<END\n\t\t\t\t\t//<div id=\"story.$sid.tagwrapper\" class=\"tagwrapper\">Tags<div id=\"story.$sid.tags\"> $tagchunk </div>Submit A Tag</div>\n\t\t\t\t\t//$storychunk\n\t\t\t\t\t//$allchunk\n//END;\n\t\t\t\t$allchunk=altwrapper(\"story\", $allchunk, \"story.$sid\", $rid, $snsfw, $nsfwok, $shide, (($extra=='show')? 1 : 0), TRUE);\n\t\t\t\t\n\t\t\t\t$body=<<<END\n<div id=\"story.$sid\" class=\"story\"> \n\t$allchunk\n</div>\nEND;\n\t\t\t\t$body.=advert('storyend');\n\t\t\t\treturn array(\"body\"=>$body, \"title\"=>$stitle);//getting all from stories is special\n\t\t\t\t\t//we return an array instead of a single string\n\t\t\t\t\t//we return the array to get the appropriate title for the story to display in the headers\n\t\t\t}\n\t\t}//end from == story\n\t\telseif($what==\"vote\"){//just getting the votes\n\t\t\t//need divid and sig that's it from contains the divid information\n\t\t\t$assoc=mysqli_fetch_assoc($sqlresults);//has sig\n\t\t\t$assoc[\"divid\"]=$from;\n\t\t\t//echo \"<p>rid is $rid.</p>\";\n\t\t\treturn formatcontent($assoc, \"vote\", $from, $rid, $classcheck, $extra);\n\t\t}\n\t\telseif($what==\"classesattendingoptions\"){\n\t\t\t$chunk=\"\\n\\t<option value=\\\"0\\\" selected=\\\"selected\\\">No Class Selected</option>\";\n\t\t\twhile($assoc=mysqli_fetch_assoc($sqlresults)){\n\t\t\t\t$chunk.=\"\\n\\t<option value=\\\"\".$assoc['ID'].\"\\\">\".htmlspecialchars($assoc['ClassName']).\"</option>\";\n\t\t\t}\n\t\t\treturn $chunk;\n\t\t}\n\t\telseif($what==\"comments\" && $from==\"comment\"){//just getting a single comment\n\t\t\t$assoc=mysqli_fetch_assoc($sqlresults);\n\t\t\t$sid=$assoc[\"SID\"];\n\t\t\t$cid=$assoc[\"CID\"];\n\t\t\t$divid=\"story.$sid.comment.$cid\";\n\t\t\t//$theassoc=var_export($assoc, TRUE);\n\t\t\t$chunk=formatcontent($assoc, \"comment\", $from, $rid, $classcheck, $extra);\n\t\t\t$action=($rid)? \"commentform\" : \"commentlogin\";\n\t\t\t$chunk.=\" <div id=\\\"$divid.reply\\\" class=\\\"reply\\\">\".button($action, \"story.$sid.comment.$cid.reply\", \"Reply\").\"</div>\";\n\t\t\t$chunk=\"<div id=\\\"$divid\\\" class=\\\"comment\\\">\".altwrapper(\"comment\", $chunk, \"$divid\", $rid, 0, 0, 0, 0, TRUE).\"</div>\";\n\t\t\treturn $chunk;\n\t\t}\n\t\telse{//we're getting stories and potentially comments that go with them\n\t\t\t$counter=0;\n\t\t\t$limit=($from=='search')? 30 : 15;//limit number of stories on a page make sure this is the same as in getcontents\n\t\t\t$allchunk=\"\";\n\t\t\tdo{\n\t\t\t\t$counter++;\n\t\t\t\t//get the chunk for the story\n\t\t\t\t$assoc=mysqli_fetch_assoc($sqlresults);\n\t\t\t\t$sid=$assoc[\"SID\"];\n\t\t\t\t$snsfw=$assoc[\"SNSFW\"];\n\t\t\t\t$shide=(isset($assoc[\"SHide\"]))? $assoc[\"SHide\"] : 0;\n\t\t\t\t$storychunk=formatcontent($assoc, \"story\", $from, $rid, $classcheck, $extra);\n\t\t\t\t\n\t\t\t\t//get the chunk for the comments if any\n\t\t\t\t//$commentchunk=\"<div id=\\\"story.$sid.comments\\\" class=\\\"comments\\\">\";\n\t\t\t\t$commentchunk=\"\";\n\t\t\t\tif(($what==\"all\" || $what==\"comments\") && $assoc[\"CID\"]!=0){\n\t\t\t\t\t$cid=$assoc[\"CID\"];\n\t\t\t\t\t$cnsfw=$assoc[\"CNSFW\"];\n\t\t\t\t\t$ncs=$assoc[\"NCs\"];\n\t\t\t\t\tswitch($from){\n\t\t\t\t\t\tcase \"feed\":\n\t\t\t\t\t\t\t$commentchunk.=\"Your collabor8rs have commented on this story $ncs times. Below is the most recent. \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"self\":\n\t\t\t\t\t\t\t$commentchunk.=\"You have commented on this story $ncs times. Below is the most recent. \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"user\":\n\t\t\t\t\t\t\t$commentchunk.=\"This user has commented on this story $ncs times. Below is the most recent. \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"classes\":\n\t\t\t\t\t\t\t$commentchunk.=\"Your students have commented on this story $ncs times. Below is the most recent. \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"class\":\n\t\t\t\t\t\t\t$commentchunk.=\"Your students from this class have commented on this story $ncs times. Below is the most recent. \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$commentchunk.=button(\"commentsshow\", \"story.$sid.comments\", \"View All\", \"inline\").\"<div id=\\\"story.$sid.comment.$cid\\\" class=\\\"comment\\\">\";\n\t\t\t\t\t$cchunk=formatcontent($assoc, \"comment\", $from, $rid, $classcheck, $extra);\n\t\t\t\t\t$cchunk=altwrapper(\"comment\", $cchunk, \"story.$sid.comment.$cid\", $rid, $cnsfw, $nsfwok, 0, 0, TRUE);\n\t\t\t\t\t$commentchunk.=$cchunk.closedivs(1);\n\t\t\t\t}//end getting comments chunk\n\t\t\t\telse $commentchunk.=button(\"commentsshow\", \"story.$sid.comments\", \"View Comments\", \"inline\");\n\t\t\t\t//wrap up the comment chunk\n\t\t\t\t$commentchunk=altwrapper(\"commentgroup\", $commentchunk, \"story.$sid.comments\", 0, 0, 0, 0, 0, TRUE);\n\t\t\t\t$commentchunk=\"<div id=\\\"story.$sid.comments\\\" class=\\\"comments\\\">$commentchunk</div>\";\n\t\t\t\t//put everything together\n\t\t\t\t//wrap up the tag spacer, story, and comments\n\t\t\t\t$storychunk=<<<END\n<div id=\"story.$sid.tags\" class=\"tags nodisplay\"></div>\n$storychunk\n$commentchunk\nEND;\n\t\t\t\t$storychunk=altwrapper(\"story\", $storychunk, \"story.$sid\", $rid, $snsfw, $nsfwok, $shide, (($extra=='show')? 1 : 0), TRUE);\n\t\t\t\t\n\t\t\t\t$allchunk.=<<<END\n<div id=\"story.$sid\" class=\"story\"> \n$storychunk\n</div>\nEND;\n\t\t\t}while($counter<$rows && $counter<$limit);//end do while\n\t\t\tif($counter>8)$allchunk.=advert('storiesend');\n\t\t\t$allchunk.='<div class=\"center\">';\n\t\t\tif($page>1){\n\t\t\t\t$canurl=substr($canurl, 0, strrpos($canurl, '/', -6)).'/';//-6 skip pageX/ don't do more cause don't know if X has more than 1 digit\n\t\t\t\tif($page>2)$allchunk.=createlink('haveurl', $canurl.'page'.($page-1), '<--');//we have earlier pages the user could request\n\t\t\t\telse $allchunk.=createlink('haveurl', $canurl, '<--');\n\t\t\t}\n\t\t\t$allchunk.=' Page '.$page++.' ';//always show the current page\n\t\t\tif($rows>$limit)$allchunk.=createlink('haveurl', $canurl.'page'.$page, '-->');//we have more pages the user to request\n\t\t\t$allchunk.='</div>';\n\t\t}//end else (i.e. not from==story and not what==summary)\n\t\treturn $allchunk;\n\t}//end we had rows\n\telse{//we had no rows do something to indicate there were no results\n\t\tif($from==\"story\"){\n\t\t\tif($what==\"all\" || $what==\"stories\") return FALSE;\n\t\t\tif($what==\"comments\"){\n\t\t\t\t$action=($rid)? \"commentform\" : \"commentlogin\";\n\t\t\t\t//$theassoc=var_export($assoc, TRUE);\n\t\t\t\t$chunk=\"<div id=\\\"story.$page.comments.reply\\\">There are no comments on this story yet. \";//we're getting comments directly so the story id should be stored in $page\n\t\t\t\t$chunk.=button($action, \"story.$page.comments.reply\", \"Submit A Comment\");\n\t\t\t\t$chunk.=\" \".button(\"hide\", \"story.$page.comments.hidet\", \"Hide\", \"\", \"story.$page.comments.hidet\").\"</div>\";\n\t\t\t\treturn $chunk;\n\t\t\t}\n\t\t\tif($what==\"tags\"){\n\t\t\t\t$chunk=button(\"tag\", \"story.$page.tags.hide\", \"Hide\", \"closer\").\"There are no tags yet.<br>\";\n\t\t\t\tif($rid)$chunk.=createform(\"tags\", \"story.$page.tags\");\n\t\t\t\telse $chunk.=\"Please, login to submit tags.\";\n\t\t\t\treturn $chunk;\n\t\t\t}\n\t\t}\n\t\telse return FALSE;\n\t}\n}", "public function query($query) {\n\t\t$this->set_query($query);\n\t\treturn $this->output();\n\t}", "private function executeQuery()\n {\n // $fresults = $this->qb->getQuery()->getResult(Query::HYDRATE_ARRAY);\n $query = $this->qb->getQuery();\n $query->setHydrationMode(Query::HYDRATE_ARRAY);\n $fresults = new Paginator($query, true);\n $output = array(\"aaData\" => array());\n\n foreach ($fresults as $item) {\n $output['aaData'][] = $item;\n }\n\n $outputHeader = array(\n \"sEcho\" => $this->sEcho,\n \"iTotalRecords\" => $this->getCountAllResults(),\n \"iTotalDisplayRecords\" => $this->getCountFilteredResults()\n );\n\n $this->response = array_merge($outputHeader, $output);\n\n return $this;\n }", "function query() {\n }", "function getQueryResult() {\n $config = $this->call_asset['configuration']['filter'];\n $result = '';\n\n if ($config['restrict'] == 'typeid') {\n // By chado.table type_id column.\n $result = $this->class_name::getResultByTypeid();\n }\n elseif ($config['restrict'] == 'prop') {\n // By chado.prop table value column.\n $result = $this->class_name::getResultByPropertyTable();\n }\n else {\n // Unfiltered result.\n $result = $this->class_name::getResult();\n }\n\n return $result;\n }", "function query() {\n $this->ensure_my_table();\n switch ($this->options['granularity']) {\n case 'second':\n default:\n $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);\n return;\n case 'minute':\n $formula = views_date_sql_format('YmdHi', \"$this->table_alias.$this->real_field\");\n break;\n case 'hour':\n $formula = views_date_sql_format('YmdH', \"$this->table_alias.$this->real_field\");\n break;\n case 'day':\n $formula = views_date_sql_format('Ymd', \"$this->table_alias.$this->real_field\");\n break;\n case 'month':\n $formula = views_date_sql_format('Ym', \"$this->table_alias.$this->real_field\");\n break;\n case 'year':\n $formula = views_date_sql_format('Y', \"$this->table_alias.$this->real_field\");\n break;\n }\n\n // Add the field.\n $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']);\n }", "public function query();", "public function query();", "public function query();", "public static function query();", "abstract public function query(Query $query): Result;", "public function formatQuery($sql) {\r\n\t\t//regex work with a lookahead to avoid splitting things inside single quotes\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(WHERE|FROM|GROUP BY|HAVING|ORDER BY|LIMIT|OFFSET|UNION|DUPLICATE KEY)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n$0\", $sql\r\n\t\t);\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(INNER|LEFT|RIGHT|CASE|WHEN|END|ELSE|AND)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n $0\", $sql);\r\n\t\treturn $sql;\r\n\t}", "function printResultForAggregation($result) {\n while (($row = oci_fetch_array($result)) != false) {\n echo \"<p class=\\\"wrapper\\\">\";\n echo $row[1];\n echo \": \";\n echo $row[0];\n echo \"</p>\";\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 }", "public function query()\n {\n }", "function queryToOutput($query,$parameters=NULL,$tableName=NULL,$setName=NULL,$outputType='json')\r\n\t{\r\n\t\t$qResult = mysql_query($query,$GLOBALS['link']);\r\n//If no parameters we generate the parameters.\r\n\t\tif (!isset($parameters))\r\n\t\t\t$parameters = returnParameters($tableName,$setName,$_REQUEST['columns']);\r\n\t\tif (!$parameters['caption']) $parameters['caption'] = 'aV DBGrid';\r\n\t\tif (!$_REQUEST['export'])\r\n\t\t{\r\n\t\t\tif ($outputType=='xml')\r\n\t\t\t{\r\n\t\t\t\trequire_once('../../php/xml_functions.php');\r\n\t\t\t\tHeader(\"Content-type: application/xml; charset=UTF-8;\");\r\n\t\t\t\treturn qResultToSXML($qResult,$parameters);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tHeader(\"Content-type: application/json; charset=UTF-8;\");\r\n//When returnParameters is called with only tableName allFields are received.\r\n\t\t\t\treturn queryResultToJSON($qResult,$parameters,returnParameters($tableName));\r\n\t\t\t}\t\r\n\t\t};\r\n//$fields is $field_name=>$field_alias associated array. Without properties like hidden, dontSum since they are only used in DBGrid.\r\n\t\t$fields = extractFields($parameters);\r\n\t\trequire_once(\"../../php/excel_functions.php\");\r\n\t\tswitch ($_REQUEST['export'])\r\n\t\t{\r\n\t\t\tcase 'xls':\r\n\t\t\t\theader(\"Content-type: application/x-msexcel\");\r\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$parameters['caption'].'.xls\"');\r\n\t\t\t\treturn resultToExcel($qResult,$fields,$parameters['tableName']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'xlsb':\r\n\t\t\t\theader(\"Content-type: application/x-msexcel\");\r\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$parameters['caption'].'.xls\"'); \r\n\t\t\t\treturn resultToExcel($qResult,$fields,$parameters['tableName'],false);\r\n\t\t\tbreak;\r\n\t\t\tcase 'xml':\r\n\t\t\t\trequire_once('../../php/xml_functions.php');\r\n\t\t\t\theader(\"Content-type: application/xml; charset=UTF-8;\");\r\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$parameters['caption'].'.xml\"'); \r\n\t\t\t\treturn qResultToSXML($qResult,$parameters);\r\n\t\t\tbreak;\r\n\t\t\tcase 'json':\r\n\t\t\t\theader(\"Content-type: application/json; charset=UTF-8;\");\r\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$parameters['caption'].'.json\"'); \r\n\t\t\t\treturn queryResultToJSON($qResult,$parameters);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function __toString() {\n // to do it. This allows constructs like \"(string) $query\" to work. When\n // the query will be executed, it will be recompiled using the proper\n // placeholder generator anyway.\n if (!$this->compiled()) {\n $this->compile($this->connection, $this);\n }\n\n // Create a sanitized comment string to prepend to the query.\n $comments = $this->connection->makeComment($this->comments);\n\n // SELECT\n $query = $comments . 'SELECT ';\n if ($this->distinct) {\n $query .= 'DISTINCT ';\n }\n\n // FIELDS and EXPRESSIONS\n $fields = array();\n foreach ($this->tables as $alias => $table) {\n if (!empty($table['all_fields'])) {\n $fields[] = $this->connection->escapeTable($alias) . '.*';\n }\n }\n foreach ($this->fields as $alias => $field) {\n // Always use the AS keyword for field aliases, as some\n // databases require it (e.g., PostgreSQL).\n $fields[] = (isset($field['table']) ? $this->connection->escapeTable($field['table']) . '.' : '') . $this->connection->escapeField($field['field']) . ' AS ' . $this->connection->escapeAlias($field['alias']);\n }\n foreach ($this->expressions as $alias => $expression) {\n $fields[] = $expression['expression'] . ' AS ' . $this->connection->escapeAlias($expression['alias']);\n }\n $query .= implode(', ', $fields);\n\n\n // FROM - We presume all queries have a FROM, as any query that doesn't won't need the query builder anyway.\n $query .= \"\\nFROM \";\n foreach ($this->tables as $alias => $table) {\n $query .= \"\\n\";\n if (isset($table['join type'])) {\n $query .= $table['join type'] . ' JOIN ';\n }\n\n // If the table is a subquery, compile it and integrate it into this query.\n if ($table['table'] instanceof SelectQueryInterface) {\n // Run preparation steps on this sub-query before converting to string.\n $subquery = $table['table'];\n $subquery->preExecute();\n $table_string = '(' . (string) $subquery . ')';\n }\n else {\n $table_string = '{' . $this->connection->escapeTable($table['table']) . '}';\n }\n\n // Don't use the AS keyword for table aliases, as some\n // databases don't support it (e.g., Oracle).\n $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']);\n\n if (!empty($table['condition'])) {\n $query .= ' ON ' . $table['condition'];\n }\n }\n\n // WHERE\n if (count($this->where)) {\n // There is an implicit string cast on $this->condition.\n $query .= \"\\nWHERE \" . $this->where;\n }\n\n // GROUP BY\n if ($this->group) {\n $query .= \"\\nGROUP BY \" . implode(', ', $this->group);\n }\n\n // HAVING\n if (count($this->having)) {\n // There is an implicit string cast on $this->having.\n $query .= \"\\nHAVING \" . $this->having;\n }\n\n // ORDER BY\n if ($this->order) {\n $query .= \"\\nORDER BY \";\n $fields = array();\n foreach ($this->order as $field => $direction) {\n $fields[] = $field . ' ' . $direction;\n }\n $query .= implode(', ', $fields);\n }\n\n // RANGE\n // There is no universal SQL standard for handling range or limit clauses.\n // Fortunately, all core-supported databases use the same range syntax.\n // Databases that need a different syntax can override this method and\n // do whatever alternate logic they need to.\n if (!empty($this->range)) {\n if($this->range['start']) {\n $query .= \"\\nROWS \" . (int) $this->range['length'] . \" TO \" . (int) $this->range['start'] + (int) $this->range['length'];\n } else {\n $query .= \"\\nROWS \" . (int) $this->range['length']; \n }\n }\n\n // UNION is a little odd, as the select queries to combine are passed into\n // this query, but syntactically they all end up on the same level.\n if ($this->union) {\n foreach ($this->union as $union) {\n $query .= ' ' . $union['type'] . ' ' . (string) $union['query'];\n }\n }\n\n if ($this->forUpdate) {\n $query .= ' FOR UPDATE';\n }\n\n return $query;\n }", "public function resultAll($table_format = null, $header_format = null, $row_format = null, $cell_format = null)\n {\n return sasql_result_all($this->result, $table_format, $header_format, $row_format, $cell_format);\n }", "private function executeSingleResultQuery($query){\n\t\t// Perform Query.\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// Fetch row.\n\t\t$result_row = mysql_fetch_row($result);\n\t\t\n\t\t// Return theme name\n\t\treturn json_encode($result_row);\n\t}", "private function beginQuery() {\n $this->sql = 'SELECT sum(inv_total_cost) as total_cost,id,businessname,email,businesstelephone,'\n . 'IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0) as pfp_import,'\n . 'ROUND((sum(inv_total_cost) - IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0)), 2) as overdue '\n . 'FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id) AS derived_booking_invoice '\n . 'LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id WHERE agenti.status=\"active\" ';\n }", "function searchRowGenericFormat($r, $resultAsTitle=false) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<div class='result_info'>\n\t<h3>{$r['content_title']}</h3>\n\t<if test=\"showGenericContent:|:!$resultAsTitle\">\n\t<p>\n\t\t{$r['content']}\n\t</p>\n\t</if>\n</div>\n<if test=\"$r['updated'] OR $r['member_id']\">\n\t<div class='result_details desc'>\n\t\t<ul>\n\t\t\t<if test=\"$r['updated']\">\n\t\t\t\t<li>{parse date=\"$r['updated']\" format=\"short\"}</li>\n\t\t\t</if>\n\t\t\t<if test=\"$r['member_id']\">\n\t\t\t\t<li>{$this->lang->words['search_by']} <a href='{parse url=\"showuser={$r['member_id']}\" template=\"showuser\" seotitle=\"{$r['members_seo_name']}\" base=\"public\"}'>{$r['members_display_name']}</a></li>\n\t\t\t</if>\n\t\t</ul>\n\t</div>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public function formatSql($sql)\n {\n // Replace disturbing selected fields by an *\n $sql = preg_replace('/SELECT (.*) FROM/', 'SELECT <span style=\"display: none;\" class=\"select\">$1</span> FROM', $sql);\n\n // Add colors\n $sql = preg_replace('/\\b(SELECT|LIMIT|ASC|COUNT|DESC|IN|LIKE|DISTINCT)\\b/', '<span class=\"sfWebDebugLogInfo\">\\\\1</span>', $sql);\n\n // Add colors and line breaks\n $sql = preg_replace('/\\b(UPDATE|SET|FROM|WHERE|LEFT JOIN|INNER JOIN|RIGHT JOIN|ORDER BY|GROUP BY|DELETE|INSERT|INTO|VALUES)\\b/', '<br/><span class=\"sfWebDebugLogInfo\">\\\\1</span>', $sql);\n \n return $sql;\n }", "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "function addQuery() {}", "function displayResult($result, $sql) {\n if ($result->num_rows > 0) {\n echo \"<table border='1'>\\n\";\n // print headings (field names)\n $heading = $result->fetch_assoc( );\n echo \"<tr>\\n\";\n // print field names \n foreach($heading as $key=>$value){\n echo \"<th>\" . $key . \"</th>\\n\";\n }\n echo \"</tr>\\n\";\n \n // Print values for the first row\n echo \"<tr>\\n\";\n foreach($heading as $key=>$value){\n echo \"<td>\" . $value . \"</td>\\n\";\n }\n \n // output rest of the records\n while($row = $result->fetch_assoc()) {\n //print_r($row);\n //echo \"<br />\";\n echo \"<tr>\\n\";\n // print data\n foreach($row as $key=>$value) {\n echo \"<td>\" . $value . \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n } else {\n echo \"<strong>zero results using SQL: </strong>\" . $sql;\n }\n }", "public function getResult() {\n\t\t$output = \"<ul>\";\n\n\t\tfor ($i = 0; $i < count($this->items); $i++) {\n\t\t\tif (!isset($this->items[$i]['after'])) continue;\n\t\t\t$output .= \"<li><b>\".$this->items[$i]['text'].\"</b><br />start: \".$this->items[$i]['start'].\"; end: \".$this->items[$i]['end'].\"; exec time: \".$this->items[$i]['use'].\"</li>\";\t\n\t\t}\n\n\t\t$output .= \"<li><b>\".$this->queryCount.\" sql queries.</b><br />total exec time: \".$this->compareMicrotimes($this->startTime, self::getMicrotime()).\"; for sql queries: \".$this->queryTime.\";</li>\";\n\t\t$output .= \"</ul>\";\n\t\treturn $output;\n\t}", "public function display()\n {\n if ($this->_query == '')\n {\n WCFDataServicesEntity::displayEntities();\n }\n else\n {\n WCFDataServicesEntity::displayEntityData();\n }\n }", "public function resultParser() {\n return request()->get('getAll') ? 'all' : 'paginate';\n }", "public function query($query) {\n\t\t\t$this->sqlError = false;\n\t\t\t$this->sqlErrorNumber = false;\n\t\t\t$this->foundRows = false;\n\t\t\t$this->rowCount = false;\n\t\t\t$this->insertID = false;\n\t\t\tif (substr($query, -1, 1) != ';') $query .= ';';\n\t\t\t$result = mysql_query($query);\n\t\t\tif (mysql_error()) {\n\t\t\t\t$this->sqlError = mysql_error();\n\t\t\t\t$this->sqlErrorNumber = mysql_errno();\n\t\t\t\ttrigger_error('Query Failed: '.$this->sqlError.' <===> Query: '.htmlentities($query), E_USER_ERROR);\n\t\t\t\t$resultObj = new result(false, $this->rowCount, $this->foundRows, $this->insertID, $this->sqlError, $this->sqlErrorNumber);\n\t\t\t\treturn $resultObj;\n\t\t\t} else {\n\t\t\t\t$this->rowCount = strpos($query, 'SELECT') === 0 ? mysql_num_rows($result) : mysql_affected_rows();\n\t\t\t\tif (strpos($query, 'INSERT') === 0) $this->insertID = mysql_insert_id();\n\t\t\t\tif (strpos($query, 'SQL_CALC_FOUND_ROWS') !== false) {\n\t\t\t\t\t$this->foundRows = mysql_result(mysql_query(\"SELECT FOUND_ROWS()\"), 0);\n\t\t\t\t} else {\n\t\t\t\t\t$this->foundRows = $this->rowCount;\n\t\t\t\t}\n\t\t\t\tdebug(htmlentities($query).'<br>Found Rows: '.$this->foundRows.' | Row Count: '.$this->rowCount.' | Insert ID: '.$this->insertID, 'Query Executed', 'echo', 'sql');\n\t\t\t\t$resultObj = new result($result, $this->rowCount, $this->foundRows, $this->insertID, $this->sqlError, $this->sqlErrorNumber);\n\t\t\t\treturn $resultObj;\n\t\t\t}\n\t\t}", "public function get_results($query = \\null, $output = \\OBJECT)\n {\n }", "protected function formatResponse($preparedQuery, $type = \"select\") {\n if($preparedQuery['status']){\n if($type == \"select\"){\n for($c = 0; $c < count($preparedQuery['results']); $c++){\n $response_array['results'][] = array($preparedQuery['results'][$c]['title'] => $preparedQuery['results'][$c]['id']);\n } \n $response_array['status'] = 'success';\n } elseif($type === \"insert\" or $type === \"update\" or $type === 'drop') {\n $response_array['status'] = 'success';\n } elseif($type == 'getbf'){\n $response_array['status'] = 'success';\n $response_array['id'] = $preparedQuery[\"results\"][0]['id'];\n $response_array['area_id'] = $preparedQuery[\"results\"][0]['area_id'];\n $response_array['title'] = $preparedQuery[\"results\"][0]['title'];\n $response_array['body'] = stripslashes($preparedQuery[\"results\"][0]['body']);\n $response_array['file_under'] = strtoupper($preparedQuery[\"results\"][0]['file_under']);\n }\n } elseif($type == 'update'){\n $response_array['status'] = 'no change (else_error)'; \n } else {\n $response_array['status'] = 'else_error'; \n }\n\n return $response_array;\n }", "public function processSelect(Builder $query, $results);", "function stream_results(){\r\n // \r\n //Get all the subjects that this student is taught \r\n $subjects= $this->get_student($stream, $grade, $year);\r\n //\r\n $sql= \"select student.name as name\";\r\n // \r\n //Appends every subjects name\r\n foreach ($subjects as $value) {\r\n //\r\n $sql.\"{$value}.score as $value\"; \r\n }\r\n \r\n }", "public function query($query = \"NONEE\"){\n\t\t\n\t\tif($update = $query === \"NONEE\")\n\t\t\t$query = $this->query; \t\t\t\t\t\n\t\t\n\t\t$this->query_total++;\n\t\t\n\t\t$query_check = trim($query);\n\t\t\n\t\tif($this->debug){\n\t\t\techo \"<br/><strong style=\\\"color:#E4C100\\\">&lt;DEBUG&gt;</strong><br/>\";\n\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#D3C26E;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : \"\";\n\t\t\techo \"<span style=\\\"color:#E4C100\\\">\".$query.\"</span><br/><strong style=\\\"color:#E4C100\\\">&lt;/DEBUG&gt;</strong><br/>\";\n\t\t}\n\t\t\n\t\t$resultset = $this->showErrors ? mysqli_query($this->connection,$query) : @mysqli_query($this->connection,$query);\n\t\t\n\t\t$proceed_log = $this->log && ( \n\t\t(stripos($query_check,\"INSERT\") === 0 && $this->log_options{0} === '1')\n\t\t||\n\t\t(stripos($query_check,\"DELETE\") === 0 && $this->log_options{1} === '1')\n\t\t||\n\t\t(stripos($query_check,\"UPDATE\") === 0 && $this->log_options{2} === '1')\n\t\t||\n\t\t(stripos($query_check,\"SELECT\") === 0 && $this->log_options{3} === '1'));\n\t\t\n\t\tif(stripos($query_check,\"INSERT\") === 0 || stripos($query_check,\"DELETE\") === 0 || stripos($query_check,\"UPDATE\") === 0)\n\t\t\tif(!$resultset)\n\t\t\t\t$this->transaction = false;\n\t\t\n\t\tif($proceed_log){\n\t\t\t$log_fields = \"query,date,user\";\n\t\t\t$log_values=\"'\".$this->secure($query).\"',NOW(),\".$this->log_user;\n\t\t}\n\t\t\n\t\tif(!$resultset){\n\t\t\tif($this->showErrors){ \n\t\t\t\techo \"<br/><strong style=\\\"color:red\\\">&lt;QERROR&gt;</strong><br/>\";\n\t\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#E88888;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : $this->comment.\"nada\";\n\t\t\t\techo \"<span style=\\\"color:red\\\">\".mysqli_error($this->connection).\" at \".$query_check.\"</span><br/><strong style=\\\"color:red\\\">&lt;/QERROR&gt;</strong><br/>\";\n\t\t\t}\n\t\t\tif($proceed_log){\n\t\t\t\t$log_fields .= \",error\";\n\t\t\t\t$log_values .= \",'\".mysqli_error($this->connection).\"'\";\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($proceed_log){\t\t\t\n\t\t\t@mysqli_query($this->connection,\"INSERT INTO \".$this->log_table.\"($log_fields) VALUES($log_values)\");\n\t\t}\n\t\t\n\t\tif(!$resultset && $this->closeOnError) \n\t\t\texit;\n\t\t\n\t\tif($update)\n\t\t\t$this->resultset = $resultset;\n\t\t\n\t\treturn $resultset; \n\t}", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public function query($query){ \n\t\tif($r = $this->mysqli->query($query)){\n\t\t\t$rows = array();\n\t\t\twhile(is_object($r) && $row = $r->fetch_assoc()){\n\t\t\t\t$rows[]= $row;\n\t\t\t}\n\t\t\t$result = new DB_result($rows, $query);\n\t\t\treturn $result;\n\t\t}\n\t\techo $this->mysqli->error . \"<br><br>\";\n\t\tdie(\"{$query}\");\n\n\t}", "function render() {\n\t\t$sql = array();\n\t\tforeach ($this->stmts as $type => $stmts) {\n\t\t\tswitch($type) {\n\t\t\t\tcase \"select\":\n\t\t\t\tcase \"select distinct\":\n\t\t\t\t\t$sql[] = strToUpper($type) . \" \" . implode($stmts, \"\\n\") . \" FROM \".implode($this->from, \", \");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sql[] = implode($stmts, \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn implode($sql, \"\\n\").\";\";\n\t}", "public function renderAction(\\TYPO3\\Semantic\\Domain\\Model\\Sparql\\Query $query) {\n\t\t$this->view->assign('results', $query->execute());\n\t}", "public function getQuery(){\n $sql = \"select %s from %s %s %s %s %s %s\";\n\n return sprintf($sql, $this->param, $this->table,\n empty($this->join) ? '' : implode($this->join),\n empty($this->where) ? '' : 'where '. $this->where,\n empty($this->having)? '' : 'having '. $this->having,\n empty($this->order) ? '' : 'order by '. $this->order,\n empty($this->setOperations) ? '' : implode($this->setOperations)\n );\n }", "function html_results( $cur, $fmt = 1, $link_col = 0, $link = '', $show_no_rows = 1 ){\n if( $fmt ){\n u::p('<style>table td {white-space: nowrap;border: 1px solid silver;font-family:Courier New}</style>');\n u::p('<table>');\n }else{\n u::p('<pre>');\n }\n $print_header = 1;\n $rows_fetched = 0;\n while ( $rec = oci_fetch_object( $cur ) ){\n $rows_fetched++;\n if( $fmt ) u::p('<tr>');\n #\n # Display column headers\n #\n if( $print_header ){\n if( $fmt ) u::p('<tr>');\n foreach ( $rec as $key => $val ){ \n if( $fmt ){\n u::th($key, 'style=\"background-color:silver;color:white\"');\n }else{\n u::p($key);\n }\n }\n if( $fmt ) u::p('</tr>');\n $print_header = 0;\n }\n #\n # Row data\n #\n if( $fmt ) u::p('<tr>');\n $col = 0;\n foreach ( $rec as $key => $val ){ \n $col++;\n if( $col === $link_col ) $val = u::a( $val, str_replace( '__VAL__', $val, $link ), 1 );\n if( $fmt ){\n #\n # Extra formatting?\n #\n if( $val == 'CRITICAL' ){\n $extra = 'style=\"background-color:red;\"';\n }else{\n $extra = '';\n }\n u::td($val,$extra); \n }else{\n u::p($val);\n }\n }\n if( $fmt ) u::p('</tr>');\n }\n oci_free_statement($cur);\n if( !$rows_fetched and $fmt and $show_no_rows ) u::trtd('No Rows Returned CRITICAL','style=\"background-color:red;\"');\n if( $fmt ){\n u::p('</table>');\n }else{\n u::p('</pre>');\n }\n }", "public function queryEditWide($query) {\n\t\tif (strlen(stristr($query,\"limit\"))>0) { \n\t\t\t$query=str_replace(\"limit\",\"LIMIT\",$query);\n\t\t\t$q=explode(\"LIMIT\",$query);\n\t\t\t//is it 'LIMIT x,y' or just 'LIMIT x'?\n\t\t\tif (strlen(stristr($q[1],\",\"))>0) { \n\t\t\t\t//It is 'LIMIT x,y'\n\t\t\t\t$sc=explode(\",\",$q[1]);\n\t\t\t\t$start=$sc[0];\n\t\t\t\t$limit=\" LIMIT \" . $start . \", 1\";\n\t\t\t} else {\n\t\t\t\t//It is 'LIMIT x'\n\t\t\t\t$limit=\"LIMIT 1\";\n\t\t\t}\n\t\t\t$query=$q[0];\n\t\t} else {\n\t\t\t$query=$query . \" limit 1\";\n\t\t}\n\t\t$first=true;\n\t\t$table = '<style>';\n\t\t$table .= '.table_custom{margin:auto;left:0;right:0;margin:auto;color:#333; background:#fff; font-size:0.8em!Important;text-shadow:1px 1px 1px #fff} .table_header{color:#fff;background:#000;text-shadow:none} .table_row{background:aliceblue; color:#333; text-shadow:2px 2px 0px #fff} .table_row_alt{color:#000;background:#fff}';\n\t\t$table .= '</style>';\n\t\t$x=0; $first_row = true;\n\t\t$header = \"<div class='container' style='max-width:100%;margin-top:10px;padding:0'>\";\t\n\t\t$arr=explode(\"from \",$query); \n\t\t$t=explode(\" \",$arr[1])[0];\n\t\t$t=\"'\" . $t . \"'\";\n\t\t$f = $this->strAB('select','from', $query);\n\t\t$f = explode(',', $f);\n\t\t$f = $this->_sql_arr($query . $limit);\n\t\t$table .= $header;\n\t\t$rows = count($f);\n\t\tforeach($f[0] as $_key => $_value)\t{\n\t\t\t$colCnt++;\n\t\t}\n\t\t$bg=\"white\";\n\t\tfor($c=0; $c <= $rows-1; $c++){\n\t\t\t$class = ($x==0) ? 'table_row' : 'table_row_alt';\n\t\t\t$x = ($x == 1) ? 0 : 1;\n\t\t\t$colCnt=0;\t\t$ctr=0;\n\t\t\t\t\tif ($first) {\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t\t$colCnt++;\n\t\t\t\t\t\tforeach($f[$c] as $_key => $_value)\t{\n\t\t\t\t\t\t\t$w=((1/$colCnt)*100) . '%';\n\t\t\t\t\t\t\t$h[]=$_key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$c--;\n\t\t\t\t\t\t$ctr=0;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tforeach($f[$c] as $_key => $_value)\t{\n\t\t\t\t\t\t\tif ($ctr==0) {\n\t\t\t\t\t\t\t\t$id=$_value;\n\t\t\t\t\t\t\t\t$index=$_key;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$fname=\"'\".$h[$ctr].\"'\";\n\t\t\t\t\t\t\t$where=\"'\".$h[0].\"'\";\n\t\t\t\t\t\t\t$v=($_value);\n\t\t\t\t\t\t\tif (!$v) $v='[No Data]';\n\t\t\t\t\t\t\t$table .= \"<div style='border-bottom:5px solid #f0f0f0;background:$bg!Important;width:100%;text-align:left;font-family:tahoma;font-size:14px;padding:10px;margin:0' class='row'><div class='col-md-2' style='text-align:left;margin-left:20px;color:#000'><b>\" . strtoupper($_key) . \"</b></div><div class='col-md-10' contentEditable id='$_key|$id' onblur=\\\"update_fld($t,$fname,this,$where,$id)\\\" style='margin-left:20px'>\" . $v . \"</div>\";\n\t\t\t\t\t\t\t$table .= \"</div>\";\n\t\t\t\t\t\t\t$ctr++;\n\t\t\t\t\t\t\tif ($bg=='aliceblue') $bg='white';\t\n\t\t\t\t\t\t\t\telse $bg='aliceblue';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t$table .= \"</table>\";\n\t\t$table .= \"<script>\n\t\t\t\t\tsetCookie('wideView','1')\n\t\t\t\t\tfunction update_fld(a,b,c,d,e) {\n\t\t\t\t\t\tc.style.cssText=saveCSS\n\t\t\t\t\t\tc.style.paddingLeft='10px'\n\t\t\t\t\t\tvar sql='\" . HOST . \"/x_form_update.php?sql=update `' + a + '` set ' + b + '=\\\"' + c.textContent + '\\\" where ' + d + '=' + e + '&db_server='+getCookie('db_server')+'&db_name='+getCookie('db_name')+'&db_user='+getCookie('db_user')+'&db_password='+getCookie('db_password')\n\t\t\t\t\t\tconsole.log(sql)\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl: sql,\n\t\t\t\t\t\t\tsuccess: function(msg){\n\t\t\t\t\t\t\t\tc.style.cssText=saveCSS\n\t\t\t\t\t\t\t\tc.style.paddingLeft='10px'\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\tfunction addRow() {\n\t\t\t\t\t\tvar table=getCookie('table')\n\t\t\t\t\t\tvar url = '../addTableRow.php?db_name='+getCookie('db_name')+'&table='+table\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl:url,\n\t\t\t\t\t\t\tsuccess:function(data){\n\t\t\t\t\t\t\t\tedit(table)\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\tfunction delTableRow(index,id) {\n\t\t\t\t\t\tvar table=getCookie('table')\n\t\t\t\t\t\tvar url = '../delTableRow.php?db_name='+getCookie('db_name')+'&table='+table+'&index='+index+'&id='+id\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl:url,\n\t\t\t\t\t\t\tsuccess:function(data){\n\t\t\t\t\t\t\t\tedit(table)\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\tvar saveCSS\n\t\t\t\t\tfunction setEdit(objC,divID) {\n\t\t\t\t\t\tobjC.style.background='white'\n\t\t\t\t\t\tobjC.style.border='none'\n\t\t\t\t\t\tobjC.style.margin='0'\n\t\t\t\t\t\tobjC.style.padding='0'\n\t\t\t\t\t\tsaveCSS=$$(divID).style.cssText\n\t\t\t\t\t\tconsole.log(saveCSS)\n\t\t\t\t\t\t$$(divID).style.background='white'\n\t\t\t\t\t\t$$(divID).style.border='5px solid red'\n\t\t\t\t\t\t$$(divID).contentEditable=true\n\t\t\t\t\t\t$$(divID).style.width='100%'\n\t\t\t\t\t\t$$(divID).style.height='100%'\n\t\t\t\t\t\t$$(divID).style.margin='0'\n\t\t\t\t\t\t$$(divID).style.padding='10px'\n\t\t\t\t\t\t$$(divID).style.fontSize='16px'\n\t\t\t\t\t\t$$(divID).style.textShadow='none'\n\t\t\t\t\t\tsel(divID)\n\t\t\t\t\t}\n\t\t\t\t\tfunction sel(node) {\n\t\t\t\t\t\tnode = document.getElementById(node);\n\t\t\t\t\t\tif (document.body.createTextRange) {\n\t\t\t\t\t\t\tconst range = document.body.createTextRange();\n\t\t\t\t\t\t\trange.moveToElementText(node);\n\t\t\t\t\t\t\trange.select();\n\t\t\t\t\t\t} else if (window.getSelection) {\n\t\t\t\t\t\t\tconst selection = window.getSelection();\n\t\t\t\t\t\t\tconst range = document.createRange();\n\t\t\t\t\t\t\trange.selectNodeContents(node);\n\t\t\t\t\t\t\tselection.removeAllRanges();\n\t\t\t\t\t\t\tselection.addRange(range);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.warn('Could not select text in node: Unsupported browser.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar pre\n\t\t\t\t\tfunction php_code(n,uri) {\n\t\t\t\t\t\tpre=$$('pre')\n\t\t\t\t\t\tpre.dataset.src=uri\n\t\t\t\t\t}\n\t\t\t\t\tfunction delTableRow(index,id) {\n\t\t\t\t\t\tvar table=getCookie('table')\n\t\t\t\t\t\tvar url = '../delTableRow.php?db_name='+getCookie('db_name')+'&table='+table+'&index='+index+'&id='+id\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl:url,\n\t\t\t\t\t\t\tsuccess:function(data){\n\t\t\t\t\t\t\t\tedit(table)\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\tfunction edit(table) {\n\t\t\t\t\t\tsetCookie('table',table)\n\t\t\t\t\t\tvar url = '../editTable.php?db_name='+getCookie('db_name')+'&table='+table\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl:url,\n\t\t\t\t\t\t\tsuccess:function(data){\n\t\t\t\t\t\t\t\t$$('wrapper').innerHTML=data\n\t\t\t\t\t\t\t\t$$('wrapper').style.marginTop='-150px!Important;'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction setCookie(cname,cvalue)\t{\n\t\t\t\t\t\tvar d = new Date(); \n\t\t\t\t\t\td.setTime(d.getTime()+(1*24*60*60*1000));\n\t\t\t\t\t\tvar expires = 'expires='+d.toGMTString(); \n\t\t\t\t\t\tdocument.cookie = cname + '=' + cvalue + '; ' + expires; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction getCookie(cname)\t{ \n\t\t\t\t\t\tvar name = cname + '='; \n\t\t\t\t\t\tvar ca = document.cookie.split(';'); \n\t\t\t\t\t\tfor(var i=0; i<ca.length; i++) { \n\t\t\t\t\t\t var c = ca[i].trim(); \n\t\t\t\t\t\t if (c.indexOf(name)==0) return c.substring(name.length,c.length); \n\t\t\t\t\t\t} \n\t\t\t\t\t\treturn ''; \n\t\t\t\t\t} \t\t\n\t\t\t\t</script>\";\n\t\t\t\treturn $table;\n\t}", "public function query_result_ready_for_display($data){\n if($data != null && !empty($data)){\n foreach($data as &$row){\n $was_object = false;\n if(is_object($row)){\n $was_object = true;\n $row = json_decode(json_encode($row),true);\n }\n foreach($row as &$cell){\n if(is_array($cell)){\n $cell = $this->str_array_ready_for_display($cell);\n }else\n $cell = htmlspecialchars(stripslashes(trim($cell)));\n }\n if($was_object){\n $row = json_decode(json_encode($row));\n }\n }\n }\n\n return $data;\n }", "abstract function query( $p_filter_input );", "function result($query){\r\n\t\t\tglobal $link;\r\n\t\t\r\n\t\t\tif ( $result = mysqli_query($link, $query) or die(\"gagal menampilkan data\") ){\r\n\t\t\t\treturn $result;\t\r\n\t\t\t} \r\n\t\t}", "public function __toString()\n {\n try {\n $result = $this->render();\n } catch (PDOException $e) {\n $result = '<hr>' . get_class($e) . ': ' . $e->getMessage() . '<hr>' . ORM::get_last_query() . '<hr>';\n } catch (Exception $e) {\n $result = '<hr>' . get_class($e) . ': ' . $e->getMessage() . '<hr>';\n }\n\n return $result;\n }", "public function __toString()\n {\n try {\n $result = $this->render();\n } catch (PDOException $e) {\n $result = '<hr>' . get_class($e) . ': ' . $e->getMessage() . '<hr>' . ORM::get_last_query() . '<hr>';\n } catch (Exception $e) {\n $result = '<hr>' . get_class($e) . ': ' . $e->getMessage() . '<hr>';\n }\n\n return $result;\n }", "public function assemble()\n {\n $queryString = array();\n\n $queryString[] = $this->query['type'];\n\n // Select query\n if ($this->query['type'] == \"SELECT\"\n or $this->query['type'] == \"SELECT DISTINCT\") {\n // Build columns to select\n $queryString[] = $this->buildSelectColumns();\n\n // From\n $queryString[] = \"FROM `{$this->query['table']}`\";\n\n // Joins\n if (array_key_exists('joins', $this->query)) {\n $queryString[] = $this->buildJoins();\n }\n\n // Where\n $queryString[] = $this->buildWhere();\n\n // Custom SQL\n if (array_key_exists('sql', $this->query)) {\n $queryString[] = $this->query['sql'];\n }\n\n // Order by\n if (array_key_exists('order_by', $this->query)) {\n $queryString[] = \"ORDER BY \" . implode(\", \", $this->query['order_by']);\n }\n }\n // Insert\n elseif ($this->query['type'] == \"INSERT INTO\") {\n // Table\n $queryString[] = \"`{$this->query['table']}`\";\n\n // Get the columns and values\n $columns = $values = array();\n foreach ($this->query['data'] as $column => $value) {\n $columns[] = $this->columnName($column);\n $values[] = $this->processValue($value);\n }\n\n // Add columns and values to query\n $queryString[] = \"(\" . implode(',', $columns) . \")\";\n $queryString[] = \"VALUES (\" . implode(',', $values) . \")\";\n }\n // Update\n elseif ($this->query['type'] == \"UPDATE\") {\n // Table\n $queryString[] = \"`{$this->query['table']}`\";\n\n // Set values\n $values = array();\n foreach ($this->query['data'] as $column => $value) {\n // Process column name\n $column = $this->columnName($column);\n\n // Add value to bind queue\n $valueBindKey = \"new_\" . str_replace(array('.', '`'), array('_', ''), $column);\n $this->valuesToBind[$valueBindKey] = $value;\n\n // Add to values\n $values[] = $column . \" = :{$valueBindKey}\";\n }\n\n // Add values to query\n $queryString[] = \"SET \" . implode(\", \", $values);\n\n $queryString[] = $this->buildWhere();\n }\n // Delete from\n elseif ($this->query['type'] == \"DELETE\") {\n // Table\n $queryString[] = \"FROM `{$this->query['table']}`\";\n\n // Where\n $queryString[] = $this->buildWhere();\n }\n\n return implode(\" \", str_replace(\"{prefix}\", $this->prefix, $queryString));\n }", "function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "function queryResultToJSON($qResult,$parameters=NULL,$allFields=NULL)\r\n\t{\r\n//If configuration is not defined we add the fields in the result of the query by default.\r\n\t\tif (!is_array($parameters['columns']))\r\n\t\t{\r\n\t\t\t$fieldNum = mysql_num_fields($qResult);\r\n\t\t\t$fields = array();\r\n\t\t\tfor ($i=0; $i<$fieldNum; $i++)\r\n\t\t\t\t$fields []= mysql_field_name($qResult,$i);\r\n\t\t\t$parameters['columns'] = fieldsToParams($fields);\t\r\n\t\t}\r\n\t\treturn resultToJSON($qResult,$parameters,$allFields);\r\n\t}", "function query($group_by = FALSE) {\n\n // @TODO Not doing anything with $group_by yet, need to figure out what has to be done.\n\n if ($this->date_forbid()) {\n return;\n }\n\n // See if we need to reset granularity based on an argument value.\n // Make sure we don't try to reset to some bogus value if someone has typed in an unexpected argument.\n $granularity = $this->date_handler->arg_granularity($this->argument);\n if (!empty($granularity)) {\n $this->date_handler->granularity = $granularity;\n $this->format = $this->date_handler->views_formats($this->date_handler->granularity, 'display');\n $this->sql_format = $this->date_handler->views_formats($this->date_handler->granularity, 'sql');\n }\n $this->granularity = $this->date_handler->granularity;\n $this->ensure_my_table();\n $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;\n\n // If requested, add the delta field to the view so we can later find the value that matched our query.\n if (!empty($this->options['add_delta']) && (substr($this->real_field, -6) == '_value' || substr($this->real_field, -7) == '_value2')) {\n $this->query->add_field($this->table_alias, 'delta');\n $real_field_name = str_replace(array('_value', '_value2'), '', $this->real_field);\n $this->query->add_field($this->table_alias, 'entity_id', 'date_id_' . $real_field_name);\n $this->query->add_field($this->table_alias, 'delta', 'date_delta_' . $real_field_name);\n }\n\n $format = $this->date_handler->granularity == 'week' ? DATE_FORMAT_DATETIME : $this->sql_format;\n $view_min = date_format($this->min_date, $format);\n $view_max = date_format($this->max_date, $format);\n $view_min_placeholder = $this->placeholder();\n $view_max_placeholder = $this->placeholder();\n $this->date_handler->placeholders = array($view_min_placeholder => $view_min, $view_max_placeholder => $view_max);\n\n // Are we comparing this field only or the Start/End date range to the view criteria?\n if (!empty($this->options['use_fromto'])) {\n\n // The simple case, match the field to the view range.\n $field = $this->date_handler->sql_field($this->table_alias . '.' . $this->real_field, NULL, $this->min_date);\n $field = $this->date_handler->sql_format($format, $field);\n $this->query->add_where_expression($group, \"$field >= $view_min_placeholder AND $field <= $view_max_placeholder\", array($view_min_placeholder => $view_min, $view_max_placeholder => $view_max));\n\n }\n else {\n\n // Look for the intersection of the range of the date field with the range of the view.\n // Get the Start/End values for this field. Retrieve using the original table name.\n // Swap the current table name (adjusted for relationships) into the query.\n // @TODO We may be able to use Views substitutions here, investigate that later.\n $fields = date_views_fields($this->base_table);\n $fields = $fields['name'];\n $fromto = $fields[$this->original_table . '.' . $this->real_field]['fromto'];\n\n $value_min = str_replace($this->original_table, $this->table_alias, $fromto[0]);\n $value_max = str_replace($this->original_table, $this->table_alias, $fromto[1]);\n $field_min = $this->date_handler->sql_field($value_min, NULL, $this->min_date);\n $field_min = $this->date_handler->sql_format($format, $field_min);\n $field_max = $this->date_handler->sql_field($value_max, NULL, $this->max_date);\n $field_max = $this->date_handler->sql_format($format, $field_max);\n $this->query->add_where_expression($group, \"$field_max >= $view_min_placeholder AND $field_min <= $view_max_placeholder\", array($view_min_placeholder => $view_min, $view_max_placeholder => $view_max));\n }\n }", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "function query() {\n\n /*\n $q = Doctrine_Query::create()\n ->select('ac.name, ar.title')\n ->from('ACategory ac')\n ->leftJoin('ac.Archives ar');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'ACat and its Archives');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('ar.title, c.content')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'Archive and its Comments');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('ar.title, c.content, q.content')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c')\n ->leftJoin('c.ACommentQuotes q');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'Archive and its Comments and Quotes');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('ar.title, COUNT(c.id) AS num_comment')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c')\n ->groupBy('ar.id');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'Archive and number of its comment');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('c.archive_id, COUNT(q.id) AS num_quote')\n ->from('AComment c')\n ->leftJoin('c.ACommentQuotes q')\n ->groupBy('c.archive_id');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'Archive and number of its Quotes');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('ar.title, ac.name, COUNT(c.id) AS num_comment')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c')\n ->leftJoin('ar.ACategories ac')\n ->groupBy('ar.id, ac.id');\n $result = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n fb($result, 'Archive and its ACat, and number of its comment');\n */\n\n /*\n $q = Doctrine_Query::create()\n ->select('ac.name, COUNT(ar.id) AS num_archive')\n ->from('ACategory ac')\n ->leftJoin('ac.Archives ar')\n ->groupBy('ac.id')\n ;\n $result1 = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n\n $q = Doctrine_Query::create()\n ->select('ac.name, ar.title')\n ->from('ACategory ac')\n ->leftJoin('ac.Archives ar')\n ;\n $result2 = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n\n $q = Doctrine_Query::create()\n ->select('ar.title, COUNT(c.id) AS num_comment')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c')\n ->groupBy('ar.id')\n ;\n $result3 = $q->execute(array(), Doctrine_Core::HYDRATE_ARRAY);\n\n $acat_archive = $result2;\n\n for($i = 0; $i < sizeof($result2); $i++) {\n for($j = 0; $j < sizeof($acat_archive[$i]['Archives']); $j++) {\n for($k = 0; $k < sizeof($result3); $k++) {\n if($acat_archive[$i]['Archives'][$j]['id'] == $result3[$k]['id']) {\n $acat_archive[$i]['Archives'][$j]['num_comment'] = $result3[$k]['num_comment'];\n }\n }\n }\n $acat_archive[$i]['num_archive'] = $result1[$i]['num_archive'];\n }\n\n fb($result1, 'ACat and number of its Archives');\n fb($result2, 'ACat and its Archives');\n fb($result3, 'Archive and number of its Comments');\n FB::info($acat_archive, 'FINAL QUERY');\n\n */\n\n $q = Doctrine_Query::create()\n ->select('ar.title, COUNT(c.id) AS num_comment')\n ->from('Archive ar')\n ->leftJoin('ar.AComments c')\n ->groupBy('ar.id')\n ;\n $result3 = $q->fetchArray();\n fb($result3, 'test fetchArray');\n\n }", "function output_html($data, $query='') {\n // should be overridden\n return;\n }", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "public function query()\n\t{\n\t\treturn false;\n\t}", "private function _get_dbresult()\n {\n $result = \"\";\n return $result;\n }", "abstract public function\r\n\t\tget_query_for_something();", "function printResult($result) {\n\techo \"result from SQL:\";\n echo \"<table>\";\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr>\\n\";\n foreach ($row as $item) {\n echo \" <td>\" . ($item !== null ? htmlentities($item, ENT_QUOTES) : \"&nbsp;\") . \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n}", "function query() {\n $this->add_additional_fields();\n }", "function startResult(& $result) \n {\n $start = ($result->pageNumber - 1) * $result->resultsPerPage;\n $end = $start + $result->numRows();\n $start ++;\n $row = $this->_headTemplate;\n $row = str_replace('{results}', $start.'-'.$end, $row);\n $row = str_replace('{total}', $result->results, $row);\n $this->_html .= $row;\n $this->_query = $result->getInfo('query');\n }", "public function query() {\n if (!empty($this->value)) {\n parent::query();\n }\n }" ]
[ "0.62978035", "0.5942261", "0.58997035", "0.5876688", "0.58302045", "0.5766125", "0.57557344", "0.5747838", "0.57430667", "0.57045746", "0.5689845", "0.5672577", "0.5635167", "0.56319404", "0.5616203", "0.5608865", "0.5605476", "0.5592597", "0.5588501", "0.55671", "0.55644464", "0.55623466", "0.55459523", "0.55263025", "0.55034065", "0.54786146", "0.5462069", "0.5460693", "0.5460063", "0.5458783", "0.5458649", "0.54561937", "0.54529905", "0.5437056", "0.54323435", "0.5426688", "0.54225904", "0.54225904", "0.54225904", "0.5407835", "0.54065955", "0.5404023", "0.5398165", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.5394008", "0.53843415", "0.53843415", "0.5381973", "0.53781897", "0.5374902", "0.5374342", "0.5369911", "0.5348688", "0.53398854", "0.53346324", "0.53278166", "0.5324311", "0.5321936", "0.5310703", "0.5300327", "0.5290192", "0.5287427", "0.52845883", "0.5279995", "0.5270183", "0.52692586", "0.5265727", "0.5262379", "0.5254837", "0.5254753", "0.5251927", "0.52495235", "0.52478117", "0.52326787", "0.5231367", "0.5229555", "0.52259034", "0.52259034", "0.5223286", "0.5212506", "0.5211482", "0.5208065", "0.5205296", "0.5201559", "0.5196782", "0.519369", "0.51876664", "0.51872283", "0.5185954", "0.5182152", "0.51808107", "0.51738226", "0.5167767", "0.5167304" ]
0.0
-1
Run the database seeds.
public function run() { $faker = Faker\Factory::create(); foreach (range(1, 20) as $index) { $user = new \App\User; $user->email = $faker->email; $user->name = $faker->name; $user->password = bcrypt('secret'); $user->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Run the database seeds.
public function run(Faker $faker) { for ($i=0; $i < 20 ; $i++) { $title = $faker->sentence(2); $newSection = new Section; $newSection->title = $title; $newSection->page_id = rand(1,10); $newSection->slug = Str::slug($title); $newSection->save(); } }
{ "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
Make a grid builder.
protected function grid() { $grid = new Grid(new Engine()); $grid->column('id', __('#')); $grid->column('power_station_id', __('Power station')) ->display(function ($userId) { $u = PowerStation::find($userId); if (!$u) return "-"; return $u->name; }) ->sortable(); $grid->column('name', __('Tank Name')); return $grid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId) {\n if ($formId) {\n $form = Formulario::find($formId);\n return \"<span>{$form['name']}</span>\";\n }\n });\n\n $grid->model()->orderBy('id', 'asc');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Direction());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('intro', __(trans('hhx.intro')));\n $grid->column('Img', __(trans('hhx.img')))->image();\n $grid->column('status', __(trans('hhx.status')))->using(config('hhx.status'));\n $grid->column('order_num', __(trans('hhx.order_num')));\n $grid->column('all_num', __(trans('hhx.all_num')));\n $grid->column('this_year', __(trans('hhx.this_year')));\n $grid->column('stock', __(trans('hhx.stock')));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "public function getGridBuilder($name);", "protected function grid()\n {\n $grid = new Grid(new Good);\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('名称'));\n $grid->column('unit', __('单位'));\n //$grid->column('list_img', __('商品图片'))->image()->width(10);\n $grid->column('amount', __('价格'));\n $grid->column('created_at', __('创建时间'));\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableFilter();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('image', __('Image'));\n $grid->column('user_roles', __('User roles'));\n $grid->column('intro', __('Intro'));\n $grid->column('details', __('Details'));\n $grid->column('start_at', __('Start at'));\n $grid->column('end_at', __('End at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('location', __('Location'));\n $grid->column('fee', __('Fee'));\n $grid->column('involves', __('Involves'));\n $grid->column('involves_min', __('Involves min'));\n $grid->column('involves_max', __('Involves max'));\n $grid->column('status', __('Status'));\n $grid->column('organizers', __('Organizers'));\n $grid->column('views', __('Views'));\n $grid->column('collectors_num', __('Collectors num'));\n $grid->column('is_stick', __('Is stick'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new NewEnergy());\n\n $grid->column('user_id', __('用户'));\n $grid->column('car_id', __('车辆ID'));\n $grid->column('start_mileage', __('开始里程'));\n $grid->column('end_mileage', __('结束里程'));\n $grid->column('mileage', __('里程'));\n $grid->column('type', __('车辆类型'));\n $grid->column('status', __('状态'));\n $grid->column('remark', __('备注'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MachinesStyle());\n\n $grid->model()->latest();\n \n $grid->column('id', __('索引'))->sortable();\n\n $grid->column('style_name', __('型号名称'))->help('机具的型号名称');\n\n $grid->column('machines_fact.factory_name', __('所属厂商'))->help('机具型号所属的厂商');\n\n // $grid->column('machines_fact.machines_types.name', __('所属类型'))->help('机具型号所属的类型');\n\n $grid->column('created_at', __('创建时间'))->date('Y-m-d H:i:s')->help('机具型号的创建时间');\n\n $grid->column('updated_at', __('修改时间'))->date('Y-m-d H:i:s')->help('机具型号的最后修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Enseignant());\n\n $grid->column('id', __('Id'));\n $grid->column('matricule', __('Matricule'));\n $grid->column('nom', __('Nom'));\n $grid->column('postnom', __('Postnom'));\n $grid->column('prenom', __('Prenom'));\n $grid->column('sexe', __('Sexe'));\n $grid->column('grade', __('Grade'));\n $grid->column('fonction', __('Fonction'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new LotteryCode());\n $grid->model()->orderBy('prizes_time', 'desc');\n $grid->id('Id');\n $grid->code('抽奖码');\n $grid->batch_num('批次号');\n $grid->prizes_name('奖品');\n $grid->valid_period('有效期');\n $grid->prizes_time('抽奖时间');\n $grid->award_status('发奖状态')->editable('select', [0 => '未发放', 1 => '已发放']);\n $grid->disableCreateButton();\n $grid->disableActions();\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('code', '抽奖码');\n $filter->like('batch_num', '批次号');\n $filter->between('prizes_time', '抽奖时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Boarding());\n\n $grid->column('id', __('Id'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('reservation.date', __('Reservation Date'));\n $grid->column('cage_id', __('Cage Number'));\n $grid->column('end_date', __('End date'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('pet.name', 'Pet Name');\n \n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Work);\n\n $grid->id('Id')->sortable();;\n $grid->name(trans('Название'))->sortable();;\n $grid->description(trans('Описание'))->sortable();;\n $grid->order_id(trans('Порядок'))->sortable();;\n\n $grid->paginate(20);\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('name', trans('Название'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Cate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('link', __('Link'));\n $grid->column('thumb', __('Thumb'));\n $grid->column('status', __('Status'));\n $grid->column('sort', __('Sort'));\n $grid->column('createtime', __('Createtime'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new BrandCooperation);\n\n $grid->sort('排序')->editable()->sortable();\n $grid->name('品牌名称');\n $grid->is_show('是否显示')->editable('select', [1 => '显示', 0 => '隐藏']);\n $grid->created_at('添加时间')->sortable();\n\n// $grid->actions(function ($actions) {\n// $actions->disableView(); // 禁用查看\n// });\n\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n // 查询\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->like('name', '品牌名称');\n $filter->equal('is_show', '显隐')->radio([1 => '显示', 0 => '隐藏']);\n });\n\n return $grid;\n }", "public function buildGrid() {\n // Processing Grids\n if ($this->getContext('container.grids')) {\n $grids = new VTCore_Bootstrap_Grid_Column($this->getContext('container.grids'));\n $this->addClass($grids->getClass(), 'grids');\n }\n\n return $this;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('ID');\n $grid->name('Название');\n //$grid->intro_img('Превью');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity);\n\n $grid->id('Id');\n $grid->log_name('Log name');\n $grid->description('Description');\n $grid->subject_id('Subject id');\n $grid->subject_type('Subject type');\n $grid->causer_id('Causer id');\n $grid->causer_type('Causer type');\n $grid->properties('Properties');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableEdit();\n $actions->disableView();\n });\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->between('created_at', '创建时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Banner);\n\n $grid->id('Id');\n $grid->title('Title');\n $grid->image('Image')->display(function($image) {\n return '<img width=\"30\" src=\"' . (env('APP_URL') . '/storage/' . ($image ?: 'images/default.png')) . '\"\"/>';\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->id('ID')->sortable();\n\n $grid->company_id('公司名称')->display(function ($company_id) {\n $company = Company::find($company_id);\n if ($company) {\n return $company->company_name;\n }\n return $company_id;\n });\n $grid->project_name('项目名称')->sortable();\n $grid->link_url('项目链接');\n $grid->display('公开度')->display(function ($display) {\n return $display == 0 ? '公开' : '私密';\n });\n $grid->created_at('添加时间')->sortable();\n\n return $grid;\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function grid()\n {\n $grid = new Grid(new Clinic());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('image', __('Image'))->image();\n $grid->column('name', __('Name'))->filter();\n $grid->column('type', __('Type'))->using(['1' => 'Clinic', '2' => 'Hospital'])->filter();\n $grid->column('email', __('Email'))->filter();\n $grid->column('phone', __('Phone'))->filter();\n $grid->column('address', __('Address'))->filter();\n $grid->column('website_url', __('Website url'))->link()->filter();\n $grid->column('profile_finish', __('Profile finish'))->bool()->filter();\n $grid->column('status', __('Status'))->bool()->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Information);\n\n $grid->model()->where('adminuser_id', '=', Admin::user()->id);\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('项目名称'));\n $grid->column('content', __('项目简介'))->limit(30);\n $grid->column('industry', __('行业类别'));\n $grid->column('investment', __('投资金额')); \n $grid->column('cont_name', __('资方联系人'));\n $grid->column('cont_phone', __('资方联系方式'));\n $grid->column('staff_name', __('工作人员姓名'));\n $grid->column('staff_phone', __('工作人员电话'));\n $grid->column('created_at', __('上报时间'));\n $grid->column('updated_at', __('更新时间'));\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('name', '项目名称');\n $filter->like('cont_name', '资方联系人');\n $filter->like('content', '项目情况');\n });\n\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n $grid->column('id', __('Id'));\n $grid->column('currency', __('Currency'));\n $grid->column('amount', __('Amount'));\n $grid->column('state', __('State'));\n $grid->column('game_id', __('Game id'));\n $grid->column('user_id', __('User id'));\n $grid->column('product_id', __('Product id'));\n $grid->column('product_name', __('Product name'));\n $grid->column('cp_order_id', __('Cp order id'));\n $grid->column('callback_url', __('Callback url'));\n $grid->column('callback_info', __('Callback info'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Dictionary());\n $grid->disableRowSelector();\n $grid->disableExport();\n\n $grid->column('id', __('Id'));\n $grid->column('type', __('Type'))->display(function () {\n return $this->type ? Dictionary::TYPES[$this->type] : null;\n })->label();\n $grid->column('option', __('Option'));\n $grid->column('slug', __('Slug'));\n $grid->column('alternative', __('Alternative'));\n $grid->column('approved', __('Approved'))->switch();\n $grid->column('sort', __('Sort'));\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->expand();\n $filter->where(function ($query) {\n $query->where('dictionaries.type', '=', $this->input);\n }, __('Фильтровать по типу'))->select(Dictionary::TYPES);\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SpecificationTemplate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('keys', __('Keys'))->display(function ($keys) {\n return implode(',', $keys);\n });\n $grid->column('content', __('Content'))->display(function ($content) {\n return implode('<br/>', array_map(fn($values) => implode(',', $values), $content));\n });\n $grid->column('sort', __('Sort'))->editable();\n $grid->column('is_display', __('Is display'))->switch();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n\n //only display paid order\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('order number');\n $grid->column('user.name', 'Buyer');\n $grid->total_amount('Total Amount')->sortable();\n $grid->paid_at('Paid Time')->sortable();\n $grid->ship_status('Shipment')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('Refund Status')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Book());\n\n $grid->column('id', __('Id'));\n $grid->author()->display(function($v) {\n return $v['name'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('year', __('Year'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Blog());\n\n $grid->column('id', __('Id'));\n $grid->column('title', __('Title'));\n $grid->column('sub_title', __('Sub title'));\n $grid->column('tag', __('Tag'));\n $grid->column('body', __('Body'));\n $grid->column('posted_by', __('Posted by'));\n $grid->column('posted_at', __('Posted at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n $grid->column('id', __('Id'));\n $grid->column('sort', __('Sort'));\n $grid->column('name', __('Name'));\n $grid->column('slug', __('Slug'));\n $grid->column('description', __('field.description'))->display(function ($item) {\n return mb_strimwidth($item, 0, 500, '...');\n });\n $grid->column('files', __('field.images'))->display(function () {\n $images = array();\n foreach ($this->files as $file) {\n array_push($images, preg_replace(\"/images\\//\", \"images/small.\", $file->file));\n }\n return $images;\n })->carousel(150, 100);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new PointMachine());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('point.name', __('Point name'));\n $grid->column('machine_no', __('Machine no'));\n // 1-自助型 2-全自动型\n $grid->column('type', __('Type'))->display(function ($type) {\n return $type == 1 ? '自助型 ' : '全自动型';\n });\n $grid->column('cost', __('Cost'));\n $grid->column('cost_at', __('Cost at'));\n $grid->column('build_at', __('Build at'));\n $grid->column('remark', __('Remark'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Talent);\n\n $grid->column('talents_id', 'ID');\n $grid->column('name', '姓名')->filter('like');\n $grid->column('sex', '性别')->filter('like');\n $grid->column('jobtitle', '工作单位及职务')->filter('like');\n $grid->column('education', '学历学位')->filter('like');\n $grid->column('university', '毕业院校与专业')->filter('like');\n $grid->column('major', '目前的专业/技术特长')->filter('like');\n $grid->column('linkphone', '联系电话')->filter('like');\n $grid->exporter(new TalentExporter());\n $grid->actions(function ($actions) {\n // 去掉查看\n $actions->disableView();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Resources);\n\n $grid->id('ID');\n $grid->type('类型')->using(Resources::TYPE)->filter(Resources::TYPE);\n $grid->name('名称');\n $grid->url('图片')->image();\n $grid->sort_num('排序')->editable()->sortable();\n $grid->memo('备注');\n\n $grid->disableExport();\n $grid->disableFilter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SiteHelp);\n\n $grid->model()->latest();\n\n $grid->filter(function ($filter) {\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->equal('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->select(SiteHelpCategory::pluck('name', 'id'));\n $filter->like('title', __('site-help::help.title'));\n $filter->equal('status', __('site-help::help.status.label'))\n ->select(__('site-help::help.status.value'));\n });\n\n $grid->column('thumbnail', __('site-help::help.thumbnail'))->image('', 66);\n $grid->column('id', __('site-help::help.id'));\n $grid->column('category.name', __('site-help::help.site_help_category_id'));\n $grid->column('title', __('site-help::help.title'));\n $grid->column('useful', __('site-help::help.useful'));\n $grid->column('status', __('site-help::help.status.label'))\n ->using(__('site-help::help.status.value'));\n $grid->column('created_at', __('admin.created_at'));\n $grid->column('updated_at', __('admin.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Platform());\n\n $grid->column('platform_number', __('Platform number'));\n $grid->column('platform_name', __('Platform name'))->label()\n ->expand(function ($model){\n $shops = $model->shops()->get()->map(function ($shop){\n return $shop->only(['shop_number', 'shop_name']);\n });\n\n return new Table([__('Platform number'), __('Platform name')], $shops->toArray());\n });\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->equal('platform_number', __('Platform number'));\n $filter->like('platform_name', __('Platform name'));\n });\n\n $grid->paginate(10);\n\n $grid->disableRowSelector();\n\n $grid->actions(function ($actions){\n $actions->disableView();\n $actions->disableDelete();\n });\n\n return $grid;\n }", "public function getDatagridViewBuilder();", "protected function grid()\n {\n $grid = new Grid(new Barang());\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('nama', 'Nama');\n });\n $grid->column('id', __('Id'));\n $grid->column('nama', __('Nama'));\n $grid->column('harga', __('Harga Beli'));\n $grid->column('harga_jual', __('Harga Jual'));\n $grid->column('satuan_id', __('Satuan id'))->display(function($satuan) {\n return Satuan::find($satuan)->nama;\n });\n $grid->column('jumlah_unit', __('Jumlah Unit'));\n $grid->column('parent_id', 'Parent')->display(function($id) {\n if($id) {\n return Barang::find($id)->nama;\n }\n else {\n return null;\n }\n });\n $grid->column('b_pengiriman', __('Pengiriman'));\n $grid->column('b_keamanan', __('Keamanan'));\n // $grid->column('created_at', __('Created at'));\n // $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Collect());\n $grid->disableActions();\n $grid->disableCreateButton();\n $grid->column('name','姓名');\n $grid->column('phone','手机号');\n $grid->column('address','地址');\n $grid->column('time','时间');\n $grid->column('message','备注');\n\n $postsExporter = new ColectExport();\n $postsExporter->fileName = date('Y-m-d H:i:s').'.xlsx';\n $grid->exporter($postsExporter);\n $url = url()->current();\n $url .= \"?_export_=all\";\n $grid->tools(function ($tools)use($grid,$url){\n $tools->append(new Export($grid,$url));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Customer);\n $grid->model()->where('is_delete',0)->orderBy('id','desc');\n $grid->id('ID')->sortable();\n $grid->code('客户编号');\n $grid->name('客户名称');\n $grid->contactor('联系人');\n $grid->tel('联系电话');\n $grid->email('邮箱');\n $grid->address('地址');\n $grid->receivables('应收账款数字');\n\n $grid->create_time('创建时间')->display(function ($create_time) {\n return date('Y-m-d H:i',$create_time);\n })->sortable();\n\n // 查询过滤\n $grid->filter(function($filter){\n $filter->column(1/2, function ($filter) {\n $filter->like('code', '客户编号');\n $filter->like('name', '客户名称');\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('contactor', '联系人');\n $filter->like('tel', '联系电话');\n $filter->use(new TimestampBetween('create_time','创建时间'))->datetime();\n });\n\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Setting());\n\n $grid->column('id', __('Id'));\n $grid->column('member_fee', __('Member fee'));\n $grid->column('task_rate', __('Task rate'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HhxEquip());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('hhx_travel_id', __(trans('hhx.hhx_travel_id')))->display(function ($hhx_travel_id){\n return self::getTravelService()->getNameByTravelId($hhx_travel_id);\n });\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.equip_status'));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Sections());\n\n $grid->column('id', __('ID'))->editable() -> sortable();\n $grid->column('name', __('Nazwa'))->editable() -> sortable();\n $grid->column('pageId', __('ID sekcji (w sensie HTML)'))->editable() -> sortable();\n $grid->column('content', __('Zawartość'))->editable() -> sortable();\n $grid->column('style', __('Style(CSS)'))->editable() -> sortable();\n $grid->column('created_at', __('Utworzono')) -> sortable();\n $grid->column('updated_at', __('Zauktalizowano')) -> sortable() ;\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MethodPrice);\n\n $grid->id('ID');\n $grid->entity('Сущность')->select(Pest::all()->pluck('name','id'));\n $grid->method('Сущность')->select(Method::all()->pluck('name','id'));\n $grid->chemical('Сущность')->select(Chemical::all()->pluck('name','id'));\n $grid->square_1('Сущность')->select(Chemical::all()->pluck('name','id'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feedback);\n $grid->column('id', 'ID');\n $grid->column('content', '内容');\n $grid->column('member', '用户')->display(function(){\n return $this->member->nickname;\n });\n $grid->column('created_at', '时间');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Site());\n\n $grid->id('ID');\n $grid->category()->title('分类');\n $grid->title('标题');\n $grid->thumb('图标')->gallery(['width' => 50, 'height' => 50]);\n $grid->describe('描述')->limit(40);\n $grid->url('地址');\n\n $grid->disableFilter();\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $grid->id('Id');\n $grid->title(trans('admin.title'));\n $grid->slogan(trans('admin.slogan'));\n $grid->name(trans('admin.name'));\n $grid->price(trans('admin.price'))->editable();\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n $grid->model()->orderBy('created_at','desc');\n\n $grid->column('id', __('Id'));\n $grid->column('log_name', __('Log name'))->using($this->log_name);\n $grid->column('description', __('Description'))->limit(10);\n $grid->column('subject_id', __('Subject id'));\n $grid->column('subject_type', __('Subject type'));\n $grid->column('causer_id', __('Causer id'));\n $grid->column('causer_type', __('Causer type'));\n $grid->column('properties', __('Properties'))->display(function ($properties) {\n $properties = [\n '详情' => isset($properties['description']) ? $properties['description'] : '',\n '备注' => isset($properties['remark']) ? $properties['remark'] : '',\n ];\n return new Table([], $properties);\n });\n $grid->column('created_at', __('Created at'))->sortable();\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter) {\n\n $filter->equal('log_name', __('Log name'))->select($this->log_name);\n\n });\n\n #禁用创建按钮\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n $actions->disableEdit();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Usertype());\n\n $grid->column('id', 'ID');\n $grid->column('usertype', '分类名称');\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '修改时间');\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Regional());\n\n $grid->column('id', 'ID');\n $grid->column('logo', 'Logo')->image('', '50', '50');\n $grid->column('name', 'Nama');\n $grid->column('address', 'Alamat');\n $grid->column('created_at', 'Dibuat')->date('d-m-Y');\n $grid->column('updated_at', 'Diubah')->date('d-m-Y');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Plan);\n $grid->model()->whereHas('category');\n\n $grid->column('category.name', __('Категория'));\n $grid->column('count', __('План'))->editable()->sortable();\n $grid->column('month_name', __('Месяц'));\n $grid->column('year', __('Год'))->sortable();\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order());\n\n $grid->column('id', __('Id'));\n $grid->column('trip', __('Trip'))->display(function () {\n return $this->trip->name;\n });\n $grid->column('user', __('User'))->display(function () {\n return $this->user->name . ' ' . $this->user->surname . \" ({$this->user->email})\";\n });\n $grid->column('paid', __('Paid'))->bool()->filter([\n 0 => 'No',\n 1 => 'Yes',\n ]);\n $grid->column('reservation_expires', __('Reservation expires'))->sortable();\n $grid->column('price', __('Price'));\n\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Terrace());\n\n $grid->column('id', __('Id'))->sortable()->style('text-align:center');\n $grid->column('image', __('平台图片'))->style('text-align:center')->image();\n $grid->column('name', __('平台名称'))->style('text-align:center');\n $grid->column('path', __('外链'))->style('text-align:center');\n $grid->column('notice_info', __('提示语'))->style('text-align:center');\n $grid->column('status', __('状态'))->display(function($status){\n return $status == 1 ? '未推荐' : '已推荐';\n })->style('text-align:center');\n $grid->column('created_at', __('创建时间'))->style('text-align:center');\n $grid->disableExport();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->add(new Terracedel());\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatUser);\n\n $grid->column('id', __('ID'));\n $grid->column('nick_name', __('昵称'));\n $grid->column('name', __('用户名'));\n $grid->column('password', __('密码'));\n $grid->column('mobile', __('手机号'));\n $grid->column('mini_program_open_id', __('OpenId'));\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Code());\n\n\n \n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->column(1 / 2, function ($filter) {\n $filter->like('phone', '手机号');\n $filter->like('ip', 'IP');\n });\n\n $filter->column(1 / 2, function ($filter) {\n $filter->between('created_at', '时间范围')->datetime();\n });\n\n\n });\n\n\n // $grid->column('id', __('Id'));\n $grid->column('phone', __('手机号'))->filter('like');\n $grid->column('code', __('验证码'));\n $grid->column('created_at', __('发送时间'));\n $grid->column('used_at', __('使用时间'));\n $grid->column('ip', __('IP'));\n $grid->model()->latest();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Purchase());\n\n $grid->column('id', \"编号\");\n $grid->column('consumer_name', \"客户\")->display(function () {\n return $this->consumer->full_name;\n });\n $grid->column('house_readable_name', \"房源\")->display(function () {\n return $this->house->readable_name;\n });\n $grid->column('started_at', \"生效日期\");\n $grid->column('ended_at', \"结束日期\");\n $grid->column('sell_type', \"出售方式\")->display(function ($sell_type) {\n return Purchase::$type[$sell_type];\n });\n $grid->column('price', \"成交价格\")->display(function ($price) {\n return \"¥$price\";\n });\n $grid->column('created_at', \"创建日期\");\n $grid->column('updated_at', \"更新日期\");\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Specialization);\n\n $grid->id('Id');\n $grid->full_name('Полное найменование');\n $grid->short_name('Краткое найменование');\n $grid->code('Код специальности');\n $grid->cathedra_id('Кафедра')->using(Cathedra::all()->pluck('abbreviation', 'id')->toArray());\n $grid->created_at('Создано');\n $grid->updated_at('Обновлено');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->hyzz('资质证书')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->type('类型');\n $grid->username('用户名称');\n $grid->password('密码');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n $grid->status('账户状态')->radio([\n 0=> '审核中',\n 1=> '审核通过',\n 2=> '冻结账户'\n ]);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n// $grid->column('id', __('Id'));\n $grid->column('date', __('Дата'));\n $grid->column('name', __('Город'))->display(function () {\n return '<a href=\"/admin/city-users?set='.$this->id.'\">'.$this->name.'</a>';\n });\n $grid->column('image', 'Картинка')->display(function () {\n $str = $this->image!='' ? '<img src=\"/uploads/images/'.$this->image.'\" height=\"100\"/>' : '';\n return $str;\n });\n// $grid->column('text', __('Text'));\n $grid->column('show', 'Активен')->display(function () {\n return $this->show ? 'да' : 'нет';\n });\n// $grid->column('orders', __('Orders'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('Id');\n $grid->parent_id('父ID');\n $grid->name('名称');\n $grid->order('排序');\n $grid->image('图片');\n $grid->index_template('首页模版');\n $grid->detail_template('详情模版');\n $grid->status('Status')->display(function ($status){\n return $status ? '<p class=\"text-success\">启用</p>' : '<p class=\"text-muted\">禁用</p>';\n });\n $grid->created_at('创建时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Member());\n\n $grid->column('id', 'id')->sortable();\n $grid->column('username','用户名');\n $grid->column('phone', '手机号')->display(function() {\n return substr($this->phone, 0, 3).'****'.substr($this->phone, 7);\n });\n $grid->column('avatar', '头像')->image('', 50, 50);\n $grid->column('created_at', '注册时间')->sortable();\n $grid->disableCreateButton();\n $grid->disableExport();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n\n // 设置created_at字段的范围查询\n $filter->between('created_at', '创建时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid() {\n\t\t$grid = new Grid(new Payment);\n\t\t$grid->disableCreateButton();\n\t\t$grid->column('id', __('Id'));\n\t\t$grid->column('user_id', __('用户'));\n\t\t// $grid->column('app_id', __('App id'));\n\t\t$grid->column('price', __('金额'));\n\t\t$grid->column('transaction_id', __('三方订单号'));\n\t\t$grid->column('out_trade_no', __('平台订单号'));\n\t\t$grid->column('type', __('订单类型'))->using(['20' => '商城订单']);\n\t\t$grid->column('status', __('状态'))->using(['0' => '未支付', '1' => '已支付', '2' => '未支付']);\n\t\t// $grid->column('other', __('Other'));\n\t\t$grid->column('payment_at', __('支付时间'));\n\t\t$grid->column('created_at', __('创建时间'));\n\t\t$grid->column('updated_at', __('更新时间'));\n\n\t\treturn $grid;\n\t}", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->id('Id');\n $grid->name('商品名');\n $grid->column('category.name', '品类');\n $grid->fabric('Fabric');\n $grid->gsm('Gsm');\n $grid->material('Material');\n $grid->attach('Attach');\n $grid->head_image('商品图')->image('http://yujiaknit.test/images/', 100, 100);\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feed());\n\n $grid->column('id', __('Id'));\n $grid->column('url', __('url'));\n $grid->column('id_author', __('Id author'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Withdrawal());\n\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n $filter->like('name', __('分区名称'));\n });\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('uid', __('用户昵称(UID)'))->display(function ($uid) {\n return UsersInfo::where('id',$uid)->value('nickname').\"({$uid})\";\n });\n $grid->column('real_name', __('实名姓名'));\n $grid->column('id_card', __('身份证号码'));\n $grid->column('mobile', __('联系电话'));\n $grid->column('amount', __('提现数量'));\n $grid->column('status', __('状态'))->display(function ($status) {\n return Withdrawal::$status[$status];\n });\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('修改时间'));\n\n $grid->disableActions();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StationBannerImage());\n\n $grid->column('id', __('Id'));\n $grid->column('station.station_name', __('測站'));\n $grid->column('image', __('輪播圖'))->image('', '50');\n $grid->column('url', __('連結'))->link();\n $grid->column('order', __('排序'));\n $grid->column('valid_at', __('有效日期'));\n $grid->column('mod_user', __('異動人員'));\n $grid->column('updated_at', __('異動時間'));\n\n if (Admin::user()->username != 'admin') {\n $grid->model()->where('station_id', '=', Admin::user()->station_id);\n }\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new KuponGroup);\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name',__('Nama'));\n $grid->column('total',__('Jumlah Kupon'));\n $grid->column('amount_per_kupon',__('Nilai Per Kupon'));\n $grid->column('expired',__('Kedaluwarsa'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n return Admin::grid(Classroom::class, function (Grid $grid) {\n\n $grid->id('ID')->sortable();\n\n // $grid->column();\n\n $grid->column('number', '编号');\n $grid->column('name', '名称');\n $grid->column('location', '地点');\n $grid->column('square', '面积');\n $grid->column('floor', '楼层');\n $grid->column('is_free', '是否空闲');\n $grid->column('building_name', '建筑物名称');\n\n $grid->created_at();\n $grid->updated_at();\n });\n }", "protected function grid()\n {\n $grid = new Grid(new Milestone);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('type', __('Type'))->select(Milestone::TYPE_MAP);\n $grid->column('version', __('Version'));\n $grid->column('content', __('Content'));\n $grid->column('detail', __('Detail'));\n $grid->column('created_at', __('Created at'))->sortable()->hide();\n $grid->column('updated_at', __('Updated at'))->sortable()->hide();\n\n $grid->model()->orderBy('id', 'desc');\n\n $grid->filter(function ($filter) {\n $filter->equal('version', '版本');\n $filter->like('content', '内容');\n $filter->equal('type', '类型')->select(Milestone::TYPE_MAP);\n $filter->between('created_at', '创建时间')->datetime();\n $filter->between('updated_at', '更新时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Test());\n\n $grid->id('编号');\n $grid->name('教师姓名');\n $grid->work_point('教学分数');\n $grid->science_point('科研分数');\n $grid->disableCreateButton();\n $grid->disableFilter();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n { \n \n $grid = new Grid(new Blog);\n\n $grid->id('Id')->sortable();\n $grid->title('标题');\n // $grid->content('内容');\n $grid->logo('图片')->display(function ($value) {\n return \"<img width='50' src='/upload/$value'>\";\n });\n $grid->discuss('评论');\n $grid->display('浏览');\n \n $grid->lab_id('标签')->display(function ($value) {\n $lab_name = Lab::select('lab_name')->where('id',$value)->get();\n \n return $lab_name[0]->lab_name;\n });\n\n $grid->cat_id('分类')->display(function ($value) {\n $cat_name = Cat::select('cat_name')->where('id',$value)->get();\n return $cat_name[0]->cat_name;\n });\n \n\n\n $grid->created_at('添加时间');\n \n $grid->actions(function ($actions){\n $actions->disableView();\n });\n\n $grid->filter(function($filter){\n $filter->like('title', '标题');\n $filter->like('content', '内容');\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new UserHealth());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('height', __('Height'))->filter();\n $grid->column('weight', __('Weight'))->filter();\n $grid->column('blood_pressure', __('Blood pressure'))->filter();\n $grid->column('sugar_level', __('Sugar level'))->filter();\n $grid->column('blood_type', __('Blood type'))->filter();\n $grid->column('muscle_mass', __('Muscle mass'))->filter();\n $grid->column('metabolism', __('Metabolism'))->filter();\n $grid->column('genetic_history', __('Genetic history'))->filter();\n $grid->column('illness_history', __('Illness history'))->filter();\n $grid->column('allergies', __('Allergies'))->filter();\n $grid->column('prescription', __('Prescription'))->filter();\n $grid->column('operations', __('Operations'))->filter();\n $grid->column('user_id', __('User id'))->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->model()->small();\n \n $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n $create->text('erp_id', 'ERP ID');\n $create->text('name', '小分類名稱');\n $create->select('parent_id', __('中分類'))->options(\n Category::Mid()->pluck('name', 'id')\n );\n $create->text('type','分級(不需改)')->default(3);\n });\n\n $grid->column('erp_id', __('ERP Id'));\n $grid->column('name', __('小分類名稱'));\n $grid->column('parent_id', __('中分類'))->display(function($userId) {\n return Category::find($userId)->name;\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('surname', __('Surname'));\n $grid->column('email', __('Email'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatEvent);\n\n $grid->id('Id');\n $grid->title('事件标题');\n $grid->key('Key');\n $grid->event('事件类型')->using(WechatEvent::EVENTLIST);\n $grid->method('执行方法');\n $grid->column('message.title', '消息标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GithubRepositories());\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('项目名'))->limit(20);\n $grid->column('full_name', __('项目全名'))->limit(40);\n $grid->column('description', __('简介'))->limit(60);\n// $grid->column('owner', __('作者资料'));\n $grid->column('html_url', __('网页地址'))->link();\n// $grid->column('original_data', __('原始数据'));\n $grid->column('created_at', __('创建时间'));\n// $grid->column('updated_at', __('更新时间'));\n\n //快捷搜索\n $grid->quickSearch('name', 'full_name', 'description');\n\n //倒叙\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Station());\n\n $grid->column('id', __('Id'));\n $grid->column('area.area_name', __(trans('admin.area_name')));\n $grid->column('station_code', __(trans('admin.station_code')));\n $grid->column('station_name', __(trans('admin.station_name')));\n $grid->column('telno', __(trans('admin.telno')));\n $grid->column('order', __(trans('admin.order')));\n $grid->column('valid_at', __(trans('admin.valid_at')));\n $grid->column('mod_user', __(trans('admin.mod_user')));\n $grid->column('updated_at', __(trans('admin.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->column('id', __('Id'));\n $grid->column('type.name', __('分类名称'));\n $grid->column('recommend.name', __('推荐名称'));\n $grid->column('name', __('产品名称'));\n $grid->column('description', __('产品描述'));\n $states = [\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n ];\n $grid->column('pop', __('推荐'))->switch($states);\n $grid->column('logo','logo图')->display(function (){\n if ($this->logo){\n return '<div class=\"pop\"><img src='.env('APP_URl').'/uploads/'.$this->logo.' style=\"width:100px;height:100px;\"></div>';\n }else{\n return ;\n }\n });\n $grid->column('price', __('价格'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Student);\n\n $grid->id('Id');\n $grid->surname('Фамилия');\n $grid->name('Имя');\n $grid->family_name('Отчество');\n $grid->telegram_id('Telegram-id');\n $grid->email('Email');\n $grid->number('Контактный телефон');\n $grid->groups_id('Группа')->using(Group::all()->pluck('name', 'id')->toArray());\n $grid->created_at('Создание записи');\n $grid->updated_at('Редактирование записи');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n $grid->id('ID')->sortable();\n $grid->name('名称');\n $grid->type('分类')->display(function($status) {\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n foreach ($arr as $key => $value) {\n if($status==$value['id']) return $value['type']; \n }\n \n });\n $grid->cover('商品大图')->image('',70, 70);\n $grid->image('详情图')->image('',70, 70);\n $grid->stock('库存');\n $grid->price('积分价格');\n $grid->status('状态')->display(function($status) {\n if($status==1) return \"上架中\";\n if($status==0) return \"已下架\"; \n });\n $grid->disableExport();//禁用导出数据按钮\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();//禁用查询过滤器\n });\n \n \n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n //$filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('title_designer_cn', '标题(设计师)');\n $filter->like('title_name_cn', '标题(项目名称)');\n $filter->like('title_intro_cn', '标题(项目介绍)');\n\n });\n\n $grid->id('ID')->sortable();\n $grid->title_designer_cn('标题(中)')->display(function () {\n return CurrentModel::formatTitle($this, 'cn');\n });\n $grid->title_designer_en('标题(英)')->display(function () {\n return CurrentModel::formatTitle($this, 'en');\n });\n $grid->article_status('状态')->display(function ($article_status) {\n switch ($article_status) {\n case '0' :\n $article_status = '草稿';\n break;\n case '1' :\n $article_status = '审核中';\n break;\n case '2' :\n $article_status = '已发布';\n break;\n }\n return $article_status;\n });\n $grid->release_time('发布时间')->sortable();\n \n // $grid->column('created_at', __('发布时间'));\n $grid->created_at('添加时间')->sortable();\n // $grid->column('updated_at', __('添加时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatMessage);\n\n $grid->id('Id');\n $grid->msg_type('消息类型');\n $grid->media_id('素材id');\n $grid->title('标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('field.id'));\n $grid->column('name', __('Name'));\n $grid->column('email', __('Email'));\n $grid->column('email_verified_at', __('Email verified at'));\n $grid->column('password', __('Password'));\n $grid->column('remember_token', __('Remember token'));\n $grid->column('point', __('Point'));\n $grid->column('status', __('field.status'));\n $grid->column('created_at', __('field.created_at'));\n $grid->column('updated_at', __('field.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n $grid->model()->where('type',$this->getProductType())->orderBy('id','desc');\n //调用自定义的Grid\n\n $this->customGird($grid);\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new News);\n\n $grid->id('Id');\n $grid->title('题目');\n $grid->category_id('分类ID');\n // $grid->content('内容');\n $grid->thumbnail('封面图');\n $grid->status('状态');\n $grid->read_count('阅读数量');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new DbTop());\n $grid->header(function ($query) {\n $alread = DbTop::whereStatus(1)->count();\n $notyet = DbTop::whereStatus(0)->count();\n $notok = DbTop::whereStatus(2)->count();\n $pan = DbTop::where('pan_url', '<>', '')->count();\n $x = '已看:' . $alread . '<br />未看:' . $notyet . '<br />不感兴趣:' . $notok . '<br />资源:' . $pan;\n return '<div class=\"alert alert-success\" role=\"alert\">' . $x . '</div>';\n });\n $grid->column('no', __(trans('hhx.no')))->display(function ($no) {\n return 'No.' . $no;\n });\n $grid->column('img', __(trans('hhx.img')))->image();\n $grid->column('c_title', __(trans('hhx.c_title')))->display(function () {\n return $this->c_title . ' ' . $this->year;\n });\n $grid->column('rating_num', __(trans('hhx.rating_num')));\n $grid->column('inq', __(trans('hhx.inq')));\n $grid->column('actor', __(trans('hhx.actor')));\n $grid->column('type', __(trans('hhx.type')));\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.db_status'));\n $grid->filter(function ($filter) {\n $filter->like('c_title', '中文名');\n $filter->like('year', '年');\n $filter->like('status', trans('hhx.status'))->select(config('hhx.db_status'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Drug);\n\n $grid->id('ID');\n $grid->street_name('«Уличное» название');\n $grid->city('Город');\n $grid->column('photo_drug','Фотография наркотика')->display(function () {\n $photo = Photo::whereDrugId($this->id)->where('type', 0)->first();\n\n if ($photo) {\n return $photo->photo;\n } else {\n return '';\n }\n })->image();\n\n $grid->column('confirm', 'Подтверждение')->display(function ($confirm) {\n if ($confirm) {\n return '✅Подтверждено';\n } else {\n return '❌Не подтверждено';\n }\n });\n $grid->updated_at('Дата изменения');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Profile());\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name', __('ID'))->sortable();\n $grid->column('surname', __('ID'))->sortable();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku);\n\n $grid->column('id', 'ID');\n $grid->column('name', 'sku名称')->editable();\n $grid->column('sku_number', 'sku编号')->editable();\n // $grid->column('description', 'sku描述');\n $grid->product(\"所属商品\")->display(function ($product) {\n return $product['name'];\n });\n $grid->column('price', '原价')->editable();\n $grid->column('stock', '库存量')->editable();\n $grid->column('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']);\n $grid->column('primary_picture', '商品主图');\n $grid->column('retail_price', '零售价格')->editable();\n $grid->column('is_promotion', '是否促销')->using([0 => '否', 1 => '是']);\n $grid->column('promotion_price', '促销价格')->editable();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Leavetime());\n $grid->filter(function ($filter) {\n $filter->like('designer.name', '设计师');\n $filter->between('created_at','创建时间')->datetime();\n });\n $grid->column('id', __('Id'));\n $grid->column('designer.name', __('设计师'));\n $grid->column('type', __('请假类型'))->display(function ($value) {\n return $value ? '半天' : '全天';\n });\n $grid->column('date', __('请假日期'));\n $grid->column('time', __('时间段'))->display(function ($time) {\n $html = '';\n foreach ($time as $k => $value){\n $work = Worktime::where('id','=',$value)->first();\n if($work){\n $html .= \"<span class='label label-success' style='margin-left: 10px'>{$work['time']}</span>\";\n }else{\n $html = '';\n }\n\n }\n return $html;\n });\n $grid->column('created_at', __('创建日期'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n //$actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku());\n\n $grid->column('id', __('Id'));\n $grid->column('product', __('产品'))->display(function ($product){\n return $product['title'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('price', __('Price'));\n $grid->column('stock', __('Stock'));\n $grid->column('options', __('sku规格'))->display(function ($options){\n if (count($options) > 0){\n $strOption = '';\n foreach ($options as $option) {\n $strOption .= \"<p>{$option['product_property_name']}:{$option['product_property_value']}</p>\";\n }\n return $strOption;\n }\n return '';\n });\n\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n // 只展示已支付的订单,并且默认按支付时间倒序排序\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('订单流水号');\n //展示关联关系的字段时,使用column方法\n $grid->column('user.name','买家');\n $grid->total_amount('总金额')->sortable();\n $grid->paid_at('支付时间')->sortable();\n $grid->ship_status('物流')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('退款状态')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n // 禁用创建按钮,后台不需要创建订单\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n // 禁用删除和编辑按钮\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n// return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SkuModel);\n\n $grid->column('s_id', __('skuid'));\n $grid->column('sku_num', __('编号'));\n $grid->column('goods_id', __('商品id'));\n $grid->column('sku_name', __('sku名称'));\n $grid->column('sku_price', __('Sku价格'));\n $grid->column('sku_goods_repertory', __('库存'));\n $grid->column('sku_goods_img', __('照片'))->image();\n $grid->column('created_at', __('添加时间'));\n $grid->column('updated_at', __('修改时间'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StockProduct);\n\n $grid->column('id', __('Id'));\n // $grid->column('product_id', __('Product id'))->modal('Product Name', function($model){\n // $products = $model->product()->get()->map(function($product) {\n // return $product->only('id','product_name');\n // });\n // return new Table(['ID', 'Product Name'], $products->toArray());\n // });\n $grid->column('product.product_name', __('Name'));\n $grid->column('moq', __('Moq'));\n $grid->column('quantity', __('Quantity'));\n $grid->column('price', __('Price'));\n $grid->column('note', __('Note'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Subscribe());\n $grid->column('number', __('商品编号'));\n $grid->column('name', __('商品名称'));\n $grid->column('subtitle', __('商品副标题'));\n $grid->column('price', __('单价'));\n $grid->column('quantity', __('库存'));\n $grid->column('type', __('分类'));\n $grid->column('status', __('状态'));\n $grid->column('recommend', __('推荐'));\n $grid->column('sold', __('总售量'));\n $grid->column('integral', __('返还碳积分'));\n $grid->column('emission', __('返还碳减排'));\n $grid->column('place', __('地点'));\n $grid->column('maintenance', __('养护'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Project());\n $grid->model()->orderBy('id', 'desc');\n $grid->id('ID')->sortable();\n $grid->name('项目名称')->editable();\n $grid->url('项目地址')->link();\n $grid->username('账号');\n $grid->password('密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],\n ];\n $grid->status('状态')->switch($status);\n $grid->created_at('创建时间');\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GroupTask());\n $grid->column('name', __('messages.name'));\n $grid->column('active', __('messages.active'))->switch();\n $grid->column('sort', __('messages.sort'))->editable();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HotRank());\n\n// $grid->column('id', __('Id'));\n $grid->column('sort', __('排序'))->editable();\n $grid->column('nickname', __('昵称'));\n $grid->column('avatar', __('头像'))->image();\n $grid->column('gender', __('性别'))->using([\n 1 => '男',\n 2 => '女'\n ]);\n// $grid->column('role', __('Role'));\n// $grid->column('intro', __('Intro'));\n $grid->column('fans', __('粉丝数'));\n $grid->column('red_book_link', __('小红书链接'));\n $grid->column('red_book_fans', __('小红书粉丝'));\n $grid->column('douyin_link', __('抖音链接'));\n $grid->column('douyin_fans', __('抖音粉丝'));\n $grid->column('created_at', __('创建时间'));\n $grid->actions(function ($actions) use ($grid) {\n // 去掉删除\n// $actions->disableDelete();\n// // 去掉编辑\n// $actions->disableEdit();\n // 去掉查看\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new TaskOrder);\n $grid->model()->orderBy('id', 'desc');\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->equal('eid','快递单号')->integer();\n $filter->equal('store','快递网点')->select(storedatas(1));\n $filter->equal('etype','快递公司')->select(edatas());\n $filter->equal('sname','客服名称');\n $filter->between('created_at', '导入时间')->datetime();\n });\n $grid->id('ID');\n $grid->eid('快递单号');\n $grid->sname('客服名称');\n $grid->store('快递网点');\n $grid->etype('快递公司');\n\n $grid->created_at('分配时间');\n //$grid->updated_at('分配时间');\n $excel = new ExcelExpoter();\n $excel->setAttr([ '快递单号','快递网点','快递公司','负责客服','导入时间'], ['eid','store','etype','sname','created_at']);\n $grid->exporter($excel);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new AnswerList);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('title', trans('admin.title_answer'))->width(500);\n $grid->column('A', trans('admin.A'))->width(150);\n $grid->column('B', trans('admin.B'))->width(150);\n $grid->column('C', trans('admin.C'))->width(150);\n $grid->column('D', trans('admin.D'))->width(150);\n $grid->column('correct', trans('admin.correct'))->width(100);\n $grid->column('status', trans('admin.status'))->using(AnswerList::STATUSES)->label(['warning', 'primary']);\n $grid->column('created_at', trans('admin.created_at'));\n $grid->column('updated_at', trans('admin.updated_at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('id', __('Id'));\n });\n $filter->column(1 / 2, function ($filter) {\n $filter->like('title', trans('admin.title'));\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new userWhitelist());\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->like('accountName', ___('accountName'));\n });\n $grid->column('id', ___('Id'));\n $grid->column('accountId', ___('AccountId'));\n $grid->column('accountName', ___('AccountName'));\n $grid->column('nickName', ___('NickName'));\n\n return $grid;\n }", "protected function grid()\n {\n $Adv=new Adv();\n $grid = new Grid($Adv);\n\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"array\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"array\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>\"start_time\",\"title\"=>\"活动开始时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"end_time\",\"title\"=>\"活动结束时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::setlist_show($grid,$list_array);\n\n $grid->filter(function($filter) use($platform,$type){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->in('platform', \"平台\")->multipleSelect($platform);\n $filter->in('type', \"类型\")->multipleSelect($type);\n });\n return $grid;\n }" ]
[ "0.72539544", "0.72184885", "0.70634", "0.7004036", "0.6996125", "0.6985094", "0.69537497", "0.69282764", "0.6927315", "0.69252354", "0.69226766", "0.6922334", "0.690793", "0.68896127", "0.6888781", "0.6878292", "0.6845856", "0.6825797", "0.68184733", "0.6811281", "0.68021184", "0.6800837", "0.67925596", "0.67897797", "0.6784932", "0.67816585", "0.6780825", "0.67741483", "0.6768888", "0.67671734", "0.67667234", "0.67597526", "0.6759699", "0.6747563", "0.6745222", "0.6735241", "0.6733382", "0.6727387", "0.67181563", "0.67181015", "0.67137426", "0.67131305", "0.6708126", "0.6696975", "0.66826063", "0.66823417", "0.66789883", "0.66741276", "0.6665148", "0.6658271", "0.66567004", "0.6648302", "0.6647406", "0.6639157", "0.6633505", "0.66238093", "0.66227967", "0.6604878", "0.6600741", "0.6595874", "0.6594908", "0.6594084", "0.6593401", "0.6590988", "0.6590703", "0.6582926", "0.6573926", "0.657322", "0.65646493", "0.6564076", "0.65581465", "0.6557274", "0.65564245", "0.65536314", "0.65535074", "0.65504897", "0.65428174", "0.65394217", "0.65345836", "0.65289444", "0.6526526", "0.6522363", "0.6510154", "0.65096647", "0.6505447", "0.64978606", "0.64910644", "0.64763296", "0.6474276", "0.64692414", "0.646471", "0.64644384", "0.64510155", "0.6450886", "0.64502233", "0.6448795", "0.6445895", "0.64449126", "0.6443707", "0.6431258" ]
0.69233316
10
Make a show builder.
protected function detail($id) { $show = new Show(Engine::findOrFail($id)); $show->field('power_station_id', __('Power station id')) ->as(function ($userId) { $u = PowerStation::find($userId); if (!$u) return "-"; return $u->name; }); $show->field('name', __('Name')); $show->field('details', __('Details')); $show->field('photo', __('Photo'))->image(); $show->field('id', __('Id')); $show->field('created_at', __('Created')) ->as(function ($item) { return Carbon::parse($item)->diffForHumans(); }); return $show; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function buildShowLayout(): void;", "public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->withSingleField('name');\n $column->withSingleField('url');\n $column->withSingleField('vendor_id');\n $column->withSingleField('parent_id');\n $column->withSingleField('created_at');\n $column->withSingleField('updated_at');\n });\n })->addEntityListSection('products', 'products');\n }", "function Show()\n {}", "public static function builder();", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "public function show() {\n \n }", "public function show();", "public function show();", "public function show();", "public function show();", "public function show() {\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()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t\n\t}", "abstract protected function show();", "public function show()\n\t{\n\n\t}", "public function show($show)\n {\n \n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "abstract function buildShowFields(): void;", "public function show()\n {\n //\n }", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show() {\n \n \n }", "function Show()\r\n\t{\r\n\r\n\t}", "public function show()\n\t{\n\t\treturn $this;\n\t}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show()\n {\n\n }", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n { \n \n }", "function show()\n {\n }", "public function show()\n { \n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "public function createBuilder();", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }", "public function show(){\n\n }", "public function show(){\n\n }", "public function show()\n {\n new $this->controller();\n }", "public function show()\n {\n //\n }", "public function show(Menu_builder $menu_builder)\n {\n //\n }", "public function getBuilder();", "public static function builder() {\n return new self();\n }", "public function show()\n {\n return view('scaffold::show');\n }", "function buildShowConfig(): void\n {\n // No default implementation\n }", "function show(){\n\t}", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function __construct(bool $show = false)\n {\n $this->show = $show;\n }", "public static function build() {\n return new Builder();\n }", "public function setShow($val = 'null')\n {\n $this->addParams('show', $val);\n\n return $this;\n }", "public function show()\n {\n return view(\n 'manager/job-builder-root'\n )->with([\n 'title' => Lang::get('manager/job_builder.title'),\n ]);\n }", "public function show() {\n echo $this->mountElement();\n }", "public function builder()\n {\n return new Builder($this);\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "public function create()\n {\n /*return view(\"banda\");*/\n }", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }", "function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}", "public function setAsBuilder() {\r\n\t\t$this->setFrontEnd(false);\r\n\t\t$this->RenderWhole = true;\r\n\t\t$this->setMenuTemplate(__DIR__ . '/myNavigationBuilder.latte');\r\n\t}", "protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function create()\n {\n return view('liquors.create')->with(['makers' => Maker::toSelectArray()]);\n }", "public function show()\n {\n return view('panel::show');\n }", "public function show()\n {\n return view('panel::show');\n }", "protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "public function setBuilder(ViewBuilder $builder): View;", "public function show()\n {\n return $this->view();\n }", "public function show()\n {\n return view('hirmvc::show');\n }" ]
[ "0.6526378", "0.65068364", "0.6488276", "0.64457935", "0.6348684", "0.6289494", "0.62589526", "0.62589526", "0.62589526", "0.62589526", "0.62530345", "0.62369376", "0.62369376", "0.62369376", "0.62308425", "0.62241685", "0.6219827", "0.6176313", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.61007607", "0.6096217", "0.60745347", "0.60663223", "0.60663223", "0.6063096", "0.6033626", "0.6030661", "0.6002087", "0.5987225", "0.5987225", "0.5970227", "0.5969409", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5931462", "0.5922726", "0.5919749", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.5879185", "0.586704", "0.585249", "0.5838603", "0.5833667", "0.5788966", "0.5788966", "0.5779055", "0.5776268", "0.5771026", "0.57695717", "0.5753653", "0.5723977", "0.5723901", "0.5711733", "0.569598", "0.568028", "0.5659107", "0.56448984", "0.5629633", "0.5625937", "0.561372", "0.5596805", "0.5579148", "0.556807", "0.5562583", "0.5560726", "0.5540813", "0.5527313", "0.55215013", "0.55149764", "0.5511598", "0.550713", "0.55048674", "0.55048674", "0.55004644", "0.5499924", "0.54946667", "0.5489878" ]
0.0
-1
Make a form builder.
protected function form() { $form = new Form(new Engine()); $form->text('name', __('Name')) ->required(); $form->select('power_station_id', __('Power station')) ->options(PowerStation::all()->pluck('name', 'id')) ->required(); $form->image('photo', __('Photo')); $form->textarea('details', __('Details')); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n }", "private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}", "public function setFormFieldBuilder(FormFieldBuilder $form_field_builder): Form;", "public function setFormBuilder(FormBuilder $form_builder): Form;", "public function getFormFieldBuilder(): FormFieldBuilder;", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "protected function form()\n {\n $form = new Form(new Book());\n\n $form->select('author_id', __('Author id'))\n ->options(collect(Author::all())->mapWithKeys(function ($v){\n return [$v->id => $v->name];\n }));\n\n $form->text('title', __('Title'));\n $form->textarea('description', __('Description'));\n $form->text('year', __('Year'));\n\n return $form;\n }", "function store_form($model = null, $prefix = null)\n {\n return new FormBuilder($model, $prefix);\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }", "protected function form()\n {\n $form = new Form(new GuestBook);\n\n $form->textarea('body', __('Body'));\n $form->number('user_id', __('User id'));\n $form->number('guest_id', __('Guest id'));\n $form->number('guest_book_id', __('Guest book id'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BorrowComment);\n\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('student_name', __('Student name'));\n $form->image('student_avatar', __('Student avatar'));\n $form->textarea('content', __('Content'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Gys);\n\n $form->text('name', 'Name');\n $form->text('tel', 'Tel');\n $form->textarea('file', 'File');\n $form->number('type', 'Type');\n $form->text('username', 'Username');\n $form->password('password', 'Password');\n $form->number('status', 'Status');\n // 在表单提交前调用\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }", "protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\n }", "protected function form()\n {\n $form = new Form(new Blog());\n\n $form->text('title', __('Title'));\n $form->text('sub_title', __('Sub title'));\n $form->text('tag', __('Tag'));\n $form->textarea('body', __('Body'));\n $form->text('posted_by', __('Posted by'));\n $form->datetime('posted_at', __('Posted at'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Barang());\n\n $form->text('nama', __('Nama'));\n $form->currency('harga', __('Harga Beli'))->symbol('Rp');\n $form->currency('harga_jual', __('Harga Jual'))->symbol('Rp');\n $form->select('satuan_id', __('Satuan id'))->options(\n Satuan::get()->pluck('nama', 'id')\n );\n $form->number('jumlah_unit', __('Jumlah Unit'));\n $form->select('parent_id', 'Parent Barang')->options(\n Barang::where('satuan_id', 1)->get()->pluck('nama', 'id')\n );\n $form->currency('b_pengiriman', __('Pengiriman'))->symbol('Rp');\n $form->currency('b_keamanan', __('Keamanan'))->symbol('Rp');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Formulario());\n\n $form->text('name', 'Nombre')\n ->required()\n ->creationRules(['required', \"unique:formularios\"])\n ->updateRules(['required', \"unique:formularios,name,{{id}}\"]);\n $form->text('description', 'Descripción');\n\n $fields = Field::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('fields', 'Campos')->options($fields);\n\n $forms = Formulario::all()->pluck('name', 'id')->toArray();\n $form->select('go_to_formulario', 'Continuar a formulario')->options($forms);\n\n $form->divider('Quiénes tienen acceso a este Formulario?');\n\n $permissions = Permission::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('permissions', 'Permisos')->options($permissions);\n\n $roles = Role::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('roles', 'Roles')->options($roles);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->mobile('phone', __('手机号'));\n $form->text('uname', __('姓名'));\n $form->text('wechat', __('微信号'));\n $form->text('phonenumber', __('联系电话'));\n $form->text('position', __('岗位'));\n $form->text('company', __('公司'));\n $form->switch('role', __('角色'));\n $form->switch('state', __('核实状态'));\n $form->datetime('create_date', __('创建时间'))->default(date('Y-m-d H:i:s'));\n // $form->text('openid', __('Openid'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}", "public static function builder() {\n\t\treturn new Builder();\n\t}", "protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Site);\n\n $form->select('category_id', '分类')->options(SiteCategory::selectOptions(null, ''))->rules('required');\n $form->text('title', '标题')->attribute('autocomplete', 'off')->rules('required|max:50');\n $form->image('thumb', '图标')->resize(120, 120)->uniqueName();\n $form->text('describe', '描述')->attribute('autocomplete', 'off')->rules('required|max:300');\n $form->url('url', '地址')->attribute('autocomplete', 'off')->rules('required|max:250');\n $this->disableFormFooter($form);\n return $form;\n }", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "protected function form()\n {\n $form = new Form(new Code());\n\n $form->mobile('phone', __('Phone'));\n $form->number('code', __('Code'));\n $form->ip('ip', __('IP'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function buildForm()\n {\n }", "protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }", "abstract function builder_form(): string;", "public function toForm(){\n return $this->form_builder()->form();\n }", "public function build() { $this->form_built = TRUE; return $this; }", "public function getFormBuilder()\n {\n return $this['form.factory'];\n }", "public static function builder();", "protected function form()\n {\n $form = new Form(new Order);\n\n\n\n return $form;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "protected function form()\n {\n $form = new Form(new Cases);\n\n $form->select('cate_id', '分类')->options('/admin/api/getcasecate');\n $form->select('algw_id', '顾问')->options('/admin/api/getgw');\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->text('desc', '副标题');\n $form->text('author', '来源');\n $form->radio('is_tj', '推荐')->options([0=>'否',1=>'是']);\n $form->image('thumb', '缩略图')->uniqueName();\n $form->editor('data', '详情');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WechatUser);\n\n $form->text('nick_name', __('昵称'));\n $form->text('name', __('用户名'));\n $form->password('password', __('密码'));\n $form->mobile('mobile', __('手机号'));\n $form->text('mini_program_open_id', __('OpenId'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goods);\n\n $form->text('title', trans('admin.title'))->required()->rules('required');\n $form->text('slogan', trans('admin.slogan'))->required()->rules('required');\n $form->text('name', trans('admin.name'))->required()->rules('required');\n $form->decimal('price', trans('admin.price'))->required()->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n return $form;\n }", "public function createForm();", "public function createForm();", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "protected function form()\n {\n $form = new Form(new Usertype());\n\n $form->text('usertype', '类型名称')->rules('required|max:10');\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableList();\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', 'Имя');\n\n $form->textarea('text');\n\n $form->switch('status', 'Статус')->states([\n 'on' => ['value' => '1', 'text' => 'Публиковать', 'color' => 'success'],\n 'off' => ['value' => '0', 'text' => 'Не публиковать', 'color' => 'danger'],\n ]);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }", "public function createBuilder();", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "protected function form()\n {\n $form = new Form(new Order());\n\n $form->switch('paid', __('Paid'));\n $form->datetime('reservation_expires', __('Reservation expires'))->default(date('Y-m-d H:i:s'));\n $form->decimal('price', __('Price'));\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Customer);\n\n $form->text('code', '客户编号');\n $form->text('name', '客户名称');\n// $form->text('openid', '客户openid');\n $form->text('contactor', '联系人');\n $form->text('tel', '联系电话');\n $form->email('email', '邮箱');\n $form->text('address', '地址');\n $form->decimal('receivables', '应收账款数字')->default(0.00);\n $form->text('fax', '传真');\n $form->switch('is_delete', '是否删除');\n\n return $form;\n }", "protected function makeFormCreator()\n {\n if ($this->isTestMode()) {\n return null;\n }\n\n if (empty($this->formConfiguration)) {\n throw new BadMethodCallException(\n 'Please define the form configuration to use via $this->setFormConfiguration().', 1333293139\n );\n }\n\n \\tx_rnbase::load(\\tx_mkforms_forms_Factory::class);\n $form = \\tx_mkforms_forms_Factory::createForm(null);\n\n /**\n * Configuration instance for plugin data. Necessary for LABEL translation.\n *\n * @var \\tx_rnbase_configurations $pluginConfiguration\n */\n $pluginConfiguration = \\tx_rnbase::makeInstance(tx_rnbase_configurations::class);\n $pluginConfiguration->init($this->conf, $this->cObj, 'mkforms', 'mkforms');\n\n // Initialize the form from TypoScript data and provide configuration for the plugin.\n $form->initFromTs(\n $this, $this->formConfiguration,\n ($this->getObjectUid() > 0) ? $this->getObjectUid() : false,\n $pluginConfiguration, 'form.'\n );\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Specialization);\n\n $form->text('full_name', 'Полное найменование')->rules('required|max:255');\n $form->text('short_name', 'Краткое найменование')->rules('required|max:255');\n $form->text('code', 'Код специальности')->rules('nullable|max:100');\n $form->select('cathedra_id', 'Кафедра')->options(Cathedra::all()->pluck('name', 'id'))\n ->rules('required|numeric|exists:cathedras,id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Good);\n\n $form->hidden('group_id')->value(session('group_id'));\n $form->text('name', __('Наименование'));\n $form->text('size', __('Объем/кол-во'));\n $form->decimal('price', __('Цена'))->default(0);\n $form->image('file', 'Фото');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Sections());\n\n $form->text('name', __('Nazwa'));\n $form->text('pageId', __('ID sekcji (w sensie HTML)'));\n $form->textarea('content', __('Zawartość'));\n $form->textarea('style', __('Style(CSS'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n $form->text('no', 'No');\n $form->number('user_id', 'User id');\n $form->textarea('address', 'Address');\n $form->decimal('total_amount', 'Total amount');\n $form->textarea('remark', 'Remark');\n $form->datetime('paid_at', 'Paid at')->default(date('Y-m-d H:i:s'));\n $form->text('payment_method', 'Payment method');\n $form->text('payment_no', 'Payment no');\n $form->text('refund_status', 'Refund status')->default('pending');\n $form->text('refund_no', 'Refund no');\n $form->switch('closed', 'Closed');\n $form->switch('reviewed', 'Reviewed');\n $form->text('ship_status', 'Ship status')->default('pending');\n $form->textarea('ship_data', 'Ship data');\n $form->textarea('extra', 'Extra');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new TagModel);\n\n $form->text('tag_name', 'Tag name');\n $form->number('tag_id', 'Tag id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->select('cid', __('分类'))->options(CategoryModel::selectOptions());\n $form->text('goods_name', __('Goods name'));\n $form->image('goods_img', __('Goods img'));\n $form->textarea('content', __('Content'));\n $form->number('goods_pricing', __('Goods pricing'));\n $form->number('goods_price', __('Goods price'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "protected function form()\n {\n $form = new Form(new UsersOpenclose);\n\n $form->text('srvkey', __('srvkey'));\n $form->text('KtvBoxid', __('机器码'));\n $form->datetime('opendate', __('开房时间'))->default(date('Y-m-d H:i:s'));\n $form->datetime('closedate', __('关房时间'))->default(date('Y-m-d H:i:s'));\n $form->select('feesmode', __('收费模式'))->options([0=>'非扫码收费',1=>'扫码收费']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member());\n\n $form->text('open_id', __('微信openid'));\n $form->image('head', __('头像'));\n $form->text('nickname', __('昵称'));\n $form->mobile('mobile', __('手机号码'));\n $form->text('email', __('邮箱'));\n $form->text('name', __('姓名'));\n $form->text('weixin', __('微信号'));\n $form->text('qq', __('qq'));\n $form->text('city', __('所在城市'));\n $form->text('yidudian', __('易读点'));\n $form->text('integral', __('积分'));\n $form->text('balance', __('余额'));\n $states = [\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '冻结', 'color' => 'danger'],\n ];\n $form->switch('status', '是否使用')->states($states);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new RequestForConfirmation());\n\n $form->switch('status', __('Status'));\n $form->text('comment', __('Comment'));\n $form->select('user_id', __('User id'))->options(User::all()->pluck('name', 'id'))->required();\n $form->select('project_id', __('Project id'))->options(Project::all()->pluck('project_name', 'id'))->required();\n\n\n return $form;\n }", "public function create(): Form\n {\n $form = new Form();\n \n return $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User);\n\n// $form->number('role_id', 'Role id');\n $form->text('name', 'Name');\n// $form->email('email', 'Email');\n// $form->image('avatar', 'Avatar')->default('users/default.png');\n// $form->password('password', 'Password');\n// $form->text('remember_token', 'Remember token');\n// $form->textarea('settings', 'Settings');\n $form->text('username', 'Username');\n// $form->text('access_token', 'Access token');\n// $form->text('no_hp', 'No hp');\n// $form->number('location_id', 'Location id');\n// $form->switch('gender', 'Gender')->default(1);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }", "protected function form()\n {\n return new Form(new Attention);\n }", "protected function form()\n {\n $form = new Form(new Purchase());\n if ($form->isCreating()) {\n $form->select('consumer_id', \"客户\")->options(Consumer::all()->pluck('full_name', 'id'))->required();\n $form->select('house_id', \"购买房源\")->options(House::purchasable()->pluck('readable_name', 'id'))->required();\n }\n $form->datetime('started_at', \"生效日期\");\n $form->datetime('ended_at', \"结束日期\");\n $form->select('sell_type', \"出售方式\")->options(Purchase::$type)->required();\n $form->currency('price', \"成交价格\")->symbol('¥')->required();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Drug);\n\n $form->text('street_name', '«Уличное» название');\n $form->text('city', 'Город');\n $form->text('active_substance', 'Активное вещество');\n $form->text('symbol', 'Символ');\n $form->text('state', 'Состояние');\n $form->text('color', 'Цвет');\n $form->text('inscription', 'Надпись');\n $form->text('shape', 'Форма');\n $form->text('weight', 'Вес таблетки');\n $form->text('weight_active', 'Вес действующего вещества');\n $form->text('description', 'Описание');\n $form->text('negative_effect', 'Негативный эффект');\n $form->switch('confirm', 'Подтверждение');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Room);\n\n if ($form->isEditing())\n $form->display('id', 'ID');\n\n $form->text('name', 'Nama');\n $form->select('room_type_id', 'Tipe Ruangan')->options(function ($id) {\n return RoomType::all()->pluck('name', 'id');\n });\n $form->slider('max_people', 'Maksimal Orang')->options([\n 'min' => 1,\n 'max' => 100,\n 'from' => 20,\n 'postfix' => ' orang'\n ]);\n $form->radio('status', 'Status')->options(RoomStatus::asSelectArray())->stacked();\n $form->textarea('notes', 'Catatan');\n\n if ($form->isEditing()) {\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n }\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WechatEvent);\n\n $form->text('title', '事件标题')->help('起说明性作用');\n $form->text('key', 'Key')->default(md5(time()));\n $form->select('event', '事件类型')->options(WechatEvent::EVENTLIST);\n $form->text('method', '执行方法')->help('namespace\\\\class@method');\n $form->select('wechat_message_id', '消息')->options(WechatMessage::select('id', 'title')->pluck('title', 'id'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->text('name', __('Name'));\n $form->email('email', __('Email'));\n $form->datetime('email_verified_at', __('Email verified at'))->default(date('Y-m-d H:i:s'));\n $form->password('password', __('Password'));\n $form->text('remember_token', __('Remember token'));\n $form->decimal('point', __('Point'))->default(0.000);\n $form->switch('status', __('field.status'));\n\n return $form;\n }", "public function builder()\n {\n return new Builder($this);\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "public function getBuilder();", "protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n\n $form = new Form(new Goods);\n\n //分类树形\n $cateTree = getTree(Category::all()->where('is_show',1)->toArray());\n $cate_map = [];\n foreach ($cateTree as $key => $value) {\n $cate_map[$value['id']] = str_repeat('&#12288;&#12288;',$value['level']).$value['title'];\n }\n\n $form->display('id', 'ID');\n $form->select('cate_id', '分类')->rules('required')->options($cate_map);\n $form->text('name', '商品')->rules('required')->attribute(['autocomplete' => 'off']);\n $form->textarea('remark', '备注');\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('is_valid',trans('admin.is_show'))->states($states)->default(1);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->hidden('operated_admin_id')->value(Admin::user()->id);\n $form->hidden('hos_id')->value(session('hos_id'));\n\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Posts);\n\n $form->text('title', 'Title');\n $form->text('content', 'Content');\n $form->text('video_url', 'Video url');\n $form->switch('status', '审核状态')->states( [ \n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'primary'],\n 'on' => ['value' => 1, 'text' => '通过', 'color' => 'default']\n ]);\n $form->number('content_type', 'Content type');\n $form->number('member_id', 'Member id');\n return $form;\n }" ]
[ "0.7876884", "0.7563207", "0.7518167", "0.7356229", "0.7287756", "0.7230112", "0.71921307", "0.7176219", "0.71556574", "0.71318495", "0.7072142", "0.70605636", "0.70538306", "0.70511967", "0.70281005", "0.70109546", "0.700963", "0.7000893", "0.699135", "0.6986861", "0.6979974", "0.6975677", "0.6967696", "0.69618577", "0.6958165", "0.6932718", "0.6931257", "0.69268525", "0.69261456", "0.6919133", "0.6898824", "0.6896308", "0.6895907", "0.68850464", "0.68820494", "0.68767923", "0.6873939", "0.6855952", "0.68555087", "0.684766", "0.6846724", "0.6843792", "0.683849", "0.6837029", "0.68360937", "0.6835654", "0.68338263", "0.68321586", "0.68261683", "0.68261683", "0.68253165", "0.6821316", "0.6811116", "0.6811116", "0.6809404", "0.67969346", "0.6794034", "0.67930216", "0.67898595", "0.6786553", "0.6786533", "0.6780389", "0.6777887", "0.6768574", "0.6764771", "0.6762455", "0.6762416", "0.6759921", "0.6754496", "0.67458314", "0.6744613", "0.67419064", "0.6731701", "0.6729932", "0.6726232", "0.6722076", "0.6716024", "0.6714663", "0.6714286", "0.6714119", "0.6712684", "0.67061925", "0.67027384", "0.6702656", "0.66966575", "0.66858375", "0.6681371", "0.66798395", "0.6678209", "0.6674076", "0.6670792", "0.66697335", "0.6669309", "0.6668735", "0.66635114", "0.6654671", "0.6648014", "0.66414875", "0.6639264", "0.66366684" ]
0.68068945
55
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n 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 CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n 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__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "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.74836576", "0.7380479", "0.7153653", "0.7139917", "0.7061897", "0.7031516", "0.6927712", "0.6927712", "0.6924855", "0.6902187", "0.6894202", "0.6894202", "0.6889197", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869", "0.6869" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('article_id',$this->article_id); $criteria->compare('channel_id',$this->channel_id); $criteria->compare('class_id',$this->class_id); $criteria->compare('title',$this->title,true); $criteria->compare('sub_title',$this->sub_title,true); $criteria->compare('summary',$this->summary,true); $criteria->compare('content',$this->content,true); $criteria->compare('keyword',$this->keyword,true); $criteria->compare('hits',$this->hits); $criteria->compare('seacher_text',$this->seacher_text,true); $criteria->compare('add_date',$this->add_date,true); $criteria->compare('add_userid',$this->add_userid); $criteria->compare('update_date',$this->update_date,true); $criteria->compare('update_userid',$this->update_userid); $criteria->compare('is_recommend',$this->is_recommend); $criteria->with = array('cmsChannel','cmsClass'); return new CActiveDataProvider($this, array( 'sort'=>array( 'defaultOrder'=>'article_id DESC', ), 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\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('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 getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\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\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 listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function findBy(array $filters);", "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 getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\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 $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 queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "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 }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.67437106", "0.67437106", "0.6606826", "0.64798707", "0.63799495", "0.63465333", "0.63098687", "0.6301961", "0.62535083", "0.62510264", "0.62510264", "0.61105317", "0.607652", "0.60729367", "0.60462666", "0.6035773", "0.6031625", "0.601425", "0.5982388", "0.5979458", "0.5979032", "0.59688234", "0.5932711", "0.5927149", "0.59219456", "0.58924705", "0.5888741", "0.584841", "0.5847139", "0.5825806", "0.58172226", "0.5811831", "0.5807505", "0.579154", "0.5778798", "0.57706285", "0.5763566", "0.5763531", "0.5750473", "0.5739968", "0.5738423", "0.5727089", "0.5724143", "0.57229596", "0.57226163", "0.5719301", "0.57171285", "0.5712964", "0.57126695", "0.57066643", "0.56929684", "0.56804883", "0.567148", "0.56708384", "0.5668978", "0.56689256", "0.56689256", "0.56689256", "0.5668806", "0.5664933", "0.56564087", "0.56503123", "0.56490123", "0.56415755", "0.56344926", "0.56331635", "0.56329334", "0.56221426", "0.56171304", "0.56135416", "0.56093234", "0.55946845", "0.5578491", "0.55721426", "0.55558795", "0.55494165", "0.55485135", "0.55476046", "0.5546038", "0.5535864", "0.55331045", "0.55317074", "0.55312", "0.5524965", "0.5518873", "0.5517828", "0.5514924", "0.550796", "0.5507723", "0.550009", "0.5499901", "0.5495869", "0.54958045", "0.54958045", "0.54958045", "0.5494851", "0.5493843", "0.5490538", "0.54903513", "0.54892665", "0.548582" ]
0.0
-1
Attributes Associations Operations XXX
abstract public function otherfoo();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getModelAttributes();", "abstract protected function attributes();", "public function attributes();", "function GetAttributes();", "public function copyAttributesToKey()\n\t{\n\t\t$primarykey = $this->factory->getPrimarykey ;\n\t\tforeach( $primarykey->fields as $n=>$field )\n\t\t{\n\t\t\t$this->key[$field] = $this->$field ;\n\t\t}\n\t}", "function getAdditionalAttributes() ;", "public function setAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public static function attributeMap();", "public function getAttributes() {}", "public function getAttributes() {}", "public function get_attributes()\n {\n }", "public function get_attributes()\n {\n }", "protected abstract function initializeAttributes(): array;", "function getAttributes()\n {\n }", "abstract function attributes(): array;", "public static function supportedAttributes();", "public function getAttributes(): iterable;", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "public function update_simple_assocs()\n {\n Logger::getInstance()->po_log(\"PO:update_simple_assocs\");\n\n foreach( $this->hasOne as $attr => $type )\n {\n $obj = $this->attributeValues[ $attr ]; // Valor es un objeto (puede ser null!)\n\n // El objeto debe estar cargado para poder pedirle el id\n if ( $obj !== PersistentObject::NOT_LOADED_ASSOC )\n {\n $refAttrName = DatabaseNormalization::simpleAssoc( $attr );\n if ($obj)\n {\n // Si es MTI, el id de cualquier clase parcial será el mismo.\n $this->attributeValues[ $refAttrName ] = $obj->getId(); // seteo ref_id, ej. \"email_id\"\n }\n else\n {\n $this->attributeValues[ $refAttrName ] = NULL; // Si no hay objeto, la referencia es NULL.\n }\n }\n }\n }", "public function getAttributes(){ }", "public function attributes()\n\t{\n\t\t/*Author -ptr.nov- add related fields to searchable attributes */\n\t\treturn array_merge(parent::attributes(), ['nmkategori','tipebrg','corp.CORP_NM']);\n\t}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function attributions() {\n return $this->hasMany('Rockit\\Models\\Attribution');\n }", "public function renderLinkAttributeFields() {}", "public function renderLinkAttributeFields() {}", "public function getAttributes()\n {\n }", "public abstract function getGroupedAttributesForMatching();", "abstract protected static function defineComparableAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function setupAssociations() \n {\n \n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "public function attributes() : array;", "protected function getImageAttributes() {}", "protected function getAllowedLinkAttributes() {}", "protected function getAllowedLinkAttributes() {}", "public function setAttributes($attributes){ }", "abstract public function attributeNames();", "abstract function exportableAttributes();", "public function getAssociation()\n {\n\n }", "public function attributes() {\n return $this->hasMany('App\\Models\\ProductAttribute');\n }", "public function setUserAttributes();", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "protected static function _relations() {\n\n\t}", "private function _processAttributes($attributes){\r\n\r\n if(Help::isAssoc($attributes)){\r\n\r\n foreach($attributes as $key => $value){\r\n $attrs[] = $key.'('.$value.')';\r\n }\r\n }\r\n else{\r\n $attrs = $attributes;\r\n }\r\n\r\n return $attrs;\r\n }", "public function getCustomAttributes() {}", "public function getAttributes()\n {\n return $this->getSchema()->getRelationAttributes( $this->getName() );\n }", "public function buildRelations()\n {\n $this->addRelation('Attribute', '\\\\Thelia\\\\Model\\\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Feature', '\\\\Thelia\\\\Model\\\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('ChoiceFilterOther', '\\\\ChoiceFilter\\\\Model\\\\ChoiceFilterOther', RelationMap::MANY_TO_ONE, array('other_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Category', '\\\\Thelia\\\\Model\\\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Template', '\\\\Thelia\\\\Model\\\\Template', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', 'RESTRICT');\n }", "public function defineAttributes()\n\t{\n\t\treturn array();\n\t}", "public function getAttributes()\n {\n $attributes = array_merge(\n parent::getAttributes(),\n $this->getLinkAttributes()\n );\n \n return $attributes;\n }", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"assignments\";\n\t}", "public function getRelationshipAttributes()\n {\n return $this->relationship_attributes;\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "protected function importAttributeKeys()\n {\n $r = $this->connection->executeQuery('select ak.*, akCategoryHandle from _AttributeKeys ak inner join AttributeKeyCategories akc on ak.akCategoryID = akc.akCategoryID;');\n while ($row = $r->fetch()) {\n $table = false;\n $akCategory = null;\n switch ($row['akCategoryHandle']) {\n case 'collection':\n $table = 'CollectionAttributeKeys';\n $akCategory = 'pagekey';\n break;\n case 'file':\n $table = 'FileAttributeKeys';\n $akCategory = 'filekey';\n break;\n case 'user':\n $akCategory = 'userkey';\n break;\n }\n $pkgID = null;\n if ($row['pkgID']) {\n $pkgID = $row['pkgID'];\n }\n $data = array(\n 'akID' => $row['akID'],\n 'akName' => $row['akName'],\n 'akHandle' => $row['akHandle'],\n 'akIsSearchable' => $row['akIsSearchable'],\n 'akIsSearchableIndexed' => $row['akIsSearchableIndexed'],\n 'akIsInternal' => $row['akIsInternal'],\n 'pkgID' => $pkgID,\n 'akCategory' => $akCategory,\n );\n $keyCount = $this->connection->fetchColumn(\"select count(*) from AttributeKeys where akID = ?\", array($row['akID']));\n if (!$keyCount) {\n $this->connection->insert('AttributeKeys', $data);\n }\n if ($table) {\n $count = $this->connection->fetchColumn(\"select count(*) from {$table} where akID = ?\", array($row['akID']));\n if (!$count) {\n $this->connection->insert($table, array('akID' => $row['akID']));\n }\n }\n\n $this->importAttributeKeyType($row['atID'], $row['akID']);\n switch ($akCategory) {\n case 'pagekey':\n $rb = $this->connection->executeQuery(\"select * from _CollectionAttributeValues where akID = ?\", array($row['akID']));\n while ($rowB = $rb->fetch()) {\n $avrID = $this->addAttributeValue($row['atID'], $row['akID'], $rowB['avID'], 'page');\n if ($avrID) {\n $this->connection->insert('CollectionAttributeValues', [\n 'cID' => $rowB['cID'],\n 'cvID' => $rowB['cvID'],\n 'avrID' => $avrID,\n ]);\n }\n }\n break;\n }\n }\n }", "public function getRelationParams($attributeName);", "public function attributes()\n\t{\n\t\treturn $this->belongsToMany(StoreAttribute::class, 'store_attribute_combination');\n\t}", "function std_attr($at){\n switch($at){\n case 'wrap': $attr = array('id'=>strval($this->obj->id));break;\n default:\n $attr = array();\n\n }\n return new opc_attrs(NULL,$attr);\n }", "public function getAttributes() {\n $toReturn = array();\n $toReturn[\"id\"] = $this->id_;\n $toReturn[\"username\"] = $this->username_;\n $toReturn[\"email\"] = $this->email_;\n $toReturn[\"displayName\"] = $this->displayName_;\n $toReturn[\"firstName\"] = $this->firstName_;\n $toReturn[\"lastName\"] = $this->lastName_;\n $toReturn[\"postalCode\"] = $this->postalCode_;\n if ($this->privileges_ !== null) {\n $toReturn[\"privileges\"] = $this->privileges_;\n } else {\n $toReturn[\"privileges\"] = array();\n }\n \n $toReturn[\"isVerified\"] = $this->isVerified_;\n return $toReturn;\n }", "public function nextAttribute();", "protected function getLinkAttributeFieldDefinitions() {}", "protected function getLinkAttributeFieldDefinitions() {}", "public function testIdPAttrs()\n {\n $config = array(\n 'cn', 'mail'\n );\n\n $request = array(\n 'Attributes' => array(\n 'eduPersonTargetedID' => array('[email protected]'),\n 'eduPersonAffiliation' => array('member'),\n 'cn' => array('user name'),\n 'mail' => array('[email protected]'),\n ),\n 'Destination' => array(\n ),\n 'Source' => array(\n 'attributes' => array('cn','mail'),\n ),\n );\n\n $result = self::processFilter($config, $request);\n $attributes = $result['Attributes'];\n $this->assertArrayHasKey('cn', $attributes);\n $this->assertArrayHasKey('mail', $attributes);\n $this->assertArrayNotHasKey('eduPersonTargetedID', $attributes);\n $this->assertArrayNotHasKey('eduPersonAffiliation', $attributes);\n $this->assertCount(2, $attributes);\n\n $config = array(\n 'cn',\n 'default' => TRUE,\n );\n\n $result = self::processFilter($config, $request);\n $attributes = $result['Attributes'];\n $this->assertArrayHasKey('cn', $attributes);\n $this->assertArrayHasKey('mail', $attributes);\n $this->assertArrayNotHasKey('eduPersonTargetedID', $attributes);\n $this->assertArrayNotHasKey('eduPersonAffiliation', $attributes);\n $this->assertCount(2, $attributes);\n\n\n }", "public function attributes()\n {\n // add related fields to searchable attributes\n return array_merge(parent::attributes(), ['idPeserta.nama_lengkap']);\n }", "public function getAttributesList()\n {\n }", "public function getAttributes() {\n return array_merge($this->getFields(), $this->getProperties());\n }", "function clearAttributes()\n {\n $this->arrRelations = array();\n return true;\n }", "protected function collect_attributes() {\n\t\tforeach ( $this->properties as $key => $val ) {\n\t\t\tif ( in_array($key, self::$global_attributes) || in_array($key, static::$element_attributes) ) {\n\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// also check for compound attributes, such as data-src, aria-required, etc.\n\t\t\tforeach ( self::$global_attribute_pattern_prefixes as $prefix ) {\n\t\t\t\tif ( preg_match( '/'. $prefix .'[-]\\w+/', $key ) ) {\n\t\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getAttributes()\r\n\t{\r\n\t\t$result = array();\r\n\t\t$attributes = $this->object->getAttributes();\r\n\t\t\r\n\t\tforeach( $attributes as $key => $attribute )\r\n\t\t{\r\n\t\t\tif ( $key == 'OrderNum' ) continue;\r\n\t\t\tif ( $key == 'RecordCreated' ) continue;\r\n\t\t\tif ( $key == 'RecordModified' ) continue;\r\n\t\t\t\t\r\n\t\t\tarray_push( $result, $key );\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function createAttributes()\n {\n /** @var \\Shopware\\Components\\Model\\ModelManager $em */\n $em = $this->get('models');\n\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'link',\n 'int(11)',\n true,\n null\n );\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'show_by_default',\n 'int(1)',\n true,\n 0\n );\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'deleted_position',\n 'int(11)',\n true,\n null\n );\n\n $em->addAttribute(\n 's_categories_attributes',\n 'swag',\n 'base_sort',\n 'int(11)',\n true,\n null\n );\n\n $em->generateAttributeModels(['s_categories_attributes']);\n }", "protected function mergeTranslationsWithAttributes()\n\t{\n\t\t$this->attributes = array_merge($this->attributes, $this->translatedAttributes);\n\t}", "public function mappedAttributes()\n {\n $prefix = config('getcandy.database.table_prefix');\n\n return $this->morphToMany(\n Attribute::class,\n 'attributable',\n \"{$prefix}attributables\"\n )->withTimestamps();\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }", "public static function attributeMap()\n {\n return parent::attributeMap() + self::$attributeMap;\n }" ]
[ "0.6695176", "0.6565526", "0.64103806", "0.6217968", "0.61547035", "0.6154543", "0.61341363", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.6127167", "0.60417813", "0.59917015", "0.59913695", "0.5981657", "0.5981657", "0.5960768", "0.5934852", "0.5920682", "0.5906204", "0.58880484", "0.5863379", "0.58626914", "0.58583266", "0.5808153", "0.5796193", "0.5796193", "0.57955605", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.5794621", "0.5791264", "0.5780622", "0.5780622", "0.57523036", "0.5743995", "0.5700254", "0.56998587", "0.56998587", "0.56998587", "0.56998587", "0.56804866", "0.5675554", "0.564454", "0.56128293", "0.5609545", "0.5605854", "0.5605854", "0.559428", "0.55891407", "0.5586244", "0.5571711", "0.5526589", "0.5512155", "0.55044186", "0.5500738", "0.5495445", "0.5482426", "0.5476782", "0.54685247", "0.5467186", "0.54375297", "0.54318863", "0.54289496", "0.5423751", "0.5422689", "0.5417285", "0.5414646", "0.5411392", "0.5409232", "0.5406944", "0.54024965", "0.54024965", "0.54015774", "0.5399732", "0.5399043", "0.5398737", "0.5386704", "0.53789073", "0.53661835", "0.5362565", "0.5362052", "0.5357486", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995", "0.5351995" ]
0.0
-1
Sync the changes that were pending for the recurring downtime configuration after apply config is complete Runs after apply/reconfigure subsys command has been completed
function recurringdowntime_apply_pending_changes($cbtype, &$cbargs) { // Verify this is an apply config and it finished successfully if ($cbargs['command'] != COMMAND_NAGIOSCORE_APPLYCONFIG || $cbargs['return_code'] != 0) { return; } // Verify there are pending changes $pending = recurringdowntime_get_pending_changes(); if (empty($pending)) { return; } // Apply the actual changes to the cfg $cfg = recurringdowntime_get_cfg(); foreach ($pending as $p) { if (array_key_exists('host_name', $p)) { $cfg[$p['cfg_id']]['host_name'] = $p['host_name']; } else if (array_key_exists('service_description', $p)) { $cfg[$p['cfg_id']]['service_description'] = $p['service_description']; } else if (array_key_exists('hostgroup_name', $p)) { $cfg[$p['cfg_id']]['hostgroup_name'] = $p['hostgroup_name']; } else if (array_key_exists('servicegroup_name', $p)) { $cfg[$p['cfg_id']]['servicegroup_name'] = $p['servicegroup_name']; } } recurringdowntime_write_cfg($cfg); recurringdowntime_update_pending_changes(array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reload_all_sync() {\n\tglobal $config;\n\n\t/* parse config.xml again */\n\t$config = parse_config(true);\n\n\t/* set up our timezone */\n\tsystem_timezone_configure();\n\n\t/* set up our hostname */\n\tsystem_hostname_configure();\n\n\t/* make hosts file */\n\tsystem_hosts_generate();\n\n\t/* generate resolv.conf */\n\tsystem_resolvconf_generate();\n\n\t/* enable routing */\n\tsystem_routing_enable();\n\n\t/* set up interfaces */\n\tinterfaces_configure();\n\n\t/* start dyndns service */\n\tservices_dyndns_configure();\n\n\t/* configure cron service */\n\tconfigure_cron();\n\n\t/* start the NTP client */\n\tsystem_ntp_configure();\n\n\t/* sync pw database */\n\tunlink_if_exists(\"/etc/spwd.db.tmp\");\n\tmwexec(\"/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd\");\n\n\t/* restart sshd */\n\tsend_event(\"service restart sshd\");\n\n\t/* restart webConfigurator if needed */\n\tsend_event(\"service restart webgui\");\n}", "function recurringdowntime_ccm_hostservice_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'host') {\n $tmp['host_name'] = $cbargs['host_name'];\n } else if ($cbargs['type'] == 'service') {\n $tmp['service_description'] = $cbargs['service_description'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n // Check if host name changed\n if ($cbargs['type'] == 'host') {\n\n // Check if host name changed\n if (!empty($cbargs['old_host_name']) && $cbargs['host_name'] != $cbargs['old_host_name']) {\n foreach ($cfg as $id => $c) {\n\n if ($c['schedule_type'] == 'host' || $c['schedule_type'] == 'service') {\n\n // Replace config host_name that used the old host name\n if ($c['host_name'] == $cbargs['old_host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'host_name' => $cbargs['host_name']\n );\n }\n\n }\n\n }\n }\n\n\n // Check for service description change\n } else if ($cbargs['type'] == 'service') {\n\n // This one is complicated ... we will only do the hosts defined directly to the service\n if (!empty($cbargs['old_service_description']) && $cbargs['service_description'] != $cbargs['old_service_description']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('service_description', $c) && $c['service_description'] == $cbargs['old_service_description']) {\n\n // Get all hosts attached to service\n $sql = \"SELECT host_name FROM nagiosql.tbl_lnkServiceToHost AS lnk\n LEFT JOIN nagiosql.tbl_host AS h ON h.id = lnk.idSlave\n WHERE idMaster = \".intval($cbargs['id']).\";\";\n if (!($rs = exec_sql_query(DB_NAGIOSQL, $sql))) {\n continue;\n }\n\n // Check all hosts against current cfg\n $arr = $rs->GetArray();\n foreach ($arr as $a) {\n if ($c['host_name'] == $a['host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'service_description' => $cbargs['service_description']\n );\n }\n }\n\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "function checkmk_sync_on_changes() {\n\tglobal $config;\n\n\tif (is_array($config['installedpackages']['checkmksync']['config'])) {\n\t\t$checkmk_sync = $config['installedpackages']['checkmksync']['config'][0];\n\t\t$synconchanges = $checkmk_sync['synconchanges'];\n\t\t$synctimeout = $checkmk_sync['synctimeout'] ?: '250';\n\t\tswitch ($synconchanges) {\n\t\t\tcase \"manual\":\n\t\t\t\tif (is_array($checkmk_sync['row'])) {\n\t\t\t\t\t$rs = $checkmk_sync['row'];\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[check_mk-agent] XMLRPC sync is enabled but there are no hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"auto\":\n\t\t\t\tif (is_array($config['hasync'])) {\n\t\t\t\t\t$system_carp = $config['hasync'];\n\t\t\t\t\t$rs[0]['ipaddress'] = $system_carp['synchronizetoip'];\n\t\t\t\t\t$rs[0]['username'] = $system_carp['username'];\n\t\t\t\t\t$rs[0]['password'] = $system_carp['password'];\n\t\t\t\t\t$rs[0]['syncdestinenable'] = FALSE;\n\n\t\t\t\t\t// XMLRPC sync is currently only supported over connections using the same protocol and port as this system\n\t\t\t\t\tif ($config['system']['webgui']['protocol'] == \"http\") {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"http\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ?: '80';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"https\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ?: '443';\n\t\t\t\t\t}\n\t\t\t\t\tif ($system_carp['synchronizetoip'] == \"\") {\n\t\t\t\t\t\tlog_error(\"[check_mk-agent] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['syncdestinenable'] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[check_mk-agent] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (is_array($rs)) {\n\t\t\tlog_error(\"[check_mk-agent] XMLRPC sync is starting.\");\n\t\t\tforeach ($rs as $sh) {\n\t\t\t\t// Only sync enabled replication targets\n\t\t\t\tif ($sh['syncdestinenable']) {\n\t\t\t\t\t$sync_to_ip = $sh['ipaddress'];\n\t\t\t\t\t$port = $sh['syncport'];\n\t\t\t\t\t$username = $sh['username'] ?: 'admin';\n\t\t\t\t\t$password = $sh['password'];\n\t\t\t\t\t$protocol = $sh['syncprotocol'];\n\n\t\t\t\t\t$error = '';\n\t\t\t\t\t$valid = TRUE;\n\n\t\t\t\t\tif ($password == \"\") {\n\t\t\t\t\t\t$error = \"Password parameter is empty. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_ipaddr($sync_to_ip) && !is_hostname($sync_to_ip) && !is_domain($sync_to_ip)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target IP Address or Hostname. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_port($port)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target Port. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif ($valid) {\n\t\t\t\t\t\tcheckmk_do_xmlrpc_sync($sync_to_ip, $port, $protocol, $username, $password, $synctimeout);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog_error(\"[check_mk-agent] XMLRPC sync with '{$sync_to_ip}' aborted due to the following error(s): {$error}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog_error(\"[check_mk-agent] XMLRPC sync completed.\");\n\t\t}\n \t}\n}", "public static function syncConfig()\n {\n $addon = self::addon();\n\n if (!self::isBackwardsCompatible() && !$addon->hasConfig('synchronize')) {\n $addon->setConfig('synchronize', false);\n\n if (\n $addon->getConfig('synchronize_actions') == true ||\n $addon->getConfig('synchronize_modules') == true ||\n $addon->getConfig('synchronize_templates') == true ||\n $addon->getConfig('synchronize_yformemails') == true\n ) {\n $addon->setConfig('synchronize', true);\n\n // Set developer synchronizing actions according to theme settings\n if ($addon->getConfig('synchronize_templates')) {\n rex_addon::get('developer')->setConfig('templates', true);\n }\n if ($addon->getConfig('synchronize_modules')) {\n rex_addon::get('developer')->setConfig('modules', true);\n }\n if ($addon->getConfig('synchronize_actions')) {\n rex_addon::get('developer')->setConfig('actions', true);\n }\n if ($addon->getConfig('synchronize_yformemails')) {\n rex_addon::get('developer')->setConfig('yform_email', true);\n }\n }\n\n $addon->removeConfig('synchronize_actions');\n $addon->removeConfig('synchronize_modules');\n $addon->removeConfig('synchronize_templates');\n $addon->removeConfig('synchronize_yformemails');\n }\n }", "function recurringdowntime_ccm_group_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'hostgroup') {\n $tmp['hostgroup_name'] = $cbargs['hostgroup_name'];\n } else if ($cbargs['type'] == 'servicegroup') {\n $tmp['servicegroup_name'] = $cbargs['servicegroup_name'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n if ($cbargs['type'] == 'hostgroup') {\n\n if ($cbargs['old_hostgroup_name'] != $cbargs['hostgroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('hostgroup_name', $c) && $c['hostgroup_name'] == $cbargs['old_hostgroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'hostgroup_name' => $cbargs['hostgroup_name']\n );\n }\n }\n }\n\n } else if ($cbargs['type'] == 'servicegroup') {\n\n if ($cbargs['old_servicegroup_name'] != $cbargs['servicegroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('servicegroup_name', $c) && $c['servicegroup_name'] == $cbargs['old_servicegroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'servicegroup_name' => $cbargs['servicegroup_name']\n );\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "function postUpdate()\n\t{\n\t\t$this->write();\n\n\t\tif ($this->subaction === 'schedule_conf') {\n\t\t\texec(\"sh /script/fix-cron-backup\");\n\n\t\t}\n\t}", "public function afterSyncing() {}", "public function run_sync_process(){\n //Verify if module is enabled\n if(Mage::helper('connector')->isEnabled()) {\n\n \t//Set sync type\n \t\t$sync_type = Minematic_Connector_Model_Config::SYNC_TYPE_MAGENTO_SIDE;\n\n //Log Starting sync process msg\n Mage::helper('connector')->logSyncProcess(\"Starting synchronization task job...\", $sync_type);\n\n try {\n\n //Sync all data\n Mage::getModel('connector/synchronization')->sync_data($sync_type, Minematic_Connector_Model_Config::DATA_TYPE_ALL);\n\n } catch (Exception $e) {\n\n \t// Logging Exceptions\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n \t\n }\n\n //Log Finishing sync process msg\n Mage::helper('connector')->logSyncProcess(\"Finishing synchronization task job.\", $sync_type);\n }\n }", "public function applyChanges()\n {\n $em = $this->doctrine->getManager();\n $em->flush();\n\n // TODO: Can we be sure that the changes are available in the DB now?\n $ch = $this->getMasterRabbit()->channel();\n $msg = new AMQPMessage(\"sync\");\n $ch->basic_publish($msg, \"\", $this->name . \"_master\");\n }", "function resync_all_package_configs($show_message = false) {\n\tlog_error(gettext(\"Resyncing configuration for all packages.\"));\n\n\tif ($show_message == true) {\n\t\techo \"Syncing packages:\";\n\t}\n\n\tforeach (config_get_path('installedpackages/package', []) as $idx => $package) {\n\t\tif (empty($package['name'])) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ($show_message == true) {\n\t\t\techo \" \" . $package['name'];\n\t\t}\n\t\tif (platform_booting() != true) {\n\t\t\tstop_service(get_package_internal_name($package));\n\t\t}\n\t\tsync_package($package['name']);\n\t\tupdate_status(gettext(\"Syncing packages...\") . \"\\n\");\n\t}\n\n\tif ($show_message == true) {\n\t\techo \" done.\\n\";\n\t}\n}", "public function sync()\n {\n $result = '';\n foreach ($this->hosts() as $host) {\n $result .= $host;\n $result .= \"\\n\";\n }\n file_put_contents($this->configFilePath(), $result);\n }", "function tcupdate(){\n $settings = $this->get_settings();\n exec( $settings['CMD_SUDO'].' /usr/local/pia/include/transmission-config.sh');\n}", "private function refresh_db_config()\n {\n $this->systemConfiguration->where(true, true);\n foreach ($this->scheduleMapping as $scheduleType) {\n foreach ($scheduleType as $where) {\n $this->systemConfiguration->orWhere('type', $where);\n }\n }\n $this->config = $this->systemConfiguration->select('type', 'value')->get()->toArray();\n }", "public function beforeSyncing() {}", "public function cleanUpOldRunningConfigurations() {}", "abstract protected function _updateConfiguration();", "public function manualSync()\n {\n // Only run Auto Sync Jobs\n \n $job = Mage::getModel('mailup/job');\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n foreach($job->fetchManualSyncQueuedJobsCollection() as $job) {\n \n }\n }", "public function migrate() : void {\r\n\t\t\t$currentSettings = new ConfigContainer();\r\n\r\n\t\t\tif (file_exists($this->settingsFile)) {\r\n\t\t\t\t$currentSettings = new ConfigContainer(file_get_contents($this->settingsFile));\r\n\t\t\t}\r\n\r\n\t\t\tif (!$currentSettings->has('configVersion')) {\r\n\t\t\t\t$currentSettings->set('configVersion', 0, FieldTypes::INTEGER);\r\n\t\t\t}\r\n\r\n\t\t\t$filesToApply = array();\r\n\t\t\t$currentVersion = $currentSettings->get('configVersion');\r\n\r\n\t\t\tforeach ($this->files as $file) {\r\n\t\t\t\tif ($file->origVersion >= $currentVersion) {\r\n\t\t\t\t\t$filesToApply[] = $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($filesToApply as $file) {\r\n\t\t\t\tforeach ($file->actions as $action) {\r\n\t\t\t\t\tswitch ($action->operator->getValue()) {\r\n\t\t\t\t\t\tcase MigrationOperators::ADD:\r\n\t\t\t\t\t\t\tif (!$currentSettings->has($action->field)) {\r\n\t\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value, $action->type->getValue());\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::CHANGE:\r\n\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::REMOVE:\r\n\t\t\t\t\t\t\t$currentSettings->remove($action->field);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::RENAME:\r\n\t\t\t\t\t\t\t$currentSettings->rename($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreStart\r\n\t\t\t\t\t\tdefault:\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreEnd\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$currentSettings->set('configVersion', intval($file->destVersion));\r\n\t\t\t}\r\n\r\n\t\t\tfile_put_contents($this->settingsFile, json_encode($currentSettings, JSON_PRETTY_PRINT));\r\n\r\n\t\t\treturn;\r\n\t\t}", "public function saveSystemConfig($observer)\n {\n Mage::getSingleton('adminhtml/session')->setMessages(Mage::getModel('core/message_collection'));\n\n Mage::getModel('core/config_data')\n ->load(self::CRON_STRING_PATH, 'path')\n ->setValue($this->_getSchedule())\n ->setPath(self::CRON_STRING_PATH)\n ->save();\n\n Mage::app()->cleanCache();\n\n $this->configCheck();\n\n // If there are errors in config, do not progress further as it may be testing old data\n $currentMessages = Mage::getSingleton('adminhtml/session')->getMessages();\n foreach ($currentMessages->getItems() as $msg) {\n if ($msg->getType() != 'success') {\n return;\n }\n }\n\n $messages = array();\n\n // Close connection to avoid mysql gone away errors\n $res = Mage::getSingleton('core/resource');\n $res->getConnection('core_write')->closeConnection();\n\n // Test connection\n $storeId = Mage::app()->getStore();\n $usernameWs = Mage::getStoreConfig('emailchef_newsletter/emailchef/username_ws');\n $passwordWs = Mage::getStoreConfig('emailchef_newsletter/emailchef/password_ws');\n $retConn = Mage::helper('emailchef')->testConnection($usernameWs, $passwordWs, $storeId);\n $messages = array_merge($messages, $retConn);\n\n // Config tests\n $retConfig = Mage::helper('emailchef')->testConfig();\n $messages = array_merge($messages, $retConfig);\n\n // Re-open connection to avoid mysql gone away errors\n $res->getConnection('core_write')->getConnection();\n\n // Add messages from test\n if (count($messages) > 0) {\n foreach ($messages as $msg) {\n $msgObj = Mage::getSingleton('core/message')->$msg['type']($msg['message']);\n Mage::getSingleton('adminhtml/session')->addMessage($msgObj);\n }\n }\n }", "public function setup_sync()\n {\n }", "public function run()\n {\n // Include everything we will potentially run here.\n // To make sure that old code is executed for this instance.\n include_once 'Libs/FileSystem/FileSystem.inc';\n Channels::includeSystem('Patching');\n Channels::includeSystem('SystemConfig');\n\n if (Channels::systemExists('Log') === TRUE) {\n Channels::includeSystem('Log');\n }\n\n if (Channels::systemExists('SystemConfigSplashScreenWidget') === TRUE) {\n Channels::includeSystem('SystemConfigSplashScreenWidget');\n }\n\n // Let it get the up-to-date Bugzilla login info and update the file.\n if (Channels::systemExists('Bugzilla') === TRUE) {\n Channels::includeSystem('Bugzilla');\n Bugzilla::writeBugzillaLoginInfo();\n }\n\n // Find the first scheduled patch and apply it.\n $config = Patching::getPatchingConfig();\n $patches = Patching::getPendingPatches();\n $info = Patching::getPatchingInfo();\n $oldRev = $config['revision'];\n $reboot = FALSE;\n if (empty($patches) === FALSE) {\n $name = array_shift($patches);\n $parts = explode('_', $name);\n $newRev = $parts[2];\n $status = self::applyPatch($name);\n if ($status === TRUE) {\n // Apply ok, archive it and notify central server.\n Patching::archivePatch($name);\n Patching::wsNotifyApplied($newRev, $oldRev);\n foreach ($info as $i) {\n if ($i['name'] === $name) {\n if (isset($i['reboot']) === TRUE) {\n if ($i['reboot'] === TRUE) {\n // Need to issue a system reboot command.\n $reboot = TRUE;\n break;\n }\n }\n }\n }\n\n // Update the patching config.\n $config['revision'] = $newRev;\n $config['last_updated'] = time();\n } else {\n // Apply fail, unschedule all pending patches.\n $pendingPatches = Patching::getPendingPatches();\n foreach ($pendingPatches as $p) {\n Patching::schedulePatch($p, NULL);\n }\n\n // Send error email and notify central server.\n Patching::sendInternalErrorMessage('ERR_PATCH_FAILED', $name);\n Patching::wsNotifyApplied($newRev, $oldRev, 'Failed to apply '.$name);\n }//end if\n } else {\n // Ask the central server for new updates, if any.\n $now = time();\n if ($now > ($config['last_checked'] + $config['check_interval'])) {\n Patching::wsCheckForUpdates();\n $config['last_checked'] = time();\n SystemConfig::setConfig('Patching', $config);\n }\n }//end if\n\n // No more pending patch, turn off the schedule toggle.\n $pendingPatches = Patching::getPendingPatches();\n if (empty($pendingPatches) === TRUE) {\n $config['schedule'] = FALSE;\n }\n\n SystemConfig::setConfig('Patching', $config);\n // Tells debian where to get operating system updates from.\n Channels::includeSystem('SquizSuite');\n $currProduct = SquizSuite::getProduct();\n $status = Patching::wsReleaseStatus();\n if ($status === 'GA') {\n @FileSystem::filePutContents('/etc/apt/sources.list', 'deb http://aptrepo-stable.squiz.net/ stable main');\n } else {\n @FileSystem::filePutContents('/etc/apt/sources.list', 'deb http://aptrepo-beta.squiz.net/ stable main');\n }\n\n // Issues a system reboot command if required.\n if ($reboot === TRUE) {\n exec('/sbin/reboot');\n }\n\n }", "function local_campusconnect_cron() {\n $ecslist = ecssettings::list_ecs();\n foreach ($ecslist as $ecsid => $name) {\n $ecssettings = new ecssettings($ecsid);\n\n if ($ecssettings->time_for_cron()) {\n mtrace(\"Checking for updates on ECS server '\".$ecssettings->get_name().\"'\");\n $connect = new connect($ecssettings);\n $queue = new receivequeue();\n\n try {\n $queue->update_from_ecs($connect);\n $queue->process_queue($ecssettings);\n } catch (connect_exception $e) {\n local_campusconnect_ecs_error_notification($ecssettings, $e->getMessage());\n }\n\n mtrace(\"Sending updates to ECS server '\".$ecssettings->get_name().\"'\");\n try {\n export::update_ecs($connect);\n course_url::update_ecs($connect);\n enrolment::update_ecs($connect);\n } catch (connect_exception $e) {\n local_campusconnect_ecs_error_notification($ecssettings, $e->getMessage());\n }\n\n $cms = participantsettings::get_cms_participant();\n if ($cms && $cms->get_ecs_id() == $ecssettings->get_id()) {\n // If we are updating from the ECS with the CMS attached, then check the directory mappings (and sort order).\n directorytree::check_all_mappings();\n }\n\n mtrace(\"Emailing any necessary notifications for '\".$ecssettings->get_name().\"'\");\n notification::send_notifications($ecssettings);\n\n $ecssettings->update_last_cron();\n }\n }\n}", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "function configurationApply(){\n\t\t// this create a \"config/files/config-XXX.conf\" whith the maker found\n\t\t$makers = glob($_SERVER['DOCUMENT_ROOT'].'/config/makers/make-config-*.php', GLOB_BRACE);\n\t\t\n\t\t// get an unique ID for this apply action\n\t\t$actionId = uniqid();\n\n\t\t// run all makers in the directory\n\t\tforeach($makers as $maker) {\n\t\t\t$pat[0]= 'make-config-';\n\t\t\t$pat[1]= '.php';\n\t\t\t$remp[0]= '';\n\t\t\t$remp[1]= '';\n\t\t\t// get the single maker name\n\t\t\t$maker_name = basename($maker);\n\t\t\t$maker_name = str_replace($pat,$remp,$maker_name);\n\t\t\t// set the temp conf file for the maker\n\t\t\tglobal $config_done;\n\t\t\t$config_done = $_SERVER['DOCUMENT_ROOT'].'/config/files/config-'.$maker_name.'.conf';\n\t\t\tglobal $config_generated;\n\t\t\tglobal $config_user_do;\n\t\t\tglobal $config_syst;\n\t\t\t// run the maker\n\t\t\tinclude($maker);\n\t\t\t// create the config temp file\n\t\t\tif($file = @fopen($config_done, 'w')) {\n\t\t\t\tfwrite($file,$config_generated);\n\t\t\t\tfclose($file);\n\t\t\t\t// add the task to the \"podServerSystem\" queue (copy files to their system path to apply configuration)\n\t\t\t\t$this->podServerSystem->addTask($config_user_do,'cp ' . $config_done . ' ' . $config_syst,TASK_COPY_FILE_CONFIG,$actionId);\n\n\t\t\t\t/* NOTE : you can add all makers you want by adding a file \"config/makers/make-config-YOURMAKERNAME.php\" \n\t\t\t\t In your maker file, you have to correctly configure \n\t\t\t\t\t\"$config_syst\" : the conf file path in your system\n\t\t\t\t\t\"$config_user_do\" : the user that copy the configuration system file (for \"podServerSystem\" tasks queue)\n\t\t\t\t And feed correctly the configuration \n\t\t\t\t\t\"$config_generated\" : the content of the conf. file to write to the system\n\t\t\t\t This action will execute it automatically when \"apply\" action will be used\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t\t\n\t\t// copy uploaded files items of the global configuration to their system directory\n\t\tforeach ($this->itemsConfiguration as $item){\n\t\t\tif ($item->type == 'file') {\n\t\t\t\t$file_uploads = $_SERVER['DOCUMENT_ROOT'].'/uploads/' . $item->name;\n\t\t\t\t// if the directory does not exists, create it by adding a \"mkdir\" task for the system user\n\t\t\t\tif (!file_exists($item->values)) {\n\t\t\t\t\t$this->podServerSystem->addTask($item->value,'mkdir ' . $item->values,TASK_MKDIR_AUTO);\n\t\t\t\t}\n\t\t\t\t$file_system = $item->values . $item->name;\n\t\t\t\t// adding a \"cp\" task for the system user\t\t\t\n\t\t\t\tif ($item->values != '' && file_exists($file_uploads) ) {\n\t\t\t\t\t$this->podServerSystem->addTask($item->value,'cp ' . $file_uploads . ' ' . $file_system,TASK_COPY_FILE_ITEM,$actionId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function reload_interfaces_sync() {\n\tglobal $config, $g;\n\n\tif (g_get('debug')) {\n\t\tlog_error(gettext(\"reload_interfaces_sync() is starting.\"));\n\t}\n\n\t/* parse config.xml again */\n\t$config = parse_config(true);\n\n\t/* enable routing */\n\tsystem_routing_enable();\n\tif (g_get('debug')) {\n\t\tlog_error(gettext(\"Enabling system routing\"));\n\t}\n\n\tif (g_get('debug')) {\n\t\tlog_error(gettext(\"Cleaning up Interfaces\"));\n\t}\n\n\t/* set up interfaces */\n\tinterfaces_configure();\n}", "private function updateConfigTable()\n {\n $connection = $this->resource->getConnection(ResourceConnection::DEFAULT_CONNECTION);\n $lsTableName = $this->resource->getTableName('core_config_data');\n $websiteQuery = \"UPDATE $lsTableName set scope = 'websites', scope_id = 1 WHERE path IN ('\" . implode(\"','\", $this->websiteScopeFields) . \"')\";\n $storeQuery = \"UPDATE $lsTableName set scope = 'stores', scope_id = 1 WHERE path IN ('\" . implode(\"','\", $this->nonwebsiteScopeFields) . \"')\";\n try {\n $connection->query($websiteQuery);\n $connection->query($storeQuery);\n\n } catch (Exception $e) {\n $this->logger->debug($e->getMessage());\n }\n }", "protected function resetSynchronised()\n {\n /*\n * Lists\n */\n\n /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */\n $lists = Mage::getModel('lapostaconnect/list')->getCollection();\n\n /** @var $list Laposta_Connect_Model_List */\n foreach ($lists as $list) {\n $list->setLapostaId('');\n $list->setWebhookToken('');\n $list->setSyncTime(null);\n }\n\n $lists->save();\n\n Mage::helper('lapostaconnect')->log('Lists reset OK.');\n\n /*\n * Fields\n */\n\n $fields = Mage::getModel('lapostaconnect/field')->getCollection();\n\n /** @var $field Laposta_Connect_Model_Field */\n foreach ($fields as $field) {\n $field->setLapostaId('');\n $field->setLapostaTag('');\n $field->setSyncTime(null);\n }\n\n $fields->save();\n\n Mage::helper('lapostaconnect')->log('Fields reset OK.');\n\n /*\n * Subscribers\n */\n\n /** @var $subscribers Laposta_Connect_Model_Mysql4_Subscriber_Collection */\n $subscribers = Mage::getModel('lapostaconnect/subscriber')->getCollection();\n\n /** @var $subscriber Laposta_Connect_Model_Subscriber */\n foreach ($subscribers as $subscriber) {\n $subscriber->setLapostaId('');\n $subscriber->setSyncTime(null);\n }\n\n $subscribers->save();\n\n Mage::helper('lapostaconnect')->log('Subscribers reset OK.');\n }", "private function respawn()\n {\n // create new event at the end of the queue\n Mage::getModel('marketingsoftware/queue')\n ->setObject($this->currentStatus)\n ->setAction('file_sync')\n ->save();\n }", "public function check_sync()\n {\n }", "function sync() {\n\t\t// TODO\n\t}", "public static function syncActiveJobs()\n {\n $hosts = Host::getAll();\n\n foreach ($hosts as $Host) {\n\n // Get pending jobs for host\n $pendingJobs = static::getAllByWhere([\n 'Status' => 'pending',\n 'HostID' => $Host->ID\n ]);\n\n if (!$pendingJobs) {\n continue;\n }\n\n // Get active jobs from host\n $activeJobs = $Host->executeRequest('/jobs', 'GET')['jobs'];\n\n // Search active jobs for pending jobs to find updates\n foreach ($pendingJobs as $PendingJob) {\n\n // Update any lost jobs\n if (empty($activeJobs[$PendingJob->Site->Handle])) {\n $PendingJob->Status = 'failed';\n $PendingJob->Result = 'lost on server';\n if ($PendingJob->Site) {\n $PendingJob->Site->Updating = false;\n }\n $PendingJob->save();\n continue;\n }\n\n $activeJob = $activeJobs[$PendingJob->Site->Handle][$PendingJob->UID];\n\n if ($activeJob && $activeJob['status'] !== 'pending') {\n\n // Update job\n $PendingJob->Status = $activeJob['status'];\n if (!empty($activeJob['started'])) {\n $PendingJob->Started = $activeJob['started'] / 1000;\n }\n if (!empty($activeJob['completed'])) {\n $PendingJob->Completed = $activeJob['completed'] / 1000;\n }\n\n if (!empty($activeJob['command']['result'])) {\n if (strlen(json_encode($activeJob['command']['result'])) > 60000) {\n $PendingJob->Result = 'Output too long';\n } else {\n $PendingJob->Result = $activeJob['command']['result'];\n }\n } elseif (!empty($activeJob['message'])) {\n $PendingJob->Result = $activeJob['message'];\n }\n $PendingJob->save();\n\n // Update site on vfs update\n if ($PendingJob->Action == 'vfs-update') {\n\n // Get updated site record\n $Site = Site::getByID($PendingJob->SiteID);\n\n // Skip vfs-update actions on failed job\n if ($PendingJob->Status == 'failed') {\n $Site->Updating = false;\n $Site->save();\n continue;\n }\n\n // Update pending job's site\n $initialUpdate = !boolval($Site->ParentCursor);\n $Site->ParentCursor = $activeJob['command']['result']['parentCursor'];\n $Site->LocalCursor = $activeJob['command']['result']['localCursor'];\n $Site->Updating = false;\n $Site->save();\n\n // Conditionally update child site\n if (!empty($activeJob['command']['updateChild']) && $activeJob['command']['updateChild'] === true) {\n $childSites = Site::getAllByField('ParentSiteID', $Site->ID);\n foreach ($childSites as $ChildSite) {\n $ChildSite->requestFileSystemUpdate();\n }\n }\n\n // Fire initial vfs update event\n if ($initialUpdate) {\n \\Emergence\\EventBus::fireEvent(\n 'afterInitialVFSUpdate',\n $Site->getRootClass(),\n [\n 'Record' => $Site,\n 'Job' => $PendingJob\n ]\n );\n }\n }\n }\n }\n }\n }", "public function testConfigChange() {\n $this->installProcedure->shouldBeCalledOnce();\n $this->updateProcedure->shouldBeCalledOnce();\n\n $this->cachedInstall->install($this->installer, $this->updater);\n file_put_contents($this->appRoot . '/config/a/foo.yml', 'bar');\n $this->cachedInstall->install($this->installer, $this->updater);\n\n $this->assertSiteInstalled();\n $this->assertSiteCached($this->cachedInstall->getInstallCacheId());\n $this->assertSiteCached($this->cachedInstall->getUpdateCacheId());\n }", "function applyCustomUpdates()\n\t{\n\t\tglobal $ilCtrlStructureReader;\n\n\t\t$ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);\n\n\t\tinclude_once \"./Services/Database/classes/class.ilDBUpdate.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacAdmin.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacReview.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacSystem.php\";\n\t\tinclude_once \"./Services/Tree/classes/class.ilTree.php\";\n\t\tinclude_once \"./Services/Xml/classes/class.ilSaxParser.php\";\n\t\tinclude_once \"./Services/Object/classes/class.ilObjectDefinition.php\";\n\n\t\t// referencing db handler in language class\n\t\t$ilDB = $this->setup->getClient()->db;\n\t\t$this->lng->setDbHandler($ilDB);\n\n\t\t// run dbupdate\n\t\t$dbupdate = new ilDBUpdate($ilDB);\n\t\t$dbupdate->applyCustomUpdates();\n\n\t\tif ($dbupdate->updateMsg == \"no_changes\")\n\t\t{\n\t\t\t$message = $this->lng->txt(\"no_changes\").\". \".$this->lng->txt(\"database_is_uptodate\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sep = \"\";\n\t\t\tforeach ($dbupdate->updateMsg as $row)\n\t\t\t{\n\t\t\t\tif ($row[\"msg\"] == \"update_applied\")\n\t\t\t\t{\n\t\t\t\t\t$a_message.= $sep.$row[\"nr\"];\n\t\t\t\t\t$sep = \", \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$e_message.= \"<br/>\".$this->lng->txt($row[\"msg\"]).\": \".$row[\"nr\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($a_message != \"\")\n\t\t\t{\n\t\t\t\t$a_message = $this->lng->txt(\"update_applied\").\": \".$a_message;\n\t\t\t}\n\t\t}\n\n\t\tilUtil::sendInfo($a_message.$e_message, true);\n\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t}", "public function testConfigDirChange() {\n $this->installProcedure->shouldBeCalledTimes(2);\n $this->updateProcedure->shouldNotBeCalled();\n\n $this->cachedInstall->install($this->installer, $this->updater);\n $this->cachedInstall->setConfigDir($this->appRoot . '/config/b');\n $this->cachedInstall->install($this->installer, $this->updater);\n\n $this->assertSiteInstalled();\n $this->assertSiteCached($this->cachedInstall->getInstallCacheId());\n $this->assertSiteCached($this->cachedInstall->getUpdateCacheId());\n }", "public function autoSync()\n {\n // Only run Auto Sync Jobs\n $job = Mage::getModel('mailup/job');\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n foreach($job->fetchAutoSyncQueuedJobsCollection() as $job) {\n \n }\n }", "public function onSync($aseco){\r\n\t\t// Read Configuration\r\n\t\tif (!$xml = $aseco->parser->xmlToArray('config/checkpoint_time_differences.xml', true, true)) {\r\n\t\t\ttrigger_error('[CpDiff] Could not read/parse config file \"config/checkpoint_time_differences.xml\"!', E_USER_ERROR);\r\n\t\t}\r\n\t\t$this->settings = $xml['SETTINGS'];\r\n\t\tunset($xml);\r\n\t\t\r\n\t}", "function crpTalk_admin_updateconfig()\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpTalk::', '::', ACCESS_ADMIN))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$talk= new crpTalk();\n\treturn $talk->updateConfig();\n}", "function updateSystemModuleConfigOptions() {\n try {\n $config_options_table = TABLE_PREFIX . 'config_options';\n $currencies_table = TABLE_PREFIX . 'currencies';\n $tax_rates_table = TABLE_PREFIX . 'tax_rates';\n\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n // Globalization tables and settings\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"day_offs (\n id int unsigned NOT NULL auto_increment,\n name varchar(100) DEFAULT NULL,\n event_date date DEFAULT NULL,\n repeat_yearly tinyint(1) unsigned not null default '0' NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n UNIQUE name (name)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n if(DB::tableExists($currencies_table)) {\n DB::execute(\"ALTER TABLE $currencies_table DROP default_rate\");\n } else {\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"currencies (\n id int unsigned NOT NULL auto_increment,\n name varchar(50) DEFAULT NULL,\n code varchar(3) DEFAULT NULL,\n is_default tinyint(1) unsigned not null default '0' NOT NULL DEFAULT '0',\n PRIMARY KEY (id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"INSERT INTO $currencies_table (name, code, is_default) VALUES (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?)\",\n 'Euro', 'EUR', false,\n 'US Dollar', 'USD', true,\n 'British Pound', 'GBP', false,\n 'Japanese Yen', 'JPY', false\n );\n } // if\n\n if (DB::tableExists($tax_rates_table)) {\n $tax_rates = DB::execute(\"SELECT id, name FROM $tax_rates_table\");\n\n if($tax_rates) {\n foreach($tax_rates as $tax_rate) {\n $original_tax_rate_name = $tax_rate['name'];\n\n $tax_rate_name = $original_tax_rate_name;\n $counter = 1;\n\n while(DB::executeFirstCell(\"SELECT COUNT(id) FROM $tax_rates_table WHERE name = ? AND id != ?\", $tax_rate_name, $tax_rate['id'])) {\n $tax_rate_name = \"$original_tax_rate_name $counter\";\n $counter++;\n } // while\n\n if($tax_rate_name != $original_tax_rate_name) {\n DB::execute(\"UPDATE $tax_rates_table SET name = ? WHERE id = ?\", $tax_rate_name, $tax_rate['id']);\n } // if\n } // foreach\n } else {\n DB::execute(\"INSERT INTO $tax_rates_table (name, percentage) VALUES (?, ?)\", 'VAT', 17.50);\n } // if\n\n DB::execute(\"ALTER TABLE $tax_rates_table ADD UNIQUE INDEX (name)\");\n } else {\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"tax_rates (\n\t\t\t\t\t id int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t name varchar(50) DEFAULT NULL,\n\t\t\t\t\t percentage decimal(6,3) DEFAULT '0.000',\n\t\t\t\t\t PRIMARY KEY (id),\n\t\t\t\t\t UNIQUE KEY name (name)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"INSERT INTO $tax_rates_table (name, percentage) VALUES (?, ?)\", 'VAT', 17.50);\n } //if\n\n // Desktop sets\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"desktop_sets (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'DesktopSet',\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX parent (parent_type, parent_id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"desktops (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'Desktop',\n desktop_set_id int(6) unsigned NOT NULL DEFAULT 0,\n name varchar(50) DEFAULT NULL,\n position int(5) unsigned NOT NULL DEFAULT 0,\n raw_additional_properties longtext,\n PRIMARY KEY (id),\n INDEX type (type)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"desktop_widgets (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'DesktopWidget',\n desktop_id int(5) unsigned NOT NULL DEFAULT 0,\n column_id int(3) unsigned NOT NULL DEFAULT 0,\n position int(5) unsigned NOT NULL DEFAULT 0,\n raw_additional_properties longtext,\n PRIMARY KEY (id),\n INDEX type (type)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n // Define default desktop set\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"desktop_sets (type, parent_type, parent_id) VALUES ('DesktopSet', NULL, NULL)\");\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"desktops (type, desktop_set_id, name, position) VALUES ('SplitDesktop', 1, 'Welcome', 1)\");\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"desktop_widgets (type, desktop_id, column_id, position) VALUES \n ('RecentActivitiesDesktopWidget', 1, 1, 1), \n ('SystemNotificationsDesktopWidget', 1, 2, 1), \n ('FavoriteProjectsDesktopWidget', 1, 2, 2), \n ('WhosOnlineDesktopWidget', 1, 2, 3)\n \");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"code_snippets (\n id int unsigned NOT NULL auto_increment,\n parent_id int(11) unsigned NULL DEFAULT NULL,\n parent_type int(30) NULL DEFAULT NULL,\n syntax varchar(50) DEFAULT NULL,\n body text,\n created_on datetime DEFAULT NULL,\n created_by_id int unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n PRIMARY KEY (id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n // ---------------------------------------------------\n // Update emailing\n // ---------------------------------------------------\n\n $incoming_mailboxes_table = TABLE_PREFIX . 'incoming_mailboxes';\n $incoming_mail_filters_table = TABLE_PREFIX . 'incoming_mail_filters';\n $incoming_mails_table = TABLE_PREFIX . 'incoming_mails';\n\n DB::execute('DROP TABLE ' . TABLE_PREFIX . 'email_templates, ' . TABLE_PREFIX . 'email_template_translations');\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"mailing_activity_logs (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'MailingActivityLog',\n direction enum('in', 'out') NOT NULL DEFAULT 'out',\n from_id int(10) unsigned NULL DEFAULT NULL,\n from_name varchar(100) DEFAULT NULL,\n from_email varchar(150) DEFAULT NULL,\n to_id int(10) unsigned NULL DEFAULT NULL,\n to_name varchar(100) DEFAULT NULL,\n to_email varchar(150) DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n raw_additional_properties longtext,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX created_on (created_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n // Mailing\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"outgoing_messages (\n id int unsigned NOT NULL auto_increment,\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n sender_id int(10) unsigned NULL DEFAULT NULL,\n sender_name varchar(100) DEFAULT NULL,\n sender_email varchar(150) DEFAULT NULL,\n recipient_id int(10) unsigned NOT NULL DEFAULT '0',\n recipient_name varchar(100) DEFAULT NULL,\n recipient_email varchar(150) DEFAULT NULL,\n subject varchar(255) DEFAULT NULL,\n body longtext,\n context_id varchar(50) DEFAULT NULL,\n mailing_method varchar(15) NOT NULL DEFAULT 'in_background',\n created_on datetime DEFAULT NULL,\n send_retries int(5) unsigned NOT NULL DEFAULT 0,\n PRIMARY KEY (id),\n INDEX parent (parent_type, parent_id),\n INDEX recipient_id (recipient_id),\n INDEX created_on (created_on),\n INDEX recipient_email (recipient_email)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $incoming_mail_filters_table (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'IncomingMailFilter',\n name varchar(100) DEFAULT NULL,\n description text,\n subject text,\n body text,\n priority varchar(200) DEFAULT NULL,\n attachments varchar(200) DEFAULT NULL,\n sender longtext,\n mailbox_id text,\n action_name varchar(100) DEFAULT NULL,\n action_parameters longtext,\n position int(10) NOT NULL DEFAULT 0,\n is_enabled tinyint(1) unsigned NOT NULL DEFAULT '0',\n is_default tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX type (type), \n INDEX name (name)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n // Update incoming mailboxes module\n if(DB::executeFirstCell(\"SELECT COUNT(*) FROM \" . TABLE_PREFIX . 'modules WHERE name = ?', 'incoming_mail') > 0) {\n\n // Prepare filters based on mailbox settings\n $mailboxes = DB::execute(\"SELECT * FROM $incoming_mailboxes_table\");\n if($mailboxes) {\n foreach($mailboxes as $mailbox) {\n $mailbox_id = array(\n (integer) $mailbox['id'],\n );\n $name = \"$mailbox[username]@$mailbox[host]\";\n\n $action_type = $mailbox['object_type'] == 'discussion' ? 'IncomingMailDiscussionAction' : 'IncomingMailTaskAction';\n\n $action_parameters = array('project_id' => (integer) $mailbox['project_id']);\n\n if($mailbox['accept_anonymous']) {\n $action_parameters['allow_for_everyone'] = 'allow_for_people_who_can';\n } elseif($mailbox['accept_all_registered']) {\n $action_parameters['allow_for_everyone'] = 'allow_for_everyone';\n } // if\n\n DB::execute(\"INSERT INTO $incoming_mail_filters_table (name, mailbox_id, action_name, action_parameters, is_enabled) VALUES (?, ?, ?, ?, ?)\", $name, serialize($mailbox_id), $action_type, serialize($action_parameters), true);\n } // foreach\n } // if\n\n DB::execute(\"ALTER TABLE \" . TABLE_PREFIX . \"incoming_mail_attachments ADD type VARCHAR(50) NOT NULL DEFAULT 'IncomingMailAttachment' AFTER id\");\n\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table CHANGE type server_type ENUM('POP3','IMAP') NOT NULL DEFAULT 'POP3'\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table ADD type VARCHAR(50) NOT NULL DEFAULT 'IncomingMailbox' AFTER id\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP project_id\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP object_type\");\n// DB::execute(\"ALTER TABLE $incoming_mailboxes_table ADD name VARCHAR(100) NULL DEFAULT NULL AFTER id;\");\n// DB::execute(\"ALTER TABLE $incoming_mailboxes_table ADD email VARCHAR(150) NULL DEFAULT NULL AFTER name\");\n// DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP from_name\");\n// DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP from_email\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table CHANGE from_name name VARCHAR(100) NULL DEFAULT NULL AFTER id\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table CHANGE from_email email VARCHAR(150) NULL DEFAULT NULL AFTER name\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table CHANGE enabled is_enabled TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table ADD failure_attempts TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER is_enabled\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP accept_all_registered\");\n DB::execute(\"ALTER TABLE $incoming_mailboxes_table DROP accept_anonymous\");\n\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD type VARCHAR(50) NOT NULL DEFAULT 'IncomingMail' AFTER id\");\n DB::execute(\"ALTER TABLE $incoming_mails_table MODIFY COLUMN incoming_mailbox_id INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER type\");\n DB::execute(\"ALTER TABLE $incoming_mails_table CHANGE incoming_mailbox_id incoming_mailbox_id SMALLINT(10) UNSIGNED NOT NULL DEFAULT '0'\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD is_replay_to_notification TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'\");\n DB::execute(\"ALTER TABLE $incoming_mails_table DROP project_id\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD to_email TEXT NULL AFTER body\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD cc_to TEXT NULL AFTER to_email\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD bcc_to TEXT NULL AFTER cc_to\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD reply_to TEXT NULL AFTER bcc_to\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD priority VARCHAR(200) NULL DEFAULT NULL AFTER reply_to\");\n DB::execute(\"ALTER TABLE $incoming_mails_table ADD additional_data LONGTEXT NULL AFTER priority\");\n DB::execute(\"ALTER TABLE $incoming_mails_table DROP object_type\");\n DB::execute(\"ALTER TABLE $incoming_mails_table MODIFY COLUMN created_on DATETIME DEFAULT NULL AFTER state\");\n\n DB::execute('DROP TABLE ' . TABLE_PREFIX . 'incoming_mail_activity_logs');\n\n // Install incoming mailboxes module\n } else {\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"incoming_mail_attachments (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'IncomingMailAttachment',\n mail_id int(10) unsigned NULL DEFAULT NULL,\n temporary_filename varchar(255) DEFAULT NULL,\n original_filename varchar(255) DEFAULT NULL,\n content_type varchar(255) DEFAULT NULL,\n file_size int(10) unsigned NOT NULL DEFAULT 0,\n PRIMARY KEY (id),\n INDEX type (type)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $incoming_mailboxes_table (\n id int unsigned NOT NULL auto_increment,\n name varchar(100) DEFAULT NULL,\n email varchar(100) DEFAULT NULL,\n mailbox varchar(100) DEFAULT NULL,\n username varchar(50) DEFAULT NULL,\n password varchar(50) DEFAULT NULL,\n host varchar(255) DEFAULT NULL,\n server_type enum('POP3', 'IMAP') NOT NULL DEFAULT 'POP3',\n type varchar(50) NOT NULL DEFAULT 'ApplicationObject',\n port int(10) unsigned NULL DEFAULT NULL,\n security enum('NONE', 'TLS', 'SSL') NOT NULL DEFAULT 'NONE',\n last_status int(3) unsigned NOT NULL DEFAULT '0',\n is_enabled tinyint(1) unsigned NOT NULL DEFAULT '0',\n failure_attempts int(3) NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX type (type)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $incoming_mails_table (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'IncomingMail',\n incoming_mailbox_id int(10) unsigned NULL DEFAULT NULL,\n parent_id int(10) NULL DEFAULT NULL,\n is_replay_to_notification tinyint(1) unsigned NOT NULL DEFAULT '0',\n subject varchar(255) DEFAULT NULL,\n body text,\n to_email text,\n cc_to text,\n bcc_to text,\n reply_to text,\n priority varchar(200) DEFAULT NULL,\n additional_data longtext,\n headers longtext,\n state tinyint(3) unsigned NOT NULL DEFAULT '0',\n original_state tinyint(3) unsigned NULL DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n created_by_id int unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX incoming_mailbox_id (incoming_mailbox_id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n } // if\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"access_logs (\n id bigint unsigned NOT NULL auto_increment,\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n accessed_by_id int(10) unsigned NULL DEFAULT NULL,\n accessed_by_name varchar(100) DEFAULT NULL,\n accessed_by_email varchar(150) DEFAULT NULL,\n accessed_on datetime DEFAULT NULL,\n ip_address varchar(50) DEFAULT NULL,\n is_download tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX parent (parent_type, parent_id),\n INDEX accessed_by_id (accessed_by_id),\n INDEX accessed_on (accessed_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"access_logs_archive (\n id bigint unsigned NOT NULL auto_increment,\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n accessed_by_id int(10) unsigned NULL DEFAULT NULL,\n accessed_by_name varchar(100) DEFAULT NULL,\n accessed_by_email varchar(150) DEFAULT NULL,\n accessed_on datetime DEFAULT NULL,\n ip_address varchar(50) DEFAULT NULL,\n is_download tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX parent (parent_type, parent_id),\n INDEX accessed_by_id (accessed_by_id),\n INDEX accessed_on (accessed_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"routing_cache (\n id int unsigned NOT NULL auto_increment,\n path_info varchar(255) DEFAULT NULL,\n name varchar(255) DEFAULT NULL,\n content text,\n last_accessed_on datetime DEFAULT NULL,\n PRIMARY KEY (id),\n UNIQUE path_info (path_info)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"shared_object_profiles (\n id int unsigned NOT NULL auto_increment,\n parent_type varchar(50) DEFAULT NULL,\n parent_id int(10) unsigned NOT NULL DEFAULT '0',\n sharing_context varchar(50) NOT NULL,\n sharing_code varchar(100) NOT NULL,\n expires_on date DEFAULT NULL,\n raw_additional_properties longtext,\n created_on datetime DEFAULT NULL,\n created_by_id int unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n is_discoverable tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n UNIQUE sharing (sharing_context, sharing_code),\n UNIQUE parent (parent_type, parent_id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n if(defined('LICENSE_PACKAGE') && LICENSE_PACKAGE == 'corporate') {\n if($this->isModuleInstalled('checklists')) {\n $project_tabs = array('outline', 'milestones', 'tasks', 'todo_lists', 'discussions', 'files', 'notebooks', 'time', 'source', 'calendar');\n } else {\n $project_tabs = array('outline', 'milestones', 'tasks', 'discussions', 'files', 'notebooks', 'time', 'source', 'calendar');\n } // if\n } else {\n $project_tabs = array('outline', 'milestones', 'todo_lists', 'discussions', 'files');\n } // if\n\n // Options\n $add_options = array(\n 'first_run_on' => DB::executeFirstCell('SELECT MIN(created_on) FROM ' . TABLE_PREFIX . 'update_history'),\n 'identity_name' => 'Projects',\n 'project_tabs' => $project_tabs,\n 'default_project_object_visibility' => 1,\n 'first_milestone_starts_on' => null,\n 'project_requests_enabled' => false,\n 'project_requests_page_title' => 'Request a Project',\n 'project_requests_page_description' => 'Please tell us more about your project',\n 'project_requests_custom_fields' => array(\n 'custom_field_1' => array('enabled' => true, 'name' => 'Budget'),\n 'custom_field_2' => array('enabled' => true, 'name' => 'Time Frame'),\n 'custom_field_3' => array('enabled' => false, 'name' => ''),\n 'custom_field_4' => array('enabled' => false, 'name' => ''),\n 'custom_field_5' => array('enabled' => false, 'name' => ''),\n ),\n 'project_requests_captcha_enabled' => false,\n 'project_requests_notify_user_ids' => null,\n 'time_workdays' => array(1, 2, 3, 4, 5),\n 'skip_days_off_when_rescheduling' => true,\n\n // Email\n 'mailing_method' => 'instantly',\n 'mailing_method_override' => false,\n\n // Text processing\n 'whitelisted_tags' => array(\n 'environment' => array(\n 'a' => array('href', 'title', 'class', 'object-id', 'object-class'),\n 'div' => array('class', 'placeholder-type', 'placeholder-object-id', 'placeholder-extra'),\n 'img' => array('src', 'alt', 'title', 'class')\n ),\n 'visual_editor' => array('img' => array('image-type', 'object-id', 'class')),\n ),\n );\n\n $to_insert = array();\n foreach($add_options as $k => $v) {\n $to_insert[] = DB::prepare(\"(?, 'system', ?)\", $k, serialize($v));\n } // foreach\n\n DB::execute(\"INSERT INTO $config_options_table (name, module, value) VALUES \" . implode(', ', $to_insert));\n DB::execute(\"DELETE FROM $config_options_table WHERE name IN (?)\", array(\n 'show_welcome_message',\n 'projects_use_client_icons',\n ));\n\n return true;\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n }", "public function flush()\n {\n self::$configs = [];\n }", "function drush_post_sql_sync_extras_post_sql_sync($source = NULL, $destination = NULL) {\n $registry_rebuild = drush_get_option('rr');\n if ($registry_rebuild) {\n drush_log(dt(\"Rebuild the registry post-sql-sync\"), 'ok');\n drush_invoke_process($destination, 'rr');\n }\n $features_revert = drush_get_option('fra');\n if ($features_revert) {\n drush_log(dt(\"Revert all features post-sql-sync\"), 'ok');\n drush_invoke_process($destination, 'fra', array(), array('yes' => TRUE));\n }\n $modules_to_enable = drush_get_option_list('enable');\n if (!empty($modules_to_enable)) {\n drush_log(dt(\"Enable !modules post-sql-sync\", array('!modules' => implode(',', $modules_to_enable))), 'ok');\n drush_invoke_process($destination, 'pm-enable', $modules_to_enable, array('yes' => TRUE));\n }\n $modules_to_disable = drush_get_option_list('disable');\n if (!empty($modules_to_disable)) {\n drush_log(dt(\"Disable !modules post-sql-sync\", array('!modules' => implode(',', $modules_to_disable))), 'ok');\n drush_invoke_process($destination, 'pm-disable', $modules_to_disable, array('yes' => TRUE));\n }\n $permissions_table = drush_get_option('permission');\n if (!empty($permissions_table)) {\n foreach ($permissions_table as $role_name => $actions) {\n if (array_key_exists('add', $actions)) {\n $permissions_to_add = is_array($actions['add']) ? $actions['add'] : explode(', ', $actions['add']);\n foreach ($permissions_to_add as $permission) {\n $values = drush_invoke_process($destination, 'role-add-perm', array($role_name, $permission), array(), array('integrate' => TRUE));\n }\n }\n if (array_key_exists('remove', $actions)) {\n $permissions_to_remove = is_array($actions['remove']) ? $actions['remove'] : explode(', ', $actions['remove']);\n foreach ($permissions_to_remove as $permission) {\n $values = drush_invoke_process($destination, 'role-remove-perm', array($role_name, $permission), array(), array('integrate' => TRUE));\n }\n }\n }\n }\n if ($registry_rebuild) {\n drush_log(dt(\"Rebuild the registry post-sql-sync\"), 'ok');\n drush_invoke_process($destination, 'rr');\n }\n}", "public function configure(): void\n {\n if ($this->isConfigured()) {\n return;\n }\n\n foreach ($this->dbal->getDatabases() as $db) {\n $schema = $db->table($this->config->getTable())->getSchema();\n\n // Schema update will automatically sync all needed data\n $schema->primary('id');\n $schema->string('migration', 255)->nullable(false);\n $schema->datetime('time_executed')->datetime();\n $schema->index(['migration']);\n\n $schema->save();\n }\n }", "private function synchronize() {\n\t\t$response = $this->send(self::$synchronize_uri, self::SYNC_SIZE);\n\t\t$this->_set_sync($response);\n\t}", "function admin_change_json()\n{\n global $app, $globalSettings;\n {\n $app->getLog()->debug('admin_change: started');\n # Check access permission\n if (!is_admin()) {\n $app->getLog()->warn('admin_change: no admin permission');\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin')),\n 'messages' => [getMessageString('invalid_password')],\n 'isadmin' => false]);\n return;\n }\n $nconfigs = [];\n $req_configs = $app->request()->post();\n $errors = [];\n $messages = [];\n $app->getLog()->debug('admin_change: ' . var_export($req_configs, true));\n\n ## Check for consistency - calibre directory\n # Calibre dir is still empty and no change in sight --> error\n if (!has_valid_calibre_dir() && empty($req_configs[CALIBRE_DIR])) {\n array_push($errors, 1);\n }\n # Calibre dir changed, check it for existence, delete thumbnails of old calibre library\n elseif (array_key_exists(CALIBRE_DIR, $req_configs)) {\n $req_calibre_dir = $req_configs[CALIBRE_DIR];\n if ($req_calibre_dir != $globalSettings[CALIBRE_DIR]) {\n if (!Calibre::checkForCalibre($req_calibre_dir)) {\n array_push($errors, 1);\n } elseif ($app->bbs->clearThumbnails()) {\n $app->getLog()->info('admin_change: Lib changed, deleted existing thumbnails.');\n } else {\n $app->getLog()->info('admin_change: Lib changed, deletion of existing thumbnails failed.');\n }\n }\n }\n ## More consistency checks - kindle feature\n # Switch off Kindle feature, if no valid email address supplied\n if ($req_configs[KINDLE] == \"1\") {\n if (empty($req_configs[KINDLE_FROM_EMAIL])) {\n array_push($errors, 5);\n } elseif (!isEMailValid($req_configs[KINDLE_FROM_EMAIL])) {\n array_push($errors, 5);\n }\n }\n\n ## Check for a change in the thumbnail generation method\n if ($req_configs[THUMB_GEN_CLIPPED] != $globalSettings[THUMB_GEN_CLIPPED]) {\n $app->getLog()->info('admin_change: Thumbnail generation method changed. Existing Thumbnails will be deleted.');\n # Delete old thumbnails if necessary\n if ($app->bbs->clearThumbnails()) {\n $app->getLog()->info('admin_change: Deleted exisiting thumbnails.');\n } else {\n $app->getLog()->info('admin_change: Deletion of exisiting thumbnails failed.');\n }\n }\n\n ## Check for a change in page size, min 1, max 100\n if ($req_configs[PAGE_SIZE] != $globalSettings[PAGE_SIZE]) {\n if ($req_configs[PAGE_SIZE] < 1 || $req_configs[PAGE_SIZE] > 100) {\n $app->getLog()->warn('admin_change: Invalid page size requested: ' . $req_configs[PAGE_SIZE]);\n array_push($errors, 4);\n }\n }\n\n # Don't save just return the error status\n if (count($errors) > 0) {\n $app->getLog()->error('admin_change: ended with error ' . var_export($errors, true));\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin')),\n 'isadmin' => true,\n 'errors' => $errors]);\n } else {\n ## Apply changes\n foreach ($req_configs as $key => $value) {\n if (!isset($globalSettings[$key]) || $value != $globalSettings[$key]) {\n $nconfigs[$key] = $value;\n $globalSettings[$key] = $value;\n $app->getLog()->debug('admin_change: ' . $key . ' changed: ' . $value);\n }\n }\n # Save changes\n if (count($nconfigs) > 0) {\n $app->bbs->saveConfigs($nconfigs);\n $app->getLog()->debug('admin_change: changes saved');\n }\n $app->getLog()->debug('admin_change: ended');\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 2),\n 'messages' => [getMessageString('changes_saved')],\n 'mailers' => mkMailers(),\n 'ttss' => mkTitleTimeSortOptions(),\n 'isadmin' => true,\n ]);\n }\n }\n}", "public function daily_sync()\n {\n /** @var $helper Mailigen_Synchronizer_Helper_Data */\n $helper = Mage::helper('mailigen_synchronizer');\n if (!$helper->isEnabled()) {\n return \"Module is disabled\";\n }\n\n /**\n * Synchronize Newsletter\n */\n try {\n if ($helper->canAutoSyncNewsletter()) {\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncNewsletter();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n\n /**\n * Synchronize Customers\n */\n try {\n if ($helper->canAutoSyncCustomers() || $helper->getManualSync()) {\n if ($helper->getManualSync()) {\n $helper->setManualSync(0);\n }\n\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncCustomers();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n }", "public static function updateScheduledDevicesSoftware()\n {\n $devices = Device::where('sch_update', '=', '1')->get();\n foreach ($devices as $device) {\n $device->updateSoftware();\n $device->rebootDevice();\n $device->sch_update = '0';\n $device->save();\n }\n }", "function schedule_backup_course_configure($course,$starttime = 0) { \n\n global $CFG;\n \n $status = true;\n\n schedule_backup_log($starttime,$course->id,\" checking parameters\");\n\n //Check the required variable\n if (empty($course->id)) {\n $status = false;\n }\n //Get scheduled backup preferences\n $backup_config = backup_get_config();\n\n //Checks backup_config pairs exist\n if ($status) {\n if (!isset($backup_config->backup_sche_modules)) {\n $backup_config->backup_sche_modules = 1;\n }\n if (!isset($backup_config->backup_sche_withuserdata)) {\n $backup_config->backup_sche_withuserdata = 1;\n }\n if (!isset($backup_config->backup_sche_metacourse)) {\n $backup_config->backup_sche_metacourse = 1;\n }\n if (!isset($backup_config->backup_sche_users)) {\n $backup_config->backup_sche_users = 1;\n }\n if (!isset($backup_config->backup_sche_logs)) {\n $backup_config->backup_sche_logs = 0;\n }\n if (!isset($backup_config->backup_sche_userfiles)) {\n $backup_config->backup_sche_userfiles = 1;\n }\n if (!isset($backup_config->backup_sche_coursefiles)) {\n $backup_config->backup_sche_coursefiles = 1;\n }\n if (!isset($backup_config->backup_sche_messages)) {\n $backup_config->backup_sche_messages = 0;\n }\n if (!isset($backup_config->backup_sche_active)) {\n $backup_config->backup_sche_active = 0;\n }\n if (!isset($backup_config->backup_sche_weekdays)) {\n $backup_config->backup_sche_weekdays = \"0000000\";\n }\n if (!isset($backup_config->backup_sche_hour)) {\n $backup_config->backup_sche_hour = 00;\n }\n if (!isset($backup_config->backup_sche_minute)) {\n $backup_config->backup_sche_minute = 00;\n }\n if (!isset($backup_config->backup_sche_destination)) {\n $backup_config->backup_sche_destination = \"\";\n }\n if (!isset($backup_config->backup_sche_keep)) {\n $backup_config->backup_sche_keep = 1;\n }\n }\n\n if ($status) {\n //Checks for the required files/functions to backup every mod\n //And check if there is data about it\n $count = 0;\n if ($allmods = get_records(\"modules\") ) {\n foreach ($allmods as $mod) {\n $modname = $mod->name;\n $modfile = \"$CFG->dirroot/mod/$modname/backuplib.php\";\n $modbackup = $modname.\"_backup_mods\";\n $modcheckbackup = $modname.\"_check_backup_mods\";\n if (file_exists($modfile)) {\n include_once($modfile);\n if (function_exists($modbackup) and function_exists($modcheckbackup)) {\n $var = \"exists_\".$modname;\n $$var = true;\n $count++;\n \n // PENNY NOTES: I have moved from here to the closing brace inside \n // by two sets of ifs()\n // to avoid the backup failing on a non existant backup.\n // If the file/function/whatever doesn't exist, we don't want to set this\n // this module in backup preferences at all.\n //Check data\n //Check module info\n $var = \"backup_\".$modname;\n if (!isset($$var)) {\n $$var = $backup_config->backup_sche_modules;\n }\n //Now stores all the mods preferences into an array into preferences\n $preferences->mods[$modname]->backup = $$var;\n\n //Check include user info\n $var = \"backup_user_info_\".$modname;\n if (!isset($$var)) {\n $$var = $backup_config->backup_sche_withuserdata;\n }\n //Now stores all the mods preferences into an array into preferences\n $preferences->mods[$modname]->userinfo = $$var;\n //And the name of the mod\n $preferences->mods[$modname]->name = $modname;\n }\n }\n }\n }\n\n // now set instances\n if ($coursemods = get_course_mods($course->id)) {\n foreach ($coursemods as $mod) {\n if (array_key_exists($mod->modname,$preferences->mods)) { // we are to backup this module\n if (empty($preferences->mods[$mod->modname]->instances)) {\n $preferences->mods[$mod->modname]->instances = array(); // avoid warnings\n }\n $preferences->mods[$mod->modname]->instances[$mod->instance]->backup = $preferences->mods[$mod->modname]->backup;\n $preferences->mods[$mod->modname]->instances[$mod->instance]->userinfo = $preferences->mods[$mod->modname]->userinfo;\n // there isn't really a nice way to do this...\n $preferences->mods[$mod->modname]->instances[$mod->instance]->name = get_field($mod->modname,'name','id',$mod->instance);\n }\n }\n }\n\n // finally, clean all the $preferences->mods[] not having instances. Nothing to backup about them\n foreach ($preferences->mods as $modname => $mod) {\n if (!isset($mod->instances)) {\n unset($preferences->mods[$modname]);\n }\n }\n }\n\n //Convert other parameters\n if ($status) {\n $preferences->backup_metacourse = $backup_config->backup_sche_metacourse;\n $preferences->backup_users = $backup_config->backup_sche_users;\n $preferences->backup_logs = $backup_config->backup_sche_logs;\n $preferences->backup_user_files = $backup_config->backup_sche_userfiles;\n $preferences->backup_course_files = $backup_config->backup_sche_coursefiles;\n $preferences->backup_messages = $backup_config->backup_sche_messages;\n $preferences->backup_course = $course->id;\n $preferences->backup_destination = $backup_config->backup_sche_destination;\n $preferences->backup_keep = $backup_config->backup_sche_keep;\n }\n\n //Calculate the backup string\n if ($status) {\n schedule_backup_log($starttime,$course->id,\" calculating backup name\");\n\n //Calculate the backup word\n //Take off some characters in the filename !!\n $takeoff = array(\" \", \":\", \"/\", \"\\\\\", \"|\");\n $backup_word = str_replace($takeoff,\"_\",moodle_strtolower(get_string(\"backupfilename\")));\n //If non-translated, use \"backup\"\n if (substr($backup_word,0,1) == \"[\") {\n $backup_word= \"backup\";\n }\n\n //Calculate the date format string\n $backup_date_format = str_replace(\" \",\"_\",get_string(\"backupnameformat\"));\n //If non-translated, use \"%Y%m%d-%H%M\"\n if (substr($backup_date_format,0,1) == \"[\") {\n $backup_date_format = \"%%Y%%m%%d-%%H%%M\";\n }\n\n //Calculate the shortname\n $backup_shortname = clean_filename($course->shortname);\n if (empty($backup_shortname) or $backup_shortname == '_' ) {\n $backup_shortname = $course->id;\n }\n\n //Calculate the final backup filename\n //The backup word\n $backup_name = $backup_word.\"-\";\n //The shortname\n $backup_name .= moodle_strtolower($backup_shortname).\"-\";\n //The date format\n $backup_name .= userdate(time(),$backup_date_format,99,false);\n //The extension\n $backup_name .= \".zip\";\n //And finally, clean everything\n $backup_name = clean_filename($backup_name);\n\n //Calculate the string to match the keep preference\n $keep_name = $backup_word.\"-\";\n //The shortname\n $keep_name .= moodle_strtolower($backup_shortname).\"-\";\n //And finally, clean everything\n $keep_name = clean_filename($keep_name);\n\n $preferences->backup_name = $backup_name;\n $preferences->keep_name = $keep_name;\n }\n\n //Calculate the backup unique code to allow simultaneus backups (to define\n //the temp-directory name and records in backup temp tables\n if ($status) {\n $backup_unique_code = time();\n $preferences->backup_unique_code = $backup_unique_code;\n }\n\n //Calculate necesary info to backup modules\n if ($status) {\n schedule_backup_log($starttime,$course->id,\" calculating modules data\");\n if ($allmods = get_records(\"modules\") ) {\n foreach ($allmods as $mod) {\n $modname = $mod->name;\n $modbackup = $modname.\"_backup_mods\";\n //If exists the lib & function\n $var = \"exists_\".$modname;\n if (isset($$var) && $$var) {\n //Add hidden fields\n $var = \"backup_\".$modname;\n //Only if selected\n if ($$var == 1) {\n $var = \"backup_user_info_\".$modname;\n //Call the check function to show more info\n $modcheckbackup = $modname.\"_check_backup_mods\";\n schedule_backup_log($starttime,$course->id,\" $modname\");\n $modcheckbackup($course->id,$$var,$backup_unique_code);\n }\n }\n }\n }\n }\n\n //Now calculate the users\n if ($status) {\n schedule_backup_log($starttime,$course->id,\" calculating users\");\n //Decide about include users with messages, based on SITEID\n if ($preferences->backup_messages && $preferences->backup_course == SITEID) {\n $include_message_users = true;\n } else {\n $include_message_users = false;\n }\n user_check_backup($course->id,$backup_unique_code,$preferences->backup_users,$include_message_users); \n }\n\n //Now calculate the logs\n if ($status) {\n if ($preferences->backup_logs) {\n schedule_backup_log($starttime,$course->id,\" calculating logs\");\n log_check_backup($course->id);\n }\n }\n\n //Now calculate the userfiles\n if ($status) {\n if ($preferences->backup_user_files) {\n schedule_backup_log($starttime,$course->id,\" calculating user files\");\n user_files_check_backup($course->id,$preferences->backup_unique_code);\n }\n }\n \n //Now calculate the coursefiles\n if ($status) {\n if ($preferences->backup_course_files) {\n schedule_backup_log($starttime,$course->id,\" calculating course files\");\n course_files_check_backup($course->id,$preferences->backup_unique_code);\n }\n }\n\n //If everything is ok, return calculated preferences\n if ($status) {\n $status = $preferences;\n }\n\n return $status;\n}", "public function ApplyChanges() {\n\t\tparent::ApplyChanges();\n\t\t\n\t\t$this->RegisterVariableBoolean(\"vacation\", \"Urlaub\", \"\", 0 );\n\t\t//$this->RegisterEventCyclic(\"UpdateTimer\", \"Automatische aktualisierung\", 15);\n\t}", "public function runUpdateScript()\n {\n $current_schema = get_config('schema');\n if ($current_schema < 2) {\n // 20150727\n $this->schema2();\n $this->updateSchema(2);\n }\n if ($current_schema < 3) {\n // 20150728\n $this->schema3();\n $this->updateSchema(3);\n }\n if ($current_schema < 4) {\n // 20150801\n $this->schema4();\n $this->updateSchema(4);\n }\n if ($current_schema < 5) {\n // 20150803\n try {\n $this->schema5();\n } catch (Exception $e) {\n die($e->getMessage());\n }\n $this->updateSchema(5);\n }\n // place new schema functions above this comment\n $this->cleanTmp();\n $msg_arr = array();\n $msg_arr[] = \"[SUCCESS] You are now running the latest version of eLabFTW. Have a great day! :)\";\n return $msg_arr;\n }", "public function performSyncOperation() {\n switch ($this->syncOperation) {\n case 'create':\n // Sets up the data array\n $data['LdapObject'] = $this->stagingData;\n $dn = 'uid' . '=' . $this->stagingData['uid'] . ',' . $this->LdapObject->getLdapContext();\n $data['LdapObject']['dn'] = $dn;\n $data['LdapObject']['objectclass'] = $this->ldapObjectClass;\n \n // Save the data\n $createResult = $this->LdapObject->save($data);\n \n if ($createResult) {\n $this->log('SYNC: Created LDAP Object: ' . $createResult['LdapObject']['dn'], LOG_INFO);\n // Sets the properties on the LdapObject for reporting the sync result\n $this->LdapObject->id = $dn;\n $this->LdapObject->primaryKey = 'dn';\n } else {\n $this->log('SYNC: Failed to create LDAP Object: ' . $dn . '. Salesforce ID: '. $this->sforceData['Id'] . '. LDAP Error: ' . $this->LdapObject->getLdapError() . '.', LOG_ERR);\n }\n break;\n case 'update':\n // Push everything to lower case, so String comparison will be accurate.\n $stagingObject = array_change_key_case($this->stagingData, CASE_LOWER);\n $ldapObject = array_change_key_case($this->ldapData, CASE_LOWER);\n // Diff the arrays. Should be efficient. Since we are doing a one way push from Salesforce\n // to LDAP, this also provides a clean way to get exactly the attributes we want to update.\n $diffObject = array_diff_assoc($stagingObject, $ldapObject);\n if (!empty($diffObject)) {\n $data['LdapObject'] = $diffObject;\n \n // Save the data\n $updateResult = $this->LdapObject->save($data);\n \n if ($updateResult) {\n $this->log('SYNC: Updated LDAP Object: ' . $this->LdapObject->id, LOG_INFO);\n } else {\n $this->log('SYNC: Failed to update LDAP Object: ' . $this->LdapObject->id, LOG_ERR);\n }\n } else {\n // Sets the sync operation, so unchanged records (which is the usual case) are separately reported\n $this->syncOperation = 'unchanged';\n $this->log('SYNC: LDAP Object ' . $this->LdapObject->id . ' left unchanged.', LOG_INFO);\n }\n break;\n case 'delete':\n $id = $this->LdapObject->id;\n $deleteResult = $this->LdapObject->delete($this->LdapObject->id);\n if ($deleteResult) {\n $this->log('SYNC: Deleted LDAP Object: ' . $id, LOG_INFO);\n // Sets id on the LdapObject for reporting the sync result\n $this->LdapObject->id = $id;\n } else {\n $this->log('SYNC: Failed to delete LDAP Object: ' . $id , LOG_ERR);\n $ldapError = $this->LdapObject->getLdapError();\n if (!empty($ldapError)) {\n $this->log($ldapError, LOG_ERR);\n }\n }\n break;\n case 'nothing':\n $this->log('SYNC: No action performed on record: ' . $this->sforceData['Id'], LOG_DEBUG);\n break;\n default:\n $this->log('SYNC: No operation found for Salesforce Id \"' . $this->sforceData['Id'] . '\". This object was not synced.', LOG_INFO);\n }\n }", "protected function schedule(Schedule $schedule)\n {\n //https://laravel.com/docs/5.4/scheduling\n \\Log::info(\"SCHEDULING for day \".DatesHelper::getCurrentDay().' DATE : '.DatesHelper::getCurrentDate());\n //->timezone('America/New_York');\n // $schedule->command('update:info')\n // ->everyMinute();\n\n\n $schedule->call(function() {\\Log::info('Update exchange ...');CoinbaseHelper::updateExchangeRate();})->everyTenMinutes();\n $schedule->call(function() {\\Log::info('Check invoices ...');UpdateInfo::checkInvoices();})->everyMinute();\n $schedule->call(function() {\\Log::info('Check digital check ...');UpdateInfo::checkCheckbook();})->everyMinute();\n\n\n $schedule->command('update:ranking')->dailyAt('10:00')->timezone('America/New_York')->when(function(){\n \\Log::info('Checking conditions for update::ranking weekly');\n if (DatesHelper::getCurrentDay() === 'Tuesday') {\n \\Log::info('Condition is true for update:ranking weekly');\n return true;\n }\n \\Log::info('Condition is false for update:ranking weekly');\n return false;\n });\n\n $schedule->command('update:info')->hourlyAt(11)->timezone('America/New_York')->when(function(){\n \\Log::info('Checking conditions for update::info hourly');\n if (DatesHelper::getCurrentDay() === 'Tuesday' || DatesHelper::getCurrentDay() === 'Wednesday' ||\n DatesHelper::getCurrentDay() === 'Friday' ) {\n \\Log::info('Condition is true for update:info hourly');\n return true;\n }\n \\Log::info('Condition is false for update:info hourly');\n return false;\n });\n\n $schedule->command('update:info')->everyFiveMinutes()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking conditions for update::info everyFiveMinutes');\n if (DatesHelper::getCurrentDay() === 'Tuesday' || DatesHelper::getCurrentDay() === 'Wednesday' ||\n DatesHelper::getCurrentDay() === 'Friday' ) {\n return false;\n Log::info('Condition is false for update:info everyFiveMinutes');\n }\n \\Log::info('Condition is true for update:info everyFiveMinutes');\n return true;\n });\n\n $schedule->command('timeframe:update')->hourly()->timezone('America/New_York')->when(function(){\n \\Log::info(\"Checking condition for timeframe:update hourly ...\");\n if (DatesHelper::getCurrentDay() === 'Thursday' || DatesHelper::getCurrentDay() === 'Friday' ||\n DatesHelper::getCurrentDay() === 'Saturday' || DatesHelper::getCurrentDay() === 'Sunday'){\n \\Log::info(\"Condition for timeframe:update hourly for day condition is false\");\n return false;\n }\n\n $current = TimeFrame::getCurrentTimeFrame();\n\n if (!$current){\n \\Log::info('Condition for timeframe:update hourly for non-existing current timeframe is true');\n return true;\n }\n\n \\Log::info('Retrieving games which are not in HISTORY state for timeframe:update hourly');\n //\n $games = Game::where('status', '!=', 'HISTORY')->get();\n $fps = FantasyPlayer::where('updated', '=', false)->get();\n\n \\Log::info('Retrieved games which are not in HISTORY state for timeframe:update hourly');\n if ($games->count() === 0 && $fps->count() === 0){\n \\Log::info('Condition for timeframe:update hourly for !HISTORY games is true');\n return true;\n }\n\n \\Log::info('Condition for timeframe:update hourly false');\n return false;\n });\n\n $schedule->command('games:update')->withoutOverlapping()->twiceDaily(6, 18)->timezone('America/New_York')->when(function() {\n \\Log::info('Condition for games:update twiceDaily is met');\n return true;\n });\n\n $schedule->command('games:update')->withoutOverlapping()->everyFiveMinutes()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking conditions for games:update everyFiveMinutes');\n //if (DatesHelper::getCurrentDay() === 'Tuesday' || DatesHelper::getCurrentDay() === 'Monday' ||\n if( DatesHelper::getCurrentDay() === 'Wednesday') {\n \\Log::info('Condition for games:update everyFiveMinuets for day condition is false '.DatesHelper::getCurrentDay());\n return false;\n }\n\n \\Log::info('Retrieving games in progress for games:update command everyFiveMinutes');\n $gamesInProgress = Game::where('status', '=', 'LIVE')->get();\n \\Log::info('Retrieved games in progress for games:update command everyFiveMinutes'.$gamesInProgress);\n if ($gamesInProgress->count() > 0){\n \\Log::info('Condition for games:update everyFiveMinutes for games in progress is true ');\n return true;\n }\n \\Log::info('Condition for games:update everyFiveMinutes is false');\n });\n\n $schedule->command('playerInfo:update')->withoutOverlapping()->twiceDaily(6, 18)->timezone('America/New_York')->when(function(){\n \\Log::info('Checking conditions for playerInfo:update twiceDaily');\n if (DatesHelper::getCurrentDay() === 'Tuesday' || DatesHelper::getCurrentDay() === 'Monday' ||\n DatesHelper::getCurrentDay() === 'Wednesday' || DatesHelper::getCurrentDay() === 'Friday' ) {\n \\Log::info('Condition for playerInfo:update twiceDaily for day is true '.DatesHelper::getCurrentDay());\n return true;\n }\n\n \\Log::info('Condition for playerInfo:update twiceDaily is false');\n return false;\n });\n\n $schedule->command('playerInfo:update')->withoutOverlapping()->hourly()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking condition for playerInfo:update hourly ');\n if (DatesHelper::getCurrentDay() === 'Thursday' || DatesHelper::getCurrentDay() === 'Sunday' ||\n DatesHelper::getCurrentDay() === 'Saturday') {\n \\Log::info('Condition for playerInfo:update hourly for day condition is true');\n return true;\n }\n\n \\Log::info('Condition for playerInfo:update hourly is false');\n return false;\n });\n\n $schedule->command('playerStats:update')->twiceDaily(16, 22)->timezone('America/New_York');\n\n $schedule->command('playerStats:update')->hourly()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking condition for playerStats:update hourly');\n\n if (DatesHelper::getCurrentDay() === 'Tuesday') {\n \\Log::info('Checking condition palyerStats:update hourly for Tuesday');\n $timeframe = TimeFrame::getPreviousTimeFrame();\n if (!$timeframe){\n \\Log::info('Condition for playerStats:update hourly for previous timeframe is false');\n return false;\n }\n\n $key = $timeframe->retrieveKey();\n \\Log::info('Condition playerStats:update hourly checking players with key '.$key);\n $fps = FantasyPlayer::where('id', 'like', '%'.$key.'%')->where('updated', '=', false)->get();\n \\Log::info('Condition playerStats:update hourly successfully retrieved players with key '.$key);\n if ($fps && $fps->count() > 0){\n \\Log::info('Condition playerStats:update hourly there are players which are not updated, so condition is true');\n return true;\n }\n\n \\Log::info('Condition playerStats:update hourly condition is false');\n return false;\n }\n });\n\n /*$schedule->command('fantasyData:pull')->everyMinute()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking condition for fantasyData:pull everyThirtyMinutes');\n if (DatesHelper::getCurrentDay() !== 'Tuesday') {\n \\Log::info('Condition for fantasyData:pull everyThirtyMinutes day condition is Tuesday');\n $timeframe = TimeFrame::getCurrentTimeFrame();\n if ($timeframe->count() === 0){\n \\Log::info('Condition for fantasyData:pull hourly for current timeframe is false');\n return false;\n }\n\n \\Log::info('Condition fantasyData:pull everyFiveMinutes retrieving games in progress');\n $gamesInProgress = Game::where('status', '=', 'LIVE')->get();\n \\Log::info('Condition fantasyData:pull everyFiveMinutes received games in progress');\n if ($gamesInProgress->count() > 0){\n \\Log::info('Condition fantasyData:pull everyFiveMinutes there are games in progress');\n return true;\n }\n\n return false;\n }\n });*/\n\n $schedule->command('liveStats:update')->everyThirtyMinutes()->timezone('America/New_York')->when(function(){\n \\Log::info('Checking condition for liveStats:update everyThirtyMinutes');\n if (DatesHelper::getCurrentDay() !== 'Tuesday' && DatesHelper::getCurrentDay() !== 'Wednesday' &&\n DatesHelper::getCurrentDay() !== 'Friday') {\n \\Log::info('Condition for liveStats:update everyThirtyMinutes day condition is Tuesday');\n $timeframe = TimeFrame::getCurrentTimeFrame();\n if (!$timeframe){\n \\Log::info('Condition for liveStats:update hourly for current timeframe is false');\n return false;\n }\n\n \\Log::info('Condition liveStats:update everyFiveMinutes retrieving games in progress');\n $gamesInProgress = Game::where('status', '=', 'LIVE')->get();\n \\Log::info('Condition liveStats:update everyFiveMinutes received games in progress');\n if ($gamesInProgress && $gamesInProgress->count() > 0){\n \\Log::info('Condition liveStats:update everyFiveMinutes there are games in progress');\n return true;\n }\n\n return false;\n }\n });\n\n\n\n // $schedule->command('playerStats:update')->timezone('America/New_York')->hourly()->when(function(){\n\n //$schedule->command('update:info')->everyMinute();\n\n\n\n//->withoutOverlapping();\n\n\n\n }", "function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}", "function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}", "public function updateConfigApp() : void\n {\n $this->domainName = Str::title(Str::lower(Str::studly($this->domainName)));\n $configAppFilePath = config_path(\"app.php\");\n $oldValue = \"/*NewDomainsServiceProvider*/\";\n $newValue = \"App\\\\\".config(\"domain.path\").\"\\\\{$this->domainName}\\Providers\\DomainServiceProvider::Class,\";\n $newValue .= \"\\n\\t\\t/*NewDomainsServiceProvider*/\";\n $newContent = Str::replaceFirst($oldValue, $newValue, File::get($configAppFilePath));\n File::put($configAppFilePath, $newContent);\n $this->info(\"App Config File Updated and Added the new Service Provider of Domain\");\n }", "public function runcatalogsyncAction()\n {\n\n $result = Mage::getModel('ddg_automation/cron')->catalogSync();\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getGatewayKey() );\n\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ) {\n\t\t\tforeach ( $existingsOptions as $option ) {\n\t\t\t\tif ( isset( $options[ $option->getName() ] ) )\n\t\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\n\t\t//$this->addSettings( $options );\n\t}", "public function actionReloadInstallData()\n {\n //Sets time limit\n @set_time_limit(1800);\n if(file_exists(APPLICATION_PATH . '/protected/backend/runtime/apploaded.bin'))\n {\n unlink(APPLICATION_PATH . '/protected/backend/runtime/apploaded.bin');\n }\n FileUtil::writeFile(APPLICATION_PATH . '/protected/backend/runtime', 'rebuildstate.bin', 'wb', 'Rebuild in progress');\n InstallManager::reloadInstallData();\n echo \"Success\";\n unlink(APPLICATION_PATH . '/protected/backend/runtime' . '/rebuildstate.bin');\n FileUtil::writeFile(APPLICATION_PATH . '/protected/backend/runtime', 'apploaded.bin', 'wb', 'Application is loaded');\n }", "public function ApplyChanges() {\n parent::ApplyChanges();\n\n $ModulInfo = IPS_GetInstance($this->InstanceID);\n $ModulName = $ModulInfo['ModuleInfo']['ModuleName'];\n\n $HourUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimer\");\n $HourNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimer\");\n $MinuteUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimerMinute\");\n $MinuteNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimerMinute\");\n $HourResetTimer = $this->ReadPropertyInteger(\"IntervalHtmlResetColorTodayTimer\");\n $EnableResetTimer = $this->ReadPropertyBoolean(\"cbxHtmlResetColorToday\");\n \n If ((($HourUpdateTimer > 23) || ($HourNotificationTimer > 23)) || (($HourUpdateTimer < 0) || ($HourNotificationTimer < 0)))\n {\n $this->SetStatus(202);\n $this->SendDebug($ModulName, $this->Translate(\"The hour of a time is wrong!\"), 0);\n }\n else {\n $this->SetStatus(102);\n }\n\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteUpdateTimer.\":17\", \"UpdateTimer\");\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteNotificationTimer.\":07\", \"NotificationTimer\");\n If($EnableResetTimer)\n {\n $this->SetNewTimerInterval($HourResetTimer.\":\".\"00\".\":14\", \"ResetFontTimer\");\n }\n If ($this->ReadPropertyBoolean(\"cbxGS\"))\n {\n $this->RegisterVariableString(\"YellowBagTime\", $this->Translate(\"Packaging waste event\"));\n $this->RegisterVariableString(\"YellowBagTimes\", $this->Translate(\"Packaging waste\"), \"~TextBox\");\n $this->EnableAction(\"YellowBagTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"YellowBagTimes\");\n $this->UnregisterVariable(\"YellowBagTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxHM\"))\n {\n $this->RegisterVariableString(\"WasteTime\", $this->Translate(\"Household garbage event\"));\n $this->RegisterVariableString(\"WasteTimes\", $this->Translate(\"Household garbage\"), \"~TextBox\");\n $this->EnableAction(\"WasteTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"WasteTimes\");\n $this->UnregisterVariable(\"WasteTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPP\"))\n {\n $this->RegisterVariableString(\"PaperTime\", $this->Translate(\"Cardboard bin event\"));\n $this->RegisterVariableString(\"PaperTimes\", $this->Translate(\"Cardboard bin\"), \"~TextBox\");\n $this->EnableAction(\"PaperTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PaperTimes\");\n $this->UnregisterVariable(\"PaperTime\");\n }\n\n If ($this->ReadPropertyBoolean(\"cbxBO\"))\n {\n $this->RegisterVariableString(\"BioTime\", $this->Translate(\"Organic waste event\"));\n $this->RegisterVariableString(\"BioTimes\", $this->Translate(\"Organic waste\"), \"~TextBox\");\n $this->EnableAction(\"BioTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"BioTime\");\n $this->UnregisterVariable(\"BioTimes\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPT\"))\n {\n $this->RegisterVariableString(\"PollutantsTime\", $this->Translate(\"Pollutants event\"));\n $this->RegisterVariableString(\"PollutantsTimes\", $this->Translate(\"Pollutants\"), \"~TextBox\");\n $this->EnableAction(\"PollutantsTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PollutantsTimes\");\n $this->UnregisterVariable(\"PollutantsTime\");\n }\n }", "public function testUpdate(): void {\n $configObject = $this->configUpdateManager->getConfig();\n\n $this->configUpdateManager->update();\n foreach ($configObject->getTargetConfigFilepaths() as $filepath) {\n self::assertFileExists($filepath);\n }\n\n $targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);\n /**\n * @var array{\n * draft: array{\n * last_applied_update: int,\n * },\n * } $config\n */\n $config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);\n self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);\n }", "public function updateConfig()\n {\n $this->aframe_assets_url = $this->composer->getConfig()->get('aframe-url') ?? '/aframe';\n \n $composer_json = $this->getVendorDir() . DIRECTORY_SEPARATOR . 'mkungla' . DIRECTORY_SEPARATOR . 'aframe-php' . DIRECTORY_SEPARATOR . 'composer.json';\n \n if (file_exists($composer_json)) {\n $config = json_decode(file_get_contents($composer_json));\n $config->config->{'aframe-dir'} = $this->getPublicRoot();\n $config->config->{'aframe-url'} = $this->aframe_assets_url;\n $config->version = self::AFRAME_PHP_VERSION;\n file_put_contents($composer_json, json_encode($config, JSON_PRETTY_PRINT));\n }\n }", "function redfish_generic_apply_conf($configuration)\n{\n global $sdid;\n global $sms_sd_ctx;\n global $sendexpect_result;\n global $apply_errors;\n global $operation;\n global $SD;\n global $SMS_RETURN_BUF;\n \n // Save the configuration applied on the router\n save_result_file($configuration, 'conf.applied');\n $SMS_OUTPUT_BUF = '';\n \n $line = get_one_line($configuration);\n while ($line !== false)\n {\n \t$line = trim($line);\n \t\n \tif (!empty($line))\n \t{\n \t\t$res = sendexpectone(__FILE__ . ':' . __LINE__, $sms_sd_ctx, $line, '');\n \t\t\n \t\t$SMS_RETURN_BUF = json_encode($res);\n \t}\n \t$line = get_one_line($configuration);\n }\n \n return SMS_OK;\n}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n $triggerID = $this->ReadPropertyInteger('InputTriggerID');\n\n //Delete all registrations in order to readd them\n foreach ($this->GetMessageList() as $senderID => $messages) {\n foreach ($messages as $message) {\n $this->UnregisterMessage($senderID, $message);\n }\n }\n $this->RegisterMessage($triggerID, VM_UPDATE);\n\n if (method_exists($this, 'GetReferenceList')) {\n $refs = $this->GetReferenceList();\n foreach ($refs as $ref) {\n $this->UnregisterReference($ref);\n }\n\n $inputTriggerID = $this->ReadPropertyInteger('InputTriggerID');\n if ($inputTriggerID) {\n $this->RegisterReference($inputTriggerID);\n }\n\n $notificationLevels = json_decode($this->ReadPropertyString('NotificationLevels'), true);\n\n foreach ($notificationLevels as $notificationLevel) {\n foreach ($notificationLevel['actions'] as $action) {\n if ($action['recipientObjectID']) {\n $this->RegisterReference($action['recipientObjectID']);\n }\n }\n }\n }\n //Delete all associations\n $profile = IPS_GetVariableProfile('BN.Actions');\n foreach ($profile['Associations'] as $association) {\n IPS_SetVariableProfileAssociation('BN.Actions', $association['Value'], '', '', '-1');\n }\n //Setting the instance status\n $this->setInstanceStatus();\n\n //Set Associations\n if ($this->ReadPropertyBoolean('AdvancedResponse')) {\n //Return if action is not unique\n //Only important, if advanced response actions are used\n if ($this->GetStatus() != IS_ACTIVE) {\n return;\n }\n $responseActions = json_decode($this->ReadPropertyString('AdvancedResponseActions'), true);\n foreach ($responseActions as $responseAction) {\n IPS_SetVariableProfileAssociation('BN.Actions', $responseAction['Index'], $responseAction['CustomName'], '', '-1');\n }\n } else {\n IPS_SetVariableProfileAssociation('BN.Actions', 0, $this->Translate('Reset'), '', '-1');\n }\n }", "public function onConfigUpdated() {\n\t\tif ($this->client) {\n\t\t\t$this->client->config = $this->config;\n\t\t\t$this->client->onConfigUpdated();\n\t\t}\n\t}", "public function sync()\n {\n $sql = null;\n $module = new \\ZPM\\Core\\Setup\\Schema();\n $modData = new \\ZPM\\Core\\Setup\\Info();\n\n $module->install();\n }", "public function batchUpdateConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n $data = array();\n foreach (Language::getLanguages(false) as $lang) {\n $val = Tools::getValue($input['name'].'_'.$lang['id_lang'], $input['default']);\n $data[$lang['id_lang']] = $val;\n }\n\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $data[$lang['id_lang']] = $this->{$input['callback']}($data[$lang['id_lang']]);\n }\n\n Configuration::updateValue(trim($input['name']), $data, true);\n } else {\n $val = Tools::getValue($input['name'], $input['default']);\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $val = $this->{$input['callback']}($val);\n }\n Configuration::updateValue($input['name'], $val, true);\n }\n }\n }\n\n $this->batchUpdateCustomConfigs();\n\n return true;\n }", "public function updateRepository() {\n $scheduledFile = __DIR__ . '/scheduled.txt';\n if (!file_exists($scheduledFile))\n return;\n\n $requested = file_get_contents($scheduledFile);\n if (!unlink($scheduledFile))\n return;\n\n if ((time() - intval(trim($requested))) > 600)\n return;\n\n $commands = [\n // Updates the local copy of the repository with the most recent remote changes.\n 'git fetch --all',\n\n // Resets the repository to the state the remote currently is in.\n 'git reset --hard origin/master',\n\n // Remove any left-over files that are not part of the checkout, and not in .gitignore.\n 'git clean -f -d',\n\n // Write the latest commit SHA to the VERSION file.\n 'git rev-parse HEAD > VERSION',\n ];\n\n $directory = realpath(__DIR__ . '/../../../');\n\n foreach ($commands as $command)\n Info(trim(shell_exec('cd ' . $directory . ' && ' . $command . ' 2>&1')));\n\n Info('AutoDeploy: Updated to revision ' . file_get_contents(__DIR__ . '/../../../VERSION') . '.');\n }", "public function sync()\n {\n SyncServer::dispatch($this);\n }", "function snort_rm_blocked_deinstall_cron($should_install)\n\t\t{\n\t\t\tglobal $config, $g;\n\t\t\tconf_mount_rw();\n\n\t\t\t$is_installed = false;\n\n\t\t\tif(!$config['cron']['item'])\n\t\t\treturn;\n\n\t\t\t$x=0;\n\t\t\tforeach($config['cron']['item'] as $item)\n\t\t\t{\n\t\t\t\tif (strstr($item['command'], \"snort2c\"))\n\t\t\t\t{\n\t\t\t\t\t$is_installed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$x++;\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif($is_installed == true)\n\t\t\t{\n\t\t\t\tif($x > 0)\n\t\t\t\t{\n\t\t\t\t\tunset($config['cron']['item'][$x]);\n\t\t\t\t\twrite_config();\n\t\t\t\t\tconf_mount_rw();\n\t\t\t\t}\n\n\t\t\t\tconfigure_cron();\n\n\t\t\t}\n\t\t\tconf_mount_ro();\n\n\t\t}", "public function updateSyncStamp()\n {\n throw new Horde_ActiveSync_Exception('Not supported in this state driver.');\n }", "function serendipity_updateConfiguration() {\n global $serendipity, $umask;\n\n // Save all basic config variables to the database\n $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);\n\n if (isset($_POST['sqlitedbName']) && !empty($_POST['sqlitedbName'])) {\n $_POST['dbName'] = $_POST['sqlitedbName'];\n }\n\n // Password can be hidden in re-configuring, but we need to store old password\n if (empty($_POST['dbPass']) && !empty($serendipity['dbPass'])) {\n $_POST['dbPass'] = $serendipity['dbPass'];\n }\n\n foreach($config as $category) {\n foreach ( $category['items'] as $item ) {\n\n /* Don't save trash */\n if ( !serendipity_checkConfigItemFlags($item, 'configuration') ) {\n continue;\n }\n\n if (!isset($item['userlevel'])) {\n $item['userlevel'] = USERLEVEL_ADMIN;\n }\n\n // Check permission set. Changes to blogConfiguration or siteConfiguration items\n // always required authorid = 0, so that it be not specific to a userlogin\n if ( ($serendipity['serendipityUserlevel'] ?? 0) >= $item['userlevel'] || IS_installed === false ) {\n $authorid = 0;\n } elseif ($item['permission'] == 'blogConfiguration' && serendipity_checkPermission('blogConfiguration')) {\n $authorid = 0;\n } elseif ($item['permission'] == 'siteConfiguration' && serendipity_checkPermission('siteConfiguration')) {\n $authorid = 0;\n } else {\n $authorid = $serendipity['authorid'];\n }\n\n if (is_array($_POST[$item['var']])) {\n // Arrays not allowed. Use first index value.\n $_POST[$item['var']] = array_key_first($_POST[$item['var']]);\n\n // If it still is an array, munge it all together.\n if (is_array($_POST[$item['var']])) {\n $_POST[$item['var']] = @implode(',', $_POST[$item['var']]);\n }\n }\n\n serendipity_set_config_var($item['var'], $_POST[$item['var']], $authorid);\n }\n }\n\n if (IS_installed === false || serendipity_checkPermission('siteConfiguration')) {\n return serendipity_updateLocalConfig($_POST['dbName'],\n $_POST['dbPrefix'],\n $_POST['dbHost'],\n $_POST['dbUser'],\n $_POST['dbPass'],\n $_POST['dbType'],\n $_POST['dbPersistent']);\n } else {\n return true;\n }\n}", "function oinkmaster_conf($id, $if_real, $iface_uuid)\n{\n\tglobal $config, $g, $snort_md5_check_ok, $emerg_md5_check_ok, $pfsense_md5_check_ok;\n\n\t@unlink(\"/usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/oinkmaster_{$iface_uuid}_{$if_real}.conf\");\n\n\t/* enable disable setting will carry over with updates */\n\t/* TODO carry signature changes with the updates */\n\tif ($snort_md5_check_ok != 'on' || $emerg_md5_check_ok != 'on' || $pfsense_md5_check_ok != 'on') {\n\n\t\t$selected_sid_on_section = \"\";\n\t\t$selected_sid_off_sections = \"\";\n\n\t\tif (!empty($config['installedpackages']['snortglobal']['rule'][$id]['rule_sid_on'])) {\n\t\t\t$enabled_sid_on = trim($config['installedpackages']['snortglobal']['rule'][$id]['rule_sid_on']);\n\t\t\t$enabled_sid_on_array = split('\\|\\|', $enabled_sid_on);\n\t\t\tforeach($enabled_sid_on_array as $enabled_item_on)\n\t\t\t\t$selected_sid_on_sections .= \"$enabled_item_on\\n\";\n\t\t}\n\n\t\tif (!empty($config['installedpackages']['snortglobal']['rule'][$id]['rule_sid_off'])) {\n\t\t\t$enabled_sid_off = trim($config['installedpackages']['snortglobal']['rule'][$id]['rule_sid_off']);\n\t\t\t$enabled_sid_off_array = split('\\|\\|', $enabled_sid_off);\n\t\t\tforeach($enabled_sid_off_array as $enabled_item_off)\n\t\t\t\t$selected_sid_off_sections .= \"$enabled_item_off\\n\";\n\t\t}\n\n\t\tif (!empty($selected_sid_off_sections) || !empty($selected_sid_on_section)) {\n\t\t\t$snort_sid_text = <<<EOD\n\n###########################################\n# #\n# this is auto generated on snort updates #\n# #\n###########################################\n\npath = /bin:/usr/bin:/usr/local/bin\n\nupdate_files = \\.rules$|\\.config$|\\.conf$|\\.txt$|\\.map$\n\nurl = dir:///usr/local/etc/snort/rules\n\n$selected_sid_on_sections\n\n$selected_sid_off_sections\n\nEOD;\n\n\t\t\t/* open snort's oinkmaster.conf for writing */\n\t\t\t@file_put_contents(\"/usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/oinkmaster_{$iface_uuid}_{$if_real}.conf\", $snort_sid_text);\n\t\t}\n\t}\n}", "public function syncLdap()\n {\n $this->updateName();\n $this->updateEmail();\n $this->updateInfo();\n $this->save();\n }", "public static function auth_ldap_sync_cron() {\n $auths = get_records_array('auth_instance', 'authname', 'ldap', 'id', 'id');\n if (!$auths) {\n return;\n }\n foreach ($auths as $auth) {\n /* @var $authobj AuthLdap */\n $authobj = AuthFactory::create($auth->id);\n // Each instance will decide for itself whether it should sync users and/or groups\n // User sync needs to be called before group sync in order for new users to wind\n // up in the correct groups\n $authobj->sync_users();\n $authobj->sync_groups();\n }\n }", "public function legacy_update() {\n\n\t\t/* Request data was moved from controller option to requests option in v1.1 */\n\n\t\t// get legacy requests data\n\t\t$legacy_requests = $this->get_option( 'requests', array() );\n\n\t\t// something to update\n\t\tif ( $legacy_requests && is_array( $legacy_requests ) ) {\n\n\t\t\t// new requests structure\n\t\t\t$requests = get_option( $this->get_requests_option_key(), array() );\n\n\t\t\t// merge requests\n\t\t\t$requests = array_merge( $legacy_requests, $requests );\n\n\t\t\t// fill new structure with data\n\t\t\tupdate_option( $this->get_requests_option_key(), $requests );\n\n\t\t}\n\n\t\t// destroy old structure data\n\t\tif ( $legacy_requests ) {\n\n\t\t\t$options = get_option( $this->get_id(), array() );\n\t\t\tunset( $options['requests'] );\n\t\t\tupdate_option( $this->get_id(), $options );\n\n\t\t}\n\n\t}", "public function refreshConfig()\n {\n $this->_data = $this->_reader->read();\n $this->merge($this->_dbReader->get());\n }", "protected function _syncGatewayConfig() {\n if ($this->_gateway && $paymentGatewayCode = $this->getCurrentPaymentGateway()) {\n $gatewayConfiguration = $this->_gateway->configuration();\n if (isset($gatewayConfiguration['minimumAmount'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_total', $gatewayConfiguration['minimumAmount'], $this->config->get('config_store_id'));\n }\n if (isset($gatewayConfiguration['name'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_title', $gatewayConfiguration['name'], $this->config->get('config_store_id'));\n }\n if (isset($gatewayConfiguration['description'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_description', $gatewayConfiguration['description'], $this->config->get('config_store_id'));\n }\n }\n }", "function pico_sync_all($mydirname)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t$module_handler = xoops_gethandler('module');\n\t$module = &$module_handler->getByDirname($mydirname);\n\t$config_handler = xoops_gethandler('config');\n\t$configs = $config_handler->getConfigList($module->mid());\n\n\t// sync contents <- content_votes\n\t$result = $db->query('SELECT content_id FROM ' . $db->prefix($mydirname . '_contents'));\n\twhile (list($content_id) = $db->fetchRow($result)) {\n\t\tpico_sync_content_votes($mydirname, (int)$content_id);\n\t\t//pico_sync_content( $mydirname , intval( $content_id ) ) ;\n\t}\n\n\t// sync tags\n\tpico_sync_tags($mydirname);\n\n\t// d3forum comment integration\n\tif (!empty($configs['comment_dirname']) && $configs['comment_forum_id'] > 0) {\n\t\t$target_module = &$module_handler->getByDirname($configs['comment_dirname']);\n\t\tif (is_object($target_module)) {\n\t\t\t$target_dirname = $target_module->getVar('dirname');\n\t\t\t$forum_id = (int)$configs['comment_forum_id'];\n\t\t\t$result = $db->query('SELECT topic_external_link_id,COUNT(*) FROM ' . $db->prefix($target_dirname . '_topics') . \" WHERE topic_external_link_id>0 AND forum_id=$forum_id AND ! topic_invisible GROUP BY topic_external_link_id\");\n\t\t\twhile (list($content_id, $comments_count) = $db->fetchRow($result)) {\n\t\t\t\t$db->queryF('UPDATE ' . $db->prefix($mydirname . '_contents') . \" SET comments_count=$comments_count WHERE content_id=$content_id\");\n\t\t\t}\n\t\t}\n\t}\n\n\t// fix null and '' confusion\n\t$db->queryF('UPDATE ' . $db->prefix($mydirname . '_categories') . \" SET cat_vpath=null WHERE cat_vpath=''\");\n\t$db->queryF('UPDATE ' . $db->prefix($mydirname . '_contents') . \" SET vpath=null WHERE vpath=''\");\n\n\t// serialize_type conversion from PHP built-in serialize() to var_export()\n\tpico_convert_serialized_data($mydirname);\n\n\t// sync category's tree\n\tpico_sync_cattree($mydirname);\n}", "private function _listSyncConfigs()\n {\n if (null === $this->_syncConfigListCache) {\n $store = Erfurt_App::getInstance()->getStore();\n\n require_once 'Erfurt/Sparql/SimpleQuery.php';\n $query = new Erfurt_Sparql_SimpleQuery();\n $query->setProloguePart('SELECT ?s ?p ?o');\n $query->addFrom($this->_syncModelUri);\n $where = 'WHERE {\n ?s ?p ?o .\n ?s <' . EF_RDF_TYPE . '> <' . $this->_properties['syncConfigClass'] . '> . }';\n $query->setWherePart($where);\n $result = $store->sparqlQuery($query, array('use_ac' => false));\n\n if (count($result) === 0) {\n return false;\n }\n\n $retVal = array();\n foreach ($result as $row) {\n if (!isset($retVal[$row['s']])) {\n $retVal[$row['s']] = array(\n 'uri' => $row['s']\n );\n }\n\n switch ($row['p']) {\n case $this->_properties['targetModel']:\n $retVal[$row['s']]['targetModel'] = $row['o'];\n break;\n case $this->_properties['syncResource']:\n $retVal[$row['s']]['syncResource'] = $row['o'];\n break;\n case $this->_properties['wrapperName']:\n $retVal[$row['s']]['wrapperName'] = $row['o'];\n break;\n case $this->_properties['lastSyncPayload']:\n $retVal[$row['s']]['lastSyncPayload'] = unserialize($row['o']);\n break;\n case $this->_properties['lastSyncDateTime']:\n $retVal[$row['s']]['lastSyncDateTime'] = $row['o'];\n break;\n case $this->_properties['syncQuery']:\n $retVal[$row['s']]['syncQuery'] = $row['o'];\n break;\n case $this->_properties['checkHasChanged']:\n $retVal[$row['s']]['checkHasChanged'] = (bool)$row['o'];\n break;\n }\n }\n\n $cacheVal = array();\n foreach ($retVal as $s=>$valueArray) {\n $hash = $this->_getHash(\n $valueArray['syncResource'],\n $valueArray['wrapperName'],\n $valueArray['targetModel']\n );\n $cacheVal[$hash] = $valueArray;\n }\n\n $this->_syncConfigListCache = $cacheVal;\n }\n\n return $this->_syncConfigListCache;\n }", "function recurringdowntime_update_pending_changes($arr)\n{\n if (empty($arr)) {\n $arr = array();\n }\n\n // Save the array into an option\n $encoded = base64_encode(json_encode($arr));\n set_option('recurringdowntime_pending_changes', $encoded);\n}", "private function deployConfig()\n {\n $config = \\SmConfig::$configTable;\n $currentConfig = $this->_db->fetchAll('config');\n\n foreach ($config as $k => $v) {\n $exists = false;\n foreach ($currentConfig as $c) {\n if ($c['c_name'] == $k) {\n $exists = true;\n break;\n }\n }\n if (!$exists) {\n $this->_db->insert('config', ['c_name' => $k, 'c_value' => $v]);\n }\n }\n }", "public function apply()\n {\n\n\n $files = 'start';\n //$load is empty as we will use the .default file to select the data directory\n $load = '';\n $reload = 1;\n \n $this->process->loadFiles($this->helper->getModuleName(),$load,explode(\",\",$files),$reload);\n \n }", "public function sync_data($sync_type, $data_type=NULL){\n //Verify if module is enabled (just in case). If module is not enabled, Magento won't never come here..\n if(!Mage::helper('connector')->isEnabled()) {\n \n //Throw Exception\n throw new Exception(\"Minematic Module is disabled but Cron Jobs are still running. Disable Module in System > Configuration > Advanced > Advanced OR edit Minematic_Connect.xml in app/etc/modules/.\");\n }\n\n //Set last_sync_datetime\n $last_sync_datetime = date('Y-m-d H:i:s');\n\n /* SYNCING ITEMS */\n try {\n //Get information about the last synchronization process\n $items_last_sync_datetime = $this->_get_connector_config_value(Minematic_Connector_Model_Config::ITEMS_LAST_SYNC_DATETIME);\n $items_last_sync_datetime = $items_last_sync_datetime ? strtotime($items_last_sync_datetime) : NULL; //Convert to timestamp\n\n //Call ITEMS sync method\n $this->sync_items_data($sync_type, $items_last_sync_datetime, NULL, NULL, $last_sync_datetime);\n \n //If something goes wrong, catch the exception, log it and continue the synchronization\n } catch (Exception $e) {\n // Log exception\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n }\n\n \n /* SYNCING USERS */\n try {\n //Get information about the last synchronization process\n $users_last_sync_datetime = $this->_get_connector_config_value(Minematic_Connector_Model_Config::USERS_LAST_SYNC_DATETIME);\n $users_last_sync_datetime = $users_last_sync_datetime ? strtotime($users_last_sync_datetime) : NULL; //Convert to timestamp\n\n //Call USERS sync method\n $this->sync_users_data($sync_type, $users_last_sync_datetime, NULL, $last_sync_datetime);\n \n } catch (Exception $e) {\n // Log exception\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n }\n\n /* SYNCING EVENTS */\n try {\n //Get information about the last synchronization process\n $events_last_sync_datetime = $this->_get_connector_config_value(Minematic_Connector_Model_Config::EVENTS_LAST_SYNC_DATETIME);\n $events_last_sync_datetime = $events_last_sync_datetime ? strtotime($events_last_sync_datetime) : 978310861; //(Set date 2001-01-01 01:01:01 for migration)\n\n //Call EVENTS sync method\n $this->sync_events_data($sync_type, Minematic_Connector_Model_Config::EVENT_TYPE_ALL, $events_last_sync_datetime, NULL, $last_sync_datetime);\n \n } catch (Exception $e) {\n // Log exception\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n }\n\n }", "function setupAutoUpdate() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('new_modules_available', 'system', 'b:0;')\");\n DB::execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_archive_url', 'system', 'N;')\");\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_download_progress', 'system', 'i:0;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function updateNgnix($revert = false)\n {\n global $boot;\n\n if ($this->domain) {\n $file = self::path['nginxPath'] . '/custom/' . \"$this->domain.conf\";\n\n if ($revert) {\n $trashDir = self::path['nginxPath'] . \"/custom/.trash\";\n $boot->mkdir($trashDir);\n copy($file, $trashDir . \"/$this->domain.conf\");\n $boot->rmfile($file);\n Az::debug($file, 'config removed: ');\n return 0;\n }\n\n $content = file_get_contents($this->confTpl);\n $replace = [\n '{domain}' => \"$this->domain\",\n '{app}' => $this->domain,\n '{root}' => \"d:/Develop/Projects/ALL/backup/zetsoft/\",\n ];\n $content = strtr($content, $replace);\n\n file_put_contents($file, $content);\n }\n\n $history_sub_dirs = glob(self::path['nginxPath'] . '/history/*', GLOB_ONLYDIR);\n foreach ($history_sub_dirs as $dir) {\n $innerFolder = substr($dir, 54);\n $file = self::path['nginxPath'] . \"/history/$innerFolder/$this->newName.$innerFolder.uz.conf\";\n\n if ($revert) {\n $trashDir = \"$dir/.trash\";\n if (!file_exists($trashDir))\n $boot->mkdir($trashDir);\n if (file_exists($file)) {\n copy($file, $trashDir . \"/$this->newName.$innerFolder.uz.conf\");\n }\n $boot->rmfile($file);\n continue;\n }\n\n $content = file_get_contents($this->confTpl);\n $replace = [\n '{domain}' => \"$this->newName.$innerFolder.uz\",\n '{app}' => $this->newName,\n '{root}' => \"d:/Develop/Projects/ALL/history/$innerFolder/zetsoft/\",\n ];\n $content = strtr($content, $replace);\n\n file_put_contents($file, $content);\n }\n\n $folders = ['backup', 'extract', 'zetsoft', 'zoftapp'];\n\n foreach ($folders as $folder) {\n\n if ($folder === 'zoftapp') $file = self::path['nginxPath'] . \"/$folder/$this->newName.zoft.uz.conf\";\n else $file = self::path['nginxPath'] . \"/$folder/$this->newName.$folder.uz.conf\";\n\n if ($revert) {\n $trashDir = self::path['nginxPath'] . \"/$folder/.trash\";\n if (!file_exists($trashDir))\n $boot->mkdir($trashDir);\n if (file_exists($file)) {\n if ($folder === 'zoftapp') copy($file, $trashDir . \"/$this->newName.zoft.uz.conf\");\n else copy($file, $trashDir . \"/$this->newName.$folder.uz.conf\");\n }\n $boot->rmfile($file);\n Az::debug($file, 'config removed: ');\n continue;\n }\n\n $content = file_get_contents($this->confTpl);\n $replace = [\n '{domain}' => $folder === 'zoftapp' ? \"$this->newName.zoft.uz\" : \"$this->newName.$folder.uz\",\n '{app}' => $this->newName,\n '{root}' => $folder === 'backup' ? \"d:/Develop/Projects/ALL/backup/zetsoft/\" : \"d:/Develop/Projects/ALL/asrorz/zetsoft/\",\n ];\n $content = strtr($content, $replace);\n\n file_put_contents($file, $content);\n }\n\n $this->checkNginx();\n\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "function __reload_ne_adapaters() {\n\t\t$appliance_id = $this->response->html->request()->get('appliance_id');\n\t\t$appliance = new appliance();\n\t\t$appliance->get_instance_by_id($appliance_id);\n\t\t$resource = new resource();\n\t\t$resource->get_instance_by_id($appliance->resources);\n\t\t$command = $this->basedir.\"/plugins/hyperv/bin/htvcenter-hyperv-network post_net_adapters -i \".$resource->ip;\n\t\t$command .= ' --htvcenter-ui-user '.$this->user->name;\n\t\t$command .= ' --htvcenter-cmd-mode fork';\n\t\t$file = $this->rootdir.'/plugins/hyperv/hyperv-stat/'.$resource->ip.'.net_adapters';\n\t\tif(file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t\t$htvcenter_server = new htvcenter_server();\n\t\t$htvcenter_server->send_command($command, NULL, true);\n\t\twhile (!file_exists($file)) // check if the data file has been modified\n\t\t{\n\t\t usleep(10000); // sleep 10ms to unload the CPU\n\t\t clearstatcache();\n\t\t}\n\t\treturn true;\n\t}", "public function setConfiguration() {\n\n // Make sure all new services are available.\n drupal_flush_all_caches();\n $this->updateConfig();\n // Make sure configuration changes are available.\n drupal_flush_all_caches();\n $this->updateAuthors();\n $this->output()->writeln('Your configuration is complete.');\n }", "protected function _syncTrapped() {}", "public function syncSettings()\n {\n $zone = $this->getZone();\n if (isset($zone['id'])) {\n $settingsConnection = $this->getSettingConnection();\n $zoneSettings = $settingsConnection->settings($zone['id']);\n\n if (!isset($zoneSettings['result']['errors'])) {\n $result = [];\n foreach ($zoneSettings['result'] as $setting) {\n if (is_array($setting['value'])) {\n $result[$setting['id']] = $this->jsonHelper->jsonEncode($setting['value']);\n } else {\n $result[$setting['id']] = $setting['value'];\n }\n }\n\n $groupForSave = $this->internScope->getThreeScope($result, 'zone_settings');\n $configData = [\n 'section' => $this->internScope->getSection(),\n 'website' => $this->internScope->getCurrentWebsite(),\n 'store' => $this->internScope->getCurrentStore(),\n 'groups' => $groupForSave,\n ];\n\n $configModel = $this->_configFactory->create(['data' => $configData]);\n $configModel->save();\n\n return true;\n }\n }\n\n return false;\n }", "public function applyChanges($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.config.applychanges\");\n\t\t$moduleMngr = \\OMV\\Engine\\Module\\Manager::getInstance();\n\t\t$notifyDispatcher = \\OMV\\Engine\\Notify\\Dispatcher::getInstance();\n\t\t// Open the dirty modules file. Lock it to force all writers\n\t\t// to wait until this RPC has been finished.\n\t\t$jsonFile = new \\OMV\\Json\\File(\\OMV\\Environment::get(\n\t\t \"OMV_ENGINED_DIRTY_MODULES_FILE\"));\n\t\t$jsonFile->open(\"c+\");\n\t\t// Make sure we have a valid JSON file. Keep in mind that the file\n\t\t// is empty if it was created by the \\OMV\\Json\\File::open method.\n\t\tif ($jsonFile->isEmpty())\n\t\t\t$jsonFile->write([]);\n\t\t// Read the file content.\n\t\t$dirtyModules = $jsonFile->read();\n\t\t// Remove non-existing modules from list. It may happen that the\n\t\t// list contains entries from already deinstalled plugins.\n\t\t$removeDirtyModules = [];\n\t\t$modules = array_keys($moduleMngr->getModules());\n\t\tforeach ($dirtyModules as $dirtyModulek => $dirtyModulev) {\n\t\t\tif (!in_array($dirtyModulev, $modules))\n\t\t\t\t$removeDirtyModules[] = $dirtyModulev;\n\t\t}\n\t\tif (!empty($removeDirtyModules)) {\n\t\t\t// Remove module name from list of dirty modules. Note, the\n\t\t\t// array must be re-indexed.\n\t\t\t$dirtyModules = array_values(array_diff($dirtyModules,\n\t\t\t\t$removeDirtyModules));\n\t\t}\n\t\t// Get list of modules to be processed. If the parameter 'modules'\n\t\t// is empty, then process all registered modules.\n\t\t$modules = $params['modules'];\n\t\tif (empty($params['modules']))\n\t\t\t$modules = array_keys($moduleMngr->getModules());\n\t\t$processModules = [];\n\t\tforeach ($modules as $modulek => $modulev) {\n\t\t\t// Skip module if 'force' is disabled and module is not marked\n\t\t\t// as dirty.\n\t\t\tif (!in_array($modulev, $dirtyModules) &&\n\t\t\t\t(FALSE === $params['force'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t// Get the module object and apply the configuration.\n\t\t\tif (is_null($inst = $moduleMngr->getModule($modulev))) {\n\t\t\t\tthrow new \\OMV\\Exception(\"Module '%s' not found.\",\n\t\t\t\t\t$modulev);\n\t\t\t}\n\t\t\t// Append module to list of modules that have to be processed.\n\t\t\t$processModules[$modulev] = $inst;\n\t\t\t// Remove module name from list of dirty modules. Note, the\n\t\t\t// array must be re-indexed.\n\t\t\t$dirtyModules = array_values(array_diff($dirtyModules,\n\t\t\t\t[$modulev]));\n\t\t}\n\t\t// Build the dependency list and deploy the configuration for the\n\t\t// specified modules.\n\t\t$tsort = new \\OMV\\Util\\TopologicalSort();\n\t\t$tsort->clean();\n\t\tforeach ($processModules as $name => $inst) {\n\t\t\t// Add the modules that need to be executed before the\n\t\t\t// given module.\n\t\t\t$afterNames = $inst->deployAfter();\n\t\t\tif (FALSE === $tsort->add($name, $afterNames)) {\n\t\t\t\tthrow new \\OMV\\Exception(\n\t\t\t\t\t\"Failed to add node (name=%s, dependencies=[%s]).\",\n\t\t\t\t\t$name, implode(\",\", $afterNames));\n\t\t\t}\n\t\t\t// Add the modules that need to be executed after the\n\t\t\t// given module.\n\t\t\t$beforeNames = $inst->deployBefore();\n\t\t\tforeach ($beforeNames as $beforeNamek => $beforeNamev) {\n\t\t\t\tif (FALSE === $tsort->add($beforeNamev, [$name])) {\n\t\t\t\t\tthrow new \\OMV\\Exception(\n\t\t\t\t\t\t\"Failed to add node (name=%s, dependencies=[%s]).\",\n\t\t\t\t\t\t$beforeNamev, $name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($tsort->sort() as $name) {\n\t\t\t$this->debug(\"Deploying configuration for module '%s'\", $name);\n\t\t\t$name = strtolower($name);\n\t\t\t$uri = \"org.openmediavault.module.service.%s.%s\";\n\t\t\t$processModules[$name]->preDeploy();\n\t\t\t$notifyDispatcher->notify(OMV_NOTIFY_EVENT,\n\t\t\t\tsprintf($uri, $name, \"predeploy\"));\n\t\t\t$processModules[$name]->deploy();\n\t\t\t$notifyDispatcher->notify(OMV_NOTIFY_EVENT,\n\t\t\t\tsprintf($uri, $name, \"deploy\"));\n\t\t\t$processModules[$name]->postDeploy();\n\t\t\t$notifyDispatcher->notify(OMV_NOTIFY_EVENT,\n\t\t\t\tsprintf($uri, $name, \"postdeploy\"));\n\t\t}\n\t\t// Reset list of dirty modules.\n\t\t$jsonFile->write($dirtyModules);\n\t\t$jsonFile->close();\n\t\t// Unlink all configuration revision files.\n\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t$db->unlinkRevisions();\n\t}", "public function estimate_full_sync_actions( $config ) {\n\t\treturn null;\n\t}", "function doUpdatesProcess(){\n return $this->doSyncProcess($this->desktopFilePathCopy, true);\n }", "function qruqsp_13colonieslog_settingsUpdate(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'qruqsp', '13colonieslog', 'private', 'checkAccess');\n $rc = qruqsp_13colonieslog_checkAccess($ciniki, $args['tnid'], 'qruqsp.13colonieslog.settingsUpdate'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Grab the settings for the tenant from the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQuery');\n $rc = ciniki_core_dbDetailsQuery($ciniki, 'qruqsp_13colonieslog_settings', 'tnid', $args['tnid'], 'qruqsp.13colonieslog', 'settings', '');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $settings = $rc['settings'];\n\n // \n // Turn off autocommit\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'qruqsp.13colonieslog');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // The list of allowed fields for updating\n //\n $changelog_fields = array(\n 'callsign',\n 'state',\n 'ui-notes',\n 'allow-dupes',\n 'category-mode',\n 'category-operator',\n 'category-assisted',\n 'category-power',\n 'category-station',\n 'category-transmitter',\n 'club',\n 'name',\n 'address',\n 'city',\n 'state',\n 'postal',\n 'country',\n );\n //\n // Check each valid setting and see if a new value was passed in the arguments for it.\n // Insert or update the entry in the qruqsp_13colonieslog_settings table\n //\n foreach($changelog_fields as $field) {\n if( isset($ciniki['request']['args'][$field]) \n && (!isset($settings[$field]) || $ciniki['request']['args'][$field] != $settings[$field]) \n ) {\n if( in_array($field, ['callsign', 'state']) ) {\n $ciniki['request']['args'][$field] = strtoupper($ciniki['request']['args'][$field]);\n }\n $strsql = \"INSERT INTO qruqsp_13colonieslog_settings (tnid, detail_key, detail_value, date_added, last_updated) \"\n . \"VALUES ('\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['args']['tnid']) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $field) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['args'][$field]) . \"'\"\n . \", UTC_TIMESTAMP(), UTC_TIMESTAMP()) \"\n . \"ON DUPLICATE KEY UPDATE detail_value = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['args'][$field]) . \"' \"\n . \", last_updated = UTC_TIMESTAMP() \"\n . \"\";\n $rc = ciniki_core_dbInsert($ciniki, $strsql, 'qruqsp.13colonieslog');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'qruqsp.13colonieslog');\n return $rc;\n }\n ciniki_core_dbAddModuleHistory($ciniki, 'qruqsp.13colonieslog', 'qruqsp_13colonieslog_history', $args['tnid'], \n 2, 'qruqsp_13colonieslog_settings', $field, 'detail_value', $ciniki['request']['args'][$field]);\n $ciniki['syncqueue'][] = array('push'=>'qruqsp.13colonieslog.setting', \n 'args'=>array('id'=>$field));\n }\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'qruqsp.13colonieslog');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'qruqsp', '13colonieslog');\n\n return array('stat'=>'ok');\n}", "function vpn_ipsec_failover_configure() {\n\tglobal $config, $g;\n\n\n\tif (is_array($config['installedpackages']['sasyncd'])) {\n\t\t$sasyncd_text = \"\";\n\t\tforeach ($config['installedpackages']['sasyncd']['config'] as $sasyncd) {\n\t\t\t$enabled = isset ($sasyncd['enable']);\n\t\t\tif (!$enabled)\n\t\t\t\treturn;\n\t\t\tif ($sasyncd['peerip'] <> \"\")\n\t\t\t\t$sasyncd_text .= \"peer {$sasyncd['peerip']}\\n\";\n\t\t\tif ($sasyncd['interface'])\n\t\t\t\t$sasyncd_text .= \"carp interface {$sasyncd['interface']}\\n\";\n\t\t\tif ($sasyncd['sharedkey'] <> \"\")\n\t\t\t\t$sasyncd_text .= \"sharedkey {$sasyncd['sharedkey']}\\n\";\n\t\t\tif ($sasyncd['mode'] <> \"\")\n\t\t\t\t$sasyncd_text .= \"mode {$sasyncd['mode']}\\n\";\n\t\t\tif ($sasyncd['listenon'] <> \"\")\n\t\t\t\t$sasyncd_text .= \"listen on {$sasyncd['listenon']}\\n\";\n\t\t\tif ($sasyncd['flushmodesync'] <> \"\")\n\t\t\t\t$sasyncd_text .= \"flushmode sync {$sasyncd['flushmodesync']}\\n\";\n\t\t}\n\n\t\tfile_put_contents(\"{$g['varetc_path']}/sasyncd.conf\", $sasyncd_text);\n\t\tchmod(\"{$g['varetc_path']}/sasyncd.conf\", 0600);\n\n\t\tif(is_process_running(\"sasyncd\"))\n\t\t\tmwexec(\"killall sasyncd\", true);\n\n\t\t/* launch sasyncd, oh wise one */\n\t\tmwexec_bg(\"/usr/local/sbin/sasyncd -d -v -v -v\");\n\t}\n}", "public function sync($force = false) {\n\t\t// do this once per request\n\t\tif ($this->cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $conf;\n\n\t\t$idx_cache = new cache($this->getPluginName(), '.idx');\n\t\t$pkg_cache = new cache($this->getPluginName(), '.txt');\n\t\t$cache_exists = file_exists($pkg_cache->cache);\n\n\t\t// check poldek indexes\n\t\tif (!$cache_exists || !$idx_cache->useCache(array('age' => $conf['locktime'], 'files' => getConfigFiles('main')))) {\n\n\t\t\t// cache is ok, if it exists and is not empty and does not contain errors\n\t\t\t$cache_ok = $cache_exists && filesize($pkg_cache->cache) && !preg_grep('/^error:/', file($pkg_cache->cache));\n\n\t\t\t// without force update indexes only if cache is missing\n\t\t\tif ($force || !$cache_exists) {\n\t\t\t\t$lines = $this->exec(\"--up\");\n\t\t\t\t// process output, if we find \"Writing ...\" line, means we should update ls output as well\n\t\t\t\t// Writing /root/.poldek-cache/[...]/packages.ndir.gz...\n\t\t\t\t// Index patches size too big\n\t\t\t\t// Retrieving whole index ...\n\t\t\t\tif (!$cache_exists || !$cache_ok || preg_grep('/^(Writing|Retrieving whole index) /', $lines)) {\n\t\t\t\t\t$idx_cache->storeCache(time());\n\t\t\t\t} else {\n\t\t\t\t\t// freshen timestamp or we keep updating indexes if index\n\t\t\t\t\t// is older than locktime\n\t\t\t\t\ttouch($idx_cache->cache);\n\t\t\t\t\tif ($force) {\n\t\t\t\t\t\t// sleep, so packages cache be newer\n\t\t\t\t\t\tsleep(1);\n\t\t\t\t\t}\n\t\t\t\t\t// touch also package file, not to trigger it's update\n\t\t\t\t\ttouch($pkg_cache->cache);\n\t\t\t\t\tclearstatcache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// do not update listing, if cache exists and not in cron mode\n\t\tif (($force || !$cache_exists) && !$pkg_cache->useCache(array('files' => array($idx_cache->cache)))) {\n\t\t\t$lines = $this->shcmd(\"ls\", $rc);\n\t\t\t// write cache, unless there was an error\n\t\t\tif (!$rc) {\n\t\t\t\t$pkg_cache->storeCache(join(\"\\n\", $lines));\n\t\t\t}\n\t\t}\n\n\t\t$this->cache = $pkg_cache->cache;\n\t}", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "protected function applyConfig(): void\n {\n foreach (['to', 'from', 'sender', 'replyTo'] as $method) {\n if (isset($this->account[$method])) {\n foreach ((array) $this->account[$method] as $email => $name) {\n if (is_int($email)) {\n $email = $name;\n $name = null;\n }\n call_user_func_array([$this, $method], [$email,$name]);\n }\n }\n }\n if (isset($this->account['bcc'])) {\n foreach ((array) $this->account['bcc'] as $email => $name) {\n if (is_int($email)) {\n $email = $name;\n $name = null;\n }\n $this->addBcc($email, $name);\n }\n }\n\n if (isset($this->account['cc'])) {\n foreach ((array) $this->account['cc'] as $email => $name) {\n if (is_int($email)) {\n $email = $name;\n $name = null;\n }\n $this->addCc($email, $name);\n }\n }\n }", "function applyHotfix()\n\t{\n\t\tglobal $ilCtrlStructureReader;\n\n\t\t$ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);\n\n\t\tinclude_once \"./Services/Database/classes/class.ilDBUpdate.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacAdmin.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacReview.php\";\n\t\tinclude_once \"./Services/AccessControl/classes/class.ilRbacSystem.php\";\n\t\tinclude_once \"./Services/Tree/classes/class.ilTree.php\";\n\t\tinclude_once \"./Services/Xml/classes/class.ilSaxParser.php\";\n\t\tinclude_once \"./Services/Object/classes/class.ilObjectDefinition.php\";\n\n\t\t// referencing db handler in language class\n\t\t$ilDB = $this->setup->getClient()->db;\n\t\t$this->lng->setDbHandler($ilDB);\n\n\t\t// run dbupdate\n\t\t$dbupdate = new ilDBUpdate($ilDB);\n\t\t$dbupdate->applyHotfix();\n\n\t\tif ($dbupdate->updateMsg == \"no_changes\")\n\t\t{\n\t\t\t$message = $this->lng->txt(\"no_changes\").\". \".$this->lng->txt(\"database_is_uptodate\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sep = \"\";\n\t\t\tforeach ($dbupdate->updateMsg as $row)\n\t\t\t{\n\t\t\t\tif ($row[\"msg\"] == \"update_applied\")\n\t\t\t\t{\n\t\t\t\t\t$a_message.= $sep.$row[\"nr\"];\n\t\t\t\t\t$sep = \", \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$e_message.= \"<br/>\".$this->lng->txt($row[\"msg\"]).\": \".$row[\"nr\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($a_message != \"\")\n\t\t\t{\n\t\t\t\t$a_message = $this->lng->txt(\"update_applied\").\": \".$a_message;\n\t\t\t}\n\t\t}\n\n\t\tilUtil::sendInfo($a_message.$e_message, true);\n\t\tilUtil::redirect(\"setup.php?cmd=displayDatabase\");\n\t}", "public function updateFromConfig()\n {\n // Begin transation\n $this->pdo->beginTransaction();\n\n // Update tables\n foreach ($this->schema['update'] as $schema) {\n $sql = false;\n\n // validate table to update\n if (isset($this->tables[$schema['table']])) {\n $table = $this->tables[$schema['table']];\n $columns = $table->getColumns(false);\n if (isset($schema['drop'])) {\n $sql = $this->getDropColumn($table, $schema['drop']);\n } elseif (isset($schema['add'])) {\n $sql = $this->getAddColumn(\n $table, $schema['add'], $schema['type']\n );\n } elseif (isset($schema['modify'])) {\n $sql = $this->getModifyColumn(\n $table, $columns[$schema['modify']], $schema['type']\n );\n }\n }\n\n // Finally run query if exists\n if (!empty($sql)) {\n $this->pdo->exec($sql);\n }\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "private function checkFileUpdates() {\n\n if ($this->request->params['controller'] != 'acos' || ($this->request->params['action'] != 'admin_synchronize' && $this->request->params['action'] != 'admin_prune_acos' && $this->request->params['action'] != 'admin_build_acl')) {\n if ($this->AclManager->isControllerHashFileOutOfSync()) {\n $missingAcoNodes = $this->AclManager->getMissingAcos();\n $nodesToPrune = $this->AclManager->getAcosToPrune();\n\n $hasUpdates = false;\n\n if (count($missingAcoNodes) > 0) {\n $hasUpdates = true;\n }\n\n if (count($nodesToPrune) > 0) {\n $hasUpdates = true;\n }\n\n $this->set('nodesToPrune', $nodesToPrune);\n $this->set('missingAcoNodes', $missingAcoNodes);\n\n if ($hasUpdates) {\n $this->render('Acl.Acos/admin_has_updates');\n $this->response->send();\n $this->AclManager->updateControllerHashFile();\n exit();\n } else {\n $this->AclManager->updateControllerHashFile();\n }\n \t\t\n \t\t$this->AclManager->update_controllers_hash_file();\n }\n }\n }", "protected function adjustRunningWorkers() : void\n {\n foreach ($this->poolsConfig as $pool => $workerConfig) {\n $workersActive = count($this->pids[$pool]);\n $workersTarget = (int)$workerConfig['instances'];\n if ($workersActive >= $workersTarget) {\n continue;\n }\n\n $workerDiff = $workersTarget - $workersActive;\n for ($i = 0; $i < $workerDiff; $i++) {\n $this->startupWorker($pool);\n }\n }\n }" ]
[ "0.69894373", "0.6581784", "0.62709355", "0.6176952", "0.6142984", "0.6103777", "0.6029013", "0.59590673", "0.5909277", "0.57832086", "0.57815963", "0.5752379", "0.572294", "0.571582", "0.56891197", "0.56780326", "0.5594504", "0.55939543", "0.546231", "0.5432511", "0.542029", "0.5394851", "0.5394166", "0.53850377", "0.53814995", "0.5341253", "0.53195786", "0.53085935", "0.5288253", "0.52760714", "0.52678186", "0.52553827", "0.52528495", "0.5244091", "0.5233998", "0.5215548", "0.5207957", "0.52056617", "0.5203106", "0.517592", "0.51746327", "0.51681197", "0.5163186", "0.51177377", "0.51136017", "0.5108133", "0.5099577", "0.5094066", "0.5093439", "0.5092773", "0.5090693", "0.5090693", "0.5084145", "0.50760067", "0.50686294", "0.506552", "0.50632226", "0.5050581", "0.50495046", "0.5029503", "0.50278425", "0.502648", "0.50157154", "0.50102246", "0.50093263", "0.50067824", "0.5006062", "0.49969506", "0.49961483", "0.49919978", "0.49911135", "0.49842307", "0.49777249", "0.49636152", "0.49564278", "0.49447826", "0.49354854", "0.4935181", "0.49243256", "0.4918761", "0.49165902", "0.4915076", "0.49135625", "0.49122286", "0.49101016", "0.49007118", "0.48985916", "0.48870766", "0.48849395", "0.48821878", "0.48800245", "0.4872009", "0.48623067", "0.48574224", "0.4854923", "0.4851345", "0.48468322", "0.48451412", "0.48441088", "0.48383513" ]
0.73544157
0
Verify this is a CCM restore and it finished successfully
function recurringdowntime_cancel_pending_changes($cbtype, &$cbargs) { if ($cbargs['command'] != COMMAND_RESTORE_NAGIOSQL_SNAPSHOT || $cbargs['return_code'] != 0) { return; } recurringdowntime_update_pending_changes(array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_restore() {\n global $DB;\n\n $startcount = $DB->count_records('course_modules');\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Try restoring.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->restore_item($item);\n }\n\n // Check that it was restored and removed from the recycle bin.\n $this->assertEquals($startcount, $DB->count_records('course_modules'));\n $this->assertEquals(0, count($recyclebin->get_items()));\n }", "public function testRestoreSingleSuccess()\n {\n $entity = $this->findOneEntity();\n\n // Restore Entity\n $this->getClient(true)->request('PATCH', $this->getBaseUrl() . '/restore/' . $entity->getId(),\n [], [], ['Authorization' => 'Bearer ' . $this->adminToken, 'HTTP_AUTHORIZATION' => 'Bearer ' . $this->adminToken]);\n $this->assertEquals(StatusCodesHelper::SUCCESSFUL_CODE, $this->getClient()->getResponse()->getStatusCode());\n }", "public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}", "public function testRestoreSuccessForAdmin() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_ADMIN,\n\t\t\t'prefix' => 'admin',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$mocks = [\n\t\t\t'components' => [\n\t\t\t\t'Security',\n\t\t\t]\n\t\t];\n\t\t$this->generateMockedController($mocks);\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t\t'return' => 'vars',\n\t\t];\n\t\t$this->testAction('/admin/logs/restore/2', $opt);\n\t\t$this->checkFlashMessage(__(\n\t\t\t'Deferred saving with an restored employee information was created.<br />Information on LDAP server will be updated by queue.<br />Information in phonebook will be updated %s after processing.',\n\t\t\tCakeTime::timeAgoInWords(strtotime('+' . DEFERRED_SAVE_SYNC_DELAY . ' second'), ['accuracy' => ['second' => 'minute']])\n\t\t));\n\t}", "public function after_restore() {\n global $DB;\n\n // Get the blockid.\n $blockid = $this->get_blockid();\n\n // Extract block configdata and update it to point to the new activities\n if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {\n\n $config = unserialize(base64_decode($configdata));\n $update = false;\n $types = array('collectpresentations', 'collectworkshops', 'collectsponsoreds',\n 'conference', 'workshops', 'reception', 'publish',\n 'registerdelegates', 'registerpresenters');\n foreach ($types as $type) {\n if ($this->after_restore_fix_cmid($config, $type)) {\n $update = true;\n }\n }\n\n // cache number of sections in this course\n $numsections = self::get_numesctions($this->get_courseid());\n\n $types = array('review', 'revise');\n foreach ($types as $type) {\n if ($this->after_restore_fix_sectionnum($config, $type, $numsections)) {\n $update = true;\n }\n }\n\n if ($update) {\n $configdata = base64_encode(serialize($config));\n $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));\n }\n }\n }", "function restore_complete(){\r\n\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----dirname dirname-------- \".var_export(dirname(__FILE__),true).\"\\n\",FILE_APPEND);\r\n\tWPTC_Factory::get('config')->set_option('restore_completed_notice','yes'); \r\n\t//delete the bridge files on completion\r\n\tglobal $wp_filesystem;\r\n\t$wp_filesystem->delete(dirname(__FILE__), true);\r\n\t$this_temp_backup_folder = WP_CONTENT_DIR.'/tCapsule';\r\n\t$wp_filesystem->delete($this_temp_backup_folder, true);\r\n\tif ( !$wp_filesystem->is_dir($this_temp_backup_folder) ) {\r\n\t\tif ( !$wp_filesystem->mkdir($this_temp_backup_folder, FS_CHMOD_DIR) )\r\n\t\t\t{\r\n\t\t\t\t//return error message if any\r\n\t\t\t}\r\n\t}\r\n\techo json_encode('over');\r\n\texit;\r\n}", "public function beforeRestore() : bool\n\t{\n\t\treturn true;\n\t}", "public static function restore_enrol_returns() {\n return new external_value(PARAM_BOOL, 'Operation status');\n }", "public function restoreAction() {\r\n\t\t$request = reqEbbs::get('post');\r\n\t\t$response = new responseEbbs();\r\n\t\t$filename = $request['filename'];\r\n\t\t$model = $this->getModel();\r\n\r\n // This block for pro-version module 'scrambler'\r\n $needKeyToDecryptDB = dispatcherEbbs::applyFilters('checkIsNeedSecretKeyToEncryptedDB', false, $filename, $request);\r\n if($needKeyToDecryptDB){\r\n $response->addData(array('need' => 'secretKey'));\r\n return $response->ajaxExec();\r\n }\r\n\r\n\t\t$result = $model->restore($filename);\r\n\r\n\t\tif (false === $result) {\r\n $errors = array_merge($model->getDatabase()->getErrors(), $model->getFilesystem()->getErrors());\r\n if (empty($errors)) {\r\n $errors = __('Unable to restore from ' . $filename, EBBS_LANG_CODE);\r\n }\r\n\t\t\t$response->addError($errors);\r\n\t\t}\r\n elseif(is_array($result) && array_key_exists('error', $result)) {\r\n $response->addError($result['error']);\r\n }\r\n elseif(is_array($result) && !empty($result)) {\r\n $content = __('Unable to restore backup files. Check folder or files writing permissions. Try to set 766 permissions to the:', EBBS_LANG_CODE) . ' <br>'. implode('<br>', $result);\r\n $response->addError($content);\r\n }\r\n\t\telse {\r\n\t\t\t$response->addData($result);\r\n\t\t\t$response->addMessage(__('Done!', EBBS_LANG_CODE));\r\n\t\t}\r\n\r\n $response->addData(array('result' => $result));\r\n return $response->ajaxExec();\r\n\t}", "public function test_Incremental_Backup_Restore(){\n\t\tzbase_setup::reset_zbase_vbucketmigrator(TEST_HOST_1,TEST_HOST_2);\n\t\tflushctl_commands::set_flushctl_parameters(TEST_HOST_1, \"chk_max_items\", 100);\n\t\t$this->assertTrue(Data_generation::add_keys(2000, 100, 1, \"testvalue\"), \"adding keys failed\");\n\t\t// Ensure that keys are replicated to the slave\n\t\tsleep(30);\n\t\t$curr_items = stats_functions::get_all_stats(TEST_HOST_1, \"curr_items\");\n\t\t$this->assertEquals($curr_items ,2000 , \"All keys not replicated to slave\");\n\t\t// Take incremental backup using backup daemon\n\t\tbackup_tools_functions::clear_backup_data(TEST_HOST_2);\n\t\tbackup_tools_functions::clear_temp_backup_data(TEST_HOST_2);\n\t\tzbase_backup_setup::start_backup_daemon(TEST_HOST_2);\n\t\t$this->assertTrue(backup_tools_functions::verify_zbase_backup_upload(), \"Failed to upload the backup files to Storage Server\");\n\t\t// Kill vbucket migrator between master and slave\n\t\tvbucketmigrator_function::kill_vbucketmigrator(TEST_HOST_1);\n\t\tzbase_setup::memcached_service(TEST_HOST_2, \"stop\");\n\t\tremote_function::remote_execution(TEST_HOST_2,\"sudo rm -rf /data_*/zbase/*\");\n\t\tzbase_setup::memcached_service(TEST_HOST_2, \"start\");\n\t\t// Perform restore\n\t\tmb_restore_commands::restore_server(TEST_HOST_2);\n\t\t//Attempt get on all keys\n\t\t$this->assertTrue(Data_generation::verify_added_keys(TEST_HOST_2, 2000, \"testvalue\", 1), \"verifying keys failed\");\n\t\t// The below step causes SERVER ERROR\n\t\t//$this->assertTrue(Data_generation::verify_added_keys(TEST_HOST_2, 1, \"testvalue\", 2001), \"verifying keys failed\");\n\t}", "public function testRestoreState()\n {\n $load = new Load(new Memento());\n $load->pickup();\n $load->enroute();\n $load->deliver();\n\n // Check the last state of the load\n $this->assertSame(State::STATE_DELIVER, $load->getCurrentState());\n\n // Undo the previous state of the load\n $load->undo();\n $this->assertSame(State::STATE_ENTOUTE, $load->getCurrentState());\n\n // Restore the first state of the load\n $load->restore(0);\n $this->assertSame(State::STATE_PICKUP, $load->getCurrentState());\n }", "private function do_restore($restore_code) {\n\t\t$serial = $this->plain_serial();\n\t\t$challenge = $this->send(self::$restore_uri, self::RESTORE_CHALLENGE_SIZE, $serial);\n\n\t\t$restore_code = Authenticator_Crypto::restore_code_from_char(strtoupper($restore_code));\n\t\t$mac = hash_hmac('sha1', $serial.$challenge, $restore_code, true);\n\t\t$enc_key = $this->create_key(20);\n\t\t$data = $serial.$this->encrypt($mac.$enc_key);\n\t\t$response = $this->send(self::$restore_validate_uri, self::RESTORE_VALIDATE_SIZE, $data);\n\n\t\t$data = $this->decrypt($response, $enc_key);\n\t\t$this->_set_secret($data);\n\t\t$this->synchronize();\n\t}", "function _replayTransaction() {\n\t\t// Get hold of the failed master\n\t\t$failed = $this->_strategy->getMaster();\n\n\t\t// Try to select a new master\n\t\t$master = $this->_strategy->nextMaster();\n\t\tif ($master->isNull())\n\t\t\treturn false;\n\n\t\t// Try to rollback the failed master\n\t\t$failed->_rollback();\n\n\t\t// Replay the transaction on new master\n\t\tforeach ($this->_log as $call) {\n\t\t\t$result = call_user_func_array(array($master, $call[0]), $call[1]);\n\t\t\tif (SyndLib::isError($result))\n\t\t\t\treturn $master->isAlive() ? false : $this->_replayTransaction();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function succeeded();", "function isSuccessful() ;", "protected function onRestored()\n {\n return true;\n }", "public function isSuccessful();", "private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'restore' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "abstract public function isSuccessful();", "function restoreBackup()\n {\n $mysqlDatabaseName ='edumarxc_bmwdatabase';\n $mysqlUserName ='edumarxc_bmw';\n $mysqlPassword ='bmw_INF370';\n $mysqlHostName ='dbxxx.hosting-data.io';\n $mysqlImportFilename ='backup.sql';\n\n //Please do not change the following points\n //Import of the database and output of the status\n $command='mysql -u '.$mysqlUserName .' -p' .$mysqlPassword .' ' .$mysqlDatabaseName .' < ' .$mysqlImportFilename;\n exec($command,$output=array(),$worked);\n switch($worked){\n case 0:\n return true;\n break;\n case 1:\n return false;\n break;\n }\n\n }", "private function course_bin_item_restored($event) {\n global $DB;\n $objectid = $event->objectid;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n\n $restoreditem = $event->get_record_snapshot('tool_recyclebin_course', $objectid);\n $section = $restoreditem->section;\n $module = $restoreditem->module;\n $sql = 'SELECT id, visible\n FROM {course_modules}\n WHERE course = :courseid\n AND module = :module\n AND section = :section\n ORDER BY id DESC\n LIMIT 1';\n $cm = $DB->get_record_sql($sql, array('courseid' => $courseid, 'module' => $module, 'section' => $section));\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n\n $users = $this->get_google_authenticated_users($courseid);\n $fileids = $this->get_fileids($cmid);\n $insertcalls = array();\n\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing (permission should already exist).\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing (permission should already exist).\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks for reader permission.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // Course module is visible and accessible, section is accessible; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // Course module or section not visible or available; do nothing.\n }\n // Course not visible, do nothing.\n } \n // User is not enrolled; do nothing.\n }\n\n // Store cmid and reference(s).\n $newdata = new stdClass();\n $newdata->courseid = $courseid;\n $newdata->cmid = $cmid;\n $newdata->reference = $fileid;\n $DB->insert_record('repository_gdrive_references', $newdata);\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n }", "public function resume(): bool {}", "protected function _actionVerify($context)\n {\n $context->response->status = KHttpResponse::RESET_CONTENT;\n $this->getItem()->verify();\n return;\n }", "public function perform_restore($entities_to_restore, $restore_options) {\n\t\tglobal $updraftplus;\n\t\t\n\t\t$updraftplus->log_restore_update(array('type' => 'state', 'stage' => 'verifying', 'data' => implode(', ', array_flip($entities_to_restore))));\n\n\t\t// Now log. We first remove any encryption passphrase from the log data.\n\t\t$copy_restore_options = $restore_options;\n\t\tif (!empty($copy_restore_options['updraft_encryptionphrase'])) $copy_restore_options['updraft_encryptionphrase'] = '***';\n\t\t$updraftplus->log(\"Restore job started. Entities to restore: \".implode(', ', array_flip($entities_to_restore)).'. Restore options: '.json_encode($copy_restore_options));\n\t\t\n\t\tdo_action('updraftplus_restoration_title', __('Final checks', 'updraftplus'));\n\t\tadd_action('updraftplus_unzip_progress_restore_info', array($this, 'unzip_progress_restore_info'), 10, 4);\n\t\t$backup_set = $this->ud_backup_set;\n\t\t\n\t\t$services = isset($backup_set['service']) ? $updraftplus->get_canonical_service_list($backup_set['service']) : array();\n\t\t\n\t\t$backupable_entities = $updraftplus->get_backupable_file_entities(true, true);\n\t\t\n\t\t$remove_zip = isset($restore_options['delete_during_restore']) ? $restore_options['delete_during_restore'] : false;\n\n\t\tif (!empty($restore_options['dummy_db_restore'])) {\n\t\t\t$this->is_dummy_db_restore = true;\n\t\t\tadd_filter('updraftplus_restore_table_prefix', array($this, 'updraftplus_random_restore_table_prefix'));\n\t\t}\n\n\t\t// Allow add-ons to adjust the restore directory (but only in the case of restore - otherwise, they could just use the filter built into UpdraftPlus::get_backupable_file_entities)\n\t\t$backupable_entities = apply_filters('updraft_backupable_file_entities_on_restore', $backupable_entities, $restore_options, $backup_set);\n\n\t\tif (function_exists('set_time_limit')) @set_time_limit(UPDRAFTPLUS_SET_TIME_LIMIT);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t\n\t\t// Get an ordered list of things to restore\n\t\t// This requires the global $updraft_restorer to be set up\n\t\t$second_loop = $this->ensure_restore_files_present($entities_to_restore, $backupable_entities, $services);\n\t\t\n\t\tif (!is_array($second_loop)) return $second_loop;\n\t\t\n\t\t$timestamp = $backup_set['timestamp'];\n\t\t\n\t\t$updraftplus->jobdata_set('second_loop_entities', $second_loop);\n\t\t$updraftplus->jobdata_set('backup_timestamp', $timestamp);\n\t\t\n\t\t// Use a site option, as otherwise on multisite when all the array of options is updated via UpdraftPlus_Options::update_site_option(), it will over-write any restored UD options from the backup\n\t\tupdate_site_option('updraft_restore_in_progress', $updraftplus->nonce);\n\n\t\t// Now process the actual restoration of the entities\n\t\tforeach ($second_loop as $type => $files) {\n\n\t\t\t$this->current_type = $type;\n\n\t\t\t// Types: uploads, themes, plugins, others, db\n\t\t\t$info = isset($backupable_entities[$type]) ? $backupable_entities[$type] : array();\n\n\t\t\t$restoration_title = ('db' == $type) ? __('Database', 'updraftplus') : $info['description'];\n\n\t\t\t// Indicate the type changed\n\t\t\t$updraftplus->log_restore_update(array('type' => 'state_change', 'stage' => $type, 'data' => array()));\n\n\t\t\tdo_action('updraftplus_restoration_title', $restoration_title);\n\t\t\t\n\t\t\t$updraftplus->log('Entity: '.$type);\n\n\t\t\tif (is_string($files)) $files = array($files);\n\t\t\t\n\t\t\t// Don't assume that the caller pre-sorted the array. We do need it sorted, so that incremental zips get restored in the right order\n\t\t\tksort($files);\n\t\t\t\n\t\t\tforeach ($files as $fkey => $file) {\n\t\t\t\t$this->current_index = $fkey;\n\t\t\t\t$last_one = (1 == count($second_loop) && 1 == count($files));\n\t\t\t\t$last_entity = (1 == count($files));\n\t\t\t\ttry {\n\t\t\t\t\t// Returns a boolean or WP_Error\n\t\t\t\t\t$restore_result = $this->restore_backup($file, $type, $info, $last_one, $last_entity);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$log_message = 'Exception ('.get_class($e).') occurred during restore: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';\n\t\t\t\t\t$display_log_message = sprintf(__('A PHP exception (%s) has occurred: %s', 'updraftplus'), get_class($e), $e->getMessage());\n\t\t\t\t\terror_log($log_message);\n\t\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t\tif (function_exists('wp_debug_backtrace_summary')) $log_message .= ' Backtrace: '.wp_debug_backtrace_summary();\n\t\t\t\t\t$updraftplus->log($log_message);\n\t\t\t\t\t$updraftplus->log($display_log_message, 'notice-restore');\n\t\t\t\t\tdie();\n\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t} catch (Error $e) {\n\t\t\t\t\t$log_message = 'PHP Fatal error ('.get_class($e).') has occurred. Error Message: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';\n\t\t\t\t\terror_log($log_message);\n\t\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t\tif (function_exists('wp_debug_backtrace_summary')) $log_message .= ' Backtrace: '.wp_debug_backtrace_summary();\n\t\t\t\t\t$updraftplus->log($log_message);\n\t\t\t\t\t$display_log_message = sprintf(__('A PHP fatal error (%s) has occurred: %s', 'updraftplus'), get_class($e), $e->getMessage());\n\t\t\t\t\t$updraftplus->log($display_log_message, 'notice-restore');\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_wp_error($restore_result)) {\n\t\t\t\t\t$codes = $restore_result->get_error_codes();\n\t\t\t\t\tif (is_array($codes) && in_array('not_found', $codes) && !empty($this->ud_foreign) && apply_filters('updraftplus_foreign_allow_missing_entity', false, $type, $this->ud_foreign)) {\n\t\t\t\t\t\t$updraftplus->log('Entity to move not found in this zip - but this is possible with this foreign backup type');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$updraftplus->log_e($restore_result);\n\t\t\t\t\t\tforeach ($restore_result->get_error_messages() as $msg) {\n\t\t\t\t\t\t\t$updraftplus->log(__('Error message', 'updraftplus').': '.$msg, 'notice-restore');\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $restore_result;\n\t\t\t\t\t}\n\t\t\t\t} elseif (false === $restore_result) {\n\t\t\t\t\treturn false;\n\t\t\t\t} elseif ($restore_result && $remove_zip) {\n\t\t\t\t\t$deleted = unlink($updraftplus->backups_dir_location().'/'.$file);\n\t\t\t\t\t$updraftplus->log(\"Delete zip during restore active; removing backup file: $file: \".($deleted ? 'OK' : 'Failed'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tunset($files[$fkey]);\n\t\t\t\t$second_loop[$type] = $files;\n\t\t\t\t$updraftplus->jobdata_set_multi(array('second_loop_entities' => $second_loop, 'backup_timestamp' => $timestamp));\n\n\t\t\t\tdo_action('updraft_restored_archive', $file, $type, $restore_result, $fkey, $timestamp);\n\n\t\t\t}\n\t\t\t\n\t\t\t// Update the job data each time we go round the loop, so that if it aborts, it can be resumed from the correct point\n\t\t\tunset($second_loop[$type]);\n\t\t\tupdate_site_option('updraft_restore_in_progress', $updraftplus->nonce);\n\t\t\t$updraftplus->jobdata_set_multi(array('second_loop_entities' => $second_loop, 'backup_timestamp' => $timestamp));\n\t\t}\n\t\t\n\t\t// If the database was restored, then check active plugins and make sure they all exist; otherwise, the site may go down\n\t\tif (null !== $this->final_import_table_prefix) $this->check_active_plugins($this->final_import_table_prefix);\n\n\t\treturn true;\n\t}", "public function restoreAction() {\n\t\t$request = reqBup::get('post');\n\t\t$response = new responseBup();\n\t\t$filename = $request['filename'];\n\t\t$model = $this->getModel();\n\t\t\n\t\t$result = $model->restore($filename);\n\n\t\tif (false === $result) {\n $errors = array_merge($model->getDatabase()->getErrors(), $model->getFilesystem()->getErrors());\n if (empty($errors)) {\n $errors = langBup::_('Unable to restore from ' . $filename);\n }\n\t\t\t$response->addError($errors);\n\t\t}\n\t\telse {\n\t\t\t$response->addData($result);\n\t\t\t$response->addMessage(langBup::_('Done!'));\n\t\t}\n\n $response->addData(array('result' => $result));\n return $response->ajaxExec();\n\t}", "public function isSuccessful() {}", "public function restored(AssignmentFinishRecord $assignmentFinishRecord)\n {\n //\n }", "function HasFailedTrans() {}", "public function resume(): bool;", "public function isSuccessful()\n\t{\n\t\t$data = $this->getData();\n\n\t\treturn isset($data['gettransactionResult']);\n\t}", "public function testCanRestoreValidDomainsFromRGP() {\n $domainName = $this->api->test()->createRGPDomain();\n\n $liveAvailability = $this->api->domains()->liveAvailability($domainName);\n $initialExpiry = date_create_from_format(\"d/m/Y\", $liveAvailability->getAdditionalData()[\"expiryDate\"]);\n\n $transaction = $this->api->domains()->restore($domainName, $liveAvailability->getAdditionalData()[\"restoreCode\"], 3);\n\n // Check transaction succeeded\n $this->assertEquals(\"SUCCEEDED\", $transaction->getTransactionStatus());\n\n // Check amounts taken correct\n $this->assertEquals(275.36, $transaction->getOrderSubtotal());\n $this->assertEquals(55.07, $transaction->getOrderTaxes());\n $this->assertEquals(330.43, $transaction->getOrderTotal());\n\n // Check status and expiry now updated on domain name\n $reDomain = $this->api->domains()->get($domainName);\n $this->assertEquals(\"ACTIVE\", $reDomain->getStatus());\n $currentExpiry = date_create_from_format(\"d/m/Y H:i:s\", $reDomain->getExpiryDate());\n $currentExpiry->sub(new DateInterval(\"P2Y\"));\n $this->assertEquals($initialExpiry->format(\"d/m/Y\"), $currentExpiry->format(\"d/m/Y\"));\n\n }", "function validateRequest()\n\t{\n\t\t// Does the ID exist?\n\t\t$id = $this->getId();\n\t\tif(empty($id))\n\t\t{\n\t\t\treturn JText::_('RESTORE_ERROR_INVALID_RECORD');\n\t\t}\n\n\t\t// Is this a valid backup entry?\n\t\t$data = AEPlatform::get_statistics($id);\n\t\tif(empty($data))\n\t\t{\n\t\t\treturn JText::_('RESTORE_ERROR_INVALID_RECORD');\n\t\t}\n\n\t\t// Is this a complete backup?\n\t\tif($data['status'] != 'complete')\n\t\t{\n\t\t\treturn JText::_('RESTORE_ERROR_INVALID_RECORD');\n\t\t}\n\t\t\n\t\t// Is it a restoration point backup?\n\t\tif($data['tag'] != 'restorepoint') {\n\t\t\treturn JText::_('RESTORE_ERROR_NOT_AN_SRP');\n\t\t}\n\t\t\n\t\t$rawDataParts = explode(\"\\n\", $data['comment']);\n\t\t$this->info = json_decode($rawDataParts[1]);\n\t\t$this->info->srpdate = $data['backupstart'];\n\n\t\t// Load the profile ID (so that we can find out the output directory)\n\t\t$profile_id = $data['profile_id'];\n\t\tAEPlatform::load_configuration($profile_id);\n\n\t\t$path = $data['absolute_path'];\n\t\t$exists = @file_exists($path);\n\t\tif(!$exists)\n\t\t{\n\t\t\t// Let's try figuring out an alternative path\n\t\t\t$config =& AEFactory::getConfiguration();\n\t\t\t$path = $config->get('akeeba.basic.output_directory', '').DS.$data['archivename'];\n\t\t\t$exists = @file_exists($path);\n\t\t}\n\n\t\tif(!$exists)\n\t\t{\n\t\t\treturn JText::_('RESTORE_ERROR_ARCHIVE_MISSING');\n\t\t}\n\n\t\t$filename = basename($path);\n\t\t$lastdot = strrpos($filename, '.');\n\t\t$extension = strtoupper( substr($filename, $lastdot+1) );\n\t\tif( !in_array($extension, array('JPA','ZIP')) )\n\t\t{\n\t\t\treturn JText::_('RESTORE_ERROR_INVALID_TYPE');\n\t\t}\n\n\t\t$this->data =& $data;\n\t\t$this->path = $path;\n\t\t$this->extension = $extension;\n\n\t\treturn true;\n\t}", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function after_restore(){\n \tglobal $DB;\n \t\n \t\n \t$pagemenuid = $this->get_activityid();\n\n \tif ($modulelinks = $DB->get_records('pagemenu_links', array('pagemenuid' => $pagemenuid))){\n \t\tforeach($modulelinks as $ml){\n \t\t\t\n \t\t\t$ml->previd = $this->get_mappingid('pagemenu_links', $ml->previd);\n \t\t\t$ml->nextid = $this->get_mappingid('pagemenu_links', $ml->nextid);\n\n\t\t\t\tif ($ml->type == 'module'){\n\t \t\t\tif ($link = $DB->get_record('pagemenu_link_data', array('linkid' => $ml->id))){\n\t \t\t\t\t$link->value = $this->get_mappingid('course_module', $link->value);\n\t \t\t\t\t$DB->update_record('pagemenu_link_data', $link);\n\t \t\t\t} else {\n\t\t\t\t\t\t$this->get_logger()->process(\"Failed to restore dependency for pagemenu link '$ml->name'. \", backup::LOG_ERROR); \t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$DB->update_record('pagemenu_links', $ml);\n \t\t}\n \t} \t \t\n }", "public function endtrans(){\n\t\tif($this->transaction){\n\t\t\t$this->query(\"COMMIT\");\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t$this->query(\"ROLLBACK\");\n\t\t\treturn false;\n\t\t}\n\t}", "function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }", "public function transcodingComplete() {\n\t\tif($this->MP4ID && $this->WEBMID && $this->OGVID){ return true; }\n\t\treturn false;\n\t}", "public function restore($id): bool;", "public function restored(Credit $credit)\n {\n //\n }", "public function after_restore($restore) {\n global $DB;\n\n $data = $this->get_decoded_data();\n if ($newitem = \\restore_dbops::get_backup_ids_record($restore->get_restoreid(), 'course_module', $data->dateitem)) {\n $data->dateitem = $newitem->newitemid;\n try {\n $DB->set_field('customcert_elements', 'data', $this->save_unique_data($data), array('id' => $this->get_id()));\n } catch (\\dml_exception $e) {\n unset($e);\n }\n }\n }", "public function testReset()\n {\n $this->assertFalse(\n SmsVerification::of($this->config)->reset('+456')\n );\n\n // Assert true when there is value cached\n $this->assertTrue(\n SmsVerification::of($this->config)->reset('+123')\n );\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "function updateRestore_confirm_confirm($param)\n\t{\n\n\t\tdprintr($param);\n\n\t\t$this->updateBackupRestore($param, \"restore\");\n\n\t//\tif (csa($file, \"__lx_temperoryftp_file\")) { unlink($file); }\n\t}", "public function recoverFromCorruption()\n {\n }", "public function isSuccessful() {\n\t\t$status = $this->checkReturnHashPayment();\n\t\tif ($status !== true) {\n\t\t\t$this->message = $status;\n\t\t}\n\t\treturn $status === true;\n\t}", "public function restore(): bool\n {\n return false;\n }", "public function testAttemptsToRestoreValidRGPDomainWithInvalidRestoreCodeReturnsFailedTransaction() {\n $domainName = $this->api->test()->createRGPDomain();\n\n // Restore a bad domain\n $transaction = $this->api->domains()->restore($domainName, \"65646463\", 3);\n\n $this->assertEquals(\"ALL_ELEMENTS_FAILED\", $transaction->getTransactionStatus());\n\n $element = $transaction->getTransactionElements()[$domainName];\n $this->assertEquals(\"FAILED\", $element->getElementStatus());\n $this->assertEquals(array(\"RESTORE_INVALID_CODE\"), array_keys($element->getElementErrors()));\n\n\n }", "public function sendRestoreEmail();", "public function isSuccessful()\n {\n return (0 == $this->code);\n }", "public function restoreAction() {\n\n $blockVersionDatas = $this->getRequest()->getParams();\n\n //On charge la page correspondante\n $block = Mage::getModel('cms/block')->load($blockVersionDatas['block_id']);\n\n // On mets à jour les données avec les valeurs de notre version de page\n $block->setTitle($blockVersionDatas['title']);\n $block->setIdentifier($blockVersionDatas['identifier']);\n $block->setContent($blockVersionDatas['page_content']);\n\n if (preg_match(',', $blockVersionDatas['stores']))\n $block->setStores(explode(',', $blockVersionDatas['stores']));\n else\n $block->setStores(array($blockVersionDatas['stores']));\n\n try {\n $block->save();\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n die();\n }\n\n //Ajout du message de confirmation et redirection\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('Hhennes_CmsVersions')->__('Block version restored with success'));\n $this->_redirect('*/*/');\n }", "public function rollback()\n {\n set_time_limit(0);\n ignore_user_abort(true);\n\n $this->_lastOperationSucceed = false;\n\n $archiveManager = new Archive();\n $source = $archiveManager->unpack($this->getBackupPath(), $this->getBackupsDir());\n\n $file = new File($source);\n foreach ($file as $statement) {\n $this->getResourceModel()->runCommand($statement);\n }\n if ($this->keepSourceFile() === false) {\n @unlink($source);\n }\n\n $this->_lastOperationSucceed = true;\n\n return true;\n }", "public function resume(): bool\n {\n if ($this->values->offsetExists('principal')) {\n $this->principal = $this->values->get('principal');\n\n $this->logger->info(\n \"Authentication resume: {user}\",\n ['user' => $this->principal]\n );\n $this->publishResume($this->principal, $this->values);\n\n $this->values->offsetSet('lastActive', microtime(true));\n\n return true;\n }\n return false;\n }", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }", "public function restore($class_id)\n {\n try {\n $class = Classes::withTrashed()->find($class_id)->restore();\n if ($class) { //Check if data was updated\n return true;\n } else {\n return false;\n }\n } catch(\\Exception $err){\n Log::error('message error in restore on RoleRepository :'. $err->getMessage());\n return back()->with('error', $err->getMessage());\n }\n}", "public function test_coursemodule_restore_with_userdata($settings) {\n // Force configuration changes from provider.\n foreach ($settings as $setting) {\n // Need to create a directory for backup_auto_destination.\n if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {\n $setting->value = make_request_directory();\n }\n set_config($setting->name, $setting->value, $setting->plugin);\n }\n\n $student = $this->getDataGenerator()->create_and_enrol($this->course, 'student');\n $this->setUser($student);\n\n set_config('backup_auto_users', true, 'backup');\n $this->create_quiz_attempt($this->quiz, $student);\n\n // Delete quiz.\n $cm = get_coursemodule_from_instance('quiz', $this->quiz->id);\n course_delete_module($cm->id);\n phpunit_util::run_all_adhoc_tasks();\n $quizzes = get_coursemodules_in_course('quiz', $this->course->id);\n $this->assertEquals(0, count($quizzes));\n\n // Restore quiz.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->restore_item($item);\n }\n $quizzes = get_coursemodules_in_course('quiz', $this->course->id);\n $this->assertEquals(1, count($quizzes));\n $cm = array_pop($quizzes);\n\n // Check if user quiz attempt data is restored.\n $attempts = quiz_get_user_attempts($cm->instance, $student->id);\n $this->assertEquals(1, count($attempts));\n $attempt = array_pop($attempts);\n $attemptobj = quiz_attempt::create($attempt->id);\n $this->assertEquals($student->id, $attemptobj->get_userid());\n $this->assertEquals(true, $attemptobj->is_finished());\n }", "public function restore()\n {\n //\n }", "public function restore() {\n $uuid = $this->request->getParam('uuid', 0);\n $depositFile = $this->mapper->findByUuid($uuid);\n if (!$depositFile) {\n return new DataResponse([\n 'status' => 'error',\n 'message' => 'The requested file does not exist.',\n ]);\n }\n if ($this->user->getUID() !== $depositFile->getUserId()) {\n return new DataResponse([\n 'status' => 'error',\n 'message' => 'Only the owner of a deposit may initiate restore.',\n ]);\n }\n $depositFile->setPlnStatus('restore');\n $this->mapper->update($depositFile);\n return new DataResponse(array(\n 'status' => 'success',\n 'message' => \"The deposit has been added to the restore queue.\",\n ));\n }", "public function cancelarTransaccion() {\n $this->ejecutar(\"ROLLBACK\");\n return false;\n }", "public function testSubscriptionPurchaseCancelSuccess()\n {\n $user = factory(\\App\\Models\\User::class)->make([\n 'id' => Str::uuid()->toString(),\n 'name' => 'Test User',\n 'email' => '[email protected]'\n ]);\n $user->tasksheetSubscription()->save(factory(\\App\\Models\\UserTasksheetSubscription::class)->make([\n 'type' => 'MONTHLY',\n 'billingDayOfMonth' => 15,\n 'subscriptionStartDate' => CarbonImmutable::now()->addDays(-10),\n 'subscriptionEndDate' => null,\n 'trialStartDate' => CarbonImmutable::now()->addDays(-15),\n 'trialEndDate' => CarbonImmutable::now()->addDays(15),\n ]));\n\n $subscriptionEndDate = CarbonImmutable::now();\n\n $purchaseController = new UserSubscriptionPurchaseController;\n $purchaseController->subscriptionCancelMonthlySuccess($user, $subscriptionEndDate);\n\n $userSubscriptionEndDate = new CarbonImmutable($user->tasksheetSubscription->subscriptionEndDate);\n $expectedUserSubscriptionEndDate = new CarbonImmutable($subscriptionEndDate); \n\n $this->assertSame(\n $user->tasksheetSubscription->type, \n 'MONTHLY_EXPIRED'\n );\n $this->assertSame(\n $userSubscriptionEndDate->dayOfYear, \n $expectedUserSubscriptionEndDate->dayOfYear\n );\n $this->assertSame(\n $user->tasksheetSubscription->billingDayOfMonth,\n null \n );\n }", "public function restore()\n {\n }", "protected function after_restore_course() {\n // Add tool_carcastc related files, no need to maching itemname with itemid.\n $this->add_related_files('tool_carcastc', 'rowfile', 'itemid');\n }", "public function afterRestoreResponse($data)\n {\n }", "protected function _actionUnverify($context)\n {\n $context->response->status = KHttpResponse::RESET_CONTENT;\n $this->getItem()->unverify();\n return;\n }", "abstract protected function isSuccessfullFinished($output);", "public function restored(Remission $remission)\n {\n //\n }", "public function restore(User $user, Module $module)\n {\n return $user->hasPermission('restore-moui-module');\n }", "public function restored(Certificates $certificates)\n {\n //\n }", "public function testCadesSignAndCoSignFromResult()\r\n {\r\n $this->_testCadesSignAndCoSignFromResult(false);\r\n }", "public function restore() {}", "public function finishAction()\n\t{\n\t\tif ($this->isExportCompleted && !$this->isCloudAvailable)\n\t\t{\n\t\t\t// adjust completed local file size\n\t\t\t$this->fileSize = $this->getSizeTempFile();\n\t\t}\n\n\t\t$result = $this->preformAnswer(self::ACTION_FINISH);\n\n\t\t$result['STATUS'] = self::STATUS_COMPLETED;\n\n\t\treturn $result;\n\t}", "function recover() {\n\t}", "public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }", "public function restored(TraHangNhaCungCap $traHangNhaCungCap)\n {\n //\n }", "public function exit_recovery_mode()\n {\n }", "function verifyOrRollback($result, $message) {\n\t\tif (!$result) {\n\t\t\tmysql_query(\"ROLLBACK\");\n\t\t\theader(\"Status: 400 \" . $message );\n\t\t\texit(0);\n\t\t}\n\t}", "public function isSuccess()\n {\n return $this->getResult() == self::RESULT_OK;\n }", "public function isSuccessful()\n {\n return 0 === $this->getExitCode();\n }", "public function should_succeed_when_snapshots_are_equal(): void\n {\n $prev = new DirectorySnapshot(codecept_root_dir('tests/_support'));\n $snapshot = $prev->snapshotFileName();\n codecept_debug('Snapshot file: ' . $snapshot);\n $this->unlinkAfter[] = $snapshot;\n $prev->assert();\n\n $dirSnapshot = new DirectorySnapshot(codecept_root_dir('tests/_support'));\n $dirSnapshot->setSnapshotFileName($snapshot);\n\n $dirSnapshot->assert();\n }", "public function getRestore(){\n\t\treturn $this->restore;\n\t}", "public function rollback(): bool {\n\t\tif ($this->transactionCounter === 1) {\n\t\t\t$this->transactionCounter = 0;\n\n\t\t\treturn \\Covex\\Stream\\FileSystem::unregister($this->protocolName);\n\t\t}\n\n\t\treturn false;\n\t}", "public function doneSucceed()\r\n {\r\n $progress = app()->make(Progress::class);\r\n $progress->reset();\r\n\r\n app('antares.messages')->add('success', trans('Installation is completed. Now you can login to administration area.'));\r\n return $this->redirect(handles('antares::install/completed'));\r\n }", "public function recover();", "public function restore(User $user, Role $role)\n {\n return $user->hasPermission('restore-moui-role');\n }", "public function isSuccessful() {\n return (2 === $this->getStatusClass());\n }", "public function successAction() {\n \n //Grab the database ID\n $collection = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->getCollection();\n $collection->addFilter('transactionunique', $_POST['transactionUnique']);\n $transrow = $collection->toArray();\n \n //Grab the database ID\n \n if( isset( $transrow['items'][0]['id'] ) ){\n \n $transid = $transrow['items'][0]['id'];\n \n }else{\n \n $transid = false;\n \n }\n\n if( $transid ){\n \n //We have a transaction ID\n \n $trans = $transrow['items'][0];\n \n // Get the last four of the card used.\n if( isset( $_POST['cardNumberMask'] ) ){\n \n $lastfour = substr($_POST['cardNumberMask'], -4, strlen($_POST['cardNumberMask']) );\n \n }else{\n \n $lastfour = false;\n \n }\n \n //If threeDSEnrolled has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSEnrolled'] ) ){\n \n $threeDSEnrolled = $_POST['threeDSEnrolled'];\n \n }else{\n \n $threeDSEnrolled = false;\n \n }\n \n //If threeDSAuthenticated has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSAuthenticated'] ) ){\n \n $threeDSAuthenticated = $_POST['threeDSAuthenticated'];\n \n }else{\n \n $threeDSAuthenticated = false;\n \n }\n \n //If cardType has been sent, insert it into the database. Otherwise, insert nothing.\n if( isset( $_POST['cardType'] ) ){\n \n $cardType = $_POST['cardType'];\n \n }else{\n \n $cardType = false;\n \n }\n \n //Update the database with the transaction result\n $trn = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->loadById( $trans['id'] );\n $trn->setxref( $_POST['xref'] )\n ->setresponsecode( $_POST['responseCode'] )\n ->setmessage( $_POST['responseMessage'] )\n ->setthreedsenrolled( $threeDSEnrolled )\n ->setthreedsauthenticated( $threeDSAuthenticated )\n ->setlastfour( $lastfour )\n ->setcardtype( $cardType )\n ->save();\n\n if( $_POST['responseCode'] === \"0\") {\n\n if( $_POST['amountReceived'] == $trans['amount'] ){\n\n //Load order\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n $order->sendNewOrderEmail();\n $order->true;\n\n if( !$order->canInvoice() ) {\n\n //Add order comment and update status - Although we cant invoice, its important to record the transaction outcome.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save();\n\n //when order cannot create invoice, need to have some logic to take care\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('CardstreamHosted')->__('Order cannot create invoice')\n );\n\n }else{\n\n //need to save transaction id\n $order->getPayment()->setTransactionId( $_POST['xref'] );\n $order->save();\n $converter = Mage::getModel('sales/convert_order');\n $invoice = $converter->toInvoice($order);\n\n foreach($order->getAllItems() as $orderItem) {\n\n if(!$orderItem->getQtyToInvoice()) {\n continue;\n }\n\n $item = $converter->itemToInvoiceItem($orderItem);\n $item->setQty($orderItem->getQtyToInvoice());\n $invoice->addItem($item);\n }\n\n $invoice->collectTotals();\n $invoice->register()->capture();\n $CommentData = \"Invoice \" . $invoice->getIncrementId() . \" was created\";\n\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n\n $order->save();\n\n }\n\n }\n\n $this->_redirect('checkout/onepage/success');\n\n }else{\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"The amount paid did not match the amount due.\", 0);\n\n $order->save();\n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $message = \"The amount paid did not match the amount due. Please contact us for more information\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n\n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/unsuccessfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save(); \n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $this->loadLayout();\n\n $block = $this->getLayout()->createBlock(\n 'Mage_Core_Block_Template',\n 'CardstreamHosted/standard_failure',\n array('template' => 'CardstreamHosted/standard/failure.phtml')\n );\n\n $this->getLayout()->getBlock('content')->append($block);\n\n $this->renderLayout();\n \n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( Mage::getSingleton('checkout/session')->getCardstreamHostedOrderId() );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"Unable to locate the transaction in the CardstreamHosted table\", 0);\n $order->save(); \n\n }\n \n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( Mage::getSingleton('checkout/session')->getCardstreamHostedQuoteId() );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n \n $message = \"Unable to locate transaction. Please contact us for payment status.\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n \n }\n \n }", "public function restored(Installment $installment)\n {\n //\n }", "public function restored(TradeCancel $tradeCancel)\n {\n //\n }", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "public function testSuccess()\n {\n $this->_package->success(\"Successful test\");\n $this->assertTrue($this->_result->wasSuccessful());\n }", "public function prepare_restore() {\n\n\t\tglobal $updraftplus;\n\n\t\t// on restore start job_id is empty but if we needed file system permissions or this is a resumption then we have already started a job so reuse it\n\t\t$restore_job_id = empty($_REQUEST['job_id']) ? false : $_REQUEST['job_id'];\n\n\t\t// Set up nonces, log files etc.\n\t\t$updraftplus->initiate_restore_job($restore_job_id);\n\t\t\n\t\t// If this is the start of a restore then get the restore data from the posted data and put it into jobdata.\n\t\tif (isset($_REQUEST['action']) && 'updraft_restore' == $_REQUEST['action']) {\n\t\t\t\n\t\t\tif (empty($restore_job_id)) {\n\t\t\t\t$jobdata_to_save = array();\n\t\t\t\tforeach ($_REQUEST as $key => $value) {\n\t\t\t\t\tif (false !== strpos($key, 'updraft_') || 'backup_timestamp' == $key || 'meta_foreign' == $key) {\n\t\t\t\t\t\tif ('updraft_restorer_restore_options' == $key) parse_str(stripslashes($value), $value);\n\t\t\t\t\t\t$jobdata_to_save[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isset($jobdata_to_save['updraft_restorer_restore_options']['updraft_restore_table_options']) && !empty($jobdata_to_save['updraft_restorer_restore_options']['updraft_restore_table_options'])) {\n\t\t\t\t\t\n\t\t\t\t\t$restore_table_options = $jobdata_to_save['updraft_restorer_restore_options']['updraft_restore_table_options'];\n\t\t\t\t\t\n\t\t\t\t\t$include_unspecified_tables = false;\n\t\t\t\t\t$tables_to_restore = array();\n\t\t\t\t\t$tables_to_skip = array();\n\n\t\t\t\t\tforeach ($restore_table_options as $table) {\n\t\t\t\t\t\tif ('udp_all_other_tables' == $table) {\n\t\t\t\t\t\t\t$include_unspecified_tables = true;\n\t\t\t\t\t\t} elseif ('udp-skip-table-' == substr($table, 0, 15)) {\n\t\t\t\t\t\t\t$tables_to_skip[] = substr($table, 15);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tables_to_restore[] = $table;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$jobdata_to_save['updraft_restorer_restore_options']['include_unspecified_tables'] = $include_unspecified_tables;\n\t\t\t\t\t$jobdata_to_save['updraft_restorer_restore_options']['tables_to_restore'] = $tables_to_restore;\n\t\t\t\t\t$jobdata_to_save['updraft_restorer_restore_options']['tables_to_skip'] = $tables_to_skip;\n\t\t\t\t\tunset($jobdata_to_save['updraft_restorer_restore_options']['updraft_restore_table_options']);\n\t\t\t\t}\n\n\t\t\t\t$updraftplus->jobdata_set_multi($jobdata_to_save);\n\n\t\t\t\t// Use a site option, as otherwise on multisite when all the array of options is updated via UpdraftPlus_Options::update_site_option(), it will over-write any restored UD options from the backup\n\t\t\t\tupdate_site_option('updraft_restore_in_progress', $updraftplus->nonce);\n\t\t\t}\n\t\t}\n\n\t\t// If this is the start of an ajax restore then end execution here so it can then be booted over ajax\n\t\tif (isset($_REQUEST['updraftplus_ajax_restore']) && 'start_ajax_restore' == $_REQUEST['updraftplus_ajax_restore']) {\n\t\t\t// return to prevent any more code from running\n\t\t\treturn $this->prepare_ajax_restore();\n\n\t\t} elseif (isset($_REQUEST['updraftplus_ajax_restore']) && 'continue_ajax_restore' == $_REQUEST['updraftplus_ajax_restore']) {\n\t\t\t// If we enter here then in order to restore we needed to require the filesystem credentials we should save these before returning back to the browser and load them back after the AJAX call, this prevents us asking for the filesystem credentials again\n\t\t\t$filesystem_credentials = array(\n\t\t\t\t'hostname' => '',\n\t\t\t\t'username' => '',\n\t\t\t\t'password' => '',\n\t\t\t\t'connection_type' => '',\n\t\t\t\t'upgrade' => '',\n\t\t\t);\n\n\t\t\t$credentials_found = false;\n\n\t\t\tforeach ($_REQUEST as $key => $value) {\n\t\t\t\tif (array_key_exists($key, $filesystem_credentials)) {\n\t\t\t\t\t$filesystem_credentials[$key] = stripslashes($value);\n\t\t\t\t\t$credentials_found = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($credentials_found) $updraftplus->jobdata_set('filesystem_credentials', $filesystem_credentials);\n\n\t\t\t// return to prevent any more code from running\n\t\t\treturn $this->prepare_ajax_restore();\n\t\t}\n\n\t\tif (!empty($_REQUEST['updraftplus_ajax_restore'])) add_filter('updraftplus_logline', array($this, 'updraftplus_logline'), 10, 5);\n\t\t\n\t\t$is_continuation = ('updraft_ajaxrestore_continue' == $_REQUEST['action']) ? true : false;\n\n\t\tif ($is_continuation) {\n\t\t\t$restore_in_progress = get_site_option('updraft_restore_in_progress');\n\t\t\tif ($restore_in_progress != $_REQUEST['job_id']) {\n\t\t\t\t$abort_restore_already = true;\n\t\t\t\t$updraftplus->log(__('Sufficient information about the in-progress restoration operation could not be found.', 'updraftplus') . ' (job_id_mismatch)', 'error', 'job_id_mismatch');\n\t\t\t} else {\n\t\t\t\t$restore_jobdata = $updraftplus->jobdata_getarray($restore_in_progress);\n\t\t\t\tif (is_array($restore_jobdata) && isset($restore_jobdata['job_type']) && 'restore' == $restore_jobdata['job_type'] && isset($restore_jobdata['second_loop_entities']) && !empty($restore_jobdata['second_loop_entities']) && isset($restore_jobdata['job_time_ms']) && isset($restore_jobdata['backup_timestamp'])) {\n\t\t\t\t\t$backup_timestamp = $restore_jobdata['backup_timestamp'];\n\t\t\t\t\t$continuation_data = $restore_jobdata;\n\t\t\t\t\t$continuation_data['updraftplus_ajax_restore'] = 'continue_ajax_restore';\n\t\t\t\t} else {\n\t\t\t\t\t$abort_restore_already = true;\n\t\t\t\t\t$updraftplus->log(__('Sufficient information about the in-progress restoration operation could not be found.', 'updraftplus') . ' (job_id_nojobdata)', 'error', 'job_id_nojobdata');\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (isset($_REQUEST['updraftplus_ajax_restore']) && 'do_ajax_restore' == $_REQUEST['updraftplus_ajax_restore']) {\n\t\t\t$backup_timestamp = $updraftplus->jobdata_get('backup_timestamp');\n\t\t\t$continuation_data = array('updraftplus_ajax_restore' => 'do_ajax_restore');\n\t\t} else {\n\t\t\t$backup_timestamp = $_REQUEST['backup_timestamp'];\n\t\t\t$continuation_data = null;\n\t\t}\n\n\t\t$filesystem_credentials = $updraftplus->jobdata_get('filesystem_credentials', array());\n\n\t\tif (!empty($filesystem_credentials)) {\n\t\t\t$continuation_data['updraftplus_ajax_restore'] = 'continue_ajax_restore';\n\t\t\t// If the filesystem credentials are not empty then we now need to load these back into $_POST so that WP_Filesystem can access them\n\t\t\tforeach ($filesystem_credentials as $key => $value) {\n\t\t\t\t$_POST[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif (empty($abort_restore_already)) {\n\t\t\t$backup_success = $this->restore_backup($backup_timestamp, $continuation_data);\n\t\t} else {\n\t\t\t$backup_success = false;\n\t\t}\n\n\t\tif (empty($updraftplus->errors) && true === $backup_success) {\n\t\t\t// TODO: Deal with the case of some of the work having been deferred\n\t\t\techo '<p class=\"updraft_restore_successful\"><strong>';\n\t\t\t$updraftplus->log_e('Restore successful!');\n\t\t\techo '</strong></p>';\n\t\t\t$updraftplus->log('Restore successful');\n\t\t\t$s_val = 1;\n\t\t\tif (!empty($this->entities_to_restore) && is_array($this->entities_to_restore)) {\n\t\t\t\tforeach ($this->entities_to_restore as $v) {\n\t\t\t\t\tif ('db' != $v) $s_val = 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$pval = $updraftplus->have_addons ? 1 : 0;\n\n\t\t\techo '<strong>' . __('Actions', 'updraftplus') . ':</strong> <a href=\"' . UpdraftPlus_Options::admin_page_url() . '?page=updraftplus&updraft_restore_success=' . $s_val . '&pval=' . $pval . '\">' . __('Return to UpdraftPlus configuration', 'updraftplus') . '</a>';\n\t\t\treturn;\n\n\t\t} elseif (is_wp_error($backup_success)) {\n\t\t\techo '<p class=\"updraft_restore_error\">';\n\t\t\t$updraftplus->log_e('Restore failed...');\n\t\t\techo '</p>';\n\t\t\t$updraftplus->log_wp_error($backup_success);\n\t\t\t$updraftplus->log('Restore failed');\n\t\t\techo '<div class=\"updraft_restore_errors\">';\n\t\t\t$updraftplus->list_errors();\n\t\t\techo '</div>';\n\t\t\techo '<strong>' . __('Actions', 'updraftplus') . ':</strong> <a href=\"' . UpdraftPlus_Options::admin_page_url() . '?page=updraftplus\">' . __('Return to UpdraftPlus configuration', 'updraftplus') . '</a>';\n\t\t\treturn;\n\t\t} elseif (false === $backup_success) {\n\t\t\t// This means, \"not yet - but stay on the page because we may be able to do it later, e.g. if the user types in the requested information\"\n\t\t\techo '<p class=\"updraft_restore_error\">';\n\t\t\t$updraftplus->log_e('Restore failed...');\n\t\t\techo '</p>';\n\t\t\t$updraftplus->log(\"Restore failed\");\n\t\t\techo '<div class=\"updraft_restore_errors\">';\n\t\t\t$updraftplus->list_errors();\n\t\t\techo '</div>';\n\t\t\techo '<strong>' . __('Actions', 'updraftplus') . ':</strong> <a href=\"' . UpdraftPlus_Options::admin_page_url() . '?page=updraftplus\">' . __('Return to UpdraftPlus configuration', 'updraftplus') . '</a>';\n\t\t\treturn;\n\t\t}\n\t}", "public function isRequestSuccessful()\n {\n return strtolower($this->transaction->getMessages()->getResultCode()) === 'ok';\n }", "function restore()\n {\n }", "public function storeSucceed()\r\n {\r\n return redirect()->to(handles('antares::install/components'));\r\n }", "function trans_complete()\r\n\t{\r\n\t\treturn $this->db->trans_complete();\r\n\t}", "public function isSuccess();", "public function isSuccess();" ]
[ "0.6416231", "0.6049549", "0.6006898", "0.5812048", "0.57552874", "0.5680208", "0.5574116", "0.5537464", "0.55361307", "0.54596514", "0.5448089", "0.53727376", "0.53646904", "0.53248435", "0.5281273", "0.5278927", "0.5262136", "0.52608436", "0.5260694", "0.52380925", "0.52371126", "0.5227536", "0.52203184", "0.52144665", "0.518461", "0.51706505", "0.51569164", "0.5153164", "0.5145497", "0.51154596", "0.5046238", "0.50317293", "0.50109625", "0.50109625", "0.50109625", "0.49954692", "0.49943122", "0.49902555", "0.4987562", "0.49819255", "0.49687344", "0.49679875", "0.49674723", "0.4964895", "0.4964895", "0.4964895", "0.49605173", "0.4960362", "0.49527827", "0.494447", "0.49364775", "0.491517", "0.49124938", "0.49036604", "0.49024013", "0.48967814", "0.48961812", "0.4889008", "0.48832345", "0.4874312", "0.487148", "0.48680353", "0.4866601", "0.48592505", "0.48579004", "0.48495784", "0.4835862", "0.4833095", "0.48287225", "0.48242536", "0.48133892", "0.48069257", "0.4797014", "0.47954562", "0.47915983", "0.478918", "0.4782232", "0.47804353", "0.4776641", "0.47714624", "0.47693086", "0.47661024", "0.4758867", "0.4757886", "0.4754177", "0.47501042", "0.4742323", "0.47400653", "0.47257918", "0.47256604", "0.47232732", "0.47217897", "0.47131282", "0.47096813", "0.47071046", "0.4706036", "0.47057655", "0.47008497", "0.468953", "0.4681826", "0.4681826" ]
0.0
-1
Sync the modified host/service objects Runs after CCM host or service is saved Runs after Bulk Renaming Tool is saved
function recurringdowntime_ccm_hostservice_sync($cbtype, &$cbargs) { $cfg = recurringdowntime_get_cfg(); $pending = recurringdowntime_get_pending_changes(); // Check if the object is part of the pending changes foreach ($pending as $i => $p) { if ($p['object_id'] == $cbargs['id']) { $tmp = $p; if ($cbargs['type'] == 'host') { $tmp['host_name'] = $cbargs['host_name']; } else if ($cbargs['type'] == 'service') { $tmp['service_description'] = $cbargs['service_description']; } $pending[$i] = $tmp; recurringdowntime_update_pending_changes($pending); return; } } // Check if host name changed if ($cbargs['type'] == 'host') { // Check if host name changed if (!empty($cbargs['old_host_name']) && $cbargs['host_name'] != $cbargs['old_host_name']) { foreach ($cfg as $id => $c) { if ($c['schedule_type'] == 'host' || $c['schedule_type'] == 'service') { // Replace config host_name that used the old host name if ($c['host_name'] == $cbargs['old_host_name']) { $pending[] = array( 'cfg_id' => $id, 'object_id' => $cbargs['id'], 'host_name' => $cbargs['host_name'] ); } } } } // Check for service description change } else if ($cbargs['type'] == 'service') { // This one is complicated ... we will only do the hosts defined directly to the service if (!empty($cbargs['old_service_description']) && $cbargs['service_description'] != $cbargs['old_service_description']) { foreach ($cfg as $id => $c) { if (array_key_exists('service_description', $c) && $c['service_description'] == $cbargs['old_service_description']) { // Get all hosts attached to service $sql = "SELECT host_name FROM nagiosql.tbl_lnkServiceToHost AS lnk LEFT JOIN nagiosql.tbl_host AS h ON h.id = lnk.idSlave WHERE idMaster = ".intval($cbargs['id']).";"; if (!($rs = exec_sql_query(DB_NAGIOSQL, $sql))) { continue; } // Check all hosts against current cfg $arr = $rs->GetArray(); foreach ($arr as $a) { if ($c['host_name'] == $a['host_name']) { $pending[] = array( 'cfg_id' => $id, 'object_id' => $cbargs['id'], 'service_description' => $cbargs['service_description'] ); } } } } } } // Save pending changes recurringdowntime_update_pending_changes($pending); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function afterSyncing() {}", "public function run_sync_process(){\n //Verify if module is enabled\n if(Mage::helper('connector')->isEnabled()) {\n\n \t//Set sync type\n \t\t$sync_type = Minematic_Connector_Model_Config::SYNC_TYPE_MAGENTO_SIDE;\n\n //Log Starting sync process msg\n Mage::helper('connector')->logSyncProcess(\"Starting synchronization task job...\", $sync_type);\n\n try {\n\n //Sync all data\n Mage::getModel('connector/synchronization')->sync_data($sync_type, Minematic_Connector_Model_Config::DATA_TYPE_ALL);\n\n } catch (Exception $e) {\n\n \t// Logging Exceptions\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n \t\n }\n\n //Log Finishing sync process msg\n Mage::helper('connector')->logSyncProcess(\"Finishing synchronization task job.\", $sync_type);\n }\n }", "function reload_all_sync() {\n\tglobal $config;\n\n\t/* parse config.xml again */\n\t$config = parse_config(true);\n\n\t/* set up our timezone */\n\tsystem_timezone_configure();\n\n\t/* set up our hostname */\n\tsystem_hostname_configure();\n\n\t/* make hosts file */\n\tsystem_hosts_generate();\n\n\t/* generate resolv.conf */\n\tsystem_resolvconf_generate();\n\n\t/* enable routing */\n\tsystem_routing_enable();\n\n\t/* set up interfaces */\n\tinterfaces_configure();\n\n\t/* start dyndns service */\n\tservices_dyndns_configure();\n\n\t/* configure cron service */\n\tconfigure_cron();\n\n\t/* start the NTP client */\n\tsystem_ntp_configure();\n\n\t/* sync pw database */\n\tunlink_if_exists(\"/etc/spwd.db.tmp\");\n\tmwexec(\"/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd\");\n\n\t/* restart sshd */\n\tsend_event(\"service restart sshd\");\n\n\t/* restart webConfigurator if needed */\n\tsend_event(\"service restart webgui\");\n}", "public function performSyncOperation() {\n switch ($this->syncOperation) {\n case 'create':\n // Sets up the data array\n $data['LdapObject'] = $this->stagingData;\n $dn = 'uid' . '=' . $this->stagingData['uid'] . ',' . $this->LdapObject->getLdapContext();\n $data['LdapObject']['dn'] = $dn;\n $data['LdapObject']['objectclass'] = $this->ldapObjectClass;\n \n // Save the data\n $createResult = $this->LdapObject->save($data);\n \n if ($createResult) {\n $this->log('SYNC: Created LDAP Object: ' . $createResult['LdapObject']['dn'], LOG_INFO);\n // Sets the properties on the LdapObject for reporting the sync result\n $this->LdapObject->id = $dn;\n $this->LdapObject->primaryKey = 'dn';\n } else {\n $this->log('SYNC: Failed to create LDAP Object: ' . $dn . '. Salesforce ID: '. $this->sforceData['Id'] . '. LDAP Error: ' . $this->LdapObject->getLdapError() . '.', LOG_ERR);\n }\n break;\n case 'update':\n // Push everything to lower case, so String comparison will be accurate.\n $stagingObject = array_change_key_case($this->stagingData, CASE_LOWER);\n $ldapObject = array_change_key_case($this->ldapData, CASE_LOWER);\n // Diff the arrays. Should be efficient. Since we are doing a one way push from Salesforce\n // to LDAP, this also provides a clean way to get exactly the attributes we want to update.\n $diffObject = array_diff_assoc($stagingObject, $ldapObject);\n if (!empty($diffObject)) {\n $data['LdapObject'] = $diffObject;\n \n // Save the data\n $updateResult = $this->LdapObject->save($data);\n \n if ($updateResult) {\n $this->log('SYNC: Updated LDAP Object: ' . $this->LdapObject->id, LOG_INFO);\n } else {\n $this->log('SYNC: Failed to update LDAP Object: ' . $this->LdapObject->id, LOG_ERR);\n }\n } else {\n // Sets the sync operation, so unchanged records (which is the usual case) are separately reported\n $this->syncOperation = 'unchanged';\n $this->log('SYNC: LDAP Object ' . $this->LdapObject->id . ' left unchanged.', LOG_INFO);\n }\n break;\n case 'delete':\n $id = $this->LdapObject->id;\n $deleteResult = $this->LdapObject->delete($this->LdapObject->id);\n if ($deleteResult) {\n $this->log('SYNC: Deleted LDAP Object: ' . $id, LOG_INFO);\n // Sets id on the LdapObject for reporting the sync result\n $this->LdapObject->id = $id;\n } else {\n $this->log('SYNC: Failed to delete LDAP Object: ' . $id , LOG_ERR);\n $ldapError = $this->LdapObject->getLdapError();\n if (!empty($ldapError)) {\n $this->log($ldapError, LOG_ERR);\n }\n }\n break;\n case 'nothing':\n $this->log('SYNC: No action performed on record: ' . $this->sforceData['Id'], LOG_DEBUG);\n break;\n default:\n $this->log('SYNC: No operation found for Salesforce Id \"' . $this->sforceData['Id'] . '\". This object was not synced.', LOG_INFO);\n }\n }", "public function run()\r\n {\r\n $services = App\\service::all();\r\n\r\n foreach ($services as $service)\r\n {\r\n $service->stylists()->save(\\App\\service::find(1));\r\n $service->stylists()->save(\\App\\service::find(2));\r\n $service->stylists()->save(\\App\\service::find(3));\r\n }\r\n\r\n }", "public function applyChanges()\n {\n $em = $this->doctrine->getManager();\n $em->flush();\n\n // TODO: Can we be sure that the changes are available in the DB now?\n $ch = $this->getMasterRabbit()->channel();\n $msg = new AMQPMessage(\"sync\");\n $ch->basic_publish($msg, \"\", $this->name . \"_master\");\n }", "public static function syncActiveJobs()\n {\n $hosts = Host::getAll();\n\n foreach ($hosts as $Host) {\n\n // Get pending jobs for host\n $pendingJobs = static::getAllByWhere([\n 'Status' => 'pending',\n 'HostID' => $Host->ID\n ]);\n\n if (!$pendingJobs) {\n continue;\n }\n\n // Get active jobs from host\n $activeJobs = $Host->executeRequest('/jobs', 'GET')['jobs'];\n\n // Search active jobs for pending jobs to find updates\n foreach ($pendingJobs as $PendingJob) {\n\n // Update any lost jobs\n if (empty($activeJobs[$PendingJob->Site->Handle])) {\n $PendingJob->Status = 'failed';\n $PendingJob->Result = 'lost on server';\n if ($PendingJob->Site) {\n $PendingJob->Site->Updating = false;\n }\n $PendingJob->save();\n continue;\n }\n\n $activeJob = $activeJobs[$PendingJob->Site->Handle][$PendingJob->UID];\n\n if ($activeJob && $activeJob['status'] !== 'pending') {\n\n // Update job\n $PendingJob->Status = $activeJob['status'];\n if (!empty($activeJob['started'])) {\n $PendingJob->Started = $activeJob['started'] / 1000;\n }\n if (!empty($activeJob['completed'])) {\n $PendingJob->Completed = $activeJob['completed'] / 1000;\n }\n\n if (!empty($activeJob['command']['result'])) {\n if (strlen(json_encode($activeJob['command']['result'])) > 60000) {\n $PendingJob->Result = 'Output too long';\n } else {\n $PendingJob->Result = $activeJob['command']['result'];\n }\n } elseif (!empty($activeJob['message'])) {\n $PendingJob->Result = $activeJob['message'];\n }\n $PendingJob->save();\n\n // Update site on vfs update\n if ($PendingJob->Action == 'vfs-update') {\n\n // Get updated site record\n $Site = Site::getByID($PendingJob->SiteID);\n\n // Skip vfs-update actions on failed job\n if ($PendingJob->Status == 'failed') {\n $Site->Updating = false;\n $Site->save();\n continue;\n }\n\n // Update pending job's site\n $initialUpdate = !boolval($Site->ParentCursor);\n $Site->ParentCursor = $activeJob['command']['result']['parentCursor'];\n $Site->LocalCursor = $activeJob['command']['result']['localCursor'];\n $Site->Updating = false;\n $Site->save();\n\n // Conditionally update child site\n if (!empty($activeJob['command']['updateChild']) && $activeJob['command']['updateChild'] === true) {\n $childSites = Site::getAllByField('ParentSiteID', $Site->ID);\n foreach ($childSites as $ChildSite) {\n $ChildSite->requestFileSystemUpdate();\n }\n }\n\n // Fire initial vfs update event\n if ($initialUpdate) {\n \\Emergence\\EventBus::fireEvent(\n 'afterInitialVFSUpdate',\n $Site->getRootClass(),\n [\n 'Record' => $Site,\n 'Job' => $PendingJob\n ]\n );\n }\n }\n }\n }\n }\n }", "protected function resetSynchronised()\n {\n /*\n * Lists\n */\n\n /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */\n $lists = Mage::getModel('lapostaconnect/list')->getCollection();\n\n /** @var $list Laposta_Connect_Model_List */\n foreach ($lists as $list) {\n $list->setLapostaId('');\n $list->setWebhookToken('');\n $list->setSyncTime(null);\n }\n\n $lists->save();\n\n Mage::helper('lapostaconnect')->log('Lists reset OK.');\n\n /*\n * Fields\n */\n\n $fields = Mage::getModel('lapostaconnect/field')->getCollection();\n\n /** @var $field Laposta_Connect_Model_Field */\n foreach ($fields as $field) {\n $field->setLapostaId('');\n $field->setLapostaTag('');\n $field->setSyncTime(null);\n }\n\n $fields->save();\n\n Mage::helper('lapostaconnect')->log('Fields reset OK.');\n\n /*\n * Subscribers\n */\n\n /** @var $subscribers Laposta_Connect_Model_Mysql4_Subscriber_Collection */\n $subscribers = Mage::getModel('lapostaconnect/subscriber')->getCollection();\n\n /** @var $subscriber Laposta_Connect_Model_Subscriber */\n foreach ($subscribers as $subscriber) {\n $subscriber->setLapostaId('');\n $subscriber->setSyncTime(null);\n }\n\n $subscribers->save();\n\n Mage::helper('lapostaconnect')->log('Subscribers reset OK.');\n }", "public function postFlush(): void\n {\n try {\n foreach ($this->createdObjects as $object) {\n $this->publishUpdate($object, $this->createdObjects[$object], 'create');\n }\n\n foreach ($this->updatedObjects as $object) {\n $this->publishUpdate($object, $this->updatedObjects[$object], 'update');\n }\n\n foreach ($this->deletedObjects as $object) {\n $this->publishUpdate($object, $this->deletedObjects[$object], 'delete');\n }\n } finally {\n $this->reset();\n }\n }", "public function beforeSyncing() {}", "public function execute()\n {\n $this->cleanHistory();\n $this->log();\n $this->instanceManager->update($this->instance);\n }", "public function syncLdap()\n {\n $this->updateName();\n $this->updateEmail();\n $this->updateInfo();\n $this->save();\n }", "private function updateCustomSelfservicesDelta() {\n $importedSsIds = $this->getSelfservices(FALSE, ['uid' => 0]);\n\n $orderedSsTargets = [];\n if (!empty($importedSsIds)) {\n foreach ($importedSsIds as $id) {\n $orderedSsTargets[] = ['target_id' => $id];\n }\n\n $customSsIds = $this->getSelfservices(FALSE, ['uid' => [0, '<>']]);\n foreach ($customSsIds as $id) {\n $orderedSsTargets[] = ['target_id' => $id];\n }\n\n $this->set('os2web_borgerdk_selfservices', $orderedSsTargets);\n }\n }", "public function manualSync()\n {\n // Only run Auto Sync Jobs\n \n $job = Mage::getModel('mailup/job');\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n foreach($job->fetchManualSyncQueuedJobsCollection() as $job) {\n \n }\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n $triggerID = $this->ReadPropertyInteger('InputTriggerID');\n\n //Delete all registrations in order to readd them\n foreach ($this->GetMessageList() as $senderID => $messages) {\n foreach ($messages as $message) {\n $this->UnregisterMessage($senderID, $message);\n }\n }\n $this->RegisterMessage($triggerID, VM_UPDATE);\n\n if (method_exists($this, 'GetReferenceList')) {\n $refs = $this->GetReferenceList();\n foreach ($refs as $ref) {\n $this->UnregisterReference($ref);\n }\n\n $inputTriggerID = $this->ReadPropertyInteger('InputTriggerID');\n if ($inputTriggerID) {\n $this->RegisterReference($inputTriggerID);\n }\n\n $notificationLevels = json_decode($this->ReadPropertyString('NotificationLevels'), true);\n\n foreach ($notificationLevels as $notificationLevel) {\n foreach ($notificationLevel['actions'] as $action) {\n if ($action['recipientObjectID']) {\n $this->RegisterReference($action['recipientObjectID']);\n }\n }\n }\n }\n //Delete all associations\n $profile = IPS_GetVariableProfile('BN.Actions');\n foreach ($profile['Associations'] as $association) {\n IPS_SetVariableProfileAssociation('BN.Actions', $association['Value'], '', '', '-1');\n }\n //Setting the instance status\n $this->setInstanceStatus();\n\n //Set Associations\n if ($this->ReadPropertyBoolean('AdvancedResponse')) {\n //Return if action is not unique\n //Only important, if advanced response actions are used\n if ($this->GetStatus() != IS_ACTIVE) {\n return;\n }\n $responseActions = json_decode($this->ReadPropertyString('AdvancedResponseActions'), true);\n foreach ($responseActions as $responseAction) {\n IPS_SetVariableProfileAssociation('BN.Actions', $responseAction['Index'], $responseAction['CustomName'], '', '-1');\n }\n } else {\n IPS_SetVariableProfileAssociation('BN.Actions', 0, $this->Translate('Reset'), '', '-1');\n }\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "protected function after_execute() {\n $this->add_related_files('mod_activitystatus', 'default_background', null);\n $this->add_related_files('mod_activitystatus', 'default_status', null);\n $this->add_related_files('mod_activitystatus', 'modstatusimages', null);\n $this->add_related_files('mod_activitystatus', 'coursestatusimages', null);\n\n $oldmodid = $this->task->get_old_activityid();\n $newmodid = $this->task->get_old_moduleid();\n }", "public static function auth_ldap_sync_cron() {\n $auths = get_records_array('auth_instance', 'authname', 'ldap', 'id', 'id');\n if (!$auths) {\n return;\n }\n foreach ($auths as $auth) {\n /* @var $authobj AuthLdap */\n $authobj = AuthFactory::create($auth->id);\n // Each instance will decide for itself whether it should sync users and/or groups\n // User sync needs to be called before group sync in order for new users to wind\n // up in the correct groups\n $authobj->sync_users();\n $authobj->sync_groups();\n }\n }", "public function testUpdateServiceData()\n {\n\n }", "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "public function sync()\n {\n $result = '';\n foreach ($this->hosts() as $host) {\n $result .= $host;\n $result .= \"\\n\";\n }\n file_put_contents($this->configFilePath(), $result);\n }", "function sync() {\n\t\t// TODO\n\t}", "protected function _flushVars() {\n if (isset($this->LdapObject->id)) {\n $this->LdapObject->id = null;\n }\n if (isset($this->LdapObject->primaryKey)) {\n $this->LdapObject->primaryKey = 'uid';\n }\n \n $this->sforceData = array();\n $this->stagingData = array();\n $this->ldapData = array();\n $this->syncOperation = 'nothing';\n \n }", "public function applyServices(Host $host): void;", "public function testSyncEntitiesFromOneRemoteService()\n {\n $this->setupRemoteService();\n\n //Setup the synchonization configuration\n $this->setupConfiguration();\n\n //Setup the synchronization state\n $this->setSyncState();\n\n //Perform synchronization\n $this->manager->execute(array('product'));\n\n\n //Test if all requested entities have been synced\n $state = $this->manager->getState('product');\n\n $this->assertEquals($state->getLastValue(), 10);\n\n }", "function recurringdowntime_ccm_group_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'hostgroup') {\n $tmp['hostgroup_name'] = $cbargs['hostgroup_name'];\n } else if ($cbargs['type'] == 'servicegroup') {\n $tmp['servicegroup_name'] = $cbargs['servicegroup_name'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n if ($cbargs['type'] == 'hostgroup') {\n\n if ($cbargs['old_hostgroup_name'] != $cbargs['hostgroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('hostgroup_name', $c) && $c['hostgroup_name'] == $cbargs['old_hostgroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'hostgroup_name' => $cbargs['hostgroup_name']\n );\n }\n }\n }\n\n } else if ($cbargs['type'] == 'servicegroup') {\n\n if ($cbargs['old_servicegroup_name'] != $cbargs['servicegroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('servicegroup_name', $c) && $c['servicegroup_name'] == $cbargs['old_servicegroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'servicegroup_name' => $cbargs['servicegroup_name']\n );\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "protected function callAfterSuccessfulSave()\n\t{\n\t\tforeach($this->editFields as $f)\n\t\t{\n\t\t\t$this->getControl($f, $this->id)->afterSuccessfulSave();\n\t\t}\n\t}", "public function afterUpdate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"[email protected]\" => \"Admin GamanAds\"],\"Update Adspace\", 'updateadspace',\n // [ 'emailBody'=> \"Update Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }", "public function run()\n {\n $stores = Mage::app()->getStores();\n\n // get emulation model\n $appEmulation = Mage::getSingleton('core/app_emulation');\n\n foreach ($stores as $store) {\n // Start Store Emulation\n $environment = $appEmulation->startEnvironmentEmulation($store);\n\n $syncOrders = $this->getSyncOrders($store);\n\n foreach ($syncOrders as $syncOrder) {\n $this->sync($syncOrder);\n }\n\n // Stop Store Emulation\n $appEmulation->stopEnvironmentEmulation($environment);\n }\n }", "public function autoSync()\n {\n // Only run Auto Sync Jobs\n $job = Mage::getModel('mailup/job');\n /* @var $job MailUp_MailUpSync_Model_Job */\n \n foreach($job->fetchAutoSyncQueuedJobsCollection() as $job) {\n \n }\n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "public function run()\n {\n DB::table('hosts')->delete();\n $hosts = [\n [\n 'host_id' => 1,\n 'name' => 'PrivateGame',\n 'external_ip' => '40.114.196.95',\n ]\n ];\n DB::table('hosts')->insert($hosts);\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\t\n\t\tDB::table('services')->delete();\n\t\tDB::table('servers')->delete();\n\t\tDB::table('issues')->delete();\n\t\tDB::table('issue_service')->delete();\n\t\t\n\t\t$cache1 = new Service();\n\t\t$cache1->name = 'Varnish Cache #1';\n\t\t$cache1->type = 'image_cache';\n\t\t$cache1->save();\n\n\t\t$cache2 = new Service();\n\t\t$cache2->name = 'Varnish Cache #2';\n\t\t$cache2->type = 'image_cache';\n\t\t$cache2->save();\n\t\t\n\t\t$web = new Service();\n\t\t$web->name = 'Web Server';\n\t\t$web->type = 'web_server';\n\t\t$web->save();\n\t\t\n\t\t$db = new Service();\n\t\t$db->name = 'Database Server';\n\t\t$db->type = 'mysql';\n\t\t$db->save();\n\t\t\n\t\t\n\t\t$de_hz1 = new Server();\n\t\t$de_hz1->ip = '78.46.95.113';\n\t\t$de_hz1->name = 'Image Server #1';\n\t\t$de_hz1->hostname = 'de-hz1.cubeupload.com';\n\t\t$de_hz1->metric = 2;\n\t\t$de_hz1->save();\n\t\t\n\t\t$gb_rs1 = new Server();\n\t\t$gb_rs1->ip = '78.129.143.101';\n\t\t$gb_rs1->name = 'Image Server #2';\n\t\t$gb_rs1->hostname = 'gb-rs1.cubeupload.com';\n\t\t$gb_rs1->metric = 3;\n\t\t$gb_rs1->save();\n\t\t\n\t\t$gb_gd1 = new Server();\n\t\t$gb_gd1->ip = '109.70.149.133';\n\t\t$gb_gd1->name = 'Web Server';\n\t\t$gb_gd1->hostname = 'gb-gd1.cubeupload.com';\n\t\t$gb_gd1->metric = 1;\n\t\t$gb_gd1->save();\n\t\t\n\t\t$de_hz1->services()->save( $cache1 );\n\t\t$gb_rs1->services()->save( $cache2 );\n\t\t$gb_gd1->services()->save( $web );\n\t\t$gb_gd1->services()->save( $db );\n\t\t\n\t\t\n\t\t\n\t}", "public function setup_sync()\n {\n }", "public function updateAll() {\n $this->Corporations->update();\n $this->MemberTracking->update();\n $this->Facilities->update();\n $this->Industry->update();\n $this->Markets->update();\n $this->Contracts->update();\n $this->Wallet->update();\n $this->Assets->update();\n $this->Killmails->update();\n }", "function cps_changeset_publish_batch_finished($success, $results, $operations) {\n if ($success) {\n $changeset = $results['changeset'];\n // Set the publication time on the item. We have to GET the item somehow.\n $changeset->published = REQUEST_TIME;\n $changeset->setStatus(CPS_ARCHIVED_STATUS);\n if (variable_get('cps_override_variables', FALSE)) {\n\n // Rebuild the variables in the same manner that the cache is built from variable_initialize.\n $changeset->variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());\n // Go through and unset any whitelisted variables so that they aren't stored in the archive.\n foreach ($changeset->variables as $name => $value) {\n if (strpos($name, 'cache') !== FALSE) {\n unset($results['entity']->variables[$name]);\n }\n }\n }\n\n $changeset->save();\n\n module_invoke_all('cps_changeset_published', $changeset, 'published');\n\n // Switch them to the published changeset.\n cps_set_current_changeset(NULL);\n\n drupal_set_message(t('The site version %changeset has been published.', array('%changeset' => $changeset->name)));\n }\n\n cps_publish_unlock();\n}", "public function run()\n {\n return;\n /*\n *\n *\n\n UPDATE ims_uni_account_modules SET module = REPLACE(module, 'sz_yi', 'yun_shop');\n\n UPDATE ims_modules SET name = REPLACE(name, 'sz_yi', 'yun_shop');\n\n UPDATE ims_modules_bindings SET module = REPLACE(module, 'sz_yi', 'yun_shop');\n\n UPDATE ims_rule SET name = REPLACE(name, 'sz_yi', 'yun_shop'),module = REPLACE(module, 'sz_yi', 'yun_shop');\n\n UPDATE ims_rule_keyword SET module = REPLACE(module, 'sz_yi', 'yun_shop');\n\n UPDATE ims_users_permission SET type = REPLACE(type, 'sz_yi', 'yun_shop');\n\n UPDATE ims_cover_reply SET module = REPLACE(module, 'sz_yi', 'yun_shop');\n\n */\n\n }", "protected function afterUpdating()\n {\n }", "private function computeScheduleInsertsChangeSets()\n {\n foreach ($this->documentInsertions as $document) {\n $class = $this->dm->getClassMetadata(get_class($document));\n\n $this->computeChangeSet($class, $document);\n }\n }", "public function postImport() {\n parent::postImport();\n if (!civicrm_initialize()) {\n return;\n }\n // Need to clear the cache once the fields are created.\n civicrm_api3('system', 'flush', array('version' => 3));\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\t\n\t\tDB::table('services')->delete();\n\t\tDB::table('servers')->delete();\n\t\tDB::table('issues')->delete();\n\t\tDB::table('issue_service')->delete();\n\t\t\n\t\t// de-hz1.cubeupload.com\n\t\t$dehz1 = new Server();\n\t\t$dehz1->hostname = 'de-hz1.cubeupload.com';\n\t\t$dehz1->ip = '78.46.95.113';\n\t\t$dehz1->metric = 1;\n\t\t$dehz1->description = 'Varnish cache server';\n\t\t$dehz1->save();\n\n\t\t$http1 = new Service();\n\t\t$http1->name = 'httpd';\n\t\t$http1->friendly_name = 'HTTP';\n\t\t$dehz1->services()->save( $http1 );\n\t\n\t\t$sysadmin = new User();\n\t\t$sysadmin->username = 'sysadmin';\n\t\t$sysadmin->email = '[email protected]';\n\t\t$sysadmin->password = 'cubeupload';\n\t\t$sysadmin->enabled = true;\n\t\t$sysadmin->save();\n\n\t}", "private function computeScheduleInsertsChangeSets()\n {\n foreach ($this->entityInsertions as $entity) {\n $class = $this->manager->getClassMetadata(get_class($entity));\n $this->computeChangeSet($class, $entity);\n }\n }", "public function syncDataNode() {}", "public function run()\n {\n $roles = [\n [\n 'name' => 'admin'\n ],\n [\n 'name' => 'front'\n ]\n ];\n foreach ($roles as $role) {\n $this->roleService->updateOrCreate(['name' => $role['name']], $role);\n }\n }", "public function apply()\n {\n\n\n $files = 'start';\n //$load is empty as we will use the .default file to select the data directory\n $load = '';\n $reload = 1;\n \n $this->process->loadFiles($this->helper->getModuleName(),$load,explode(\",\",$files),$reload);\n \n }", "public function computeChangeSets()\n {\n // Compute changes for INSERTed entities first. This must always happen.\n $this->computeScheduleInsertsChangeSets();\n // Compute changes for other MANAGED entities. Change tracking policies take effect here.\n foreach ($this->identityMap as $className => $entities) {\n $class = $this->manager->getClassMetadata($className);\n // Skip class if instances are read-only\n if ($class->isReadOnly()) {\n continue;\n }\n // If change tracking is explicit or happens through notification, then only compute\n // changes on entities of that type that are explicitly marked for synchronization.\n switch (true) {\n case ($class->isChangeTrackingDeferredImplicit()):\n $entitiesToProcess = $entities;\n break;\n case (isset($this->scheduledForSynchronization[$className])):\n $entitiesToProcess = $this->scheduledForSynchronization[$className];\n break;\n default:\n $entitiesToProcess = [];\n }\n foreach ($entitiesToProcess as $entity) {\n // Ignore uninitialized proxy objects\n if ($entity instanceof Proxy && !$entity->__isInitialized__) {\n continue;\n }\n // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here.\n $oid = spl_object_hash($entity);\n if (!isset($this->entityInsertions[$oid]) &&\n !isset($this->entityDeletions[$oid]) &&\n isset($this->entityStates[$oid])\n ) {\n $this->computeChangeSet($class, $entity);\n }\n }\n }\n }", "public function syncMetadata() {}", "public function run()\n {\n $groups = config('groups');\n\n foreach ($groups as $group) {\n $new_group_obj = new Group();\n $new_group_obj->name = $group['name'];\n $new_group_obj->save();\n }\n }", "public function run()\n {\n $apartments = Apartment::all();\n\n foreach ($apartments as $apartment) {\n\n $services = Service::inRandomOrder()->take(rand(1, 6))->get();\n\n $apartment->services()->sync($services);\n }\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "function local_campusconnect_cron() {\n $ecslist = ecssettings::list_ecs();\n foreach ($ecslist as $ecsid => $name) {\n $ecssettings = new ecssettings($ecsid);\n\n if ($ecssettings->time_for_cron()) {\n mtrace(\"Checking for updates on ECS server '\".$ecssettings->get_name().\"'\");\n $connect = new connect($ecssettings);\n $queue = new receivequeue();\n\n try {\n $queue->update_from_ecs($connect);\n $queue->process_queue($ecssettings);\n } catch (connect_exception $e) {\n local_campusconnect_ecs_error_notification($ecssettings, $e->getMessage());\n }\n\n mtrace(\"Sending updates to ECS server '\".$ecssettings->get_name().\"'\");\n try {\n export::update_ecs($connect);\n course_url::update_ecs($connect);\n enrolment::update_ecs($connect);\n } catch (connect_exception $e) {\n local_campusconnect_ecs_error_notification($ecssettings, $e->getMessage());\n }\n\n $cms = participantsettings::get_cms_participant();\n if ($cms && $cms->get_ecs_id() == $ecssettings->get_id()) {\n // If we are updating from the ECS with the CMS attached, then check the directory mappings (and sort order).\n directorytree::check_all_mappings();\n }\n\n mtrace(\"Emailing any necessary notifications for '\".$ecssettings->get_name().\"'\");\n notification::send_notifications($ecssettings);\n\n $ecssettings->update_last_cron();\n }\n }\n}", "public function sync()\n {\n $class = explode('\\\\', get_called_class());\n $manager = \\Str::studly(str_replace('EntryModel', null, end($class)));\n\n $existingAddons = $manager::getAll();\n $databaseAddons = $this->all();\n\n // Sync TO the database\n foreach ($existingAddons as $addon) {\n if (!$databaseAddons->findBySlug($addon->slug)) {\n $this->addons->insert(\n array(\n 'slug' => $addon->slug,\n )\n );\n }\n }\n }", "function syncDatabaseAndNotifyAction()\n {\n # $this->basicAuthentication('webservices');\n $sl = $this->getServiceLocator();\n\n set_time_limit(0);\n\n $config = $sl->get('config');\n $domain = $this->_params('domain');\n\n try\n {\n if(empty($domain))\n {\n throw new \\Exception(\"Invalid call to the webservice. No domain name provided\");\n }\n\n\n $dbClient = $sl->get('App\\Db\\Client');\n $dbDatabase = $sl->get('App\\Db\\Database');\n\n $clients = $dbClient->findBy(function($where) use($domain) {\n $where->equalTo('domain', $domain);\n }, array(), 'id asc');\n\n // lest just find the first user of the domain\n $client = $clients->current();\n\n if(!$client)\n {\n throw new \\Exception(\"Client with domain $domain not found.\");\n }\n\n if($client->deleted)\n {\n throw new \\Exception(\"Client #{$client->id} with domain $domain is deleted. The confirmation email was not send.\");\n }\n\n if($client->email_verified)\n {\n throw new \\Exception(\"Client #{$client->id} with domain $domain is already verified. The confirmation email was not send.\");\n }\n\n $databases = $dbDatabase->findDatabaseByClientId($client->id);\n if(!$databases->count())\n {\n throw new \\Exception(\"No database assigned to client #{$client->id} with domain $domain. The confirmation email was not send.\");\n }\n\n\n //\n if('backend' != $client->created_from)\n {\n ;\n }\n\n\n\n $lang = $client->lang;\n /////////////////////////////////////////////\n # sync databases\n ///////////////////////////////////////////// \n\n // get the list of tables from the path\n $pathSchema = $config['freemium']['path']['master_freemium_schema'][$lang];\n $currentTables = array();\n foreach(glob(\"$pathSchema/*.sql\") as $item)\n {\n $info = pathinfo($item);\n $tableName = $info['filename'];\n $currentTables[$tableName] = $item;\n }\n \n foreach ($databases as $database)\n {\n $tablesToCreate = array();\n $instanceTables = array();\n \n $databaseName = $database->db_name;\n $host = $database->db_host;\n $username = $database->db_user;\n $password = $database->db_password;\n $instanceAdapter = $this->_getInstanceAdapter($databaseName, $host, $username, $password);\n\n $sql = 'show tables';\n $rowset = $instanceAdapter->query($sql)->execute();\n foreach ($rowset as $row)\n {\n $tabelName = current($row);\n $instanceTables[$tabelName] = $tabelName;\n }\n\n foreach ($currentTables as $key => $item)\n {\n if(!isset($instanceTables[$key]))\n {\n $tablesToCreate[$key] = $item;\n }\n }\n\n foreach ($tablesToCreate as $item)\n {\n $sql = file_get_contents($item);\n $instanceAdapter->query($sql)->execute();\n }\n }\n\n /////////////////////////////////////////////\n # send the confirmation email to the user\n /////////////////////////////////////////////\n\n // prepare the verification code\n $cPassword = new Com\\Crypt\\Password();\n $plain = $client->email;\n $code = $cPassword->encode($plain);\n\n $request = $sl->get('request');\n $uri = $request->getUri();\n $serverUrl = \"{$uri->getScheme()}://{$uri->getHost()}\";\n \n $routeParams = array();\n $routeParams['action'] = 'verify-account';\n $routeParams['code'] = $code;\n $routeParams['email'] = $client->email;\n \n $viewRenderer = $sl->get('ViewRenderer');\n $url = $serverUrl . $viewRenderer->url('auth/wildcard', $routeParams);\n \n // preparing some replacement values\n $data = array();\n $data['follow_us'] = $this->_('follow_us', array(), 'default', $lang);\n $data['body'] = $this->_('confirm_your_email_address_body', array(\n $url,\n ), 'default', $lang);\n $data['header'] = '';\n \n // load the email template and replace values\n $mTemplate = $sl->get('App\\Model\\EmailTemplate');\n \n $langString = '';\n if('es' == $lang)\n {\n $langString = \"_$lang\";\n }\n \n $arr = $mTemplate->loadAndParse(\"common{$langString}\", $data);\n \n //\n $mailer = new Com\\Mailer();\n \n // prepare the message to be send\n $message = $mailer->prepareMessage($arr['body'], null, $this->_('confirm_your_email_address_subject', array(), 'default', $lang));\n \n $message->setTo($client->email);\n $mailTo = $config['freemium']['mail_to'];\n foreach($mailTo as $mail)\n {\n $message->addBcc($mail);\n }\n\n // prepare de mail transport and send the message\n $transport = $mailer->getTransport($message, 'smtp1', 'sales');\n $transport->send($message);\n echo \"Done!\";\n }\n catch(\\Exception $e)\n {\n \\App\\NotifyError::notify($e);\n ddd($e);\n }\n\n exit;\n }", "public function run()\n {\n\n $services = [\n 'Wi-fi',\n 'Posto macchina',\n 'Piscina',\n 'Animali',\n 'Vista mare',\n 'Sauna',\n 'Portineria',\n 'Cucina',\n 'Possibilità di fumare',\n 'Ascensore',\n 'Cassaforte',\n 'Tv',\n 'Aria condizionata',\n 'Kit di pronto-soccorso',\n 'Lavatrice'\n\n ];\n\n foreach ($services as $service) {\n \n $new_service = new Service();\n\n $new_service->name = $service;\n\n $new_service->save();\n\n }\n }", "public function after_update() {}", "public function sync()\n {\n $sql = null;\n $module = new \\ZPM\\Core\\Setup\\Schema();\n $modData = new \\ZPM\\Core\\Setup\\Info();\n\n $module->install();\n }", "public function run()\n {\n foreach ($this->settings as $index => $setting) {\n $setting['updated_by'] = 1;\n $result = Setting::create($setting);\n // if (!$result) {\n // $this->command->info(\"Insert failed at record $index.\");\n // return;\n // }\n }\n // $this->command->info('Inserted ' . count($this->settings) . ' records');\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "function syncStoreToCRM($sync_interval=0) {\n global $DB;\n\t if (self::checkConnection()) {\n\t\t //\\Helper::Log('(syncStoreToCRM) run period ' . $sync_period);\n\t\t // Get plugin object\n\t\t $plugin = false;\n\t\t if (strlen(self::$profile['PLUGIN'])) {\n\t\t\t $arProfilePlugin = Exporter::getInstance(self::$MODULE_ID)->getPluginInfo(self::$profile['PLUGIN']);\n\t\t\t if (is_array($arProfilePlugin)) {\n\t\t\t\t $strPluginClass = $arProfilePlugin['CLASS'];\n\t\t\t\t if (strlen($strPluginClass) && class_exists($strPluginClass)) {\n\t\t\t\t\t $plugin = new $strPluginClass(self::$MODULE_ID);\n\t\t\t\t\t $plugin->setProfileArray(self::$profile);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t // List of orders, changed by last period (if period is not set than get all orders)\n\t\t if ($plugin) {\n\t\t\t $filter = [];\n\t\t\t if ($sync_interval > 0) {\n\t\t\t\t $filter['change_date_from'] = time() - $sync_interval;\n\t\t\t }\n\t\t\t $orders_ids = $plugin->getOrdersIDsList($filter);\n\t\t\t foreach ($orders_ids as $order_id) {\n\t\t\t\t $order_data = $plugin->getOrder($order_id);\n\t\t\t\t try {\n\t\t\t\t\t self::syncOrderToDeal($order_data);\n\t\t\t\t } catch (\\Exception $e) {\n\t\t\t\t\t //\\Helper::Log('(syncStoreToCRM) can\\'t sync of order ' . $order_data['ID']);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t //\\Helper::Log('(syncStoreToCRM) success');\n\t }\n }", "public function sync()\n {\n SyncServer::dispatch($this);\n }", "public function run() {\n Workplace::factory(10)->create()->each(function ($workplace) {\n WorkFunction::factory(5)->make()->each(function ($workFunction) use ($workplace) {\n $workplace->workFunctions()->save($workFunction);\n });\n });\n }", "public function flushChanges()\n {\n $this->om->flush();\n }", "public function flush() {\n if ($this->c_owner) {\n if ($this->update('owner', $this->owner, Project::$tableName)) {\n $this->c_owner = false;\n }\n }\n if ($this->c_name) {\n if ($this->update('name', $this->name, Project::$tableName)) {\n $this->c_name = false;\n }\n }\n if ($this->c_description) {\n if ($this->update('description', $this->description, Project::$tableName)) {\n $this->c_description = false;\n }\n }\n \n if ($this->c_deadline) {\n if ($this->update('deadline', $this->deadline, Project::$tableName)) {\n $this->c_deadline = false;\n }\n }\n if ($this->c_time) {\n if ($this->update('time', $this->time, Project::$tableName)) {\n $this->c_time = false;\n }\n }\n }", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function run()\n {\n for ($i = 1; $i < 11; $i++) {\n $listGroup = ListGroup::firstOrCreate([\n 'name' => \"lista {$i}\",\n ]);\n\n $listGroup ->save();\n\n $listGroup->author()->sync([\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n rand(1, 100),\n ]);\n }\n }", "public function runcontactsyncAction()\n {\n $result = Mage::getModel('ddg_automation/cron')->contactSync();\n\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "public function afterSave(AccountServiceManagerInterface $sm)\r\n\t{\r\n\t\t// Process any temp files or attachments associated with this entity\r\n\t\t$this->processTempFiles($sm->get(\"Netric/FileSystem/FileSystem\"));\r\n\r\n\t\t// Call derived extensions\r\n\t\t$this->onAfterSave($sm);\r\n\t}", "public function run()\n {\n $sync_data = [1=>['base_price' => 10000, 'vat' => 1500, ], 2=>['base_price' => 15000, 'vat' => 1500, ], 3=>['base_price' => 20000, 'vat' => 1500, ], 4=>['base_price' => 25000, 'vat' => 1500, ], 5=>['base_price' => 30000, 'vat' => 1500, ], 6=>['base_price' => 35000, 'vat' => 1500, ], 7=>['base_price' => 40000, 'vat' => 1500, ], 8=>['base_price' => 45000, 'vat' => 1500, ]] ;\n $audit1 = new Audit();\n $audit1->audit_name = 'BSCI';\n $audit1->slug = 'bsci';\n $audit1->save();\n $audit1->auditors()->sync($sync_data);\n \n $sync_data = [1=>['base_price' => 10000, 'vat' => 1500, ], 2=>['base_price' => 15000, 'vat' => 1500, ], 3=>['base_price' => 20000, 'vat' => 1500, ], 4=>['base_price' => 25000, 'vat' => 1500, ], 5=>['base_price' => 30000, 'vat' => 1500, ], 6=>['base_price' => 35000, 'vat' => 1500, ], 7=>['base_price' => 40000, 'vat' => 1500, ], 8=>['base_price' => 45000, 'vat' => 1500, ]] ;\n $audit2 = new Audit();\n $audit2->audit_name = 'SEDEX';\n $audit2->slug = 'sedex';\n $audit2->save();\n $audit2->auditors()->sync($sync_data);\n \n $sync_data = [1=>['base_price' => 15000, 'vat' => 1500, ], 2=>['base_price' => 25000, 'vat' => 1500, ], 3=>['base_price' => 30000, 'vat' => 1500, ], 4=>['base_price' => 35000, 'vat' => 1500, ], 5=>['base_price' => 40000, 'vat' => 1500, ]] ;\n $audit3 = new Audit();\n $audit3->audit_name = 'WRAP';\n $audit3->slug = 'wrap';\n $audit3->save();\n $audit3->auditors()->sync($sync_data);\n }", "function execute()\n {\n $this->OldModel = $this->getOldModelToUse();\n $this->OldModel->cacheQueries = false;\n $this->OldModel->cacheSQL = false;\n $this->NewModel = $this->getNewModelToUse();\n $this->NewModel->cacheQueries = false;\n $this->NewModel->cacheSQL = false;\n \n $tableMap = $this->getTableMap();\n debug($tableMap);\n if (!$tableMap)\n {\n $this->print_instructions();\n exit();\n }\n\n foreach ($tableMap as $table => $data)\n {\n if (!$this->specialProcessing($table, $data))\n {\n $this->import($table, $data);\n }\n }\n }", "private function syncServices(Customer $customer, array $services)\n {\n $customer->services()->sync($services);\n }", "public function postFlush()\n {\n $currentDeepLevel = $this->deepLevel;\n\n if (!empty($this->entitiesScheduledForWorkflowStart[$currentDeepLevel])) {\n $this->deepLevel++;\n $massStartData = $this->entitiesScheduledForWorkflowStart[$currentDeepLevel];\n unset($this->entitiesScheduledForWorkflowStart[$currentDeepLevel]);\n $this->workflowManager->massStartWorkflow($massStartData);\n $this->deepLevel--;\n }\n }", "public function run()\n {\n $hostname = Customer::firstOrNew(['fqdn' => 'localhost']);\n\n if (!$hostname->exists) {\n $hostname->fill([\n 'fqdn' => 'localhost',\n ])->save();\n }\n }", "public function change()\n {\n\n $time = new Time('+4 hours'); \n\n $usersTable = TableRegistry::get('Users');\n $schedulerTable = TableRegistry::get('Scheduler');\n $usersData = $usersTable->find()->where('active',1)->toArray();\n foreach($usersData as $user){\n\n $schedule = $schedulerTable->newEntity();\n $schedule->user_id = $user['id'];\n $schedule->marketplace_id = 1;\n $schedule->job_interval = 4;\n $schedule->next_occurrence = $time;\n $schedule->type = 'Crawler';\n $schedule->meta_data = serialize([]);\n $schedule->created = Time::now();;\n $schedule->updated = Time::now();;\n $scheduleData = $schedulerTable->save($schedule);\n\n $schedule1 = $schedulerTable->newEntity();\n $schedule1->user_id = $user['id'];\n $schedule1->marketplace_id = 2;\n $schedule1->job_interval = 4;\n $schedule1->next_occurrence = $time;\n $schedule1->meta_data = serialize([]);\n $schedule1->type = 'Crawler';\n $schedule1->created = Time::now();;\n $schedule1->updated = Time::now();;\n $scheduleData = $schedulerTable->save($schedule1);\n\n }\n }", "function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n //Creating array containing variable IDs in List\n $variableIDs = [];\n $variableList = json_decode($this->ReadPropertyString('VariableList'), true);\n foreach ($variableList as $line) {\n $variableIDs[] = $line['VariableID'];\n }\n\n //Creating links for all variable IDs in VariableList\n foreach ($variableList as $line) {\n $variableID = $line['VariableID'];\n $this->RegisterMessage($variableID, VM_UPDATE);\n $this->RegisterReference($variableID);\n if (!@$this->GetIDForIdent('Link' . $variableID)) {\n\n //Create links for variables\n $linkID = IPS_CreateLink();\n IPS_SetParent($linkID, $this->InstanceID);\n IPS_SetLinkTargetID($linkID, $variableID);\n IPS_SetIdent($linkID, 'Link' . $variableID);\n\n //Setting initial visibility\n IPS_SetHidden($linkID, (GetValue($variableID) == $this->GetSwitchValue($variableID)));\n }\n }\n\n //Deleting unlisted links\n foreach (IPS_GetChildrenIDs($this->InstanceID) as $linkID) {\n if (IPS_LinkExists($linkID)) {\n if (!in_array(IPS_GetLink($linkID)['TargetID'], $variableIDs)) {\n $this->UnregisterMessage(IPS_GetLink($linkID)['TargetID'], VM_UPDATE);\n $this->UnregisterReference(IPS_GetLink($linkID)['TargetID']);\n $this->UnregisterReference($linkID);\n IPS_DeleteLink($linkID);\n }\n }\n }\n }", "public function sync();", "public function sync();", "private function flushFileCachedValues() {\n\n foreach ( $this->getSheetNames( true ) as $sheet ) {\n\n $this->setActiveSheet( $sheet, 'name' );\n $this->activeSheet->updateCalculations();\n $this->saveActiveSheetChanges();\n }\n\n }", "public function run() {\n\t\t$this->updateProjectCounterCache();\n\t\t$this->updateUserCounterCache();\n\t}", "private function executeAfterSave()\n {\n Logger::getInstance()->po_log(\"Excecute after save \". get_class($this));\n\n foreach ( $this->afterSave as $cb ) $cb->execute();\n\n // Una vez que termino de ejecutar, reseteo los cb's registrados.\n $this->afterSave = array();\n }", "public function run()\n {\n // it's important to update old Deposit model class name in the database\n AccountTransaction::where('transactionable_type', 'App\\Models\\Deposit')\n ->update(['transactionable_type' => 'Packages\\Payments\\Models\\Deposit']);\n\n // it's important to update old Withdrawal model class name in the database\n AccountTransaction::where('transactionable_type', 'App\\Models\\Withdrawal')\n ->update(['transactionable_type' => 'Packages\\Payments\\Models\\Withdrawal']);\n }", "public function run()\n {\n Cliente::updateOrCreate([\n \t\"nombre\" => \"Cristofer\",\n \t\"apellido\" => \"Torres\",\n \t\"telefono\" => \"+569 86497445\",\n ]);\n Cliente::updateOrCreate([\n \t\"nombre\" => \"Carlos\",\n \t\"apellido\" => \"Moll\",\n \t\"telefono\" => \"+569 86497445\",\n ]);\n }", "public function testUpdateService()\n {\n\n }", "public function ApplyChanges() {\n parent::ApplyChanges();\n\n $ModulInfo = IPS_GetInstance($this->InstanceID);\n $ModulName = $ModulInfo['ModuleInfo']['ModuleName'];\n\n $HourUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimer\");\n $HourNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimer\");\n $MinuteUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimerMinute\");\n $MinuteNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimerMinute\");\n $HourResetTimer = $this->ReadPropertyInteger(\"IntervalHtmlResetColorTodayTimer\");\n $EnableResetTimer = $this->ReadPropertyBoolean(\"cbxHtmlResetColorToday\");\n \n If ((($HourUpdateTimer > 23) || ($HourNotificationTimer > 23)) || (($HourUpdateTimer < 0) || ($HourNotificationTimer < 0)))\n {\n $this->SetStatus(202);\n $this->SendDebug($ModulName, $this->Translate(\"The hour of a time is wrong!\"), 0);\n }\n else {\n $this->SetStatus(102);\n }\n\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteUpdateTimer.\":17\", \"UpdateTimer\");\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteNotificationTimer.\":07\", \"NotificationTimer\");\n If($EnableResetTimer)\n {\n $this->SetNewTimerInterval($HourResetTimer.\":\".\"00\".\":14\", \"ResetFontTimer\");\n }\n If ($this->ReadPropertyBoolean(\"cbxGS\"))\n {\n $this->RegisterVariableString(\"YellowBagTime\", $this->Translate(\"Packaging waste event\"));\n $this->RegisterVariableString(\"YellowBagTimes\", $this->Translate(\"Packaging waste\"), \"~TextBox\");\n $this->EnableAction(\"YellowBagTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"YellowBagTimes\");\n $this->UnregisterVariable(\"YellowBagTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxHM\"))\n {\n $this->RegisterVariableString(\"WasteTime\", $this->Translate(\"Household garbage event\"));\n $this->RegisterVariableString(\"WasteTimes\", $this->Translate(\"Household garbage\"), \"~TextBox\");\n $this->EnableAction(\"WasteTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"WasteTimes\");\n $this->UnregisterVariable(\"WasteTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPP\"))\n {\n $this->RegisterVariableString(\"PaperTime\", $this->Translate(\"Cardboard bin event\"));\n $this->RegisterVariableString(\"PaperTimes\", $this->Translate(\"Cardboard bin\"), \"~TextBox\");\n $this->EnableAction(\"PaperTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PaperTimes\");\n $this->UnregisterVariable(\"PaperTime\");\n }\n\n If ($this->ReadPropertyBoolean(\"cbxBO\"))\n {\n $this->RegisterVariableString(\"BioTime\", $this->Translate(\"Organic waste event\"));\n $this->RegisterVariableString(\"BioTimes\", $this->Translate(\"Organic waste\"), \"~TextBox\");\n $this->EnableAction(\"BioTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"BioTime\");\n $this->UnregisterVariable(\"BioTimes\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPT\"))\n {\n $this->RegisterVariableString(\"PollutantsTime\", $this->Translate(\"Pollutants event\"));\n $this->RegisterVariableString(\"PollutantsTimes\", $this->Translate(\"Pollutants\"), \"~TextBox\");\n $this->EnableAction(\"PollutantsTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PollutantsTimes\");\n $this->UnregisterVariable(\"PollutantsTime\");\n }\n }", "public function testComAdobeCqScreensOfflinecontentImplBulkOfflineUpdateServiceImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.screens.offlinecontent.impl.BulkOfflineUpdateServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }", "private function synchronize() {\n\t\t$response = $this->send(self::$synchronize_uri, self::SYNC_SIZE);\n\t\t$this->_set_sync($response);\n\t}", "public function run()\n {\n $serviceCategory = factory(App\\ServiceCategory::class)->make();\n $serviceCategory->save();\n $service = factory(App\\Service::class)->make();\n $service->save();\n\n }", "public function run()\n {\n\n $cleaners = factory(Cleaner::class, 20)->create();\n\n foreach ($cleaners as $cleaner) {\n\n $cities = City::inRandomOrder()->take(2)->get();\n\n $cleaner->cities()->sync($cities->pluck('id')->all());\n\n }\n\n }", "protected function after_execute() {\n// \t$this->add_related_files('mod_vcubeseminar', 'intro', null);\n// \t$this->add_related_files('mod_vcubeseminar', 'vcubeseminar', null);\n }", "public function run()\n {\n // Добавление переводов (итал., фр.) для существующих стран без переводов\n $notTranslatedCountriesIt = Country::notTranslatedIn('it')->get();\n foreach ($notTranslatedCountriesIt as $country) {\n $country->translateOrNew('it')->name = $this->getObjectTitleFromGoogleMaps($country->name, 'it');\n $country->save();\n }\n $notTranslatedCountriesFr = Country::notTranslatedIn('fr')->get();\n foreach ($notTranslatedCountriesFr as $country) {\n $country->translateOrNew('fr')->name = $this->getObjectTitleFromGoogleMaps($country->name, 'fr');\n $country->save();\n }\n\n //$i = 0;\n // Добавление переводов (итал., фр.) для существующих городов без переводов\n $notTranslatedCitiesIt = City::notTranslatedIn('it')\n ->with('country')\n ->get();\n foreach ($notTranslatedCitiesIt as $city) {\n sleep(1);\n $res = $this->getObjectTitleFromGoogleMaps($city->country->translate('ru')->name . ', ' . $city->translate('ru')->name, 'it');\n if ($res) {\n $city->translateOrNew('it')->name = $res;\n $city->save();\n //$i++;\n //echo $i . \"\\r\\n\";\n } else {\n $city->delete();\n }\n }\n $notTranslatedCitiesFr = City::notTranslatedIn('fr')\n ->with('country')\n ->get();\n foreach ($notTranslatedCitiesFr as $city) {\n sleep(1);\n $city->translateOrNew('fr')->name = $this->getObjectTitleFromGoogleMaps( $city->country->translate('ru')->name . ', ' . $city->translate('ru')->name, 'fr');\n $city->save();\n //$i++;\n //echo $i . \"\\r\\n\";\n }\n }", "public function flush(): void\n {\n parent::flush();\n\n $this->bootedCallbacks = [];\n $this->bootingCallbacks = [];\n $this->deferredServices = [];\n $this->serviceProviders = [];\n $this->loadServiceProviders = [];\n }", "function __reload_ne_adapaters() {\n\t\t$appliance_id = $this->response->html->request()->get('appliance_id');\n\t\t$appliance = new appliance();\n\t\t$appliance->get_instance_by_id($appliance_id);\n\t\t$resource = new resource();\n\t\t$resource->get_instance_by_id($appliance->resources);\n\t\t$command = $this->basedir.\"/plugins/hyperv/bin/htvcenter-hyperv-network post_net_adapters -i \".$resource->ip;\n\t\t$command .= ' --htvcenter-ui-user '.$this->user->name;\n\t\t$command .= ' --htvcenter-cmd-mode fork';\n\t\t$file = $this->rootdir.'/plugins/hyperv/hyperv-stat/'.$resource->ip.'.net_adapters';\n\t\tif(file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t\t$htvcenter_server = new htvcenter_server();\n\t\t$htvcenter_server->send_command($command, NULL, true);\n\t\twhile (!file_exists($file)) // check if the data file has been modified\n\t\t{\n\t\t usleep(10000); // sleep 10ms to unload the CPU\n\t\t clearstatcache();\n\t\t}\n\t\treturn true;\n\t}", "public function run()\n {\n $data = [\n \t\t\t'Company-Updated',\n \t\t\t'Project-Updated',\n 'User-Updated'\n \t\t];\n\n foreach($data as $key => $value) {\n\t\t\tLog::create(['name'=>$value]);\n\t\t}\t\t\n }", "private function _updateCronStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->updateCronStats();\n\t}", "public function testNothingModifiedLastRunSet()\n {\n $this->_cs->updateLastRun($this->_name);\n sleep(2);\n\n $check = $this->_cs->checkEntitiesChanged($this->_name, array(self::ENTITY_NAME));\n $this->assertFalse($check);\n }", "public function run()\n {\n //\n $editorList = config('editors');\n\n foreach ($editorList as $editor) {\n $neweditor = new Editor();\n $neweditor->name = $editor['name'];\n $neweditor->lastName = $editor['lastName'];\n $neweditor->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 computeChangeSets()\n {\n $this->computeScheduleInsertsChangeSets();\n\n // Compute changes for other MANAGED documents. Change tracking policies take effect here.\n foreach ($this->identityMap as $className => $documents) {\n $class = $this->dm->getClassMetadata($className);\n if($class->isEmbeddedDocument) {\n // Embedded documents should only compute by the document itself which include the embedded document.\n // This is done separately later.\n // @see computeChangeSet()\n // @see computeAssociationChanges()\n continue;\n }\n\n // If change tracking is explicit or happens through notification, then only compute\n // changes on documents of that type that are explicitly marked for synchronization.\n $documentsToProcess = ! $class->isChangeTrackingDeferredImplicit() ?\n (isset($this->scheduledForDirtyCheck[$className]) ?\n $this->scheduledForDirtyCheck[$className] : array())\n : $documents;\n\n foreach ($documentsToProcess as $document) {\n // Ignore uninitialized proxy objects\n if (/* $document is readOnly || */ $document instanceof Proxy && ! $document->__isInitialized__) {\n continue;\n }\n // Only MANAGED documents that are NOT SCHEDULED FOR INSERTION are processed here.\n $oid = spl_object_hash($document);\n if ( ! isset($this->documentInsertions[$oid]) && isset($this->documentStates[$oid])) {\n $this->computeChangeSet($class, $document);\n }\n }\n }\n }", "public function daily_sync()\n {\n /** @var $helper Mailigen_Synchronizer_Helper_Data */\n $helper = Mage::helper('mailigen_synchronizer');\n if (!$helper->isEnabled()) {\n return \"Module is disabled\";\n }\n\n /**\n * Synchronize Newsletter\n */\n try {\n if ($helper->canAutoSyncNewsletter()) {\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncNewsletter();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n\n /**\n * Synchronize Customers\n */\n try {\n if ($helper->canAutoSyncCustomers() || $helper->getManualSync()) {\n if ($helper->getManualSync()) {\n $helper->setManualSync(0);\n }\n\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncCustomers();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n }" ]
[ "0.5997599", "0.58403236", "0.5769199", "0.5768103", "0.5746364", "0.55999434", "0.5587502", "0.5563259", "0.5528158", "0.5499976", "0.5495799", "0.54830134", "0.545524", "0.54161316", "0.5412736", "0.5392773", "0.5353069", "0.53394127", "0.5325165", "0.52678555", "0.52451086", "0.52357966", "0.5235398", "0.52172387", "0.51979357", "0.51846987", "0.517651", "0.5166399", "0.51011884", "0.509653", "0.509275", "0.5065115", "0.5057561", "0.50571007", "0.50522405", "0.505188", "0.50328165", "0.5031141", "0.50265944", "0.50069565", "0.49985215", "0.49931115", "0.499294", "0.49908537", "0.49859288", "0.49846032", "0.49776104", "0.49733174", "0.49680504", "0.49587053", "0.49545968", "0.49525517", "0.49477354", "0.4947218", "0.4941035", "0.4936881", "0.49349177", "0.492789", "0.49277222", "0.4927397", "0.49243498", "0.4920747", "0.49138385", "0.49133843", "0.49070027", "0.49061334", "0.49028787", "0.48983237", "0.48941597", "0.4892886", "0.48902562", "0.48862037", "0.48685104", "0.48658064", "0.4864149", "0.4863123", "0.4857329", "0.4857329", "0.48568287", "0.4839596", "0.48395193", "0.48364356", "0.48356736", "0.4832281", "0.48303977", "0.48265606", "0.48239413", "0.48229703", "0.4820782", "0.48182923", "0.48181522", "0.48169", "0.48123428", "0.48123315", "0.48050603", "0.4804164", "0.4803369", "0.47958466", "0.4794334", "0.47911528" ]
0.65392864
0
Sync the modified host/service group objects Runs after CCM hostgroup or servicegroup is saved
function recurringdowntime_ccm_group_sync($cbtype, &$cbargs) { $cfg = recurringdowntime_get_cfg(); $pending = recurringdowntime_get_pending_changes(); // Check if the object is part of the pending changes foreach ($pending as $i => $p) { if ($p['object_id'] == $cbargs['id']) { $tmp = $p; if ($cbargs['type'] == 'hostgroup') { $tmp['hostgroup_name'] = $cbargs['hostgroup_name']; } else if ($cbargs['type'] == 'servicegroup') { $tmp['servicegroup_name'] = $cbargs['servicegroup_name']; } $pending[$i] = $tmp; recurringdowntime_update_pending_changes($pending); return; } } if ($cbargs['type'] == 'hostgroup') { if ($cbargs['old_hostgroup_name'] != $cbargs['hostgroup_name']) { foreach ($cfg as $id => $c) { if (array_key_exists('hostgroup_name', $c) && $c['hostgroup_name'] == $cbargs['old_hostgroup_name']) { $pending[] = array( 'cfg_id' => $id, 'object_id' => $cbargs['id'], 'hostgroup_name' => $cbargs['hostgroup_name'] ); } } } } else if ($cbargs['type'] == 'servicegroup') { if ($cbargs['old_servicegroup_name'] != $cbargs['servicegroup_name']) { foreach ($cfg as $id => $c) { if (array_key_exists('servicegroup_name', $c) && $c['servicegroup_name'] == $cbargs['old_servicegroup_name']) { $pending[] = array( 'cfg_id' => $id, 'object_id' => $cbargs['id'], 'servicegroup_name' => $cbargs['servicegroup_name'] ); } } } } // Save pending changes recurringdowntime_update_pending_changes($pending); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function syncSystemGroup()\n\t{\n\t\t$members = Owner::getIds($this->get('id'), Owner::ROLE_COLLABORATOR, 1);\n\t\t$authors = Owner::getIds($this->get('id'), Owner::ROLE_AUTHOR, 1);\n\t\t$managers = Owner::getIds($this->get('id'), Owner::ROLE_MANAGER, 1);\n\n\t\t$all = array_merge($members, $managers, $authors);\n\t\t$all = array_unique($all);\n\n\t\t$group = $this->systemGroup();\n\t\t$group->set('members', $all);\n\t\t$group->set('managers', $managers);\n\t\t$group->set('type', 2);\n\t\t$group->set('published', 1);\n\t\t$group->set('discoverability', 1);\n\n\t\tif (!$group->update())\n\t\t{\n\t\t\t$this->addError(Lang::txt('COM_PROJECTS_ERROR_SAVING_SYS_GROUP'));\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function recurringdowntime_ccm_hostservice_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'host') {\n $tmp['host_name'] = $cbargs['host_name'];\n } else if ($cbargs['type'] == 'service') {\n $tmp['service_description'] = $cbargs['service_description'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n // Check if host name changed\n if ($cbargs['type'] == 'host') {\n\n // Check if host name changed\n if (!empty($cbargs['old_host_name']) && $cbargs['host_name'] != $cbargs['old_host_name']) {\n foreach ($cfg as $id => $c) {\n\n if ($c['schedule_type'] == 'host' || $c['schedule_type'] == 'service') {\n\n // Replace config host_name that used the old host name\n if ($c['host_name'] == $cbargs['old_host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'host_name' => $cbargs['host_name']\n );\n }\n\n }\n\n }\n }\n\n\n // Check for service description change\n } else if ($cbargs['type'] == 'service') {\n\n // This one is complicated ... we will only do the hosts defined directly to the service\n if (!empty($cbargs['old_service_description']) && $cbargs['service_description'] != $cbargs['old_service_description']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('service_description', $c) && $c['service_description'] == $cbargs['old_service_description']) {\n\n // Get all hosts attached to service\n $sql = \"SELECT host_name FROM nagiosql.tbl_lnkServiceToHost AS lnk\n LEFT JOIN nagiosql.tbl_host AS h ON h.id = lnk.idSlave\n WHERE idMaster = \".intval($cbargs['id']).\";\";\n if (!($rs = exec_sql_query(DB_NAGIOSQL, $sql))) {\n continue;\n }\n\n // Check all hosts against current cfg\n $arr = $rs->GetArray();\n foreach ($arr as $a) {\n if ($c['host_name'] == $a['host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'service_description' => $cbargs['service_description']\n );\n }\n }\n\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "public function syncLdap()\n {\n $this->updateName();\n $this->updateEmail();\n $this->updateInfo();\n $this->save();\n }", "public function afterSave($object)\n {\n \n $websiteId = Mage::app()->getStore($object->getStoreId())->getWebsiteId();\n $isGlobal = $this->getAttribute()->isScopeGlobal() || $websiteId == 0;\n $groupRows = $object->getData($this->getAttribute()->getName());\n \n \n \n if (empty( $groupRows)) {\n $this->_getResource()->deleteGroupData($object->getId());\n return $this;\n }\n \n $old = array();\n $new = array();\n \n $origGroupRows = $object->getOrigData($this->getAttribute()->getName());\n if (!is_array( $origGroupRows )) {\n $origGroupRows = array();\n }\n foreach ( $origGroupRows as $data) {\n if ($data['website_id'] > 0 || ($data['website_id'] == '0' && $isGlobal)) {\n $key = join('-', array_merge(\n array($data['website_id'], $data['cust_group']),\n $this->_getAdditionalUniqueFields($data)\n ));\n $old[$key] = $data;\n }\n }\n \n // prepare data for save\n foreach ($groupRows as $data) {\n $hasEmptyData = false;\n foreach ($this->_getAdditionalUniqueFields($data) as $field) {\n if (empty($field)) {\n $hasEmptyData = true;\n break;\n }\n }\n\n if ($hasEmptyData || !isset($data['cust_group']) || !empty($data['delete'])) {\n continue;\n }\n if ($this->getAttribute()->isScopeGlobal() && $data['website_id'] > 0) {\n continue;\n }\n if (!$isGlobal && (int)$data['website_id'] == 0) {\n continue;\n }\n\n if(!isset($data['website_id'])) $data['website_id'] =0;\n \n $key = join('-', array_merge(\n array($data['website_id'], $data['cust_group']),\n $this->_getAdditionalUniqueFields($data)\n ));\n\n $useForAllGroups = $data['cust_group'] == Mage_Customer_Model_Group::CUST_GROUP_ALL;\n $customerGroupId = !$useForAllGroups ? $data['cust_group'] : 0;\n\n \n $new[$key] = array_merge(array(\n 'website_id' => $data['website_id'],\n 'all_groups' => $useForAllGroups ? 1 : 0,\n 'customer_group_id' => $customerGroupId,\n 'value' => $data['value'],\n ), $this->_getAdditionalUniqueFields($data));\n }\n\n $delete = array_diff_key($old, $new);\n $insert = array_diff_key($new, $old);\n $update = array_intersect_key($new, $old);\n\n $isChanged = false;\n $productId = $object->getId();\n\n if (!empty($delete)) {\n foreach ($delete as $data) {\n $this->_getResource()->deleteGroupData($productId, null, $data['group_id']);\n $isChanged = true;\n }\n }\n\n if (!empty($insert)) {\n foreach ($insert as $data) {\n $group = new Varien_Object($data);\n $group->setEntityId($productId);\n $this->_getResource()->saveGroupData($group);\n\n $isChanged = true;\n }\n }\n\n if (!empty($update)) {\n foreach ($update as $k => $v) {\n \n \n \n if ($old[$k]['value'] != $v['value']) {\n $group = new Varien_Object(array(\n 'value_id' => $old[$k]['value_id'],\n 'value' => $v['value']\n ));\n $this->_getResource()->saveGroupData($group);\n\n $isChanged = true;\n }\n }\n }\n\n if ($isChanged) {\n $valueChangedKey = $this->getAttribute()->getName() . '_changed';\n $object->setData($valueChangedKey, 1);\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n /*$websiteId = Mage::app()->getStore($object->getStoreId())->getWebsiteId();\n $isGlobal = $this->getAttribute()->isScopeGlobal() || $websiteId == 0;\n\n $priceRows = $object->getData($this->getAttribute()->getName());\n if (empty($priceRows)) {\n if ($isGlobal) {\n $this->_getResource()->deletePriceData($object->getId());\n } else {\n $this->_getResource()->deletePriceData($object->getId(), $websiteId);\n }\n return $this;\n }\n\n $old = array();\n $new = array();\n\n // prepare original data for compare\n $origGroupPrices = $object->getOrigData($this->getAttribute()->getName());\n if (!is_array($origGroupPrices)) {\n $origGroupPrices = array();\n }\n foreach ($origGroupPrices as $data) {\n if ($data['website_id'] > 0 || ($data['website_id'] == '0' && $isGlobal)) {\n $key = join('-', array_merge(\n array($data['website_id'], $data['cust_group']),\n $this->_getAdditionalUniqueFields($data)\n ));\n $old[$key] = $data;\n }\n }\n\n // prepare data for save\n foreach ($priceRows as $data) {\n $hasEmptyData = false;\n foreach ($this->_getAdditionalUniqueFields($data) as $field) {\n if (empty($field)) {\n $hasEmptyData = true;\n break;\n }\n }\n\n if ($hasEmptyData || !isset($data['cust_group']) || !empty($data['delete'])) {\n continue;\n }\n if ($this->getAttribute()->isScopeGlobal() && $data['website_id'] > 0) {\n continue;\n }\n if (!$isGlobal && (int)$data['website_id'] == 0) {\n continue;\n }\n\n $key = join('-', array_merge(\n array($data['website_id'], $data['cust_group']),\n $this->_getAdditionalUniqueFields($data)\n ));\n\n $useForAllGroups = $data['cust_group'] == Mage_Customer_Model_Group::CUST_GROUP_ALL;\n $customerGroupId = !$useForAllGroups ? $data['cust_group'] : 0;\n\n $new[$key] = array_merge(array(\n 'website_id' => $data['website_id'],\n 'all_groups' => $useForAllGroups ? 1 : 0,\n 'customer_group_id' => $customerGroupId,\n 'value' => $data['price'],\n ), $this->_getAdditionalUniqueFields($data));\n }\n\n $delete = array_diff_key($old, $new);\n $insert = array_diff_key($new, $old);\n $update = array_intersect_key($new, $old);\n\n $isChanged = false;\n $productId = $object->getId();\n\n if (!empty($delete)) {\n foreach ($delete as $data) {\n $this->_getResource()->deletePriceData($productId, null, $data['price_id']);\n $isChanged = true;\n }\n }\n\n if (!empty($insert)) {\n foreach ($insert as $data) {\n $price = new Varien_Object($data);\n $price->setEntityId($productId);\n $this->_getResource()->savePriceData($price);\n\n $isChanged = true;\n }\n }\n\n if (!empty($update)) {\n foreach ($update as $k => $v) {\n if ($old[$k]['price'] != $v['value']) {\n $price = new Varien_Object(array(\n 'value_id' => $old[$k]['price_id'],\n 'value' => $v['value']\n ));\n $this->_getResource()->savePriceData($price);\n\n $isChanged = true;\n }\n }\n }\n\n if ($isChanged) {\n $valueChangedKey = $this->getAttribute()->getName() . '_changed';\n $object->setData($valueChangedKey, 1);\n }*/\n\n return $this;\n }", "public function performSyncOperation() {\n switch ($this->syncOperation) {\n case 'create':\n // Sets up the data array\n $data['LdapObject'] = $this->stagingData;\n $dn = 'uid' . '=' . $this->stagingData['uid'] . ',' . $this->LdapObject->getLdapContext();\n $data['LdapObject']['dn'] = $dn;\n $data['LdapObject']['objectclass'] = $this->ldapObjectClass;\n \n // Save the data\n $createResult = $this->LdapObject->save($data);\n \n if ($createResult) {\n $this->log('SYNC: Created LDAP Object: ' . $createResult['LdapObject']['dn'], LOG_INFO);\n // Sets the properties on the LdapObject for reporting the sync result\n $this->LdapObject->id = $dn;\n $this->LdapObject->primaryKey = 'dn';\n } else {\n $this->log('SYNC: Failed to create LDAP Object: ' . $dn . '. Salesforce ID: '. $this->sforceData['Id'] . '. LDAP Error: ' . $this->LdapObject->getLdapError() . '.', LOG_ERR);\n }\n break;\n case 'update':\n // Push everything to lower case, so String comparison will be accurate.\n $stagingObject = array_change_key_case($this->stagingData, CASE_LOWER);\n $ldapObject = array_change_key_case($this->ldapData, CASE_LOWER);\n // Diff the arrays. Should be efficient. Since we are doing a one way push from Salesforce\n // to LDAP, this also provides a clean way to get exactly the attributes we want to update.\n $diffObject = array_diff_assoc($stagingObject, $ldapObject);\n if (!empty($diffObject)) {\n $data['LdapObject'] = $diffObject;\n \n // Save the data\n $updateResult = $this->LdapObject->save($data);\n \n if ($updateResult) {\n $this->log('SYNC: Updated LDAP Object: ' . $this->LdapObject->id, LOG_INFO);\n } else {\n $this->log('SYNC: Failed to update LDAP Object: ' . $this->LdapObject->id, LOG_ERR);\n }\n } else {\n // Sets the sync operation, so unchanged records (which is the usual case) are separately reported\n $this->syncOperation = 'unchanged';\n $this->log('SYNC: LDAP Object ' . $this->LdapObject->id . ' left unchanged.', LOG_INFO);\n }\n break;\n case 'delete':\n $id = $this->LdapObject->id;\n $deleteResult = $this->LdapObject->delete($this->LdapObject->id);\n if ($deleteResult) {\n $this->log('SYNC: Deleted LDAP Object: ' . $id, LOG_INFO);\n // Sets id on the LdapObject for reporting the sync result\n $this->LdapObject->id = $id;\n } else {\n $this->log('SYNC: Failed to delete LDAP Object: ' . $id , LOG_ERR);\n $ldapError = $this->LdapObject->getLdapError();\n if (!empty($ldapError)) {\n $this->log($ldapError, LOG_ERR);\n }\n }\n break;\n case 'nothing':\n $this->log('SYNC: No action performed on record: ' . $this->sforceData['Id'], LOG_DEBUG);\n break;\n default:\n $this->log('SYNC: No operation found for Salesforce Id \"' . $this->sforceData['Id'] . '\". This object was not synced.', LOG_INFO);\n }\n }", "public function update() {\n\t\t$data = array(\n\t\t\t'tstamp' => $this['timeStamp'],\n\t\t\t'crdate' => $this['createDate'],\n\t\t\t'cruser_id' => $this['cruserUid'],\n\t\t\t'name' => $this['name'],\n\t\t);\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group'),\n\t\t\t$data\n\t\t);\n\t\t$this->checkAffectedRows('updateGroup', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'updateGroup', 'Update group '.$data['name'].' uid '.$this['uid']);\n\t}", "public function testUpdateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function refreshGroupSettings()\n {\n $group = $this->currentUser->getGroup();\n if ($group instanceof \\Gems\\User\\Group) {\n $group->applyGroupToModel($this, false);\n }\n }", "public function testComAdobeCqSocialSyncImplGroupSyncListenerImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.sync.impl.GroupSyncListenerImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function updateGroup() {\n if(!$this->request->is('restful')) {\n try {\n $this->CoGroupMember->updateGroupMemberships($this->request->data['CoGroupMember']['co_group_id'],\n $this->request->data['CoGroupMember']['rows'],\n $this->Session->read('Auth.User.co_person_id'));\n \n $this->Flash->set(_txt('rs.saved'), array('key' => 'success'));\n }\n catch(Exception $e) {\n $this->Flash->set($e->getMessage(), array('key' => 'error'));\n }\n \n // Issue redirect\n \n $this->redirect(array('controller' => 'co_groups',\n 'action' => 'edit',\n $this->request->data['CoGroupMember']['co_group_id'],\n 'co' => $this->cur_co['Co']['id']));\n }\n }", "public function flush_group($group)\n {\n }", "public function afterSyncing() {}", "protected function _flushVars() {\n if (isset($this->LdapObject->id)) {\n $this->LdapObject->id = null;\n }\n if (isset($this->LdapObject->primaryKey)) {\n $this->LdapObject->primaryKey = 'uid';\n }\n \n $this->sforceData = array();\n $this->stagingData = array();\n $this->ldapData = array();\n $this->syncOperation = 'nothing';\n \n }", "public function run()\n {\n $groups = config('groups');\n\n foreach ($groups as $group) {\n $new_group_obj = new Group();\n $new_group_obj->name = $group['name'];\n $new_group_obj->save();\n }\n }", "public function update() {\r\n\r\n // Does the Group object have an id?\r\n if ( is_null( $this->id ) ) trigger_error ( \"Group::update(): Attempt to update a Group object that does not have its ID property set.\", E_USER_ERROR );\r\n \r\n // Update the Group\r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $sql = \"UPDATE \" . DB_PREFIX . \"groups SET title = :title, dashboard = :dashboard, content = :content, themes = :themes, files = :files, settings = :settings, users = :users, status = :status WHERE id = :id\";\r\n \r\n $st = $conn->prepare ( $sql );\r\n $st->bindValue( \":title\", $this->title, PDO::PARAM_STR );\r\n $st->bindValue( \":dashboard\", $this->dashboard, PDO::PARAM_INT );\r\n $st->bindValue( \":content\", $this->content, PDO::PARAM_INT );\r\n $st->bindValue( \":themes\", $this->themes, PDO::PARAM_INT );\r\n $st->bindValue( \":files\", $this->files, PDO::PARAM_INT );\r\n $st->bindValue( \":settings\", $this->settings, PDO::PARAM_INT );\r\n $st->bindValue( \":users\", $this->users, PDO::PARAM_INT );\r\n $st->bindValue( \":status\", $this->status, PDO::PARAM_INT );\r\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $conn = null;\r\n \r\n }", "public function applyChanges()\n {\n $em = $this->doctrine->getManager();\n $em->flush();\n\n // TODO: Can we be sure that the changes are available in the DB now?\n $ch = $this->getMasterRabbit()->channel();\n $msg = new AMQPMessage(\"sync\");\n $ch->basic_publish($msg, \"\", $this->name . \"_master\");\n }", "function sync_groups($dryrun = false) {\n global $USER;\n log_info('---------- started groupsync auth instance ' . $this->instanceid . ' at ' . date('r', time()) . ' ----------');\n\n if (!$this->get_config('syncgroupscron')) {\n log_info('Not set to sync groups, so exiting');\n return true;\n }\n\n // We need to tell the session that we are the admin user, so that we have permission to manipulate groups\n $USER->reanimate(1, 1);\n\n $syncbyattribute = $this->get_config('syncgroupsbyuserfield') && $this->get_config('syncgroupsgroupattribute');\n $syncbyclass = $this->get_config('syncgroupsbyclass') && $this->get_config('syncgroupsgroupclass')\n && $this->get_config('syncgroupsgroupattribute') && $this->get_config('syncgroupsmemberattribute');\n\n $excludelist = $this->get_config('syncgroupsexcludelist');\n $includelist = $this->get_config('syncgroupsincludelist');\n $searchsub = $this->get_config('syncgroupssearchsub');\n $grouptype = $this->get_config('syncgroupsgrouptype');\n $groupattribute = $this->get_config('syncgroupsgroupattribute');\n $docreate = $this->get_config('syncgroupsautocreate');\n\n // If neither one is set, return\n if (!$syncbyattribute && !$syncbyclass) {\n log_info('not set to sync by user attribute or by group objects, so exiting');\n return true;\n }\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"exclusion list : \");\n var_dump($excludelist);\n log_debug(\"inclusion list : \");\n var_dump($includelist);\n }\n\n // fetch userids of current members of that institution\n if ($this->institution == 'mahara') {\n $currentmembers = get_records_sql_assoc('select u.username as username, u.id as id from {usr} u where u.deleted=0 and not exists (select 1 from {usr_institution} ui where ui.usr=u.id)', array());\n }\n else {\n $currentmembers = get_records_sql_assoc('select u.username as username, u.id as id from {usr} u inner join {usr_institution} ui on u.id=ui.usr where u.deleted=0 and ui.institution=?', array($this->institution));\n }\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"current members : \".count($currentmembers));\n var_dump($currentmembers);\n }\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"config. LDAP : \");\n var_dump($this->get_config());\n }\n\n $groups = array();\n if ($syncbyattribute) {\n // get the distinct values of the used attribute by a LDAP search\n // that may be restricted by flags -c or -o\n $groups = array_merge($groups, $this->get_attribute_distinct_values($searchsub));\n }\n\n if ($syncbyclass) {\n $groups = array_merge($groups, $this->ldap_get_grouplist('*', $searchsub));\n }\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"Found LDAP groups : \");\n var_dump($groups);\n }\n\n $nbadded = 0;\n foreach ($groups as $group) {\n $nomatch = false;\n\n log_debug(\"Processing group '{$group}'\");\n\n if (!ldap_sync_filter_name($group, $includelist, $excludelist)) {\n continue;\n }\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"processing group : \");\n var_dump($group);\n }\n\n $ldapusers = array();\n if ($syncbyattribute) {\n $ldapusers = array_merge($ldapusers, $this->get_users_having_attribute_value($group));\n }\n\n if ($syncbyclass) {\n $ldapusers = array_merge($ldapusers, $this->ldap_get_group_members($group));\n }\n\n // test whether this group exists within the institution\n // group.shortname is limited to 255 characters. Unlikely anyone will hit this, but why not?\n $shortname = substr($group, 0, 255);\n if (!$dbgroup = get_record('group', 'shortname', $shortname, 'institution', $this->institution)) {\n if (!$docreate) {\n log_debug('autocreation is off so skipping Mahara not existing group ' . $group);\n continue;\n }\n\n if (count($ldapusers)==0) {\n log_debug('will not autocreate an empty Mahara group ' . $group);\n continue;\n }\n\n try {\n log_info('creating group ' . $group);\n // Make sure the name is unique (across all institutions)\n // group.name only allows 128 characters. In the event of\n // really long group names, we'll arbitrarily truncate them\n $basename = $this->institution . ' : ' . $group;\n $name = substr($basename, 0, 128);\n $n = 0;\n while (record_exists('group', 'name', $name)) {\n $n++;\n $tail = \" $n\";\n $name .= substr($basename, 0, (128-strlen($tail))) . $tail;\n }\n $dbgroup = array();\n $dbgroup['name'] = $name;\n $dbgroup['institution'] = $this->institution;\n $dbgroup['shortname'] = $shortname;\n $dbgroup['grouptype'] = $grouptype; // default standard (change to course)\n $dbgroup['controlled'] = 1; //definitively\n $nbadded++;\n if (!$dryrun) {\n $groupid = group_create($dbgroup);\n }\n }\n catch (Exception $ex) {\n log_warn($ex->getMessage());\n continue;\n }\n }\n else {\n $groupid = $dbgroup->id;\n log_debug('group exists ' . $group);\n }\n // now it does exist see what members should be added/removed\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug($group . ' : ');\n var_dump($ldapusers);\n }\n\n // Puts the site's \"admin\" user into the group as a group admin\n $members = array('1' => 'admin'); //must be set otherwise fatal error group_update_members: no group admins listed for group\n foreach ($ldapusers as $username) {\n if (isset($currentmembers[$username])) {\n $id = $currentmembers[$username]->id;\n $members[$id] = 'member';\n }\n }\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug('new members list : '.count($members));\n var_dump($members);\n }\n\n unset($ldapusers); //try to save memory before memory consuming call to API\n\n $result = $dryrun ? false : group_update_members($groupid, $members);\n if ($result) {\n log_info(\" -> added : {$result['added']} removed : {$result['removed']} updated : {$result['updated']}\");\n }\n else {\n log_debug('-> no change for ' . $group);\n }\n unset ($members);\n //break;\n }\n log_info('---------- finished groupsync auth instance ' . $this->instanceid . ' at ' . date('r', time()) . ' ----------');\n return true;\n }", "function updateProjectGroups() {\n $projects_table = TABLE_PREFIX . 'projects';\n $project_groups_table = TABLE_PREFIX . 'project_groups';\n $categories_table = TABLE_PREFIX . 'categories';\n $config_options_table = TABLE_PREFIX . 'config_options';\n\n try {\n $templates_group_id = DB::executeFirstCell(\"SELECT value FROM $config_options_table WHERE name = ?\", 'project_templates_group');\n $templates_group_id = $templates_group_id ? (integer) unserialize($templates_group_id) : 0;\n\n $templates_category_id = 0;\n\n DB::execute(\"ALTER TABLE $projects_table ADD category_id int(10) unsigned null default null AFTER group_id\");\n\n $rows = DB::execute(\"SELECT id, name FROM $project_groups_table\");\n if($rows) {\n list($admin_user_id, $admin_display_name, $admin_email_address) = $this->getFirstAdministrator();\n\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $categories_table (type, name, created_on, created_by_id, created_by_name, created_by_email) VALUES (?, ?, UTC_TIMESTAMP(), ?, ?, ?)\", 'ProjectCategory', $row['name'], $admin_user_id, $admin_display_name, $admin_email_address);\n\n $category_id = DB::lastInsertId();\n\n DB::execute(\"UPDATE $projects_table SET category_id = ? WHERE group_id = ?\", $category_id, $row['id']);\n\n if($row['id'] == $templates_group_id) {\n $templates_category_id = $category_id;\n } // if\n } // foreach\n } // if\n\n DB::execute(\"UPDATE $config_options_table SET name = ?, value = ? WHERE name = ?\", 'project_templates_category', serialize($templates_category_id), 'project_templates_group');\n DB::execute(\"ALTER TABLE $projects_table DROP group_id\");\n DB::execute(\"ALTER TABLE $projects_table ADD INDEX (company_id)\");\n DB::execute(\"DROP TABLE $project_groups_table\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "protected function resetSynchronised()\n {\n /*\n * Lists\n */\n\n /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */\n $lists = Mage::getModel('lapostaconnect/list')->getCollection();\n\n /** @var $list Laposta_Connect_Model_List */\n foreach ($lists as $list) {\n $list->setLapostaId('');\n $list->setWebhookToken('');\n $list->setSyncTime(null);\n }\n\n $lists->save();\n\n Mage::helper('lapostaconnect')->log('Lists reset OK.');\n\n /*\n * Fields\n */\n\n $fields = Mage::getModel('lapostaconnect/field')->getCollection();\n\n /** @var $field Laposta_Connect_Model_Field */\n foreach ($fields as $field) {\n $field->setLapostaId('');\n $field->setLapostaTag('');\n $field->setSyncTime(null);\n }\n\n $fields->save();\n\n Mage::helper('lapostaconnect')->log('Fields reset OK.');\n\n /*\n * Subscribers\n */\n\n /** @var $subscribers Laposta_Connect_Model_Mysql4_Subscriber_Collection */\n $subscribers = Mage::getModel('lapostaconnect/subscriber')->getCollection();\n\n /** @var $subscriber Laposta_Connect_Model_Subscriber */\n foreach ($subscribers as $subscriber) {\n $subscriber->setLapostaId('');\n $subscriber->setSyncTime(null);\n }\n\n $subscribers->save();\n\n Mage::helper('lapostaconnect')->log('Subscribers reset OK.');\n }", "public function syncGroups($groups)\n {\n $groups = is_array($groups) || $groups instanceof Collection ? $groups : func_get_args();\n\n $this->groups()->detach();\n\n $this->assignGroup($groups);\n }", "function auth_ldap_sync_groups(\n $institutionname,\n $syncbyclass = false,\n $excludelist = null,\n $includelist = null,\n $onlycontexts = null,\n $searchsub = null,\n $grouptype = null,\n $docreate = null,\n $nestedgroups = null,\n $groupclass = null,\n $groupattribute = null,\n $syncbyattribute = false,\n $userattribute = null,\n $attrgroupnames = null,\n $dryrun = false\n) {\n log_info('---------- started institution group sync for \"' . $institutionname . '\" at ' . date('r', time()) . ' ----------');\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"exclusion list : \");\n var_dump($excludelist);\n log_debug(\"inclusion list : \");\n var_dump($includelist);\n }\n\n $auths = get_records_select_array('auth_instance', \"authname in ('cas', 'ldap') and institution=?\", array($institutionname));\n\n if (get_config('auth_ldap_debug_sync_cron')) {\n log_debug(\"auths candidates : \");\n var_dump($auths);\n }\n\n if (count($auths) == 0) {\n log_warn(get_string('nomatchingauths', 'auth.ldap'));\n return false;\n }\n\n $result = true;\n foreach ($auths as $auth) {\n $instance = new AuthLdap($auth->id);\n $instance->set_config('syncgroupscron', true);\n $instance->set_config('syncgroupsbyclass', $syncbyclass);\n $instance->set_config('syncgroupsbyuserfield', $syncbyattribute);\n if ($excludelist !== null) {\n if (!is_array($excludelist)) {\n $excludelist = preg_split('/\\s*,\\s*/', trim($excludelist));\n }\n $instance->set_config('syncgroupsexcludelist', $excludelist);\n }\n if ($includelist !== null) {\n if (!is_array($includelist)) {\n $includelist = preg_split('/\\s*,\\s*/', trim($includelist));\n }\n $instance->set_config('syncgroupsincludelist', $includelist);\n }\n if ($onlycontexts !== null) {\n $instance->set_config('syncgroupscontexts', $onlycontexts);\n }\n if ($searchsub !== null) {\n $instance->set_config('syncgroupssearchsub', $searchsub);\n }\n if ($grouptype !== null) {\n $instance->set_config('syncgroupsgrouptype', $grouptype);\n }\n if ($nestedgroups !== null) {\n $instance->set_config('nestedgroups', $nestedgroups);\n }\n if ($groupclass !== null) {\n $instance->set_config('syncgroupsgroupclass', $groupclass);\n }\n if ($groupattribute !== null) {\n $instance->set_config('syncgroupsgroupattribute', $groupattribute);\n }\n if ($docreate !== null) {\n $instance->set_config('syncgroupsautocreate', $docreate);\n }\n\n $result = $result && $instance->sync_groups($dryrun);\n }\n log_info('---------- finished institution group sync at ' . date('r', time()) . ' ----------');\n return $result;\n}", "public function syncGroups(...$groups): HasGroups;", "public function run_sync_process(){\n //Verify if module is enabled\n if(Mage::helper('connector')->isEnabled()) {\n\n \t//Set sync type\n \t\t$sync_type = Minematic_Connector_Model_Config::SYNC_TYPE_MAGENTO_SIDE;\n\n //Log Starting sync process msg\n Mage::helper('connector')->logSyncProcess(\"Starting synchronization task job...\", $sync_type);\n\n try {\n\n //Sync all data\n Mage::getModel('connector/synchronization')->sync_data($sync_type, Minematic_Connector_Model_Config::DATA_TYPE_ALL);\n\n } catch (Exception $e) {\n\n \t// Logging Exceptions\n Mage::helper('connector')->logSyncProcess($e->getMessage(), $sync_type, \"ERROR\");\n \t\n }\n\n //Log Finishing sync process msg\n Mage::helper('connector')->logSyncProcess(\"Finishing synchronization task job.\", $sync_type);\n }\n }", "public function sync()\n {\n $result = '';\n foreach ($this->hosts() as $host) {\n $result .= $host;\n $result .= \"\\n\";\n }\n file_put_contents($this->configFilePath(), $result);\n }", "public function postFlush(): void\n {\n try {\n foreach ($this->createdObjects as $object) {\n $this->publishUpdate($object, $this->createdObjects[$object], 'create');\n }\n\n foreach ($this->updatedObjects as $object) {\n $this->publishUpdate($object, $this->updatedObjects[$object], 'update');\n }\n\n foreach ($this->deletedObjects as $object) {\n $this->publishUpdate($object, $this->deletedObjects[$object], 'delete');\n }\n } finally {\n $this->reset();\n }\n }", "public function SaveGroupCategory() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstGroup) $this->objGroupCategory->GroupId = $this->lstGroup->SelectedValue;\n\t\t\t\tif ($this->calDateRefreshed) $this->objGroupCategory->DateRefreshed = $this->calDateRefreshed->DateTime;\n\t\t\t\tif ($this->txtProcessTimeMs) $this->objGroupCategory->ProcessTimeMs = $this->txtProcessTimeMs->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the GroupCategory object\n\t\t\t\t$this->objGroupCategory->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function sync() {\n\t\t// TODO\n\t}", "public function postProcess(): void {\n $groupsToAddTo = (array) $this->getSubmittedValue('groups');\n $summaryInfo = ['groups' => [], 'tags' => []];\n foreach ($groupsToAddTo as $groupID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which groups were created vs already existed.\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => Group::get(FALSE)\n ->addWhere('id', '=', $groupID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n\n if ($this->getSubmittedValue('newGroupName')) {\n /* Create a new group */\n $groupsToAddTo[] = $groupID = Group::create(FALSE)->setValues([\n 'title' => $this->getSubmittedValue('newGroupName'),\n 'description' => $this->getSubmittedValue('newGroupDesc'),\n 'group_type' => $this->getSubmittedValue('newGroupType') ?? [],\n 'is_active' => TRUE,\n ])->execute()->first()['id'];\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => $this->getSubmittedValue('newGroupName'),\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n $tagsToAdd = (array) $this->getSubmittedValue('tag');\n foreach ($tagsToAdd as $tagID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which tags were created vs already existed.\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => Tag::get(FALSE)\n ->addWhere('id', '=', $tagID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n if ($this->getSubmittedValue('newTagName')) {\n $tagsToAdd[] = $tagID = Tag::create(FALSE)->setValues([\n 'name' => $this->getSubmittedValue('newTagName'),\n 'description' => $this->getSubmittedValue('newTagDesc'),\n 'is_selectable' => TRUE,\n 'used_for' => 'civicrm_contact',\n //NYSS new tags during import should be imported as keywords\n 'parent_id'\t=> 296,\n ])->execute()->first()['id'];\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => $this->getSubmittedValue('newTagName'),\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n // Store the actions to take on each row & the data to present at the end to the userJob.\n $this->updateUserJobMetadata('post_actions', [\n 'group' => $groupsToAddTo,\n 'tag' => $tagsToAdd,\n ]);\n $this->updateUserJobMetadata('summary_info', $summaryInfo);\n\n // If ACL applies to the current user, update cache before running the import.\n if (!CRM_Core_Permission::check('view all contacts')) {\n $userID = CRM_Core_Session::getLoggedInContactID();\n CRM_ACL_BAO_Cache::deleteEntry($userID);\n CRM_ACL_BAO_Cache::deleteContactCacheEntry($userID);\n }\n\n $this->runTheImport();\n }", "public function sync($data, EntityManagerInterface $em, SyncMapping $mapping, $serializationGroups = array(\"sync_basic\"));", "public function syncDataNode() {}", "public static function auth_ldap_sync_cron() {\n $auths = get_records_array('auth_instance', 'authname', 'ldap', 'id', 'id');\n if (!$auths) {\n return;\n }\n foreach ($auths as $auth) {\n /* @var $authobj AuthLdap */\n $authobj = AuthFactory::create($auth->id);\n // Each instance will decide for itself whether it should sync users and/or groups\n // User sync needs to be called before group sync in order for new users to wind\n // up in the correct groups\n $authobj->sync_users();\n $authobj->sync_groups();\n }\n }", "public function syncgroups()\n\t{\n\t\treturn $this->Players->syncgroups();\n\t}", "public function sync();", "public function sync();", "public function modify_cache_groups() {\n\t\t$cache = $GLOBALS['wp_object_cache'];\n\n\t\t$reflection = new ReflectionClass( $cache );\n\t\tif ( ! $reflection->hasProperty( 'global_groups' ) ) {\n\t\t\twp_die( 'Your object cache plugin is not compatible with WP_Separate_User_Base' );\n\t\t}\n\n\t\t$global_groups = $reflection->getProperty( 'global_groups' );\n\t\t$global_groups->setAccessible( true );\n\t\t$groups = $global_groups->getValue( $cache );\n\n\t\tunset( $groups['useremail'] );\n\n\t\t$global_groups->setValue( $cache, $groups );\n\t}", "public function admin_change(){\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n\t\t\t// Edit the group\n\t\t\t$satellite_ids = array();\n\t\t\t\n\t\t\t// Loop through and add all of the satellite IDs\n\t\t\tforeach($_POST['satellites'] as $satellite_id){\n\t\t\t\tarray_push($satellite_ids, $satellite_id);\n\t\t\t}\n\t\t\t\n\t\t\t// Assemble query\n $show_on_home = (isset($_POST['show_on_home']))?'1':'0';\n $default_on_home = (isset($_POST['default_on_home']))?'1':'0';\n\t\t\t$group_changes['Group'] = array(\n 'id' => $group['Group']['id'],\n 'name' => $_POST['group_name'],\n 'description' => $_POST['group_description'],\n 'show_on_home' => $show_on_home,\n 'default_on_home' => $default_on_home,\n 'updated_on' =>date ('Y-m-d H:i:s', time())\n );\n\t\t\t$group_changes['Satellite'] = array('Satellite' => $satellite_ids);\n\t\t\t\n\t\t\t$edit_group = $this->Group->save($group_changes);\n\t\t\t\n\t\t\tif ($edit_group){\n\t\t\t\t$this->Session->setFlash('The group has been edited successfully.', 'default', array('class' => 'alert alert-success'));\n\t\t\t\tCakeLog::write('admin', '[success] The group \\''.$_POST['group_name'].'\\' has been edited.');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('An error occured while editing that group. Please try again.', 'default', array('class' => 'alert alert-error'));\n\t\t\t\tCakeLog::write('admin', '[error] Error editing the group \\''.$_POST['group_name'].'\\'.');\n\t\t\t}\n\t\t\t\n\t\t\t$this->redirect(array('controller' => 'group', 'action' => 'index'));\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "public function UpdateGroup()\n {\n $queryUpdateGroup = \"UPDATE groups SET\n group_name=:group_name,\n description=:description,\n department_id=:department_id\n WHERE id=:group_id\";\n\n $updateGroup = $this->sqlDataBase->prepare($queryUpdateGroup);\n $updateGroup->execute(array(\":group_name\"=>$this->groupName,\":description\"=>$this->description,\":department_id\"=>$this->departmentId,\":group_id\"=>$this->groupId));\n }", "function flush() {\n\t\t\tif ( function_exists( 'is_site_admin' ) || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) )\n\t\t\t\treturn true;\n\n\t\t\t$ret = true;\n\t\t\tforeach ( array_keys( $this->mc ) as $group )\n\t\t\t\t$ret &= $this->mc[$group]->flush();\n\t\t\treturn $ret;\n\t\t}", "public function flush() {\n if ($this->c_owner) {\n if ($this->update('owner', $this->owner, Project::$tableName)) {\n $this->c_owner = false;\n }\n }\n if ($this->c_name) {\n if ($this->update('name', $this->name, Project::$tableName)) {\n $this->c_name = false;\n }\n }\n if ($this->c_description) {\n if ($this->update('description', $this->description, Project::$tableName)) {\n $this->c_description = false;\n }\n }\n \n if ($this->c_deadline) {\n if ($this->update('deadline', $this->deadline, Project::$tableName)) {\n $this->c_deadline = false;\n }\n }\n if ($this->c_time) {\n if ($this->update('time', $this->time, Project::$tableName)) {\n $this->c_time = false;\n }\n }\n }", "function rebuild_group_cache()\n\t{\n\t\t$this->ipsclass->cache['group_cache'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => \"*\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups'\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $i = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) );\n\t}", "public function update(Group $root);", "public function testSyncEntitiesFromOneRemoteService()\n {\n $this->setupRemoteService();\n\n //Setup the synchonization configuration\n $this->setupConfiguration();\n\n //Setup the synchronization state\n $this->setSyncState();\n\n //Perform synchronization\n $this->manager->execute(array('product'));\n\n\n //Test if all requested entities have been synced\n $state = $this->manager->getState('product');\n\n $this->assertEquals($state->getLastValue(), 10);\n\n }", "function reload_all_sync() {\n\tglobal $config;\n\n\t/* parse config.xml again */\n\t$config = parse_config(true);\n\n\t/* set up our timezone */\n\tsystem_timezone_configure();\n\n\t/* set up our hostname */\n\tsystem_hostname_configure();\n\n\t/* make hosts file */\n\tsystem_hosts_generate();\n\n\t/* generate resolv.conf */\n\tsystem_resolvconf_generate();\n\n\t/* enable routing */\n\tsystem_routing_enable();\n\n\t/* set up interfaces */\n\tinterfaces_configure();\n\n\t/* start dyndns service */\n\tservices_dyndns_configure();\n\n\t/* configure cron service */\n\tconfigure_cron();\n\n\t/* start the NTP client */\n\tsystem_ntp_configure();\n\n\t/* sync pw database */\n\tunlink_if_exists(\"/etc/spwd.db.tmp\");\n\tmwexec(\"/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd\");\n\n\t/* restart sshd */\n\tsend_event(\"service restart sshd\");\n\n\t/* restart webConfigurator if needed */\n\tsend_event(\"service restart webgui\");\n}", "private function syncCatGroupsWithLayouts()\n\t{\n\t\t$cat_groups = array();\n\n\t\tforeach (explode('|', $this->cat_group) as $group_id)\n\t\t{\n\t\t\t$cat_groups['categories[cat_group_id_'.$group_id.']'] = TRUE;\n\t\t}\n\n\t\tforeach ($this->ChannelLayouts as $channel_layout)\n\t\t{\n\t\t\t$field_layout = $channel_layout->field_layout;\n\t\t\t$new_cat_tab = 0;\n\n\t\t\tforeach ($field_layout as $i => $section)\n\t\t\t{\n\t\t\t\tif ($section['id'] == 'categories' && $section['visible'])\n\t\t\t\t{\n\t\t\t\t\t$new_cat_tab = $i;\n\t\t\t\t}\n\n\t\t\t\tforeach ($section['fields'] as $j => $field_info)\n\t\t\t\t{\n\t\t\t\t\t// All category fields begin with \"categories\"\n\t\t\t\t\tif (strpos($field_info['field'], 'categories') === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$field_name = $field_info['field'];\n\n\t\t\t\t\t\t// Is it already accounted for?\n\t\t\t\t\t\tif (in_array($field_name, array_keys($cat_groups)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($cat_groups[$field_name]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If not, it was removed and needs to be deleted\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($field_layout[$i]['fields'][$j]);\n\n\t\t\t\t\t\t\t// Re-index to ensure flat, zero-indexed array\n\t\t\t\t\t\t\t$field_layout[$i]['fields'] = array_values($field_layout[$i]['fields']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the new category groups\n\t\t\tforeach (array_keys($cat_groups) as $cat_group)\n\t\t\t{\n\t\t\t\t$field_info = array(\n\t\t\t\t\t'field' => $cat_group,\n\t\t\t\t\t'visible' => TRUE,\n\t\t\t\t\t'collapsed' => FALSE\n\t\t\t\t);\n\t\t\t\t$field_layout[$new_cat_tab]['fields'][] = $field_info;\n\t\t\t}\n\n\t\t\t$channel_layout->field_layout = $field_layout;\n\t\t\t$channel_layout->save();\n\t\t}\n\t}", "public static function syncActiveJobs()\n {\n $hosts = Host::getAll();\n\n foreach ($hosts as $Host) {\n\n // Get pending jobs for host\n $pendingJobs = static::getAllByWhere([\n 'Status' => 'pending',\n 'HostID' => $Host->ID\n ]);\n\n if (!$pendingJobs) {\n continue;\n }\n\n // Get active jobs from host\n $activeJobs = $Host->executeRequest('/jobs', 'GET')['jobs'];\n\n // Search active jobs for pending jobs to find updates\n foreach ($pendingJobs as $PendingJob) {\n\n // Update any lost jobs\n if (empty($activeJobs[$PendingJob->Site->Handle])) {\n $PendingJob->Status = 'failed';\n $PendingJob->Result = 'lost on server';\n if ($PendingJob->Site) {\n $PendingJob->Site->Updating = false;\n }\n $PendingJob->save();\n continue;\n }\n\n $activeJob = $activeJobs[$PendingJob->Site->Handle][$PendingJob->UID];\n\n if ($activeJob && $activeJob['status'] !== 'pending') {\n\n // Update job\n $PendingJob->Status = $activeJob['status'];\n if (!empty($activeJob['started'])) {\n $PendingJob->Started = $activeJob['started'] / 1000;\n }\n if (!empty($activeJob['completed'])) {\n $PendingJob->Completed = $activeJob['completed'] / 1000;\n }\n\n if (!empty($activeJob['command']['result'])) {\n if (strlen(json_encode($activeJob['command']['result'])) > 60000) {\n $PendingJob->Result = 'Output too long';\n } else {\n $PendingJob->Result = $activeJob['command']['result'];\n }\n } elseif (!empty($activeJob['message'])) {\n $PendingJob->Result = $activeJob['message'];\n }\n $PendingJob->save();\n\n // Update site on vfs update\n if ($PendingJob->Action == 'vfs-update') {\n\n // Get updated site record\n $Site = Site::getByID($PendingJob->SiteID);\n\n // Skip vfs-update actions on failed job\n if ($PendingJob->Status == 'failed') {\n $Site->Updating = false;\n $Site->save();\n continue;\n }\n\n // Update pending job's site\n $initialUpdate = !boolval($Site->ParentCursor);\n $Site->ParentCursor = $activeJob['command']['result']['parentCursor'];\n $Site->LocalCursor = $activeJob['command']['result']['localCursor'];\n $Site->Updating = false;\n $Site->save();\n\n // Conditionally update child site\n if (!empty($activeJob['command']['updateChild']) && $activeJob['command']['updateChild'] === true) {\n $childSites = Site::getAllByField('ParentSiteID', $Site->ID);\n foreach ($childSites as $ChildSite) {\n $ChildSite->requestFileSystemUpdate();\n }\n }\n\n // Fire initial vfs update event\n if ($initialUpdate) {\n \\Emergence\\EventBus::fireEvent(\n 'afterInitialVFSUpdate',\n $Site->getRootClass(),\n [\n 'Record' => $Site,\n 'Job' => $PendingJob\n ]\n );\n }\n }\n }\n }\n }\n }", "public function refreshGroups()\n {\n $this->sortedAttributeGroups = AttributeGroup::whereAttributableType($this->typeClass)\n ->orderBy('position')->get();\n\n $this->showGroupCreate = false;\n }", "function wp_cache_flush_group($group)\n {\n }", "public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }", "public static function syncCompanies()\n {\n $ak_company_users = self::find()->where(['space_id' => NULL])->all();\n\n foreach($ak_company_users as $ak_company_user)\n {\n $ak_copmany = new Companies();\n $ak_copmany = Json::decode($ak_copmany->view($ak_company_user->akc_id));\n\n if(!empty($ak_copmany))\n {\n $space = Space::findOne(['name' => $ak_copmany['data']['name']]);\n\n if(!empty($space))\n {\n // AkauntingCompany::linkSpace($space->id, $ak_copmany['data']['id']);\n\n $ak_company_user->space_id = $space->id;\n if(!$ak_company_user->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($ak_company_user->getErrors()));\n }\n }\n }\n }\n }", "public function run(): void\n {\n $groups = factory(Group::class, 20)->create();\n $group = $groups->first();\n $user = User::query()->inRandomOrder()->first();\n $server = Server::query()->inRandomOrder()->first();\n\n /** @var \\App\\Models\\Group $group */\n $group->users()->attach($user);\n $group->servers()->attach($server);\n }", "private function synchronize() {\n\t\t$response = $this->send(self::$synchronize_uri, self::SYNC_SIZE);\n\t\t$this->_set_sync($response);\n\t}", "public function computeChangeSets()\n {\n // Compute changes for INSERTed entities first. This must always happen.\n $this->computeScheduleInsertsChangeSets();\n // Compute changes for other MANAGED entities. Change tracking policies take effect here.\n foreach ($this->identityMap as $className => $entities) {\n $class = $this->manager->getClassMetadata($className);\n // Skip class if instances are read-only\n if ($class->isReadOnly()) {\n continue;\n }\n // If change tracking is explicit or happens through notification, then only compute\n // changes on entities of that type that are explicitly marked for synchronization.\n switch (true) {\n case ($class->isChangeTrackingDeferredImplicit()):\n $entitiesToProcess = $entities;\n break;\n case (isset($this->scheduledForSynchronization[$className])):\n $entitiesToProcess = $this->scheduledForSynchronization[$className];\n break;\n default:\n $entitiesToProcess = [];\n }\n foreach ($entitiesToProcess as $entity) {\n // Ignore uninitialized proxy objects\n if ($entity instanceof Proxy && !$entity->__isInitialized__) {\n continue;\n }\n // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here.\n $oid = spl_object_hash($entity);\n if (!isset($this->entityInsertions[$oid]) &&\n !isset($this->entityDeletions[$oid]) &&\n isset($this->entityStates[$oid])\n ) {\n $this->computeChangeSet($class, $entity);\n }\n }\n }\n }", "public function update() {\n if(!$this->request->is('restful')) {\n $targetCoPersonId = $this->request->data['CoGroupMember']['co_person_id'];\n $userCoPersonId = $this->Session->read('Auth.User.co_person_id');\n $requesterIsAdmin = $this->Role->isCoAdmin($userCoPersonId, $this->cur_co['Co']['id'])\n || $this->Role->identifierIsCmpAdmin($this->Session->read('Auth.User.username'));\n \n try {\n $this->CoGroupMember->updateMemberships($targetCoPersonId,\n $this->request->data['CoGroupMember']['rows'],\n $userCoPersonId,\n $requesterIsAdmin);\n \n $this->Flash->set(_txt('rs.saved'), array('key' => 'success'));\n }\n catch(Exception $e) {\n $this->Flash->set($e->getMessage(), array('key' => 'error'));\n }\n \n // Issue redirect\n $redir = array();\n $redir['controller'] = 'co_groups';\n $redir['action'] = 'select';\n $redir['co'] = $this->cur_co['Co']['id'];\n\n // If the current user is not the same as the target CO Person for whom\n // memberships are being managed then include the copersonid parameter.\n if($targetCoPersonId != $userCoPersonId) {\n $redir['copersonid'] = $targetCoPersonId;\n }\n\n $this->redirect($redir);\n }\n }", "function updateGroup() {\n\t\t$groupId = Request::getUserVar('groupId') === null? null : (int) Request::getUserVar('groupId');\n\t\tif ($groupId === null) {\n\t\t\t$this->validate();\n\t\t\t$group = null;\n\t\t} else {\n\t\t\t$this->validate($groupId);\n\t\t\t$group =& $this->group;\n\t\t}\n\t\t$this->setupTemplate($group);\n\n\t\timport('classes.manager.form.GroupForm');\n\n\t\t$groupForm = new GroupForm($group);\n\t\t$groupForm->readInputData();\n\n\t\tif ($groupForm->validate()) {\n\t\t\t$groupForm->execute();\n\t\t\tRequest::redirect(null, null, 'groups');\n\t\t} else {\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'groups'), 'manager.groups'));\n\n\t\t\t$templateMgr->assign('pageTitle',\n\t\t\t\t$group?\n\t\t\t\t\t'manager.groups.editTitle':\n\t\t\t\t\t'manager.groups.createTitle'\n\t\t\t);\n\n\t\t\t$groupForm->display();\n\t\t}\n\t}", "function mailrelayStartSync() {\n $hostname = trim(variable_get('mailrelay_hostname', ''));\n $apiKey = trim(variable_get('mailrelay_api_key', ''));\n\n $form = array();\n if (!$hostname || !$apiKey) {\n // error in settings\n drupal_set_message(t('Mailrelay Sync has not been properly configured. Syncing will not work until you finish configuration'), 'error');\n return false;\n } else {\n // verify\n if (substr($hostname, 0, 7) == 'http://') $hostname = substr($hostname, 7);\n\n // Initialize CURL\n $url = 'https://' . $hostname . '/ccm/admin/api/version/2/&type=json';\n $curl = curl_init($url);\n\n // Call getGroups\n $params = array(\n 'function' => 'getGroups',\n 'apiKey' => $apiKey\n );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $params);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_SSLVERSION, 3);\n\n // Set headers\n $headers = array(\n 'X-Request-Origin: Drupal7|1.2|' . VERSION\n );\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($curl);\n $jsonResult = json_decode($result);\n\n if (!$jsonResult->status) {\n // error getting groups\n drupal_set_message(t('Error, could not fetch data'), 'error');\n return false;\n } else {\n // extract all groups\n $options = array();\n $groups = $jsonResult->data;\n foreach($groups as $group) {\n $options[$group->id] = $group->name;\n }\n\n // show the form to sync the groups\n $form = mailrelayForm($options, $apiKey);\n return $form;\n }\n }\n}", "function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }", "public function onAfterWrite()\n {\n $customerGroup = self::get_customer_group();\n if ($customerGroup) {\n $existingMembers = $customerGroup->Members();\n if ($existingMembers) {\n $existingMembers->add($this->owner);\n }\n }\n }", "protected function update(){\n\t\t$this->aggregations = array();\n\t\t\n\t\t// also update any groups\n\t\tforeach($this->getGroups() as $group){\n\t\t\t$group->update();\n\t\t}\n\t}", "function save_metabox( $post_id, $post ) {\n\n\t// Check if user has permissions to save data.\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not an autosave.\n\tif ( wp_is_post_autosave( $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not a revision.\n\tif ( wp_is_post_revision( $post_id ) ) {\n\t\treturn;\n\t}\n\tif ( ! in_array( $post->post_type, \\Distributor\\Waves\\get_distributable_custom_post_types(), true ) ) {\n\t\treturn;\n\t}\n\tif ( 'auto-draft' === $post->post_status ) {\n\t\treturn;\n\t}\n\n\tif ( ! isset( $_POST['connection_groups_field'] ) || ! wp_verify_nonce( $_POST['connection_groups_field'], 'save_connection_groups' ) ) {\n\t\treturn;\n\t}\n\t$group_ids = $_POST['tax_input']['dt_ext_connection_group'] ?? array();\n\t$groups = array();\n\tforeach ( $group_ids as $group_id ) {\n\t\t$term = get_term_by( 'id', $group_id, 'dt_ext_connection_group' );\n\t\t$groups[] = $term->slug;\n\t}\n\tupdate_post_meta( $post_id, 'dt_connection_groups', $groups );\n\n\t$groups = get_post_meta( $post_id, 'dt_connection_groups', true );\n\n\tif ( ! empty( $groups ) && is_array( $groups ) ) {\n\t\t$pushed_groups = get_post_meta( $post_id, 'dt_connection_groups_pushed', true );\n\n\t\tif ( ! empty( $pushed_groups ) ) {\n\t\t\tif ( ! empty( array_diff( $groups, $pushed_groups ) ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'dt_connection_groups_pushing', array_diff( $groups, $pushed_groups ) );\n\t\t\t}\n\t\t} else {\n\t\t\tupdate_post_meta( $post_id, 'dt_connection_groups_pushing', $groups );\n\t\t}\n\t}\n\n\t/*TODO: find better place for this */\n\tif ( ! wp_next_scheduled( 'dt_push_groups_hook' ) ) {\n\t\twp_schedule_single_event( time(), 'dt_push_groups_hook' );\n\t}\n}", "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "public function testUpdateLanguageGroup() {\n foreach ($this->testCases['LanguageGroup'] as $key => $testCase) {\n $langGroup = new LanguageGroup();\n $langGroup->setGroupName($testCase['group_name']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('updateLanguageGroup')\n ->will($this->returnValue(TRUE));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->updateLanguageGroup($langGroup);\n $this->assertTrue($result);\n }\n }", "public function sync()\n {\n SyncServer::dispatch($this);\n }", "public function flushChanges()\n {\n $this->om->flush();\n }", "public static function flush( $group_id ) {\n\t\t$group = Red_Group::get( $group_id );\n\n\t\tif ( is_object( $group ) ) {\n\t\t\t$module = self::get( $group->get_module_id() );\n\n\t\t\tif ( $module ) {\n\t\t\t\t$module->flush_module();\n\t\t\t}\n\t\t}\n\t}", "public function save()\n {\n // Do not save children, because they are fake objects\n if (false === $this->parent_target_group) {\n $pre_save_object = new self($this->target_group_id);\n\n $query = 'INSERT INTO ';\n if ($this->target_group_id > 0) {\n $query = 'UPDATE ';\n }\n $query .= rex::getTablePrefix().'d2u_courses_target_groups SET '\n .'`name` = \"'. addslashes($this->name) .'\", '\n .'picture = \"'. $this->picture .'\", '\n .'updatedate = CURRENT_TIMESTAMP ';\n if (rex_plugin::get('d2u_courses', 'kufer_sync')->isAvailable()) {\n $query .= ', kufer_categories = \"'. implode(PHP_EOL, $this->kufer_categories) .'\"'\n .', kufer_target_group_name = \"'. $this->kufer_target_group_name .'\"';\n }\n if ($this->target_group_id > 0) {\n $query .= ' WHERE target_group_id = '. $this->target_group_id;\n }\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n if (0 === $this->target_group_id) {\n $this->target_group_id = (int) $result->getLastId();\n }\n\n if ($this->priority !== $pre_save_object->priority) {\n $this->setPriority();\n }\n\n if (!$result->hasError() && $pre_save_object->name !== $this->name) {\n d2u_addon_backend_helper::generateUrlCache('target_group_id');\n d2u_addon_backend_helper::generateUrlCache('target_group_child_id');\n }\n\n return !$result->hasError();\n }\n\n return false;\n\n }", "public function commit(): void\n {\n $this->eventDispatcher->dispatchPreFlush();\n\n if (\n $this->objectsToPersist === [] &&\n $this->objectsToUpdate === [] &&\n $this->objectsToRemove === []\n ) {\n return; // Nothing to do.\n }\n\n $objects = array_merge(\n $this->objectsToPersist,\n $this->objectsToUpdate,\n $this->objectsToRemove,\n );\n $this->eventDispatcher->dispatchPreFlushLifecycleCallbacks($objects);\n\n $this->eventDispatcher->dispatchOnFlush();\n\n $this->persister->executePersists();\n $this->persister->executeUpdates();\n $this->persister->executeRemoves();\n\n $this->eventDispatcher->dispatchPostFlush();\n\n $this->objectsToPersist = [];\n $this->objectsToUpdate = [];\n $this->objectsToRemove = [];\n $this->objectChangeSets = new ChangeSets();\n }", "function acf_flush_field_group_cache($field_group)\n{\n}", "public function beforeSyncing() {}", "public function saveEditedGroupData($group) {\n\t\t\t$info = getRequest('data');\n\n\t\t\t$title = getArrayKey($info, 'title');\n\t\t\t$name = getArrayKey($info, 'name');\n\t\t\t$is_visible = getArrayKey($info, 'is_visible');\n\t\t\t$tip = getArrayKey($info, 'tip');\n\n\t\t\tif($group instanceof iUmiFieldsGroup) {\n\t\t\t\t$group->setName($name);\n\t\t\t\t$group->setTitle($title);\n\t\t\t\t$group->setIsVisible($is_visible);\n\t\t\t\t$group->setIsActive(true);\n\t\t\t\t$group->setTip($tip);\n\t\t\t\t$group->commit();\n\t\t\t} else {\n\t\t\t\tthrow new coreException(\"Expected instance of type umiFieldsGroup\");\n\t\t\t}\n\t\t}", "function updateMemberGroup()\n {\n // ------------------------------------\n // Only super admins can administrate member groups\n // ------------------------------------\n\n if (Session::userdata('group_id') != 1) {\n return Cp::unauthorizedAccess(__('members.only_superadmins_can_admin_groups'));\n }\n\n $edit = (bool) Request::has('group_id');\n\n $group_id = Request::input('group_id');\n $clone_id = Request::input('clone_id');\n\n unset($_POST['group_id']);\n unset($_POST['clone_id']);\n\n // No group name\n if ( ! Request::input('group_name')) {\n return Cp::errorMessage(__('members.missing_group_name'));\n }\n\n $return = (Request::has('return'));\n\n $site_ids = [];\n $plugin_ids = [];\n $weblog_ids = [];\n $template_ids = [];\n\n // ------------------------------------\n // Remove and Store Weblog and Template Permissions\n // ------------------------------------\n\n $data = [\n 'group_name' => Request::input('group_name'),\n 'group_description' => Request::input('group_description'),\n ];\n\n $duplicate = DB::table('member_groups')\n ->where('group_name', $data['group_name']);\n\n if (!empty($group_id)) {\n $duplicate->where('group_id', '!=', $group_id);\n }\n\n if($duplicate->count() > 0) {\n return Cp::errorMessage(__('members.duplicate_group_name'));\n }\n\n // ------------------------------------\n // Preferences\n // ------------------------------------\n\n $preferences['group_id'] = $group_id;\n $preferences['is_locked'] = Request::input('is_locked');\n\n foreach(static::$group_preferences as $group => $prefs) {\n foreach((array) $prefs as $key => $default) {\n if (Request::has($key)) {\n $preferences[$key] = Request::get($key);\n }\n }\n }\n\n foreach (Request::all() as $key => $val)\n {\n if (substr($key, 0, strlen('weblog_id_')) == 'weblog_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('plugin_name_')) == 'plugin_name_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('can_access_offline_site_id_')) == 'can_access_offline_site_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('can_access_cp_site_id_')) == 'can_access_cp_site_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } else {\n continue;\n }\n }\n\n if ($edit === false)\n {\n $group_id = DB::table('member_groups')->insertGetId($data);\n\n foreach($preferences as $handle => $value) {\n $prefs =\n [\n 'group_id' => $data['group_id'],\n 'handle' => $handle,\n 'value' => $value\n ];\n\n DB::table('member_group_preferences')->insert($prefs);\n }\n\n $uploads = DB::table('upload_prefs')\n ->select('id')\n ->get();\n\n foreach($uploads as $yeeha)\n {\n DB::table('upload_no_access')\n ->insert(\n [\n 'upload_id' => $yeeha->id,\n 'upload_loc' => 'cp',\n 'member_group' => $group_id\n ]);\n }\n\n $message = __('members.member_group_created').'&nbsp;'.$_POST['group_name'];\n }\n else\n {\n DB::table('member_groups')\n ->where('group_id', $data['group_id'])\n ->update($data);\n\n DB::table('member_group_preferences')\n ->where('group_id', $data['group_id'])\n ->delete();\n\n foreach($preferences as $handle => $value) {\n $prefs =\n [\n 'group_id' => $data['group_id'],\n 'handle' => $handle,\n 'value' => $value\n ];\n\n DB::table('member_group_preferences')->insert($prefs);\n }\n\n $message = __('members.member_group_updated').'&nbsp;'.$_POST['group_name'];\n }\n\n // Update CP log\n Cp::log($message);\n\n $this->clearMemberGroupCache($data['group_id']);\n\n if ($return == true) {\n return $this->member_group_manager($message);\n }\n\n return $this->editMemberGroup($message, $group_id);\n }", "function testUpdateGroups()\n {\n $data = array(3);\n $this->GroupEvent->updateGroups(1, $data);\n $searched = $this->GroupEvent->find('all', array('conditions' => array('event_id' => 1)));\n $this->assertEqual(count($searched), 1);\n $this->assertEqual($searched[0]['GroupEvent']['group_id'], 3);\n $this->assertEqual($searched[0]['GroupEvent']['event_id'], 1);\n\n // single group\n $this->GroupEvent->updateGroups(1, 1);\n $searched = $this->GroupEvent->find('all', array('conditions' => array('event_id' => 1)));\n $this->assertEqual(count($searched), 1);\n\n // invalid group\n $incorrectData = $this->GroupEvent->updateGroups(1, null);\n $this->assertFalse($incorrectData);\n }", "function SyncDatabases(&$db_home, &$db_sync) {\r\n \t$tables_home = $db_home->ListTables();\r\n $tables_sync = $db_sync->ListTables();\r\n\t\t\t$fieldnames_sync = array();\r\n\t\t\t$fields_home = array();\r\n\r\n for ($i = 0; $i < count($tables_home); $i++)\r\n {\r\n \tif (!in_array($tables_home[$i], $tables_sync))\r\n \t{\r\n \t$fields = $db_home->ListTableFields($tables_home[$i]);\r\n\t\t\t\t\tif (!$db_sync->CreateTable($tables_home[$i], $fields))\r\n\t\t\t\t\t{\r\n \t$this->RaiseError(\"Could not create table <strong>{$tables_home[$i]}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n }\r\n }\r\n else\r\n {\r\n\t\t\t\t\t$fields_home = $db_home->ListTableFields($tables_home[$i]);\r\n\t\t\t\t\t$fields_home_tmp = $fields_home;\r\n\t\t\t\t\t$sync_keys = $db_sync->ListCompositeKeys($tables_home[$i]);\r\n\t\t\t \t\t$home_ckeys = $db_home->ListCompositeKeys($tables_home[$i]);\r\n\r\n\t\t\t\tforeach($home_ckeys as $key=>$val){\r\n\t\t\t\t\tif(true === array_key_exists($key,$sync_keys)){\r\n\t\t\t\t\t\tif($val !== $sync_keys[$key])\r\n\t\t\t\t\t\t $db_sync->changeCompositeKey($key,$val,$tables_home[$i]);\r\n\r\n\t\t\t\t\t} elseif(false === array_key_exists($key,$sync_keys)){\r\n\t\t\t\t\t $db_sync->addCompositeKey($key,$val,$tables_home[$i]);\r\n\t\t\t\t\t} else{\r\n\t\t\t\t\tdie(\"Please Check Key Constraint\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\r\n $fields_sync = $db_sync->ListTableFields($tables_home[$i]);\r\n $fieldnames_sync = $this->GetFieldNames($fields_sync);\r\n $fieldnames_home = $this->GetFieldNames($fields_home);\r\n //get copy of fiendnames for ordering.\r\n $fieldNamesOrderHome = $fieldnames_home;\r\n $fieldNamesOrderSync = $fieldnames_sync;\r\n //\r\n $diferent_fields = 0;\r\n //TODO:remove after further testing.\r\n/* if($tables_home[$i] =='user_permissions')\r\n {\r\n\t\t\t\t\tpr($fieldnames_home);pr($fieldnames_sync);//die;\r\n } */\r\n \r\n //check for table_format changes\r\n if($fields_sync[0]['row_format'] != $fields_home[0]['row_format'] || $fields_sync[0]['Engine'] != $fields_home[0]['Engine'] || $fields_sync[0]['tableCollation'] != $fields_home[0]['tableCollation'])\r\n {\r\n \t$db_sync->ChangeTableRowFormatEngine($tables_home[$i],$fields_home[0],$fields_sync[0]);\r\n } \r\n \r\n for ($j = 0; $j < count($fields_home); $j++)\r\n {\r\n \tif (!in_array($fields_home[$j]['name'], $fieldnames_sync))\r\n \t{\r\n if (!isset($fields_home[$j - 1]))\r\n {\r\n \t$success = $db_sync->AddTableField($tables_home[$i], $fields_home[$j], 0);\r\n }\r\n else\r\n {\r\n\t \t$success = $db_sync->AddTableField($tables_home[$i], $fields_home[$j], $fields_home[$j - 1]['name']);\r\n }\r\n if (!$success)\r\n {\r\n\t\t\t\t\t\t\t\t$this->RaiseError(\"Could not add field <strong>{$fields_home[$j]['name']}</strong> to table <strong>{$tables_home[$i]}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n }\r\n $diferent_fields++;\r\n }\r\n else\r\n {\r\n\r\n \t\t$keys_home = $this->GetPrimaryKeys($fields_home_tmp);\r\n\t \t$k = $this->GetFieldIndex($fields_sync, $fields_home[$j]['name']);\r\n\t \t\r\n\t \t//decision parameters for ordering\r\n\t \t$newFieldHomeKey = $newFieldSyncKey = null;\r\n\t \t\r\n\t \t/* avoid un-necessary modify queries due to a new field as it shifts all normal ordering & we can safely \r\n\t \t * remove the already handled new field through add query handled near $db_sync->AddTableField( code lying above.\r\n\t \t * */ \r\n\t \tif(count($fieldNamesOrderHome) > count($fieldNamesOrderSync))\r\n\t \t{\r\n\t \t\t$extraFields = array_diff(array_values($fieldNamesOrderHome), array_values($fieldNamesOrderSync));\r\n\t \t\t//the keys of extrafields is enof to unset is as its relative.\r\n\t \t\tforeach($extraFields as $extraKy =>$extraVal)\r\n\t \t\t{\r\n\t \t\t\tunset($fieldNamesOrderHome[$extraKy]);\r\n\t \t\t}\r\n\t \t\t//once unset make the keys to have a natural order for normal order compare.\r\n\t \t\t$fieldNamesOrderHome = array_values($fieldNamesOrderHome);\r\n\t \t}\r\n\t \tif(count($fieldNamesOrderHome) < count($fieldNamesOrderSync))\r\n\t \t{\r\n\t \t\t$extraFields = array_diff(array_values($fieldNamesOrderSync), array_values($fieldNamesOrderHome));\r\n\t \t\t//the keys of extrafields is enof to unset is as its relative.\r\n\t \t\tforeach($extraFields as $extraKy =>$extraVal)\r\n\t \t\t{\r\n\t \t\t\tunset($fieldNamesOrderSync[$extraKy]);\r\n\t \t\t}\r\n\t \t\t//once unset make the keys to have a natural order for normal order compare.\r\n\t \t\t$fieldNamesOrderSync = array_values($fieldNamesOrderSync);\r\n\t \t}\t \t\r\n/*\t \tif($tables_home[$i] == 'rpt_masterhm_headers')\r\n\t \t{\r\n\t \t\t//pr($fields_home[2]);pr($fields_sync[2]);die;\r\n\t \t\t//pr($fields_home);\r\n\t \t\t//pr($fields_sync);die;\r\n \t \t\tpr($fieldNamesOrderHome);\r\n\t \t\tpr($fieldNamesOrderSync);\r\n\t \t\tdie; \r\n\t \t}\t*/ \t\r\n\t \t$newFieldHomeKey = array_search( $fields_home[$j]['name'],$fieldNamesOrderHome);\r\n\t \t$newFieldSyncKey = array_search($fields_sync[$k]['name'],$fieldNamesOrderSync);\r\n\t \t//\r\n\r\n\t if (\r\n\t\t \t$fields_sync[$k]['type'] != $fields_home[$j]['type'] ||\r\n\t\t $fields_sync[$k]['null'] != $fields_home[$j]['null'] ||\r\n\t\t ($fields_sync[$k]['key'] != $fields_home[$j]['key'] && (($fields_home[$j]['key']!='UNI'&&$fields_sync[$k]['key'] !='UNI')|| ($fields_home[$j]['Non_unique']=='1'&&$fields_sync[$k]['Non_unique'] =='0'))) ||\r\n\t\t $fields_sync[$k]['default'] != $fields_home[$j]['default'] ||\r\n\t\t $fields_sync[$k]['extra'] != $fields_home[$j]['extra'] ||\r\n\t \t\t$newFieldHomeKey != $newFieldSyncKey ||\r\n\t \t\t$fields_sync[$k]['Sub_part'] != $fields_home[$j]['Sub_part'] ||\r\n\t\t\t\t\t\t\t\t\t\t$fields_sync[$k]['Collation'] != $fields_home[$j]['Collation'] ||\r\n\t\t\t\t\t\t\t\t\t\t$fields_sync[$k]['CharacterSet'] != $fields_home[$j]['CharacterSet']\r\n\t )\r\n\t {\r\n/* \t \tif($fields_sync[$k]['name'] == 'intervention_name')\r\n\t \t{\r\n\t \t\tpr($fields_sync[$k]);pr($fields_home[$j]);die;\r\n\t \t}\t */ \t\r\n\t\t if (!$db_sync->ChangeTableField($tables_home[$i], $fields_home[$j]['name'], $fields_home[$j],$fields_sync[$k],0,$keys_home,$fieldNamesOrderHome,$fieldNamesOrderSync,$fields_home,$fields_sync))\r\n\t\t {\r\n\t\t\t $this->RaiseError(\"Could not change field <strong>{$fields_home[$j]['name']}</strong> on table <strong>{$tables_home[$i]}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n\t\t \t}\r\n\t $diferent_fields++;\r\n\t }\r\n\t if (\r\n\t\t $fields_sync[$k]['foreign_key'] != $fields_home[$j]['foreign_key']||\r\n\t\t $fields_sync[$k]['referenced_table_name'] != $fields_home[$j]['referenced_table_name']||\r\n\t\t $fields_sync[$k]['referenced_column_name'] != $fields_home[$j]['referenced_column_name']||\r\n\t\t $fields_sync[$k]['update_rule'] != $fields_home[$j]['update_rule']||\r\n\t\t $fields_sync[$k]['delete_rule'] != $fields_home[$j]['delete_rule']\r\n\t \r\n\t )\r\n\t {\r\n\t\t if (!$db_sync->ChangeTableField($tables_home[$i], $fields_home[$j]['name'], $fields_home[$j],$fields_sync[$k],1,$keys_home))\r\n\t\t {\r\n\t\t\t $this->RaiseError(\"Could not change field <strong>{$fields_home[$j]['name']}</strong> on table <strong>{$tables_home[$i]}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n\t\t }\r\n\t\t $diferent_fields++;\r\n\t }\r\n\t \r\n\t \r\n }\r\n\r\n\t\t $arrayKeysFieldsHome = array_keys($fieldnames_sync, $fields_home[$j]['name']);\r\n\t\t unset($fieldnames_sync[array_shift($arrayKeysFieldsHome)]);\r\n }\r\n \r\n //set table field orders\r\n\r\n if ($diferent_fields > 0) {\r\n \t/**\r\n * Arrange Primary Keys\r\n **/\r\n $keys_home = $this->GetPrimaryKeys($fields_home);\r\n $keys_sync = $this->GetPrimaryKeys($fields_sync);\r\n if ($this->DiferentKeys($keys_home, $keys_sync)) {\r\n\t if (count($keys_home) > 0) {\r\n \t \t$db_sync->SetTablePrimaryKeys($tables_home[$i], $keys_home);\r\n \t } else {\r\n \t \t$db_sync->ClearTablePrimaryKeys($tables_home[$i]);\r\n \t }\r\n }\r\n }\r\n\r\n \t\t foreach ($fieldnames_sync as $field) {\r\n \t\t \tforeach($fields_sync as $fld)\r\n \t\t \t{\r\n \t\t \t\tif($fld['name']==$field && $fld['constraint_name']!='')\r\n \t\t \t\t{\r\n \t\t \t\t\t$sql = \"ALTER TABLE `{$tables_home[$i]}` DROP FOREIGN KEY `{$fld['constraint_name']}` ;\";\r\n \t\t \t\t\techo $sql.'<br/>';\r\n \t\t \t\t}\r\n \t\t \t}\r\n \tif (!$db_sync->RemoveTableField($tables_home[$i], $field)) {\r\n\t $this->RaiseError(\"Could not change field <strong>{$field}</strong> on table <strong>{$tables_home[$i]}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n }\r\n\t\t }\r\n }\r\n\r\n $arrayKeysTableHome = array_keys($tables_sync, $tables_home[$i]);\r\n\t\t\t\tunset($tables_sync[array_shift($arrayKeysTableHome)]);\r\n }\r\n\r\n foreach ($tables_sync as $table) {\r\n \tif (!$db_sync->RemoveTable($table)) {\r\n\t $this->RaiseError(\"Could not remove table <strong>{$table}</strong> on database <strong>{$db_sync->database}</strong> at {$db_sync->user}@{$db_sync->host}: \" . $db_sync->LastError());\r\n }\r\n }\r\n\r\n return true;\r\n }", "protected function persistObjects() {}", "public function rebuild($group_id);", "function updateGroup($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $GroupName=$post['GroupName'];\n\t$ModifyDateTime=date('Y-m-d H:i:s');\n\t$GroupID=$post['GroupID'];\n\t$sql2=\"UPDATE `SCP_Groups` SET `GroupName` = '\".$GroupName.\"',`ModifyDateTime` = '\".$ModifyDateTime.\"' WHERE `GroupID` = '\".$GroupID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\n\t\n //CHECK FOR ERROR\n if (!$result) die('Invalid query: ' . mysql_error());\n\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"Error in Updation\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "private function update(SincronizacaoEvent $sincronizacaoEvent)\n {\n $sync = $sincronizacaoEvent->getData();\n\n $grupo = $this->grupoRepository->find($sync->sym_table_id);\n\n // ambiente virtual vinculado à turma do grupo\n $ambiente = $this->ambienteVirtualRepository->getAmbienteByTurma($grupo->grp_trm_id);\n\n if ($ambiente) {\n $param = [];\n\n // url do ambiente\n $param['url'] = $ambiente->url;\n $param['token'] = $ambiente->token;\n $param['functioname'] = 'local_integracao_update_group';\n $param['action'] = 'UPDATE';\n\n $param['data']['group']['grp_id'] = $grupo->grp_id;\n $param['data']['group']['grp_nome'] = $grupo->grp_nome;\n\n $response = Moodle::send($param);\n\n $status = 3;\n\n if (array_key_exists('status', $response)) {\n if ($response['status'] == 'success') {\n $status = 2;\n }\n }\n\n event(new AtualizarSyncEvent($grupo, $status, $response['message'], 'UPDATE'));\n return true;\n }\n\n return false;\n }", "protected function saveGroup($group) {\n\t\t$link = $this->getLink();\n\t\t$link->set($this->prefix, $group);\n\t}", "public function testUpdateRuleGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function updateGroup($old_group, $new_group)\n {\n $em = $this->doctrine->getEntityManager();\n $group = $em->getRepository('CmarMeetingBundle:Group')->findOneBy(array('key' => $old_group->{'key'}));\n $meeting = $em->getRepository('CmarMeetingBundle:Meeting')->findOneByStatesAndTitle(array(Meeting::STATE_NOW, Meeting::STATE_NEW, Meeting::STATE_LOCKED), $old_group->{'name'});\n\n if ($group == null){\n $this->logger->info(\"Group does not exist\");\n throw new \\LogicException(\"Group does not exist\");\n } else {\n $this->mapGroup($group, $new_group);\n $errors = $this->validator->validate($group);\n if (count($errors) > 0) {\n throw new \\LogicException(\"Validation Exception \\\"\" . $errors[0]->getPropertyPath() . \"\\\": \" . $errors[0]->getMessageTemplate(), -1);\n } \n \n $principal_id_group = $this->adoAdmin->principalFindGroupByName($old_group->{'name'});\n $out = $this->adoAdmin->getScoByUrl($meeting->getUrl());\n $sco_id_meeting = (integer)$out->{'sco'}->attributes()->{'sco-id'};\n $xml = $this->adoAdmin->principalUpdateforType($new_group->{'name'}, 'group', $new_group->{'description'}, $principal_id_group);\n $xml = $this->adoAdmin->scoUpdate($meeting, $new_group, $sco_id_meeting);\n\n $meeting->setTitle($new_group->{'name'});\n $meeting->setDescription($new_group->{'description'});//Si la descripcion es null la cambia\n if ($new_group->{'type'} != null){\n if ($new_group->{'type'} == 'public'){\n $meeting->setPublic(true);\n } elseif ($new_group->{'type'} == 'private'){\n $meeting->setPublic(false);\n }\n }\n $em->persist($meeting);\n $em->persist($group);\n \n try {\n $em->flush();\n } catch (\\Exception $e) {\n $this->logger->info(\"DDBB Exception\"); \n throw new \\LogicException(\"DDBB Exception\", -1);\n }\n }\n }", "function MyMod_Item_Update_SGroup($item,$group,$prepost=\"\",$postprocess=TRUE)\n {\n return $this->MyMod_Item_Update_CGI\n (\n $item,\n $this->MyMod_Data_Group_Datas_Get($group,TRUE),\n $prepost,\n $postprocess\n );\n }", "function assign_clients_group() {\r\n global $wpdb;\r\n\r\n $group_id = $_POST['group_id'];\r\n $group_clients_id = ( isset( $_POST['group_clients_id'] ) ) ? $_POST['group_clients_id'] : array();\r\n\r\n //delete clients from Client Circle\r\n $wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}wpc_client_group_clients WHERE group_id = %d\", $group_id ) );\r\n\r\n\r\n //Add clients to the Client Circle\r\n if ( is_array( $group_clients_id ) && 0 < count( $group_clients_id ) )\r\n foreach ( $group_clients_id as $client_id ) {\r\n $wpdb->query( $wpdb->prepare( \"INSERT INTO {$wpdb->prefix}wpc_client_group_clients SET group_id = %d, client_id = '%d'\", $group_id, $client_id ) );\r\n }\r\n\r\n wp_redirect( add_query_arg( array( 'page' => 'wpclients_groups', 'updated' => 'true', 'dmsg' => urlencode( __( 'Clients are assigned!', WPC_CLIENT_TEXT_DOMAIN ) ) ), 'admin.php' ) );\r\n exit;\r\n }", "public function beforeUpdate()\n {\n $product = self::find($this->id);\n self::$product_group = $product->group_id;\n }", "function groups_collections_update($item, $selected_groups, $existing_groups, $relationship) {\n\t$add_groups = array_diff($selected_groups , $existing_groups);\n\t$rem_groups = array_diff($existing_groups, $selected_groups);\n\t\n\t$add_groups = array_unique($add_groups);\n\t$add_groups = array_values($add_groups);\n\t$rem_groups = array_unique($rem_groups);\n\t$rem_groups = array_values($rem_groups);\n\t$guid_two = $item->getguid();\n\t\n\tforeach($add_groups as $group){\n\t\t$guid_one = $group;\n\t\tif(!check_entity_relationship($guid_one, $relationship, $guid_two)){\n\t\t\tadd_entity_relationship($guid_one, $relationship, $guid_two);\n\t\t}\t\t\n\t}\n\tforeach($rem_groups as $group){\n\t\t$guid_one = $group;\n\t\tremove_entity_relationship($guid_one, $relationship, $guid_two);\n\t}\n}", "public function flush()\n {\n $this->arrSettings = null;\n $this->section = null;\n $this->group = null;\n $this->changed = null;\n }", "function initGroups() {\n $groups = array(0 => array('alias' => 'members',\n 'model' => 'Group',\n 'foreign_key' => 1),\n 1 => array('alias' => 'moderators',\n 'model' => 'Group',\n 'foreign_key' => 2),\n 2 => array('alias' => 'administrators',\n 'model' => 'Group',\n 'foreign_key' => 3));\n\n foreach ($groups as $data) {\n $this->Acl->Aro->create();\n $this->Acl->Aro->save($data);\n }\n }", "public function testCustomSave() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$dbh->Query(\"insert into customer_labels(name) values('Test r1');\");\r\n\t\t$dbh->Query(\"insert into customer_labels(name) values('Test r2');\");\r\n\r\n\t\t$result = $dbh->Query(\"select id from customer_labels limit 2\");\r\n\t\t$g1 = $dbh->GetValue($result, 0, \"id\");\r\n\t\t$g2 = $dbh->GetValue($result, 1, \"id\");\r\n\r\n\t\t// Test mValue\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"my test\");\r\n\t\t$obj->setMValue(\"groups\", $g1);\r\n\t\t$obj->setMValue(\"groups\", $g2);\r\n\t\t$cid = $obj->save(false);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $this->user);\r\n\t\t$obj->removeMValue(\"groups\", $g2);\r\n\t\t$cid = $obj->save(false);\r\n\t\tunset($obj);\r\n\r\n\t\t// Make sure mvalues reload and that we are not using too many queries to load the object\r\n\t\t// TODO: work on the dacl to only allow one query when loading an object\r\n\t\t$statBefore = $dbh->statNumQueries;\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $this->user);\r\n\t\t$obj->setValue(\"name\", \"Test Assoc\");\r\n\t\t$this->assertFalse($obj->getMValueExists(\"groups\", $g2));\r\n\t\t$this->assertTrue($obj->getMValueExists(\"groups\", $g1));\r\n\t\t$this->assertTrue(($dbh->statNumQueries-$statBefore)<=2); // Loading an object should never take more than 2 queries\r\n\t\t//echo \"<pre>Num Queries: \".($dbh->statNumQueries-$statBefore).\"</pre>\";\r\n\r\n\t\t// Test object_multi\r\n\t\t$cont = new CAntObject($dbh, \"contact_personal\", null, $this->user);\r\n\t\t$cont->setValue(\"first_name\", \"Test Personal Contact\");\r\n\t\t$contactId = $cont->save();\r\n\t\t$this->assertTrue($contactId > 0);\r\n\t\t$obj->debug = true;\r\n\t\t$obj->setMValue(\"associations\", \"contact_personal:$contactId\");\r\n\t\t$cid = $obj->save(false);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid);\r\n\t\t$this->assertTrue($obj->getMValueExists(\"associations\", \"contact_personal:$contactId\")!=false);\r\n \r\n // Test remove the mvalue\r\n $obj->removeMValue(\"associations\", \"contact_personal:$contactId\");\r\n $obj->save(false);\r\n unset($obj);\r\n \r\n $obj = new CAntObject($dbh, \"customer\", $cid);\r\n $this->assertFalse($obj->getMValueExists(\"associations\", \"contact_personal:$contactId\")==false);\r\n unset($obj);\r\n \r\n // Test remove all mvalues\r\n $obj = new CAntObject($dbh, \"customer\", $cid);\r\n $obj->setMValue(\"associations\", \"contact_personal:$contactId\");\r\n $obj->save(false);\r\n unset($obj);\r\n \r\n $obj = new CAntObject($dbh, \"customer\", $cid);\r\n $this->assertTrue($obj->getMValueExists(\"associations\", \"contact_personal:$contactId\")!=false); // Make sure the mvalue was set\r\n $obj->removeMValues(\"associations\"); // now remove the mvalues\r\n $obj->save(false);\r\n unset($obj);\r\n \r\n $obj = new CAntObject($dbh, \"customer\", $cid);\r\n $this->assertFalse($obj->getMValueExists(\"associations\", \"contact_personal:$contactId\")==false);\r\n\r\n\t\t// Test object (with no type)\r\n\t\t$com = new CAntObject($dbh, \"comment\", null);\r\n\t\t$com->setValue(\"obj_reference\", \"contact_personal:$cid\");\r\n\t\t$comid = $com->save(false);\r\n\t\tunset($com);\r\n\t\t$com = new CAntObject($dbh, \"comment\", $comid);\r\n\t\t$this->assertEquals($com->getValue(\"obj_reference\"), \"contact_personal:$cid\");\r\n\t\t$com->removeHard();\r\n\t\t\r\n\t\t// Cleanup\r\n\t\t$cont->removeHard();\r\n\t\t$obj->removeHard();\r\n\r\n\t\t$dbh->Query(\"delete from customer_labels where name='Test r1';\");\r\n\t\t$dbh->Query(\"delete from customer_labels where name='Test r2';\");\r\n\t}", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getGatewayKey() );\n\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ) {\n\t\t\tforeach ( $existingsOptions as $option ) {\n\t\t\t\tif ( isset( $options[ $option->getName() ] ) )\n\t\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\n\t\t//$this->addSettings( $options );\n\t}", "function syncStoreToCRM($sync_interval=0) {\n global $DB;\n\t if (self::checkConnection()) {\n\t\t //\\Helper::Log('(syncStoreToCRM) run period ' . $sync_period);\n\t\t // Get plugin object\n\t\t $plugin = false;\n\t\t if (strlen(self::$profile['PLUGIN'])) {\n\t\t\t $arProfilePlugin = Exporter::getInstance(self::$MODULE_ID)->getPluginInfo(self::$profile['PLUGIN']);\n\t\t\t if (is_array($arProfilePlugin)) {\n\t\t\t\t $strPluginClass = $arProfilePlugin['CLASS'];\n\t\t\t\t if (strlen($strPluginClass) && class_exists($strPluginClass)) {\n\t\t\t\t\t $plugin = new $strPluginClass(self::$MODULE_ID);\n\t\t\t\t\t $plugin->setProfileArray(self::$profile);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t // List of orders, changed by last period (if period is not set than get all orders)\n\t\t if ($plugin) {\n\t\t\t $filter = [];\n\t\t\t if ($sync_interval > 0) {\n\t\t\t\t $filter['change_date_from'] = time() - $sync_interval;\n\t\t\t }\n\t\t\t $orders_ids = $plugin->getOrdersIDsList($filter);\n\t\t\t foreach ($orders_ids as $order_id) {\n\t\t\t\t $order_data = $plugin->getOrder($order_id);\n\t\t\t\t try {\n\t\t\t\t\t self::syncOrderToDeal($order_data);\n\t\t\t\t } catch (\\Exception $e) {\n\t\t\t\t\t //\\Helper::Log('(syncStoreToCRM) can\\'t sync of order ' . $order_data['ID']);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t //\\Helper::Log('(syncStoreToCRM) success');\n\t }\n }", "protected function doAfterContainerSave() {\n if (!$this->isPersistent()) $this->origNodeId = $this->container->getPrimaryKey();\n \n if (!$this->lockStore) $this->endStore(true);\n \n $this->updateFromContainer();\n }", "public function testUpdateSupplierGroup()\n {\n }", "public function run()\n {\n \\DB::table('groups')->delete();\n\n \\DB::table('groups')->insert(array (\n 0 =>\n array (\n 'id' => 1,\n 'name' => 'DCP_RDMS',\n 'status' => 1,\n 'created_at' => '2018-11-09 10:28:27',\n 'updated_at' => '2018-11-09 11:17:39',\n ),\n ));\n\n\n }", "public function save() {\n\t\t\ttry{\n\t\t\t\tif($this->name == null || $this->description == null) {\n\t\t\t\t\tthrow new Exception('One or more required fields are not completed.');\n\t\t\t\t}\n\t\t\t\tif(!$this->validName())\n\t\t\t\t\tthrow new Exception('Invalid group name. Group already exists with this name.');\n\t\t\t\t\t\n\t\t\t\tif ($this->isLoaded === true) {\n\t\t\t\t\t$SQL = \"UPDATE usergroup SET \n\t\t\t\t\t\t\tname = '\".mysql_real_escape_string($this->name).\"' , \n\t\t\t\t\t\t\tdescription = '\".mysql_real_escape_string($this->description).\"'\n\t\t\t\t\t\t\tWHERE groupId = '\".mysql_real_escape_string($this->groupId).\"'\";\n\t\t\t\t\t $this->conn->execute($SQL);\n\t\t\t\t} else {\n\t\t\t\t\t$SQL = \"INSERT INTO usergroup (name, description) VALUES (\n\t\t\t\t\t\t\t'\".mysql_real_escape_string($this->name).\"', \n\t\t\t\t\t\t\t'\".mysql_real_escape_string($this->description).\"')\";\n\t\t\t\t\t$this->isLoaded = true;\n\t\t\t\t\t$this->groupId = $this->conn->execute($SQL);\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}", "function syncDatabaseAndNotifyAction()\n {\n # $this->basicAuthentication('webservices');\n $sl = $this->getServiceLocator();\n\n set_time_limit(0);\n\n $config = $sl->get('config');\n $domain = $this->_params('domain');\n\n try\n {\n if(empty($domain))\n {\n throw new \\Exception(\"Invalid call to the webservice. No domain name provided\");\n }\n\n\n $dbClient = $sl->get('App\\Db\\Client');\n $dbDatabase = $sl->get('App\\Db\\Database');\n\n $clients = $dbClient->findBy(function($where) use($domain) {\n $where->equalTo('domain', $domain);\n }, array(), 'id asc');\n\n // lest just find the first user of the domain\n $client = $clients->current();\n\n if(!$client)\n {\n throw new \\Exception(\"Client with domain $domain not found.\");\n }\n\n if($client->deleted)\n {\n throw new \\Exception(\"Client #{$client->id} with domain $domain is deleted. The confirmation email was not send.\");\n }\n\n if($client->email_verified)\n {\n throw new \\Exception(\"Client #{$client->id} with domain $domain is already verified. The confirmation email was not send.\");\n }\n\n $databases = $dbDatabase->findDatabaseByClientId($client->id);\n if(!$databases->count())\n {\n throw new \\Exception(\"No database assigned to client #{$client->id} with domain $domain. The confirmation email was not send.\");\n }\n\n\n //\n if('backend' != $client->created_from)\n {\n ;\n }\n\n\n\n $lang = $client->lang;\n /////////////////////////////////////////////\n # sync databases\n ///////////////////////////////////////////// \n\n // get the list of tables from the path\n $pathSchema = $config['freemium']['path']['master_freemium_schema'][$lang];\n $currentTables = array();\n foreach(glob(\"$pathSchema/*.sql\") as $item)\n {\n $info = pathinfo($item);\n $tableName = $info['filename'];\n $currentTables[$tableName] = $item;\n }\n \n foreach ($databases as $database)\n {\n $tablesToCreate = array();\n $instanceTables = array();\n \n $databaseName = $database->db_name;\n $host = $database->db_host;\n $username = $database->db_user;\n $password = $database->db_password;\n $instanceAdapter = $this->_getInstanceAdapter($databaseName, $host, $username, $password);\n\n $sql = 'show tables';\n $rowset = $instanceAdapter->query($sql)->execute();\n foreach ($rowset as $row)\n {\n $tabelName = current($row);\n $instanceTables[$tabelName] = $tabelName;\n }\n\n foreach ($currentTables as $key => $item)\n {\n if(!isset($instanceTables[$key]))\n {\n $tablesToCreate[$key] = $item;\n }\n }\n\n foreach ($tablesToCreate as $item)\n {\n $sql = file_get_contents($item);\n $instanceAdapter->query($sql)->execute();\n }\n }\n\n /////////////////////////////////////////////\n # send the confirmation email to the user\n /////////////////////////////////////////////\n\n // prepare the verification code\n $cPassword = new Com\\Crypt\\Password();\n $plain = $client->email;\n $code = $cPassword->encode($plain);\n\n $request = $sl->get('request');\n $uri = $request->getUri();\n $serverUrl = \"{$uri->getScheme()}://{$uri->getHost()}\";\n \n $routeParams = array();\n $routeParams['action'] = 'verify-account';\n $routeParams['code'] = $code;\n $routeParams['email'] = $client->email;\n \n $viewRenderer = $sl->get('ViewRenderer');\n $url = $serverUrl . $viewRenderer->url('auth/wildcard', $routeParams);\n \n // preparing some replacement values\n $data = array();\n $data['follow_us'] = $this->_('follow_us', array(), 'default', $lang);\n $data['body'] = $this->_('confirm_your_email_address_body', array(\n $url,\n ), 'default', $lang);\n $data['header'] = '';\n \n // load the email template and replace values\n $mTemplate = $sl->get('App\\Model\\EmailTemplate');\n \n $langString = '';\n if('es' == $lang)\n {\n $langString = \"_$lang\";\n }\n \n $arr = $mTemplate->loadAndParse(\"common{$langString}\", $data);\n \n //\n $mailer = new Com\\Mailer();\n \n // prepare the message to be send\n $message = $mailer->prepareMessage($arr['body'], null, $this->_('confirm_your_email_address_subject', array(), 'default', $lang));\n \n $message->setTo($client->email);\n $mailTo = $config['freemium']['mail_to'];\n foreach($mailTo as $mail)\n {\n $message->addBcc($mail);\n }\n\n // prepare de mail transport and send the message\n $transport = $mailer->getTransport($message, 'smtp1', 'sales');\n $transport->send($message);\n echo \"Done!\";\n }\n catch(\\Exception $e)\n {\n \\App\\NotifyError::notify($e);\n ddd($e);\n }\n\n exit;\n }", "public function saveGroups($groups)\n {\n foreach ($groups as $group) {\n $proposer = $group->getSubject(self::$PROPOSER_ROLE_ID);\n $receiver = $group->getSubject(self::$RECEIVER_ROLE_ID);\n\n $proposerGroup = new DictatorGroup();\n $proposerGroup->setSubjectId($proposer->getId());\n $proposerGroup->setSubjectRole(self::$PROPOSER_ROLE_ID);\n $proposerGroup->setPartnerId($receiver->getId());\n $proposerGroup->setPartnerRole(self::$RECEIVER_ROLE_ID);\n $proposerGroup->save();\n\n $receiverGroup = new DictatorGroup();\n $receiverGroup->setSubjectId($receiver->getId());\n $receiverGroup->setSubjectRole(self::$RECEIVER_ROLE_ID);\n $receiverGroup->setPartnerId($proposer->getId());\n $receiverGroup->setPartnerRole(self::$PROPOSER_ROLE_ID);\n $receiverGroup->save();\n }\n }", "function acf_flush_field_group_cache( $field_group ) {\n\tacf_flush_internal_post_type_cache( $field_group, 'acf-field-group' );\n}", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getMaillistKey() );\n\t\t\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\t\t\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ){\n\t\t\tforeach ( $existingsOptions as $option ){\n\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\t\t\t\n\t}", "function update() {\n\t\t$sql = \"UPDATE umgroup \n\t\t\t\tSET\tGpNameT=?, GpNameE=?, GpDesc=?, GpStID=? \n\t\t\t\tWHERE GpID=?\";\t\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpNameT, $this->GpNameE, $this->GpDesc, $this->GpStID, $this->GpID));\n\n\t}", "public function sync()\n {\n $class = explode('\\\\', get_called_class());\n $manager = \\Str::studly(str_replace('EntryModel', null, end($class)));\n\n $existingAddons = $manager::getAll();\n $databaseAddons = $this->all();\n\n // Sync TO the database\n foreach ($existingAddons as $addon) {\n if (!$databaseAddons->findBySlug($addon->slug)) {\n $this->addons->insert(\n array(\n 'slug' => $addon->slug,\n )\n );\n }\n }\n }", "public function setup_sync()\n {\n }", "public function updateGroupInfo(UpdateGroupRequest $request, CategoryRepository $categoryRepo, GroupAdminRepository $groupAdminRep)\n {\n $user = $request->user();\n\n// $admin_list = Admin::select('user_id')->get()->toArray();\n// $admin_list = array_pluck($admin_list, 'user_id');\n $admin_list = [];\n $data = $request->all();\n $group = Group::find($data['group_id']);\n if (\n $group->owner != $user->id \n and !in_array($user->id, $admin_list)\n && !$groupAdminRep->checkGroupAdmin($data['group_id'], $user->id, 2)\n ) {\n return $this->_transformer->noPermission();\n }\n\n // $new_name = preg_replace('/[^\\w\\d]/', '', $request->name);\n\n if($group->title != $request->title){\n\n if(in_array($request->title, Constants::reserved_names)){\n return $this->_transformer->fail(40019, 'Invalid group name.');\n }\n\n $new_name_occupy = Group::where(\"title\", $request->title)->first();\n if(!empty($new_name_occupy)){\n return $this->_transformer->fail(512, 'Group name is taken.');\n }\n }\n\n try {\n\n DB::beginTransaction();\n\n $group_updated = tap($group)->update($request->only('title', 'description', 'cover', 'logo','no_recommend'));\n\n if (isset($data['categories'])) {\n $old_category_tree = $categoryRepo->getCategoryTree($group->id);\n $old_categories = [];\n\n foreach ($old_category_tree as $old_category){\n $old_categories[$old_category->category_id] = $old_category->name;\n }\n\n $id_delete = array_keys($old_categories);\n\n $new_categories = json_decode($data['categories'], true);\n\n if(count($new_categories) > 20 ){\n if(count($old_categories) < count($new_categories) ){\n throw new Exception('no more than 20 Categories');\n }\n }\n\n $name_ary = [];\n foreach ($new_categories as $category){\n if(in_array($category['name'],$name_ary)){\n throw new \\Exception('The same categories name is not allowed');\n }\n $name_ary[] = $category['name'];\n }\n\n foreach ($new_categories as $category) {\n\n // update a category\n if (!empty($category['id'])) {\n $delete_index = array_search($category['id'], $id_delete);\n // this statement shall always be true, keep it here to be prudent\n if ($delete_index !== false) {\n // this category not to be deleted\n unset($id_delete[$delete_index]);\n\n if ($category['name'] !== $old_categories[$category['id']]) {\n $categoryRepo->updateCategory($group->id, $category['id'], $category['name']);\n }\n }\n } else {\n $categoryRepo->addCategory($group->id, trim($category['name']));\n }\n }\n\n // delete some category\n if (count($id_delete)){\n foreach ($id_delete as $id){\n $categoryRepo->deleteCategory($group->id, $id);\n }\n }\n }\n\n\n if(isset($request->super_no_recommend)){\n\n// $admin_list = Admin::select('user_id')->get()->toArray();\n// $admin_list = array_pluck($admin_list, 'user_id');\n $admin_list = [];\n if(!in_array($user->id, $admin_list)){\n return $this->_transformer->noPermission();\n }\n\n $group_updated = tap($group_updated)->update(['super_no_recommend' => $request->super_no_recommend ? 1 : 0]);\n }\n\n DB::commit();\n\n return $this->_transformer->success(['group' => $group_updated, 'categories' => $categoryRepo->getCategoryTree($group->id)]);\n } catch (\\Exception $e) {\n DB::rollBack();\n return $this->_transformer->fail(512, $e->getMessage());\n }\n }" ]
[ "0.65281314", "0.6265716", "0.5901688", "0.58230424", "0.58114886", "0.5726704", "0.57096225", "0.551641", "0.55151224", "0.54759413", "0.54642814", "0.54345965", "0.54327697", "0.5428166", "0.5390167", "0.5378169", "0.53712213", "0.53666484", "0.53377974", "0.53340757", "0.53314525", "0.53305066", "0.5328226", "0.5320292", "0.53074056", "0.53068805", "0.53037566", "0.524518", "0.5229717", "0.5226301", "0.52180284", "0.52147704", "0.51998967", "0.51998967", "0.5170344", "0.5166779", "0.5163368", "0.5160368", "0.51553434", "0.5143802", "0.5108833", "0.5097922", "0.50945926", "0.50800085", "0.5059817", "0.5050881", "0.5030124", "0.5028964", "0.50253147", "0.5017562", "0.5014542", "0.5008291", "0.500516", "0.49929577", "0.49880004", "0.4987927", "0.49838206", "0.49828258", "0.49783835", "0.4970292", "0.4966794", "0.4954432", "0.49520662", "0.49343947", "0.49304786", "0.4915998", "0.49098155", "0.4905857", "0.48987874", "0.4893963", "0.48847112", "0.48801652", "0.4878746", "0.4847425", "0.48438326", "0.4843725", "0.484122", "0.48405653", "0.48387662", "0.4838417", "0.4836637", "0.48329544", "0.4829871", "0.48217428", "0.48217314", "0.48180133", "0.48162737", "0.4815343", "0.48009676", "0.48007053", "0.47945917", "0.47936046", "0.47931", "0.47721478", "0.4771734", "0.47710162", "0.47655055", "0.47636795", "0.47624335", "0.47588983" ]
0.6503954
1
Get all the currently pending changes
function recurringdowntime_get_pending_changes() { $obj = get_option('recurringdowntime_pending_changes', array()); if (!is_array($obj)) { $obj = json_decode(base64_decode($obj), true); } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChanges();", "public function getChanges();", "public function getAllPending(): array;", "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 }", "public function getDirty();", "public function detectChanges()\n {\n return [];\n }", "public function pendingMigrations()\r\n\t{\r\n\t\t$outstanding = [];\r\n\t\t$this->ensureMigrationBinExist();\r\n\t\tforeach ($this->localRepository() as $file) {\r\n\t\t\t$line = $this->removeDotPhp($file);\r\n\r\n\t\t\t// Once we grab all of the migration files for the path, we will compare them\r\n\t\t\t// against the migrations that have already been run for this package then\r\n\t\t\t// run each of the outstanding migrations against a database connection.\r\n\t\t\t$result = $this->repository->getRan();\r\n\t\t\tif (!in_array($line, $result)) {\r\n\t\t\t\t$outstanding[] = $file;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $outstanding;\r\n\t}", "public function pending_util_records() {\n\t\treturn $this->util->select( array( 'flag' => null ) );\n\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 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}", "public function getAllByTask($task_id){\n $changes = $this->find('all', array(\n 'conditions'=>array(\n 'Change.task_id'=>$task_id),\n 'order'=>array(\n 'Change.created DESC')));\n return $changes; \n }", "public function getChanges()\n {\n $this->conn->initialize();\n $response = $this->conn->getClient()->request(\"/{$this->name}/_changes\");\n\n if (false === $response->isSuccessful()) {\n throw new \\RuntimeException('Request wasn\\'t successfull');\n }\n\n return JSONEncoder::decode($response->getContent());\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 }", "public function getDirtyState() {}", "public function getAllOldPending($cache = true)\n {\n return $this->getAllOldPendingQuery($cache)->execute();\n }", "public function getPending()\n\t{\n\t\treturn $this->pending;\n\t}", "public function getPendingEvents(): array;", "public function changes()\r\n\t{\r\n\t\t$Change = App::make('Change');\r\n\r\n\t\treturn $Change::where('fmodel', 'GalleryItem')\r\n\t\t\t\t \t ->where('fid', $this->id)\r\n\t\t\t\t \t ->with('user')\r\n\t\t\t\t \t ->orderBy('created_at', 'DESC')\r\n\t\t\t\t \t ->get();\r\n\t}", "function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}", "public function getUncommittedEvents();", "public function pending() {\n $results = array();\n foreach ( $this->wrappers as $clazz => $wrappers ) {\n foreach ( $wrappers as $id => $wrapper ) {\n $proxy = $wrapper['proxy'];\n if ( ! $proxy->___repose_isPersisted() ) {\n // We are really only pending if we are not\n // already persisted!\n $results[] = $wrapper['proxy'];\n }\n }\n }\n return $results;\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 pendingTickets() {\n $tickets = $this->whereHas('status', function($query) {\n return $query->where('name', 'Solved');\n });\n\n return $tickets;\n }", "public function getChangedEntries();", "public function getApproversPendingAttribute()\n {\n if ($this->state != 'pending_approval') {\n return collect();\n }\n return $this->approvers->diff(Approval::where('requisition_id', $this->id)->with('user')->get()->pluck('user'));\n }", "public function getDirty()\n {\n return array_keys($this->_dirty);\n }", "function get_changes($path, $to, $from = null) {\n $changes = [];\n $currentPath = getcwd();\n chdir($path);\n\n if ($from == null) {\n $shellOutput = shell_exec('git log --pretty=oneline ' . $to);\n } else {\n $shellOutput = shell_exec('git log --pretty=oneline ' . $from . '...' . $to);\n }\n\n $lines = preg_split('/\\R/', trim($shellOutput));\n foreach ($lines as $line) {\n if (null != $line) {\n $changes[substr($line, 0, 40)] = trim(substr($line, 40, strlen($line)));\n } else {\n echo 'Could not get changes of repository ' . $path . PHP_EOL;\n }\n }\n\n chdir($currentPath);\n\n return $changes;\n}", "public function getPendingApproval(Filter $filter): Collection;", "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 getPendingIssues() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\n\t\t$query->where(\"$i.info_status >= 0 AND $i.info_status < \".synd_node_issue::CLOSED);\n\t\t\n\t\t$query->column($this->_grouping->getResolveByKey($this, $query), 'PK');\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\", 'ISSUES');\n\t\t$query->groupBy($this->_grouping->getResolveByKey($this, $query));\n\t\t\n\t\t$sql = $query->toString();\n\t\t$rows = $this->_db->getAssoc($sql);\n\t\treturn $this->_grouping->filter($rows);\n\t}", "public function getAll()\n {\n $ghostCommits = array();\n $head = Git::getHeadBranch($this->branch);\n\n // Get master branch commits\n if ($head !== 'master') {\n $ghostCommits = Git::getCommits($this->branch, 'master', 20);\n $ghostCommits = array_map(function ($commit) {\n return array_merge($commit, array('ghost' => true));\n }, $ghostCommits);\n }\n\n $output = array();\n foreach (array_merge($ghostCommits, Git::getCommits($this->branch, null, 20)) as $commit) {\n if (strpos($commit['message'], 'history') === 0) {\n $output[$commit['commit']] = array(\n 'id' => $commit['commit'],\n 'action' => preg_replace('/history \\d{4,4}-\\d{2,2}-\\d{2,2} \\d{2,2}:\\d{2,2}:\\d{2,2} (.*) [a-zA-Z0-9]{16,16}/', '$1', $commit['message']),\n 'user_name' => preg_replace('/(.*) <(.*)>$/', '$1', $commit['author']),\n 'user_email' => preg_replace('/(.*) <(.*)>$/', '$2', $commit['author']),\n 'date' => $commit['date'],\n 'ghost' => (isset($commit['ghost']) ? true : false)\n );\n }\n }\n\n return array_values(array_reverse($output));\n }", "public function getDataChangesList() {\n return DataChangeRecord::get()->filter([\n 'ChangeRecordID' => $this->owner->ID,\n 'ChangeRecordClass' => $this->owner->ClassName\n ]);\n }", "public function pending_tasks()\n {\n return $this->hasMany('App\\Models\\Crm\\Task', 'lead_id')->where('is_done', false);\n }", "public function pending_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'pending');\n }", "public static function Pending()\n {\n $pending = \\ApprovalSequence\\Models\\Entity::Where('entity_type', self::class)->get();\n $PendingEntity = $pending->map(function ($item) {\n // check every item and check it's pending or not\n if($item->entity && $item->entity->isPending()){\n return $item->entity;\n }\n\n });\n //to avoid duplication\n return $PendingEntity->unique();\n }", "public function dirty() {\n $results = array();\n foreach ( $this->proxies as $id => $proxy ) {\n if ( $proxy->___repose_isDirty() ) $results[] = $proxy;\n }\n return $results;\n }", "public function getDirty()\n\t{\n\t\treturn $this->dirty;\n\t}", "public function list_dirty_fields() {\r\n return $this->orm->list_dirty_fields();\r\n }", "public function getDiffs() {\n return $this->findDiffs();\n }", "public function get_all_pending_comments()\n {\n $sql = \"SELECT comments.*, posts.title_slug as post_slug FROM comments \n INNER JOIN posts ON posts.id = comments.post_id WHERE comments.status = 0\n ORDER BY comments.id DESC\";\n $query = $this->db->query($sql);\n return $query->result();\n }", "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 getPendingSteps();", "public function getHistory($id){\n\t\t$myissues = Issues::find_by_sql(\"SELECT * FROM issues WHERE issue_mem_id=\".$id);\n\t\treturn $myissues;\n\t}", "public function getAllChangesByProjectID($projectID)\n {\n $query = \"SELECT * FROM changelog WHERE projectID = '$projectID'\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n\n $changes = new SplDoublyLinkedList();\n\n while($row = mysql_fetch_assoc($res))\n {\n $id = $row['id'];\n $user = User::getUser((int) $row['userID']);\n $projectID = $row['projectID'];\n $description = $row['description'];\n $changeDate = $row['changeDate'];\n\n $bugs = Bug::getAllBugsByChangeID($id); \n\n $changes->push(new Change($id, $user, $projectID, $description, $changeDate, $bugs)); \n }\n\n return $changes;\n }", "public function getChanges(array $options = array())\n {\n if (!empty($this->_collection['id'])) {\n // How far back to sync for those collections that use this.\n $cutoffdate = self::_getCutOffDate(!empty($this->_collection['filtertype'])\n ? $this->_collection['filtertype']\n : 0);\n\n $this->_logger->meta(sprintf(\n 'STATE: Initializing message diff engine for %s (%s)',\n $this->_collection['id'],\n $this->_folder->serverid())\n );\n\n // Check for previously found changes first.\n if (!empty($this->_changes)) {\n $this->_logger->meta('STATE: Returning previously found changes.');\n return $this->_changes;\n }\n\n // Get the current syncStamp from the backend.\n $this->_thisSyncStamp = $this->_backend->getSyncStamp(\n $this->_folder->serverid(),\n $this->_lastSyncStamp\n );\n\n if ($this->_thisSyncStamp === false) {\n throw new Horde_ActiveSync_Exception_StaleState(\n 'Detecting a change in timestamp or modification sequence. Reseting state.'\n );\n }\n\n $this->_logger->meta(sprintf(\n 'STATE: Using SYNCSTAMP %s for %s.',\n $this->_thisSyncStamp,\n $this->_collection['id'])\n );\n\n // No existing changes, poll the backend\n $changes = $this->_backend->getServerChanges(\n $this->_folder,\n (int)$this->_lastSyncStamp,\n (int)$this->_thisSyncStamp,\n $cutoffdate,\n !empty($options['ping']),\n $this->_folder->haveInitialSync,\n !empty($options['maxitems']) ? $options['maxitems'] : 100,\n !empty($this->_collection['forcerefresh'])\n );\n\n // Only update the folderstate if we are not PINGing.\n if (empty($options['ping'])) {\n $this->_folder->updateState();\n }\n\n $this->_logger->meta(sprintf(\n 'STATE: Found %d message changes in %s.',\n count($changes),\n $this->_collection['id'])\n );\n\n // Check for mirrored client changes.\n $this->_changes = array();\n if (count($changes) && $this->_havePIMChanges()) {\n $this->_logger->meta('STATE: Checking for client initiated changes.');\n switch ($this->_collection['class']) {\n case Horde_ActiveSync::CLASS_EMAIL:\n // @todo Fix me with a changes object that transparently\n // deals with different data structure for initial sync.\n if (!empty($changes) && !is_array($changes[0])) {\n $this->_changes = $changes;\n break;\n }\n\n // Map of client-sourced changes\n $mailmap = $this->_getMailMapChanges($changes);\n\n // Map constants to more human readable/loggable text.\n $flag_map = array(\n Horde_ActiveSync::CHANGE_TYPE_FLAGS => 'flag change',\n Horde_ActiveSync::CHANGE_TYPE_DELETE => 'deletion',\n Horde_ActiveSync::CHANGE_TYPE_CHANGE => 'move',\n Horde_ActiveSync::CHANGE_TYPE_DRAFT => 'draft'\n );\n\n $cnt = count($changes);\n for ($i = 0; $i < $cnt; $i++) {\n if (empty($mailmap[$changes[$i]['id']][$changes[$i]['type']])) {\n $this->_changes[] = $changes[$i];\n continue;\n }\n // @todo For 3.0, create a Changes and\n // ChangeFilter classes to abstract out a bunch of\n // this stuff. (Needs BC breaking changes in\n // storage/state classes).\n\n // OL2013 is broken and duplicates the destination\n // email during MOVEITEMS requests (instead it\n // reassigns the existing email the new UID). Don't\n // send the ADD command for these changes.\n if ($changes[$i]['type'] == Horde_ActiveSync::CHANGE_TYPE_CHANGE &&\n $changes[$i]['flags'] == Horde_ActiveSync::FLAG_NEWMESSAGE &&\n $this->_deviceInfo->deviceType != 'WindowsOutlook15') {\n $this->_changes[] = $changes[$i];\n continue;\n }\n $changes[$i]['ignore'] = true;\n $this->_changes[] = $changes[$i];\n $this->_logger->meta(sprintf(\n 'STATE: Ignoring client initiated %s for %s',\n $flag_map[$changes[$i]['type']],\n $changes[$i]['id'])\n );\n }\n break;\n\n default:\n $client_timestamps = $this->_getPIMChangeTS($changes);\n $cnt = count($changes);\n for ($i = 0; $i < $cnt; $i++) {\n if (empty($client_timestamps[$changes[$i]['id']])) {\n $this->_changes[] = $changes[$i];\n continue;\n }\n if ($changes[$i]['type'] == Horde_ActiveSync::CHANGE_TYPE_DELETE) {\n // If we have a delete, don't bother stating the message,\n // the entry should already be deleted on the client.\n $stat['mod'] = 0;\n } else {\n // stat only returns MODIFY times, not deletion times,\n // so will return (int)0 for ADD or DELETE.\n $stat = $this->_backend->statMessage($this->_folder->serverid(), $changes[$i]['id']);\n }\n if ($client_timestamps[$changes[$i]['id']] >= $stat['mod']) {\n $this->_logger->meta(sprintf(\n 'STATE: Ignoring client initiated change for %s (client TS: %s Stat TS: %s)',\n $changes[$i]['id'], $client_timestamps[$changes[$i]['id']], $stat['mod'])\n );\n } else {\n $this->_changes[] = $changes[$i];\n }\n }\n }\n } elseif (count($changes)) {\n $this->_logger->meta('STATE: No client changes, returning all messages.');\n $this->_changes = $changes;\n }\n } else {\n // FOLDERSYNC changes.\n $this->_getFolderChanges();\n }\n\n return $this->_changes;\n }", "function get_all_waiting_return()\n {\n return $this->db->where('returnNumberState', \\ReturnService\\_Return\\returnStateType::OPENED)->where('primaryOwnerNetworkId', Operator::ORANGE_NETWORK_ID)->get_where('numberreturn')->result_array();\n }", "public function getAll()\n {\n return $this->scopeRepository->findAll();\n }", "public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}", "public function getAllInfoActivity()\n {\n return QcOverTimeRequest::where('action', $this->getDefaultHasAction())->get();\n }", "public function getPendingComment() \n {\n $select = $this->select()\n ->from($this->_name)\n ->where(\"status =?\", 'pending')\n ->order(array(\"{$this->_primaryKey} DESC\"));\n\n return $this->returnResultAsAnArray($this->fetchAll($select));\n }", "public function scopePending($query)\n {\n return $query->where('status', 0);\n }", "public function getAll()\n {\n return $this->transactions;\n }", "public function getAllCurrent()\n {\n $notifications = [];\n $container = $this->getContainer();\n\n foreach ($container as $namespace => $notification) {\n $notifications[$namespace] = $this->getCurrent($namespace);\n }\n\n return $notifications;\n }", "public function getTxObservaciones()\n\t{\n\t\treturn $this->tx_observaciones;\n\t}", "public function getProposedChanges(): ProposedChangeCollection\n {\n return $this->proposedChanges;\n }", "public function git_working_branch_status()\n\t{\n\t\t$remotes = $this->git_remotes();\n\n\t\t$status = array();\n\n\t\tforeach( $remotes as $remote )\n\t\t{\n\t\t\texec( __DIR__ . \"/git-log {$this->theme_dir} {$remote} '>'\", $ahead );\n\t\t\texec( __DIR__ . \"/git-log {$this->theme_dir} {$remote} '<'\", $behind );\n\n\t\t\t$status[ $remote ]['ahead'] = (int) $ahead[0];\n\t\t\t$status[ $remote ]['behind'] = (int) $behind[0];\n\t\t}//end foreach\n\n\t\treturn $status;\n\t}", "public function getNotificationsCollection()\n {\n return Mage::getModel('kdcatalogupdates/log')->getCollection();\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 listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function getAllActive() {}", "public function pending_orders_model()\n\t\t{\n\t\t\t\n\t\t\t$result=$this->db->query(\"SELECT * FROM users, orders, customers, delivery_method \n\t\t\t\tWHERE orders.customer_id=customers.customer_id\n\t\t\t\tAND orders.vender_id=users.id\n\t\t\t\tAND orders.delivery_method_id=delivery_method.id\n\t\t\t\tAND orders.order_status =1\"\n\t\t\t);\n\n\t\t\treturn $result->result_array();\n\t\t}", "public function dirtyAction()\n {\n $result = array('status' => 'ok');\n $result['relayd']['dirty'] = $this->getModel()->configChanged();\n return $result;\n }", "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 }", "public function allOnline()\n {\n return $this->model->where('active', '=', true)\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function getAll($project, $filter)\n {\n // Check if the results should be filtered\n if(!$filter) {\n $issues = Issue::where('project_id','=',$project->id)\n ->where('status', '!=', 'Closed')\n ->where('version', '=', $project->current_version)\n ->orderBy(DB::raw(\"CASE WHEN status = 'New' THEN '1'\n WHEN status = 'Assigned' THEN '2'\n WHEN status = 'Awaiting Client' THEN '3'\n WHEN status = 'Resolved' THEN '4'\n WHEN status = 'Closed' THEN '5'\n END\"), 'ASC')\n ->get();\n } elseif($filter == 'me') {\n $userGroups = Auth::User()->groups->lists('id');\n $issues = Issue::whereIn('assigned_to_id', $userGroups)\n ->where('status', '!=', 'Closed')\n ->where('project_id','=',$project->id)\n ->orderBy(DB::raw(\"CASE WHEN status = 'New' THEN '1'\n WHEN status = 'Assigned' THEN '2'\n WHEN status = 'Awaiting Client' THEN '3'\n WHEN status = 'Resolved' THEN '4'\n WHEN status = 'Closed' THEN '5'\n END\"), 'ASC')\n ->get();\n } elseif($filter == 'closed') {\n $issues = Issue::where('project_id', '=', $project->id)\n ->where('status', '=', 'Closed')\n ->orderBy(DB::raw(\"CASE WHEN status = 'New' THEN '1'\n WHEN status = 'Assigned' THEN '2'\n WHEN status = 'Awaiting Client' THEN '3'\n WHEN status = 'Resolved' THEN '4'\n WHEN status = 'Closed' THEN '5'\n END\"), 'ASC')\n ->get();\n } elseif($filter == 'all') {\n $issues = Issue::where('project_id', '=', $project->id)\n ->orderBy(DB::raw(\"CASE WHEN status = 'New' THEN '1'\n WHEN status = 'Assigned' THEN '2'\n WHEN status = 'Awaiting Client' THEN '3'\n WHEN status = 'Resolved' THEN '4'\n WHEN status = 'Closed' THEN '5'\n END\"), 'ASC')\n ->get();\n }\n else {\n $issues = Issue::where('project_id','=',$project->id)\n ->where('status', '!=', 'Closed')\n ->where('version', '=', $filter)\n ->orderBy(DB::raw(\"CASE WHEN status = 'New' THEN '1'\n WHEN status = 'Assigned' THEN '2'\n WHEN status = 'Awaiting Client' THEN '3'\n WHEN status = 'Resolved' THEN '4'\n WHEN status = 'Closed' THEN '5'\n END\"), 'ASC')\n ->get();\n }\n\n return $issues;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getAllStatus()\n {\n return OrderStatus::all();\n }", "function get_pending_bookings(){\n\t\tif( get_option('dbem_bookings_approval') == 0 ){\n\t\t\treturn new EM_Bookings();\n\t\t}\n\t\t$pending = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 0){\n\t\t\t\t$pending[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($pending);\n\t\treturn $EM_Bookings;\t\n\t}", "public function getPendingPost();", "public function fetchHistory(): array;", "public function getChanged()\n {\n return $this->entity->getChanged();\n }", "function getDataPending()\n\t{\n\t\t$this->_pending = true;\n\n\t\t// Get files pending to be assigned\n\t\tif ($this->_data_pending === null)\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\n\t\t\tif ($query === false)\n\t\t\t{\n\t\t\t\t$this->_data_pending = array();\n\t\t\t\t$this->_total_pending = 0;\n\t\t\t\treturn $this->_data_pending;\n\t\t\t}\n\n\t\t\t$this->_data_pending = $this->_getList($query);\n\t\t\t$this->_db->setQuery('SELECT FOUND_ROWS()');\n\t\t\t$this->_total_pending = $this->_db->loadResult();\n\t\t}\n\n\t\treturn $this->_data_pending;\n\t}", "public function getDirty(): array\n {\n $dirty = [];\n $attributes = $this->toArray();\n\n foreach ($this->changedAttributesName() as $key) {\n $dirty[$key] = $attributes[$key];\n }\n\n return $dirty;\n }", "public function scopePending($query)\n {\n return $query->where('is_pending', 1);\n }", "public function scopePending($query)\n {\n return $query->whereStatus(Self::TYPE_PENDING);\n }", "public function getFbChanges($oid){\n return $this->slc(\"changed\", \"feedback\", array(\"order_id\" => $oid));\n }", "public function getRevisions(): array;", "public function getUpdated();", "public function getUpdated();", "public function findAll()\n {\n return DatabaseBackup::where('status', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id','desc')\n ->get();\n }", "public function inactive_dependencies(): Collection;", "public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }", "public function runPending()\r\n\t{\r\n\t\t$response = \"\";\r\n\t\t$response .= $this->ensureRepositoryExist();\r\n\t\t$migration_batch = $this->repository->getNextBatchNumber();\r\n\t\t$pending_migrations = $this->pendingMigrations();\r\n\t\tif (count($pending_migrations) > 0) {\r\n\t\t\tforeach ($pending_migrations as $file) {\r\n\t\t\t\t$migration_name = $this->removeDotPhp($file);\r\n\t\t\t\t$schema = $this->runUp($file);\r\n\t\t\t\tif ($schema != \"\") {\r\n\t\t\t\t\t$query_response = DB()->query($schema);\r\n\t\t\t\t\tif ($query_response) {\r\n\r\n\t\t\t\t\t\t// Once we have run a migrations file, we will log that it was run in this\r\n\t\t\t\t\t\t// repository so that we don't try to run it next time we do a migration\r\n\t\t\t\t\t\t// in the application. A migration repository keeps the migrate order.\r\n\t\t\t\t\t\t$this->repository->log($migration_name, $migration_batch);\r\n\t\t\t\t\t\t$response .= nl2br(\"Migrated: $migration_name\\n\");\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// if the schema failed to execute against the database\r\n\t\t\t\t\t\t$response .= nl2br(\"Failed: $migration_name\\n\");\r\n\t\t\t\t\t\t$response .= nl2br(\"-- $query_response[error]\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// if the migrations file has nothing\r\n\t\t\t\t\t$response .= nl2br(\"Empty: $migration_name\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// if we have no outstanding migrations to migrate\r\n\t\t\t$response .= nl2br(\"Nothing to migrate\\n\");\r\n\t\t}\r\n\r\n\t\treturn $response;\r\n\t}", "public function getApplicationStatusChanges($application_id)\n\t{\n\t\t$args = array();\n\t\t$query = $this->application_query_builder->getApplicationStatusHistoryQuery(\n\t\t\t$application_id, \n\t\t\t$this->getUpdatableStatusIds(), \n\t\t\t$this->config->getCompany(), \n\t\t\t$args\n\t\t);\n\t\t\n\t\t//$st = $this->config->getConnection()->prepare($query);\n\t\t$rs = $this->queryPrepared($query,$args);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setApplicationBalance'))\n\t\t);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setStatusChain'))\n\t\t);\n\t\t\n\t\treturn $this->data_builder->getApplicationData($rs);\n\t}", "public function getAll(): array {\n $query = $this->db\n ->select('*')\n ->where('status <>', 0)\n ->get($this->tblName);\n return $query->result_array();\n }", "function getPendingTask(){\n $item = new RepairServiceModel();\n return $item->viewPendingTask();\n }", "public function getChanges(array $options = array()) : \\Generator\n {\n $changes = $this->getItemChanges($options);\n return $changes->getChanges();\n }", "public function getUpdates()\n {\n return $this->updates;\n }", "public function getAll()\n {\n $query = $this->m_building_block_status->getAll();\n\n // Return the result\n return $query;\n }", "public function getChange();", "public function getStatusesList(){\n return $this->_get(1);\n }", "public function list()\n {\n return $this->repo->getAll();\n ;\n }", "public function getAll()\n {\n return $this->db->get_where($this->_table, [\"status\" => 1])->result();\n }", "public function calculateChangeSet()\n {\n $set = [];\n foreach ($this->current as $key => $current) {\n $original = isset($this->original[$key]) ? $this->original[$key] : null;\n $set[$key]['old'] = $original;\n $set[$key]['new'] = $current;\n }\n foreach ($this->remove as $key) {\n $set[$key]['old'] = $this->original[$key];\n $set[$key]['new'] = null;\n }\n ksort($set);\n return $set;\n }", "public function getIterator()\n {\n return $this->getItemsWithChanges();\n }", "function getTodaysPendingBookings($storeId = null) {\n if ($storeId) {\n App::import('Model', 'Booking');\n $this->Booking = new Booking();\n $current_date = date(\"Y-m-d\", (strtotime($this->storeTimeZone($storeId,'', date('Y-m-d H:i:s')))));\n $pendingbookings = $this->Booking->getTodaysPendingBookings($storeId, $current_date);\n return $pendingbookings;\n }\n }", "public function getUpCandidates()\n {\n $statuses = $this->getStatuses();\n\n // search latest applied migration\n $latest = '';\n foreach ($statuses as $status) {\n if ($status->appliedAt !== \"\") {\n $latest = $status->file->getFileName();\n }\n }\n\n // make statuses without being applied\n $candidates = [];\n $isSkipped = ($latest === '')? false: true;\n foreach ($statuses as $status) {\n if (false === $isSkipped) {\n $candidates[] = $status;\n }\n if($status->file->getFileName() !== $latest) {\n continue;\n } else {\n $isSkipped = false;\n }\n }\n\n return $candidates;\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 getPostCommitHookList() {}" ]
[ "0.721943", "0.721943", "0.7215002", "0.660223", "0.6552115", "0.65078187", "0.6488784", "0.6419888", "0.6408856", "0.63456696", "0.6257276", "0.61297596", "0.6128742", "0.61237305", "0.611416", "0.61054206", "0.61008227", "0.6098508", "0.6029957", "0.6028592", "0.60273767", "0.60138845", "0.598788", "0.5973413", "0.5930501", "0.5921245", "0.5871353", "0.5866854", "0.58334863", "0.5779505", "0.5777588", "0.5773302", "0.577289", "0.56919676", "0.5650003", "0.5647946", "0.5644265", "0.5629077", "0.5623182", "0.5609669", "0.5601545", "0.5596777", "0.5592026", "0.5589577", "0.5577548", "0.55724484", "0.5569331", "0.55533904", "0.55496067", "0.5526681", "0.55223745", "0.5514224", "0.55122155", "0.55072", "0.55005395", "0.5479412", "0.5468074", "0.5467395", "0.5457008", "0.5453983", "0.5445094", "0.5423762", "0.5411071", "0.5404098", "0.5395024", "0.5383017", "0.5383017", "0.5358419", "0.5353559", "0.5342897", "0.5337213", "0.53301525", "0.5328197", "0.53240585", "0.53188896", "0.5318114", "0.5317558", "0.53121674", "0.53100425", "0.53100425", "0.5308305", "0.529621", "0.52924025", "0.5292253", "0.52903694", "0.5289838", "0.5289352", "0.5287237", "0.5285804", "0.5285327", "0.52831", "0.52787626", "0.5270809", "0.52678114", "0.525705", "0.5250857", "0.5246511", "0.5244514", "0.52417123", "0.5233741" ]
0.57728755
33
Save the pending changes for recurringdowntime
function recurringdowntime_update_pending_changes($arr) { if (empty($arr)) { $arr = array(); } // Save the array into an option $encoded = base64_encode(json_encode($arr)); set_option('recurringdowntime_pending_changes', $encoded); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _saveStatus()\n {\n try {\n\n /**\n * update task statuses with completion days\n */\n foreach( $this->_status as $key => $val ) {\n\n if ( in_array( $key, $this->_tasks ) ) {\n $task = Mage::getModel('jirafe_analytics/install')\n ->getCollection()\n ->addFieldToFilter( 'task', $key )\n ->getFirstItem();\n\n $task->setCompletedDt( $val );\n $task->save();\n }\n }\n\n /**\n * refresh status values in cache\n *\n */\n $this->_saveStatusToCache();\n\n return true;\n\n } catch (Exception $e) {\n Mage::helper('jirafe_analytics')->log('ERROR', 'Jirafe_Analytics_Model_Installer::_saveStatus()', $e->getMessage(), $e);\n return false;\n }\n }", "function postUpdate()\n\t{\n\t\t$this->write();\n\n\t\tif ($this->subaction === 'schedule_conf') {\n\t\t\texec(\"sh /script/fix-cron-backup\");\n\n\t\t}\n\t}", "public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }", "function wyz_bus_save_draft() {\n\n}", "function recurringdowntime_apply_pending_changes($cbtype, &$cbargs)\n{\n // Verify this is an apply config and it finished successfully\n if ($cbargs['command'] != COMMAND_NAGIOSCORE_APPLYCONFIG || $cbargs['return_code'] != 0) {\n return;\n }\n\n // Verify there are pending changes\n $pending = recurringdowntime_get_pending_changes();\n if (empty($pending)) {\n return;\n }\n\n // Apply the actual changes to the cfg\n $cfg = recurringdowntime_get_cfg();\n foreach ($pending as $p) {\n if (array_key_exists('host_name', $p)) {\n $cfg[$p['cfg_id']]['host_name'] = $p['host_name'];\n } else if (array_key_exists('service_description', $p)) {\n $cfg[$p['cfg_id']]['service_description'] = $p['service_description'];\n } else if (array_key_exists('hostgroup_name', $p)) {\n $cfg[$p['cfg_id']]['hostgroup_name'] = $p['hostgroup_name'];\n } else if (array_key_exists('servicegroup_name', $p)) {\n $cfg[$p['cfg_id']]['servicegroup_name'] = $p['servicegroup_name'];\n }\n }\n\n recurringdowntime_write_cfg($cfg);\n recurringdowntime_update_pending_changes(array());\n}", "function commitChanges() {\r\n\t\tglobal $file;\r\n\t\tglobal $expenses;\r\n\r\n\t\tsortExpensesDate();\r\n\t\trenumber(&$expenses);\r\n\r\n\t\t$xmlString = toXML();\r\n\r\n\t\t$fp = fopen($file.\".bak\", \"w\");\r\n\t\tflock($fp, LOCK_EX);\r\n\t\tfputs($fp, $xmlString);\r\n\t\tflock($fp, LOCK_UN);\r\n\t\tfclose($fp);\r\n\r\n\t\tswapFiles();\r\n\t}", "public function save()\n {\n $now = new DateTime();\n $this->timestamp = $now->getTimestamp();\n self::setClassAndTable();\n parent::saveModel();\n\n $this->id = parent::getLastID();\n\n // Send notification to watchers\n $post = Post::find([\"id\" => $this->post_id]);\n $owner = $post->user();\n $watchers = $post->watchers();\n foreach ($watchers as $user) {\n $notif = new Notification();\n $notif->user_id_from = $owner->id;\n $notif->user_id_to = $user->id;\n $notif->type = Notification::WATCHLIST_UPDATE;\n $notif->link = \"/posts/view.php?post_id=$post->id\";\n $notif->save();\n }\n }", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function save()\n {\n if ($this->tid)\n {\n $query = sprintf('UPDATE %sTASK SET TASK_STAT=\"%s\", TASK_NOTE=\"%s\" WHERE TASK_ID=%d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->taskstate, $GLOBALS['DB']),\n mysql_real_escape_string($this->note, $GLOBALS['DB']),\n $this->tid);\n // print_r($query); \n mysql_query($query, $GLOBALS['DB']);\n \n }\n }", "public function markAsPending() {\n $this->status = parent::STATUS_PENDING;\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 save()\n {\n return $this->service->saveTimeEntry($this);\n }", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function save_dates() {\n\t\t// Nothing to do here.\n\t}", "protected function saveUpdate()\n {\n }", "public function actionFixschedules()\n {\n// foreach ($txs as $tx) {\n// $p1 = explode(' ', $tx->description);\n// $loan_id = substr($p1[4], 1);\n// $demand_date = $p1[6];\n// $schedule = LoanSchedule::find()->where(['loan_id' => $loan_id, 'demand_date' => $demand_date])->one();\n// if ($schedule != null && $schedule->pay_date == null) {\n// $schedule->pay_date = explode(' ', $tx->timestamp)[0];\n// $schedule->save();\n// //print_r($tx);\n// //print_r(explode(' ', $tx->timestamp));\n// //break;\n// }\n// }\n\n// MonthlyReportGenerator::generate(2017, 7)->save();\n// MonthlyReportGenerator::generate(2017, 8)->save();\n// MonthlyReportGenerator::generate(2017, 9)->save();\n// MonthlyReportGenerator::generate(2017, 10)->save();\n// MonthlyReportGenerator::generate(2017, 11)->save();\n// MonthlyReportGenerator::generate(2017, 12)->save();\n// MonthlyReportGenerator::generate(2018, 1)->save();\n // MonthlyReportGenerator::generate(2018, 2)->save();\n // MonthlyReportGenerator::generate(2018, 3)->save();\n\n echo \"Done\";\n }", "private function storeSchedule()\n\t{\n\t\tfile_put_contents('schedule.json', json_encode(self::$schedule));\n\n\t\t// Sleeping 1/10s to avoid race conditions and reloading the file\n\t\tusleep(100000);\n\t\tself::loadSchedule();\n\t}", "function update_week(){\n\t\t$time = array('id'=>1, 'ending_date' => date('Y-m-d'));\n\t\treturn $this->save($time);\n\t}", "public function incrementPendingEntriesCount()\n\t{\n\t\t$this->setPendingEntriesCount($this->getPendingEntriesCount() + 1); \n\t\t$this->save();\n\t}", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "function save()\n {\n $project_id = $this->batch->project_id;\n $period_id = $this->batch->project->open_period()->id;\n $batch_id = $this->batch->id;\n\n $this->actual_resources = collect();\n $invalid = collect();\n\n $resource_dict = collect();\n\n foreach ($this->rows as $row) {\n if (isset($row['resource'])) {\n $resource = $row['resource'];\n unset($row['resource']);\n } else {\n $activityCode = $this->activityCodes->get(trim(strtolower($row[0])));\n $resourceIds = $this->resourcesMap->get(trim(strtolower($row[7])));\n $resource = BreakDownResourceShadow::where('code', $activityCode)->whereIn('resource_id', $resourceIds)\n ->whereRaw('coalesce(progress, 0) < 100')->whereRaw(\"coalesce(status, '') != 'closed'\")\n ->first();\n }\n\n if (!$resource) {\n $invalid->push($row);\n continue;\n }\n\n $actual_resource = ActualResources::create([\n 'project_id' => $project_id, 'period_id' => $period_id, 'wbs_level_id' => $resource->wbs_id, 'batch_id' => $batch_id,\n 'breakdown_resource_id' => $resource->breakdown_resource_id, 'original_code' => $row[7], 'qty' => $row[4], 'unit_price' => $row[5], 'cost' => $row[6],\n 'unit_id' => $resource->unit_id, 'resource_id' => $resource->resource_id, 'doc_no' => $row[8] ?? '', 'original_data' => json_encode($row),\n 'action_date' => $row[1]\n ]);\n\n $resource_dict->push($resource->resource_id);\n\n $this->actual_resources->push($actual_resource);\n }\n\n dispatch(new UpdateResourceDictJob($this->batch->project, $resource_dict));\n\n $this->rows = collect();\n $this->cache();\n\n $costIssues = new CostIssuesLog($this->batch);\n $costIssues->recordInvalid($invalid);\n\n return $this->checkProgress();\n }", "public function Save_Manage_Task()\n {\n $task_id = $this->input->post('Task_id', true);\n $billable = $this->input->post('Billable', true);\n //print_r($billable);\n $Task_Entry = $this->input->post('Task_Entry', true);\n $old_value = $this->technical_user_model->Get_Task_Billable_Hours($task_id);\n $new_billable = $old_value[0]['Task_Billable_Hours'] + $billable;\n //print_r($new_billable);\n $data = array(\n 'Task_Billable_Hours' => $new_billable,\n 'Modified_By' => $this->session->userdata['userid'],\n 'Modified_On' => date('Y-m-d'));\n $this->db->where('Task_Icode', $task_id);\n $this->db->update('ibt_task_master', $data);\n $task = array(\n 'Leader_Reviewed' => 'Yes');\n $this->db->where('Task_Entry_Icode', $Task_Entry);\n $this->db->update('ibt_task_entry', $task);\n echo 1;\n }", "function SavePendingEditor () {\n\n global $gSITEDOMAIN;\n\n global $gGROUPPENDINGACTION, $gGROUPPENDINGUSERNAME, $gGROUPPENDINGDOMAIN;\n\n // Loop throuogh the action list.\n foreach ($gGROUPPENDINGACTION as $count => $action) {\n $username = $gGROUPPENDINGUSERNAME[$count];\n $domain = $gGROUPPENDINGDOMAIN[$count];\n switch ($action) {\n case GROUP_ACTION_APPROVE:\n $this->Approve ($username, $domain);\n break;\n case GROUP_ACTION_REMOVE:\n $USER = new cOLDUSER ();\n $USER->Select (\"Username\", $username);\n $USER->FetchArray ();\n if ($USER->uID != $this->userAuth_uID) {\n $this->Leave ($username, $domain);\n } // if\n unset ($USER);\n break;\n } // switch\n $this->Message = __(\"Member Pending List Saved\");\n } // foreach\n\n return (TRUE);\n }", "function save() {\n\t\tif ($this->input->post('contracts_show_due')) {\n\n\t\t\t$this->mdl_mcb_data->save('contracts_show_due', $this->input->post('contracts_show_due'));\n\n\t\t}\n\n\t\telse {\n\n\t\t\t$this->mdl_mcb_data->save('contracts_show_due', \"FALSE\");\n\n\t\t}\n\t}", "public function change()\n {\n\n $time = new Time('+4 hours'); \n\n $usersTable = TableRegistry::get('Users');\n $schedulerTable = TableRegistry::get('Scheduler');\n $usersData = $usersTable->find()->where('active',1)->toArray();\n foreach($usersData as $user){\n\n $schedule = $schedulerTable->newEntity();\n $schedule->user_id = $user['id'];\n $schedule->marketplace_id = 1;\n $schedule->job_interval = 4;\n $schedule->next_occurrence = $time;\n $schedule->type = 'Crawler';\n $schedule->meta_data = serialize([]);\n $schedule->created = Time::now();;\n $schedule->updated = Time::now();;\n $scheduleData = $schedulerTable->save($schedule);\n\n $schedule1 = $schedulerTable->newEntity();\n $schedule1->user_id = $user['id'];\n $schedule1->marketplace_id = 2;\n $schedule1->job_interval = 4;\n $schedule1->next_occurrence = $time;\n $schedule1->meta_data = serialize([]);\n $schedule1->type = 'Crawler';\n $schedule1->created = Time::now();;\n $schedule1->updated = Time::now();;\n $scheduleData = $schedulerTable->save($schedule1);\n\n }\n }", "public function flush() {\n if ($this->c_owner) {\n if ($this->update('owner', $this->owner, Project::$tableName)) {\n $this->c_owner = false;\n }\n }\n if ($this->c_name) {\n if ($this->update('name', $this->name, Project::$tableName)) {\n $this->c_name = false;\n }\n }\n if ($this->c_description) {\n if ($this->update('description', $this->description, Project::$tableName)) {\n $this->c_description = false;\n }\n }\n \n if ($this->c_deadline) {\n if ($this->update('deadline', $this->deadline, Project::$tableName)) {\n $this->c_deadline = false;\n }\n }\n if ($this->c_time) {\n if ($this->update('time', $this->time, Project::$tableName)) {\n $this->c_time = false;\n }\n }\n }", "protected function saveOpeningHours()\n {\n //TODO\n }", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "protected function notify_changes_saved() {\n $this->notify->good('gradessubmitted');\n }", "private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }", "protected function saveTask() {}", "public function publishfinish()\n {\n $procedures = Procedure::where('date_publish_finish', '<', Carbon::now()->format('Y-m-d'))\n ->where('publish', '=', true)\n ->get();\n foreach ($procedures as $procedure):\n $procedure->date_publish_finish = null;\n $procedure->publish = false;\n $procedure->save();\n endforeach;\n\n\n }", "public function setSysLastChanged() {}", "public function save()\n {\n if($this->changed) {\n Item::saveNewValues($this->id, $this->name, $this->status);\n } else {\n echo 'Nothing changed!';\n }\n }", "public final function save() {\n }", "public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}", "public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }", "private function saveRepeatYearly(){\n Loader::db()->Execute(\"INSERT INTO SchedulizerEventRepeat (eventID) VALUES(?)\", array(\n $this->eventObj->getEventID()\n ));\n }", "protected function onAfterSave()\n {\n \t$this->saveSuccessful = true;\n\t\t\n\t\tif( $this->isNewStatusUpdate ){ \n \t$this->_sendNewStatusUpdateEmailToAdministrators();\n \t$this->_sendNewStatusUpdateEmailToUser();\n\t\t}\n }", "function SaveDetails()\n\t{\n\t\t// Check permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_ADMIN);\n\n\t\t// Load the automatic invoice run events for the invoice run\n\t\t$strWhere = \"invoice_run_id = <INVOICE_RUN_ID>\";\n\t\t$arrWhere = array('INVOICE_RUN_ID' => DBO()->InvoiceRun->Id->Value);\n\t\tDBL()->current_automatic_invoice_run_event->SetTable('automatic_invoice_run_event');\n\t\tDBL()->current_automatic_invoice_run_event->Where->Set($strWhere, $arrWhere);\n\t\tDBL()->current_automatic_invoice_run_event->Load();\n\n\t\tTransactionStart();\n\n\t\tforeach (DBL()->current_automatic_invoice_run_event as $dboAutomaticInvoiceRunEvent)\n\t\t{\n\t\t\t// Get the submitted version\n\t\t\t$name = 'automatic_invoice_run_event_' . $dboAutomaticInvoiceRunEvent->id->Value;\n\t\t\t$submitted = DBO()->{$name};\n\n\t\t\t// Check to see if the value is set\n\t\t\tif ($dboAutomaticInvoiceRunEvent->id->Value == $submitted->Id->Value)\n\t\t\t{\n\t\t\t\t// Parse the submitted datetime (expected format h:i:s d/m/Y)\n\t\t\t\tif (!$submitted->scheduled_datetime || !$submitted->scheduled_datetime->Value)\n\t\t\t\t{\n\t\t\t\t\t$scheduledDatetime = NULL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$scheduledDatetime = trim($submitted->scheduled_datetime->Value);\n\t\t\t\t\t$parts = array();\n\t\t\t\t\t$gap = \"(?:[^0-9]+)\";\n\t\t\t\t\t$dig0 = \"([0-9]{0,2})\";\n\t\t\t\t\t$dig2 = \"([0-9]{1,2})\";\n\t\t\t\t\t$dig4 = \"([0-9]{4,4})\";\n\t\t\t\t\t$regExp = \"/^{$dig2}{$gap}{$dig2}{$gap}(?:{$dig2}{$gap}|){$dig2}{$gap}{$dig2}{$gap}{$dig4}$/\";\n\t\t\t\t\tif (!preg_match($regExp, $scheduledDatetime, $parts) || !($mktime = mktime(intval($parts[1]), intval($parts[2]), intval($parts[3]), intval($parts[5]), intval($parts[4]), intval($parts[6]))))\n\t\t\t\t\t{\n\t\t\t\t\t\tAjax()->AddCommand(\"Alert\", \"The expected date/time format is hour:minute:seconds day/month/year (e.g. \" . date(\"H:i:s d/m/Y\") . \"). You entered $scheduledDatetime\");\n\t\t\t\t\t\tAjax()->AddCommand(\"SetFocus\", \"automatic_invoice_run_event_\" . $submitted->Id->Value . \".scheduled_datetime\");\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t\t$scheduledDatetime = date('Y-m-d H:i:s', $mktime);\n\t\t\t\t}\n\n\t\t\t\t// Get the previous scheduled datetime\n\t\t\t\tif (!$dboAutomaticInvoiceRunEvent->scheduled_datetime || !$dboAutomaticInvoiceRunEvent->scheduled_datetime->Value)\n\t\t\t\t{\n\t\t\t\t\t$previousDatetime = NULL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$previousDatetime = $dboAutomaticInvoiceRunEvent->scheduled_datetime->Value;\n\t\t\t\t}\n\n\t\t\t\t// Check to see if the value has been changed\n\t\t\t\tif ($scheduledDatetime != $previousDatetime)\n\t\t\t\t{\n\t\t\t\t\t// Update the value and change it\n\t\t\t\t\t$dboAutomaticInvoiceRunEvent->SetColumns(array('scheduled_datetime', 'update_user_id', 'update_datetime'));\n\t\t\t\t\t$dboAutomaticInvoiceRunEvent->Id = $dboAutomaticInvoiceRunEvent->id->Value;\n\t\t\t\t\t$dboAutomaticInvoiceRunEvent->scheduled_datetime = $scheduledDatetime;\n\t\t\t\t\t$dboAutomaticInvoiceRunEvent->update_user_id = AuthenticatedUser()->GetUserId();\n\t\t\t\t\t$dboAutomaticInvoiceRunEvent->update_datetime = date('Y-m-d H:i:s');\n\n\t\t\t\t\tif (!$dboAutomaticInvoiceRunEvent->Save())\n\t\t\t\t\t{\n\t\t\t\t\t\tTransactionRollback();\n\t\t\t\t\t\tAjax()->AddCommand(\"Alert\", \"ERROR: Saving changes to the scheduled times failed.\");\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Fire the OnCustomerGroupDetailsUpdate Event\n\t\tTransactionCommit();\n\t\tAjax()->FireEvent('OnInvoiceRunEventsUpdate', array());\n\t\treturn TRUE;\n\t}", "private function saveRepeatWeekly(){\n if( isset($this->settings['weekday_index']) && !empty($this->settings['weekday_index']) ){\n foreach( $this->settings['weekday_index'] AS $dayIndex ){\n Loader::db()->Execute(\"INSERT INTO SchedulizerEventRepeat (eventID, repeatWeekday) VALUES (?,?)\", array(\n $this->eventObj->getEventID(), $dayIndex\n ));\n }\n }\n }", "public final function save()\n {\n }", "public function autosaved()\n {\n }", "function saveToDb()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t// date handling\n\t\t$rmd_start = $this->getReminderStart();\n\t\tif(is_object($rmd_start))\n\t\t{\n\t\t\t$rmd_start = $rmd_start->get(IL_CAL_DATE);\n\t\t}\n\t\t$rmd_end = $this->getReminderEnd();\n\t\tif(is_object($rmd_end))\n\t\t{\n\t\t\t$rmd_end = $rmd_end->get(IL_CAL_DATE);\n\t\t}\n\t\t\n\t\tinclude_once(\"./Services/RTE/classes/class.ilRTE.php\");\n\t\tif ($this->getSurveyId() < 1)\n\t\t{\n\t\t\t$next_id = $ilDB->nextId('svy_svy');\n\t\t\t$affectedRows = $ilDB->insert(\"svy_svy\", array(\n\t\t\t\t\"survey_id\" => array(\"integer\", $next_id),\n\t\t\t\t\"obj_fi\" => array(\"integer\", $this->getId()),\n\t\t\t\t\"author\" => array(\"text\", $this->getAuthor()),\n\t\t\t\t\"introduction\" => array(\"clob\", ilRTE::_replaceMediaObjectImageSrc($this->getIntroduction(), 0)),\n\t\t\t\t\"outro\" => array(\"clob\", ilRTE::_replaceMediaObjectImageSrc($this->getOutro(), 0)),\n\t\t\t\t\"status\" => array(\"text\", $this->getStatus()),\n\t\t\t\t\"startdate\" => array(\"text\", $this->getStartDate()),\n\t\t\t\t\"enddate\" => array(\"text\", $this->getEndDate()),\n\t\t\t\t\"evaluation_access\" => array(\"text\", $this->getEvaluationAccess()),\n\t\t\t\t\"invitation\" => array(\"text\", $this->getInvitation()),\n\t\t\t\t\"invitation_mode\" => array(\"text\", $this->getInvitationMode()),\n\t\t\t\t\"complete\" => array(\"text\", $this->isComplete()),\n\t\t\t\t\"created\" => array(\"integer\", time()),\n\t\t\t\t\"anonymize\" => array(\"text\", $this->getAnonymize()),\n\t\t\t\t\"show_question_titles\" => array(\"text\", $this->getShowQuestionTitles()),\n\t\t\t\t\"mailnotification\" => array('integer', ($this->getMailNotification()) ? 1 : 0),\n\t\t\t\t\"mailaddresses\" => array('text', strlen($this->getMailAddresses()) ? $this->getMailAddresses() : NULL),\n\t\t\t\t\"mailparticipantdata\" => array('text', strlen($this->getMailParticipantData()) ? $this->getMailParticipantData() : NULL),\n\t\t\t\t\"tstamp\" => array(\"integer\", time()),\n\t\t\t\t\"template_id\" => array(\"integer\", $this->getTemplate()),\n\t\t\t\t\"pool_usage\" => array(\"integer\", $this->getPoolUsage()),\n\t\t\t\t// 360°\n\t\t\t\t\"mode_360\" => array(\"integer\", $this->get360Mode()),\n\t\t\t\t\"mode_360_self_eval\" => array(\"integer\", $this->get360SelfEvaluation()),\n\t\t\t\t\"mode_360_self_rate\" => array(\"integer\", $this->get360SelfRaters()),\n\t\t\t\t\"mode_360_self_appr\" => array(\"integer\", $this->get360SelfAppraisee()),\n\t\t\t\t\"mode_360_results\" => array(\"integer\", $this->get360Results()),\n\t\t\t\t\"mode_360_skill_service\" => array(\"integer\", (int) $this->get360SkillService()),\n\t\t\t\t// reminder/notification\n\t\t\t\t\"reminder_status\" => array(\"integer\", (int)$this->getReminderStatus()),\n\t\t\t\t\"reminder_start\" => array(\"datetime\", $rmd_start),\n\t\t\t\t\"reminder_end\" => array(\"datetime\", $rmd_end),\n\t\t\t\t\"reminder_frequency\" => array(\"integer\", (int)$this->getReminderFrequency()),\t\t\t\t\n\t\t\t\t\"reminder_target\" => array(\"integer\", (int)$this->getReminderTarget()),\n\t\t\t\t\"reminder_last_sent\" => array(\"datetime\", $this->getReminderLastSent()),\n\t\t\t\t\"tutor_ntf_status\" => array(\"integer\", (int)$this->getTutorNotificationStatus()),\n\t\t\t\t\"tutor_ntf_reci\" => array(\"text\", implode(\";\", (array)$this->getTutorNotificationRecipients())),\n\t\t\t\t\"tutor_ntf_target\" => array(\"integer\", (int)$this->getTutorNotificationTarget()),\n\t\t\t\t\"own_results_view\" => array(\"integer\", $this->hasViewOwnResults()),\n\t\t\t\t\"own_results_mail\" => array(\"integer\", $this->hasMailOwnResults())\n \t\t\t));\n\t\t\t$this->setSurveyId($next_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$affectedRows = $ilDB->update(\"svy_svy\", array(\n\t\t\t\t\"author\" => array(\"text\", $this->getAuthor()),\n\t\t\t\t\"introduction\" => array(\"clob\", ilRTE::_replaceMediaObjectImageSrc($this->getIntroduction(), 0)),\n\t\t\t\t\"outro\" => array(\"clob\", ilRTE::_replaceMediaObjectImageSrc($this->getOutro(), 0)),\n\t\t\t\t\"status\" => array(\"text\", $this->getStatus()),\n\t\t\t\t\"startdate\" => array(\"text\", $this->getStartDate()),\n\t\t\t\t\"enddate\" => array(\"text\", $this->getEndDate()),\n\t\t\t\t\"evaluation_access\" => array(\"text\", $this->getEvaluationAccess()),\n\t\t\t\t\"invitation\" => array(\"text\", $this->getInvitation()),\n\t\t\t\t\"invitation_mode\" => array(\"text\", $this->getInvitationMode()),\n\t\t\t\t\"complete\" => array(\"text\", $this->isComplete()),\n\t\t\t\t\"anonymize\" => array(\"text\", $this->getAnonymize()),\n\t\t\t\t\"show_question_titles\" => array(\"text\", $this->getShowQuestionTitles()),\n\t\t\t\t\"mailnotification\" => array('integer', ($this->getMailNotification()) ? 1 : 0),\n\t\t\t\t\"mailaddresses\" => array('text', strlen($this->getMailAddresses()) ? $this->getMailAddresses() : NULL),\n\t\t\t\t\"mailparticipantdata\" => array('text', strlen($this->getMailParticipantData()) ? $this->getMailParticipantData() : NULL),\n\t\t\t\t\"tstamp\" => array(\"integer\", time()),\n\t\t\t\t\"template_id\" => array(\"integer\", $this->getTemplate()),\n\t\t\t\t\"pool_usage\" => array(\"integer\", $this->getPoolUsage()),\n\t\t\t\t// 360°\n\t\t\t\t\"mode_360\" => array(\"integer\", $this->get360Mode()),\n\t\t\t\t\"mode_360_self_eval\" => array(\"integer\", $this->get360SelfEvaluation()),\n\t\t\t\t\"mode_360_self_rate\" => array(\"integer\", $this->get360SelfRaters()),\n\t\t\t\t\"mode_360_self_appr\" => array(\"integer\", $this->get360SelfAppraisee()),\n\t\t\t\t\"mode_360_results\" => array(\"integer\", $this->get360Results()),\n\t\t\t\t\"mode_360_skill_service\" => array(\"integer\", (int) $this->get360SkillService()),\n\t\t\t\t// reminder/notification\n\t\t\t\t\"reminder_status\" => array(\"integer\", $this->getReminderStatus()),\n\t\t\t\t\"reminder_start\" => array(\"datetime\", $rmd_start),\n\t\t\t\t\"reminder_end\" => array(\"datetime\", $rmd_end),\n\t\t\t\t\"reminder_frequency\" => array(\"integer\", $this->getReminderFrequency()),\n\t\t\t\t\"reminder_target\" => array(\"integer\", $this->getReminderTarget()),\n\t\t\t\t\"reminder_last_sent\" => array(\"datetime\", $this->getReminderLastSent()),\n\t\t\t\t\"tutor_ntf_status\" => array(\"integer\", $this->getTutorNotificationStatus()),\n\t\t\t\t\"tutor_ntf_reci\" => array(\"text\", implode(\";\", (array)$this->getTutorNotificationRecipients())),\n\t\t\t\t\"tutor_ntf_target\" => array(\"integer\", $this->getTutorNotificationTarget()),\n\t\t\t\t\"own_results_view\" => array(\"integer\", $this->hasViewOwnResults()),\n\t\t\t\t\"own_results_mail\" => array(\"integer\", $this->hasMailOwnResults())\n\t\t\t), array(\n\t\t\t\"survey_id\" => array(\"integer\", $this->getSurveyId())\n\t\t\t));\n\t\t}\n\t\tif ($affectedRows)\n\t\t{\n\t\t\t// save questions to db\n\t\t\t$this->saveQuestionsToDb();\n\t\t}\n\t\t\n\t\t// moved activation to ilObjectActivation\n\t\tif($this->ref_id)\n\t\t{\n\t\t\tinclude_once \"./Services/Object/classes/class.ilObjectActivation.php\";\t\t\n\t\t\tilObjectActivation::getItem($this->ref_id);\n\t\t\t\n\t\t\t$item = new ilObjectActivation;\t\t\t\n\t\t\tif(!$this->isActivationLimited())\n\t\t\t{\n\t\t\t\t$item->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED);\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\t$item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);\n\t\t\t\t$item->setTimingStart($this->getActivationStartDate());\n\t\t\t\t$item->setTimingEnd($this->getActivationEndDate());\n\t\t\t\t$item->toggleVisible($this->getActivationVisibility());\n\t\t\t}\t\t\t\t\t\t\n\t\t\t\n\t\t\t$item->update($this->ref_id);\t\t\n\t\t}\n\t}", "function wpbs_action_change_legend_auto_pending() {\n\n\t// Verify for nonce\n\tif( empty( $_POST['wpbs_token'] ) || ! wp_verify_nonce( $_POST['wpbs_token'], 'wpbs_change_legend_auto_pending' ) )\n\t\treturn;\n\n\tif( empty( $_POST['legend_item_id'] ) )\n\t\treturn;\n\n\t$legend_item = wpbs_get_legend_item( absint( $_POST['legend_item_id'] ) );\n\n\tif( is_null( $legend_item ) )\n\t\treturn;\n\n\t\n\t$existing_legends = wpbs_get_legend_items( array('calendar_id' => $legend_item->get('calendar_id'), 'auto_pending' => $_POST['auto_pending']) );\n\n\tforeach($existing_legends as $existing_legend){\n\t\t$existing_legend_data = array(\n\t\t\t'auto_pending' => ''\n\t\t);\n\t\twpbs_update_legend_item( $existing_legend->get('id'), $existing_legend_data );\n\t}\n\n\t// Prepare legend item data to be updated\n\t$legend_item_data = array(\n\t\t'auto_pending' => esc_sql($_POST['auto_pending'])\n\t);\n\n\t// Update legend item in the database\n\t$updated = wpbs_update_legend_item( $legend_item->get('id'), $legend_item_data );\n\n\tif( ! $updated )\n\t\treturn;\n\n\t// Redirect to the edit page of the legend with a success message\n\twp_redirect( add_query_arg( array( 'wpbs_message' => 'legend_item_change_auto_pending_success', 'legend_item_id' => $legend_item->get('id') ), remove_query_arg( array( 'wpbs_action', 'wpbs_token' ) ) ) );\n\texit;\n\n}", "public function ApplyChanges() {\n\t\tparent::ApplyChanges();\n\t\t\n\t\t$this->RegisterVariableBoolean(\"vacation\", \"Urlaub\", \"\", 0 );\n\t\t//$this->RegisterEventCyclic(\"UpdateTimer\", \"Automatische aktualisierung\", 15);\n\t}", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "private function saveResult()\n {\n if ($this->schedule) {\n $this->schedule->fill([\n 'result_state' => 1,\n 'finished' => 1,\n 'running' => 0,\n 'result_message' => $this->successMessage,\n ]);\n $this->schedule->save();\n }\n }", "public function processAndComplete()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_CREATED) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_COMPLETED;\n $this->withdrawal->save();\n }\n }", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "public function save()\n {\n if ( ! $start_date = $this->getData(\"start_date\"))\n {\n $start_date = time();\n }\n\n $start_date = strtotime($start_date);\n $this->setData(\"start_date\", date(\"Y-m-d\", $start_date));\n\n // We only need to do end dates if they are provided.\n if ($end_date = $this->getData(\"end_date\"))\n {\n $end_date = strtotime($end_date);\n $this->setData(\"end_date\", date(\"Y-m-d\", $end_date));\n }\n else\n {\n $this->setData(\"end_date\", NULL);\n }\n\n parent::save();\n }", "private function saveRepeatDaily(){\n Loader::db()->Execute(\"INSERT INTO SchedulizerEventRepeat (eventID) VALUES(?)\", array(\n $this->eventObj->getEventID()\n ));\n }", "function saveCompletionStatus() \n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$complete = 0;\n\t\tif ($this->isComplete()) \n\t\t{\n\t\t\t$complete = 1;\n\t\t}\n if ($this->getSurveyId() > 0) \n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE svy_svy SET complete = %s, tstamp = %s WHERE survey_id = %s\",\n\t\t\t\tarray('text','integer','integer'),\n\t\t\t\tarray($this->isComplete(), time(), $this->getSurveyId())\n\t\t\t);\n\t\t}\n\t}", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function applyChanges()\n {\n $em = $this->doctrine->getManager();\n $em->flush();\n\n // TODO: Can we be sure that the changes are available in the DB now?\n $ch = $this->getMasterRabbit()->channel();\n $msg = new AMQPMessage(\"sync\");\n $ch->basic_publish($msg, \"\", $this->name . \"_master\");\n }", "function recurringdowntime_cancel_pending_changes($cbtype, &$cbargs)\n{\n if ($cbargs['command'] != COMMAND_RESTORE_NAGIOSQL_SNAPSHOT || $cbargs['return_code'] != 0) {\n return;\n }\n\n recurringdowntime_update_pending_changes(array());\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 complete_update() {\n // Extract the relevant day of the week for which to update link times\n // N.B. php function: 6=Saturday, 7=Sunday, 1=Monday\n // \t postgres function: 6=Saturday, 0=Sunday, 1=Monday\n $dow = date('N',strtotime('yesterday', $this->backup_time)) % 7;\n\n echo \"Deleting stale information\".\"\\n\";\n $this->delete_stale_information($dow);\n echo \"Stale information deleted. Starting to process new average times\".\"\\n\";\n\n for($hod = 0; $hod < 24; $hod++) { // for each hour of the day\n $journey_times = $this->extract_journey_times($dow, $hod);\n $this->insert_into_database($journey_times, $dow, $hod);\n echo \"Update complete for hour \".$hod.\"\\n\";\n }\n }", "protected function _afterSave()\n\t{\n\t\t//$enabled = $this->getData('groups/export_settings/fields/cron_enabled/value');\n\t\t$cron_expr = $this->getData('groups/export_settings/fields/cron_expr/value');\n\t\ttry {\n\t\t\t\tMage::getModel('core/config_data')\n\t\t\t\t->load(self::CRON_STRING_PATH, 'path')\n\t\t\t\t->setValue($cron_expr)\n\t\t\t\t->setPath(self::CRON_STRING_PATH)\n\t\t\t\t->save();\n\n\t\t\t\tMage::getModel('core/config_data')\n\t\t\t\t->load(self::CRON_MODEL_PATH, 'path')\n\t\t\t\t->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))\n\t\t\t\t->setPath(self::CRON_MODEL_PATH)\n\t\t\t\t->save();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tMage::throwException(Mage::helper('adminhtml')->__($e.' - Unable to save Cron expression'));\n\t\t}\n\t\t\n\t}", "public function save()\n {\n return;\n }", "public function saveConditions()\n {\n foreach($this->reportsConditions as $k => $v) {\n $v->save();\n }\n }", "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "function setCompleted() {\n global $connection, $user;\n\n $this->movePosition(1);\n\n $sql = 'update TR_BATCH set completed_date = now() where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\", $this->batch_id);\n $statement->execute();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n }", "public function action_save()\n {\n // clear old reject info\n $this->setRejectInfo(null);\n\n if (isset($this->m_partial) && !empty($this->m_partial)) {\n $this->partial($this->m_partial);\n\n return;\n } else {\n $this->doSave();\n }\n }", "public function afterSaveCommit(): void\n {\n }", "protected function saveData()\n {\n $this->beforeSave();\n\n $changed = $this->setReceptionCode(\n $this->formData[$this->receptionCodeItem],\n $this->loader->getCurrentUser()->getUserId()\n );\n\n $this->afterSave($changed);\n\n $this->accesslog->logChange($this->request, null, $this->formData);\n }", "protected function saveData()\n {\n $this->beforeSave();\n\n $changed = $this->setReceptionCode(\n $this->formData[$this->receptionCodeItem],\n $this->loader->getCurrentUser()->getUserId()\n );\n\n $this->afterSave($changed);\n\n $this->accesslog->logChange($this->request, null, $this->formData);\n }", "function timetracking_save(timetracking $timetracking) {\n \n return $timetracking->save();\n}", "public function persist()\n {\n if ($schedule = Auth::user()->schedule) {\n $modules = $schedule->modules;\n $sessions = $schedule->sessions;\n\n $total_session_count = count($sessions);\n $completed_session_count = count(\n $sessions->where(\n 'status', 'completed'\n )\n );\n \n $progress = round(\n (($completed_session_count/$total_session_count) * 100), 2\n );\n\n $no_modules = count($modules);\n $sessions_completed = $sessions->where('status', 'completed')->count();\n $sessions_missed = $sessions->where('status', 'failed')->count();\n $sessions_incomplete = $sessions->where('status', 'incomplete')->count();\n\n\n $schedule->reports()->create(\n [\n 'no_modules' => $no_modules,\n 'sessions_completed' => $sessions_completed,\n 'sessions_missed' => $sessions_missed,\n 'sessions_incomplete' => $sessions_incomplete,\n 'progress' => $progress,\n 'sessions' => request('sessions'),\n 'time_spent' => request('comparedtime'),\n 'study_times' => request('studytimes'),\n 'module_ratings' => request('moduleratings'),\n 'predictions' => request('predictions'),\n 'sessiondetails' => request('sessiondetails')\n ]\n );\n }\n }", "public function update_v1_020_2016_20_12_12PM()\n {\n try {\n $connection=\"mongodb\";\n Schema::connection($connection)->create('ease_cancelletion_payments', function ($table) {\n $table->increments('id');\n $table->double('amount')->nullable();\n $table->integer('ease_seeker_id')->unsigned()->nullable();\n $table->foreign('ease_seeker_id')->references('_id')->on('ease_seekers')->onDelete('set null')->after('amount');\n $table->text('payment_through')->nullable();\n $table->integer('ease_service_request_id')->unsigned()->nullable();\n $table->foreign('ease_service_request_id')->references('_id')->on('ease_service_requests')->onDelete('set null')->after('payment_through');\n $table->timestamp('performed_at')->unsigned()->nullable();\n $table->timestamp('status')->nullable();\n\n $table->integer('created_by')->unsigned()->nullable();\n $table->foreign('created_by')->references('id')->on('users')->onDelete('set null')->after('status');\n $table->integer('modified_by')->unsigned()->nullable();\n $table->foreign('modified_by')->references('id')->on('users')->onDelete('set null')->after('created_by');\n $table->integer('deleted_by')->unsigned()->nullable();\n $table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null')->after('modified_by');\n\n $table->timestamps();\n $table->softDeletes();\n });\n } catch (Exception $e) {\n echo $e->getMessage();\n echo \" - this will not stop the execution of other functions<hr/>\";\n }\n }", "protected function finishSave()\n {\n $this->fireModelEvent('saved', false);\n $this->syncOriginal();\n }", "public function touch() {\n\t\t$this->timestamp();\n\t\t$this->save();\n\t}", "public function changeWork($request){\n if($request->duty)\n $this->duty = $request->duty;\n if($request->user_id)\n $this->user_id = $request->user_id;\n if($request->project_id)\n $this->project_id = $request->project_id;\n\n $this->save();\n }", "protected function sweep()\n\t{\n\t\tforeach ($this->flashRecord as $key => $record) {\n\t\t\tif ($record['is'] == 'old') {\n\t\t\t\t/* remove old */\n\t\t\t\tunset($this->flashRecord[$key]);\n\t\t\t} elseif ($record['is'] == 'new' && !isset($record['until'])) {\n\t\t\t\t/* tag new as old unless it has until */\n\t\t\t\t$this->flashRecord[$key]['is'] = 'old';\n\t\t\t} elseif (isset($record['until']) && $record['until'] < time()) {\n\t\t\t\t/* remove until */\n\t\t\t\tunset($this->flashRecord[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$this->save();\n\t}", "public function save()\n {\n // For V2.0\n }", "public function save ()\n {\n $this->objMysql->_insert (\"calendar.calendar_holidays\", [\n \"CALENDAR_UID\" => $this->calendar_uid,\n \"CALENDAR_HOLIDAY_NAME\" => $this->calendar_holiday_name,\n \"CALENDAR_HOLIDAY_START\" => $this->calendar_holiday_start,\n \"CALENDAR_HOLIDAY_END\" => $this->calendar_holiday_end\n ]\n );\n }", "public function afterSave()\n {\n // forget current data\n Cache::forget('julius_multidomain_settings');\n\n // get all records available now\n $cacheableRecords = Setting::generateCacheableRecords();\n\n //save them in cache\n Cache::forever('julius_multidomain_settings', $cacheableRecords);\n }", "public function updateLastUsed()\n {\n if (\n $this->last_used_at === null ||\n $this->last_used_at < (new \\DateTime())->sub(new \\DateInterval('P1D'))\n ) {\n $this->last_used_at = new \\DateTime();\n $this->save();\n }\n }", "public function setExecUpdateOnSave()\n {\n Configuration::updateValue('DF_UPDATE_ON_SAVE_LAST_EXEC', date('Y-m-d H:i:s'));\n }", "private function respawn()\n {\n // create new event at the end of the queue\n Mage::getModel('marketingsoftware/queue')\n ->setObject($this->currentStatus)\n ->setAction('file_sync')\n ->save();\n }", "function save(){\n\t\tif (isset($this->id) && !$this->_new) {\n\t\t\t$sql = \"UPDATE `tours` set \";\n\t\t\t$i = 0;\n\t\t\tforeach($this->UPDATE as $u){\n\t\t\t\tif ($i>0) $sql = $sql.\" , \";\n\t\t\t\t$sql = $sql.$u;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$sql = $sql.\" WHERE `id`='\".addslashes($this->id).\"'\";\n\t\t}else{\n\t\t\t$sql = \"INSERT into `tours` values('\".addslashes($this->id).\"' , '\".addslashes($this->name).\"' , '\".addslashes($this->duration).\"' , '\".addslashes($this->description).\"' , '\".addslashes($this->tcid).\"')\";\n\t\t}\n\t\t$this->connection->send_query($sql);\n\t}", "public function save_schedule_settings() {\n //get your POST parameter\n $action = \\Drupal::request()->get('action');\n $media_kit_id = \\Drupal::request()->get('media_kit_id');\n $social_media_name = \\Drupal::request()->get('social_media_name');\n $text = \\Drupal::request()->get('text');\n $uid = \\Drupal::request()->get('uid');\n $status = \\Drupal::request()->get('status');\n $page_id = \\Drupal::request()->get('page_id');\n $ufid = \\Drupal::request()->get('ufid');\n $user = \\Drupal::currentUser();\n // default un-published\n $is_published = 0;\n if ($action == 'schedule') {\n // save schedule form\n $schedule_type = \\Drupal::request()->get('schedule_type');\n $manual_datetime = \\Drupal::request()->get('manual_datetime');\n //convert manual_datetime to utc timestamp\n if ($manual_datetime) {\n $date = new DrupalDateTime($manual_datetime, new \\DateTimeZone($user->getTimeZone()));\n $date->setTimezone(new \\DateTimeZone('utc'));\n $manual_datetime = strtotime($date->format('Y-m-d H:i:s'));\n }\n $result = \\Drupal::database()->merge('social_media')->key(['uid' => $uid, 'ufid' => $ufid, 'social_media_name' => $social_media_name, ])->fields(['page_id' => $page_id, 'media_kit_id' => $media_kit_id, 'status' => $status, 'is_published' => $is_published, 'text' => $text, 'schedule_type' => $schedule_type, 'scheduled_timestamp' => $manual_datetime, 'created' => time(), ])->execute();\n $output['result'] = 'done';\n } else {\n //save main form\n $scheduled_bubble = \\Drupal::request()->get('scheduled_bubble');\n $mids = $_POST['mid'];\n $sm_post_id = NULL;\n $post_data = [];\n $post_data['message'] = $text;\n $post_data['mids'] = $mids;\n $sm = \\Drupal::database()->select('social_media', 'sm')->fields('sm', ['id', 'scheduled_timestamp'])->condition('sm.uid', $uid, '=')->condition('sm.ufid', $ufid, '=')->condition('sm.social_media_name', $social_media_name, '=')->execute()->fetchObject();\n if (!empty($sm)) {\n // scheduling found so post,draft and schedule operation would take place here.\n // if status is posted immediatelly published_date\n if ($status == 'Post') {\n $user = \\Drupal::currentUser();\n $date = new DrupalDateTime('now', new \\DateTimeZone($user->getTimeZone()));\n $date->setTimezone(new \\DateTimeZone('utc'));\n $manual_datetime = strtotime($date->format('Y-m-d H:i:s'));\n if ($social_media_name == 'Facebook') {\n $post_data['scheduled_publish_time'] = 0;\n $response = $this->facebook_post_publish($page_id, $post_data, $uid);\n if (array_key_exists(\"id\", $response)) {\n $is_published = 1;\n $sm_post_id = $response['id'];\n }\n }\n if ($social_media_name == 'Twitter') {\n $response = $this->twitter_tweet_publish($post_data, $uid);\n if ($response) {\n $is_published = 1;\n $sm_post_id = $response;\n } else {\n $response_message = \"error\";\n \\Drupal::logger('Social media twitter')->error('<pre><code>' . print_r($response_message, true) . '</code></pre>');\n }\n }\n if ($social_media_name == 'Instagram') {\n $response = $this->instagram_publish_media($page_id, $post_data, $uid);\n if (array_key_exists(\"id\", $response)) {\n $is_published = 1;\n $sm_post_id = $response['id'];\n }\n }\n \\Drupal::database()->update('social_media')->fields(['page_id' => $page_id, 'text' => $text, 'status' => $status, 'media_kit_id' => $media_kit_id, 'is_published' => $is_published, 'mids' => implode(',', $mids), 'sm_post_id' => $sm_post_id, 'scheduled_timestamp' => $manual_datetime, 'scheduled_bubble' => $scheduled_bubble])->condition('uid', $uid, '=')->condition('ufID', $ufid, '=')->condition('social_media_name', $social_media_name, '=')->execute();\n } elseif ($status == 'Scheduled') {\n if ($social_media_name == 'Facebook') {\n $date = new DrupalDateTime(date('d-m-Y h:i A', $sm->scheduled_timestamp), new \\DateTimeZone('utc'));\n $date->setTimezone(new \\DateTimeZone($user->getTimeZone()));\n $user_timestamp = strtotime($date->format('Y-m-d H:i:s'));\n $post_data['scheduled_publish_time'] = $user_timestamp;\n $response = $this->facebook_post_publish($page_id, $post_data, $uid);\n if (array_key_exists(\"id\", $response)) {\n $sm_post_id = $response['id'];\n }\n }\n \\Drupal::database()->update('social_media')->fields(['page_id' => $page_id, 'text' => $text, 'status' => $status, 'media_kit_id' => $media_kit_id, 'is_published' => $is_published, 'mids' => implode(',', $mids), 'sm_post_id' => $sm_post_id, 'scheduled_bubble' => $scheduled_bubble])->condition('uid', $uid, '=')->condition('ufID', $ufid, '=')->condition('social_media_name', $social_media_name, '=')->execute();\n } else {\n \\Drupal::database()->update('social_media')->fields(['page_id' => $page_id, 'text' => $text, 'status' => $status, 'media_kit_id' => $media_kit_id, 'is_published' => $is_published, 'mids' => implode(',', $mids), 'sm_post_id' => $sm_post_id, 'scheduled_bubble' => $scheduled_bubble])->condition('uid', $uid, '=')->condition('ufID', $ufid, '=')->condition('social_media_name', $social_media_name, '=')->execute();\n }\n $output['result'] = 'done';\n } else {\n // no settings for scheduling , so draft and post operation would take place in this block\n if ($status == 'Post') {\n if ($social_media_name == 'Facebook') {\n $post_data['scheduled_publish_time'] = 0;\n $response = $this->facebook_post_publish($page_id, $post_data, $uid);\n if (array_key_exists(\"id\", $response)) {\n $is_published = 1;\n $sm_post_id = $response['id'];\n }\n }\n if ($social_media_name == 'Twitter') {\n $response = $this->twitter_tweet_publish($post_data, $uid);\n if ($response) {\n $is_published = 1;\n $sm_post_id = $response;\n } else {\n $response_message = \"error\";\n \\Drupal::logger('Social media twitter')->error('<pre><code>' . print_r($response_message, true) . '</code></pre>');\n }\n }\n if ($social_media_name == 'Instagram') {\n $response = $this->instagram_publish_media($page_id, $post_data, $uid);\n if (array_key_exists(\"id\", $response)) {\n $is_published = 1;\n $sm_post_id = $response['id'];\n }\n }\n }\n // schedule data\n $user = \\Drupal::currentUser();\n $date = new DrupalDateTime('now', new \\DateTimeZone($user->getTimeZone()));\n $date->setTimezone(new \\DateTimeZone('utc'));\n $manual_datetime = strtotime($date->format('Y-m-d H:i:s'));\n $result = \\Drupal::database()->merge('social_media')->key(['uid' => $uid, 'ufid' => $ufid, 'social_media_name' => $social_media_name, 'scheduled_bubble' => $scheduled_bubble])->fields(['page_id' => $page_id, 'media_kit_id' => $media_kit_id, 'status' => $status, 'is_published' => $is_published, 'text' => $text, 'schedule_type' => 'manual_check', 'scheduled_timestamp' => $manual_datetime, 'created' => time(), 'mids' => implode(',', $mids), 'sm_post_id' => $sm_post_id])->execute();\n $output['result'] = 'done';\n }\n }\n $json_response = json_encode($output);\n return new JsonResponse($json_response);\n }", "static function setAllDirty()\n\t{\n\t\tglobal $ilDB;\n\t\n\t\t$ilDB->manipulate(\"UPDATE ut_lp_marks SET \".\n\t\t\t\" status_dirty = \".$ilDB->quote(1, \"integer\")\n\t\t\t);\n\t\t\n\t}", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "public function finished() {\n $this->setFinishedAt(new MongoDate());\n $this->save();\n }", "private function actualizar_fechaenvio_docxpagarcpe(){\n\n $this->docxpagar_cpe->fecha_envio = Carbon::now();\n $this->docxpagar_cpe->save();\n\n }", "function save_test_completed_date()\n\t{\n\t\t$this->load->model('frontendmodel');\n\n\t\t$this->frontendmodel->update_test_completed_date();\n\t}", "function update_pnh_pending_shipmets()\r\n\t\t{\r\n\t\t\t$user=$this->erpm->auth();\r\n\t\t\t\r\n\t\t\t$invoices=$this->input->post('invoices');\r\n\t\t\t$send_log_id=$this->input->post('manifesto_nu');\r\n\t\t\t$pr_remark=$this->input->post('part_ps_manifesto');\r\n\t\t\t\r\n\t\t\tif($invoices)\r\n\t\t\t{\r\n\t\t\t\t//if any changes affected in pending shipments group while outscan time then some update process take place\r\n\t\t\t\t//get manifesto id\r\n\t\t\t\t$manifesto_id_det=$this->db->query(\"select manifesto_id ,remark from pnh_m_manifesto_sent_log where id=?\",$send_log_id)->result_array();\r\n\t\t\t\t\r\n\t\t\t\t$manifesto_id=$manifesto_id_det[0]['manifesto_id'];\r\n\t\t\t\t$remark=$manifesto_id_det[0]['remark'];\r\n\t\t\t\t\r\n\t\t\t\t//update the manifesto table\r\n\t\t\t\t$ins_data = array();\r\n\t\t\t\t$ins_data['invoice_nos'] = implode(',',$invoices);\r\n\t\t\t\t$ins_data['modified_on'] = date('Y-m-d H:i:s');\r\n\t\t\t\t$ins_data['modified_by'] = $user['userid'];\r\n\t\t\t\t$this->db->where('id',$manifesto_id);\r\n\t\t\t\t$this->db->update(\"pnh_manifesto_log\",$ins_data);\r\n\t\t\t\t\r\n\t\t\t\t//update the shipment batch process table\r\n\t\t\t\t$invoices_arr=$invoices;\r\n\t\t\t\t$invoices=implode(',',$invoices);\r\n\t\t\t\t$this->db->query(\"update shipment_batch_process_invoice_link set inv_manifesto_id=? where invoice_no in ($invoices) \",array($manifesto_id));\r\n\t\t\t\t\r\n\t\t\t\t$this->db->query(\"update shipment_batch_process_invoice_link set inv_manifesto_id=0 where invoice_no not in ($invoices) and inv_manifesto_id = ? \",array($manifesto_id));\r\n\t\t\t\t\r\n\t\t\t\t//update the manifsto sent log table\r\n\t\t\t\t$sent_manifesto_logid = $send_log_id;\r\n\t\t\t\t\r\n\t\t\t\t$param1=array();\r\n\t\t\t\t$param1['remark']=$remark.'::'.$pr_remark;\r\n\t\t\t\t$param1['sent_invoices']=$invoices;\r\n\t\t\t\t$param1['modified_on']=cur_datetime();\r\n\t\t\t\t$param1['modified_by']=$user['userid'];\r\n\t\t\t\t$this->db->where('id',$sent_manifesto_logid);\r\n\t\t\t\t$this->db->update(\"pnh_m_manifesto_sent_log\",$param1);\r\n\t\t\t\t\r\n\t\t\t\t$cur_datetime=cur_datetime();\r\n\t\t\t\t//update the invoices transit log\r\n\t\t\t\t$this->db->query(\"update pnh_invoice_transit_log set status = 9 where sent_log_id = ? \",$sent_manifesto_logid);\r\n\t\t\t\tforeach($invoices_arr as $invno)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tray_inv_status = 3;\r\n\t\t\t\t\tif($this->db->query(\"select count(*) as t from pnh_invoice_transit_log where sent_log_id = ? and invoice_no = ? \",array($sent_manifesto_logid,$invno))->row()->t)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->db->query(\"update pnh_invoice_transit_log set status = 0 where sent_log_id = ? and invoice_no = ? and status = 9 \",array($sent_manifesto_logid,$invno));\r\n\t\t\t\t\t\t$tray_inv_status = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// remove shipments/invoice from tray\r\n\t\t\t\t\t$tray_inv_link = $this->db->query(\"select tray_inv_id,tray_terr_id from pnh_t_tray_invoice_link where invoice_no = ? and status = 1 order by tray_inv_id desc limit 1 \",$invno)->row_array();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// update tray invoice status = 2 for invno\r\n\t\t\t\t\t$this->db->query(\"update pnh_t_tray_invoice_link set status = $tray_inv_status,modified_on=?,modified_by=? where status = 1 and tray_inv_id = ? \",array($cur_datetime,$user['userid'],$tray_inv_link['tray_inv_id']));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->query(\"update pnh_t_tray_territory_link set is_active = 0,modified_on=?,modified_by=? where is_active = 1 and tray_terr_id = ? \",array($cur_datetime,$user['userid'],$tray_inv_link['tray_terr_id']));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->db->query(\"delete from pnh_invoice_transit_log where sent_log_id = ? and status = 9 \",array($sent_manifesto_logid));\r\n\t\t\t\t\r\n\t\t\t\t//finally update the ship status in shipment batch process table\r\n\t\t\t\t$prama3=array();\r\n\t\t\t\t/*$prama3['shipped']=1;\r\n\t\t\t\t$prama3['shipped_on']=cur_datetime();\r\n\t\t\t\t$prama3['shipped_by']=$user['userid'];*/\r\n\t\t\t\t\r\n\t\t\t\t$prama3['outscanned']=1;\r\n\t\t\t\t$prama3['outscanned_on']=cur_datetime();\r\n\t\t\t\t$prama3['outscanned_by']=$user['userid'];\r\n\t\t\t\t\r\n\t\t\t\t$this->db->where('inv_manifesto_id',$manifesto_id);\r\n\t\t\t\t$this->db->update(\"shipment_batch_process_invoice_link\",$prama3);\r\n\t\t\t\t\r\n\t\t\t\tif($this->db->affected_rows())\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->query(\"update pnh_m_manifesto_sent_log set status=2,modified_on=?,modified_by=? where id=?\",array($cur_datetime,$user['userid'],$sent_manifesto_logid));\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach($invoices_arr as $inv)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$trans_logprm=array();\r\n\t\t\t\t\t\t$trans_logprm['transid']=$this->db->query(\"select transid from king_invoice where invoice_no=? limit 1\",$inv)->row()->transid;\r\n\t\t\t\t\t\t$trans_logprm['admin']=$user['userid'];\r\n\t\t\t\t\t\t$trans_logprm['time']=time();\r\n\t\t\t\t\t\t$trans_logprm['msg']='invoice ('.$inv.') Outscanned';\r\n\t\t\t\t\t\t$this->db->insert(\"transactions_changelog\",$trans_logprm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",count($invoices_arr).\" Invoices selected for delivery\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tredirect(site_url('admin/view_manifesto_sent_log'));\r\n\t\t\t\r\n\t\t}", "public static function SfwUpdate_DoFinisnAction()\n {\n // EXAMPLE\n // global $apbct;\n // $apbct->data['last_firewall_updated'] = current_time('timestamp');\n // $apbct->save('data');\n // $apbct->stats['sfw']['entries'] = $wpdb->get_var('SELECT COUNT(*) FROM ' . APBCT_TBL_FIREWALL_DATA );\n // $apbct->stats['sfw']['last_update_time'] = time();\n // $apbct->save('stats');\n }", "public function save() {}", "public function save() {}", "public function save() {}", "function wlms_member_issues_settings_save()\n{\n global $wpdb;\n $member_type = \"\";\n $returned_limit = \"\";\n $limit_borrow = \"\";\n $fine = \"\";\n \n $member_type = $_POST['member_roles'];\n $returned_limit = trim( $_POST['allow_returned_days'] );\n $limit_borrow = trim( $_POST['allow_books_borrow'] );\n $fine = trim( $_POST['fine_per_day'] );\n \n $errors = array();\n\n if ($member_type == -1)\n {\n array_push( $errors, \"*\" );\n }\n \n if (strlen($returned_limit) == 0)\n {\n array_push( $errors, \"*\" );\n }\n \n if (strlen($limit_borrow) == 0)\n {\n array_push( $errors, \"*\" );\n }\n \n if (strlen($fine) == 0)\n {\n array_push( $errors, \"*\" );\n }\n\n if( count($errors) == 0 )\n {\n $nonce = $_REQUEST['_wpnonce'];\n if ( ! wp_verify_nonce( $nonce, 'submit_members_issues' ) ) \n {\n exit; \n }\n \n $get_issues_sql = $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wlms_member_issues_settings WHERE member_role = %s \", $member_type );\n $issues = $wpdb->get_row( $get_issues_sql, ARRAY_A );\n \n \n if((count($issues) == 0) || ( count($issues) >0 && $issues['id'] == $_GET['update_id'] ))\n {\n \n //save issues\n $id = 0;\n if(isset ($_POST['wlms_save_member_issues']))\n {\n $wpdb->query( $wpdb->prepare( \n \"\n INSERT INTO {$wpdb->prefix}wlms_member_issues_settings\n ( member_role, returned_days, books_borrow, fine )\n VALUES ( %s, %d, %d, %d )\n \", \n array(\n $member_type, \n $returned_limit,\n $limit_borrow,\n $fine \n ) \n ) );\n\n $id = $wpdb->insert_id;\n set_message_key('item_saved', 'saved');\n }\n\n //update issues\n if(isset ($_POST['wlms_update_member_issues']))\n {\n $request_id = 0;\n if ( is_numeric( $_GET['update_id'] ) ) {\n $request_id = absint( $_GET['update_id'] );\n $id = $request_id;\n }\n\n $wpdb->query(\n $wpdb->prepare(\n \"UPDATE {$wpdb->prefix}wlms_member_issues_settings SET member_role = %s, returned_days = %d, books_borrow = %d, fine = %d WHERE id= %d\",\n $member_type, $returned_limit, $limit_borrow, $fine, $request_id\n )\n );\n\n set_message_key('item_updated', 'updated');\n }\n \n wp_redirect( esc_url_raw( add_query_arg( array( 'update_id' => $id ), admin_url( 'admin.php?page=wlms-pages&wlms-tab=wlms-member-issues-settings&manage=add-member-issues' ) ) ) ); exit;\n }\n else\n {\n set_message_key('issues_already_created', 'created');\n wp_redirect( esc_url_raw( admin_url( 'admin.php?page=wlms-pages&wlms-tab=wlms-member-issues-settings&manage=add-member-issues' ) ) ); exit;\n }\n }\n \n}", "function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = EM_TICKETS_BOOKINGS_TABLE;\r\n\t\tdo_action('em_ticket_booking_save_pre',$this);\r\n\t\t//First the person\r\n\t\tif($this->validate()){\t\t\t\r\n\t\t\t//Now we save the ticket\r\n\t\t\t$this->booking_id = $this->get_booking()->id; //event wouldn't exist before save, so refresh id\r\n\t\t\t$data = $this->to_array(true); //add the true to remove the nulls\r\n\t\t\tif($this->id != ''){\r\n\t\t\t\t$where = array( 'ticket_booking_id' => $this->id ); \r\n\t\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t\t\t$this->feedback_message = __('Changes saved','dbem');\r\n\t\t\t}else{\r\n\t\t\t\t//TODO better error handling\r\n\t\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t\t $this->id = $wpdb->insert_id; \r\n\t\t\t\t$this->feedback_message = __('Ticket booking created','dbem'); \r\n\t\t\t}\r\n\t\t\tif( $result === false ){\r\n\t\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t}\r\n\t\t\treturn apply_filters('em_ticket_booking_save', ( count($this->errors) == 0 ), $this);\r\n\t\t}else{\r\n\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\treturn apply_filters('em_ticket_booking_save', false, $this);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function flushUpdates();", "protected function saveState(): void\n {\n $em = $this->getEntityManager();\n $em->flush();\n }", "public function store(Request $request)\n {\n // return $request->all();\n $budget = $request->isMethod('put') ? \\App\\Budget::findOrFail($request->budget_id) : new \\App\\Budget; \n\n if($request->isMethod('put') == true)\n { \n if($request->actions == '')\n { \n $budget->id = $request->budget_id;\n $budget->name = $request->name;\n $budget->description = $request->description;\n $budget->type_id = $request->type_id;\n $budget->department_id = $request->department_id;\n $budget->amount = $request->amount;\n $budget->year = $request->year;\n $budget->end_date = $request->end_date;\n $budget->balance = $request->balance;\n $budget->workflow_id = $request->workflow_id;\n } \n else\n { \n $budget->id = $request->budget_id;\n $budget->name = $request->name;\n $budget->description = $request->description;\n $budget->type_id = $request->type_id;\n $budget->department_id = $request->department_id;\n $budget->amount = $request->amount;\n $budget->year = $request->year;\n $budget->end_date = $request->end_date;\n $budget->balance = $request->balance;\n $budget->workflow_id = $request->workflow_id;\n $budget->flow_stage_id = $request->actions + 1;\n $budget->actions = $request->actions;\n } \n\n if($budget->save())\n {\n //track history\n if($request->actions == ''){ $Action = 'Update'; } \n elseif($request->actions == 2) { $Action = 'Review'; }\n elseif($request->actions == 3) { $Action = 'Approve'; }\n $history = new \\App\\TrackHistory;\n\n $history->history_name = 'Budget';\n $history->action_name_id = $budget->id;\n $history->action = $Action;\n $history->created_by = 2; \n\n if($history->save())\n {\n //UPDATE NO OF FLOWS\n return new BudgetResource($budget);\n } \n }\n }\n else\n { \n $budget->name = $request->name;\n $budget->description = $request->description;\n $budget->type_id = $request->type_id;\n $budget->department_id = $request->department_id;\n $budget->amount = $request->amount;\n $budget->balance = $request->amount;\n $budget->year = $request->year;\n $budget->end_date = date('Y-m-d', strtotime($request->end_date));\n $budget->workflow_id = $request->workflow_id;\n\n if($budget->save())\n {\n //track history\n $history = new \\App\\TrackHistory;\n\n $history->history_name = 'Budget';\n $history->action_name_id = $budget->id;\n $history->action = 'Create';\n $history->created_by = 2; \n\n if($history->save())\n {\n //UPDATE NO OF FLOWS\n $workflow_count = \\App\\Flow::where('workflow_id', $request->workflow_id)->count();\n $no_of_flows = $workflow_count;\n $data = array\n (\n 'no_of_flows' => $workflow_count, 'updated_at' => date('Y-m-d h:i:s')\n );\n \\App\\Workflow::where('id', $request->workflow_id)->update($data);\n \n //update position\n $position = \\App\\Flow::where('workflow_id', $request->workflow_id)->where('position', 2)->first();\n $data = array\n (\n 'flow_stage_id' => $position->position, 'updated_at' => date('Y-m-d h:i:s')\n );\n \\App\\Budget::where('id', $budget->id)->update($data);\n return new BudgetResource($budget);\n } \n }\n \n }\n\n \n\n }" ]
[ "0.62430805", "0.61941457", "0.61738515", "0.6168474", "0.614667", "0.6138163", "0.6027674", "0.60228664", "0.60148114", "0.599616", "0.59917647", "0.59449524", "0.5884287", "0.5881827", "0.5867828", "0.58606964", "0.58519536", "0.585153", "0.58460206", "0.5843906", "0.58356774", "0.5824803", "0.58244324", "0.58122313", "0.57878196", "0.57840306", "0.5783932", "0.5782879", "0.5771845", "0.576689", "0.5766364", "0.5764711", "0.57613015", "0.57574224", "0.57543075", "0.5747767", "0.57346207", "0.57207847", "0.5717046", "0.5708936", "0.5708074", "0.5704011", "0.5700531", "0.5684506", "0.5673715", "0.5664961", "0.5663143", "0.564609", "0.5645336", "0.5644876", "0.5642188", "0.56366843", "0.5628055", "0.56195813", "0.5614083", "0.56066275", "0.5592985", "0.5587335", "0.5586674", "0.55852276", "0.5565198", "0.55613834", "0.5552313", "0.5544724", "0.5533373", "0.553025", "0.552936", "0.5521974", "0.55138767", "0.55138767", "0.55119723", "0.55077463", "0.5501638", "0.5500145", "0.5494102", "0.5493927", "0.5493679", "0.5492934", "0.54906553", "0.5485726", "0.54797536", "0.5479273", "0.54782367", "0.547609", "0.5464062", "0.5462003", "0.5457632", "0.5456589", "0.54448515", "0.5444823", "0.5435761", "0.54308283", "0.54275405", "0.54275405", "0.5427046", "0.5426293", "0.54224336", "0.54210174", "0.5417526", "0.54168636" ]
0.61668426
4
Convert a PHP array containing recurring downtime config to a string appropriate for downtime's schedule.cfg
function recurringdowntime_array_to_cfg($arr) { if (count($arr) == 0) { return ""; } $cfg_str = ""; foreach ($arr as $sid => $schedule) { if (count($schedule) == 0) { continue; } $cfg_str .= "define schedule {\n"; $cfg_str .= "\tsid\t\t\t$sid\n"; foreach ($schedule as $var => $val) { // get a sane tab count for proper viewing/troubleshooting $tabs = "\t\t"; if ($var == 'servicegroup_name' || $var == 'service_description') $tabs = "\t"; if ($var == 'user' || $var == 'comment' || $var == 'time' || $var == 'svcalso') $tabs .= "\t"; $cfg_str .= "\t$var{$tabs}$val\n"; } $cfg_str .= "}\n\n"; } return $cfg_str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "function recurringdowntime_write_cfg($cfg)\n{\n if (is_array($cfg)) {\n $cfg_str = recurringdowntime_array_to_cfg($cfg);\n } else {\n $cfg_str = $cfg;\n }\n recurringdowntime_check_cfg();\n file_put_contents(RECURRINGDOWNTIME_CFG, $cfg_str);\n return true;\n}", "function recurringdowntime_get_service_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"host\") {\n continue;\n }\n }\n\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n\n if (array_key_exists('host_name', $schedule)) {\n if (array_key_exists('service_description', $schedule)) {\n if ($schedule[\"service_description\"] != '*') {\n $search_str = $schedule[\"service_description\"];\n\n if (strstr($schedule[\"service_description\"], \"*\")) {\n $search_str = \"lk:\" . str_replace(\"*\", \"%\", $schedule[\"service_description\"]);\n }\n if (!is_authorized_for_service(0, $schedule[\"host_name\"], $search_str)) {\n continue;\n }\n }\n }\n\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_update_pending_changes($arr)\n{\n if (empty($arr)) {\n $arr = array();\n }\n\n // Save the array into an option\n $encoded = base64_encode(json_encode($arr));\n set_option('recurringdowntime_pending_changes', $encoded);\n}", "function recurringdowntime_get_host_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"service\") {\n continue;\n }\n }\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n if (array_key_exists('host_name', $schedule)) {\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "public static function getSchedulePattern(): string;", "function recurringdowntime_get_hostgroup_cfg($hostgroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"hostgroup\") {\n continue;\n }\n }\n if ($hostgroup && !(strtolower($schedule[\"hostgroup_name\"]) == strtolower($hostgroup))) {\n continue;\n }\n if (array_key_exists('hostgroup_name', $schedule)) {\n if (is_authorized_for_hostgroup(0, $schedule[\"hostgroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_servicegroup_cfg($servicegroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"servicegroup\") {\n continue;\n }\n }\n if ($servicegroup && !(strtolower($schedule[\"servicegroup_name\"]) == strtolower($servicegroup))) {\n continue;\n }\n if (array_key_exists('servicegroup_name', $schedule)) {\n if (is_authorized_for_servicegroup(0, $schedule[\"servicegroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function serendipity_replaceEmbeddedConfigVars ($s) {\n return str_replace(\n array(\n '%clock%'\n ),\n\n array(\n date('H:i')\n ),\n\n $s);\n}", "function my_cron_schedules($schedules){\r\n if(!isset($schedules[\"5min\"])){\r\n $schedules[\"5min\"] = array(\r\n 'interval' => 5*60,\r\n 'display' => __('Once every 5 minutes'));\r\n }\r\n if(!isset($schedules[\"15min\"])){\r\n $schedules[\"15min\"] = array(\r\n 'interval' => 15*60,\r\n 'display' => __('Once every 15 minutes'));\r\n }\r\n return $schedules;\r\n}", "function cfgArray2CfgString($cfgArr) {\r\n\r\n // Initialize:\r\n $inLines = array();\r\n\r\n // Traverse the elements of the form wizard and transform the settings into configuration code.\r\n foreach($cfgArr as $vv) {\r\n if ($vv['comment']) {\r\n // If \"content\" is found, then just pass it over.\r\n $inLines[] = trim($vv['comment']);\r\n } else {\r\n // Begin to put together the single-line configuration code of this field:\r\n\r\n // Reset:\r\n $thisLine = array();\r\n\r\n // Set Label:\r\n $thisLine[0] = str_replace('|', '', $vv['label']);\r\n\r\n // Set Type:\r\n if ($vv['type']) {\r\n $thisLine[1] = ($vv['required']?'*':'').str_replace(',', '', ($vv['fieldname']?$vv['fieldname'].'=':'').$vv['type']);\r\n\r\n // Default:\r\n $tArr = array('', '', '', '', '', '');\r\n switch((string)$vv['type']) {\r\n case 'textarea':\r\n if (intval($vv['cols'])) $tArr[0] = intval($vv['cols']);\r\n if (intval($vv['rows'])) $tArr[1] = intval($vv['rows']);\r\n if (trim($vv['extra'])) $tArr[2] = trim($vv['extra']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'input':\r\n case 'password':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if (intval($vv['max'])) $tArr[1] = intval($vv['max']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'file':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n break;\r\n case 'select':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if ($vv['autosize']) $tArr[0] = 'auto';\r\n if ($vv['multiple']) $tArr[1] = 'm';\r\n\r\n }\r\n $tArr = $this->cleanT($tArr);\r\n if (count($tArr)) $thisLine[1] .= ','.implode(',', $tArr);\r\n\r\n $thisLine[1] = str_replace('|', '', $thisLine[1]);\r\n\r\n // Default:\r\n if ($vv['type'] == 'select' || $vv['type'] == 'radio') {\r\n $thisLine[2] = str_replace(chr(10), ', ', str_replace(',', '', $vv['options']));\r\n } elseif ($vv['type'] == 'checkbox') {\r\n if ($vv['default']) $thisLine[2] = 1;\r\n } elseif (strcmp(trim($vv['default']), '')) {\r\n $thisLine[2] = $vv['default'];\r\n }\r\n if (isset($thisLine[2])) $thisLine[2] = str_replace('|', '', $thisLine[2]);\r\n }\r\n\r\n // Compile the final line:\r\n $inLines[] = ereg_replace(\"[\\n\\r]*\", '', implode(' | ', $thisLine));\r\n }\r\n }\r\n // Finally, implode the lines into a string, and return it:\r\n return implode(chr(10), $inLines);\r\n }", "public function getScheduleDescription() {\n\t\t\n\t\t$description = '';\n\t\t\n\t\tif ($this->isEveryDaySchedule()) {\n\t\t\t$description .= 'Envio Diario';\n\t\t}\n\t\t\n\t\tif ($this->isOnceAWeekSchedule()) {\n\t\t\t\n\t\t\t$description .= 'Envio Semanal ';\n\t\t\t$weekdays = NewsletterSchedulePeer::getWeekdays();\n\t\t\t$description .= '(Se realiza los dias ' . $weekdays[$this->getDeliveryDay()] . ')';\n\t\t}\n\n\t\tif ($this->isOnceAMonthSchedule()) {\n\t\t\t\n\t\t\t$description .= 'Envio Mensual ';\n\t\t\t$description .= '(Se realiza el dia ' . $this->getDeliveryDayNumber() . ' del mes)';\n\t\t}\n\t\t\n\t\tif ($this->isOnceSchedule()) {\n\t\t\t\n\t\t\t$description .= 'Envio Unico ';\n\t\t\t$description .= '(Se realiza el dia ' . date(\"d-m-Y\",strtotime($this->getDeliveryDate())) . ')';\n\t\t}\t\t\n\t\t\n\t\treturn $description;\n\t\t\n\t}", "function filter_cron_schedules($schedules) {\n $schedules['once_half_hour'] = array(\n 'interval' => 1800, // seconds\n 'display' => __('Once Half an Hour')\n );\n $schedules['half_part_time'] = array(\n 'interval' => 900, // seconds\n 'display' => __('Half Part Time')\n );\n\n return $schedules;\n}", "public function schedules()\n {\n $inVacation = config('schedules')['vacation'];\n $weekdays = config('schedules')['tabData']['days'];\n\n if ($inVacation) {\n $schedules = [\n 'sun' => null,\n 'mon' => null,\n 'tue' => null,\n 'wed' => null,\n 'thu' => null,\n 'fri' => null,\n 'sat' => null\n ];\n\n $scheduleMessage = config('schedules')['vacationMessage'] . '<br>...';\n } else {\n $schedules = $this->schedules->getByDay();\n $scheduleMessage = 'Sem horários<br>...';\n }\n\n return [\n 'weekDays' => $weekdays,\n 'currentDay' => \\strtolower(\\date('D')),\n 'schedules' => $schedules,\n 'scheduleEmptyMessage' => $scheduleMessage\n ];\n }", "function nhymxu_weekly_cron_job_recurrence( $schedules ) {\n\t$schedules['weekly'] = array(\n\t\t'display' => 'weekly',\n\t\t'interval' => 604800,\n\t);\n\treturn $schedules;\n}", "function recurringdowntime_check_cfg()\n{\n if (!file_exists(RECURRINGDOWNTIME_CFG)) {\n $fh = @fopen(RECURRINGDOWNTIME_CFG, \"w+\");\n fclose($fh);\n }\n}", "function cron_add_weekly( $schedules ) {\n $schedules['weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly' )\n );\n return $schedules;\n}", "function recurringdowntime_get_pending_changes()\n{\n $obj = get_option('recurringdowntime_pending_changes', array());\n if (!is_array($obj)) {\n $obj = json_decode(base64_decode($obj), true);\n }\n return $obj;\n}", "public function get_timming_config()\n {\n return array(\"4\" => \"1\", \"5\" => \"7\", \"6\" => \"30\", \"8\" => \"60\", \"9\" => \"90\", \"17\" => \"w\", \"31\" => \"m\",\n \"3\" => \"3\", \"14\" => \"14\");\n }", "function ds_add_email_cron_schedules( $param ) {\n\n $param['fifteen_minute'] = array(\n 'interval' => 900, // seconds* 900/60 = 15 mins\n 'display' => __( 'Every Fifteen Minutes' )\n );\n\n return $param;\n\n }", "function add_cuentadigital_interval($schedules){\n $schedules['cuentadigital_interval'] = array(\n 'interval' => $this->cuentadigital_interval,\n 'display' => __( 'CuentaDigital Interval', 'se' )\n );\n return $schedules;\n }", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "protected function getConfigName()\n {\n return 'realtime';\n }", "function nde_edreports_add_intervals($schedules)\n\t{\n\t\t$schedules['weekly'] = array(\n\t\t\t'interval' => 604800,\n\t\t\t'display' => __('Once Weekly')\n\t\t);\n\t\t$schedules['monthly'] = array(\n\t\t\t'interval' => 2635200,\n\t\t\t'display' => __('Once a month')\n\t\t);\n\t\t$schedules['tenminutes'] = array(\n\t\t\t'interval' => 600,\n\t\t\t'display' => __('Every 10 Minutes')\n\t\t);\n\t\treturn $schedules;\n\t}", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['emailchef']['fields']['emailchef_cron_frequency']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_frequency']['value'] :\n EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['emailchef']['fields']['emailchef_cron_offset']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_offset']['value'] :\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log('eMailChef: Could not find cron frequency in valid list. Defaulted to hourly', Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }", "public function __toString()\n {\n $s = \"ScheduleExpression[\";\n $s .= \"second=\";\n $s .= $this->second;\n $s .= \" minute=\";\n $s .= $this->minute;\n $s .= \" hour=\";\n $s .= $this->hour;\n $s .= \" dayOfWeek=\";\n $s .= $this->dayOfWeek;\n $s .= \" dayOfMonth=\";\n $s .= $this->dayOfMonth;\n $s .= \" month=\";\n $s .= $this->month;\n $s .= \" year=\";\n $s .= $this->year;\n $s .= \" start=\";\n $s .= (string)$this->start;\n $s .= \" end=\";\n $s .= (string)$this->end;\n $s .= \" timezone=\";\n $s .= $this->timezone;\n $s .= \"]\";\n\n return $s;\n }", "function recurringdowntime_apply_pending_changes($cbtype, &$cbargs)\n{\n // Verify this is an apply config and it finished successfully\n if ($cbargs['command'] != COMMAND_NAGIOSCORE_APPLYCONFIG || $cbargs['return_code'] != 0) {\n return;\n }\n\n // Verify there are pending changes\n $pending = recurringdowntime_get_pending_changes();\n if (empty($pending)) {\n return;\n }\n\n // Apply the actual changes to the cfg\n $cfg = recurringdowntime_get_cfg();\n foreach ($pending as $p) {\n if (array_key_exists('host_name', $p)) {\n $cfg[$p['cfg_id']]['host_name'] = $p['host_name'];\n } else if (array_key_exists('service_description', $p)) {\n $cfg[$p['cfg_id']]['service_description'] = $p['service_description'];\n } else if (array_key_exists('hostgroup_name', $p)) {\n $cfg[$p['cfg_id']]['hostgroup_name'] = $p['hostgroup_name'];\n } else if (array_key_exists('servicegroup_name', $p)) {\n $cfg[$p['cfg_id']]['servicegroup_name'] = $p['servicegroup_name'];\n }\n }\n\n recurringdowntime_write_cfg($cfg);\n recurringdowntime_update_pending_changes(array());\n}", "function toString() {\r\n\r\n\t\t$sb = 'MessageResourcesConfig[';\r\n\t\t$sb .= 'factory=';\r\n\t\t$sb .= $this->factory;\r\n\t\t$sb .= 'null=';\r\n\t\t$sb .= $this->nullValue;\r\n\t\t$sb .= ',parameter=';\r\n\t\t$sb .= $this->parameter;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}", "function wpcron_intervals( $schedules ) {\n\n\t// one minute\n\n\t$one_minute = array(\n\t\t\t\t\t'interval' => 60,\n\t\t\t\t\t'display' => 'One Minute'\n\t\t\t\t);\n\n\t$schedules[ 'one_minute' ] = $one_minute;\n\n\t// five minutes\n\n\t$five_minutes = array(\n\t\t\t\t\t'interval' => 300,\n\t\t\t\t\t'display' => 'Five Minutes'\n\t\t\t\t);\n\n\t$schedules[ 'five_minutes' ] = $five_minutes;\n\n\t// return data\n\n\treturn $schedules;\n\n}", "function formatClosingHours($settings)\n{\n\treturn [\n\t\t'Monday' => ['open' => $settings['monday_open'], 'close' => $settings['monday_close']],\n\t\t'Tuesday' => ['open' => $settings['tuesday_open'], 'close' => $settings['tuesday_close']],\n\t\t'Wednesday' => ['open' => $settings['wednesday_open'], 'close' => $settings['wednesday_close']],\n\t\t'Thursday' => ['open' => $settings['thursday_open'], 'close' => $settings['thursday_close']],\n\t\t'Friday' => ['open' => $settings['friday_open'], 'close' => $settings['friday_close']],\n\t\t'Saturday' => ['open' => $settings['saturday_open'], 'close' => $settings['saturday_close']],\n\t\t'Sunday' => ['open' => $settings['sunday_open'], 'close' => $settings['sunday_close']],\n\t];\n}", "private function array_ts($conf){\n return $conf;//TODO\n }", "function add_cron_intervals( $schedules ) {\n\n\t$schedules['5seconds'] = array( // Provide the programmatic name to be used in code\n\t\t'interval' => 5, // Intervals are listed in seconds\n\t\t'display' => 'Every 5 Seconds' // Easy to read display name\n\t);\n\treturn $schedules; // Do not forget to give back the list of schedules!\n}", "public function createRrule() : string\n {\n return Recur::format(\n self::RRULE,\n $this->rrule,\n $this->getConfig( self::ALLOWEMPTY )\n );\n }", "function _upgrade_cron_array($cron)\n {\n }", "function jetpack_sync_full_sync_interval( $schedule_name ) {\n\treturn 'twicedaily';\n}", "private function getRule(array $rdatesArray, $tzName)\n {\n if ($tzName == 'BRT' || $tzName == 'BRST') {\n return str_replace(' ', '', 'RDATE;VALUE=DATE-TIME:'. implode(', ', $rdatesArray));\n }\n return str_replace(array(' ', self::EOL), array('', self::EOL . ' '), wordwrap('RDATE;VALUE=DATE-TIME:'. implode(', ', $rdatesArray), 90, self::EOL));\n }", "public function beamtime_config() {\n $config = array();\n $result = $this->query( \"SELECT * FROM beamtime_config\" );\n $nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ ) {\n $row = mysql_fetch_array( $result, MYSQL_ASSOC );\n $param = trim($row['param']);\n $value = trim($row['value']);\n switch($param) {\n case 'min_gap_width_sec': $config[$param] = intval($value); break;\n case 'last_run_begin_time': $config[$param] = LusiTime::from64(intval($value)); break;\n default: $config[$param] = $value; break;\n } \n }\n return $config;\n }", "public function beamtime_config() {\n\t $config = array();\n \t\t$this->connect();\n \t$result = $this->query( \"SELECT * FROM beamtime_config\" );\n \t$nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ ) {\n \t$row = mysql_fetch_array( $result, MYSQL_ASSOC );\n $param = trim($row['param']);\n $value = trim($row['value']);\n switch($param) {\n case 'min_gap_width_sec': $config[$param] = intval($value); break;\n case 'last_run_begin_time': $config[$param] = LusiTime::from64(intval($value)); break;\n default: $config[$param] = $value; break;\n } \t\n }\n return $config;\n }", "public function cron_add_schedules( $schedules ) {\n $schedules['md5_hash_weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly' )\n );\n return $schedules;\n }", "public function getSchedulesUrl()\n {\n if ($listKey = Mage::getStoreConfig('bs_register/schedule/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('bs_register/schedule/index');\n }", "function scorm_get_updatefreq_array(){\n return array(0 => get_string('never'),\n 1 => get_string('everyday','scorm'),\n 2 => get_string('everytime','scorm'));\n}", "function add_cron_interval( $schedules ) {\n\t$schedules['ten_seconds'] = array(\n\t\t'interval' => 60,\n\t\t'display' => esc_html__( 'Every Ten Seconds' ),\n\t);\n\n\treturn $schedules;\n}", "function buildTimeString($time_array)\n{\n return $time_array[\"tm_hour\"].':'.$time_array[\"tm_min\"].':'.$time_array[\"tm_sec\"];\n}", "private function arrayAssocToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= $key .\"='\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "private static function completeTasksConfiguration(array &$configuration): array\n {\n // Compute Tasks Error Delay\n $configuration[\"tasks\"][\"error_delay\"] = 8 * $configuration[\"watchdog_delay\"];\n\n return $configuration;\n }", "protected function getExpirationTime(array $config): string\n {\n return Arr::get($config, 'expiration_time', '+5 minutes');\n }", "public function makeString($array)\r\n {\r\n $outval = '';\r\n foreach ($array as $key => $value) {\r\n if(is_array($value)) {\r\n $outval .= !is_numeric($key) ? \"$key\" : false;\r\n $outval .= $this->makestring($value);\r\n } else {\r\n $outval .= (string) $key .\": \".$value .\"\\n\";\r\n }\r\n }\r\n\r\n return $outval;\r\n }", "public function toOptionArray(){\n $cronTimeFrequency[] = ['value' => \"*/2 * * * *\", 'label' => __(\"Every 2 Minutes.\")]; \n $cronTimeFrequency[] = ['value' => \"*/5 * * * *\", 'label' => __(\"Every 5 Minutes.\")]; \n $cronTimeFrequency[] = ['value' => \"*/15 * * * *\", 'label' => __(\"Every 15 Minutes.\")]; \n $cronTimeFrequency[] = ['value' => \"*/30 * * * *\", 'label' => __(\"Every 30 Minutes.\")]; \n $cronTimeFrequency[] = ['value' => \"*/45 * * * *\", 'label' => __(\"Every 45 Minutes.\")]; \n $cronTimeFrequency[] = ['value' => \"0 */1 * * *\", 'label' => __(\"Every 1 Hours\")]; \n $cronTimeFrequency[] = ['value' => \"0 */2 * * *\", 'label' => __(\"Every 2 Hours\")]; \n $cronTimeFrequency[] = ['value' => \"0 */4 * * *\", 'label' => __(\"Every 4 Hours\")]; \n $cronTimeFrequency[] = ['value' => \"0 */8 * * *\", 'label' => __(\"Every 8 Hours\")]; \n $cronTimeFrequency[] = ['value' => \"0 */16 * * *\", 'label' => __(\"Every 16 Hours\")]; \n $cronTimeFrequency[] = ['value' => \"0 */24 * * *\", 'label' => __(\"Every 24 Hours\")]; \n return $cronTimeFrequency;\n }", "function initWeeklyRecurPattern($taskArray){\r\r\n // STEP : TASK INIT OCCURRENCE PARAMETERS\r\r\n $taskStartOccurenceDate=\"0000-00-00\";\r\r\n $taskLastOccurenceDate=\"0000-00-00\";\r\r\n $taskLastExecutionDate=\"0000-00-00\";\r\r\n $taskTotalOccurenceCount=0;\r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n $task_is_done=0;\r\r\n $today= date('Y-m-d');\r\r\n $pastArray=array();\r\r\n \r\r\n // STEP : TASK START AND EDN PARAMATERS \r\r\n $taskStartDate=$taskArray['starttime'];\r\r\n $taskEndBy=$taskArray['task_end'];\r\r\n if($taskEndBy==\"after_accurrences\"){\r\r\n $taskTaskEndAfterOccurrences=$taskArray['task_end_after_occurrences']; \r\r\n $taskTaskEndByDate=\"0000-00-00\";\r\r\n }else if($taskEndBy==\"by_date\"){\r\r\n $taskTaskEndAfterOccurrences=0; \r\r\n $taskTaskEndByDate=$taskArray['task_end_by_date']; \r\r\n }else{\r\r\n $taskTaskEndAfterOccurrences=0; \r\r\n $taskTaskEndByDate=\"0000-00-00\"; \r\r\n }\r\r\n \r\r\n // STEP: TASK RECUR PATTERN\r\r\n $taskRecurPattern=$taskArray['recur_pattern']; \r\r\n $taskEveryNumofWeeks=$taskArray['weekly_every_noof_weeks'];\r\r\n $taskWeekMonday=$taskArray['weekly_monday'];\r\r\n $taskWeekTuesday=$taskArray['weekly_tuesday'];\r\r\n $taskWeekWednesday=$taskArray['weekly_wednesday'];\r\r\n $taskWeekThursday=$taskArray['weekly_thursday'];\r\r\n $taskWeekFriday=$taskArray['weekly_friday'];\r\r\n $taskWeekSaturday=$taskArray['weekly_saturday'];\r\r\n $taskWeekSunday=$taskArray['weekly_sunday']; \r\r\n $taskWeekDayArray= array(\r\r\n \"1\"=> $taskWeekMonday,\r\r\n \"2\"=> $taskWeekTuesday,\r\r\n \"3\"=> $taskWeekWednesday,\r\r\n \"4\"=> $taskWeekThursday,\r\r\n \"5\"=> $taskWeekFriday,\r\r\n \"6\"=> $taskWeekSaturday,\r\r\n \"7\"=> $taskWeekSunday,\r\r\n );\r\r\n \r\r\n $is_exe_this_week=1;\r\r\n $taskExeNumOfTimesInWeek=0;\r\r\n for($i=1; $i<=7; $i++){\r\r\n if($taskWeekDayArray[$i]==1){\r\r\n $taskExeNumOfTimesInWeek++;\r\r\n }\r\r\n }\r\r\n $week_exe_count=0; \r\r\n \r\r\n if($taskStartDate < $today){\r\r\n // echo \"<br/> Start in in past ...so calculate past occurrences of task up to today\";\r\r\n\r\r\n $wkintervalday= $taskExeNumOfTimesInWeek * ($taskEveryNumofWeeks -1);\r\r\n $date = strtotime($taskStartDate); \r\r\n $exeDate= date('Y-m-d', $date);\r\r\n // echo \"<br/>TASK EXE ON : \";\r\r\n while($exeDate < $today){ \r\r\n // echo \"<br/> Chk Date ---> \".$exeDate.\" : \"; \r\r\n $exeDateDay= date(\"N\",$date);\r\r\n \r\r\n if($taskWeekDayArray[$exeDateDay]==1){\r\r\n $is_executed=1;\r\r\n }else{\r\r\n $is_executed=0; \r\r\n } \r\r\n // $is_executed=isWeekDayExecution($exeDateDay);\r\r\n \r\r\n if($is_executed==1){ \r\r\n if($is_exe_this_week==1){\r\r\n if($taskStartOccurenceDate==\"0000-00-00\"){\r\r\n $taskStartOccurenceDate= $exeDate;\r\r\n }\r\r\n $taskLastOccurenceDate=$exeDate;\r\r\n $taskTotalOccurenceCount=$taskTotalOccurenceCount+1;\r\r\n //echo \" | \".$exeDate.\" | \"; \r\r\n $newArray=$taskArray;\r\r\n //$taskTotalOccurenceCount++;\r\r\n $newArray['task_last_execution_date']=$exeDate; \r\r\n $newArray['task_execution_count']=$taskTotalOccurenceCount;\r\r\n \r\r\n if($taskTaskEndAfterOccurrences!=0 && $taskTotalOccurenceCount >= $taskTaskEndAfterOccurrences){\r\r\n $task_is_done=1; \r\r\n }else if($taskTaskEndByDate!=\"0000-00-00\" && $exeDate > $taskTaskEndByDate){\r\r\n $task_is_done=1; \r\r\n }\r\r\n $newArray['task_is_done']=$task_is_done;\r\r\n array_push($pastArray, $newArray);\r\r\n \r\r\n if($task_is_done==1)\r\r\n break;\r\r\n \r\r\n $week_exe_count++;\r\r\n if($week_exe_count == $taskExeNumOfTimesInWeek){\r\r\n if($wkintervalday==0) {\r\r\n $is_exe_this_week=1; \r\r\n }else{\r\r\n $is_exe_this_week=0; \r\r\n }\r\r\n \r\r\n $week_exe_count=0; \r\r\n }\r\r\n // echo \"<br/> ====> IS exe in this \".$is_exe_this_week.\" wk count \".$week_exe_count;\r\r\n }else{\r\r\n $week_exe_count++; \r\r\n if($week_exe_count >= $wkintervalday){\r\r\n $is_exe_this_week=1;\r\r\n $week_exe_count=0; \r\r\n } \r\r\n // echo \"<br/> ====> IS exe in this \".$is_exe_this_week.\" wk count \".$week_exe_count; \r\r\n } \r\r\n \r\r\n } \r\r\n \r\r\n $exeDayN=date(\"N\", strtotime($exeDate)); \r\r\n if($exeDayN==7 && $is_exe_this_week==1 && $week_exe_count!=0){\r\r\n if($wkintervalday==0) {\r\r\n $is_exe_this_week=1; \r\r\n }else{\r\r\n $is_exe_this_week=0; \r\r\n }\r\r\n $week_exe_count=0; \r\r\n }\r\r\n \r\r\n $date = strtotime(date(\"Y-m-d\", strtotime($exeDate)) . \" +1 day\"); \r\r\n $exeDate= date('Y-m-d', $date); \r\r\n }\r\r\n \r\r\n // $taskNextExeChkDate= $taskLastOccurenceDate; \r\r\n }\r\r\n /* \r\r\n if($task_is_done==0){\r\r\n // STEP: CALCULATE NEXT OCCURENCE DATE FOR TASK\r\r\n $taskNextOccurenceDate=$this->calculateWeeklyNextExecutionDate($taskLastOccurenceDate,$taskTotalOccurenceCount,$taskStartDate, $taskEveryNumofWeeks, $taskWeekDayArray, $taskExeNumOfTimesInWeek, $taskTaskEndAfterOccurrences, $taskTaskEndByDate); \r\r\n if($taskNextOccurenceDate==\"0000-00-00\"){\r\r\n $task_is_done=1;\r\r\n } \r\r\n $newArray=$taskArray;\r\r\n //$taskTotalOccurenceCount++;\r\r\n $newArray['task_last_execution_date']=$taskNextOccurenceDate; \r\r\n $newArray['task_execution_count']=$taskTotalOccurenceCount;\r\r\n $newArray['task_is_done']=$task_is_done;\r\r\n array_push($pastArray, $newArray);\r\r\n \r\r\n }else{\r\r\n // STEP : TASK IS COMPLETED , SO NEXT EXECUTION DATE IS NOT AVAILABLE\r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n \r\r\n $newArray['task_last_execution_date']=$taskNextOccurenceDate; \r\r\n $newArray['task_execution_count']=$taskTotalOccurenceCount;\r\r\n $newArray['task_is_done']=$task_is_done;\r\r\n array_push($pastArray, $newArray);\r\r\n } \r\r\n */\r\r\n \r\r\n /* \r\r\n $taskArray['task_last_execution_date']=$taskLastExecutionDate; \r\r\n $taskArray['task_execution_count']=0;\r\r\n $taskArray['task_start_occurrence_date']=$taskStartOccurenceDate;\r\r\n $taskArray['task_last_occurrence_date']=$taskLastOccurenceDate;\r\r\n $taskArray['task_occurrences_count']=$taskTotalOccurenceCount;\r\r\n $taskArray['task_next_execution_date']=$taskNextOccurenceDate;\r\r\n $taskArray['task_is_done']=$task_is_done;\r\r\n */\r\r\n \r\r\n return $pastArray;\r\r\n }", "function cemhub_get_batch_run_time_options() {\n $hours = array();\n\n for ($hour = 0; $hour <= 23; $hour++) {\n $formatted_hour = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $hours[$formatted_hour] = $formatted_hour . ' hr';\n\n if ($hour > 1) {\n $hours[$formatted_hour] .= 's';\n }\n }\n\n return $hours;\n}", "function CreateSchedule($arraypost) {\n\tglobal $server;\n\tglobal $user;\n\tglobal $device;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t\n\t$status \t= (empty($arraypost[\"status\"]) ? \"enabled\" : $arraypost[\"status\"]);\n\t\n\t$on \t\t= (empty($arraypost[\"on\"]) ? 0 : $arraypost[\"on\"]);\n\t$colorhex \t= (empty($arraypost[\"colorhex\"]) ? \"#fead59\" : \"#\".$arraypost[\"colorhex\"]);\n\t$alert \t\t= (empty($arraypost[\"alert\"]) ? \"none\" : $arraypost[\"alert\"]);\n\t$bri \t\t= (empty($arraypost[\"bri\"]) ? \"254\" : $arraypost[\"bri\"]);\n\t$ct \t\t= (empty($arraypost[\"ct\"]) ? \"369\" : $arraypost[\"ct\"]);\n\t$hue \t\t= (empty($arraypost[\"hue\"]) ? \"14910\" : $arraypost[\"hue\"]);\n\t$sat \t\t= (empty($arraypost[\"sat\"]) ? \"144\" : $arraypost[\"sat\"]);\n\t$transition = (empty($arraypost[\"transition\"]) ? \"0\" : $arraypost[\"transition\"]);\n\t$effect\t \t= (empty($arraypost[\"effect\"]) ? \"none\" : $arraypost[\"effect\"]);\n\t\n\t$arrayattr = array();\n\t\n\t// Name -------------------------------------\n\t$arrayattr[] = \"\\\"name\\\":\\\"\".$arraypost[\"name\"].\"\\\"\";\n\t\n\t// Description -------------------------------------\n\t$arrayattr[] = \"\\\"description\\\":\\\"\".$arraypost[\"description\"].\"\\\"\";\n\t\n\t// Command -------------------------------------\n\t\n\t// State On ----------------------------------\n\t$arrayattr1[] = \"\\\"on\\\":\".($on==1 ? \"true\" : \"false\").\"\";\n\t\n\t// Color hex ---------------------------------\n\tif (!empty($colorhex)) {\n\t\t$tabcolor = convertColorHextoxyY($colorhex);\n\t\t$x = $tabcolor[\"x\"];\n\t\t$y = $tabcolor[\"y\"];\n\t\t$bri = intval($tabcolor['Y']);\n\t\t$arrayattr1[] = \"\\\"xy\\\":[\".$x.\",\".$y.\"]\";\n\t}\n\tif ($colorhex=\"#fead59\") {\n\t\t$bri = \"254\";\n\t}\n\t/*\n\t// Alert -------------------------------------\n\t$arrayattr1[] = \"\\\"alert\\\":\\\"\".$alert.\"\\\"\";\n\t\n\t// Brightness --------------------------------\n\t$arrayattr1[] = \"\\\"bri\\\":\".$bri;\n\t\n\t// Colour Temperature ------------------------\n\t$arrayattr1[] = \"\\\"ct\\\":\".$ct;\n\t\n\t// Hue ---------------------------------------\n\t$arrayattr1[] = \"\\\"hue\\\":\".$hue;\n\t\n\t// Saturation --------------------------------\n\t$arrayattr1[] = \"\\\"sat\\\":\".$sat;\n\t\n\t// Transition --------------------------------\n\t$arrayattr1[] = \"\\\"transitiontime\\\":\".$transition;\n\t\n\t// Effect ------------------------------------\n\t$arrayattr1[] = \"\\\"effect\\\":\\\"\".$effect.\"\\\"\";\n\t*/\n\t\n\t$arrayattr[] = \"\\\"command\\\":{\n\t\t\\\"address\\\": \\\"/api/\".$user.\"/groups/\".$arraypost[\"group\"].\"/action\\\",\n\t\t\\\"method\\\": \\\"PUT\\\",\n\t\t\\\"body\\\": { \".implode(\",\", $arrayattr1).\" }}\";\n\t\n\t// LocalTime -------------------------------------\n\t$arrayattr[] = \"\\\"localtime\\\":\\\"\".$arraypost[\"localtime\"].\"\\\"\";\n\t\n\t// Status -------------------------------------\n\t$arrayattr[] = \"\\\"status\\\":\\\"\".$status.\"\\\"\";\n\t\n\t$attr = \"{\";\n\t$attr .= implode($arrayattr, \",\");\n\t$attr .= \"}\";\n\techo $attr;\n\treturn LaunchCurl($url,\"post\",$attr);\n}", "function jetpack_sync_incremental_sync_interval( $schedule_name ) {\n\treturn 'hourly';\n}", "public function update_beamtime_config($config) {\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "private function getTsConfig($array) {\r\n\t\t$newArray = array();\r\n\r\n\t\tforeach($array as $key => $value) {\r\n\t\t\tif(is_array($value)){\r\n\t\t\t\t$newArray[substr($key, 0, -1)] = $this->getTsConfig($value);\r\n\t\t\t} else {\r\n\t\t\t\t$newArray[$key] = $value; \r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $newArray;\r\n\t}", "function it_exchange_get_abandoned_cart_email_human_readable_schedule( $email_id ) {\n\t$scheduling = get_post_meta( $email_id, '_it_exchange_abandoned_cart_emails_scheduling', true );\n\tif ( ! empty( $scheduling['int'] ) && ! empty( $scheduling['unit'] ) )\n\t\t$value = sprintf( _n( '%d %s', '%d %ss', trim( $scheduling['int'] ), 'LION' ), $scheduling['int'], $scheduling['unit'] );\n\telse\n\t\t$value = __( 'Unknown', 'LION' );\n\n\treturn $value;\n}", "function backup_migrate_drush_schedules() {\n backup_migrate_include('schedules');\n $rows = array(array(dt('ID'), dt('Name')));\n foreach (backup_migrate_get_schedules() as $schedule) {\n $rows[] = array(\n $schedule->get_id(),\n $schedule->get_name(),\n );\n }\n drush_print_table($rows, TRUE, array(32, 32));\n}", "public function add_schedules( $schedules = array() ) {\r\n\t\t$schedules['weekly'] = array(\r\n\t\t\t'interval' => 604800,\r\n\t\t\t'display' => __( 'Once Weekly', 'instagram-feed' )\r\n\t\t);\r\n\t\treturn $schedules;\r\n\t}", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "public static function buildRruleFromRecurrenceOption(\\DateTime $startDate, string $recurrenceOption): string {\n $weekdaysKeys = ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'];\n $byDay = $weekdaysKeys[$startDate->format('w')];\n switch ($recurrenceOption) {\n case 'daily':\n return 'FREQ=DAILY';\n\n case 'weekly_oneday':\n return 'FREQ=WEEKLY;BYDAY=' . $byDay;\n\n case 'monthly_th_weekday':\n $monthWeekdayNth = static::getMonthWeekdayNth($startDate);\n return sprintf('FREQ=MONTHLY;BYDAY=%s;BYSETPOS=%s', $byDay, $monthWeekdayNth);\n\n case 'yearly_monthday':\n return sprintf('FREQ=YEARLY;BYMONTH=%s;BYMONTHDAY=%s', $startDate->format('n'), $startDate->format('j'));\n\n case 'weekdayly':\n return 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR';\n }\n\n return '';\n }", "public function formatConfig(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+\\#/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'{\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/\\#\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'}\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{#\\s+(\\w+)#}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'{#\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{#(\\w+)\\s+#}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'#}\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function update_beamtime_config($config) {\n $this->connect();\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "private function arrayToString($array){\n\t\t$i = 0;\n\t\t$string = '';\n\t\tforeach ($array as $value) {\n\t\t\tif ($i > 0) $string .= ', ';\n\t\t\tif (preg_match('#', $value)){\n\t\t\t\t$string .= str_replace('#', '', $value);\n\t\t\t}else{\n\t\t\t\t$string .= \"'\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $string;\n\t}", "function Event_Config_File()\n {\n return join(\"/\",array($this->Event_Config_Path,$this->Event_Config_File));\n }", "public function cron_add_pull_time_interval( $schedules ) {\n\t\t$schedules['syn_pull_time_interval'] = array(\n\t\t\t'interval' => intval( $this->push_syndicate_settings['pull_time_interval'] ),\n\t\t\t'display' => __( 'Pull Time Interval', 'push-syndication' )\n\t\t);\n\n\t\treturn $schedules;\n\n\t}", "public function toString()\n {\n return json_encode($this->config);\n }", "function timeconditions_get_config($engine) {\n\tglobal $ext; // is this the best way to pass this?\n\tglobal $conferences_conf;\n\n\tswitch($engine) {\n\t\tcase \"asterisk\":\n\t\t\t$timelist = timeconditions_list(true);\n\t\t\tif(is_array($timelist)) {\n\t\t\t\tforeach($timelist as $item) {\n\t\t\t\t\t// add dialplan\n // note we don't need to add 2nd optional option of true, gotoiftime will convert '|' to ',' for 1.6+\n\t\t\t\t\t$times = timeconditions_timegroups_get_times($item['time']);\n\t\t\t\t\tif (is_array($times)) {\n\t\t\t\t\t\tforeach ($times as $time) {\n\t\t\t\t\t\t\t$ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime($time[1],$item['truegoto']));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$ext->add('timeconditions', $item['timeconditions_id'], '', new ext_goto($item['falsegoto']));\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t}\n}", "public function getConfigToString() {\n return serialize($this->_options);\n }", "function format_reservations( $reservation_arr ) {\r\n\t\t\r\n\t\t$reservation_string = '';\r\n\t\tforeach( $reservation_arr as $reservation ) {\r\n\t\t\t\r\n\t\t\t$reservation_string .= $reservation['extras']['user'] . ( $reservation['extras']['level'] == 'member' ? '' : ', level=' . $reservation['extras']['level'] );\r\n\t\t\t\r\n\t\t\tforeach($reservation['extras'] as $key => $value) {\r\n\t\t\t\t\r\n\t\t\t\t// Skip \"user\", \"level\", and any other attributes with this filter\r\n\t\t\t\tif( in_array( $key, apply_filters( 'bp_group_reservation_skipped_extras', array( 'user', 'level' ) ) ) )\tcontinue;\r\n\t\t\t\t$reservation_string .= ', ' . $key . '=' . $value;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$reservation_string .= \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $reservation_string;\r\n\t\t\r\n\t}", "public function __toString()\n {\n $s = \"\";\n if ($this->sections != null) {\n foreach ($this->sections as $section => $name) {\n $s.= sprintf(\"[%s]\\n\", $section);\n if (is_array($name)) {\n foreach ($name as $key => $val) {\n $s.= sprintf(\"\\t%s = %s\\n\", $key, $val);\n }\n }\n }\n return $s;\n }\n if (!isset($this->filename)) {\n throw new Config_Lite_RuntimeException(\n 'Did not read a Configuration File.'\n );\n }\n return $s;\n }", "public function __toString(): string\n {\n $options = \\http_build_query(Values::of($this->options), '', ' ');\n return '[Twilio.Preview.DeployedDevices.UpdateDeploymentOptions ' . $options . ']';\n }", "function schedule_generate($classes_arr, $options) {\n\t\tif ( intval($options[\"row_interval\"]) == 0 ) $options[\"row_interval\"] = 30;\t\n\n\t\t// Define como hora de inicio 07:30 si no se establece\n\t\tif ( ! isset($options[\"start_time\"]) ) {\n\t\t\t$options[\"start_time\"] = 730;\n\t\t}\n\t\telse {\n\t\t\t// change to the nearest row interval hour down\n\t\t\t$time_hour = ($options[\"start_time\"] - $options[\"start_time\"] % 100) / 100; \n\t\t\t$time_min = $options[\"start_time\"] % 100;\n\t\t\t\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\n\t\t\t\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) $time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\n\t\t\t$options[\"start_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// Define la hora final como 21:00 si no se establece\n\t\tif ( ! isset($options[\"end_time\"]) ) {\n\t\t\t$options[\"end_time\"] = 2100;\n\t\t}\n\t\telse {\n\t\t\t// change to the nearest row interval hour down.\n\t\t\t$time_hour = ($options[\"end_time\"] - $options[\"end_time\"] % 100) / 100; \n\t\t\t$time_min = $options[\"end_time\"] % 100;\n\t\t\t\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\n\t\t\t\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) $time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\n\t\t\t$options[\"end_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\n\t\t\n\t\t}\n\n\t\t$days_arr = array(\"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\");\n\t\t$days_norow = array(0, 0, 0, 0, 0, 0);\n\n\t\t\n\t\t$html = \"<table border=1px width=\\\"100%\\\" bgcolor=\\\"#000000\\\" cellspacing=\\\"1\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\n\t\t// output title if set in $options.\n\t\tif ( isset($options[\"title\"]) ) {\n\t\t\t$cell_style = \"background-color: #000; color: #ffffff; border: 1px;\"; // default title style \n \t\t\t$cell_style .= $options[\"title_style\"];\n\t\t\t\n\t\t\t$html .= \"\t<tr>\\n\t\t<th colspan=\\\"8\\\" style=\\\"$cell_style\\\">\".$options[\"title\"].\"</th>\\n\t</tr>\\n\";\n\t\t}\n\t\t\n\t\t$cell_style = \"border: 1px; background-color: #c0c0c0; color: #000000;\"; // default day header style\n\t\t$cell_style .= $options[\"dayheader_style\"];\n\t\t\n\t\t$html .= \"\t<tr style=\\\"$cell_style\\\">\\n\t\t<th></th>\\n\";\n\t\tforeach ($days_arr as $day){\n\t\t\t$html .= \"\t\t<th>$day</th>\\n\";\n\t\t}\n\t\t$html .= \"\t</tr>\\n\";\n\t\t\n\t\t$cur_time = $options[\"start_time\"];\n\t\twhile ($cur_time < $options[\"end_time\"]) {\n\t\t\t$format_time = date(\"H:i\", strtotime(substr($cur_time, 0, strlen($cur_time) - 2).\":\".substr($cur_time, -2, 2)));\n\t\t\t\n\t\t\t$cell_style = \"background-color: #c0c0c0; color: #000000;\"; // default time cell style\n\t\t\t$cell_style .= $options[\"time_style\"];\t\t\t\n\t\t\t\t\n\t\t\t$html .= \"\t<tr bgcolor=\\\"#ffffff\\\">\\n\t\t<td align=\\\"center\\\" width=\\\"2%\\\" style=\\\"$cell_style\\\"><b>$format_time</b></td>\\n\";\n\t\t\tfor ($cur_day = 0; $cur_day < 6; $cur_day++) {\n\t\t\t\n\t\t\t\t// if flag is set not to print any row for the next\n\t\t\t\t// row (since a class spans more than one row), then\n\t\t\t\t// continue.\n\t\t\t\tif ($days_norow[$cur_day] > 0) {\n\t\t\t\t\t$days_norow[$cur_day]--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t // check if there is a class during this day/time\n\t\t\t\tif ( isset($classes_arr[$cur_day][$cur_time]) ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$class_interval = intval($classes_arr[$cur_day][$cur_time][\"interval\"]);\n\t\t\t\t\t\tif ( $class_interval == 0 ) $class_interval = 60; // default interval is 60mins\n\t\t\t\t\t\t\n\t\t\t\t\t\t// round to nearest interval\n\t\t\t\t\t\t$class_span = intval($class_interval / $options[\"row_interval\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// flag that for the next $class_span rows, we should not print a cell\n\t\t\t\t\t\t$days_norow[$cur_day] += $class_span - 1;\t\t\n\t\t\t\t\t\n\t\t\t\t\t if ( isset($classes_arr[$cur_day][$cur_time][\"style\"]) )\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"].\"; \".$classes_arr[$cur_day][$cur_time][\"style\"];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$html .= \"\t\t<td width=\\\"14%\\\" rowspan=\\\"$class_span\\\" style=\\\"$cell_style\\\">\".$classes_arr[$cur_day][$cur_time][\"html\"].\"</td>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\telse {\n\t\t\t\t\t\t$html .= \"\t\t<td width=\\\"14%\\\">&nbsp;</td>\\n\";\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$html .= \"\t</tr>\\n\";\n\t\t\t\n\t\t\t$cur_time += $options[\"row_interval\"]; // increment to next row interval\n\t\t\tif ($cur_time % 100 >= 60) $cur_time = $cur_time - $cur_time % 100 + 100;\n\t\t};\n\t\t\t\t\n\t\t\n\t\t\n\t\t$html .= \"</table>\\n\";\n\t\t\n\t\t\n\t\treturn $html;\t\n\t\n}", "function create_schedule(){\n\t\tfor ($i=0 ; $i< 6; $i++){\n\t\t\tfor ($j = $this->times[$i] ; $j < $this->times[$i+1] ; $j++){\n\t \t\t\t$this->bedroom[$j] = $this->temps[$this->bedroom_setting[$i]];\n\t\t\t\t$this->bathroom[$j] = $this->temps[$this->bathroom_setting[$i]];\n\t\t\t\t$this->kitchen[$j] = $this->temps[$this->kitchen_setting[$i]];\n\t\t\t\t$this->livingroom[$j] = $this->temps[$this->livingroom_setting[$i]];\n\t\t\t}\n\t\t}\n\t\t$result = [$this->bedroom,$this->bathroom,$this->kitchen, $this->livingroom];\n\t\treturn $result;\n\t}", "function format_array( $name, &$array2format ){\n $cnt = 0;\n $ret = '';\n\n if( count($array2format) === 0 ){\n //no values, create empty array to have a default in settings.conf\n return $name.'[0]=\"\"';\n }\n\n reset($array2format);\n foreach( $array2format as $val ){\n if( $val != '' ){\n $ret .= $name.\"[$cnt]='$val'\\n\";\n ++$cnt;\n }\n }\n\n $ret = trim($ret, \"\\n\");\n return $ret;\n }", "function my_add_weekly( $schedules ) {\n // add a 'weekly' schedule to the existing set\n $schedules['3_hours'] = array(\n 'interval' => 10800,\n 'display' => __('Every 3 Hours - (Flipkart API call)')\n );\n return $schedules;\n }", "public function __toXML($name = 'recurringEvent') {\r\n\t\t$xml_string = '<' . $name . ' name=\"' . $this->getName () . '\" days = \"' . str_replace ( '<br>', '', $this->getDays () ) . '\">\r\n';\r\n\t\t\r\n\t\t$xml_string .= $this->getStartTime ()->__toXML ( 'startTime' );\r\n\t\t$xml_string .= $this->getEndTime ()->__toXML ( 'endTime' );\r\n\t\t$xml_string .= $this->getTimeSlot ()->__toXML ( 'timeSlot' );\r\n\t\t\r\n\t\t$xml_string .= '</' . $name . '>\r\n';\r\n\t\t\r\n\t\treturn $xml_string;\r\n\t}", "function recurringdowntime_show_downtime()\n{\n global $request;\n\n do_page_start(array(\"page_title\" => _(\"Recurring Downtime\")), true);\n\n if (isset($request[\"host\"])) {\n $host_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n $service_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n if (is_authorized_for_host(0, $request[\"host\"])) {\n $host_data = recurringdowntime_get_host_cfg($request[\"host\"]);\n $service_data = recurringdowntime_get_service_cfg($request[\"host\"]);\n }\n } elseif (isset($request[\"hostgroup\"])) {\n $hostgroup_tbl_header = _(\"Recurring Downtime for Hostgroup: \") . $request[\"hostgroup\"];\n if (is_authorized_for_hostgroup(0, $request[\"hostgroup\"])) {\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($request[\"hostgroup\"]);\n }\n } elseif (isset($request[\"servicegroup\"])) {\n $servicegroup_tbl_header = _(\"Recurring Downtime for Servicegroup: \") . $request[\"servicegroup\"];\n if (is_authorized_for_servicegroup(0, $request[\"servicegroup\"])) {\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($request[\"servicegroup\"]);\n }\n }\n\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n /*\n $host_tbl_header = \"Recurring Downtime for All Hosts\";\n $hostgroup_tbl_header = \"Recurring Downtime for All Hostgroups\";\n $servicegroup_tbl_header = \"Recurring Downtime for All Servicegroups\";\n */\n $host_tbl_header = _(\"Host Schedules\");\n $service_tbl_header = _(\"Service Schedules\");\n $hostgroup_tbl_header = _(\"Hostgroup Schedules\");\n $servicegroup_tbl_header = _(\"Servicegroup Schedules\");\n $host_data = recurringdowntime_get_host_cfg($host = false);\n $service_data = recurringdowntime_get_service_cfg($host = false);\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($hostgroup = false);\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($servicegroup = false);\n $showall = true;\n }\n\n ?>\n <h1><?php echo _(\"Recurring Downtime\"); ?></h1>\n\n <?php echo _(\"Scheduled downtime definitions that are designed to repeat (recur) at set intervals are shown below. The next schedule for each host/service are added to the monitoring engine when the cron runs at the top of the hour.\"); ?>\n\n <?php\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n ?>\n <p>\n <?php } ?>\n\n <script type=\"text/javascript\">\n function do_delete_sid(sid) {\n input = confirm('<?php echo _(\"Are you sure you wish to delete this downtime schedule?\"); ?>');\n if (input == true) {\n window.location.href = 'recurringdowntime.php?mode=delete&sid=' + sid + '&nsp=<?php echo get_nagios_session_protector_id();?>';\n }\n }\n </script>\n\n <?php\n if ($showall) {\n ?>\n <script type=\"text/javascript\">\n $(document).ready(function () {\n $(\"#tabs\").tabs().show();\n });\n </script>\n\n <div id=\"tabs\" class=\"hide\">\n <ul>\n <li><a href=\"#host-tab\"><?php echo _(\"Hosts\"); ?></a></li>\n <li><a href=\"#service-tab\"><?php echo _(\"Services\"); ?></a></li>\n <li><a href=\"#hostgroup-tab\"><?php echo _(\"Hostgroups\"); ?></a></li>\n <li><a href=\"#servicegroup-tab\"><?php echo _(\"Servicegroups\"); ?></a></li>\n </ul>\n <?php\n }\n ?>\n\n <?php if (!empty($_GET[\"host\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n\n // hosts tab\n if ($showall) {\n echo \"<div id='host-tab'>\";\n }\n ?>\n\n <h4 <?php if ($host) { echo 'style=\"margin-top: 20px;\"'; } ?>><?php echo $host_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n }\n ?>\n\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Months\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Handle Child Hosts\"); ?></th>\n <th class=\"center\" style=\"width: 80px;\"><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($host_data) {\n $i = 0;\n\n $host_names = array();\n foreach ($host_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n }\n array_multisort($host_names, SORT_ASC, $host_data);\n\n foreach ($host_data as $sid => $schedule) {\n if (empty($schedule['childoptions'])) {\n $schedule['childoptions'] = 0;\n }\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? _(\"Yes\") : _(\"No\"); ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"months_of_year\"]) {\n echo $schedule[\"months_of_year\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"childoptions\"] == 0) {\n echo _(\"No\");\n } elseif ($schedule[\"childoptions\"] == 1) {\n echo _(\"Yes, triggered\");\n } elseif ($schedule[\"childoptions\"] == 2) {\n echo _(\"Yes, non-triggered\");\n } ?></td>\n <td class=\"center\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>&nbsp;\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"10\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if host_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end host tab?>\n\n<?php } // end if host or showall\n\nif (!empty($_GET[\"service\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n $service = grab_request_var('service', '');\n\n if ($showall) {\n echo \"<div id='service-tab'>\";\n }\n ?>\n\n <h4><?php echo $service_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Service\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($service_data) {\n $i = 0;\n\n $host_names = array();\n $service_names = array();\n foreach ($service_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n $service_names[$k] = $data['service_description'];\n }\n\n array_multisort($host_names, SORT_ASC, $service_names, SORT_ASC, $service_data);\n\n foreach ($service_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo $schedule[\"service_description\"]; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php'. \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php }?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"9\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host/service recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if service_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end service tab?>\n\n<?php } // end if service or showall\n\nif (!empty($_GET[\"hostgroup\"]) || $showall) {\n\n $hostgroup = grab_request_var('hostgroup', '');\n\n if ($showall) {\n echo \"<div id='hostgroup-tab'>\";\n }\n ?>\n\n <h4><?php echo $hostgroup_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($hostgroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&hostgroup_name=<?php echo $hostgroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this hostgroup\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Hostgroup\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n\n <?php\n\n if ($hostgroup_data) {\n $i = 0;\n\n $hostgroup_names = array();\n foreach ($hostgroup_data as $k => $data) {\n $hostgroup_names[$k] = $data['hostgroup_name'];\n }\n\n array_multisort($hostgroup_names, SORT_ASC, $hostgroup_data);\n\n foreach ($hostgroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"hostgroup_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? \"Yes\" : \"No\"; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n <?php } else { ?>\n <tr>\n <td colspan=\"8\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no hostgroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if hostrgroup_data ?>\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end hostgroup tab?>\n\n<?php } // end if hostgroup or showall\n\nif (!empty($_GET[\"servicegroup\"]) || $showall) {\n\n $servicegroup = grab_request_var('servicegroup', '');\n\n if ($showall) {\n echo \"<div id='servicegroup-tab'>\";\n }\n ?>\n <h4><?php echo $servicegroup_tbl_header; ?></h4>\n <?php\n if (!is_readonly_user(0)) {\n if ($servicegroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&servicegroup_name=<?php echo $servicegroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this servicegroup\"); ?></a>\n </div>\n <?php } else { ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?>\n </a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Servicegroup\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n if ($servicegroup_data) {\n $i = 0;\n\n $servicegroup_names = array();\n foreach ($servicegroup_data as $k => $data) {\n $servicegroup_names[$k] = $data['servicegroup_name'];\n }\n\n array_multisort($servicegroup_names, SORT_ASC, $servicegroup_data);\n\n foreach ($servicegroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"servicegroup_name\"]; ?></td>\n <td><?php echo $schedule[\"comment\"]; ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"recurringdowntime.php?mode=edit&sid=<?php echo $sid; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"7\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no servicegroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if servicegroup_data ?>\n\n\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end servicegroup tab?>\n\n <?php } // end if servicegroup or showall ?>\n\n <?php\n if ($showall) { // end of tabs container\n ?>\n </div>\n <?php\n }\n do_page_end(true);\n}", "protected function getCalendarizeDatabaseString()\n {\n $sql = [];\n foreach (Register::getRegister() as $configuration) {\n $sql[] = 'CREATE TABLE ' . $configuration['tableName'] . ' (\n\t\t\tcalendarize tinytext\n\t\t\t);';\n }\n return implode(LF, $sql);\n }", "public function __toString(): string\n {\n $options = \\http_build_query(Values::of($this->options), '', ' ');\n return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . $options . ']';\n }", "public function dump($config): string;", "function _getHumanReadableRecurrence($event) {\n switch($event['recurrence']) {\n // No Recurrence\n case 'none':\n return $this->_gt('None');\n case 'daily':\n if ($event['recur_daily_interval'] == 1) {\n return $this->_gt('Every Day');\n }\n return $this->_gtf('Every %d Days', $event['recur_daily_interval']);\n case 'weekly':\n if ($event['recur_weekly_interval'] == 1) {\n $result = $this->_gt('Every Week');\n } else {\n $result = $this->_gtf('Every %d Weeks', $event['recur_weekly_interval']);\n }\n $weekdays = array();\n foreach ($event['recur_weekly_weekdays'] as $weekday) {\n $weekdays[] = $this->weekdays[$weekday];\n }\n if (count($weekdays) == 1) {\n $result .= $this->_gtf(' on %s', reset($weekdays));\n } else {\n $lastWeekday = array_pop($weekdays);\n $weekdayList = implode(', ', $weekdays);\n $result .= $this->_gtf(' on %s and %s', array($weekdayList, $lastWeekday));\n }\n return $result;\n case 'monthly':\n if ($event['recur_monthly_interval'] == 1) {\n $result = $this->_gt('Every Month');\n } else {\n $result = $this->_gt('Every %d Months', $event['recur_monthly_interval']);\n }\n $append = '';\n if ($event['recur_monthly_count'] > 0) {\n $result .= $this->_gtf(\n ' on the %d%s',\n array(\n $event['recur_monthly_count'],\n $this->_gt($this->_getOrdinal($event['recur_monthly_count']))\n )\n );\n } else {\n if ($event['recur_monthly_count'] == -1) {\n $result .= $this->_gt(' on the last');\n } else {\n $result .= $this->_gtf(\n ' on the %d%s',\n array(\n abs($event['recur_monthly_count']),\n $this->_gt($this->_getOrdinal($event['recur_monthly_count']))\n )\n );\n $append = $this->_gt(' from the end');\n }\n }\n if ($event['recur_monthly_byweekday'] == 1) {\n $result .= ' '.$this->_gt(date('l', $event['start_stamp']));\n } else {\n $result .= $this->_gt(' day');\n }\n $result .= $append;\n return $result;\n case 'yearly':\n if ($event['recur_yearly_interval'] == 1) {\n $result = $this->_gt('Every Year');\n } else {\n $result = $this->_gtf('Every %d Years', $event['recur_yearly_interval']);\n }\n $months = array();\n foreach ($event['recur_yearly_months'] as $month) {\n $months[] = $this->months[$month];\n }\n $day = date('d', $event['start_stamp']);\n $result .= $this->_gtf(\n ' on the %d%s',\n array($day, $this->_gt($this->_getOrdinal($day)))\n );\n if (count($months) == 1) {\n $result .= $this->_gtf(' of %s', reset($months));\n } else {\n $lastMonth = array_pop($months);\n $monthList = implode(', ', $months);\n $result .= $this->_gtf(' of %s and %s', array($monthList, $lastMonth));\n }\n return $result;\n }\n }", "public static function getSubscriptionConfiguration($totalToPay)\n {\n $startDay = (int)Configuration::get('PAYLINE_SUBSCRIBE_DAY');\n $subscribePeriodicity = (int)Configuration::get('PAYLINE_SUBSCRIBE_PERIODICITY');\n $waitPeriod = (int)Configuration::get('PAYLINE_SUBSCRIBE_START_DATE') + 1;\n // Remove 1 billing because we've already done it into CPT mode\n $billingLeft = (Configuration::get('PAYLINE_SUBSCRIBE_NUMBER') > 1 ? ((int)Configuration::get('PAYLINE_SUBSCRIBE_NUMBER') - 1) : null);\n \n switch ($subscribePeriodicity) {\n case 10:\n // Daily\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d day', $waitPeriod)));\n break;\n case 20:\n // Weekly\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d week', $waitPeriod)));\n break;\n case 30:\n // Bimonthly\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d week', $waitPeriod * 2)));\n break;\n case 40:\n // Monthly\n if ($startDay == 0) {\n // Start date is the same day as the initial order\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d month', $waitPeriod)));\n } else {\n // Start date has a specific day, check if we have to go to the next month\n $recurringStartDateTimeStamp = strtotime(sprintf('+ %d month ', $waitPeriod), mktime(date(\"H\"), date(\"i\"), date(\"s\"), date(\"n\"), $startDay, date(\"Y\")));\n $recurringStartDate = date('d/m/Y', $recurringStartDateTimeStamp);\n }\n break;\n case 50:\n // Two quaterly\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d month', $waitPeriod * 2)));\n break;\n case 60:\n // Quaterly\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d month', $waitPeriod * 3)));\n break;\n case 70:\n // Semiannual\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d month', $waitPeriod * 6)));\n break;\n case 80:\n // Annual\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d year', $waitPeriod)));\n break;\n case 90:\n // Biannual\n $recurringStartDate = date('d/m/Y', strtotime(sprintf('now + %d year', $waitPeriod * 2)));\n break;\n }\n return array(\n 'firstAmount' => null,\n 'amount' => $totalToPay,\n 'billingLeft' => $billingLeft,\n 'billingCycle' => Configuration::get('PAYLINE_SUBSCRIBE_PERIODICITY'),\n 'billingDay' => Configuration::get('PAYLINE_SUBSCRIBE_DAY') ? Configuration::get('PAYLINE_SUBSCRIBE_DAY') : date('d'),\n 'startDate' => $recurringStartDate,\n );\n }", "function eo_get_schedule_summary($id=''){\n\tglobal $post,$wp_locale;\n\n\t$ical2day = array(\n\t\t'SU'=>\t$wp_locale->weekday[0],\n\t\t'MO'=>$wp_locale->weekday[1],\n\t\t'TU'=>\t$wp_locale->weekday[2],\n\t\t'WE'=>$wp_locale->weekday[3],\n\t\t'TH'=>$wp_locale->weekday[4],\n\t\t'FR'=>$wp_locale->weekday[5],\n\t\t'SA'=>$wp_locale->weekday[6]\n\t);\n\n\t$nth= array(\n\t\t__('last','eventorganiser'),'',__('first','eventorganiser'),__('second','eventorganiser'),__('third','eventorganiser'),__('fourth','eventorganiser')\n\t);\n\n\t$reoccur = eo_get_reoccurence($id);\n\tif(empty($reoccur))\n\t\treturn false;\n\n\t$return='';\n\n\tif($reoccur['reoccurrence']=='once'){\n\t\t$return = __('one time only','eventorganiser');\n\n\t}else{\n\t\tswitch($reoccur['reoccurrence']):\n\n\t\t\tcase 'daily':\n\t\t\t\tif($reoccur['frequency']==1):\n\t\t\t\t\t$return .=__('every day','eventorganiser');\n\t\t\t\telse:\n\t\t\t\t\t$return .=sprintf(__('every %d days','eventorganiser'),$reoccur['frequency']);\n\t\t\t\tendif;\n\t\t\t\tbreak;\n\n\t\t\tcase 'weekly':\n\t\t\t\tif($reoccur['frequency']==1):\n\t\t\t\t\t$return .=__('every week on','eventorganiser');\n\t\t\t\telse:\n\t\t\t\t\t$return .=sprintf(__('every %d weeks on','eventorganiser'),$reoccur['frequency']);\n\t\t\t\tendif;\n\n\t\t\t\t$weekdays = $reoccur['meta'];\n\t\t\t\tforeach($weekdays as $ical_day){\n\t\t\t\t\t$days[] = $ical2day[$ical_day];\n\t\t\t\t\t}\n\t\t\t\t$return .=' '.implode(', ',$days);\n\t\t\t\tbreak;\n\n\t\t\tcase 'monthly':\n\t\t\t\tif($reoccur['frequency']==1):\n\t\t\t\t\t$return .=__('every month on the','eventorganiser');\n\t\t\t\telse:\n\t\t\t\t\t$return .=sprintf(__('every %d months on the','eventorganiser'),$reoccur['frequency']);\n\t\t\t\tendif;\n\t\t\t\t$return .= ' ';\n\t\t\t\t$bymonthday =preg_match('/^BYMONTHDAY=(\\d{1,2})/' ,$reoccur['meta'],$matches);\n\n\t\t\t\tif($bymonthday ){\n\t\t\t\t\t$d = intval($matches[1]);\n\t\t\t\t\t$m =intval($reoccur['start']->format('n'));\n\t\t\t\t\t$y =intval($reoccur['start']->format('Y'));\n\t\t\t\t\t$reoccur['start']->setDate($y,$m,$d);\n\t\t\t\t\t$return .= $reoccur['start']->format('jS');\n\n\t\t\t\t}elseif($reoccur['meta']=='date'){\n\t\t\t\t\t$return .= $reoccur['start']->format('jS');\n\n\t\t\t\t}else{\n\t\t\t\t\t$byday = preg_match('/^BYDAY=(-?\\d{1,2})([a-zA-Z]{2})/' ,$reoccur['meta'],$matches);\n\t\t\t\t\tif($byday):\n\t\t\t\t\t\t$n=intval($matches[1])+1;\n\t\t\t\t\t\t$return .=$nth[$n].' '.$ical2day[$matches[2]];\n\t\t\t\t\telse:\n\t\t\t\t\t\t$bydayOLD = preg_match('/^(-?\\d{1,2})([a-zA-Z]{2})/' ,$reoccur['meta'],$matchesOLD);\n\t\t\t\t\t\t$n=intval($matchesOLD[1])+1;\n\t\t\t\t\t\t$return .=$nth[$n].' '.$ical2day[$matchesOLD[2]];\n\t\t\t\t\tendif;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'yearly':\n\t\t\t\tif($reoccur['frequency']==1):\n\t\t\t\t\t$return .=__('every year','eventorganiser');\n\t\t\t\telse:\n\t\t\t\t\t$return .=sprintf(__('every %d years','eventorganiser'),$reoccur['frequency']);\n\t\t\t\tendif;\n\t\t\t\tbreak;\n\n\t\tendswitch;\n\t\t\t\t\n\t\t$return .= ' '.__('until','eventorganiser').' '. eo_format_datetime($reoccur['end'],'M, jS Y');\n\t}\n\t\n\treturn $return; \n}", "function dayScheduleA()\n\t{\n\t$scheduleDay = array(45, 60, 90, 120, 150, 180, 210, 240);\n\treturn $scheduleDay;\n\t}", "public function get_repeats_on() {\n return (array) edd_get_option( 'edd_commissions_payout_schedule_on', array() );\n }", "public function getCronFrequency(): string;", "public function activities_config(){\n $config = array(\n array('field' => 'activitiesName','label' => 'Activity Name','rules' => 'trim|required'),\n array('field' => 'txtchoiceItem','label' => 'Choice Item','rules' => 'trim|required'),\n array('field' => 'txtFrom','label' => 'From Date', 'rules' => 'trim|required'),\n array('field' => 'txtTo','label' => 'End Date','rules' => 'trim|required'),\n array('field' => 'txtStartTime','label' => 'start time','rules' => 'trim|required' ),\n array('field' => 'txtEndTime','label' => 'end time', 'rules' => 'trim|required' ),\n array('field' => 'txtLocation','label' => 'Location','rules' => 'trim|required'),\n array('field' => 'txtFastival','label' => 'fastival','rules' => 'trim|required'),\n array('field' => 'txtSupplier','label' => 'supplier','rules' => 'trim|required'),\n array('field' => 'txtPhotos', 'label' => 'Photo','rules' => 'trim|required'),\n array('field' => 'txtEticket','label' => 'Text for E-Ticket','rules' => 'trim|required'),\n array('field' => 'txtBooking','label' => 'booking text','rules' => 'trim|required'),\n array('field' => 'purchasePrice','label' => 'Purchase Price','rules' => 'trim|required'),\n array('field' => 'salePrice','label' => 'Sale Price','rules' => 'trim|required'),\n array('field' => 'originalStock','label' => 'Original Stock','rules' => 'trim|required|numeric' ),\n array('field' => 'actualStock', 'label' => 'Actual Stock','rules' => 'trim|required|numeric'),\n // array('field' => 'check', 'label' => 'available day','rules' => 'trim|required'),\n );\n return $config;\n }", "public function serialize(ArrayCollection $schedule) {\n $games = $schedule->getValues();\n $serializedSchedule = array();\n foreach($games as $game) {\n /**\n * @var $game Game\n */\n $serializedSchedule[] = array(\n 'id' => $game->getId(),\n 'id_round' => $game->getIdRound(),\n 'id_team_a' => $game->getTeamA()->getId(),\n 'id_team_b' => $game->getTeamB()->getId(),\n 'team_a_score' => $game->getTeamAScore(),\n 'team_b_score' => $game->getTeamBScore()\n );\n }\n\n return json_encode($serializedSchedule);\n }", "public function __toString()\n {\n try {\n return (string) $this->configuration;\n } catch (Exception $exception) {\n return '';\n }\n }", "function array_to_string(array $array): string\n {\n return '[' . implode(', ', array_map(function ($v): string {\n if (is_array($v) || is_bool($v) || !is_stringable($v)) {\n throw new LogicException('Cannot convert array to string, some values are not stringable');\n }\n\n return '\\'' . $v . '\\'';\n }, $array)) . ']';\n }", "private function array_js($conf,$prefix=''){\n $line = array();\n if(is_numeric(implode('',array_keys($conf)))){// numeric array\n foreach($conf as $key => $value){\n if(is_array($value))\n $line[] = sprintf( \"%s\", self::array_js($value,$prefix) );\n elseif(is_numeric($value))\n $line[] = sprintf( \"%d\", $value );\n elseif(!strcasecmp($value,'true'))\n $line[] = sprintf( \"%s\", 'true' );\n elseif(!strcasecmp($value,'false'))\n $line[] = sprintf( \"%s\", 'false' );\n else\n $line[] = sprintf( \"'%s'\", $value );\n }\n return \"[\".implode(\",\",$line).\"]\";\n }else{// assoziative array\n foreach($conf as $key => $value){\n if(is_array($value))\n $line[] = sprintf( $prefix.\" %s:%s\", rtrim($key,'.'), self::array_js($value,$prefix.' ') );\n elseif(is_numeric($value))\n $line[] = sprintf( $prefix.\" %s:%d\", $key, $value );\n elseif(!strcasecmp($value,'true'))\n $line[] = sprintf( $prefix.\" %s:true\", $key );\n elseif(!strcasecmp($value,'false'))\n $line[] = sprintf( $prefix.\" %s:false\", $key );\n else\n $line[] = sprintf( $prefix.\" %s:'%s'\", $key, $value );\n }\n return \"{\\n\".implode(\",\\n\",$line).\"\\n\".$prefix.\"}\";\n }\n }", "private function generateSchedule($participant_id) {\n $schedule = array();\n $usable_surveys = array(1, 3, 4);\n $survey_info = array();\n foreach ($usable_surveys as $survey_id) {\n $temp = $this->getListFromDB('survey', array('survey_id' => $survey_id));\n if(! empty($temp)){\n\t$survey_info[] = $temp[0];\n }\n }\n $counter = count($usable_surveys);\n $surveyType = \"Primary\";\n for ($order = 1; $order <= $counter; $order++){\n $time_multiplier = 6 * ($order-1);\n $dateScheduled = date( 'Y-m-d H:i:s', strtotime(\"+$time_multiplier month\"));\n $schedule_details = array(\n\t\t\t\t'participant_id' => (int)$participant_id,\n\t\t\t\t'survey_id' => $usable_surveys[$order -1],\n\t\t\t\t'order_index' => $order,\n\t\t\t\t'surveyType' => $surveyType,\n\t\t\t\t'dateScheduled' => $dateScheduled,\n\t\t\t\t'dateActual' => $dateScheduled\n\t\t\t\t);\n $this->addThing('schedule', $schedule_details);\n $schedule[strval($order)] = array(\n\t\t\t\t \"participantId\" => $participant_id,\n\t\t\t\t \"surveyKeyword\" => $survey_info[$order-1]->surveyKeyword,\n\t\t\t\t \"survey\" => $survey_info[$order-1]->survey,\n\t\t\t\t \"surveyType\" => $surveyType,\n\t\t\t\t \"dateScheduled\" => $dateScheduled,\n\t\t\t\t \"dateActual\" => $dateScheduled\n\t\t\t\t );\n }\n return $schedule;\n }", "public static function getLocalTime(array $array, $time_format) {\n if (isset($array['scheduledTime'])) {\n $time = strtotime($array['scheduledTime']);\n\n $settings = [];\n if (isset($array['airport']) && isset($array['airport']['utcOffset']) && isset($array['airport']['utcOffset']['iso'])) {\n $settings = ['timezone' => $array['airport']['utcOffset']['iso']];\n }\n\n return DrupalDateTime::createFromTimestamp($time)->format($time_format, $settings);\n }\n\n return '';\n }", "public function _convertArrayToString(array $arr)\n {\n $str = '[';\n foreach ($arr as $k => $v) {\n $str .= $k.'=>';\n if (is_string($v)) {\n $str .= '\"'.$v.'\"';\n } else {\n $str .= $this->_convertTypeToString($v, true);\n }\n }\n $str .= ']';\n return $str;\n }", "function makestring($array)\r\n {\r\n $outval = '';\r\n if (is_array($array)) {\r\n foreach($array as $key=>$value)\r\n {\r\n if(is_array($value))\r\n {\r\n $outval = makestring($value);\r\n }\r\n else\r\n {\r\n $outval = $value;\r\n }\r\n }\r\n}\r\n \r\n return $outval;\r\n }", "protected function _toConfigurationString($data = null)\n {\n $configText = var_export($data, true);\n\n // Fix pathes. This related to windows directory separator.\n $configText = str_replace('\\\\\\\\', DS, $configText);\n\n $configText = str_replace(\"'\" . ROOT_PATH, \"ROOT_PATH . '\", $configText);\n $headerText = '<?php\n/**\n* WARNING\n*\n* Manual changes to this file may cause a malfunction of the system.\n* Be careful when changing settings!\n*\n*/\n\nreturn ';\n return $headerText . $configText . ';';\n }", "public static function __arrayToString(array $arr)\n\t{\n\t\t$str = '';\n\n\t\tforeach($arr as $k => $v)\n\t\t{\n\t\t\t$str .= $k . ':';\n\n\t\t\tif(is_string($v))\n\t\t\t{\n\t\t\t\t$str .= $v . ', ';\n\t\t\t}\n\t\t\telse if(is_array($v))\n\t\t\t{\n\t\t\t\t$str .= '[' . self::__arrayToString($v) . '], ';\n\t\t\t}\n\t\t}\n\n\t\t$str = rtrim($str, ', ');\n\n\t\treturn $str;\n\t}", "function wpsl_default_opening_hours() {\n\n $current_version = get_option( 'wpsl_version' );\n\n $opening_hours = array(\n 'dropdown' => array(\n 'monday' => array( '9:00 AM,5:00 PM' ),\n 'tuesday' => array( '9:00 AM,5:00 PM' ),\n 'wednesday' => array( '9:00 AM,5:00 PM' ),\n 'thursday' => array( '9:00 AM,5:00 PM' ),\n 'friday' => array( '9:00 AM,5:00 PM' ),\n 'saturday' => '',\n 'sunday' => ''\n )\n );\n\n /* Only add the textarea defaults for users that upgraded from 1.x */\n if ( version_compare( $current_version, '2.0', '<' ) ) {\n $opening_hours['textarea'] = sprintf( __( 'Mon %sTue %sWed %sThu %sFri %sSat Closed %sSun Closed', 'wpsl' ), '9:00 AM - 5:00 PM' . \"\\n\", '9:00 AM - 5:00 PM' . \"\\n\", '9:00 AM - 5:00 PM' . \"\\n\", '9:00 AM - 5:00 PM' . \"\\n\", '9:00 AM - 5:00 PM' . \"\\n\", \"\\n\" ); //cleaner way without repeating it 5 times??\n }\n\n return $opening_hours;\n}", "public function buildConfigText() {\n\t\t$this->setPrimaryDomain();\n\t\n\t\tob_start();\n\t\t$installation_path = $this->installation_path;\n\t\t$name = $this->sitename;\n\t\t$domains = array(\n\t\t\t$this->primary_domain\n\t\t);\n\t\t$redirrectdomains = array();\n\t\tinclude(SHARED_PATH . 'provisioning/httpd.tpl');\n\t\t$config_text = ob_get_clean ();\n\t\treturn $config_text;\n\t\t\n\t}", "public static function filter_cron_schedules( $schedules ) {\n if( isset( $schedules['weekly'] ) ) {\n return $schedules;\n }\n // Adds once weekly to the existing schedules.\n $schedules['weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly', 'th' )\n ); \n return $schedules;\n }" ]
[ "0.6528919", "0.6488773", "0.57189596", "0.56734097", "0.56181705", "0.547865", "0.53784984", "0.53151447", "0.53020585", "0.5278031", "0.5262727", "0.5217304", "0.52019185", "0.5122828", "0.51058817", "0.5093991", "0.50462073", "0.5026799", "0.5025568", "0.50076693", "0.5005107", "0.50014824", "0.4961539", "0.4960573", "0.49586123", "0.49543977", "0.49506253", "0.49288103", "0.49196574", "0.49152792", "0.49074882", "0.48739406", "0.4873635", "0.4866691", "0.48555362", "0.4824761", "0.48129874", "0.48058322", "0.48051783", "0.47988042", "0.47831717", "0.47788763", "0.47768143", "0.4776504", "0.47761708", "0.4769554", "0.47655168", "0.47507352", "0.47428307", "0.4738908", "0.47377673", "0.4735949", "0.47249064", "0.47236967", "0.4721558", "0.47175255", "0.47095096", "0.46803588", "0.46775088", "0.46742517", "0.46714032", "0.4669969", "0.46690777", "0.46393397", "0.46368784", "0.46239173", "0.4622329", "0.46141413", "0.46130016", "0.4605273", "0.45475963", "0.45429277", "0.45425743", "0.4533785", "0.45335573", "0.45329592", "0.45214134", "0.4517907", "0.45130196", "0.4500263", "0.44992885", "0.44837213", "0.44809768", "0.44756678", "0.44723654", "0.447008", "0.44697085", "0.44622287", "0.44619903", "0.4460241", "0.44515902", "0.4447758", "0.4437582", "0.4431953", "0.44309518", "0.4427305", "0.44249886", "0.44131544", "0.44127917", "0.44120198" ]
0.8173625
0
Write the configuration to disk
function recurringdowntime_write_cfg($cfg) { if (is_array($cfg)) { $cfg_str = recurringdowntime_array_to_cfg($cfg); } else { $cfg_str = $cfg; } recurringdowntime_check_cfg(); file_put_contents(RECURRINGDOWNTIME_CFG, $cfg_str); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n\t{\n\t\t$json = json_encode($this->config, JSON_PRETTY_PRINT);\n\n\t\tif (!$h = fopen(self::$configPath, 'w'))\n\t\t{\n\t\t\tdie('Could not open file ' . self::$configPath);\n\t\t}\n\n\t\tif (!fwrite($h, $json))\n\t\t{\n\t\t\tdie('Could not write file ' . self::$configPath);\n\t\t}\n\n\t\tfclose($h);\n\t}", "private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }", "public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }", "public function save()\n {\n $config_content = file_get_contents($this->config_path);\n\n foreach ($this->fields as $configuration => $value) {\n $config_content = str_replace(str_replace('\\\\', '\\\\\\\\', $value['default']), str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration]), $config_content);\n config([$value['config'] => str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration])]); //Reset the config value\n }\n\n file_put_contents($this->config_path, $config_content);\n }", "function write() {\n\t\t$this->readychk();\n\t\tif (!is_dir($this->dir_path)) { mkdir($this->dir_path); }\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\n\t\t$cstr = json_encode($this->export(TRUE, TRUE));\n\t\tif (\n\t\t\t$cstr === FALSE &&\n\t\t\tjson_last_error() !== JSON_ERROR_NONE\n\t\t) { throw new IntException(\"Slide config encoding failed.\"); }\n\t\tfile_lock_and_put($this->conf_path, $cstr);\n\t}", "public function Save()\n {\n $content = \"\";\n foreach ($this->vars as $key => $elem) {\n $content .= \"[\".$key.\"]\\n\";\n foreach ($elem as $key2 => $elem2) {\n $content .= $key2.\" = \\\"\".$elem2.\"\\\"\\n\";\n }\n $content .= \"\\n\";\n }\n if (!$handle = @fopen($this->fileName, 'w')) {\n error_log(\"Config::Save() - Could not open file('\".$this->fileName.\"') for writing, error.\");\n }\n if (!fwrite($handle, $content)) {\n error_log(\"Config::Save() - Could not write to open file('\" . $this->fileName .\"'), error.\");\n }\n fclose($handle);\n }", "public function save()\n\t{\n\t\t$h = fopen(WEBDEV_CONFIG_FILE, 'w');\n\t\tfwrite($h, \"<?php\\n return \" .var_export($this->config->all(), true) .';');\n\t\tfclose($h);\n\t}", "protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }", "public function ovpnWriteConfig($path)\n {\n //unset($path);\n $myfile = fopen($path, \"w\") or die(\"Unable to open file!\");\n fclose($myfile);\n $myfile = fopen($path, \"a\") or die(\"Unable to open file!\");\n foreach ($this as $key=>$value) {\n if ($key == \"keys\") {\n $key = \"key\";\n }\n if ($key == \"maxclients\") {\n $key = \"max-clients\";\n }\n if ($value == \"\" or $value === null) {\n continue;\n }\n if (strpos($key, '_') !== false) {\n $key = str_replace(\"_\", \"-\", $key);\n }\n if ($key == \"compression\" or $key == \"srvConfigPath\") {\n continue;\n }\n if ($key == \"client-to-client\") {\n fwrite($myfile, \"$value\\n\");\n continue;\n }\n if ($key == \"push-routes\" or $key == \"push-dns\") {\n $quo = '\"';\n $key = \"push\";\n $value = \"$quo$value$quo\\n\";\n }\n if ($key == \"push-gateway\") {\n fwrite($myfile, \"push $quo$value$quo\\n\");\n continue;\n }\n fwrite($myfile, \"$key $value\\n\");\n }\n fclose($myfile);\n //Done setting config, lets save the new object of items in a file for later processing\n $myfile = fopen(\"./vpn/urgent.conf\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, serialize($this));\n fclose($myfile);\n }", "function write_config()\n\t{\n\t\t$charmap \t= $this->paths['tempdir'].'/'.$this->paths['config'];\n\t\t$handle \t= @fopen( $charmap, 'w' );\n\t\t\n\t if ($handle)\n\t {\n\t fwrite( $handle, '<?php $chars = array();');\n\t \n\t foreach($this->svg_config[$this->font_name] as $unicode)\n\t {\n\t \tif(!empty($unicode))\n\t \t{\n\t \t\t$delimiter = \"'\";\n\t \t\tif(strpos($unicode, \"'\") !== false) $delimiter = '\"';\n\t \t\tfwrite( $handle, \"\\r\\n\".'$chars[\\''.$this->font_name.'\\']['.$delimiter.$unicode.$delimiter.'] = '.$delimiter.$unicode.$delimiter.';' );\n\t \t}\n\t } \t \n\t \n\t fclose( $handle );\n\t }\n\t else\n\t {\n\t \t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to write a config file');\n\t }\n\t\t\n\t\t\n\t}", "private static function writeConfig($config)\n {\n self::init();\n\n return file_put_contents(self::$configFile, json_encode((object) $config, JSON_PRETTY_PRINT));\n }", "public function writeFullConfFile()\n {\n return $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_CONF_DIR . self::GITOLITE_CONF_FILE,\n $this->renderFullConfFile()\n );\n }", "private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }", "public function writeAndPush()\n {\n $this->gitConfig();\n $this->writeFullConfFile();\n $this->writeUsers();\n if($this->commitConfig()) $this->pushConfig();\n }", "function config_save($cfg) {\n\t\t$h = fopen(CONFIG_PATH,\"w+\");\n\t\tforeach ($cfg as $cam) {\n\t\t\t$cam_info = $cam[\"name\"].\" : \".$cam[\"hw\"].\"\\t\".$cam[\"width\"].\"x\".$cam[\"height\"].\"\\n\";\n\t\t\tfwrite($h, $cam_info);\n\t\t\tforeach ($cam[\"gates\"] as $gate) {\n\t\t\t\t$gate_info = \"\\t\".$gate[\"name\"].\"\\t(\".$gate[\"x1\"].\",\".$gate[\"y1\"].\")\\t(\".$gate[\"x2\"].\",\".$gate[\"y2\"].\")\\n\";\n\t\t\t\tfwrite($h, $gate_info);\n\t\t\t}\n\t\t}\n\t\tfclose($h);\n\t}", "private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }", "public function saveSettings()\n {\n return $this->config->saveFile();\n }", "public function save()\n\t{\n\t\tFile::disk()->put($this->configPath, YAML::dump($this->configData));\n\n\t\tArtisan::call(sprintf('favicon:generate --site=%s', $this->handle));\n\t}", "function _write_config_file($values){\n $db_server = $values['db_server'] ?: \"\";\n $db_name = $values['db_name'] ?: \"\";\n $db_user = $values['db_user'] ?: \"\";\n $db_password = $values['db_password'] ?: \"\";\n $mynautique_enabled = (isset($values['mynautique_enabled']) && $values['mynautique_enabled'] == TRUE) ? \"TRUE\" : \"FALSE\";\n $mynautique_user = isset($values['mynautique_user']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_user'] : \"\";\n $mynautique_password = isset($values['mynautique_password']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_password'] : \"\";\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $config_string = '<?php'.\"\\n\";\n $config_string .= '// Database Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// database server'.\"\\n\";\n $config_string .= '$config[\\'db_server\\'] = \"'. $db_server .'\";'.\"\\n\";\n $config_string .= '// database'.\"\\n\";\n $config_string .= '$config[\\'db_name\\'] = \"'. $db_name .'\";'.\"\\n\";\n $config_string .= '// database user'.\"\\n\";\n $config_string .= '$config[\\'db_user\\'] = \"'. $db_user .'\";'.\"\\n\";\n $config_string .= '// database user password'.\"\\n\";\n $config_string .= '$config[\\'db_password\\'] = \"'. $db_password .'\";'.\"\\n\";\n $config_string .= \"\\n\";\n\n if ( isset($values['mynautique_enabled'])) {\n $config_string .= '// MyNautique Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// myNautique enabled'.\"\\n\";\n $config_string .= '$config[\\'mynautique_enabled\\'] = '.$mynautique_enabled .';'.\"\\n\";\n $config_string .= '// myNautique user'.\"\\n\";\n $config_string .= '$config[\\'mynautique_user\\'] = \"'. $mynautique_user .'\";'.\"\\n\";\n $config_string .= '// myNautique password'.\"\\n\";\n $config_string .= '$config[\\'mynautique_password\\'] = \"'. $mynautique_password .'\";'.\"\\n\";\n }\n\n $config_string .= '?>'.\"\\n\";\n\n $bytes_written = file_put_contents (\"../config/config.php\", $config_string);\n\n if($bytes_written == FALSE) {\n return $bytes_written;\n }\n return TRUE;\n }", "public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }", "protected function save()\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $json = setcooki_path('plugin'). '/var/options.json';\n $options = Option::get('wunderlist_todo_options', array());\n\n if(is_file($css))\n {\n @unlink($css);\n }\n if(is_file($json))\n {\n @chmod($json, 0755);\n }\n @file_put_contents($json, json_encode($options));\n }", "public function dumpConfig()\n {\n $file = $this->buildDir . DIRECTORY_SEPARATOR . 'settings.json';\n $config = json_encode(get_object_vars($this), JSON_PRETTY_PRINT);\n\n $this->logger->info('Dumping test config {config} to {file}', ['file' => $file, 'config' => $config]);\n file_put_contents($file, $config);\n }", "private function writeAppData()\n {\n $fileName = \"{$this->storeDirectory}/appData.json\";\n $data = json_encode([\n 'default-counter' => $this->defaultCounter,\n ]);\n file_put_contents($fileName, $data, JSON_PRETTY_PRINT);\n }", "public function save()\n {\n\n // Create config folder if it does not exist.\n $fs = new Filesystem();\n $dumper = new Dumper();\n\n if (!$fs->exists(getenv('HOME').'/.talos')) {\n try {\n $fs->mkdir(getenv('HOME').'/.talos/apps');\n } catch (IOExceptionInterface $e) {\n return false;\n }\n }\n\n try {\n $fs->dumpFile(getenv('HOME').'/.talos/talos.yml', $dumper->dump($this->config, 10));\n\n return true;\n } catch (IOExceptionInterface $e) {\n return false;\n }\n }", "function saveConfig(Config_Lite $inConfig) {\r\n\t\ttry {\r\n $inConfig->save();\r\n\t\t} catch (Config_Lite_Exception $e) {\r\n\t\t\techo \"\\n\" . 'Exception Message: ' . $e->getMessage();\r\n\t\t\twrite_log('Error saving configuration.','ERROR');\r\n\t\t}\r\n\t\t$configFile = dirname(__FILE__) . '/config.ini.php';\r\n\t\t$cache_new = \"'; <?php die('Access denied'); ?>\"; // Adds this to the top of the config so that PHP kills the execution if someone tries to request the config-file remotely.\r\n\t\t$cache_new .= file_get_contents($configFile);\r\n\t\tfile_put_contents($configFile,$cache_new);\r\n\t\t\r\n\t}", "public function write_db_config() {\r\n $template = file_get_contents(MODULES . 'install/assets/config/database.php');\r\n\r\n $replace = array(\r\n '__HOSTNAME__' => $this->hostname,\r\n '__USERNAME__' => $this->username,\r\n '__PASSWORD__' => $this->password,\r\n '__DATABASE__' => $this->database,\r\n '__PORT__' => $this->port,\r\n '__DRIVER__' => $this->driver,\r\n '__PREFIX__' => $this->prefix,\r\n );\r\n\r\n $template = str_replace(array_keys($replace), $replace, $template);\r\n\r\n $handle = @fopen(APPPATH . 'config/database.php', 'w+');\r\n\r\n if ($handle !== FALSE) {\r\n $response = @fwrite($handle, $template);\r\n fclose($handle);\r\n\r\n if ($response) {\r\n return TRUE;\r\n }\r\n }\r\n\r\n throw new Exception('Failed to write to ' . APPPATH . 'config/database.php');\r\n }", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "public function saveConfigOptions() {}", "public function writeConfig($config) {\n if(!is_array($config)) {\n trigger_error(\"writeConfig must be called with an array\");\n return FALSE;\n }\n \n if(!$this->_connected) {\n trigger_error(\"Can't write config when not connected\");\n return FALSE;\n }\n \n $toWrite = \"; Config written at \" . date('m-d-Y h:i:s') . \"\\n\";\n $toWrite .= \"; PDU writer version \" . VERSION . \"\\n\";\n $toWrite .= \"; 2011 Kevin O'Connor - [email protected]\\n\";\n \n foreach($config as $directive => $values) {\n $toWrite .= '[' . $directive . \"]\\n\";\n \n foreach($values as $configName => $configValue) {\n $toWrite .= $configName . \"=\" . $configValue . \"\\n\";\n }\n }\n \n if(!file_put_contents('configs/' . $this->_ip . '.ini_updated', $toWrite)) {\n trigger_error(\"Couldn't write temporary config\");\n return FALSE;\n }\n \n if(!ftp_put($this->_ftpConnection, 'config.ini', 'configs/' . $this->_ip . '.ini_updated', FTP_ASCII)) {\n trigger_error(\"Couldn't ftp_put\");\n return FALSE;\n }\n\t\n\tunlink('configs/' . $this->_ip . '.ini_updated');\n\tunlink('configs/' . $this->_ip . '.ini');\n \n return TRUE;\n }", "function configWriter($configs){\n\t\t\t\tglobal $scope_id;\n\t\t\t\t$appearanceSwitch = new Mage_Core_Model_Config();\n\t\t\t\tforeach($configs as $section => $value){\n\t\t\t\t\tif($scope_id){\n\t\t\t\t\t\t$appearanceSwitch->saveConfig($section, $value, 'stores', $scope_id);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$appearanceSwitch->saveConfig($section, $value, 'default', 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public function write(array $options, ConfigInterface $config);", "public function exportConfiguration() {}", "public function writeConfig(string $filename, $data, array $parent = array())\n\t{\n\t\t$out = $this->writeConfigRec((array)$data);\n\t\t\n\t\tif (substr($filename, 0, 1 ) != \"/\")\n\t\t\t$filename = BP.'/app/config/'.$filename;\n\t\t\n\t\tfile_put_contents($filename, trim($out));\n\t}", "private function writeConfig(string $key, array $config)\n {\n $this->initialize();\n $configuration = sprintf('<?php return %s;', var_export($config, true));\n file_put_contents(\n $this->directoryList->getPath(DirectoryList::GENERATED_METADATA) . '/' . $key . '.php',\n $configuration\n );\n }", "function write_config($data) {\n\n\t\t// Config path\n\t\t$template_path \t= 'config-sample.php';\n\t\t$output_path \t= 'config.php';\n\n\t\t// Open the file\n\t\t$database_file = file_get_contents($template_path);\n\n\t\t$new = str_replace(\"%DB_HOST%\",$data['db_host'],$database_file);\n\t\t$new = str_replace(\"%DB_USERNAME%\",$data['db_username'],$new);\n\t\t$new = str_replace(\"%DB_PASSWORD%\",$data['db_password'],$new);\n\t\t$new = str_replace(\"%DB_NAME%\",$data['db_name'],$new);\n\t\t$new = str_replace(\"%SITE_URL%\",$data['site_url'],$new);\n\n\t\t// Write the new database.php file\n\t\t$handle = fopen($output_path,'w+');\n\n\t\t// Chmod the file, in case the user forgot\n\t\t@chmod($output_path,0777);\n\n\t\t// Verify file permissions\n\t\tif(is_writable($output_path)) {\n\n\t\t\t// Write the file\n\t\t\tif(fwrite($handle,$new)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "public function canWriteConfiguration() {}", "public function write(array $values)\n {\n foreach($values as $key => $value) {\n $this->set($key, $value);\n list($filename, $item) = $this->parseKey($key);\n $config[$filename][$item] = $value;\n }\n\n foreach($config as $filename => $items) {\n $path = config_path($filename . '.php');\n if (!is_writeable($path)) throw new \\Exception('Configuration file ' . $filename . '.php is not writeable.');\n if (!$this->rewrite->toFile($path, $items)) throw new \\Exception('Unable to update configuration file ' . $filename . '.php');\n }\n }", "public function config_save() {\n }", "protected function writeConfig(array $nonDefaultValues)\n {\n $configValues = self::$configValues;\n foreach ($nonDefaultValues as $name => $value) {\n $configValues[$name] = $value;\n }\n file_put_contents(self::$configFile, json_encode($configValues));\n }", "function configfile_writeable() {\n\t\treturn is_writeable( CLASSPATH.\"payment/\".__CLASS__.\".cfg.php\" );\n\t}", "public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($fp);\n\t\t\t$this->afterSave();\n\t\t}\n\t}", "abstract protected function saveConfiguration($name, $value);", "public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}", "private function writeConfig(Array $config,$object)\n\t{\n\t\t$cf=$this->getConfigFileName($object);\n\t\t$out=\"<?php\\n\".'$config='.var_export($config,true).';';\n\t\tfile_put_contents($cf, $out, LOCK_EX);\n\t}", "protected function writeConfig($force = false)\n {\n $setup = new Setup($this->config, $this->output, $this->php);\n $setup->config();\n\n if ($this->firstRun) {\n $setup->env(false, true);\n\n return;\n }\n\n if ($this->fileExists('.env') && $force === false) {\n return $this->write('-> Configuration already set up. Use --force to regenerate.', 'comment');\n }\n\n $setup->env();\n }", "public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}", "public function saveConfig() {\r\n\t$configObj = new \\config(PROFILE_PATH . '/' . $this->name . '/config.php', TRUE);\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t$config = array_intersect_key(\\app::$config, $config);\r\n\treturn $configObj->saveConfig($config);\r\n }", "public function save()\n\t\t{\n#DS_Database_Archive::_log(__METHOD__.'()');\n\t\t\tif ( $this->_dirty ) {\n#DS_Database_Archive::_log(__METHOD__.'() data is dirty');\n\t\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t\tset_option( $this->option_name, $this->_options );\n\t\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t\t// save to filesystem\n#DS_Database_Archive::_log(__METHOD__.'() saving to file ' . $this->filename);\n\t\t\t\t\t$output = json_encode( $this->_options, JSON_PRETTY_PRINT );\n#DS_Database_Archive::_log(__METHOD__.'() contents: ' . $output);\n\t\t\t\t\tfile_put_contents( $this->filename, $output );\n\t\t\t\t}\n\t\t\t\t$this->_dirty = FALSE;\n\t\t\t}\n\t\t}", "public function save()\n {\n return $this->write($this->filename, $this->sections);\n }", "public function saveToFile()\n {\n $emails = $this->getEmailTemplatesFromRepository()->toJson();\n\n $this->filesystem->put($this->storagePath, $emails);\n }", "protected function saveConfiguration($name, $value)\n {\n // TODO: Implement saveConfiguration() method.\n }", "public function writeConfigFile($config)\n {\n $mysite = $this->directory . '/mysite';\n $file = $mysite . '/_config.php';\n\n if(!is_dir($mysite)) {\n $this->io->text('create ' . $mysite);\n mkdir($mysite);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $this->io->text('writing mysite/_config.php');\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$project;\\n\";\n $content .= \"\\$project = 'mysite';\\n\\n\";\n $content .= \"global \\$database;\\n\";\n $content .= \"\\$database = '{$config['database']['database']}';\\n\\n\";\n $content .= \"require_once('conf/ConfigureFromEnv.php');\\n\\n\";\n $content .= \"// Set the site locale\\n\";\n $content .= \"i18n::set_locale('{$config['locale']['locale']}');\\n\";\n\n if(isset($config['timezone'])) {\n $content .= \"date_default_timezone_set('{$config['timezone']['timezone']}');\\n\";\n }\n\n file_put_contents($file, $content);\n }", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "function Save()\n\t{\n\n\t\trequire_once(SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php');\n\n\t\tif (!is_writable($this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tmpfname = tempnam(TEMP_DIRECTORY, 'SS_');\n\t\tif (!$handle = fopen($tmpfname, 'w')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.prev.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_prev = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.prev.php';\n\t\tif (is_file($config_prev)) {\n\t\t\t@unlink($config_prev);\n\t\t}\n\n\t\t$contents = \"<?php\\n\\n\";\n\n\t\tgmt($this);\n\n\t\t$areas = $this->Areas;\n\n\n\t\tforeach ($areas['config'] as $area) {\n\t\t\t// See self::LoadSettings() on UTF8PATCH settings\n\t\t\tif ($area == 'DATABASE_UTF8PATCH') {\n\t\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', 1);\n\t\t\t\t}\n\t\t\t\t$contents .= \"define('SENDSTUDIO_DATABASE_UTF8PATCH', '\" . SENDSTUDIO_DATABASE_UTF8PATCH . \"');\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = 'define(\\'SENDSTUDIO_' . $area . '\\', \\'' . addslashes($this->Settings[$area]) . '\\');' . \"\\n\";\n\t\t\t$contents .= $string;\n\t\t}\n\n\t\t$contents .= 'define(\\'SENDSTUDIO_IS_SETUP\\', 1);' . \"\\n\";\n\n\t\t$contents .= \"\\n\\n\";\n\n\t\tfputs($handle, $contents, strlen($contents));\n\t\tfclose($handle);\n\t\tchmod($tmpfname, 0644);\n\n\t\tif (!copy($tmpfname, $this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\t\tunlink($tmpfname);\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.bkp.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_bkp = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.bkp.php';\n\t\tif (is_file($config_bkp)) {\n\t\t\t@unlink($config_bkp);\n\t\t}\n\n\t\tunset($areas['config']);\n\n\t\tif (defined('APPLICATION_SHOW_WHITELABEL_MENU') && constant('APPLICATION_SHOW_WHITELABEL_MENU')) {\n\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tforeach ($areas['whitelabel'] as $area) {\n\t\t\t\t// If settings are not set, do not continue\n\t\t\t\tif (!isset($this->Settings[$area])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$value = $this->Settings[$area];\n\n\t\t\t\tif (strtolower($area) == 'update_check_enabled') {\n\t\t\t\t\t$subAction = 'uninstall';\n\t\t\t\t\tif ($value == '1') {\n\t\t\t\t\t\t$subAction = 'install';\n\t\t\t\t\t}\n\t\t\t\t\t$result = Interspire_Addons::Process('updatecheck', $subAction, array());\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (strtolower($area) == 'lng_accountupgrademessage') {\n\t\t\t\t\t$agencyId = get_agency_license_variables();\n\t\t\t\t\tif(empty($agencyId['agencyid'])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = (int)$value;\n\t\t\t\t}\n\n\t\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings(name, value) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t\tif ($this->WhiteLabelCache->exists('IEM_SETTINGS_WHITELABEL')) {\n\t\t\t\t$this->WhiteLabelCache->remove('IEM_SETTINGS_WHITELABEL');\n\t\t\t}\n\t\t}\n\n\t\tif (isset($areas['whitelabel'])) {\n\t\t\tunset($areas['whitelabel']);\n\t\t}\n\n\t\t$stash = IEM_InterspireStash::getInstance();\n\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t$stash->remove('IEM_SYSTEM_SETTINGS');\n\t\t}\n\n\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\";\n\t\t$result = $this->Db->Query($query);\n\n\n\t\tforeach ($areas as $area) {\n\t\t\t$value = isset($this->Settings[$area]) ? $this->Settings[$area] : '';\n\n\n\n\t\t\tif ($area == 'SYSTEM_DATABASE_VERSION') {\n\t\t\t\t$value = $this->Db->FetchOne(\"SELECT version() AS version\");\n\t\t\t}\n\t\t\tif (is_bool($value)) {\n\t\t\t\t$value = (int)$value;\n\t\t\t}\n\n\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"config_settings(area, areavalue) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t}\n\n\n\t\treturn true;\n\t}", "public function writewebconfig()\n {\n //<add fileExtension=\"supersake\" allowed=\"false\"/>\n }", "public function store()\n {\n $classes = [];\n\n foreach ($this->classes as $class) {\n $classes[] = $class['input_file'];\n }\n\n $json_classes = json_encode($classes);\n\n $this->filesystem->put(config('larinterface.cache_directory') . '/larinterface.json', $json_classes);\n }", "function iniwrite() {\n\t global $setini;\n\t\n\t $ini = $this->gtk_path . \"webos.ini\"; \t//echo $ini; \n\t \n if ($fp = fopen ($ini , \"wb\")) {\n\t\t\n\t\t\t\t $tow = serialize($setini) . \"<@>\";\t \n\t\t\t\t\t \n fwrite ($fp, $tow);\n fclose ($fp);\n\t\t\t\t \n\t\t $this->set_console_message(\"Writing ini settings successfully.\");\t\t\t\t \n\t\t\t\t return (true);\n\t }\n\t else {\n\t\t $this->set_console_message(\"Ini setting NOT saved !!!\");\t\t\n\t\t\t\t return (false);\n\t\t}\t\t\n\t}", "protected function saveConfig() {\n return $this->updateConfigValues(array(\n 'PAYNETEASY_END_POINT',\n 'PAYNETEASY_LOGIN',\n 'PAYNETEASY_SIGNING_KEY',\n 'PAYNETEASY_SANDBOX_GATEWAY',\n 'PAYNETEASY_PRODUCTION_GATEWAY',\n 'PAYNETEASY_GATEWAY_MODE'\n ));\n }", "public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }", "public function write() {\n\n try {\n $this->open();\n $sessionData = session_encode(); // Returns an encoded string containing the session data.\n $fileHandle = fopen(self::FILEPATH, \"w+\"); // Open the file\n fwrite($fileHandle, $sessionData); // Write the session data to file\n fclose($fileHandle);\n }\n catch(SessionException $e) {\n echo \"Error writing session to file: \" . $e->getMessage();\n }\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "public function save() {\n\t\t$vars = $this->vars;\n\t\t$this->copyFromTemplateIfNeeded();\n\t\t$lines = file($this->filePath);\n\t\tforeach ($lines as $key => $line) {\n\t\t\tif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=(.*)\\\"(.*)\\\";(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]\\\"{$vars[$arr[3]]}\\\";$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t} elseif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=([ \t]+)([0-9]+);(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]{$vars[$arr[3]]};$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t}\n\t\t}\n\n\t\tunset($vars['module_load_paths']); // hacky\n\n\t\t// if there are additional vars which were not present in the config\n\t\t// file or in template file then add them at end of the config file\n\t\tif (!empty($vars)) {\n\t\t\t$lines []= \"<?php\\n\";\n\t\t\tforeach ($vars as $name => $value) {\n\t\t\t\tif (is_string($value)) {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = \\\"$value\\\";\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = $value;\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$lines []= \"\\n\";\n\t\t}\n\n\t\tfile_put_contents($this->filePath, $lines);\n\t}", "protected function writeSitemap()\n {\n $this->mOutput->writeln(__METHOD__);\n\n //generate the other sitemaps\n $lRenderParams = array();\n $lRenderParams[\"urls\"] = $this->mCurrentSitemap;\n $lRenderParams[\"serverName\"] = \"http://\" . $this->mServerName;\n $lResult = $this->getContainer()->get('templating')->render('WegeooWebsiteBundle:Default:sitemap.xml.twig', $lRenderParams);\n //$output->writeln($lResult);\n\n $lSitemapPath = sprintf(\"%s/sitemap%s.xml\" , self::SITEMAP_DIRECTORY , $this->mNumSitemaps++);\n $lSuccess = file_put_contents($lSitemapPath , $lResult);\n if ( $lSuccess !== FALSE)\n {\n $this->mOutput->writeln(sprintf(\"Sitemap '%s' Successfully Created\" , basename($lSitemapPath)));\n }else{\n $this->mOutput->writeln(\"ERROR: Sitemapindex '%s' not Created\" , basename($lSitemapPath));\n }\n }", "function persist_optionsFile()\n\t\t{\n\t\t\t$propFile = $this->thispluginpath.'hits-pngfix2.properties';\n\t\t\tif($this->is__writable($propFile))\n\t\t\t{\n\t\t\t\t$propFileHandle = @fopen($propFile, 'w') or die(\"can't open file\");\n\t\t\t\tfwrite($propFileHandle,$this->thisProtocolRelativeUrl.\"clear.gif\");\n\t\t\t\tfclose($propFileHandle);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->options['hits_ie6_debug']=='true')\n\t\t\t\t\techo \"<!-- DEBUG: Options file is not writeable -->\";\n\t\t\t}\n\t\t}", "protected function writeConfigFile($config)\n {\n return $this->createFile($this->getCurrentConfigFilePath(), $this->generateConfigFileContent($config));\n }", "public function configSave()\n\t{\n\t\t$section = Mage::app()->getRequest()->getParam('section');\n\t\tif ($section == 'mtghost_design')\n\t\t{\n\t\t\t$websiteCode = Mage::app()->getRequest()->getParam('website');\n\t\t\t$storeCode = Mage::app()->getRequest()->getParam('store');\n\t\t\t\n\t\t\tMage::getSingleton('mtghost/cssgen_generator')->generateCss('design', $websiteCode, $storeCode);\n\t\t}else if($section == 'mtghost'){\n $websiteCode = Mage::app()->getRequest()->getParam('website');\n $storeCode = Mage::app()->getRequest()->getParam('store');\n\n Mage::getSingleton('mtghost/cssgen_generator')->generateCss('layout', $websiteCode, $storeCode);\n }\n\t}", "public function prepareCfg() {\n if($result = DB::get()->query(\"SELECT * FROM `config` WHERE `sid` = '\" . $this->sid . \"'\")) {\n $row = $result->fetch_assoc();\n $result->close();\n\n $file = PATH . '/serverdata/server' . $this->sid . '.cfg';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['cfg']);\n\n $file = PATH . '/serverdata/mapcycle' . $this->sid . '.txt';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['mapcycle']);\n }\n }", "public function write();", "public function write();", "public function writeSitemap()\n {\n if (!$this->sitemaps) {\n throw new \\BadMethodCallException(\n 'To write a sitemap, first create it with the createSitemap()'\n . ' function.'\n );\n }\n foreach ($this->sitemaps as $sitemap) {\n if ($this->gzipSitemaps) {\n $this->writeGzipFile($sitemap['xml'], $sitemap['filename']);\n } else {\n $this->writeXmlFile($sitemap['xml'], $sitemap['filename']);\n }\n }\n foreach ($this->indexes as $index) {\n $this->writeXmlFile($index['xml'], $index['filename']);\n }\n }", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "protected function writeSitemapIndex()\n {\n //Generate the sitemapIndex\n $lRenderParams = array();\n $lRenderParams[\"numSitemaps\"] = $this->mNumSitemaps;\n $lRenderParams[\"serverName\"] = \"http://\" . $this->mServerName;\n $lResult = $this->getContainer()->get('templating')->render('WegeooWebsiteBundle:Default:sitemapIndex.xml.twig', $lRenderParams);\n\n //export sitemap index\n $lSitemapIndexPath = sprintf(\"%s/sitemap.xml\" , self::SITEMAP_DIRECTORY);\n $lSuccess = file_put_contents($lSitemapIndexPath , $lResult);\n if ( $lSuccess !== FALSE)\n {\n $this->mOutput->writeln(\"Sitemap 'sitemap.xml' Successfully Created\");\n }else{\n $this->mOutput->writeln(\"ERROR: Sitemapindex 'sitemap.xml' not Created\");\n }\n }", "public static function save($config)\n {\n $content = \"<\" . \"?php return \";\n $content .= var_export($config, true);\n $content .= \"; ?\" . \">\";\n\n $configFile = self::getConfigFilePath();\n file_put_contents($configFile, $content);\n\n if (function_exists('opcache_invalidate')) {\n opcache_reset();\n opcache_invalidate($configFile);\n }\n\n if (function_exists('apc_compile_file')) {\n apc_compile_file($configFile);\n }\n }", "private function configure()\n {\n $keyCert = SignatureUtils::generateKeyCert($this->settings);\n $dir = dirname($this->settings['sp_key_file']);\n if (!is_dir($dir)) {\n throw new \\InvalidArgumentException('The directory you selected for sp_key_file does not exist. ' .\n 'Please create ' . $dir);\n }\n $dir = dirname($this->settings['sp_cert_file']);\n if (!is_dir($dir)) {\n throw new \\InvalidArgumentException('The directory you selected for sp_cert_file does not exist.' .\n 'Please create ' . $dir);\n }\n file_put_contents($this->settings['sp_key_file'], $keyCert['key']);\n file_put_contents($this->settings['sp_cert_file'], $keyCert['cert']);\n }", "protected function exportConfig()\n {\n if ($this->option('interactive')) {\n if (! $this->confirm('Install the package config file?')) {\n return;\n }\n }\n if (file_exists(config_path('laravel-mentor.php')) && ! $this->option('force')) {\n if (! $this->confirm('The Laravel Mentor configuration file already exists. Do you want to replace it?')) {\n return;\n }\n }\n copy(\n $this->packagePath('config/laravel-mentor.php'),\n config_path('laravel-mentor.php')\n );\n\n $this->comment('Configuration Files installed successfully.');\n }", "public function generate() {\n $this->event->getIO()->write(\"<info>Generate settings file:</info>\");\n\n $parameters = $this->getParameters();\n if ($parameters) {\n $new_settings = $this->twigEnvironment->render($this->getTemplateFilename(), $this->getReplacements($parameters));\n $target_settings_file = $this->getDestinationPath() . '/' . $this->getDestinationFile();\n\n // Ensure folder and existing file is writable.\n chmod($this->getDestinationPath(), 0755);\n if (file_exists($target_settings_file)) {\n chmod($target_settings_file, 0644);\n }\n\n file_put_contents($target_settings_file, $new_settings);\n }\n else {\n $this->event->getIO()->write(\"<error>Unable to find any parameters files</error>\");\n }\n }", "public static function save()\n\t{\n\t\tConfigManager::save('discord', self::load(), 'config');\n\t}", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function save($name) \n {\n // Lowercase the $name\n $name = strtolower($name);\n \n // Check to see if we need to put this in an array\n $ckey = $this->files[$name]['config_key'];\n if($ckey != FALSE)\n {\n $Old_Data = $this->data[$name];\n $this->data[$name] = array(\"$ckey\" => $this->data[$name]);\n }\n\n // Create our new file content\n $cfg = \"<?php\\n\";\n\n // Loop through each var and write it\n foreach( $this->data[$name] as $key => $val )\n {\n switch( gettype($val) )\n {\n case \"boolean\":\n $val = ($val == true) ? 'true' : 'false';\n // donot break\n case \"integer\":\n case \"double\":\n case \"float\":\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"array\":\n $val = var_export($val, TRUE);\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"NULL\":\n $cfg .= \"\\$$key = null;\\n\";\n break;\n case \"string\":\n $cfg .= (is_numeric($val)) ? \"\\$$key = \" . $val . \";\\n\" : \"\\$$key = '\" . addslashes( $val ) . \"';\\n\";\n break;\n default: break;\n }\n }\n\n // Close the php tag\n $cfg .= \"?>\";\n \n // Add the back to non array if we did put it in one\n if($ckey != FALSE)\n {\n $this->data[$name] = $Old_Data;\n }\n \n // Copy the current config file for backup, \n // and write the new config values to the new config\n copy($this->files[$name]['file_path'], $this->files[$name]['file_path'].'.bak');\n if(file_put_contents( $this->files[$name]['file_path'], $cfg )) \n {\n return TRUE;\n } \n else \n {\n return FALSE;\n }\n }", "private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }", "function saveConfigurationSettings() {\n\t$dbhost=$_POST['db_host'];\n\t$dbname=$_POST['db_name'];\n\t$dbuser=$_POST['db_user'];\n\t$dbpasswd=$_POST['db_passwd'];\n\t\n\t\n\t$dbprefix=($_POST['db_prefix']!=\"\"?$_POST['db_prefix']:\"V0_\");\n\t\n\tglobal $cmsFolder;\n\t$configFileText = '';\n\trequire_once('config-prototype.inc.php');\n\t$writeHandle = @fopen(\"../config.inc.php\", 'w');\n\tif (!$writeHandle)\n\t{\n\t\tdisplayError('Could not write to config.inc.php. Please make sure that the file is writable.');\n\t\treturn false;\n\t}\n\tfwrite($writeHandle, $configFileText);\n\tfclose($writeHandle);\n\tdisplayInfo(\"Configuration Successfully Saved!\");\n\n\tdefine(\"MYSQL_SERVER\",$dbhost);\n\tdefine(\"MYSQL_DATABASE\",$dbname);\n\tdefine(\"MYSQL_USERNAME\",$dbuser);\n\tdefine(\"MYSQL_PASSWORD\",$dbpasswd);\n\tdefine(\"MYSQL_DATABASE_PREFIX\",$dbprefix);\n\t\n\t\n\treturn true;\n}", "public function WriteFiles()\n {\n $popdata = \"\\$pop = \" . var_export($this->population, true) . \";\\n\";\n $popdata .= \"\\$names = \" . var_export($this->names, true) . \";\\n\";\n file_put_contents(\"population.txt\", $popdata);\n \n file_put_contents(\"fitness.txt\", \"\\$fitness = \" . var_export($this->fitness, true) . \";\");\n \n $state_data = \"\\$generation = \" . var_export($this->generation, true) . \";\\n\";\n $state_data .= \"\\$memory = \" . var_export($this->memory, true) . \";\\n\";\n $state_data .= \"\\$strains = \" . var_export($this->strains, true) . \";\\n\";\n $state_data .= \"\\$lastname = \" . var_export($this->lastname, true) . \";\\n\";\n file_put_contents(\"ga_state.txt\", $state_data);\n }", "private function saveType()\n\t{\n\t\t// Build config file\n\t\t$config = \"<?php \\n\\n\";\n\t\t$config.= \"// This config file is auto generated on boot.\\n\\n\";\n\t\t$config.= 'define(\"INSTANCE_TYPE\", \"'.$this->instanceType.'\");'.\"\\n\";\n\t\t$config.= 'define(\"INSTANCE_NAME\", \"'.$this->instanceName.'\");'.\"\\n\";\n\t\t$config.= 'define(\"BRANCH\", \"'.$this->branch.'\");'.\"\\n\";\n\n\t\t// If bootstrapping the development server\n\t\tif($this->instanceDev)\n\t\t{\n\t\t\t$config.= 'define(\"DEV\", TRUE);'.\"\\n\";\n\t\t}\t\n\n\t\t// Write config file to config folder\n\t\tfile_put_contents(\"config/instance.config.php\", $config);\n\t}", "public function write() {\n\t\t$database = Registry::get(\"database\");\n\t\t$v = \"value='\" . $this -> value . \"'\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE server.configs SET \" . $v . \" WHERE key_='\" . $this -> key . \"'\");\n\t}", "public function save()\n {\n App::cliLog(\"Saving to $this->format file\", false);\n\n try {\n call_user_func([$this, 'export' . ucfirst($this->format)]);\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }", "protected function publishConfigurationFile()\n {\n // Determine the Local Configuration Path\n $source = $this->getLocalConfigurationPath();\n\n // Determine the Application Configuration Path\n $destination = $this->getApplicationConfigPath();\n\n // Publish the Configuration File\n $this->publishes([$source => $destination], 'config');\n }", "public function storeFile()\n\t{\n\t\tif (!$this->blnIsModified)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$strFile = trim($this->strTop) . \"\\n\\n\";\n\t\t$strFile .= \"-- LESSON SEGMENT START --\\nCREATE TABLE `tl_cb_lessonsegment` (\\n\";\n\n\t\tforeach ($this->arrData as $k=>$v)\n\t\t{\n\t\t\t$strFile .= \" `$k` $v,\\n\";\n\t\t}\n\n\t\t$strFile .= \") ENGINE=MyISAM DEFAULT CHARSET=utf8;\\n-- LESSON SEGMENT STOP --\\n\\n\";\n\n\t\tif ($this->strBottom != '')\n\t\t{\n\t\t\t$strFile .= trim($this->strBottom) . \"\\n\\n\";\n\t\t}\n\n\t\t$objFile = new File('system/modules/course_builder/config/database.sql');\n\t\t$objFile->write($strFile);\n\t\t$objFile->close();\n\t}", "function save_pages()\n\t{\n\t\tglobal $Cl_root_path, $errors, $cache;\n\t\t\n\t\t// construct filename\n\t\t$dir = $Cl_root_path . 'kernel/config/';\n\t\t$file = $dir . 'static_pages' . phpEx;\n\t\tif ( !is_file( $file ) )\n\t\t{ // attempt to create it\n\t\t\tif ( !is_writable( $dir ) )\n\t\t\t{ // attempt to make it writable\n\t\t\t\tif ( !@chmod( $dir, 0755 ) )\n\t\t\t\t{\n\t\t\t\t\t$errors->report_error( $this->lang[ 'No_writable' ], CRITICAL_ERROR );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !@touch( $file ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( $this->lang[ 'No_writable' ], CRITICAL_ERROR );\n\t\t\t}\n\t\t}elseif( !is_writable( $file ) )\n\t\t{\n\t\t\tif ( !@chmod( $file, 0644 ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( $this->lang[ 'No_writable' ], CRITICAL_ERROR );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now open the file\n\t\tif ( !$f = @fopen( $file, 'wb' ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'No_writable' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// write the stuff\n\t\t$ser = serialize( $this->pages_array );\n\t\tif ( !@fwrite( $f, $ser ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'No_write' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// close the file\n\t\t@fclose( $f );\n\t\t// rechmod thingies\n\t\t@chmod( $dir, 0544 );\n\t\t@chmod( $file, 0444 );\n\t\t\n\t\t// clear cache\n\t\t$cache->delete( 'static_pages_menu' );\n\t\t$cache->delete( 'static_pages' );\n\t}", "public function writeEnvironmentFile($config)\n {\n $file = $this->directory . '/_ss_environment.php';\n\n if(!is_dir($this->directory)) {\n $this->io->text('create ' . $this->directory);\n mkdir($this->directory);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $host = $config['hostname'];\n $db = $config['database'];\n $admin = $config['admin'];\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$_FILE_TO_URL_MAPPING;\\n\";\n $content .= \"\\$_FILE_TO_URL_MAPPING[__DIR__] = '\".$host['hostname'].\"';\\n\\n\";\n $content .= \"define('SS_ENVIRONMENT_TYPE', 'dev');\\n\\n\";\n $content .= \"define('SS_DATABASE_CLASS', '\".$db['class'].\"');\\n\";\n $content .= \"define('SS_DATABASE_SERVER', '\".$db['server'].\"');\\n\";\n $content .= \"define('SS_DATABASE_USERNAME', '\".$db['username'].\"');\\n\";\n $content .= \"define('SS_DATABASE_PASSWORD', '\".$db['password'].\"');\\n\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_USERNAME', '\".$admin['username'].\"');\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_PASSWORD', '\".$admin['password'].\"');\\n\\n\";\n\n $this->io->text('write config to _ss_environment.php');\n file_put_contents($file, $content);\n }", "private function flush(): void {\n file_put_contents(APP_ROOT . '/public/config/lang/dictionary.json',\n json_encode([\\Config::Dictionary => $this->dictionary]));\n }", "public function write_file() {\n\n\t\t$css = array();\n\t\t$configs = Kirki::$config;\n\t\tforeach ( $configs as $config_id => $args ) {\n\t\t\t// Get the CSS we want to write.\n\t\t\t$css[ $config_id ] = apply_filters( \"kirki/{$config_id}/dynamic_css\", Kirki_Modules_CSS::loop_controls( $config_id ) );\n\t\t}\n\t\t$css = implode( $css, '' );\n\n\t\t// Minimize the CSS a bit.\n\t\t$css = str_replace( array( \"\\n\", \"\\t\", \"\\r\\n\" ), '', $css );\n\t\t$css = str_replace( array( '{ ', '{ ', '{ ' ), '{', $css );\n\t\t$css = str_replace( ': ', ':', $css );\n\t\t$css = str_replace( array( '; ', '; ', '; ' ), ';', $css );\n\t\t$css = explode( '}', $css );\n\t\t$css = array_unique( $css );\n\t\t$css = implode( $css, '}' );\n\n\t\t// If the folder doesn't exist, create it.\n\t\tif ( ! file_exists( $this->get_path( 'folder' ) ) ) {\n\t\t\twp_mkdir_p( $this->get_path( 'folder' ) );\n\t\t}\n\n\t\t$filesystem = $this->get_filesystem();\n\t\t$write_file = (bool) $filesystem->put_contents( $this->get_path( 'file' ), $css );\n\t\tif ( ! $write_file ) {\n\t\t\t$this->fallback = true;\n\t\t\tset_transient( 'kirki_css_write_to_file_failed', true, HOUR_IN_SECONDS );\n\t\t}\n\t\treturn $write_file;\n\n\t}", "function testSaveConfigFile(){\n\t\t\techo \"testing magratheaConfig saving a config file... <br/>\";\n\t\t\t$confs = array(\"config_test\" => \"ok\", \n\t\t\t\t\"config_test2\" => \"another_ok\" );\n\t\t\t$this->magConfig->setConfig($confs);\n\t\t\t$this->magConfig->Save(false);\n\t\t\t$this->assertTrue(file_exists($this->configPath.\"test_conf.conf\"));\n\t\t}", "public function writeOutDefinitions()\n {\n $handle = fopen($this->filename, 'w');\n fwrite($handle, $this->__toString());\n fclose($handle);\n }", "private function write($config, $only_if_present = false) {\n\n\t\t$url = parse_url(network_site_url());\n\n\t\tif (isset($url['port']) && '' != $url['port'] && 80 != $url['port']) {\n\t\t\t$config_file = WPO_CACHE_CONFIG_DIR.'/config-'.$url['host'].'-port'.$url['port'].'.php';\n\t\t} else {\n\t\t\t$config_file = WPO_CACHE_CONFIG_DIR.'/config-'.$url['host'].'.php';\n\t\t}\n\n\t\t$this->config = wp_parse_args($config, $this->get_defaults());\n\t\tif ((!$only_if_present || file_exists($config_file)) && !file_put_contents($config_file, json_encode($this->config))) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }", "public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }", "static function WriteINI()\n {\n $content = \"\";\n\n foreach(self::$settings as $key => $data)\n {\n if(is_array($data))\n {\n $is_section = true;\n\n foreach($data as $dataKey => $dataValues)\n {\n if(is_long($dataKey))\n {\n $is_section = false;\n break;\n }\n }\n\n $content .= \"\\n\";\n\n //Write global array value\n if(!$is_section)\n {\n foreach($data as $dataKey => $dataValue)\n {\n $content .= $key . '[] = \"' . $dataValue . '\"' . \"\\n\";\n }\n }\n\n //Write section\n else\n {\n $content .= \"[\" . $key . \"]\\n\";\n\n foreach($data as $dataKey => $dataValue)\n {\n if(is_array($dataValue))\n {\n foreach($dataValue as $dataInnerValue)\n {\n $content .= $dataKey . '[] = \"' . $dataInnerValue . '\"' . \"\\n\";\n }\n }\n else\n {\n $content .= $dataKey . ' = \"' . $dataValue . '\"' . \"\\n\";\n }\n }\n }\n\n $content .= \"\\n\";\n }\n\n //Write global value\n else\n {\n $content .= $key . ' = \"' . $data . '\"' . \"\\n\";\n }\n }\n\n file_put_contents(self::$file, $content);\n }", "protected function writeFileToDisk(): void\n {\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n }", "public static function writeConfig($basePath, array $cfg)\n {\n foreach ($cfg as $key => $value) {\n if (!in_array($key, self::validLfsParams) && !in_array($key, self::validExtraParams)) {\n throw new LsnException(\"Parameter '$cfg' is not recognized\");\n }\n }\n\n if (!file_exists($basePath)) {\n if (!@mkdir($basePath, 0775, true)) {\n throw new LsnException(\"Can't create directory '$basePath'! Permission problem?\");\n }\n }\n\n if (@file_put_contents(\"$basePath/welcome.txt\", isset($cfg['welcome']) ? $cfg['welcome'] : '') === false) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/welcome.cfg\\\"'\");\n }\n\n if (@file_put_contents(\"$basePath/tracks.txt\", isset($cfg['tracks']) ? implode(PHP_EOL, (array)$cfg['tracks']) : '') === false) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/tracks.cfg\\\"'\");\n }\n\n\n $fileContents = [];\n $fileContents[] = '// This file is automatically generated at '.date('Y-m-d H:i:s').'';\n\n $lfsConfig = [];\n foreach (self::validLfsParams as $key) {\n if (array_key_exists($key, $cfg) && !empty($cfg[$key])) {\n $lfsConfig[$key] = $cfg[$key];\n } elseif (array_key_exists($key, self::defaultConfig)) {\n $lfsConfig[$key] = self::defaultConfig[$key];\n }\n }\n\n if (!empty($cfg['welcome'])) {\n $lfsConfig['welcome'] = 'welcome.txt';\n }\n\n if (!empty($cfg['tracks'])) {\n $lfsConfig['tracks'] = 'tracks.txt';\n }\n\n foreach ($lfsConfig as $key => $value) {\n $fileContents[] = \"/$key=$value\";\n }\n $fileContents[] = \"\"; // new line at the end\n\n if (!@file_put_contents(\"$basePath/setup.cfg\", implode(\"\\n\", $fileContents))) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/setup.cfg\\\"'\");\n }\n }" ]
[ "0.7919214", "0.7683364", "0.7529462", "0.7458428", "0.7436946", "0.7223807", "0.72200584", "0.7038828", "0.6849049", "0.6818717", "0.67896545", "0.66835475", "0.66254646", "0.6616327", "0.65586376", "0.6401861", "0.6281222", "0.62663823", "0.62024844", "0.6164189", "0.61374307", "0.61156565", "0.6081656", "0.60741436", "0.6068463", "0.606481", "0.6057317", "0.6046334", "0.6030625", "0.60101634", "0.60006166", "0.5998466", "0.59879243", "0.5973579", "0.5931941", "0.58798945", "0.5877811", "0.58758366", "0.5862998", "0.5860807", "0.58556354", "0.5855026", "0.5840199", "0.58388984", "0.583466", "0.5831158", "0.58182335", "0.57792723", "0.5741", "0.57366407", "0.5728119", "0.57267207", "0.57229394", "0.57130885", "0.57063556", "0.5697292", "0.56885076", "0.56751406", "0.56673586", "0.5664053", "0.5645152", "0.56296843", "0.56271684", "0.5623541", "0.5612566", "0.5597119", "0.5588556", "0.5568937", "0.55631906", "0.55631906", "0.55519783", "0.55498606", "0.55494624", "0.554455", "0.55416805", "0.5539959", "0.55371135", "0.55352175", "0.55344206", "0.55269223", "0.55199087", "0.55021375", "0.5492197", "0.5487658", "0.54875976", "0.5485928", "0.54814297", "0.54802775", "0.547488", "0.5464232", "0.5463174", "0.54621536", "0.54492974", "0.54475194", "0.54395247", "0.5420933", "0.54199535", "0.5415244", "0.5410063", "0.54087156" ]
0.56806964
57
/ Make sure cfg file exists, and if not, create it.
function recurringdowntime_check_cfg() { if (!file_exists(RECURRINGDOWNTIME_CFG)) { $fh = @fopen(RECURRINGDOWNTIME_CFG, "w+"); fclose($fh); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCreateConfigFile(){\n\t\tTestsHelper::Print(\"testing magratheaConfig checking if we can create a config file...\");\n\t\t$this->magConfig->Save();\n\t\t$this->assertTrue(file_exists($this->configPath.\"/\".$this->fileName));\n\t}", "function testCreateConfigFile(){\n\t\t\techo \"testing magratheaConfig checking if we can create a config file... <br/>\";\n\t\t\t$this->magConfig->Save();\n\t\t\t$this->assertTrue(file_exists($this->configPath.\"test_conf.conf\"));\n\t\t}", "private function copyFromTemplateIfNeeded() {\n\t\t$templatePath = __DIR__ . '/../conf/config.template.php';\n\t\tif (!file_exists($this->filePath)) {\n\t\t\tcopy($templatePath, $this->filePath) or LegacyLogger::log('ERROR', 'StartUp', \"could not create config file: {$this->filePath}\");\n\t\t}\n\t}", "private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }", "public function configFileExists() {\n $_fileName = \\Config::get('fontello::config.file');\n $_folderName = \\Config::get('fontello::config.folder');\n if (\\File::exists($_folderName . $_fileName)) {\n $this->_configFile = $_folderName . $_fileName;\n return true;\n }\n return false;\n }", "private function useTmpConfigDatabase() {\n\t\t$configFile = sprintf(\"%s/../data/config.xml\", getcwd());\n\t\t$tmpConfigFile = tempnam(\"/tmp\", \"cfg\");\n\t\tcopy($configFile, $tmpConfigFile);\n\t\t\\OMV\\Environment::set(\"OMV_CONFIG_FILE\", $tmpConfigFile);\n\t}", "private function copyConfigFile()\n {\n $path = $this->getConfigPath();\n\n // if generatords config already exist\n if ($this->files->exists($path) && $this->option('force') === false) {\n $this->error(\"{$path} already exists! Run 'generate:publish-stubs --force' to override the config file.\");\n die;\n }\n\n File::copy(__DIR__ . '/../config/config.php', $path);\n }", "public function createConfig()\n\t{\n\t}", "public function prepareCfg() {\n if($result = DB::get()->query(\"SELECT * FROM `config` WHERE `sid` = '\" . $this->sid . \"'\")) {\n $row = $result->fetch_assoc();\n $result->close();\n\n $file = PATH . '/serverdata/server' . $this->sid . '.cfg';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['cfg']);\n\n $file = PATH . '/serverdata/mapcycle' . $this->sid . '.txt';\n if(!file_exists($file)) {\n touch($file);\n chmod($file, 0777);\n }\n file_put_contents($file, $row['mapcycle']);\n }\n }", "public static function writeConfig($basePath, array $cfg)\n {\n foreach ($cfg as $key => $value) {\n if (!in_array($key, self::validLfsParams) && !in_array($key, self::validExtraParams)) {\n throw new LsnException(\"Parameter '$cfg' is not recognized\");\n }\n }\n\n if (!file_exists($basePath)) {\n if (!@mkdir($basePath, 0775, true)) {\n throw new LsnException(\"Can't create directory '$basePath'! Permission problem?\");\n }\n }\n\n if (@file_put_contents(\"$basePath/welcome.txt\", isset($cfg['welcome']) ? $cfg['welcome'] : '') === false) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/welcome.cfg\\\"'\");\n }\n\n if (@file_put_contents(\"$basePath/tracks.txt\", isset($cfg['tracks']) ? implode(PHP_EOL, (array)$cfg['tracks']) : '') === false) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/tracks.cfg\\\"'\");\n }\n\n\n $fileContents = [];\n $fileContents[] = '// This file is automatically generated at '.date('Y-m-d H:i:s').'';\n\n $lfsConfig = [];\n foreach (self::validLfsParams as $key) {\n if (array_key_exists($key, $cfg) && !empty($cfg[$key])) {\n $lfsConfig[$key] = $cfg[$key];\n } elseif (array_key_exists($key, self::defaultConfig)) {\n $lfsConfig[$key] = self::defaultConfig[$key];\n }\n }\n\n if (!empty($cfg['welcome'])) {\n $lfsConfig['welcome'] = 'welcome.txt';\n }\n\n if (!empty($cfg['tracks'])) {\n $lfsConfig['tracks'] = 'tracks.txt';\n }\n\n foreach ($lfsConfig as $key => $value) {\n $fileContents[] = \"/$key=$value\";\n }\n $fileContents[] = \"\"; // new line at the end\n\n if (!@file_put_contents(\"$basePath/setup.cfg\", implode(\"\\n\", $fileContents))) {\n throw new LsnException(\"Failed to write at '\\\"$basePath/setup.cfg\\\"'\");\n }\n }", "function configfile_writeable() {\n\t\treturn is_writeable( CLASSPATH.\"payment/\".__CLASS__.\".cfg.php\" );\n\t}", "function test_config()\n{\n\treturn is_writable('includes/config.php');\n}", "public function testConfigExists() {\n if (isset($this->app->config) && sizeof($this->app->config) > 0) {\n $this->pass(\"The configuration file has been loaded.\");\n }\n else {\n $this->fail(\"The configuration file was not loaded or is empty.\");\n }\n }", "public function testCreatesFileOnRead()\n {\n Wallet::read();\n $this->assertFileExists(Wallet::WALLET_CONFIG);\n }", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "function recurringdowntime_write_cfg($cfg)\n{\n if (is_array($cfg)) {\n $cfg_str = recurringdowntime_array_to_cfg($cfg);\n } else {\n $cfg_str = $cfg;\n }\n recurringdowntime_check_cfg();\n file_put_contents(RECURRINGDOWNTIME_CFG, $cfg_str);\n return true;\n}", "function testSaveConfigFile(){\n\t\tTestsHelper::Print(\"testing magratheaConfig saving a config file...\");\n\t\t$confs = array(\"config_test\" => \"ok\", \n\t\t\t\"config_test2\" => \"another_ok\" );\n\t\t$this->magConfig->setConfig($confs);\n\t\t$this->magConfig->Save(false);\n\t\t$this->assertTrue(file_exists($this->configPath.\"/\".$this->fileName));\n\t}", "function testSaveConfigFile(){\n\t\t\techo \"testing magratheaConfig saving a config file... <br/>\";\n\t\t\t$confs = array(\"config_test\" => \"ok\", \n\t\t\t\t\"config_test2\" => \"another_ok\" );\n\t\t\t$this->magConfig->setConfig($confs);\n\t\t\t$this->magConfig->Save(false);\n\t\t\t$this->assertTrue(file_exists($this->configPath.\"test_conf.conf\"));\n\t\t}", "function creat_conf_for_offline($project){\n $str = 'workingDir='.$project->outputPython.\"\\r\\n\";\n $str = $str.'git='.$project->userProjectRoot.\"\\\\\".$project->gitName.\"\\r\\n\";\n $str = $str.'issue_tracker_product_name='.$project->issue_tracker_product_name.\"\\r\\n\";\n $str = $str.'issue_tracker_url='.$project->issue_tracker_url.\"\\r\\n\";\n $str = $str.'issue_tracker='.$project->issue_tracker.\"\\r\\n\";\n $str = $str.\"vers=(\". $project->all_versions.\")\";\n file_put_contents($project->learnDir.\"\\\\antConf.txt\",$str); \n\t}", "public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }", "public function createCfg() {\n global $hostlist;\n $hostinfo = $hostlist[$this->host];\n $this->prepareCfg();\n $src = PATH . '/serverdata';\n $dest = GAMEPATH . '/users/ts' . $this->sid;\n if($ssh = new SSH($hostinfo)) {\n $ret1 = $ssh->sendFile($src . '/server' . $this->sid . '.cfg', $dest . '/server.cfg');\n $ret2 = $ssh->sendFile($src . '/mapcycle' . $this->sid . '.txt', $dest . '/mapcycle.txt');\n return $ret1 && $ret2;\n }\n }", "protected function createEnvFile()\n {\n if (! file_exists('.env')) {\n copy('.env.example', '.env');\n $this->line('.env file successfully created');\n }\n }", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "private static function check_config ()\n\t{\n\t\t// load config file here\n\t\tif (count(self::$_config) == 0)\n\t\t{\n\t\t\tself::LoadConfigFile();\n\t\t}\n\t}", "function saveConfig(Config_Lite $inConfig) {\r\n\t\ttry {\r\n $inConfig->save();\r\n\t\t} catch (Config_Lite_Exception $e) {\r\n\t\t\techo \"\\n\" . 'Exception Message: ' . $e->getMessage();\r\n\t\t\twrite_log('Error saving configuration.','ERROR');\r\n\t\t}\r\n\t\t$configFile = dirname(__FILE__) . '/config.ini.php';\r\n\t\t$cache_new = \"'; <?php die('Access denied'); ?>\"; // Adds this to the top of the config so that PHP kills the execution if someone tries to request the config-file remotely.\r\n\t\t$cache_new .= file_get_contents($configFile);\r\n\t\tfile_put_contents($configFile,$cache_new);\r\n\t\t\r\n\t}", "public function checkConfiguration()\n\t{\n\t\tglobal $langs;\n\n\t\t$errors = array();\n\n\t\t$filename = $this->getFilename();\n\n\t\tif (file_exists($filename) && is_writable($filename))\n\t\t{\n\t\t\tdol_syslog('admin/syslog: file '.$filename);\n\t\t}\n\t\telse $errors[] = $langs->trans(\"ErrorFailedToOpenFile\", $filename);\n\n\t\treturn $errors;\n\t}", "public function writeFullConfFile()\n {\n return $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_CONF_DIR . self::GITOLITE_CONF_FILE,\n $this->renderFullConfFile()\n );\n }", "static function create_config_inc($dbhost, $dbuser, $dbpass, $dbname, \n $title, $google, $copyright)\n {\n // create the file\n if (!$f = @fopen(dirname(__FILE__).'/../../inc/config.inc.php', 'w')) {\n return 'Could not create config inside of folder \"inc\". '.\n 'Check folder permissions and try again.';\n }\n \n // check the google tracking ID\n $googleTrackingID = '$googleTrackingID = ';\n if ($google === '') {\n $googleTrackingID .= 'null;';\n } else {\n $googleTrackingID .= '\\''.$google.'\\';';\n }\n \n // put in the header\n $today = getdate();\n $toWrite = '\n<?php\n/**\n * RMS Site Settings and Configuration\n *\n * Contains the site settings and configurations for the RMS. This file is\n * auto-generated and should not be edited by hand.\n *\n * @author Auto Generated via Setup Script\n * @copyright 2013 Russell Toris, Worcester Polytechnic Institute\n * @license BSD -- see LICENSE file\n * @version '.$today['month'].' '.$today['mday'].', '.$today['year'].'\n * @package inc\n * @link http://ros.org/wiki/rms\n */\n\n// database information\n$dbhost = \\''.$dbhost.'\\';\n$dbuser = \\''.$dbuser.'\\';\n$dbpass = \\''.$dbpass.'\\';\n$dbname = \\''.$dbname.'\\';\n$db = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)\nor DIE(\\'Connection has failed. Please try again later.\\');\n\n// Google Analytics tracking ID -- unset if no tracking is being used.\n'.$googleTrackingID.'\n\n// site copyright and design information\n$copyright = \\'&copy '.addslashes($copyright).'\\';\n$title = \\''.addslashes($title).'\\';\n// original site design information\n$designedBy = \\'Site design by\n <a href=\"http://users.wpi.edu/~rctoris/\">Russell Toris</a>\\';\n';\n fwrite($f, $toWrite);\n \n // close the file\n fclose($f);\n \n // everything went fine, no errors\n return false;\n }", "protected function ensure_path_exists() {\n global $CFG;\n if (!is_writable($this->path)) {\n if ($this->custompath && !$this->autocreate) {\n throw new coding_exception('File store path does not exist. It must exist and be writable by the web server.');\n }\n $createdcfg = false;\n if (!isset($CFG)) {\n // This can only happen during destruction of objects.\n // A cache is being used within a destructor, php is ending a request and $CFG has\n // already being cleaned up.\n // Rebuild $CFG with directory permissions just to complete this write.\n $CFG = $this->cfg;\n $createdcfg = true;\n }\n if (!make_writable_directory($this->path, false)) {\n throw new coding_exception('File store path does not exist and can not be created.');\n }\n if ($createdcfg) {\n // We re-created it so we'll clean it up.\n unset($CFG);\n }\n }\n return true;\n }", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "function write_config($data) {\n\n\t\t// Config path\n\t\t$template_path \t= 'config-sample.php';\n\t\t$output_path \t= 'config.php';\n\n\t\t// Open the file\n\t\t$database_file = file_get_contents($template_path);\n\n\t\t$new = str_replace(\"%DB_HOST%\",$data['db_host'],$database_file);\n\t\t$new = str_replace(\"%DB_USERNAME%\",$data['db_username'],$new);\n\t\t$new = str_replace(\"%DB_PASSWORD%\",$data['db_password'],$new);\n\t\t$new = str_replace(\"%DB_NAME%\",$data['db_name'],$new);\n\t\t$new = str_replace(\"%SITE_URL%\",$data['site_url'],$new);\n\n\t\t// Write the new database.php file\n\t\t$handle = fopen($output_path,'w+');\n\n\t\t// Chmod the file, in case the user forgot\n\t\t@chmod($output_path,0777);\n\n\t\t// Verify file permissions\n\t\tif(is_writable($output_path)) {\n\n\t\t\t// Write the file\n\t\t\tif(fwrite($handle,$new)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function Dataface_ConfigTool_createConfigTable(){\n\t$self =& Dataface_ConfigTool::getInstance();\n\tif ( !Dataface_Table::tableExists($self->configTableName, false) ){\n\t\t$sql = \"CREATE TABLE `\".$self->configTableName.\"` (\n\t\t\t\t\tconfig_id int(11) NOT NULL auto_increment primary key,\n\t\t\t\t\t`file` varchar(255) NOT NULL,\n\t\t\t\t\t`section` varchar(128),\n\t\t\t\t\t`key` varchar(128) NOT NULL,\n\t\t\t\t\t`value` text NOT NULL,\n\t\t\t\t\t`lang` varchar(2),\n\t\t\t\t\t`username` varchar(32),\n\t\t\t\t\t`priority` int(5) default 5\n\t\t\t\t\t)\";\n\t\t$res = mysql_query($sql, df_db());\n\t\tif ( !$res ){\n\t\t\ttrigger_error(mysql_error(df_db()), E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t}\n\n}", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "public function create()\n {\n $this->setContent();\n // create config file\n $file = $this->generator->formatConfigPath() .\n ModulesInterface::CONFIG_FILENAME . PhpInterface::PHP_EXT;\n $isCreated = FileManager::createFile($file, $this->sourceCode, true);\n if ($isCreated) {\n Console::out($file . PhpInterface::SPACE . Console::CREATED, Console::COLOR_GREEN);\n }\n }", "public function testNoNameWrite()\n\t{\n\t\t$this->setExpectedException( 'CCException' );\n\t\t\n\t\t$config = CCConfig::create();\n\t\t$config->write();\n\t}", "function _write_config_file($values){\n $db_server = $values['db_server'] ?: \"\";\n $db_name = $values['db_name'] ?: \"\";\n $db_user = $values['db_user'] ?: \"\";\n $db_password = $values['db_password'] ?: \"\";\n $mynautique_enabled = (isset($values['mynautique_enabled']) && $values['mynautique_enabled'] == TRUE) ? \"TRUE\" : \"FALSE\";\n $mynautique_user = isset($values['mynautique_user']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_user'] : \"\";\n $mynautique_password = isset($values['mynautique_password']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_password'] : \"\";\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $config_string = '<?php'.\"\\n\";\n $config_string .= '// Database Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// database server'.\"\\n\";\n $config_string .= '$config[\\'db_server\\'] = \"'. $db_server .'\";'.\"\\n\";\n $config_string .= '// database'.\"\\n\";\n $config_string .= '$config[\\'db_name\\'] = \"'. $db_name .'\";'.\"\\n\";\n $config_string .= '// database user'.\"\\n\";\n $config_string .= '$config[\\'db_user\\'] = \"'. $db_user .'\";'.\"\\n\";\n $config_string .= '// database user password'.\"\\n\";\n $config_string .= '$config[\\'db_password\\'] = \"'. $db_password .'\";'.\"\\n\";\n $config_string .= \"\\n\";\n\n if ( isset($values['mynautique_enabled'])) {\n $config_string .= '// MyNautique Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// myNautique enabled'.\"\\n\";\n $config_string .= '$config[\\'mynautique_enabled\\'] = '.$mynautique_enabled .';'.\"\\n\";\n $config_string .= '// myNautique user'.\"\\n\";\n $config_string .= '$config[\\'mynautique_user\\'] = \"'. $mynautique_user .'\";'.\"\\n\";\n $config_string .= '// myNautique password'.\"\\n\";\n $config_string .= '$config[\\'mynautique_password\\'] = \"'. $mynautique_password .'\";'.\"\\n\";\n }\n\n $config_string .= '?>'.\"\\n\";\n\n $bytes_written = file_put_contents (\"../config/config.php\", $config_string);\n\n if($bytes_written == FALSE) {\n return $bytes_written;\n }\n return TRUE;\n }", "public static function config_file_exists() {\n // Allow for late static binding by using static.\n $configfilepath = static::get_config_file_path();\n\n // Invalidate opcode php cache, so we get correct status of file.\n core_component::invalidate_opcode_php_cache($configfilepath);\n return file_exists($configfilepath);\n }", "private function _createNewConfigFile( $file ) {\n \\File::append($file,'');\n }", "function ConfigFile() {\n $options = array(\n 'pipe' => NULL,\n 'config' => UNISH_SANDBOX,\n 'root' => $this->root,\n 'uri' => $this->env,\n );\n $this->drush('core-status', array('Drush configuration'), $options);\n $output = trim($this->getOutput());\n $loaded = explode(' ', $output);\n $this->assertSame(array_values($this->exists), $loaded);\n }", "function config_save($cfg) {\n\t\t$h = fopen(CONFIG_PATH,\"w+\");\n\t\tforeach ($cfg as $cam) {\n\t\t\t$cam_info = $cam[\"name\"].\" : \".$cam[\"hw\"].\"\\t\".$cam[\"width\"].\"x\".$cam[\"height\"].\"\\n\";\n\t\t\tfwrite($h, $cam_info);\n\t\t\tforeach ($cam[\"gates\"] as $gate) {\n\t\t\t\t$gate_info = \"\\t\".$gate[\"name\"].\"\\t(\".$gate[\"x1\"].\",\".$gate[\"y1\"].\")\\t(\".$gate[\"x2\"].\",\".$gate[\"y2\"].\")\\n\";\n\t\t\t\tfwrite($h, $gate_info);\n\t\t\t}\n\t\t}\n\t\tfclose($h);\n\t}", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "abstract public static function createConfig(): Config;", "function CreateAndCheckConnFile($fileName) {\n\n global $SUB_DIRECTORY;\n\n if (file_exists($fileName)){\n $newFile = @fopen($fileName, 'a');\n if($newFile)\n fclose($newFile);\n else\n echo \"<b>Error</b>: Failed to open ($fileName) file: Permission denied.\";\n \n }\n else{\n if(!is_dir($SUB_DIRECTORY)){\n mkdir($SUB_DIRECTORY);\n }\n $newFile = @fopen($fileName, 'w');\n if($newFile){\n fwrite($newFile, \"<?php echo 'Devart HTTP tunnel temporary file.'; exit; ?>\\r\\n\"); // forbid viewing this file through browser\n fclose($newFile);\n }\n else\n echo \"<b>Error</b>: Failed to create ($fileName) file: Permission denied.\";\n }\n \n if(!$newFile)\n exit;\n}", "protected function recreatePackageStatesFileIfNotExisting() {}", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "private function validate_config_file( $config_path ) {\n\t\tif ( ! file_exists( $config_path ) || ! is_writable( $config_path ) ) {\n\t\t\tWP_CLI::error( \"Config file does not exist: {$config_path}\" );\n\t\t}\n\t}", "public function makeConfigFile()\n\t{\n\t\t// Make sure we are called by an expected caller\n\t\tServerTechnology::checkCaller($this->allowedCallersForMake);\n\n\t\tJLoader::import('joomla.utilities.date');\n\t\t\n\t\t$date = new Date();\n\t\t$tz = new DateTimeZone($this->container->platform->getUser()->getParam('timezone', $this->container->platform->getConfig()->get('offset', 'UTC')));\n\t\t$date->setTimezone($tz);\n\t\t$d = $date->format('Y-m-d H:i:s T', true);\n\t\t$version = ADMINTOOLS_VERSION;\n\n\t\t$webConfig = <<< XML\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tSecurity Enhanced & Highly Optimized .web.config File for Joomla!\n\tautomatically generated by Admin Tools $version on $d\n\n\tAdmin Tools is Free Software, distributed under the terms of the GNU\n\tGeneral Public License version 3 or, at your option, any later version\n\tpublished by the Free Software Foundation.\n\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t!! !!\n\t!! If you get an Internal Server Error 500 or a blank page when trying !!\n\t!! to access your site, remove this file and try tweaking its settings !!\n\t!! in the back-end of the Admin Tools component. !!\n\t!! !!\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n-->\n<configuration>\n\t<system.webServer>\n\nXML;\n\n\t\t$config = $this->loadConfiguration();\n\n\t\tif ($config->fileorder == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- File execution order -->\n\t\t<defaultDocument enabled=\"true\">\n\t\t\t<files>\n\t\t\t\t<clear />\n\t\t\t\t<add value=\"index.php\" />\n\t\t\t\t<add value=\"index.html\" />\n\t\t\t\t<add value=\"index.htm\" />\n\t\t\t</files>\n\t\t</defaultDocument>\n\nXML;\n\t\t}\n\n\t\tif ($config->nodirlists == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- No directory listings -->\n\t\t<directoryBrowse enabled=\"false\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->exptime == 1)\n\t\t{\n\t\t\t$setEtag = ($config->etagtype == 'none') ? 'setEtag=\"false\"' : '';\n\t\t\t$eTagInfo = ($config->etagtype == 'none') ? '// Send ETag: false (IIS only supports true/false for ETags)' : '';\n\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Optimal default expiration time $eTagInfo -->\n\t\t<staticContent>\n\t\t\t<clientCache cacheControlMode=\"UseMaxAge\" cacheControlMaxAge=\"01:00:00\" $setEtag />\n\t\t</staticContent>\n\nXML;\n\t\t}\n\n\t\tif ($config->autocompress == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<urlCompression doStaticCompression=\"false\" doDynamicCompression=\"true\" />\n\t\t<httpCompression>\n\t\t\t<dynamicTypes>\n\t\t\t\t<clear />\n\t\t\t\t<add mimeType=\"text/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"message/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xhtml+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/rss+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/x-javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"image/svg+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"*/*\" enabled=\"false\" />\n\t\t\t</dynamicTypes>\n\t\t</httpCompression>\n\nXML;\n\t\t}\n\n\n\t\t$webConfig .= <<< XML\n\t\t<rewrite>\n\t\t\t<rules>\n\t\t\t\t<clear />\n\nXML;\n\n\t\tif (!empty($config->hoggeragents) && ($config->nohoggers == 1))\n\t\t{\n\t\t\t$conditions = '';\n\t\t\t$patternCache = array();\n\n\t\t\tforeach ($config->hoggeragents as $agent)\n\t\t\t{\n\t\t\t\t$patternCache[] = $agent;\n\n\t\t\t\tif (count($agent) < 10)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t\t$patternCache = array();\n\t\t\t}\n\n\t\t\tif (count($patternCache))\n\t\t\t{\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n\t\t\t\t\t\t<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t}\n\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Common hacking tools and bandwidth hoggers block\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n$conditions\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden: Access is denied.\" statusDescription=\"You do not have permission to view this directory or page using the credentials that you supplied.\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tif ($config->autoroot)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<rule name=\"Redirect index.php to /\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^index\\.php$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^POST\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^[A-Z]{3,9}\\ /index\\.php\\ HTTP/\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{HTTPS}>s\" pattern=\"^(1>(s)|0>s)$\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http{C:2}://{HTTP_HOST}:{SERVER_PORT }/\" redirectType=\"Permanent\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tswitch ($config->wwwredir)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\t// If I have a rewriteBase condition, I have to append it here\n\t\t\t\t$subfolder = trim($config->rewritebase, '/') ? trim($config->rewritebase, '/').'/' : '';\n\n\t\t\t\t// non-www to www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect non-www to www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://www.{HTTP_HOST}/$subfolder{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// www to non-www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect www to non-www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.(.+)$\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://{C:1}/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!empty($config->olddomain))\n\t\t{\n\t\t\t$domains = trim($config->olddomain);\n\t\t\t$domains = explode(',', $domains);\n\t\t\t$newdomain = $config->httphost;\n\n\t\t\tforeach ($domains as $olddomain)\n\t\t\t{\n\t\t\t\t$olddomain = trim($olddomain);\n\t\t\t\t$originalOldDomain = $olddomain;\n\n\t\t\t\tif (empty($olddomain))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$olddomain = $this->escape_string_for_regex($olddomain);\n\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect old to new domain ($originalOldDomain)\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^$olddomain\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://$newdomain/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->httpsurls))\n\t\t{\n\t\t\t$webConfig .= \"<!-- Force HTTPS for certain pages -->\\n\";\n\t\t\tforeach ($config->httpsurls as $url)\n\t\t\t{\n\t\t\t\t$urlesc = '^' . $this->escape_string_for_regex($url) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Force HTTPS for $url\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$urlesc$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\">\n\t\t\t\t\t\t<add input=\"{HTTPS}\" pattern=\"0\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"https://{$config->httpshost}/$url\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Block out some common exploits\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"proc/self/environ\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"mosConfig_[a-zA-Z_]{1,21}(=|\\%3D)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_(en|de)code\\(.*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(&lt;|%3C).*script.*(>|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\n\t\tif ($config->fileinj == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"File injection protection\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=http://\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=(\\.\\.//?)+\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=/([a-z0-9_.]//?)+\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= \" <!-- Advanced server protection rules exceptions -->\\n\";\n\n\t\tif (!empty($config->exceptionfiles))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptionfiles as $file)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$file = '^' . $this->escape_string_for_regex($file) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Advanced server protection rules exception #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"$file\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->exceptiondirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptiondirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders except .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->fullaccessdirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->fullaccessdirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders, including .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif ($config->phpeaster == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"PHP Easter Egg protection\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"\\=PHP[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->backendprot == 1)\n\t\t{\n\t\t\t$bedirs = implode('|', $config->bepexdirs);\n\t\t\t$betypes = implode('|', $config->bepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/?$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login, alternate\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/index\\.(php|html?)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/($bedirs)/.*\\.($betypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - Catch all\">\n\t\t\t\t\t<match url=\"^administrator/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->frontendprot == 1)\n\t\t{\n\t\t\t$fedirs = implode('|', $config->fepexdirs);\n\t\t\t$fetypes = implode('|', $config->fepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^($fedirs)/.*\\.($fetypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Do not block includes/js\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^includes/js/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders\">\n\t\t\t\t\t<match url=\"^($fedirs)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders, part 2\">\n\t\t\t\t\t<match url=\"^(cache|includes|language|logs|log|tmp)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Forbid access to leftover Joomla! files\">\n\t\t\t\t\t<match url=\"^(configuration\\.php|CONTRIBUTING\\.md|htaccess\\.txt|joomla\\.xml|LICENSE\\.txt|phpunit\\.xml|README\\.txt|web\\.config\\.txt)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to all PHP files except index.php\">\n\t\t\t\t\t<match url=\"(.*\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(/index?\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->leftovers == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - Block access to common server configuration files\">\n\t\t\t\t\t<match url=\"^(htaccess\\.txt|configuration\\.php-dist|php\\.ini|.user\\.ini|web\\.config|web\\.config\\.txt)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Joomla! SEF Rule 1\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_encode[^(]*\\([^)]*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(>|%3C)([^s]*s)+cript.*(&lt;|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Joomla! SEF Rule 2\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{URL}\" pattern=\"^/index.php\" ignoreCase=\"true\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Rewrite\" url=\"index.php\" />\n\t\t\t\t</rule>\n\n\t\t\t</rules>\n\nXML;\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Remove IIS version signature -->\n\t\t<outboundRules>\n\t\t <rule name=\"Remove RESPONSE_Server\">\n\t\t\t<match serverVariable=\"RESPONSE_Server\" pattern=\".+\" />\n\t\t\t<action type=\"Rewrite\" value=\"MYOB\" />\n\t\t </rule>\n\t\t</outboundRules>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t</rewrite>\n\t\t<httpProtocol>\n\t\t\t<customHeaders>\n\nXML;\n\n\t\tif ($config->clickjacking == 1)\n\t\t{\n\t\t\t$webConfig .= <<< ENDCONF\n\t\t\t\t<!-- Protect against clickjacking / Forbid displaying in FRAME -->\n\t\t\t\t<add name=\"X-Frame-Options\" value=\"SAMEORIGIN\" />\n\nENDCONF;\n\t\t}\n\n\t\tif ($config->reducemimetyperisks == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reduce MIME type security risks -->\n\t\t\t\t<add name=\"X-Content-Type-Options\" value=\"nosniff\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->reflectedxss == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reflected XSS prevention -->\n\t\t\t\t<add name=\"X-XSS-Protection\" value=\"1; mode=block\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Remove IIS and PHP version signature -->\n\t\t\t\t<remove name=\"X-Powered-By\" />\n\t\t\t\t<add name=\"X-Powered-By\" value=\"MYOB\" />\n\nXML;\n\n\t\t}\n\n\t\tif ($config->notransform == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Prevent content transformation -->\n\t\t\t\t<add name=\"Cache-Control\" value=\"no-transform\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->hstsheader == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- HSTS Header - See http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -->\n\t\t\t\t<add name=\"Strict-Transport-Security\" value=\"max-age=31536000\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->cors == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Cross-Origin Resource Sharing (CORS) - See http://enable-cors.org/ -->\n\t\t\t\t<add name=\"Access-Control-Allow-Origin\" value=\"*\" />\n\t\t\t\t<add name=\"Timing-Allow-Origin\" value=\"*\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->referrerpolicy !== '-1')\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Referrer-policy -->\n\t\t\t\t<add name=\"Referrer-Policy\" value=\"{$config->referrerpolicy}\" />\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t</customHeaders>\n\t\t</httpProtocol>\n\nXML;\n\n\t\tif ($config->notracetrack == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<!-- Disable HTTP methods TRACE and TRACK (protect against XST) -->\n\t\t<security>\n\t\t\t<requestFiltering>\n\t\t\t\t<verbs>\n\t\t\t\t\t<add verb=\"TRACE\" allowed=\"false\" />\n\t\t\t\t\t<add verb=\"TRACK\" allowed=\"false\" />\n\t\t\t\t</verbs>\n\t\t\t</requestFiltering>\n\t\t</security>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t</system.webServer>\n</configuration>\n\nXML;\n\n\t\treturn $webConfig;\n\t}", "public function writeConfigFile($config)\n {\n $mysite = $this->directory . '/mysite';\n $file = $mysite . '/_config.php';\n\n if(!is_dir($mysite)) {\n $this->io->text('create ' . $mysite);\n mkdir($mysite);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $this->io->text('writing mysite/_config.php');\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$project;\\n\";\n $content .= \"\\$project = 'mysite';\\n\\n\";\n $content .= \"global \\$database;\\n\";\n $content .= \"\\$database = '{$config['database']['database']}';\\n\\n\";\n $content .= \"require_once('conf/ConfigureFromEnv.php');\\n\\n\";\n $content .= \"// Set the site locale\\n\";\n $content .= \"i18n::set_locale('{$config['locale']['locale']}');\\n\";\n\n if(isset($config['timezone'])) {\n $content .= \"date_default_timezone_set('{$config['timezone']['timezone']}');\\n\";\n }\n\n file_put_contents($file, $content);\n }", "protected function setUp()\n\t{\n\t\tMisc::$file = (dirname(__FILE__).'/files/config.php');\n\t\tfile_put_contents(Misc::$file, \"<?php return \".var_export(array(\n\t\t\t\t'trees' => array(\n\t\t\t\t\t'oak' => array(\n\t\t\t\t\t\t'fairy' => 'Tinkerbell'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t), true).';');\n\t}", "protected function createCacheFile()\n {\n $this->createCacheDir();\n\n $cacheFilePath = $this->getCacheFile();\n\n if ( ! file_exists($cacheFilePath)) {\n touch($cacheFilePath);\n }\n }", "function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }", "public function createBookConfig()\n {\n $bookConfig = $this->twig->render('config.yml.twig', [\n 'title' => $this->config->title,\n 'author' => $this->config->author,\n 'entries' => $this->entries\n ]);\n file_put_contents($this->docPath.DIRECTORY_SEPARATOR.'config.yml', $bookConfig);\n }", "function create_file($password_path, $password_file_path)\n{\n if (!file_exists($password_path)) {\n mkdir($password_path);\n }\n\n // Create file if not exist\n if (!file_exists($password_file_path)) {\n file_put_contents($password_file_path, '');\n }\n}", "protected function preflightWriteSugar()\n {\n if (!is_writable(\"config.php\")) {\n return $this->error(\"config.php is not writable!\", true);\n }\n\n if (file_exists('config_override.php') && !is_writable(\"config_override.php\")) {\n return $this->error(\"config_override.php is not writable!\", true);\n }\n return true;\n }", "function mk_file( $filename ) {\n \n // if file doesn't exist, create file and close it\n if ( ! is_file( $filename ) ) {\n fclose( fopen($filename, 'x' ) );\n return true;\n }\n\n // file already exist \n return false;\n}", "static function isConfigExists($config_name)\n\t{\n\t\t$_ret = '';\n\n\t\tif(is_file('config'.DIRECTORY_SEPARATOR.$config_name)){$_ret = 'config'.DIRECTORY_SEPARATOR.$config_name;} else {if(is_file('..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.$config_name)){$_ret = '..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.$config_name;} else {$_ret = BASEPATH.'config'.DIRECTORY_SEPARATOR.$config_name;}}\n\t\t\n\t\tSHIN_Core::log('debug', '[CORE] Try load config file: '.$_ret);\n\t\t\n\t\treturn $_ret;\n\t}", "public function createHtaccessFile() {\n $oModule = oxNew(Module::class);\n $oConfig = $this->getConfig();\n // get modules path\n $sModulesDir = $oConfig->getModulesDir();\n // get cache path\n $sCacheDir = $oConfig->getConfigParam('sCompileDir');\n // check if the default .htaccess file is in config folder\n if(file_exists($sModulesDir.$oModule->getModulePath('suaboclearcache').'/Config/.htaccess.tmp')) {\n // copy .htaccess to cache folder\n copy($sModulesDir . $oModule->getModulePath('suaboclearcache') . '/Config/.htaccess.tmp', $sCacheDir . '/.htaccess');\n }\n }", "function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}", "function has_config() {\n return true;\n }", "protected function addToConfig()\n {\n $path = $this->getConfigPath();\n $config = require($path);\n if (isset($config[$this->moduleId])) {\n if (\\Yii::$app->controller->confirm('Rewrite exist config?')) {\n $config[$this->moduleId] = $this->getConfigArray();\n echo 'Module config was rewrote' . PHP_EOL;\n }\n } else {\n $config[$this->moduleId] = $this->getConfigArray();\n }\n\n\n $this->writeArrayToFile($this->getConfigPath(), $config);\n }", "function get_config_filepath($filename)\n{\n $cfg_file = null;\n\n if (file_exists(BASE_DIR.\"/$filename\")) {\n $cfg_file = BASE_DIR.\"/$filename\";\n }\n else if (($cfg_file = getenv('BLUEBIRD_CONFIG_FILE')) === false) {\n $cfg_file = \"/etc/$filename\";\n }\n \n return $cfg_file;\n}", "private function createEnvironment() {\n\t\t$this->cache_folder = dirname(__FILE__) . \"/\" . $this->cache_folder;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($this->cache_folder))\n\t\t\tmkdir($this->cache_folder);\n\n\t\t// Get the index file path\n\t\t$indexFilepath = $this->cache_folder . \"/\" . $this->cache_index;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($indexFilepath))\n\t\t\ttouch($indexFilepath);\n\t}", "public function configFileExists(string $fileName): bool;", "private static function initCfg() {\r\n\t\tif (!self::$cfg)\r\n\t\t\tself::$cfg = new config(factory::loadCfg(__CLASS__));\r\n\t}", "public function createBlacksmithXmlTemplate()\n {\n $xml_template_dir = vfsStream::url($this->root_dir_name . '/templates/config');\n $xml_template_file = $xml_template_dir . '/blacksmith.xml';\n\n mkdir($xml_template_dir, 0755, true);\n touch($xml_template_file);\n file_put_contents($xml_template_file, 'Test Content');\n }", "function check_config_file($upgrader, $data)\n\t{\n\t\tif (!isset($data['type']) || !isset($data['action'])\n\t\t\t|| 'plugin' != $data['type'] || 'update' != $data['action']\n\t\t) {\n\t\t\t// if this is not a plugin update\n\t\t\treturn;\n\t\t}\n\n\t\tif ((isset($data['plugin']) && false === strpos($data['plugin'], 'bwp-minify/'))\n\t\t\t|| (isset($data['plugins']) && !in_array('bwp-minify/bwp-minify.php', $data['plugins']))\n\t\t) {\n\t\t\t// if BWP Minify is not being updated, individually or in bulk\n\t\t\treturn;\n\t\t}\n\n\t\t// if user is updating this plugin, try to re-generate `config.php`\n\t\t// file silently, we do not handle any error at this stage\n\t\t$result = $this->create_minify_config_file();\n\n\t\t// if friendly minify url is enabled, add rewrite rules to server\n\t\t// config file if needed\n\t\tif ('yes' == $this->options['enable_fly_min'])\n\t\t\t$this->_add_rewrite_rules();\n\t}", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "protected function getFactoryConfigurationFileLocation() {}", "private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }", "public static function makeFile($file)\n {\n if (!file_exists($file)) {\n if (!touch($file)) {\n $message = \"<p>You need to set permission for it, just add chmod\n or chown in directory config, Also you can create file {$file} for that</p>\";\n $message .= \"<code> chown -R nginx:nginx -R common/config</code>\";\n $message .= \"or#<code> chown -R apache:apache -R common/config</code>\";\n\n throw new \\Exception($message, 1);\n }\n return false;\n }\n return true;\n }", "protected function lowlevelConfigFix($name)\n {\n $distname = realpath(__DIR__ . '/../../app/config/' . $name . '.yml.dist');\n $ymlname = $this->config->getPath('config') . '/' . $name . '.yml';\n\n if (file_exists($ymlname) && !is_readable($ymlname)) {\n $error = sprintf(\n \"Couldn't read <code>%s</code>-file inside <code>%s</code>. Make sure the file exists and is readable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES)\n );\n throw new BootException($error);\n }\n\n if (!file_exists($ymlname)) {\n // Try and copy from the .dist config file\n try {\n copy($distname, $ymlname);\n } catch (\\Exception $e) {\n $message = sprintf(\n \"Couldn't create a new <code>%s</code>-file inside <code>%s</code>. Create the file manually by copying\n <code>%s</code>, and optionally make it writable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES),\n htmlspecialchars($name . '.yml.dist', ENT_QUOTES)\n );\n\n throw new BootException($message);\n }\n }\n }", "private function write($config, $only_if_present = false) {\n\n\t\t$url = parse_url(network_site_url());\n\n\t\tif (isset($url['port']) && '' != $url['port'] && 80 != $url['port']) {\n\t\t\t$config_file = WPO_CACHE_CONFIG_DIR.'/config-'.$url['host'].'-port'.$url['port'].'.php';\n\t\t} else {\n\t\t\t$config_file = WPO_CACHE_CONFIG_DIR.'/config-'.$url['host'].'.php';\n\t\t}\n\n\t\t$this->config = wp_parse_args($config, $this->get_defaults());\n\t\tif ((!$only_if_present || file_exists($config_file)) && !file_put_contents($config_file, json_encode($this->config))) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function test_temp_dir() \n{\n\tglobal $config;\n\n\treturn is_writable($config['temp_dir']);\n}", "private static function generateInstallLockFile()\n\t{\n\t\tfile_put_contents(\"core/generator/installLockFile\",\"\");\n\t}", "public function testReadWithNonExistentFile() {\n $reader = new ConfigReader($this->path);\n $reader->read('fake_values');\n }", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "private static function _createCacheFile() {\r\n $paths = array();\r\n $paths['apps'] = File::getDirectoriesNames(ZEEYE_APPS_PATH);\r\n $paths['libs'] = File::getDirectoriesNames(ZEEYE_LIBS_PATH);\r\n File::write(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH, '<?php ' . PHP_EOL . '$paths = ' . var_export($paths, true) . ';');\r\n self::$_hasCacheFile = true;\r\n }", "private static function checkPaths() {\n\t\tif(!is_dir (self::$logpath)) mkdir(self::$logpath, 0777);\n\t\tif(!is_file(self::$logfile)) file_put_contents(self::$logfile, \"<?\\n/**\\n#\\n# Tools Tool Log file\\n#\\n*/\\n\\n\");\n\t}", "public function writeEnvironmentFile($config)\n {\n $file = $this->directory . '/_ss_environment.php';\n\n if(!is_dir($this->directory)) {\n $this->io->text('create ' . $this->directory);\n mkdir($this->directory);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $host = $config['hostname'];\n $db = $config['database'];\n $admin = $config['admin'];\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$_FILE_TO_URL_MAPPING;\\n\";\n $content .= \"\\$_FILE_TO_URL_MAPPING[__DIR__] = '\".$host['hostname'].\"';\\n\\n\";\n $content .= \"define('SS_ENVIRONMENT_TYPE', 'dev');\\n\\n\";\n $content .= \"define('SS_DATABASE_CLASS', '\".$db['class'].\"');\\n\";\n $content .= \"define('SS_DATABASE_SERVER', '\".$db['server'].\"');\\n\";\n $content .= \"define('SS_DATABASE_USERNAME', '\".$db['username'].\"');\\n\";\n $content .= \"define('SS_DATABASE_PASSWORD', '\".$db['password'].\"');\\n\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_USERNAME', '\".$admin['username'].\"');\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_PASSWORD', '\".$admin['password'].\"');\\n\\n\";\n\n $this->io->text('write config to _ss_environment.php');\n file_put_contents($file, $content);\n }", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }", "protected function createFile() {}", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "private function createConfigIni($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n $source = conf::pathBase() . \"/config/config.ini\"; \n $ary = conf::getIniFileArray($source, true);\n $ary = $this->iniArrayPrepare($ary); \n $config_str = conf::arrayToIniFile($ary); \n file_put_contents($profile_dir . \"/config.ini-dist\", $config_str);\n }", "public function saveConfigFile($filename)\n {\n $config = Yaml::dump($this->config);\n if (false === ConfigLoader::createDir(dirname($filename)) || false === @file_put_contents($filename, $config)) {\n throw new LoaderException('Can not save configuration to ' . $filename);\n }\n return true;\n }", "public function checkIfEssentialConfigurationExists() {}", "public function getDefaultConfigurationFileLocation() {}", "private function mustCreateFolder(){\n }", "function configurationApply(){\n\t\t// this create a \"config/files/config-XXX.conf\" whith the maker found\n\t\t$makers = glob($_SERVER['DOCUMENT_ROOT'].'/config/makers/make-config-*.php', GLOB_BRACE);\n\t\t\n\t\t// get an unique ID for this apply action\n\t\t$actionId = uniqid();\n\n\t\t// run all makers in the directory\n\t\tforeach($makers as $maker) {\n\t\t\t$pat[0]= 'make-config-';\n\t\t\t$pat[1]= '.php';\n\t\t\t$remp[0]= '';\n\t\t\t$remp[1]= '';\n\t\t\t// get the single maker name\n\t\t\t$maker_name = basename($maker);\n\t\t\t$maker_name = str_replace($pat,$remp,$maker_name);\n\t\t\t// set the temp conf file for the maker\n\t\t\tglobal $config_done;\n\t\t\t$config_done = $_SERVER['DOCUMENT_ROOT'].'/config/files/config-'.$maker_name.'.conf';\n\t\t\tglobal $config_generated;\n\t\t\tglobal $config_user_do;\n\t\t\tglobal $config_syst;\n\t\t\t// run the maker\n\t\t\tinclude($maker);\n\t\t\t// create the config temp file\n\t\t\tif($file = @fopen($config_done, 'w')) {\n\t\t\t\tfwrite($file,$config_generated);\n\t\t\t\tfclose($file);\n\t\t\t\t// add the task to the \"podServerSystem\" queue (copy files to their system path to apply configuration)\n\t\t\t\t$this->podServerSystem->addTask($config_user_do,'cp ' . $config_done . ' ' . $config_syst,TASK_COPY_FILE_CONFIG,$actionId);\n\n\t\t\t\t/* NOTE : you can add all makers you want by adding a file \"config/makers/make-config-YOURMAKERNAME.php\" \n\t\t\t\t In your maker file, you have to correctly configure \n\t\t\t\t\t\"$config_syst\" : the conf file path in your system\n\t\t\t\t\t\"$config_user_do\" : the user that copy the configuration system file (for \"podServerSystem\" tasks queue)\n\t\t\t\t And feed correctly the configuration \n\t\t\t\t\t\"$config_generated\" : the content of the conf. file to write to the system\n\t\t\t\t This action will execute it automatically when \"apply\" action will be used\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t\t\n\t\t// copy uploaded files items of the global configuration to their system directory\n\t\tforeach ($this->itemsConfiguration as $item){\n\t\t\tif ($item->type == 'file') {\n\t\t\t\t$file_uploads = $_SERVER['DOCUMENT_ROOT'].'/uploads/' . $item->name;\n\t\t\t\t// if the directory does not exists, create it by adding a \"mkdir\" task for the system user\n\t\t\t\tif (!file_exists($item->values)) {\n\t\t\t\t\t$this->podServerSystem->addTask($item->value,'mkdir ' . $item->values,TASK_MKDIR_AUTO);\n\t\t\t\t}\n\t\t\t\t$file_system = $item->values . $item->name;\n\t\t\t\t// adding a \"cp\" task for the system user\t\t\t\n\t\t\t\tif ($item->values != '' && file_exists($file_uploads) ) {\n\t\t\t\t\t$this->podServerSystem->addTask($item->value,'cp ' . $file_uploads . ' ' . $file_system,TASK_COPY_FILE_ITEM,$actionId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function prepareDatabase()\n {\n // If SQLite database does not exist, create it\n if ($this->config->database['connection'] === 'sqlite') {\n $path = $this->config->database['database'];\n if ( ! $this->fileExists($path) && is_dir(dirname($path))) {\n $this->write(\"Creating $path ...\");\n touch($path);\n }\n }\n }", "private function createAuthFile()\r\n {\r\n $directory = $this->filesystem->getDirectoryWrite(DirectoryList::COMPOSER_HOME);\r\n\r\n if (!$directory->isExist(PackagesAuth::PATH_TO_AUTH_FILE)) {\r\n try {\r\n $directory->writeFile(PackagesAuth::PATH_TO_AUTH_FILE, '{}');\r\n } catch (Exception $e) {\r\n throw new LocalizedException(__(\r\n 'Error in writing Auth file %1. Please check permissions for writing.',\r\n $directory->getAbsolutePath(PackagesAuth::PATH_TO_AUTH_FILE)\r\n ));\r\n }\r\n }\r\n }", "public function generate()\r\n {\r\n if (!file_exists(\\Forge\\Config::path(\"app\") . \"/\" . $this->app_name . \"/\" . $this->mod_name)) {\r\n //folder does not exists, so ok to proceed\r\n $this->generateFolderStructure();\r\n $this->generateDefaultFiles();\r\n\r\n return true;\r\n } else {\r\n print('Module has already been build.' . PHP_EOL);\r\n\r\n return false;\r\n }\r\n }", "protected function createCMSConfiguration ()\n {\n $cms_config = array();\n if (file_exists(WB_PATH . '/kit2/config/cms.json')) {\n if (null == ($cms_config = (array) json_decode(file_get_contents(WB_PATH . '/kit2/config/cms.json', true))))\n throw new \\Exception(\"Can't read the CMS configuration file of the Framework!\");\n }\n\n $cms_config['CMS_URL'] = WB_URL;\n $cms_config['CMS_MEDIA_PATH'] = WB_PATH . MEDIA_DIRECTORY;\n $cms_config['CMS_MEDIA_URL'] = WB_URL . MEDIA_DIRECTORY;\n $cms_config['CMS_TYPE'] = self::$cms_type;\n $cms_config['CMS_VERSION'] = self::$cms_version;\n $cms_config['OUTPUT_FILTER']['METHOD'] = 'STANDARD';\n\n if (! file_put_contents(WB_PATH . '/kit2/config/cms.json', $this->JSONFormat->format($cms_config)))\n throw new \\Exception('Can\\'t write the configuration file for the CMS!');\n return true;\n }", "public function createLocalConfigurationFromFactoryConfiguration() {}", "public static function read_config()\n\t{\n\t\t$config = realpath(dirname(__FILE__) . '/../../config_local.php');\n\t\t$hosted_config = Utils::get_hosted_path() . '/config_local.php';\n\n\t\tif (is_readable($config)) \n\t\t{\n\t\t\trequire($config);\n\t\t\t$is_hosted = FALSE;\n\t\t\t\n\t\t// maybe we are hosted\n\t\t} elseif (file_exists($hosted_config) )\n\t\t{\n\t\t\trequire($hosted_config);\n\t\t\trequire_once(Utils::get_hosted_path() . '/htdocs/system/system.php');\n\t\t\t$is_hosted = TRUE;\n\n\t\t// lets try the normal config location\n\t\t} elseif (is_readable('config.php')) \n\t\t{\n\t\t\trequire('config.php');\n\t\t\t$is_hosted = FALSE;\n\n\t\t// redirect\n\t\t} else \n\t\t{\n\t\t\theader('Location: install/index.php');\n\t\t\t$is_hosted = FALSE;\n\t\t}\n\n\t\tdefine('IS_HOSTED', $is_hosted);\n\t}", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "protected function _create_cache_dir()\n {\n if( ! file_exists($this->config['cache_dir']))\n {\n try\n {\n mkdir($this->config['cache_dir'], 0755, TRUE);\n }\n catch(Exception $e)\n {\n throw new Kohana_Exception($e);\n }\n }\n\n // Set the cache dir\n $this->cache_dir = $this->config['cache_dir'];\n }", "private function verifyPatch(){\n if(!file_exists('json'))\n return mkdir(\"json\");\n else\n return true;\n }", "public function write_db_config() {\r\n $template = file_get_contents(MODULES . 'install/assets/config/database.php');\r\n\r\n $replace = array(\r\n '__HOSTNAME__' => $this->hostname,\r\n '__USERNAME__' => $this->username,\r\n '__PASSWORD__' => $this->password,\r\n '__DATABASE__' => $this->database,\r\n '__PORT__' => $this->port,\r\n '__DRIVER__' => $this->driver,\r\n '__PREFIX__' => $this->prefix,\r\n );\r\n\r\n $template = str_replace(array_keys($replace), $replace, $template);\r\n\r\n $handle = @fopen(APPPATH . 'config/database.php', 'w+');\r\n\r\n if ($handle !== FALSE) {\r\n $response = @fwrite($handle, $template);\r\n fclose($handle);\r\n\r\n if ($response) {\r\n return TRUE;\r\n }\r\n }\r\n\r\n throw new Exception('Failed to write to ' . APPPATH . 'config/database.php');\r\n }" ]
[ "0.68288004", "0.6795925", "0.6556549", "0.64912236", "0.64732426", "0.64545083", "0.6379413", "0.6316263", "0.62382543", "0.62193733", "0.61433065", "0.60766554", "0.60611635", "0.6059164", "0.6027296", "0.60121304", "0.59842795", "0.59118146", "0.5885892", "0.5874434", "0.5861598", "0.58594453", "0.5839903", "0.58103156", "0.5797395", "0.57842803", "0.5767194", "0.57597196", "0.57326525", "0.57242656", "0.5695254", "0.5679256", "0.5651117", "0.56335795", "0.5607772", "0.5599261", "0.5590895", "0.557024", "0.55659986", "0.55549055", "0.5554355", "0.55332774", "0.5522924", "0.55089283", "0.5481688", "0.54774964", "0.54727036", "0.5463773", "0.5459317", "0.5445707", "0.5440224", "0.5439204", "0.54306954", "0.54180956", "0.5406248", "0.54038185", "0.5401466", "0.53918475", "0.53897154", "0.5383551", "0.5380076", "0.53665847", "0.53608537", "0.53560907", "0.5352738", "0.5349341", "0.5329863", "0.5327694", "0.5325469", "0.53023577", "0.5289718", "0.5284566", "0.528422", "0.5277076", "0.5251744", "0.52332854", "0.5232525", "0.5212641", "0.52110225", "0.52075726", "0.5204552", "0.520371", "0.5194298", "0.5183826", "0.5179877", "0.51791245", "0.5177389", "0.51723766", "0.5162309", "0.5157581", "0.51539016", "0.5150005", "0.5148447", "0.5147785", "0.51455015", "0.5142684", "0.51385874", "0.5115255", "0.51031506", "0.5097582" ]
0.6995747
0
Get config from cfg file
function recurringdowntime_get_cfg() { recurringdowntime_check_cfg(); $cfg = file_get_contents(RECURRINGDOWNTIME_CFG); return recurringdowntime_cfg_to_array($cfg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public static function getConfig() {\n return parse_ini_file(__DIR__ . '/config.ini');\n }", "public function getConfig()\r\n {\r\n $configFile = GeneralUtility::getFileAbsFileName(\"EXT:centauri_core/Configuration/core.php\");\r\n return (include $configFile);\r\n }", "abstract public function getConfig();", "public function getConfig() {\n if ($this->config) {\n return $this->config;\n }\n \n $this->config = $this->parse($this->configFile);\n return $this->config;\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "function getConfig($file) {\n echo $config;\n $config = parse_ini_file($file, true);\n if (! $config) {\n fatal(\"Configuration file missing or incorrect.\"); \n }\n return $config;\n }", "abstract protected function getConfig();", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "protected function config($name) {\n return $this->configFactory->get($name);\n }", "function getConfig($file) {\n\t\t$config\t= parse_ini_file($file, true);\n\t\tif (! $config) {\n\t\t\t fatal(\"Configuration file missing or incorrect.\"); \n\t\t}\n\t return $config;\n\t}", "public function getConfig()\n { // Try the template specific path first\n $fname = APPLICATION_PATH.$this->_paths['pkg_template'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // Next try the domain common path\n $fname = APPLICATION_PATH.$this->_paths['pkg_common'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // Finally, try the app common path\n $fname = APPLICATION_PATH.$this->_paths['app_common'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // If none of these files were found, return false to indicate failure\n if( !$this->_config) throw new CException('Configuration not found');\n }", "public function getConfig()\n {\n return $this->_getConfigFile();\n }", "function getConfig($file) {\n $config = parse_ini_file($file, true);\n if (! $config) {\n echo \"Fatal: Configuration file missing or incorrect.\\n\";\n exit(1);\n }\n return $config;\n }", "public function getConfigFilePath();", "protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }", "public function getConfig() {}", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }", "function getConfig() {\n $config = parse_ini_file(\"config/config.ini\", true);\n\n return $config;\n}", "public function getConfig()\r\n {\r\n return $this->_file;\r\n }", "public function getConfig()\n {\n return parse_ini_file(__DIR__ . \"/../php.ini\", true);\n }", "public function getConfig()\n\t{\n\t\treturn include __DIR__ . '/../../../config/module.config.php';\n\t}", "protected function getConfigFromFile()\n {\n if (! file_exists(CONFIG_FILE)) {\n throw new RuntimeException('File ' . CONFIG_FILE . ' does not exist');\n }\n\n return include CONFIG_FILE;\n }", "public static function read()\n {\n return self::$config;\n }", "public function getConfig(): Configuration;", "public function getConfigFile();", "public static function getConfiguration();", "public function getConfig(){\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return ModuleConfigLoader::load(__DIR__ . '/../config');\n }", "public function getConfig(){\r\n return include __DIR__ . '/config/module.config.php';\r\n }", "protected function _getConfig()\n {\n $configFile = Mtool_Magento::getHomeDir() . DIRECTORY_SEPARATOR . self::CONFIG_FILE_NAME;\n\n try {\n $iniConfig = new Zend_Config_Ini($configFile);\n } catch (Zend_Config_Exception $e) {\n $iniConfig = $this->_createConfig($configFile);\n }\n\n if ((is_null($iniConfig->projects))\n || !($iniConfig->projects instanceof Zend_Config)\n ) {\n // no 'projects' in the config file\n $iniConfig = $this->_createConfig($configFile);\n } else {\n $projectConfigId = null;\n // find id of current project\n foreach ($iniConfig->projects->toArray() as $key => $_projectConfig) {\n if (is_array($_projectConfig)) {\n if ((isset($_projectConfig['path']))\n && ($_projectConfig['path'] == Mtool_Magento::getRoot())\n ) {\n $projectConfigId = $key;\n break;\n }\n }\n }\n\n if (!is_null($projectConfigId)) {\n $configs = $iniConfig->projects->{$projectConfigId}->toArray();\n } else {\n // no config for the current project\n $iniConfig = $this->_createConfig($configFile);\n }\n }\n if (!isset($configs['license_path'])) {\n $configs['license_path'] = '';\n }\n list($configs['license'], $configs['license_short']) = $this->_getLicenseStrings($configs['license_path']);\n return $configs;\n }", "static function config($path, $def = null) {\n\t\t// Load config if needed\n\t\tif (is_null(self::$config))\n\t\t\tself::loadConfig();\n\t\t// Split path\n\t\t$parts = explode(\".\", $path);\n\t\t$config = self::$config;\n\t\t// Explore the config to find the requested value\n\t\tforeach ($parts as $part) {\n\t\t\tif (isset($config->$part))\n\t\t\t\t$config = $config->$part;\n\t\t\telse\n\t\t\t\treturn $def;\n\t\t}\n\t\treturn $config;\n\t}", "function get_config($filename)\n{\n\t$config = parse_ini_file($filename);\n\n\tif ($config === FALSE) {\n\t\tthrow new Exception(\"could not read configuration from '{$filename}'\");\n\t}\n\n\tif (!isset($config['url'])) {\n\t\tthrow new Exception(\"url not found in '{$filename}'\");\n\t}\n\tif (!isset($config['username'])) {\n\t\tthrow new Exception(\"username not found in '{$filename}'\");\n\t}\n\tif (!isset($config['password'])) {\n\t\tthrow new Exception(\"password not found in '{$filename}'\");\n\t}\n\tif (!isset($config['source'])) {\n\t\tthrow new Exception(\"source project not found in '{$filename}'\");\n\t}\n\tif (!isset($config['destination'])) {\n\t\tthrow new Exception(\"destination project not found in '{$filename}'\");\n\t}\n\n\treturn $config;\n}", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "public function getCfg()\n {\n return $this->get(self::_CFG);\n }", "public function getConfig() {\r\n\r\n\t}", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function config(): Config;", "function getConfiguration() ;", "public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}", "public static function getConfig()\n {\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "private function get_config() {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $this->config = get_config('tool_coursebank');\n\n return $this->config;\n }", "public function getConfiguration();", "public function getConfiguration();", "public function getConfiguration();", "public function getConfig() {\n $configFiles = [\n 4 => 'laravel-haml::config',\n 5 => 'laravel-haml',\n 6 => 'haml'\n ];\n\n\t\t$key = $configFiles[$this->version()];\n\t\treturn $this->app->make('config')->get($key);\n\t}", "public function getConfig($name)\n {\n return $this->config->get(self::CONFIG_PATH.'.'.$name);\n }", "function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}", "public function getConfigFile()\n\t{\n\t\treturn $this->configfile;\n\t}", "function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\n\t\tswitch(PPI_Helper::getFileExtension($this->_options['configFile'])) {\n\t\t\tcase 'ini':\n\t\t\t\treturn new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_options['configFile'], true, INI_SCANNER_RAW), $this->_options['configBlock']);\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "abstract protected function loadConfig();", "public static function config();", "public function getConfiguration() {}", "public function getConfiguration() {}", "public function get_config( $config ) {\n\n\t\t\t$file = sprintf( 'config/%s.php', $config );\n\t\t\t$config_template = locate_template( array( $file ) );\n\n\t\t\tif ( $config_template ) {\n\t\t\t\treturn include $config_template;\n\t\t\t}\n\t\t}", "public function loadConfig()\n {\n return parse_ini_file(\n DIR_ROOT . '/config.ini', False\n );\n }", "public static function load_app_conf() {\n $app_config = include(CONFIGPATH.'app.conf.php');\n return $app_config;\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }", "function config(string $name)\n {\n return container_object(ConfigInterface::class)->get($name);\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public static function getConfig()\n {\n return new Config(self::$config);\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "protected function getConfigFile()\n {\n return realpath($this->getBasePath() . \"/config/{$this->package}.php\");\n }", "public function getConfig()\n {\n return include __DIR__ . '/src/module.config.php';\n }", "public static function load_db_conf(){\n $db_config = include(CONFIGPATH.'db.conf.php');\n return $db_config;\n }", "public static function getConf(){\n $conf = Configuration::first();\n return $conf;\n }", "protected function getConfig() {\n\t\t\t$handle = fopen($this->configFile, 'r');\n\t\t\t$contents = fread($handle, filesize($this->configFile));\n\t\t\tfclose($handle);\n\n\t\t\t$this->config = json_decode($contents);\n\n\t\t\tforeach ($this->configMap as $key => $value) {\n\t\t\t\tif ($handle && !array_key_exists($key, $this->config)) {\n\t\t\t\t\tthrow new Exception('Missing key: ' . $key);\n\t\t\t\t}\n\n\t\t\t\tif (empty($this->config->{$key})) {\n\t\t\t\t\t/*\n\t\t\t\t\t\tIf the config isn't found we'll check if an environment\n\t\t\t\t\t\tvariable exists, this is largely Heroku specific, and offers\n\t\t\t\t\t\tus a nice way to avoid deploying any config.\n\n\t\t\t\t\t\tIf time were no issue this handling would be more loosely\n\t\t\t\t\t\tcoupled to this class.\n\t\t\t\t\t*/\n\t\t\t\t\t$env_value = getenv($value['env']);\n\n\t\t\t\t\tif (empty($env_value)) {\n\t\t\t\t\t\tthrow new Exception('Missing value: ' . $key);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->{$value['prop']} = !empty($env_value) ? $env_value : $this->config->{$key};\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "public function getServiceConfig()\n {\n return include __DIR__ . '/config/service.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "public function getConfig($path) {\n return Config::getInstance()->getElementByPath($path);\n }", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function getConfig() : \\codename\\core\\config {\r\n return $this->config;\r\n }", "function horsaw_config( $name ) {\n\t$name = explode( '.', $name );\n\n\t$config_file_path = get_template_directory() . '/config/' . $name[0] . '.php';\n\t$config_contents = require $config_file_path;\n\n\tif ( ! isset( $config_contents[ $name[1] ] ) ) {\n\t\treturn false;\n\t}\n\n\treturn $config_contents[ $name[1] ];\n}", "public function getConfig()\n {\n return include __DIR__ . '/../config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/../config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/../config/module.config.php';\n }", "public function getConfig()\n {\n return include __DIR__ . '/../config/module.config.php';\n }", "function cfg($param = null) {\n static $config;\n if (!$config) {\n $config = new \\Core\\ConfigStore('app');\n if ($config->environment) {\n $defaults = $config;\n $config = new \\Core\\ConfigStore($config->environment);\n $config->setDefaults($defaults);\n }\n }\n if ($param) {\n return $config->get($param);\n }\n return $config;\n}", "public function getConfig()\n {\n return $this->get('config');\n }", "public function getConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "private function config()\n {\n return $this->app['config'];\n }", "private function config()\n {\n return $this->app['config'];\n }", "public static function getCfg($key) {\r\n\t\treturn self::$cfg->get($key);\r\n\t}", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }" ]
[ "0.72819453", "0.72819453", "0.7159724", "0.7155", "0.7139405", "0.71316093", "0.7127597", "0.7127073", "0.7127073", "0.7127073", "0.7127073", "0.7127073", "0.7127073", "0.7127073", "0.7127073", "0.7123976", "0.71106136", "0.7102897", "0.70881253", "0.7046577", "0.70100635", "0.69940436", "0.6981365", "0.69530445", "0.6947331", "0.6924684", "0.6897676", "0.6875419", "0.68739164", "0.68588513", "0.6826629", "0.68139416", "0.6796588", "0.6795622", "0.67889225", "0.67886037", "0.6772773", "0.6729977", "0.6725902", "0.67234343", "0.67043823", "0.66866285", "0.66840607", "0.6671675", "0.66477406", "0.66194856", "0.66125816", "0.6607689", "0.6601659", "0.65983784", "0.6591973", "0.6581405", "0.6569539", "0.65682656", "0.65682656", "0.65682656", "0.6558497", "0.65536493", "0.65479505", "0.65350187", "0.6531371", "0.65229994", "0.65198344", "0.6504621", "0.6503368", "0.6498291", "0.64966756", "0.64902556", "0.6482346", "0.6480152", "0.6479414", "0.64712006", "0.6458113", "0.6457912", "0.64542705", "0.644939", "0.6446143", "0.6441982", "0.6437612", "0.6437576", "0.6437576", "0.6437576", "0.6437576", "0.6437576", "0.6437576", "0.6437576", "0.6435432", "0.64266366", "0.64256", "0.6423417", "0.64175284", "0.64175284", "0.64175284", "0.64175284", "0.64109457", "0.6409569", "0.6407531", "0.640343", "0.640343", "0.6392808", "0.63917077" ]
0.0
-1
Get downtime schedule for specified host
function recurringdowntime_get_host_cfg($host = false) { $cfg = recurringdowntime_get_cfg(); $ret = array(); foreach ($cfg as $sid => $schedule) { if (array_key_exists('schedule_type', $schedule)) { if ($schedule["schedule_type"] == "hostgroup") { continue; } if ($schedule["schedule_type"] == "servicegroup") { continue; } if ($schedule["schedule_type"] == "service") { continue; } } if ($host && !(strtolower($schedule["host_name"]) == strtolower($host))) { continue; } if (array_key_exists('host_name', $schedule)) { if (is_authorized_for_host(0, $schedule["host_name"])) { $ret[$sid] = $schedule; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_service_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"host\") {\n continue;\n }\n }\n\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n\n if (array_key_exists('host_name', $schedule)) {\n if (array_key_exists('service_description', $schedule)) {\n if ($schedule[\"service_description\"] != '*') {\n $search_str = $schedule[\"service_description\"];\n\n if (strstr($schedule[\"service_description\"], \"*\")) {\n $search_str = \"lk:\" . str_replace(\"*\", \"%\", $schedule[\"service_description\"]);\n }\n if (!is_authorized_for_service(0, $schedule[\"host_name\"], $search_str)) {\n continue;\n }\n }\n }\n\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_hostgroup_cfg($hostgroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"hostgroup\") {\n continue;\n }\n }\n if ($hostgroup && !(strtolower($schedule[\"hostgroup_name\"]) == strtolower($hostgroup))) {\n continue;\n }\n if (array_key_exists('hostgroup_name', $schedule)) {\n if (is_authorized_for_hostgroup(0, $schedule[\"hostgroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "public function findHostDowntimesForAdminUser(): array;", "public function findHostDowntimesForNonAdminUser(): array;", "function recurringdowntime_show_downtime()\n{\n global $request;\n\n do_page_start(array(\"page_title\" => _(\"Recurring Downtime\")), true);\n\n if (isset($request[\"host\"])) {\n $host_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n $service_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n if (is_authorized_for_host(0, $request[\"host\"])) {\n $host_data = recurringdowntime_get_host_cfg($request[\"host\"]);\n $service_data = recurringdowntime_get_service_cfg($request[\"host\"]);\n }\n } elseif (isset($request[\"hostgroup\"])) {\n $hostgroup_tbl_header = _(\"Recurring Downtime for Hostgroup: \") . $request[\"hostgroup\"];\n if (is_authorized_for_hostgroup(0, $request[\"hostgroup\"])) {\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($request[\"hostgroup\"]);\n }\n } elseif (isset($request[\"servicegroup\"])) {\n $servicegroup_tbl_header = _(\"Recurring Downtime for Servicegroup: \") . $request[\"servicegroup\"];\n if (is_authorized_for_servicegroup(0, $request[\"servicegroup\"])) {\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($request[\"servicegroup\"]);\n }\n }\n\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n /*\n $host_tbl_header = \"Recurring Downtime for All Hosts\";\n $hostgroup_tbl_header = \"Recurring Downtime for All Hostgroups\";\n $servicegroup_tbl_header = \"Recurring Downtime for All Servicegroups\";\n */\n $host_tbl_header = _(\"Host Schedules\");\n $service_tbl_header = _(\"Service Schedules\");\n $hostgroup_tbl_header = _(\"Hostgroup Schedules\");\n $servicegroup_tbl_header = _(\"Servicegroup Schedules\");\n $host_data = recurringdowntime_get_host_cfg($host = false);\n $service_data = recurringdowntime_get_service_cfg($host = false);\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($hostgroup = false);\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($servicegroup = false);\n $showall = true;\n }\n\n ?>\n <h1><?php echo _(\"Recurring Downtime\"); ?></h1>\n\n <?php echo _(\"Scheduled downtime definitions that are designed to repeat (recur) at set intervals are shown below. The next schedule for each host/service are added to the monitoring engine when the cron runs at the top of the hour.\"); ?>\n\n <?php\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n ?>\n <p>\n <?php } ?>\n\n <script type=\"text/javascript\">\n function do_delete_sid(sid) {\n input = confirm('<?php echo _(\"Are you sure you wish to delete this downtime schedule?\"); ?>');\n if (input == true) {\n window.location.href = 'recurringdowntime.php?mode=delete&sid=' + sid + '&nsp=<?php echo get_nagios_session_protector_id();?>';\n }\n }\n </script>\n\n <?php\n if ($showall) {\n ?>\n <script type=\"text/javascript\">\n $(document).ready(function () {\n $(\"#tabs\").tabs().show();\n });\n </script>\n\n <div id=\"tabs\" class=\"hide\">\n <ul>\n <li><a href=\"#host-tab\"><?php echo _(\"Hosts\"); ?></a></li>\n <li><a href=\"#service-tab\"><?php echo _(\"Services\"); ?></a></li>\n <li><a href=\"#hostgroup-tab\"><?php echo _(\"Hostgroups\"); ?></a></li>\n <li><a href=\"#servicegroup-tab\"><?php echo _(\"Servicegroups\"); ?></a></li>\n </ul>\n <?php\n }\n ?>\n\n <?php if (!empty($_GET[\"host\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n\n // hosts tab\n if ($showall) {\n echo \"<div id='host-tab'>\";\n }\n ?>\n\n <h4 <?php if ($host) { echo 'style=\"margin-top: 20px;\"'; } ?>><?php echo $host_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n }\n ?>\n\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Months\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Handle Child Hosts\"); ?></th>\n <th class=\"center\" style=\"width: 80px;\"><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($host_data) {\n $i = 0;\n\n $host_names = array();\n foreach ($host_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n }\n array_multisort($host_names, SORT_ASC, $host_data);\n\n foreach ($host_data as $sid => $schedule) {\n if (empty($schedule['childoptions'])) {\n $schedule['childoptions'] = 0;\n }\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? _(\"Yes\") : _(\"No\"); ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"months_of_year\"]) {\n echo $schedule[\"months_of_year\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"childoptions\"] == 0) {\n echo _(\"No\");\n } elseif ($schedule[\"childoptions\"] == 1) {\n echo _(\"Yes, triggered\");\n } elseif ($schedule[\"childoptions\"] == 2) {\n echo _(\"Yes, non-triggered\");\n } ?></td>\n <td class=\"center\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>&nbsp;\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"10\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if host_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end host tab?>\n\n<?php } // end if host or showall\n\nif (!empty($_GET[\"service\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n $service = grab_request_var('service', '');\n\n if ($showall) {\n echo \"<div id='service-tab'>\";\n }\n ?>\n\n <h4><?php echo $service_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Service\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($service_data) {\n $i = 0;\n\n $host_names = array();\n $service_names = array();\n foreach ($service_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n $service_names[$k] = $data['service_description'];\n }\n\n array_multisort($host_names, SORT_ASC, $service_names, SORT_ASC, $service_data);\n\n foreach ($service_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo $schedule[\"service_description\"]; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php'. \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php }?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"9\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host/service recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if service_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end service tab?>\n\n<?php } // end if service or showall\n\nif (!empty($_GET[\"hostgroup\"]) || $showall) {\n\n $hostgroup = grab_request_var('hostgroup', '');\n\n if ($showall) {\n echo \"<div id='hostgroup-tab'>\";\n }\n ?>\n\n <h4><?php echo $hostgroup_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($hostgroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&hostgroup_name=<?php echo $hostgroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this hostgroup\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Hostgroup\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n\n <?php\n\n if ($hostgroup_data) {\n $i = 0;\n\n $hostgroup_names = array();\n foreach ($hostgroup_data as $k => $data) {\n $hostgroup_names[$k] = $data['hostgroup_name'];\n }\n\n array_multisort($hostgroup_names, SORT_ASC, $hostgroup_data);\n\n foreach ($hostgroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"hostgroup_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? \"Yes\" : \"No\"; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n <?php } else { ?>\n <tr>\n <td colspan=\"8\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no hostgroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if hostrgroup_data ?>\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end hostgroup tab?>\n\n<?php } // end if hostgroup or showall\n\nif (!empty($_GET[\"servicegroup\"]) || $showall) {\n\n $servicegroup = grab_request_var('servicegroup', '');\n\n if ($showall) {\n echo \"<div id='servicegroup-tab'>\";\n }\n ?>\n <h4><?php echo $servicegroup_tbl_header; ?></h4>\n <?php\n if (!is_readonly_user(0)) {\n if ($servicegroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&servicegroup_name=<?php echo $servicegroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this servicegroup\"); ?></a>\n </div>\n <?php } else { ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?>\n </a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Servicegroup\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n if ($servicegroup_data) {\n $i = 0;\n\n $servicegroup_names = array();\n foreach ($servicegroup_data as $k => $data) {\n $servicegroup_names[$k] = $data['servicegroup_name'];\n }\n\n array_multisort($servicegroup_names, SORT_ASC, $servicegroup_data);\n\n foreach ($servicegroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"servicegroup_name\"]; ?></td>\n <td><?php echo $schedule[\"comment\"]; ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"recurringdowntime.php?mode=edit&sid=<?php echo $sid; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"7\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no servicegroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if servicegroup_data ?>\n\n\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end servicegroup tab?>\n\n <?php } // end if servicegroup or showall ?>\n\n <?php\n if ($showall) { // end of tabs container\n ?>\n </div>\n <?php\n }\n do_page_end(true);\n}", "public function findDowntimes(int $hostId, int $serviceId): array;", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function testSetGet_schedule_where_time_of_day_has_past() {\n\t\t//The blog time is 10 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '+10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Next week in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+7 days', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Next week in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+7 days', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function schedule(Schedule $schedule){\n\n\t\t$schedule->command('CheckChallengeDeadlines:expirations')->dailyAt('04:00')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [3])->weekly()->mondays()->at('04:30')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [4])->weekly()->thursdays()->at('04:30')->timezone('America/New_York');\n\n\t}", "public function testSetGet_schedule_where_time_of_day_has_not_past() {\n\t\t//The blog time is 2 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$day = date( 'H', $blog_time ) + 1;\n\t\tif ( $day < 10 ) {\n\t\t\t$day = \"0$day\";\n\t\t}\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), $day . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', $blog_time ) . ' ' . $day . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 hour', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['emailchef']['fields']['emailchef_cron_frequency']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_frequency']['value'] :\n EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['emailchef']['fields']['emailchef_cron_offset']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_offset']['value'] :\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log('eMailChef: Could not find cron frequency in valid list. Defaulted to hourly', Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "function get_schedule($usrid){\r\n\t\r\n}", "public function getBackupSchedule()\n {\n return $this->backup_schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n // Da ka Event\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/PunchEvent';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('9:13');\n // Check sprint progress.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/amChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('10:00');\n // Verify completed tasks\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/doneIssueChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('17:30');\n // volunteer for unassigned task.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/todoChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n })->weekdays()\n ->everyFiveMinutes()\n ->timezone('Asia/Shanghai')\n ->between('9:50', '22:00');\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function findDowntimesByServiceForAdminUser(int $hostId, int $serviceId): array;", "public function getScheduleTime(){return $this->time_of_day;}", "public function testSetGet_schedule_where_time_of_day_has_past_and_no_day_supplied() {\n\t\t//The blog time is -4 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( null, date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+1 day', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 day', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function schedule(Schedule $schedule)\n {\n // $configuracao = DB::table('configuracao')->first();\n\n // if($configuracao->frequencia == 'Diária')\n // {\n // $schedule->call(function (){\n // Ente::importar();\n // HistoricoDeAcesso::importar();\n // })->dailyAt($configuracao->horario); \n // }\n // else\n // {\n // $schedule->call(function (){\n // Ente::importar();\n // HistoricoDeAcesso::importar();\n // })->weekly()->fridays()->at($configuracao->horario); \n // }\n \n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')->hourly();\n }", "public function schedule(): Schedule\n {\n return $this->schedule;\n }", "public function findDowntimesByServiceForNonAdminUser(int $hostId, int $serviceId): array;", "public function getWFScheduleTime() {\n\t\tif (isset($this->multipleschtime)) {\n\t\t\t$multipleschtime = explode(',', $this->multipleschtime);\n\t\t\tusort($multipleschtime, function ($time1, $time2) {\n\t\t\t\t$t1 = strtotime($time1);\n\t\t\t\t$t2 = strtotime($time2);\n\t\t\t\treturn $t1 - $t2;\n\t\t\t});\n\t\t\t$currentTrigger = array_search(date('g:i a', strtotime($this->schtime)), $multipleschtime);\n\t\t\tif (!$currentTrigger && $currentTrigger !== 0) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[0]));\n\t\t\t\t$this->updateSchtime($multipleschtime[0]);\n\t\t\t} elseif (!isset($multipleschtime[$currentTrigger + 1])) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[count($multipleschtime)-1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t} else {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[$currentTrigger + 1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t}\n\t\t\treturn $nextTiggerTime;\n\t\t}\n\t\treturn $this->schtime;\n\t}", "function card_schedule_get(){\n\t\tif ($this->get('idspbu') == NULL){\n\t\t\t$this->response(array( 'status' => \"ID SPBU not found\" ), 408);\n\t\t} else {\n\t\t\t$param['id_spbu'] = $this->get('idspbu');\n\t\t\t$param['id_pelanggan'] = $this->get('idpelanggan');\n\t\t\t$param['id_card'] = $this->get('idcard');\n\t\t\t$param['nik'] = $this->get('nik');\n\t\t\t\n\t\t\t$response = $this->rest_model->getCard($this->get('idspbu'), $param);\n\t\t\tif(!empty($response)){\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"NULL\" ), 406);\n\t\t\t}\n\t\t}\n\t}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('autoBanSubscribeJob')->everyThirtyMinutes();\n $schedule->command('autoBanUserJob')->everyTenMinutes();\n $schedule->command('autoCheckNodeStatusJob')->everyMinute();\n $schedule->command('autoClearLogJob')->everyThirtyMinutes();\n $schedule->command('autoCloseOrderJob')->everyMinute();\n $schedule->command('autoDecGoodsTrafficJob')->everyTenMinutes();\n $schedule->command('autoDisableExpireUserJob')->everyMinute();\n $schedule->command('autoDisableUserJob')->everyMinute();\n $schedule->command('autoExpireCouponJob')->everyThirtyMinutes();\n $schedule->command('autoExpireInviteJob')->everyThirtyMinutes();\n $schedule->command('autoReleasePortJob')->everyMinute();\n $schedule->command('autoReopenUserJob')->everyMinute();\n $schedule->command('autoResetUserTrafficJob')->everyFiveMinutes();\n $schedule->command('autoStatisticsNodeDailyTrafficJob')->dailyAt('04:30');\n $schedule->command('autoStatisticsNodeHourlyTrafficJob')->hourly();\n $schedule->command('autoStatisticsUserDailyTrafficJob')->dailyAt('03:00');\n $schedule->command('autoStatisticsUserHourlyTrafficJob')->hourly();\n $schedule->command('userExpireWarningJob')->daily();\n $schedule->command('userTrafficWarningJob')->daily();\n $schedule->command('autoStatisticsNodeHourlyTestJob')->hourlyAt(10);\n// $schedule->command('autoStatisticsNodeHourlyTestJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpJob')->dailyAt('00:00');\n// $schedule->command('autoMysqlBackUpJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpRemoteJob')->dailyAt('00:30');\n $schedule->command('cPJob')->everyMinute();\n $schedule->command('deleteAuthJob')->everyMinute();\n $schedule->command('pushJob')->dailyAt('13:37');\n $schedule->command('telegramJob')->everyMinute();\n $schedule->command('autoCountNodeFlow')->everyMinute();\n\n\n\n }", "public function findDowntimesForAdminUser(): array;", "protected function schedule(Schedule $schedule)\n {\n //更新wiki的昨天热度数据,每天5点执行\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('5:00');\n //从欢网数据中心同步7天节目单,每周日早上3点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0,+1,+2,+3,+4,+5,+6,+7'])->dailyAt('3:00')->sundays();\n //从欢网数据中心同步当天和昨天节目单任务,每天6,10点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=-1,0,+1'])->twiceDaily(6, 10);\n //从欢网数据中心同步当天节目单任务,每天13,15,18,23点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(13, 15);\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(18, 23);\n //从欢网数据中心同步频道热度,每五分钟执行一次\n $schedule->command(Commands\\CronUpdateChannelHotFromHuan::class)->everyFiveMinutes();\n //更新正在播出的节目,每分钟执行一次\n $schedule->command(Commands\\CronUpdateLiveProgram::class)->everyMinute();\n //维基热度,可回看,可预约维基计算,每天8点执行一次\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('8:00');\n //从腾讯视频获取vod的热度数据\n $schedule->command(Commands\\CronUpdateQQAlbumHotFromQQ::class)->twiceDaily(7, 11);\n //从HDP更新频道列表,每天一次\n $schedule->command(Commands\\CronUpdateHdpChannels::class)->dailyAt('8:20');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('make:rss')->hourly();\n\n }", "public function getNextTriggerTime() {\n\t\tglobal $default_timezone;\n\t\t$admin = Users::getActiveAdminUser();\n\t\t$adminTimeZone = $admin->time_zone;\n\t\t@date_default_timezone_set($adminTimeZone);\n\n\t\t$scheduleType = $this->getWFScheduleType();\n\t\t$scheduleMinute= $this->getScheduleMinute();\n\t\t$nextTime = date('Y-m-d H:i:s');\n\t\tif ($scheduleType==Workflow::$SCHEDULED_BY_MINUTE) {\n\t\t\t$nextTime=date('Y-m-d H:i:s', strtotime(\"+ $scheduleMinute minutes\"));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_HOURLY) {\n\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime('+1 hour'));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_DAILY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForDaily($this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_WEEKLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForWeekly($this->getWFScheduleWeek(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_DATE) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByDate($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_WEEKDAY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByWeekDay($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_ON_SPECIFIC_DATE || $scheduleType == Workflow::$SCHEDULED_ANNUALLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForAnnualDates($this->getWFScheduleAnnualDates(), $this->getWFScheduleTime());\n\t\t}\n\t\t@date_default_timezone_set($default_timezone);\n\t\treturn $nextTime;\n\t}", "function GetAllSchedules() {\n\tglobal $server;\n\tglobal $user;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t$array = LaunchCurl($url);\n\treturn $array;\n}", "public function getSchedule()\n\t\t{\n\t\t\tif ($this->schedule === NULL)\n\t\t\t{\n\t\t\t\t$this->schedule = new ECash_Transactions_Schedule($this);\n\t\t\t}\n\n\t\t\treturn $this->schedule;\n\t\t}", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysdate() as now\n from schedule\n ORDER BY gameDate\";\n\n try {\n return $this->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"\"}}';\n }\n }", "public static function getSchedulePattern(): string;", "public function schedules()\n {\n $inVacation = config('schedules')['vacation'];\n $weekdays = config('schedules')['tabData']['days'];\n\n if ($inVacation) {\n $schedules = [\n 'sun' => null,\n 'mon' => null,\n 'tue' => null,\n 'wed' => null,\n 'thu' => null,\n 'fri' => null,\n 'sat' => null\n ];\n\n $scheduleMessage = config('schedules')['vacationMessage'] . '<br>...';\n } else {\n $schedules = $this->schedules->getByDay();\n $scheduleMessage = 'Sem horários<br>...';\n }\n\n return [\n 'weekDays' => $weekdays,\n 'currentDay' => \\strtolower(\\date('D')),\n 'schedules' => $schedules,\n 'scheduleEmptyMessage' => $scheduleMessage\n ];\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('cluster:refresh')->dailyAt('04:00');\n $schedule->command('cluster:refresh')->dailyAt('07:00');\n $schedule->command('cluster:refresh')->dailyAt('12:00');\n $schedule->command('cluster:refresh')->dailyAt('19:00');\n $schedule->command('cluster:refresh')->dailyAt('23:00');\n // $schedule->command('inspire')\n // ->hourly();\n }", "public function getScheduleTime()\n {\n return $this->schedule_time;\n }", "function jetpack_sync_full_sync_interval( $schedule_name ) {\n\treturn 'twicedaily';\n}", "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->weekdays()->at('17:00');\n }", "function getScheduledTasks ( $notification )\n\t{\n\t\t$maxHourOffset = 0;\n\t\t$sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess();\n\t\t$baseDate = Piwik_Date::factory(\"1971-01-01\");\n\t\tforeach($sites as &$site)\n\t\t{\n\t\t\t$offsetDate = Piwik_Date::factory($baseDate, $site['timezone']);\n\n\t\t\t// Earlier means a negative timezone\n\t\t\tif ( $offsetDate->isEarlier($baseDate) )\n\t\t\t{\n\t\t\t\t// Gets the timezone offset\n\t\t\t\t$hourOffset = (24 - date ('H', $offsetDate->getTimestamp()));\n\n\t\t\t\tif ( $hourOffset > $maxHourOffset )\n\t\t\t\t{\n\t\t\t\t\t$maxHourOffset = $hourOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tasks = &$notification->getNotificationObject();\n\n\t\t$dailySchedule = new Piwik_ScheduledTime_Daily();\n\t\t$dailySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'dailySchedule', $dailySchedule );\n\n\t\t$weeklySchedule = new Piwik_ScheduledTime_Weekly();\n\t\t$weeklySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'weeklySchedule', $weeklySchedule );\n\n\t\t$monthlySchedule = new Piwik_ScheduledTime_Monthly();\n\t\t$monthlySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'monthlySchedule', $monthlySchedule );\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n // aca donde vas a configurar las horas que se enviaran\n $schedule->command('trabajador:cumpleanios')->dailyAt('10:00');\n $schedule->command('trabajador:contrato')->dailyAt('11:52');\n\n }", "public function scheduledDeposits($cursor = \"\")\n {\n return $this->get('ach/deposit_schedules', ['cursor' => $cursor]);\n }", "public function getScheduledJob($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"get\", $params, $context);\n\t}", "protected function schedule(Schedule $schedule)\n {\n $date = now();\n\n /**\n * Employees\n * -------------------------------------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n /**\n * Ring Central Commands\n * ---------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyProductionReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:25');\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyRawReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:45');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Publishing\\SendPublishingProductionReportCommand::class)->everyThirtyMinutes();\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalFlashReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalProductionReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalTextCampaignReportCommand::class)->dailyAt('07:20');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\HotelPlanning\\SendHotelPlanningProductionReportCommand::class, ['--date' => now()->format('Y-m-d')])->hourly();\n\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendDailySummaryCommand::class)->dailyAt('06:20');\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendWTDSummaryCommand::class)->dailyAt('06:30');\n // check for dispositions\n $schedule->command(\\App\\Console\\Commands\\CheckForDispositionsPendingIdentification::class)->everyThreeHours();\n\n /**\n * Clean up commands\n * ----------------------------------------------------------------------\n */\n $schedule->command(\\Dainsys\\Commands\\ClearLogs\\ClearLogsCommand::class, [\n '--clear',\n '--keep=3',\n ])->dailyAt('02:00');\n\n $schedule->command(\\App\\Console\\Commands\\ClearTempraryFiles::class, [\n // 'remove_files_older_than_days' => 5\n 5,\n ])->dailyAt('20:45');\n\n $schedule->command(\\Spatie\\Backup\\Commands\\BackupCommand::class)->dailyAt('21:15');\n $schedule->command(\\Spatie\\Backup\\Commands\\CleanupCommand::class)->dailyAt('22:15');\n\n $schedule->command(\\App\\Console\\Commands\\UpdateBillableHoursAndRevenue::class, [now()->subDays(1)->format('Y-m-d') . ',' . now()->format('Y-m-d')])->dailyAt('01:15');\n $schedule->command(\\Illuminate\\Database\\Console\\PruneCommand::class, [\n '--model' => [\n \\App\\Models\\Performance::class,\n \\App\\Models\\UserLogin::class,\n \\App\\Models\\Notification::class,\n ],\n ])->dailyAt('02:15');\n\n $schedule->command(\\Laravel\\Telescope\\Console\\PruneCommand::class, ['--hours' => 72])->dailyAt('06:40');\n }", "function campaignSchedule($cid, $schedule_time, $schedule_time_b=NULL) {\n $params = array();\n $params[\"cid\"] = $cid;\n $params[\"schedule_time\"] = $schedule_time;\n $params[\"schedule_time_b\"] = $schedule_time_b;\n return $this->callServer(\"campaignSchedule\", $params);\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:endrbtcontent')->daily();\n $schedule->command('notify:endcontractrenew')->daily();\n $schedule->command('notify:roadmapstartdate')->daily();\n $schedule->command('contract:auto_renew')->daily();\n\n\n $schedule->command('notify:endcontract')->weeklyOn(1, '8:00'); //weekly each monday at 10:00\n $schedule->command('notify:attachments')->weeklyOn(1, '08:15'); //weekly each monday at 10:15\n\n // $schedule->command(\"queue:work --tries=3 --daemon\");\n\n }", "function showschedule($id){\r\n\tglobal $conn;\r\n\t$time=getdate();\r\n\t\r\n\t$query = \"SELECT * FROM schedules WHERE id='\".$id.\"' ORDER BY fin_date ASC\";\r\n\t$res = mysql_query($query,$conn);\r\n\twhile ($rows = mysql_fetch_array($res)){\r\n\r\n\t\r\n\r\n\t\tif($rows['onoff'] == 1){\r\n\r\n\t\t\t$lock=0;\r\n\t\t\t$firsthourpassed=0;\r\n\t\t\t$de = 0;\r\n\t\t\t$min = \"00\";\r\n\t\t\t$tim = \"00\";\r\n\t\t\t$stopschdl=0;\r\n\r\n\r\n\t\t\tif($rows['fin_date'] == $today){\r\n\t\t\t\tif((($time['hours'] > $rows['start_hour']) || ($time['hours'] == $rows['start_hour'] && $time['minutes'] >= $rows['start_minute'])) && (($time['hours'] < $rows['fin_hour']) || ($time['hours'] == $rows['fin_hour'] && $time['minute'] <= $rows['fin_minute']))){\r\n\t\t\t\t\t$lock=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t\tfor ($j = $rows['start_hour']; $j <= $rows['fin_hour']; $j++) {\r\n\t\t\t\tfor ($i = 0; $i < 60; $i= $i+$rows['minutes']) {\r\n\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($rows['fin_minute'] <= $i) ){\r\n\t\t\t\t\t\t\t$stopschdl=1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($stopschdl==0){\r\n\t\t\t\t\t\tif($i >0){\r\n\t\t\t\t\t\t\t$finalleftover= 60 - $i;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($firsthourpassed==1 && $i==0 && $finalleftover>0){\r\n\t\t\t\t\t\t\tif($finalleftover < $rows['minutes']){\r\n\t\t\t\t\t\t\t\t$i = $rows['minutes']-$finalleftover;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($firsthourpassed==0){\r\n\t\t\t\t\t\t\t$i=$rows['start_minute'];\r\n\t\t\t\t\t\t\t$firsthourpassed=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($i < 10){\r\n\t\t\t\t\t\t\t$min= \"0\".$i;\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t$min= $i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($rows['seconds'] == '30'){\r\n\t\t\t\t\t\t\tif($de == 1){\r\n\t\t\t\t\t\t\t\t$tim = \"30\";\r\n\t\t\t\t\t\t\t\t$de=0;\r\n\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t$tim = \"00\";\r\n\t\t\t\t\t\t\t\t$de=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$q = \"SELECT * FROM studentslots WHERE sch_date_id ='\".$rows['id'].$j.$min.$tim.\"'\";\r\n\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\t\t\t\t\t\t$date_id=$rows['id'].$j.$min.$tim ;\r\n\r\n\t\t\t\t\t\tif(isset($row['user_id'])){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$q = \"SELECT * FROM users WHERE id ='\".$row['user_id'].\"'\";\r\n\t\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-theme='c' class='ui-li ui-li-static ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\techo \"<p class='ui-li-aside ui-li-desc'><strong>\".$j.\":\".$min.\":\".$tim.\"</strong></p> <h3 class='ui-li-heading'>Name : \" . $row['first_name'] . \" \" . $row['last_name'] . \"</h3> <p class='ui-li-desc'><strong>AEM : \" . $row['aem'] . \" </strong></p>\" ;\r\n\t\t\t\t\t\t\techo \"</div></div></li>\";\r\n\r\n\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-icon='arrow-r' data-iconpos='right' data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(isset($_SESSION['username'])){\r\n\t\t\t\t\t\t\t\techo \"<a href='mobilefunctions.php?id=\".$rows['id'].\"&date_id=\".$date_id.\"&user_id=\".$_SESSION['id'].\"&gid=\".$rows['gid'].\"' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\techo \"<a href='login.php' data-rel='dialog' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\techo \"<tr> <td id='timetd'>\".$j.\":\".$min.\":\".$tim.\" </td> <td id='nametd'> </td><td id='aemtd'> </td>\" ;\r\n\t\t\t\t\t\t\techo \"</a></div><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></div></li>\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"</li>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tempmin = $rows['minutes'] + $i; \r\n\r\n\t\t\t\t\t\tif($tempmin >= 60){\r\n\t\t\t\t\t\t\t$tempmin = $tempmin - 60 ;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($tempmin >= $rows['fin_minute']) ) {\r\n\t\t\t\t\t\t\t$i=61;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public static function getSchedDay($date, $user) {\n\n // Slot defaults\n $schedDay = new SchedDay($date);\n /*\n $sql = SchedDao::SQL_SELECT_SCHED .\n \" WHERE user_id=\" . $user->id . \" AND date=\" . quote($date) .\n \" ORDER BY time_start, client_id\";\n $res = query($sql); \n $scheds = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $sched = SchedDao::buildSched($row);\n $sched->client = SchedDao::getClient($sched->clientId);\n $scheds[] = $sched;\n }\n */\n logit_r('here getschedday');\n $scheds = Scheduling::getAppts($date, $user->id);\n $schedUser = new SchedUser($user->id, $user->uid, $user->name);\n $schedUser->scheds = $scheds;\n $schedDay->users[] = $schedUser;\n return $schedDay;\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n $schedule->call(function() {\n\t\t\tSendMail::sendmails();\n\t\t})->name('sendmails')->everyFiveMinutes()->withoutOverlapping();\n $schedule->command('owish:update')->daily();\n\t\t$schedule->call(function () {\n $ows = DB::table('owarehouse')->where('status','active')->get();\n\t\t\tforeach($ows as $ow){\n\t\t\t\t$date = $ow->created_at;\n\t\t\t\t$date = strtotime($date);\n\t\t\t\t$current_date = strtotime(date('Y-m-d H:i:s'));\n\t\t\t\t$date1 = new DateTime('now');\n\t\t\t\t$date2 = new DateTime(date('Y-m-d H:i:s', strtotime(\"+ $ow->duration day\", $date)));\n\t\t\t\t$dDiff = $date1->diff($date2);\t\n\t\t\t\t$status=1;\n\t\t\t\tif ($dDiff->format(\"%r\") == '-') {\n\t\t\t\t\t$status=0;\n\t\t\t\t}\n\t\t\t\t$product = DB::table('product')->where('id',$ow->product_id)->first();\n\t\t\t\t$available = 0;\n\t\t\t\tif(!is_null($product)){\n\t\t\t\t\t$available = $product->available;\n\t\t\t\t}\n\t\t\t\tif($available == 0){\n\t\t\t\t\t$status=0;\n\t\t\t\t}\n\t\t\t\tif($status == 0){\n\t\t\t\t\tDB::table('owarehouse')->where('id',$ow->id)->\n\t\t\t\t\t\toupdate(['status','expired']);\n\t\t\t\t\t$pledges = DB::table('owarehousepledge')->\n\t\t\t\t\t\twhere('owarehouse_id',$ow->id)->count();\n\n\t\t\t\t\tif($pledges < $ow->moq){\n\t\t\t\t\t\t/************* OPEN CREDIT**************/\n\t\t\t\t\t\t$pledges = DB::table('owarehousepledge')->\n\t\t\t\t\t\t\twhere('owarehouse_id',$ow->id)->get();\n\n\t\t\t\t\t\t/*foreach($pledges as $pledge){\n\t\t\t\t\t\t}*/\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/************* PROCESS PLEDGES **************/\n\t\t\t\t\t\tDB::table('owarehouse')->\n\t\t\t\t\t\t\twhere('id',$ow->id)->update(['status','excecuted']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$ows = DB::table('owarehouse')->\n\t\t\t\twhere('status','active')->get();\n })->daily();\n }", "protected function schedule(Schedule $schedule)\n {\n $hour = date('h');\n if($hour%2 == 0)\n $exec = 1;\n else\n $exec = 0;\n\n switch ($exec) {\n case 1:\n $schedule->call('App\\Http\\Controllers\\CronController@getRefreshAccessToken')->hourly();\n $schedule->call('App\\Http\\Controllers\\CronController@projects')->hourly();\n break;\n case 0:\n $schedule->call('App\\Http\\Controllers\\CronController@getRefreshAccessToken')->hourly();\n $schedule->call('App\\Http\\Controllers\\CronController@subTasks')->hourly();\n break;\n default:\n break;\n }\n\n $schedule->call('App\\Http\\Controllers\\CronController@sendWeeklyMail')->saturdays()->at('04:30');\n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//$schedule->command('inspire')->hourly();\n $schedule->command('jamyl:allchecks')->everyFiveMinutes();\n $schedule->command('jamyl:firekillbot')->everyFiveMinutes();\n $schedule->command('jamyl:manage')->everyFiveMinutes();\n $schedule->command('jamyl:getchannels')->Hourly();\n $schedule->command('jamyl:punk')->dailyAt('10:05');\n $schedule->command('api:getalliances')->dailyAt('00:01');\n $schedule->command('api:getcontactlists')->twiceDaily();\n $schedule->command('api:getcorporations')->everyFiveMinutes();\n $schedule->command('jamyl:refreshgrouppermissions')->everyFiveMinutes();\n $schedule->command('ts3:checknickames')->everyFiveMinutes();\n $schedule->command('ts3:updateaccess')->everyFiveMinutes();\n $schedule->command('ts3:checknicknames')->everyFiveMinutes();\n //$schedule->command('ts3:getgroups')->twiceDaily();\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n /* Funciona */ \n $schedule->command('usuarios:cumples')->timezone('America/Lima')->at('08:00');\n\n $schedule->command('estado:cumples')->timezone('America/Lima')->at('08:00');\n \n $schedule->command('active:cumples')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:comcumple')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:tarjeta')->timezone('America/Lima')->monthly(); \n\n\n $schedule->command('estado:conferencias')->timezone('America/Lima')->hourly();\n\n \n }", "function jetpack_sync_incremental_sync_interval( $schedule_name ) {\n\treturn 'hourly';\n}", "protected function getSendingSchedule()\n\t{\n\t\treturn null;\n\t}", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n// $schedule->call(function(){\n// $time=date('H');\n $date=date('Y-m-d');\n// $data=[];\n// if($time>0){\n// $reserves=Reserve::where('date',$date)->whereIn('progress',[1,3])->get();\n// foreach($reserves as $k=>$v){\n// $v->progress=2;\n// $v->save();\n// $number=Number::where('reserve_id',$v->id)->where('number_class',1)->first();\n// if($number){\n// $number->number_push=1;\n// $number->number_status=0;\n// $number->save();\n// }\n// }\n// DB::table('reserves')->where('date',$date)->whereIn('progress',[1,3])->where('halt',0)->update('progress',2);\n//// }\n// })->everyMinute();\n\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:rehabilitations')->twiceDaily(1, 22);\n }", "protected function schedule(Schedule $schedule)\n {\n Log::info('=====定时任务开始====');\n // 定时发券\n $schedule->command('set:coupon')->everyMinute();\n $schedule->command('delay:coupon')->everyMinute();\n //活动开启和失效\n $schedule->command('period:active')->daily();\n //优惠券模板失效\n $schedule->command('period:coupon')->daily();\n //发券过期失效\n $schedule->command('period:coupon_grand')->daily();\n // 个人优惠券失效\n $schedule->command('invalid:coupon_library')->daily();\n //清理订单锁\n $schedule->command('clr:orderLock')->everyMinute();\n //快递单的状态\n $schedule->command('delay:express')->daily();\n // 积分商城商品过期定时下架\n $schedule->command('period:mall')->daily();\n //个人优惠券延迟失效\n $schedule->command('delay_period_coupon_library')->everyMinute();\n // 星球会员过期\n $schedule->command('expire:star')->daily();\n // 星球会员生日好礼\n $schedule->command('star:birthday')->monthlyOn(1, '0:0');\n // 星球会员每月福利\n $schedule->command('star:welfare')->everyThirtyMinutes();\n // 星球会员升级券包 处理\n $schedule->command('gift:handle')->everyMinute();\n // 关闭星球会员购买订单\n $schedule->command('close:card_order')->everyMinute();\n // 积分经验值补录定时器\n $schedule->command('add:record')->everyMinute();\n // 查询未核销券进行核销\n $schedule->command('cancel:coupon_library')->everyMinute();\n // go定时升级\n $schedule->command('go_level:trigger')->everyMinute();\n // 星球定时升级\n $schedule->command('star_level:trigger')->everyMinute();\n //使用优惠券通知小游戏\n $schedule->command('mini_game_notify')->everyMinute();\n //凌晨积分经验值补录\n $schedule->command('dirly:record')->daily();\n //优惠券到期提示通知\n $schedule->command('period:message')->daily();\n // go会员升级提醒\n $schedule->command('remind:go:upgrade')->everyMinute();\n // 星球会员升级提醒\n $schedule->command('remind:star:upgrade')->everyMinute();\n // 星球会员过期提醒\n $schedule->command('remind:star:overdue')->daily()->at('5:28');\n Log::info('=====定时任务结束====');\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n \n\n $schedule->call(function(){\n\n \n $jadual = Telegram::all();\n\n foreach ($jadual as $jaduals) {\n $str_time = $jaduals->masa;\n sscanf($str_time, \"%d:%d:%d\", $hours, $minutes, $seconds);\n $masa = isset($hours) ? $hours * 3600 + $minutes * 60 + $seconds : $minutes * 60 + $seconds;\n $apiToken = \"\";\n $jawapan = $jaduals->answer;\n $jawapan = explode(',', $jawapan);\n $jawapan = json_encode($jawapan);\n \n \n $data = ['chat_id' => $jaduals->chatid, 'question' => $jaduals->question, 'options' => $jawapan, 'is_anonymous' => 'False', 'open_period' => $masa];\n Http::post(\"https://api.telegram.org/bot$apiToken/sendPoll?\" . http_build_query($data));\n }\n \n })->weekdays()->timezone('Asia/Kuala_Lumpur')->at('02:11');\n \n\n }", "public function findDowntimesForNonAdminUser(): array;", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('regverification:clean')\n// ->daily();\n// $schedule->command('activity:begin:remind')\n// ->dailyAt('12:30');\n// $schedule->command('teammember:report:pendingenrollmentrequests')\n// ->dailyAt('22:00');\n// // not need to remind\n//// $schedule->command('activity:report:pendingalbumimages')\n//// ->dailyAt('09:10');\n// $schedule->command(\"storage:tmp:clean -e '3 days'\")\n// ->dailyAt('03:00');\n// $schedule->command(\"attendant:export -l gaoxin_attendants -t [email protected]\")\n// ->dailyAt('08:00');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('youtube:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('youtube:duration')\n ->everyMinute()\n ->withoutOverlapping();\n\n $schedule->command('vidme:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('delete:synced')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('clean:user_watched_table')\n ->weekly()\n ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate www')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate en')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate il')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ar')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ro')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ru')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n $schedule->command('videocache:generate')\n ->everyTenMinutes()\n ->withoutOverlapping();\n\n // $schedule->command('download:livefeedxml')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson en')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson il')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ar')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ro')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ru')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson www')\n // ->everyMinute()\n // ->withoutOverlapping();\n }", "public function get_payout_schedule() {\n $crons = _get_cron_array();\n\n $schedule = array();\n\n foreach ( $crons as $timestamp => $cron ) {\n if ( isset( $cron[ 'edd_commissions_payout' ] ) ) {\n $schedule[] = $timestamp;\n }\n }\n\n sort( $schedule, SORT_NUMERIC );\n\n return $schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n //每天五点钟执行\n $cron = new ACXCronController();\n $schedule->call(function ()use($cron){\n try{\n $cron->bak_block_opt_data();;\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage(),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->dailyAt('5:01');\n\n //每一个小时执行一次\n $schedule->call(function ()use($cron){\n try{\n $cron->update_withdraw_change_from_24hour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->hourly();\n\n\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->oneMinute();\n $minute = date(\"i\",time());\n //--执行分钟任务\n $croncontroller->oneMinute();\n if($minute%5==0)$croncontroller->fiveMinute();\n if($minute%15==0)$croncontroller->fifteen();\n if($minute%30==0) $croncontroller->halfHour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->everyMinute();\n\n //--每小时\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $hour =date(\"H\",time());\n //--执行小时任务\n $croncontroller->oneHour();\n if($hour%2==0)$croncontroller->twoHour();\n if($hour%6==0)$croncontroller->sixHour();\n if($hour%12==0)$croncontroller->twelveHour();\n if($hour==0)$croncontroller->oneDay();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->hourly();\n\n\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->week();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->weekly();\n\n\n //充值确认定时任务 15分钟一次\n $schedule->call(function (){\n try{\n $acxCron = new ACXCronController();\n $acxCron->getReceiveHistory();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n })->everyFiveMinutes();\n\n //每月执行当\n $withdrawal = new WithdrawalControl();\n $schedule->call(function ()use($withdrawal){\n $resOne = $withdrawal->upgrade();\n $dataOne = ['email'=>'[email protected]','newEmail'=>'upgrade'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n })->monthly();\n\n //自定义规则提现额度 每是分钟\n $schedule->call(function ()use($withdrawal){\n //开始\n $resOne = $withdrawal->customizeRunStart();\n if (!$resOne[0]){\n $dataOne = ['email'=>'[email protected]','newEmail'=>'customizeRunStart'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n }\n //结束\n $resTwo = $withdrawal->customizeRunEnd();\n if (!$resTwo[0]){\n $dataTwo = ['email'=>'[email protected]','newEmail'=>'customizeRunEnd'.json_encode($resTwo),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataTwo));\n }\n })->daily();\n\n\n //增加每分钟判断是不是有低价订单\n $schedule->call(function(){\n #CronController::getSendHistory('BTC');\n $check_order_controller=new CheckOrderController();\n $result=$check_order_controller->check_order_list_dingshi(\"admin\",\"fZGGz4BmSNbHzYr1cEYgfMEl0UOs59cn\");\n $data = ['email'=>'[email protected]','newEmail'=>$result,'url'=>now()];\n # Mail::to('[email protected]')->send(new ChangeEmail($data));\n })->everyMinute();\n\n \n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('LTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BCH');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('RPZ');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('XVG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('DASH');\n })->everyFiveMinutes();\n\n //后台-----------------------\n $schedule->call(function() {\n BackController::getCurrencyInfoRun();\n })->everyTenMinutes();\n }", "public function get_timetable() {\n $week = $this->qc->timetable_get_week();\n $days = array();\n\n for ($i=2; $i < count($week); $i++) {\n $day = $this->qc->timetable_get_day($week[$i]);\n array_push($days, $day);\n }\n }", "function update_interval_schedule($int) {\n\t//check schedule exists, remove it, add new one\t\n\twp_clear_scheduled_hook('standards_resource_check');\t\n\tif ($int > 0)\n\t\twp_schedule_single_event( time() + 3600 * $int, 'standards_resource_check' );\n}", "public function getScheduleList($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"getList\", $params, $context);\n\t}", "static function fetchJobSchedule( $jobId ) {\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT job_id, classname, repeat_time_minutes, repeat_daily_at, active_yn, last_run_date \n FROM job_scheduler\n WHERE job_id = %d\", $jobId));\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n foreach( $resultset as $record ) {\n return $record;\n }\n return null;\n }", "function dayScheduleA()\n\t{\n\t$scheduleDay = array(45, 60, 90, 120, 150, 180, 210, 240);\n\treturn $scheduleDay;\n\t}", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//Runs daily, every 5 minutes from 03:00\n\t\t$schedule->command(TranslationsBackup::class)->dailyAt('03:00'); // Dispatching a Job that will create a CSV File with the translations\n\t\t$schedule->command(RemoveCsvFiles::class, ['1', '--queue'])->dailyAt('03:05'); // Remove CSV Files older than x months (default 1) from /var/www/public/admin/reports/csv\n\t\t$schedule->command(DeleteOldTokens::class, ['1'])->dailyAt('03:10'); // Deletes the tokens that are older than x (default 1) days\n\t\t$schedule->command(DeleteUselessTransactions::class, ['3', '1000'])->dailyAt('03:15'); //Delete a number of created transactions older than 3 months\n\t\t//$schedule->command(DeleteExpiredClients::class, ['1000'])->dailyAt('03:20'); // TODO: This comes from V1, why do we do it? Clear expired maestro clients\n\n\t\t//Runs every hour\n\t\t$schedule->command(ActivateVouchers::class)->hourly(); // Activate vouchers that are inactive and startDate < now()\n\t\t$schedule->command(DeactivateVouchers::class)->hourly(); // Deactivate vouchers that are active and stopDate < now()\n\t\t//$schedule->command(ClearPasswordAttempts::class, ['3'])->hourly(); // Update reminder table where there are more than 2 attempts and updated < last x (default 3) hours\n\t\t//$schedule->command(ClearHheClients::class)->hourly(); // TODO: This comes from V1, why do we do it? Clear expired hhe clients\n\n\t\t//Runs every 10 minutes\n\t\t//$schedule->command(MerakiCheck::class)->everyTenMinutes(); // Update airhealth.hardware based on a xml taken from a URL from site_attribute having \"meraki_network\"\n\t\t//$schedule->command(DestroyGhostSessions::class, ['10'])->everyTenMinutes(); // 1. Cleaning up NULL Connectinfo_Start records; 2. Cleaning up NULL Connectinfo_Stop records and acctstoptime; 3. Removing records stale for x (default 10) minutes\n\t\t//$schedule->command(ShutdownIdle::class, ['20'])->everyTenMinutes(); // Shuts down sessions older than x (default 20) minutes where IP is 192.168.1.2 by adding a acctstoptime | Might be CC only\n\t\t//$schedule->command(UpdateGender::class)->everyTenMinutes(); // Checks the name with the names that we have in our DB to return the gender\n\t\t$schedule->command(UpdatePmsDynamicIp::class)->everyTenMinutes(); // Updates the IP of site attributes that have dynamic_ip enabled (for UPMS and Captive PMS)\n\n\t\t//Runs every minute\n\t\t$schedule->command(DeleteTransactionReceipts::class, ['2', '10000'])->everyMinute(); // Delete a number of transaction receipts older than x (default 2) months\n\n\t\t// These are the SSID scheduling and was never implemented (unless it was)\n//\t\t$schedule->command(RevertScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n//\t\t$schedule->command(ChangeScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n\t}", "public function findDowntimesByHostForAdminUser(int $hostId, bool $withServices): array;", "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function(){\n $orders = order::where('approved', 'pending')->get();\n foreach ($orders as $order) {\n $order->approved = 'cancelled';\n $order->save();\n }\n })->daily();\n\n $schedule->call(function(){\n $orders = Order::whereNotNull('until')->get();\n foreach ($orders as $order) {\n $service = Service::where('cost', $order->amount)->first();\n $username = $order->username;\n if (Carbon::parse(now())->diffInDays($order->until, false) <= 0) {\n \tif (is_null($order->until)) {\n\t\t\t\t\t\t$until = \"NULL\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$until = $order->until;\n\t\t\t\t\t\t$order->until = null;\n\t\t\t\t\t\t$order->save();\n\t\t\t\t\t\tLog::debug('Neteko Paslaugos: ' . $username . '---'. $service->name);\n\t\t\t\t\t}\n\n\t\t\t\t\t$host = env('Server_IP');\n\t $port = env('Server_PORT');\n\t $password = env('Server_PASS');\n\t $timeout = 3;\n\t $rcon = new Rcon($host, $port, $password, $timeout);\n\n\t if ($rcon->connect()){\n\n \t$rcon->sendCommand('pex user '.$username. 'group set lavonas'); \n \t$rcon->sendCommand('broadcast '.$username. ' Neteko paslaugos, nes jos galiojimas pasibaigė');\n \t\n \t}\n\t\t\t\t}\n\t\t\t}})->daily();\n\n $schedule->call(function(){\n $orders = Order::where('approved', 'done')->whereNull('until')->where('service_name', '!=', 'atleiskit')->delete();\n $orders2 = Order::where('approved', 'cancelled')->delete();\n })->weeklyOn(1, '7:00');;\n\n }", "public function getDownTimeToday(){\n return Notification::calculateDailyDowntime($this);\n }", "function patientschedule($pid)\n{\n\t$query=\"SELECT * FROM patientrequest WHERE pid='$pid'\";\n\t$results=getdata($query);\n\treturn $results;\n}", "protected function schedule(Schedule $schedule)\n {\n // cron that runs every 5 minutes to check for offline state between 9:30 am and 9:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@stateUpdate')->everyFiveMinutes()->between(\"04:00\",\"16:00\");\n\n // daily cron for status update - everyday at 10:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@daily')->dailyAt(\"17:00\");\n\n // weekly cron for total week hours violation - every sunday at 10:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@weekly')->sundays()->at('17:30');\n\n // // monthly cron for monthly total hours violation - last day of every month at 10:30 pm ist\n // $schedule->call('\\App\\Http\\Controllers\\CronController@monthly')->when(function () {\n // return \\Carbon\\Carbon::now()->endOfMonth()->isToday();\n // })->at('17:00');\n }", "public function get_schedule($params = [])\n {\n $result = Schedule::where([\n 'event_id' => $params['event_id'], \n 'user_id' => $params['user_id'] \n ])->get();\n\n return to_array($result);\n }", "protected function schedule(Schedule $schedule)\n {\n //* * * * * /usr/bin/php /your/projectPath/artisan schedule:run >> /dev/null 2>&1\n\n //买格子后的日志,记录到数据库\n $schedule->command('Grid:TradeInfo')->everyMinute()->withoutOverlapping();\n\n //延时统计用户成就\n $schedule->command('Grid:Achievement')->everyFiveMinutes()->withoutOverlapping();\n\n //延时更新用户头像\n $schedule->command('Grid:ChangeAvatar')->everyMinute()->withoutOverlapping();\n\n //排行榜统计\n $schedule->command('Grid:RankList')->everyFiveMinutes()->withoutOverlapping();\n\n //n天不交易的格子自动降价m%\n $schedule->command('Grid:ReducePrice')->cron('30 2 * * *')->withoutOverlapping();\n\n\n\n\n //后台发的系统通知\n $schedule->command('Admin:SystemMessage')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,计算cpu,内存,硬盘占用\n $schedule->command('Admin:ServerInfoNew')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,统计用户分布情况\n $schedule->command('Admin:UserDistribution')->daily()->withoutOverlapping();\n\n //后台的数据统计\n $schedule->command('Admin:userData1')->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('Admin:gridData1')->everyThirtyMinutes()->withoutOverlapping();\n\n\n\n //处理探索世界迷雾\n $schedule->command('Tssj:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路迷雾\n $schedule->command('Wodelu:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路足迹\n $schedule->command('Wodelu:TrackFogUploadForZUJI0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI9')->everyMinute()->withoutOverlapping();\n\n //计算昨日繁荣度 联盟的\n $schedule->command('Aliance:Flourish')->cron('1 0 * * *')->withoutOverlapping();\n //计算昨日繁荣度 用户的\n $schedule->command('Aliance:FlourishForUser')->cron('1 0 * * *')->withoutOverlapping();\n\n //每月第一天计算联盟战绩\n $schedule->command('Aliance:PKinfo')->cron('30 0 1 */1 *')->withoutOverlapping();\n\n\n\n //每分钟刷拍卖行物品,过期的返回给用户\n $schedule->command('FoodMap:AuctionHouse')->everyMinute()->withoutOverlapping();\n\n\n\n\n $schedule->command('Tssj:OneJoke')->everyFifteenMinutes()->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n \n //$schedule->command('add:winners')->everyMinute();\n \n //$schedule->command('add:winners')->cron('00 18 31 10 * *');\n \n /*$schedule->command('test:test')\n ->everyMinute()\n ->sendOutputTo(base_path() . '/public/output_files/test.txt');\n */\n \n //$schedule->command('add:winners')->cron('52 13 02 11 * *');\n \n $periods = Period::all();\n \n foreach($periods as $period) {\n \n $enddate_month = explode('-', $period->enddate)[1];\n $enddate_day = explode(' ', explode('-', $period->enddate)[2])[0];\n //echo(\"maand: \" . $enddate_month . \" en dag \" . $enddate_day . \"<br>\");\n $schedule->command('add:winners')->cron('40 22 ' . $enddate_day . ' ' . $enddate_month . ' * *');\n }\n \n \n }", "protected function schedule(Schedule $schedule) {\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n echo date(\"Y-m-d H:i:s\").\"\\n\";\n $schedule->command('flow:sync 0 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 1 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 0 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:20');\n $schedule->command('flow:sync 1 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:40');\n }", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "protected function scheduleTimezone()\n {\n return 'America/New_York';\n }", "public static function getTimeToRun();", "protected function schedule(Schedule $schedule)\n {\n /* $schedule->command('inspire')\n ->hourly();\n */ \n $schedule->command('sync:sfa')\n \t\t\t->dailyAt('3:00')\n \t\t\t//->withoutOverlapping()\n \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync1.log');\n \n// \t\t$schedule->command('sync:sfa')\n// \t\t\t->dailyAt('12:00')\n// \t\t\t//->withoutOverlapping()\n// \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync2.log');\n \n $schedule->command('reset:admin_password')\n\t\t\t ->weekly()\n\t\t\t ->mondays()\n\t\t\t ->at('2:30')\n\t\t\t ->withoutOverlapping()\n\t\t\t ->appendOutputTo(storage_path('logs/cron').'/password.log');\n }", "function CreateSchedule($arraypost) {\n\tglobal $server;\n\tglobal $user;\n\tglobal $device;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t\n\t$status \t= (empty($arraypost[\"status\"]) ? \"enabled\" : $arraypost[\"status\"]);\n\t\n\t$on \t\t= (empty($arraypost[\"on\"]) ? 0 : $arraypost[\"on\"]);\n\t$colorhex \t= (empty($arraypost[\"colorhex\"]) ? \"#fead59\" : \"#\".$arraypost[\"colorhex\"]);\n\t$alert \t\t= (empty($arraypost[\"alert\"]) ? \"none\" : $arraypost[\"alert\"]);\n\t$bri \t\t= (empty($arraypost[\"bri\"]) ? \"254\" : $arraypost[\"bri\"]);\n\t$ct \t\t= (empty($arraypost[\"ct\"]) ? \"369\" : $arraypost[\"ct\"]);\n\t$hue \t\t= (empty($arraypost[\"hue\"]) ? \"14910\" : $arraypost[\"hue\"]);\n\t$sat \t\t= (empty($arraypost[\"sat\"]) ? \"144\" : $arraypost[\"sat\"]);\n\t$transition = (empty($arraypost[\"transition\"]) ? \"0\" : $arraypost[\"transition\"]);\n\t$effect\t \t= (empty($arraypost[\"effect\"]) ? \"none\" : $arraypost[\"effect\"]);\n\t\n\t$arrayattr = array();\n\t\n\t// Name -------------------------------------\n\t$arrayattr[] = \"\\\"name\\\":\\\"\".$arraypost[\"name\"].\"\\\"\";\n\t\n\t// Description -------------------------------------\n\t$arrayattr[] = \"\\\"description\\\":\\\"\".$arraypost[\"description\"].\"\\\"\";\n\t\n\t// Command -------------------------------------\n\t\n\t// State On ----------------------------------\n\t$arrayattr1[] = \"\\\"on\\\":\".($on==1 ? \"true\" : \"false\").\"\";\n\t\n\t// Color hex ---------------------------------\n\tif (!empty($colorhex)) {\n\t\t$tabcolor = convertColorHextoxyY($colorhex);\n\t\t$x = $tabcolor[\"x\"];\n\t\t$y = $tabcolor[\"y\"];\n\t\t$bri = intval($tabcolor['Y']);\n\t\t$arrayattr1[] = \"\\\"xy\\\":[\".$x.\",\".$y.\"]\";\n\t}\n\tif ($colorhex=\"#fead59\") {\n\t\t$bri = \"254\";\n\t}\n\t/*\n\t// Alert -------------------------------------\n\t$arrayattr1[] = \"\\\"alert\\\":\\\"\".$alert.\"\\\"\";\n\t\n\t// Brightness --------------------------------\n\t$arrayattr1[] = \"\\\"bri\\\":\".$bri;\n\t\n\t// Colour Temperature ------------------------\n\t$arrayattr1[] = \"\\\"ct\\\":\".$ct;\n\t\n\t// Hue ---------------------------------------\n\t$arrayattr1[] = \"\\\"hue\\\":\".$hue;\n\t\n\t// Saturation --------------------------------\n\t$arrayattr1[] = \"\\\"sat\\\":\".$sat;\n\t\n\t// Transition --------------------------------\n\t$arrayattr1[] = \"\\\"transitiontime\\\":\".$transition;\n\t\n\t// Effect ------------------------------------\n\t$arrayattr1[] = \"\\\"effect\\\":\\\"\".$effect.\"\\\"\";\n\t*/\n\t\n\t$arrayattr[] = \"\\\"command\\\":{\n\t\t\\\"address\\\": \\\"/api/\".$user.\"/groups/\".$arraypost[\"group\"].\"/action\\\",\n\t\t\\\"method\\\": \\\"PUT\\\",\n\t\t\\\"body\\\": { \".implode(\",\", $arrayattr1).\" }}\";\n\t\n\t// LocalTime -------------------------------------\n\t$arrayattr[] = \"\\\"localtime\\\":\\\"\".$arraypost[\"localtime\"].\"\\\"\";\n\t\n\t// Status -------------------------------------\n\t$arrayattr[] = \"\\\"status\\\":\\\"\".$status.\"\\\"\";\n\t\n\t$attr = \"{\";\n\t$attr .= implode($arrayattr, \",\");\n\t$attr .= \"}\";\n\techo $attr;\n\treturn LaunchCurl($url,\"post\",$attr);\n}", "protected function scheduleTimezone()\n {\n return 'America/Los_Angeles';\n }", "static function fetchJobSchedules() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \" SELECT job_id, classname, repeat_time_minutes, repeat_daily_at, active_yn, last_run_date \n FROM job_scheduler\n ORDER BY job_id\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n $schedule = array();\n foreach( $resultset as $record ) {\n if( false === empty( $record->repeat_time_minutes ) ) {\n $schedule[] = new ScheduledJobRepeat(\n $record->job_id, \n $record->classname, \n $record->repeat_time_minutes, \n $record->active_yn == 'Y',\n $record->last_run_date,\n self::fetchJobScheduleParameters( $record->job_id ));\n }\n else if( false === empty( $record->repeat_daily_at ) ) {\n $schedule[] = new ScheduledJobDaily(\n $record->job_id, \n $record->classname, \n $record->repeat_daily_at,\n $record->active_yn == 'Y',\n $record->last_run_date,\n self::fetchJobScheduleParameters( $record->job_id ));\n }\n }\n return $schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n $schedule->call(function () {\n Log::info('更新热度');\n Commodity::updateCommodityTemperature();\n Article::updateArticleTemperature();\n Activity::updateActivityTemperature();\n Recruit::updateRecruitTemperature();\n News::updateNewsTemperature();\n })->hourly();\n }", "protected function schedule ( Schedule $schedule )\n {\n\n /** BEGIN: FETCH APPWORKS API DATA ****************************************/\n\n $schedule->command( 'ot-appworks:fetch-events' )\n ->hourlyAt(0)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-appworks:fetch-event-data' )\n ->hourlyAt(5)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-scoreboard:fetch-new-points' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n $schedule->command( 'ot-socialcards:fetch-new-posts' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n /** END: FETCH APPWORKS API DATA ******************************************/\n\n /** BEGIN: FETCH TWITTER API DATA *****************************************/\n\n $schedule->command( 'ot-socialcards:fetch-new-tweets' )\n ->everyMinute()\n ->withoutOverlapping();\n\n /** END: FETCH TWITTER API DATA *******************************************/\n\n }", "protected function schedule(Schedule $schedule)\n {\n\n\n // $billerId = JosPostpaid::select('billerRequestId')->orderBy('requestId','desc')->first();\n // $response = $schedule->command(Http::withHeaders([\n // 'MAC' => '632b046efead2c90494545b4c0a526d7e7545ca65ec6494119cd10dba8eb387b',\n // 'CLIENT_CODE' => 'CAPRI-DWTH8PYN9N3F',\n // ])->post('http://132.145.231.191/vasb2b/dev/Api/query',[\n // 'id' => $billerId,\n // ]))->everyFiveMinutes();\n\n\n // $billerId = Prepaid::select('billerRequestId')->orderBy('id','desc')->first();\n $billerId = DB::table('prepaid_payment_histories')->select('requestId')->where(['status' => 'PENDING'])->first();\n\n \n // dd($billerId->billerRequestId,$billerId->phone);\n $response = $schedule->command(Http::withHeaders([\n 'MAC' => '632b046efead2c90494545b4c0a526d7e7545ca65ec6494119cd10dba8eb387b',\n 'CLIENT_CODE' => 'CAPRI-DWTH8PYN9N3F',\n ])->post('http://132.145.231.191/vasb2b/dev/Api/query',[\n 'id' =>$billerId->requestId,\n ]))->everyFiveMinutes()\n ->sendOutPutTo('localhost/Ebill/services/file.txt');\n\n \n // $schedule->command('inspire')->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('inspire')->hourly();\n\n\n\n $schedule->command('emails:evento')->everyFiveMinutes();\n\n $schedule->command('emails:oportunidad')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:tareas')->everyFiveMinutes();\n \n $schedule->command('clear')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('repeat')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:send')->daily()->timezone('America/Mexico_City');\n\n }", "public function weekly()\n {\n return $this->cron('0 0 * * 0 *');\n }", "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}", "function recurringdowntime_ccm_hostservice_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'host') {\n $tmp['host_name'] = $cbargs['host_name'];\n } else if ($cbargs['type'] == 'service') {\n $tmp['service_description'] = $cbargs['service_description'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n // Check if host name changed\n if ($cbargs['type'] == 'host') {\n\n // Check if host name changed\n if (!empty($cbargs['old_host_name']) && $cbargs['host_name'] != $cbargs['old_host_name']) {\n foreach ($cfg as $id => $c) {\n\n if ($c['schedule_type'] == 'host' || $c['schedule_type'] == 'service') {\n\n // Replace config host_name that used the old host name\n if ($c['host_name'] == $cbargs['old_host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'host_name' => $cbargs['host_name']\n );\n }\n\n }\n\n }\n }\n\n\n // Check for service description change\n } else if ($cbargs['type'] == 'service') {\n\n // This one is complicated ... we will only do the hosts defined directly to the service\n if (!empty($cbargs['old_service_description']) && $cbargs['service_description'] != $cbargs['old_service_description']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('service_description', $c) && $c['service_description'] == $cbargs['old_service_description']) {\n\n // Get all hosts attached to service\n $sql = \"SELECT host_name FROM nagiosql.tbl_lnkServiceToHost AS lnk\n LEFT JOIN nagiosql.tbl_host AS h ON h.id = lnk.idSlave\n WHERE idMaster = \".intval($cbargs['id']).\";\";\n if (!($rs = exec_sql_query(DB_NAGIOSQL, $sql))) {\n continue;\n }\n\n // Check all hosts against current cfg\n $arr = $rs->GetArray();\n foreach ($arr as $a) {\n if ($c['host_name'] == $a['host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'service_description' => $cbargs['service_description']\n );\n }\n }\n\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "protected function schedule(Schedule $schedule)\n {\n //admim模块下的demo测试任务\n $schedule->command('task_admin_demo_taskone')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务1\n $schedule->command('task_admin_demo_tasktwo')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务2\n $schedule->command('task_admin_demo_taskthree')->everyFiveMinutes()->withoutOverlapping();//admim模块下的demo测试任务3\n\n //xx模块xx任务\n\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "public function getMonthlySchedule()\n {\n return $this->monthly_schedule;\n }" ]
[ "0.5987272", "0.5782062", "0.5704168", "0.55294657", "0.55109507", "0.5332869", "0.53317463", "0.53317463", "0.5288101", "0.52256316", "0.52190703", "0.5199032", "0.5156059", "0.5156059", "0.5024774", "0.50046283", "0.49804658", "0.49520847", "0.49520847", "0.4936416", "0.4927169", "0.4889396", "0.48837748", "0.48628607", "0.48546863", "0.48356766", "0.48314422", "0.48160127", "0.48026028", "0.47983304", "0.47709903", "0.4762821", "0.4753583", "0.47530332", "0.47233176", "0.47198704", "0.47099423", "0.47075212", "0.47061974", "0.4700187", "0.46987513", "0.46943334", "0.46935454", "0.46916208", "0.46777025", "0.4669596", "0.46637878", "0.4662468", "0.46543956", "0.46542206", "0.4652392", "0.46514082", "0.46491122", "0.4634171", "0.463171", "0.46287537", "0.46114394", "0.46087623", "0.46087417", "0.46081606", "0.4606836", "0.45998812", "0.4599299", "0.4589204", "0.45870256", "0.4565045", "0.4560839", "0.45566893", "0.45532832", "0.45497108", "0.45445347", "0.45363715", "0.45303586", "0.45184642", "0.45169604", "0.451103", "0.45089307", "0.45000917", "0.4497733", "0.44802964", "0.44795054", "0.44783866", "0.4475845", "0.44701645", "0.4464879", "0.44529572", "0.4449396", "0.44430667", "0.44417232", "0.4440988", "0.44380116", "0.443798", "0.44356972", "0.4435188", "0.44316715", "0.4427945", "0.4427201", "0.44237578", "0.44237578", "0.44187352" ]
0.6442558
0
Get downtime schedule for specified host
function recurringdowntime_get_service_cfg($host = false) { $cfg = recurringdowntime_get_cfg(); $ret = array(); foreach ($cfg as $sid => $schedule) { if (array_key_exists('schedule_type', $schedule)) { if ($schedule["schedule_type"] == "hostgroup") { continue; } if ($schedule["schedule_type"] == "servicegroup") { continue; } if ($schedule["schedule_type"] == "host") { continue; } } if ($host && !(strtolower($schedule["host_name"]) == strtolower($host))) { continue; } if (array_key_exists('host_name', $schedule)) { if (array_key_exists('service_description', $schedule)) { if ($schedule["service_description"] != '*') { $search_str = $schedule["service_description"]; if (strstr($schedule["service_description"], "*")) { $search_str = "lk:" . str_replace("*", "%", $schedule["service_description"]); } if (!is_authorized_for_service(0, $schedule["host_name"], $search_str)) { continue; } } } if (is_authorized_for_host(0, $schedule["host_name"])) { $ret[$sid] = $schedule; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_host_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"service\") {\n continue;\n }\n }\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n if (array_key_exists('host_name', $schedule)) {\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_hostgroup_cfg($hostgroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"hostgroup\") {\n continue;\n }\n }\n if ($hostgroup && !(strtolower($schedule[\"hostgroup_name\"]) == strtolower($hostgroup))) {\n continue;\n }\n if (array_key_exists('hostgroup_name', $schedule)) {\n if (is_authorized_for_hostgroup(0, $schedule[\"hostgroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "public function findHostDowntimesForAdminUser(): array;", "public function findHostDowntimesForNonAdminUser(): array;", "function recurringdowntime_show_downtime()\n{\n global $request;\n\n do_page_start(array(\"page_title\" => _(\"Recurring Downtime\")), true);\n\n if (isset($request[\"host\"])) {\n $host_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n $service_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n if (is_authorized_for_host(0, $request[\"host\"])) {\n $host_data = recurringdowntime_get_host_cfg($request[\"host\"]);\n $service_data = recurringdowntime_get_service_cfg($request[\"host\"]);\n }\n } elseif (isset($request[\"hostgroup\"])) {\n $hostgroup_tbl_header = _(\"Recurring Downtime for Hostgroup: \") . $request[\"hostgroup\"];\n if (is_authorized_for_hostgroup(0, $request[\"hostgroup\"])) {\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($request[\"hostgroup\"]);\n }\n } elseif (isset($request[\"servicegroup\"])) {\n $servicegroup_tbl_header = _(\"Recurring Downtime for Servicegroup: \") . $request[\"servicegroup\"];\n if (is_authorized_for_servicegroup(0, $request[\"servicegroup\"])) {\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($request[\"servicegroup\"]);\n }\n }\n\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n /*\n $host_tbl_header = \"Recurring Downtime for All Hosts\";\n $hostgroup_tbl_header = \"Recurring Downtime for All Hostgroups\";\n $servicegroup_tbl_header = \"Recurring Downtime for All Servicegroups\";\n */\n $host_tbl_header = _(\"Host Schedules\");\n $service_tbl_header = _(\"Service Schedules\");\n $hostgroup_tbl_header = _(\"Hostgroup Schedules\");\n $servicegroup_tbl_header = _(\"Servicegroup Schedules\");\n $host_data = recurringdowntime_get_host_cfg($host = false);\n $service_data = recurringdowntime_get_service_cfg($host = false);\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($hostgroup = false);\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($servicegroup = false);\n $showall = true;\n }\n\n ?>\n <h1><?php echo _(\"Recurring Downtime\"); ?></h1>\n\n <?php echo _(\"Scheduled downtime definitions that are designed to repeat (recur) at set intervals are shown below. The next schedule for each host/service are added to the monitoring engine when the cron runs at the top of the hour.\"); ?>\n\n <?php\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n ?>\n <p>\n <?php } ?>\n\n <script type=\"text/javascript\">\n function do_delete_sid(sid) {\n input = confirm('<?php echo _(\"Are you sure you wish to delete this downtime schedule?\"); ?>');\n if (input == true) {\n window.location.href = 'recurringdowntime.php?mode=delete&sid=' + sid + '&nsp=<?php echo get_nagios_session_protector_id();?>';\n }\n }\n </script>\n\n <?php\n if ($showall) {\n ?>\n <script type=\"text/javascript\">\n $(document).ready(function () {\n $(\"#tabs\").tabs().show();\n });\n </script>\n\n <div id=\"tabs\" class=\"hide\">\n <ul>\n <li><a href=\"#host-tab\"><?php echo _(\"Hosts\"); ?></a></li>\n <li><a href=\"#service-tab\"><?php echo _(\"Services\"); ?></a></li>\n <li><a href=\"#hostgroup-tab\"><?php echo _(\"Hostgroups\"); ?></a></li>\n <li><a href=\"#servicegroup-tab\"><?php echo _(\"Servicegroups\"); ?></a></li>\n </ul>\n <?php\n }\n ?>\n\n <?php if (!empty($_GET[\"host\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n\n // hosts tab\n if ($showall) {\n echo \"<div id='host-tab'>\";\n }\n ?>\n\n <h4 <?php if ($host) { echo 'style=\"margin-top: 20px;\"'; } ?>><?php echo $host_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n }\n ?>\n\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Months\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Handle Child Hosts\"); ?></th>\n <th class=\"center\" style=\"width: 80px;\"><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($host_data) {\n $i = 0;\n\n $host_names = array();\n foreach ($host_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n }\n array_multisort($host_names, SORT_ASC, $host_data);\n\n foreach ($host_data as $sid => $schedule) {\n if (empty($schedule['childoptions'])) {\n $schedule['childoptions'] = 0;\n }\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? _(\"Yes\") : _(\"No\"); ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"months_of_year\"]) {\n echo $schedule[\"months_of_year\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"childoptions\"] == 0) {\n echo _(\"No\");\n } elseif ($schedule[\"childoptions\"] == 1) {\n echo _(\"Yes, triggered\");\n } elseif ($schedule[\"childoptions\"] == 2) {\n echo _(\"Yes, non-triggered\");\n } ?></td>\n <td class=\"center\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>&nbsp;\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"10\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if host_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end host tab?>\n\n<?php } // end if host or showall\n\nif (!empty($_GET[\"service\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n $service = grab_request_var('service', '');\n\n if ($showall) {\n echo \"<div id='service-tab'>\";\n }\n ?>\n\n <h4><?php echo $service_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Service\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($service_data) {\n $i = 0;\n\n $host_names = array();\n $service_names = array();\n foreach ($service_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n $service_names[$k] = $data['service_description'];\n }\n\n array_multisort($host_names, SORT_ASC, $service_names, SORT_ASC, $service_data);\n\n foreach ($service_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo $schedule[\"service_description\"]; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php'. \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php }?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"9\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host/service recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if service_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end service tab?>\n\n<?php } // end if service or showall\n\nif (!empty($_GET[\"hostgroup\"]) || $showall) {\n\n $hostgroup = grab_request_var('hostgroup', '');\n\n if ($showall) {\n echo \"<div id='hostgroup-tab'>\";\n }\n ?>\n\n <h4><?php echo $hostgroup_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($hostgroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&hostgroup_name=<?php echo $hostgroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this hostgroup\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Hostgroup\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n\n <?php\n\n if ($hostgroup_data) {\n $i = 0;\n\n $hostgroup_names = array();\n foreach ($hostgroup_data as $k => $data) {\n $hostgroup_names[$k] = $data['hostgroup_name'];\n }\n\n array_multisort($hostgroup_names, SORT_ASC, $hostgroup_data);\n\n foreach ($hostgroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"hostgroup_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? \"Yes\" : \"No\"; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n <?php } else { ?>\n <tr>\n <td colspan=\"8\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no hostgroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if hostrgroup_data ?>\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end hostgroup tab?>\n\n<?php } // end if hostgroup or showall\n\nif (!empty($_GET[\"servicegroup\"]) || $showall) {\n\n $servicegroup = grab_request_var('servicegroup', '');\n\n if ($showall) {\n echo \"<div id='servicegroup-tab'>\";\n }\n ?>\n <h4><?php echo $servicegroup_tbl_header; ?></h4>\n <?php\n if (!is_readonly_user(0)) {\n if ($servicegroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&servicegroup_name=<?php echo $servicegroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this servicegroup\"); ?></a>\n </div>\n <?php } else { ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?>\n </a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Servicegroup\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n if ($servicegroup_data) {\n $i = 0;\n\n $servicegroup_names = array();\n foreach ($servicegroup_data as $k => $data) {\n $servicegroup_names[$k] = $data['servicegroup_name'];\n }\n\n array_multisort($servicegroup_names, SORT_ASC, $servicegroup_data);\n\n foreach ($servicegroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"servicegroup_name\"]; ?></td>\n <td><?php echo $schedule[\"comment\"]; ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"recurringdowntime.php?mode=edit&sid=<?php echo $sid; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"7\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no servicegroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if servicegroup_data ?>\n\n\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end servicegroup tab?>\n\n <?php } // end if servicegroup or showall ?>\n\n <?php\n if ($showall) { // end of tabs container\n ?>\n </div>\n <?php\n }\n do_page_end(true);\n}", "public function findDowntimes(int $hostId, int $serviceId): array;", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function testSetGet_schedule_where_time_of_day_has_past() {\n\t\t//The blog time is 10 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '+10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Next week in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+7 days', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Next week in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+7 days', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function schedule(Schedule $schedule){\n\n\t\t$schedule->command('CheckChallengeDeadlines:expirations')->dailyAt('04:00')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [3])->weekly()->mondays()->at('04:30')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [4])->weekly()->thursdays()->at('04:30')->timezone('America/New_York');\n\n\t}", "public function testSetGet_schedule_where_time_of_day_has_not_past() {\n\t\t//The blog time is 2 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$day = date( 'H', $blog_time ) + 1;\n\t\tif ( $day < 10 ) {\n\t\t\t$day = \"0$day\";\n\t\t}\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), $day . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', $blog_time ) . ' ' . $day . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 hour', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['emailchef']['fields']['emailchef_cron_frequency']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_frequency']['value'] :\n EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['emailchef']['fields']['emailchef_cron_offset']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_offset']['value'] :\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log('eMailChef: Could not find cron frequency in valid list. Defaulted to hourly', Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "function get_schedule($usrid){\r\n\t\r\n}", "public function getBackupSchedule()\n {\n return $this->backup_schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n // Da ka Event\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/PunchEvent';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('9:13');\n // Check sprint progress.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/amChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('10:00');\n // Verify completed tasks\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/doneIssueChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('17:30');\n // volunteer for unassigned task.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/todoChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n })->weekdays()\n ->everyFiveMinutes()\n ->timezone('Asia/Shanghai')\n ->between('9:50', '22:00');\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function findDowntimesByServiceForAdminUser(int $hostId, int $serviceId): array;", "public function getScheduleTime(){return $this->time_of_day;}", "public function testSetGet_schedule_where_time_of_day_has_past_and_no_day_supplied() {\n\t\t//The blog time is -4 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( null, date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+1 day', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 day', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "protected function schedule(Schedule $schedule)\n {\n // $configuracao = DB::table('configuracao')->first();\n\n // if($configuracao->frequencia == 'Diária')\n // {\n // $schedule->call(function (){\n // Ente::importar();\n // HistoricoDeAcesso::importar();\n // })->dailyAt($configuracao->horario); \n // }\n // else\n // {\n // $schedule->call(function (){\n // Ente::importar();\n // HistoricoDeAcesso::importar();\n // })->weekly()->fridays()->at($configuracao->horario); \n // }\n \n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')->hourly();\n }", "public function schedule(): Schedule\n {\n return $this->schedule;\n }", "public function findDowntimesByServiceForNonAdminUser(int $hostId, int $serviceId): array;", "public function getWFScheduleTime() {\n\t\tif (isset($this->multipleschtime)) {\n\t\t\t$multipleschtime = explode(',', $this->multipleschtime);\n\t\t\tusort($multipleschtime, function ($time1, $time2) {\n\t\t\t\t$t1 = strtotime($time1);\n\t\t\t\t$t2 = strtotime($time2);\n\t\t\t\treturn $t1 - $t2;\n\t\t\t});\n\t\t\t$currentTrigger = array_search(date('g:i a', strtotime($this->schtime)), $multipleschtime);\n\t\t\tif (!$currentTrigger && $currentTrigger !== 0) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[0]));\n\t\t\t\t$this->updateSchtime($multipleschtime[0]);\n\t\t\t} elseif (!isset($multipleschtime[$currentTrigger + 1])) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[count($multipleschtime)-1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t} else {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[$currentTrigger + 1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t}\n\t\t\treturn $nextTiggerTime;\n\t\t}\n\t\treturn $this->schtime;\n\t}", "function card_schedule_get(){\n\t\tif ($this->get('idspbu') == NULL){\n\t\t\t$this->response(array( 'status' => \"ID SPBU not found\" ), 408);\n\t\t} else {\n\t\t\t$param['id_spbu'] = $this->get('idspbu');\n\t\t\t$param['id_pelanggan'] = $this->get('idpelanggan');\n\t\t\t$param['id_card'] = $this->get('idcard');\n\t\t\t$param['nik'] = $this->get('nik');\n\t\t\t\n\t\t\t$response = $this->rest_model->getCard($this->get('idspbu'), $param);\n\t\t\tif(!empty($response)){\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"NULL\" ), 406);\n\t\t\t}\n\t\t}\n\t}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('autoBanSubscribeJob')->everyThirtyMinutes();\n $schedule->command('autoBanUserJob')->everyTenMinutes();\n $schedule->command('autoCheckNodeStatusJob')->everyMinute();\n $schedule->command('autoClearLogJob')->everyThirtyMinutes();\n $schedule->command('autoCloseOrderJob')->everyMinute();\n $schedule->command('autoDecGoodsTrafficJob')->everyTenMinutes();\n $schedule->command('autoDisableExpireUserJob')->everyMinute();\n $schedule->command('autoDisableUserJob')->everyMinute();\n $schedule->command('autoExpireCouponJob')->everyThirtyMinutes();\n $schedule->command('autoExpireInviteJob')->everyThirtyMinutes();\n $schedule->command('autoReleasePortJob')->everyMinute();\n $schedule->command('autoReopenUserJob')->everyMinute();\n $schedule->command('autoResetUserTrafficJob')->everyFiveMinutes();\n $schedule->command('autoStatisticsNodeDailyTrafficJob')->dailyAt('04:30');\n $schedule->command('autoStatisticsNodeHourlyTrafficJob')->hourly();\n $schedule->command('autoStatisticsUserDailyTrafficJob')->dailyAt('03:00');\n $schedule->command('autoStatisticsUserHourlyTrafficJob')->hourly();\n $schedule->command('userExpireWarningJob')->daily();\n $schedule->command('userTrafficWarningJob')->daily();\n $schedule->command('autoStatisticsNodeHourlyTestJob')->hourlyAt(10);\n// $schedule->command('autoStatisticsNodeHourlyTestJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpJob')->dailyAt('00:00');\n// $schedule->command('autoMysqlBackUpJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpRemoteJob')->dailyAt('00:30');\n $schedule->command('cPJob')->everyMinute();\n $schedule->command('deleteAuthJob')->everyMinute();\n $schedule->command('pushJob')->dailyAt('13:37');\n $schedule->command('telegramJob')->everyMinute();\n $schedule->command('autoCountNodeFlow')->everyMinute();\n\n\n\n }", "public function findDowntimesForAdminUser(): array;", "protected function schedule(Schedule $schedule)\n {\n //更新wiki的昨天热度数据,每天5点执行\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('5:00');\n //从欢网数据中心同步7天节目单,每周日早上3点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0,+1,+2,+3,+4,+5,+6,+7'])->dailyAt('3:00')->sundays();\n //从欢网数据中心同步当天和昨天节目单任务,每天6,10点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=-1,0,+1'])->twiceDaily(6, 10);\n //从欢网数据中心同步当天节目单任务,每天13,15,18,23点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(13, 15);\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(18, 23);\n //从欢网数据中心同步频道热度,每五分钟执行一次\n $schedule->command(Commands\\CronUpdateChannelHotFromHuan::class)->everyFiveMinutes();\n //更新正在播出的节目,每分钟执行一次\n $schedule->command(Commands\\CronUpdateLiveProgram::class)->everyMinute();\n //维基热度,可回看,可预约维基计算,每天8点执行一次\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('8:00');\n //从腾讯视频获取vod的热度数据\n $schedule->command(Commands\\CronUpdateQQAlbumHotFromQQ::class)->twiceDaily(7, 11);\n //从HDP更新频道列表,每天一次\n $schedule->command(Commands\\CronUpdateHdpChannels::class)->dailyAt('8:20');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('make:rss')->hourly();\n\n }", "function GetAllSchedules() {\n\tglobal $server;\n\tglobal $user;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t$array = LaunchCurl($url);\n\treturn $array;\n}", "public function getNextTriggerTime() {\n\t\tglobal $default_timezone;\n\t\t$admin = Users::getActiveAdminUser();\n\t\t$adminTimeZone = $admin->time_zone;\n\t\t@date_default_timezone_set($adminTimeZone);\n\n\t\t$scheduleType = $this->getWFScheduleType();\n\t\t$scheduleMinute= $this->getScheduleMinute();\n\t\t$nextTime = date('Y-m-d H:i:s');\n\t\tif ($scheduleType==Workflow::$SCHEDULED_BY_MINUTE) {\n\t\t\t$nextTime=date('Y-m-d H:i:s', strtotime(\"+ $scheduleMinute minutes\"));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_HOURLY) {\n\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime('+1 hour'));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_DAILY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForDaily($this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_WEEKLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForWeekly($this->getWFScheduleWeek(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_DATE) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByDate($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_WEEKDAY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByWeekDay($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_ON_SPECIFIC_DATE || $scheduleType == Workflow::$SCHEDULED_ANNUALLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForAnnualDates($this->getWFScheduleAnnualDates(), $this->getWFScheduleTime());\n\t\t}\n\t\t@date_default_timezone_set($default_timezone);\n\t\treturn $nextTime;\n\t}", "public function getSchedule()\n\t\t{\n\t\t\tif ($this->schedule === NULL)\n\t\t\t{\n\t\t\t\t$this->schedule = new ECash_Transactions_Schedule($this);\n\t\t\t}\n\n\t\t\treturn $this->schedule;\n\t\t}", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysdate() as now\n from schedule\n ORDER BY gameDate\";\n\n try {\n return $this->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"\"}}';\n }\n }", "public static function getSchedulePattern(): string;", "public function schedules()\n {\n $inVacation = config('schedules')['vacation'];\n $weekdays = config('schedules')['tabData']['days'];\n\n if ($inVacation) {\n $schedules = [\n 'sun' => null,\n 'mon' => null,\n 'tue' => null,\n 'wed' => null,\n 'thu' => null,\n 'fri' => null,\n 'sat' => null\n ];\n\n $scheduleMessage = config('schedules')['vacationMessage'] . '<br>...';\n } else {\n $schedules = $this->schedules->getByDay();\n $scheduleMessage = 'Sem horários<br>...';\n }\n\n return [\n 'weekDays' => $weekdays,\n 'currentDay' => \\strtolower(\\date('D')),\n 'schedules' => $schedules,\n 'scheduleEmptyMessage' => $scheduleMessage\n ];\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('cluster:refresh')->dailyAt('04:00');\n $schedule->command('cluster:refresh')->dailyAt('07:00');\n $schedule->command('cluster:refresh')->dailyAt('12:00');\n $schedule->command('cluster:refresh')->dailyAt('19:00');\n $schedule->command('cluster:refresh')->dailyAt('23:00');\n // $schedule->command('inspire')\n // ->hourly();\n }", "public function getScheduleTime()\n {\n return $this->schedule_time;\n }", "function jetpack_sync_full_sync_interval( $schedule_name ) {\n\treturn 'twicedaily';\n}", "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->weekdays()->at('17:00');\n }", "function getScheduledTasks ( $notification )\n\t{\n\t\t$maxHourOffset = 0;\n\t\t$sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess();\n\t\t$baseDate = Piwik_Date::factory(\"1971-01-01\");\n\t\tforeach($sites as &$site)\n\t\t{\n\t\t\t$offsetDate = Piwik_Date::factory($baseDate, $site['timezone']);\n\n\t\t\t// Earlier means a negative timezone\n\t\t\tif ( $offsetDate->isEarlier($baseDate) )\n\t\t\t{\n\t\t\t\t// Gets the timezone offset\n\t\t\t\t$hourOffset = (24 - date ('H', $offsetDate->getTimestamp()));\n\n\t\t\t\tif ( $hourOffset > $maxHourOffset )\n\t\t\t\t{\n\t\t\t\t\t$maxHourOffset = $hourOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tasks = &$notification->getNotificationObject();\n\n\t\t$dailySchedule = new Piwik_ScheduledTime_Daily();\n\t\t$dailySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'dailySchedule', $dailySchedule );\n\n\t\t$weeklySchedule = new Piwik_ScheduledTime_Weekly();\n\t\t$weeklySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'weeklySchedule', $weeklySchedule );\n\n\t\t$monthlySchedule = new Piwik_ScheduledTime_Monthly();\n\t\t$monthlySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'monthlySchedule', $monthlySchedule );\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n // aca donde vas a configurar las horas que se enviaran\n $schedule->command('trabajador:cumpleanios')->dailyAt('10:00');\n $schedule->command('trabajador:contrato')->dailyAt('11:52');\n\n }", "public function scheduledDeposits($cursor = \"\")\n {\n return $this->get('ach/deposit_schedules', ['cursor' => $cursor]);\n }", "public function getScheduledJob($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"get\", $params, $context);\n\t}", "protected function schedule(Schedule $schedule)\n {\n $date = now();\n\n /**\n * Employees\n * -------------------------------------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n /**\n * Ring Central Commands\n * ---------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyProductionReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:25');\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyRawReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:45');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Publishing\\SendPublishingProductionReportCommand::class)->everyThirtyMinutes();\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalFlashReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalProductionReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalTextCampaignReportCommand::class)->dailyAt('07:20');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\HotelPlanning\\SendHotelPlanningProductionReportCommand::class, ['--date' => now()->format('Y-m-d')])->hourly();\n\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendDailySummaryCommand::class)->dailyAt('06:20');\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendWTDSummaryCommand::class)->dailyAt('06:30');\n // check for dispositions\n $schedule->command(\\App\\Console\\Commands\\CheckForDispositionsPendingIdentification::class)->everyThreeHours();\n\n /**\n * Clean up commands\n * ----------------------------------------------------------------------\n */\n $schedule->command(\\Dainsys\\Commands\\ClearLogs\\ClearLogsCommand::class, [\n '--clear',\n '--keep=3',\n ])->dailyAt('02:00');\n\n $schedule->command(\\App\\Console\\Commands\\ClearTempraryFiles::class, [\n // 'remove_files_older_than_days' => 5\n 5,\n ])->dailyAt('20:45');\n\n $schedule->command(\\Spatie\\Backup\\Commands\\BackupCommand::class)->dailyAt('21:15');\n $schedule->command(\\Spatie\\Backup\\Commands\\CleanupCommand::class)->dailyAt('22:15');\n\n $schedule->command(\\App\\Console\\Commands\\UpdateBillableHoursAndRevenue::class, [now()->subDays(1)->format('Y-m-d') . ',' . now()->format('Y-m-d')])->dailyAt('01:15');\n $schedule->command(\\Illuminate\\Database\\Console\\PruneCommand::class, [\n '--model' => [\n \\App\\Models\\Performance::class,\n \\App\\Models\\UserLogin::class,\n \\App\\Models\\Notification::class,\n ],\n ])->dailyAt('02:15');\n\n $schedule->command(\\Laravel\\Telescope\\Console\\PruneCommand::class, ['--hours' => 72])->dailyAt('06:40');\n }", "function campaignSchedule($cid, $schedule_time, $schedule_time_b=NULL) {\n $params = array();\n $params[\"cid\"] = $cid;\n $params[\"schedule_time\"] = $schedule_time;\n $params[\"schedule_time_b\"] = $schedule_time_b;\n return $this->callServer(\"campaignSchedule\", $params);\n }", "public static function getSchedDay($date, $user) {\n\n // Slot defaults\n $schedDay = new SchedDay($date);\n /*\n $sql = SchedDao::SQL_SELECT_SCHED .\n \" WHERE user_id=\" . $user->id . \" AND date=\" . quote($date) .\n \" ORDER BY time_start, client_id\";\n $res = query($sql); \n $scheds = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $sched = SchedDao::buildSched($row);\n $sched->client = SchedDao::getClient($sched->clientId);\n $scheds[] = $sched;\n }\n */\n logit_r('here getschedday');\n $scheds = Scheduling::getAppts($date, $user->id);\n $schedUser = new SchedUser($user->id, $user->uid, $user->name);\n $schedUser->scheds = $scheds;\n $schedDay->users[] = $schedUser;\n return $schedDay;\n }", "function showschedule($id){\r\n\tglobal $conn;\r\n\t$time=getdate();\r\n\t\r\n\t$query = \"SELECT * FROM schedules WHERE id='\".$id.\"' ORDER BY fin_date ASC\";\r\n\t$res = mysql_query($query,$conn);\r\n\twhile ($rows = mysql_fetch_array($res)){\r\n\r\n\t\r\n\r\n\t\tif($rows['onoff'] == 1){\r\n\r\n\t\t\t$lock=0;\r\n\t\t\t$firsthourpassed=0;\r\n\t\t\t$de = 0;\r\n\t\t\t$min = \"00\";\r\n\t\t\t$tim = \"00\";\r\n\t\t\t$stopschdl=0;\r\n\r\n\r\n\t\t\tif($rows['fin_date'] == $today){\r\n\t\t\t\tif((($time['hours'] > $rows['start_hour']) || ($time['hours'] == $rows['start_hour'] && $time['minutes'] >= $rows['start_minute'])) && (($time['hours'] < $rows['fin_hour']) || ($time['hours'] == $rows['fin_hour'] && $time['minute'] <= $rows['fin_minute']))){\r\n\t\t\t\t\t$lock=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t\tfor ($j = $rows['start_hour']; $j <= $rows['fin_hour']; $j++) {\r\n\t\t\t\tfor ($i = 0; $i < 60; $i= $i+$rows['minutes']) {\r\n\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($rows['fin_minute'] <= $i) ){\r\n\t\t\t\t\t\t\t$stopschdl=1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($stopschdl==0){\r\n\t\t\t\t\t\tif($i >0){\r\n\t\t\t\t\t\t\t$finalleftover= 60 - $i;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($firsthourpassed==1 && $i==0 && $finalleftover>0){\r\n\t\t\t\t\t\t\tif($finalleftover < $rows['minutes']){\r\n\t\t\t\t\t\t\t\t$i = $rows['minutes']-$finalleftover;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($firsthourpassed==0){\r\n\t\t\t\t\t\t\t$i=$rows['start_minute'];\r\n\t\t\t\t\t\t\t$firsthourpassed=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($i < 10){\r\n\t\t\t\t\t\t\t$min= \"0\".$i;\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t$min= $i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($rows['seconds'] == '30'){\r\n\t\t\t\t\t\t\tif($de == 1){\r\n\t\t\t\t\t\t\t\t$tim = \"30\";\r\n\t\t\t\t\t\t\t\t$de=0;\r\n\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t$tim = \"00\";\r\n\t\t\t\t\t\t\t\t$de=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$q = \"SELECT * FROM studentslots WHERE sch_date_id ='\".$rows['id'].$j.$min.$tim.\"'\";\r\n\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\t\t\t\t\t\t$date_id=$rows['id'].$j.$min.$tim ;\r\n\r\n\t\t\t\t\t\tif(isset($row['user_id'])){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$q = \"SELECT * FROM users WHERE id ='\".$row['user_id'].\"'\";\r\n\t\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-theme='c' class='ui-li ui-li-static ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\techo \"<p class='ui-li-aside ui-li-desc'><strong>\".$j.\":\".$min.\":\".$tim.\"</strong></p> <h3 class='ui-li-heading'>Name : \" . $row['first_name'] . \" \" . $row['last_name'] . \"</h3> <p class='ui-li-desc'><strong>AEM : \" . $row['aem'] . \" </strong></p>\" ;\r\n\t\t\t\t\t\t\techo \"</div></div></li>\";\r\n\r\n\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-icon='arrow-r' data-iconpos='right' data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(isset($_SESSION['username'])){\r\n\t\t\t\t\t\t\t\techo \"<a href='mobilefunctions.php?id=\".$rows['id'].\"&date_id=\".$date_id.\"&user_id=\".$_SESSION['id'].\"&gid=\".$rows['gid'].\"' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\techo \"<a href='login.php' data-rel='dialog' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\techo \"<tr> <td id='timetd'>\".$j.\":\".$min.\":\".$tim.\" </td> <td id='nametd'> </td><td id='aemtd'> </td>\" ;\r\n\t\t\t\t\t\t\techo \"</a></div><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></div></li>\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"</li>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tempmin = $rows['minutes'] + $i; \r\n\r\n\t\t\t\t\t\tif($tempmin >= 60){\r\n\t\t\t\t\t\t\t$tempmin = $tempmin - 60 ;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($tempmin >= $rows['fin_minute']) ) {\r\n\t\t\t\t\t\t\t$i=61;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:endrbtcontent')->daily();\n $schedule->command('notify:endcontractrenew')->daily();\n $schedule->command('notify:roadmapstartdate')->daily();\n $schedule->command('contract:auto_renew')->daily();\n\n\n $schedule->command('notify:endcontract')->weeklyOn(1, '8:00'); //weekly each monday at 10:00\n $schedule->command('notify:attachments')->weeklyOn(1, '08:15'); //weekly each monday at 10:15\n\n // $schedule->command(\"queue:work --tries=3 --daemon\");\n\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n $schedule->call(function() {\n\t\t\tSendMail::sendmails();\n\t\t})->name('sendmails')->everyFiveMinutes()->withoutOverlapping();\n $schedule->command('owish:update')->daily();\n\t\t$schedule->call(function () {\n $ows = DB::table('owarehouse')->where('status','active')->get();\n\t\t\tforeach($ows as $ow){\n\t\t\t\t$date = $ow->created_at;\n\t\t\t\t$date = strtotime($date);\n\t\t\t\t$current_date = strtotime(date('Y-m-d H:i:s'));\n\t\t\t\t$date1 = new DateTime('now');\n\t\t\t\t$date2 = new DateTime(date('Y-m-d H:i:s', strtotime(\"+ $ow->duration day\", $date)));\n\t\t\t\t$dDiff = $date1->diff($date2);\t\n\t\t\t\t$status=1;\n\t\t\t\tif ($dDiff->format(\"%r\") == '-') {\n\t\t\t\t\t$status=0;\n\t\t\t\t}\n\t\t\t\t$product = DB::table('product')->where('id',$ow->product_id)->first();\n\t\t\t\t$available = 0;\n\t\t\t\tif(!is_null($product)){\n\t\t\t\t\t$available = $product->available;\n\t\t\t\t}\n\t\t\t\tif($available == 0){\n\t\t\t\t\t$status=0;\n\t\t\t\t}\n\t\t\t\tif($status == 0){\n\t\t\t\t\tDB::table('owarehouse')->where('id',$ow->id)->\n\t\t\t\t\t\toupdate(['status','expired']);\n\t\t\t\t\t$pledges = DB::table('owarehousepledge')->\n\t\t\t\t\t\twhere('owarehouse_id',$ow->id)->count();\n\n\t\t\t\t\tif($pledges < $ow->moq){\n\t\t\t\t\t\t/************* OPEN CREDIT**************/\n\t\t\t\t\t\t$pledges = DB::table('owarehousepledge')->\n\t\t\t\t\t\t\twhere('owarehouse_id',$ow->id)->get();\n\n\t\t\t\t\t\t/*foreach($pledges as $pledge){\n\t\t\t\t\t\t}*/\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/************* PROCESS PLEDGES **************/\n\t\t\t\t\t\tDB::table('owarehouse')->\n\t\t\t\t\t\t\twhere('id',$ow->id)->update(['status','excecuted']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$ows = DB::table('owarehouse')->\n\t\t\t\twhere('status','active')->get();\n })->daily();\n }", "protected function schedule(Schedule $schedule)\n {\n $hour = date('h');\n if($hour%2 == 0)\n $exec = 1;\n else\n $exec = 0;\n\n switch ($exec) {\n case 1:\n $schedule->call('App\\Http\\Controllers\\CronController@getRefreshAccessToken')->hourly();\n $schedule->call('App\\Http\\Controllers\\CronController@projects')->hourly();\n break;\n case 0:\n $schedule->call('App\\Http\\Controllers\\CronController@getRefreshAccessToken')->hourly();\n $schedule->call('App\\Http\\Controllers\\CronController@subTasks')->hourly();\n break;\n default:\n break;\n }\n\n $schedule->call('App\\Http\\Controllers\\CronController@sendWeeklyMail')->saturdays()->at('04:30');\n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//$schedule->command('inspire')->hourly();\n $schedule->command('jamyl:allchecks')->everyFiveMinutes();\n $schedule->command('jamyl:firekillbot')->everyFiveMinutes();\n $schedule->command('jamyl:manage')->everyFiveMinutes();\n $schedule->command('jamyl:getchannels')->Hourly();\n $schedule->command('jamyl:punk')->dailyAt('10:05');\n $schedule->command('api:getalliances')->dailyAt('00:01');\n $schedule->command('api:getcontactlists')->twiceDaily();\n $schedule->command('api:getcorporations')->everyFiveMinutes();\n $schedule->command('jamyl:refreshgrouppermissions')->everyFiveMinutes();\n $schedule->command('ts3:checknickames')->everyFiveMinutes();\n $schedule->command('ts3:updateaccess')->everyFiveMinutes();\n $schedule->command('ts3:checknicknames')->everyFiveMinutes();\n //$schedule->command('ts3:getgroups')->twiceDaily();\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n /* Funciona */ \n $schedule->command('usuarios:cumples')->timezone('America/Lima')->at('08:00');\n\n $schedule->command('estado:cumples')->timezone('America/Lima')->at('08:00');\n \n $schedule->command('active:cumples')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:comcumple')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:tarjeta')->timezone('America/Lima')->monthly(); \n\n\n $schedule->command('estado:conferencias')->timezone('America/Lima')->hourly();\n\n \n }", "function jetpack_sync_incremental_sync_interval( $schedule_name ) {\n\treturn 'hourly';\n}", "protected function getSendingSchedule()\n\t{\n\t\treturn null;\n\t}", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n// $schedule->call(function(){\n// $time=date('H');\n $date=date('Y-m-d');\n// $data=[];\n// if($time>0){\n// $reserves=Reserve::where('date',$date)->whereIn('progress',[1,3])->get();\n// foreach($reserves as $k=>$v){\n// $v->progress=2;\n// $v->save();\n// $number=Number::where('reserve_id',$v->id)->where('number_class',1)->first();\n// if($number){\n// $number->number_push=1;\n// $number->number_status=0;\n// $number->save();\n// }\n// }\n// DB::table('reserves')->where('date',$date)->whereIn('progress',[1,3])->where('halt',0)->update('progress',2);\n//// }\n// })->everyMinute();\n\n }", "protected function schedule(Schedule $schedule)\n {\n Log::info('=====定时任务开始====');\n // 定时发券\n $schedule->command('set:coupon')->everyMinute();\n $schedule->command('delay:coupon')->everyMinute();\n //活动开启和失效\n $schedule->command('period:active')->daily();\n //优惠券模板失效\n $schedule->command('period:coupon')->daily();\n //发券过期失效\n $schedule->command('period:coupon_grand')->daily();\n // 个人优惠券失效\n $schedule->command('invalid:coupon_library')->daily();\n //清理订单锁\n $schedule->command('clr:orderLock')->everyMinute();\n //快递单的状态\n $schedule->command('delay:express')->daily();\n // 积分商城商品过期定时下架\n $schedule->command('period:mall')->daily();\n //个人优惠券延迟失效\n $schedule->command('delay_period_coupon_library')->everyMinute();\n // 星球会员过期\n $schedule->command('expire:star')->daily();\n // 星球会员生日好礼\n $schedule->command('star:birthday')->monthlyOn(1, '0:0');\n // 星球会员每月福利\n $schedule->command('star:welfare')->everyThirtyMinutes();\n // 星球会员升级券包 处理\n $schedule->command('gift:handle')->everyMinute();\n // 关闭星球会员购买订单\n $schedule->command('close:card_order')->everyMinute();\n // 积分经验值补录定时器\n $schedule->command('add:record')->everyMinute();\n // 查询未核销券进行核销\n $schedule->command('cancel:coupon_library')->everyMinute();\n // go定时升级\n $schedule->command('go_level:trigger')->everyMinute();\n // 星球定时升级\n $schedule->command('star_level:trigger')->everyMinute();\n //使用优惠券通知小游戏\n $schedule->command('mini_game_notify')->everyMinute();\n //凌晨积分经验值补录\n $schedule->command('dirly:record')->daily();\n //优惠券到期提示通知\n $schedule->command('period:message')->daily();\n // go会员升级提醒\n $schedule->command('remind:go:upgrade')->everyMinute();\n // 星球会员升级提醒\n $schedule->command('remind:star:upgrade')->everyMinute();\n // 星球会员过期提醒\n $schedule->command('remind:star:overdue')->daily()->at('5:28');\n Log::info('=====定时任务结束====');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:rehabilitations')->twiceDaily(1, 22);\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n \n\n $schedule->call(function(){\n\n \n $jadual = Telegram::all();\n\n foreach ($jadual as $jaduals) {\n $str_time = $jaduals->masa;\n sscanf($str_time, \"%d:%d:%d\", $hours, $minutes, $seconds);\n $masa = isset($hours) ? $hours * 3600 + $minutes * 60 + $seconds : $minutes * 60 + $seconds;\n $apiToken = \"\";\n $jawapan = $jaduals->answer;\n $jawapan = explode(',', $jawapan);\n $jawapan = json_encode($jawapan);\n \n \n $data = ['chat_id' => $jaduals->chatid, 'question' => $jaduals->question, 'options' => $jawapan, 'is_anonymous' => 'False', 'open_period' => $masa];\n Http::post(\"https://api.telegram.org/bot$apiToken/sendPoll?\" . http_build_query($data));\n }\n \n })->weekdays()->timezone('Asia/Kuala_Lumpur')->at('02:11');\n \n\n }", "public function findDowntimesForNonAdminUser(): array;", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('regverification:clean')\n// ->daily();\n// $schedule->command('activity:begin:remind')\n// ->dailyAt('12:30');\n// $schedule->command('teammember:report:pendingenrollmentrequests')\n// ->dailyAt('22:00');\n// // not need to remind\n//// $schedule->command('activity:report:pendingalbumimages')\n//// ->dailyAt('09:10');\n// $schedule->command(\"storage:tmp:clean -e '3 days'\")\n// ->dailyAt('03:00');\n// $schedule->command(\"attendant:export -l gaoxin_attendants -t [email protected]\")\n// ->dailyAt('08:00');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('youtube:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('youtube:duration')\n ->everyMinute()\n ->withoutOverlapping();\n\n $schedule->command('vidme:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('delete:synced')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('clean:user_watched_table')\n ->weekly()\n ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate www')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate en')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate il')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ar')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ro')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ru')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n $schedule->command('videocache:generate')\n ->everyTenMinutes()\n ->withoutOverlapping();\n\n // $schedule->command('download:livefeedxml')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson en')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson il')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ar')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ro')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ru')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson www')\n // ->everyMinute()\n // ->withoutOverlapping();\n }", "public function get_payout_schedule() {\n $crons = _get_cron_array();\n\n $schedule = array();\n\n foreach ( $crons as $timestamp => $cron ) {\n if ( isset( $cron[ 'edd_commissions_payout' ] ) ) {\n $schedule[] = $timestamp;\n }\n }\n\n sort( $schedule, SORT_NUMERIC );\n\n return $schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n //每天五点钟执行\n $cron = new ACXCronController();\n $schedule->call(function ()use($cron){\n try{\n $cron->bak_block_opt_data();;\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage(),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->dailyAt('5:01');\n\n //每一个小时执行一次\n $schedule->call(function ()use($cron){\n try{\n $cron->update_withdraw_change_from_24hour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->hourly();\n\n\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->oneMinute();\n $minute = date(\"i\",time());\n //--执行分钟任务\n $croncontroller->oneMinute();\n if($minute%5==0)$croncontroller->fiveMinute();\n if($minute%15==0)$croncontroller->fifteen();\n if($minute%30==0) $croncontroller->halfHour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->everyMinute();\n\n //--每小时\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $hour =date(\"H\",time());\n //--执行小时任务\n $croncontroller->oneHour();\n if($hour%2==0)$croncontroller->twoHour();\n if($hour%6==0)$croncontroller->sixHour();\n if($hour%12==0)$croncontroller->twelveHour();\n if($hour==0)$croncontroller->oneDay();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->hourly();\n\n\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->week();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->weekly();\n\n\n //充值确认定时任务 15分钟一次\n $schedule->call(function (){\n try{\n $acxCron = new ACXCronController();\n $acxCron->getReceiveHistory();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n })->everyFiveMinutes();\n\n //每月执行当\n $withdrawal = new WithdrawalControl();\n $schedule->call(function ()use($withdrawal){\n $resOne = $withdrawal->upgrade();\n $dataOne = ['email'=>'[email protected]','newEmail'=>'upgrade'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n })->monthly();\n\n //自定义规则提现额度 每是分钟\n $schedule->call(function ()use($withdrawal){\n //开始\n $resOne = $withdrawal->customizeRunStart();\n if (!$resOne[0]){\n $dataOne = ['email'=>'[email protected]','newEmail'=>'customizeRunStart'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n }\n //结束\n $resTwo = $withdrawal->customizeRunEnd();\n if (!$resTwo[0]){\n $dataTwo = ['email'=>'[email protected]','newEmail'=>'customizeRunEnd'.json_encode($resTwo),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataTwo));\n }\n })->daily();\n\n\n //增加每分钟判断是不是有低价订单\n $schedule->call(function(){\n #CronController::getSendHistory('BTC');\n $check_order_controller=new CheckOrderController();\n $result=$check_order_controller->check_order_list_dingshi(\"admin\",\"fZGGz4BmSNbHzYr1cEYgfMEl0UOs59cn\");\n $data = ['email'=>'[email protected]','newEmail'=>$result,'url'=>now()];\n # Mail::to('[email protected]')->send(new ChangeEmail($data));\n })->everyMinute();\n\n \n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('LTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BCH');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('RPZ');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('XVG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('DASH');\n })->everyFiveMinutes();\n\n //后台-----------------------\n $schedule->call(function() {\n BackController::getCurrencyInfoRun();\n })->everyTenMinutes();\n }", "public function get_timetable() {\n $week = $this->qc->timetable_get_week();\n $days = array();\n\n for ($i=2; $i < count($week); $i++) {\n $day = $this->qc->timetable_get_day($week[$i]);\n array_push($days, $day);\n }\n }", "function update_interval_schedule($int) {\n\t//check schedule exists, remove it, add new one\t\n\twp_clear_scheduled_hook('standards_resource_check');\t\n\tif ($int > 0)\n\t\twp_schedule_single_event( time() + 3600 * $int, 'standards_resource_check' );\n}", "public function getScheduleList($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"getList\", $params, $context);\n\t}", "static function fetchJobSchedule( $jobId ) {\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT job_id, classname, repeat_time_minutes, repeat_daily_at, active_yn, last_run_date \n FROM job_scheduler\n WHERE job_id = %d\", $jobId));\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n foreach( $resultset as $record ) {\n return $record;\n }\n return null;\n }", "function dayScheduleA()\n\t{\n\t$scheduleDay = array(45, 60, 90, 120, 150, 180, 210, 240);\n\treturn $scheduleDay;\n\t}", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//Runs daily, every 5 minutes from 03:00\n\t\t$schedule->command(TranslationsBackup::class)->dailyAt('03:00'); // Dispatching a Job that will create a CSV File with the translations\n\t\t$schedule->command(RemoveCsvFiles::class, ['1', '--queue'])->dailyAt('03:05'); // Remove CSV Files older than x months (default 1) from /var/www/public/admin/reports/csv\n\t\t$schedule->command(DeleteOldTokens::class, ['1'])->dailyAt('03:10'); // Deletes the tokens that are older than x (default 1) days\n\t\t$schedule->command(DeleteUselessTransactions::class, ['3', '1000'])->dailyAt('03:15'); //Delete a number of created transactions older than 3 months\n\t\t//$schedule->command(DeleteExpiredClients::class, ['1000'])->dailyAt('03:20'); // TODO: This comes from V1, why do we do it? Clear expired maestro clients\n\n\t\t//Runs every hour\n\t\t$schedule->command(ActivateVouchers::class)->hourly(); // Activate vouchers that are inactive and startDate < now()\n\t\t$schedule->command(DeactivateVouchers::class)->hourly(); // Deactivate vouchers that are active and stopDate < now()\n\t\t//$schedule->command(ClearPasswordAttempts::class, ['3'])->hourly(); // Update reminder table where there are more than 2 attempts and updated < last x (default 3) hours\n\t\t//$schedule->command(ClearHheClients::class)->hourly(); // TODO: This comes from V1, why do we do it? Clear expired hhe clients\n\n\t\t//Runs every 10 minutes\n\t\t//$schedule->command(MerakiCheck::class)->everyTenMinutes(); // Update airhealth.hardware based on a xml taken from a URL from site_attribute having \"meraki_network\"\n\t\t//$schedule->command(DestroyGhostSessions::class, ['10'])->everyTenMinutes(); // 1. Cleaning up NULL Connectinfo_Start records; 2. Cleaning up NULL Connectinfo_Stop records and acctstoptime; 3. Removing records stale for x (default 10) minutes\n\t\t//$schedule->command(ShutdownIdle::class, ['20'])->everyTenMinutes(); // Shuts down sessions older than x (default 20) minutes where IP is 192.168.1.2 by adding a acctstoptime | Might be CC only\n\t\t//$schedule->command(UpdateGender::class)->everyTenMinutes(); // Checks the name with the names that we have in our DB to return the gender\n\t\t$schedule->command(UpdatePmsDynamicIp::class)->everyTenMinutes(); // Updates the IP of site attributes that have dynamic_ip enabled (for UPMS and Captive PMS)\n\n\t\t//Runs every minute\n\t\t$schedule->command(DeleteTransactionReceipts::class, ['2', '10000'])->everyMinute(); // Delete a number of transaction receipts older than x (default 2) months\n\n\t\t// These are the SSID scheduling and was never implemented (unless it was)\n//\t\t$schedule->command(RevertScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n//\t\t$schedule->command(ChangeScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n\t}", "public function findDowntimesByHostForAdminUser(int $hostId, bool $withServices): array;", "public function getDownTimeToday(){\n return Notification::calculateDailyDowntime($this);\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function(){\n $orders = order::where('approved', 'pending')->get();\n foreach ($orders as $order) {\n $order->approved = 'cancelled';\n $order->save();\n }\n })->daily();\n\n $schedule->call(function(){\n $orders = Order::whereNotNull('until')->get();\n foreach ($orders as $order) {\n $service = Service::where('cost', $order->amount)->first();\n $username = $order->username;\n if (Carbon::parse(now())->diffInDays($order->until, false) <= 0) {\n \tif (is_null($order->until)) {\n\t\t\t\t\t\t$until = \"NULL\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$until = $order->until;\n\t\t\t\t\t\t$order->until = null;\n\t\t\t\t\t\t$order->save();\n\t\t\t\t\t\tLog::debug('Neteko Paslaugos: ' . $username . '---'. $service->name);\n\t\t\t\t\t}\n\n\t\t\t\t\t$host = env('Server_IP');\n\t $port = env('Server_PORT');\n\t $password = env('Server_PASS');\n\t $timeout = 3;\n\t $rcon = new Rcon($host, $port, $password, $timeout);\n\n\t if ($rcon->connect()){\n\n \t$rcon->sendCommand('pex user '.$username. 'group set lavonas'); \n \t$rcon->sendCommand('broadcast '.$username. ' Neteko paslaugos, nes jos galiojimas pasibaigė');\n \t\n \t}\n\t\t\t\t}\n\t\t\t}})->daily();\n\n $schedule->call(function(){\n $orders = Order::where('approved', 'done')->whereNull('until')->where('service_name', '!=', 'atleiskit')->delete();\n $orders2 = Order::where('approved', 'cancelled')->delete();\n })->weeklyOn(1, '7:00');;\n\n }", "function patientschedule($pid)\n{\n\t$query=\"SELECT * FROM patientrequest WHERE pid='$pid'\";\n\t$results=getdata($query);\n\treturn $results;\n}", "protected function schedule(Schedule $schedule)\n {\n // cron that runs every 5 minutes to check for offline state between 9:30 am and 9:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@stateUpdate')->everyFiveMinutes()->between(\"04:00\",\"16:00\");\n\n // daily cron for status update - everyday at 10:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@daily')->dailyAt(\"17:00\");\n\n // weekly cron for total week hours violation - every sunday at 10:30 pm ist\n $schedule->call('\\App\\Http\\Controllers\\CronController@weekly')->sundays()->at('17:30');\n\n // // monthly cron for monthly total hours violation - last day of every month at 10:30 pm ist\n // $schedule->call('\\App\\Http\\Controllers\\CronController@monthly')->when(function () {\n // return \\Carbon\\Carbon::now()->endOfMonth()->isToday();\n // })->at('17:00');\n }", "public function get_schedule($params = [])\n {\n $result = Schedule::where([\n 'event_id' => $params['event_id'], \n 'user_id' => $params['user_id'] \n ])->get();\n\n return to_array($result);\n }", "protected function schedule(Schedule $schedule)\n {\n //* * * * * /usr/bin/php /your/projectPath/artisan schedule:run >> /dev/null 2>&1\n\n //买格子后的日志,记录到数据库\n $schedule->command('Grid:TradeInfo')->everyMinute()->withoutOverlapping();\n\n //延时统计用户成就\n $schedule->command('Grid:Achievement')->everyFiveMinutes()->withoutOverlapping();\n\n //延时更新用户头像\n $schedule->command('Grid:ChangeAvatar')->everyMinute()->withoutOverlapping();\n\n //排行榜统计\n $schedule->command('Grid:RankList')->everyFiveMinutes()->withoutOverlapping();\n\n //n天不交易的格子自动降价m%\n $schedule->command('Grid:ReducePrice')->cron('30 2 * * *')->withoutOverlapping();\n\n\n\n\n //后台发的系统通知\n $schedule->command('Admin:SystemMessage')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,计算cpu,内存,硬盘占用\n $schedule->command('Admin:ServerInfoNew')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,统计用户分布情况\n $schedule->command('Admin:UserDistribution')->daily()->withoutOverlapping();\n\n //后台的数据统计\n $schedule->command('Admin:userData1')->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('Admin:gridData1')->everyThirtyMinutes()->withoutOverlapping();\n\n\n\n //处理探索世界迷雾\n $schedule->command('Tssj:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路迷雾\n $schedule->command('Wodelu:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路足迹\n $schedule->command('Wodelu:TrackFogUploadForZUJI0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI9')->everyMinute()->withoutOverlapping();\n\n //计算昨日繁荣度 联盟的\n $schedule->command('Aliance:Flourish')->cron('1 0 * * *')->withoutOverlapping();\n //计算昨日繁荣度 用户的\n $schedule->command('Aliance:FlourishForUser')->cron('1 0 * * *')->withoutOverlapping();\n\n //每月第一天计算联盟战绩\n $schedule->command('Aliance:PKinfo')->cron('30 0 1 */1 *')->withoutOverlapping();\n\n\n\n //每分钟刷拍卖行物品,过期的返回给用户\n $schedule->command('FoodMap:AuctionHouse')->everyMinute()->withoutOverlapping();\n\n\n\n\n $schedule->command('Tssj:OneJoke')->everyFifteenMinutes()->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n \n //$schedule->command('add:winners')->everyMinute();\n \n //$schedule->command('add:winners')->cron('00 18 31 10 * *');\n \n /*$schedule->command('test:test')\n ->everyMinute()\n ->sendOutputTo(base_path() . '/public/output_files/test.txt');\n */\n \n //$schedule->command('add:winners')->cron('52 13 02 11 * *');\n \n $periods = Period::all();\n \n foreach($periods as $period) {\n \n $enddate_month = explode('-', $period->enddate)[1];\n $enddate_day = explode(' ', explode('-', $period->enddate)[2])[0];\n //echo(\"maand: \" . $enddate_month . \" en dag \" . $enddate_day . \"<br>\");\n $schedule->command('add:winners')->cron('40 22 ' . $enddate_day . ' ' . $enddate_month . ' * *');\n }\n \n \n }", "protected function schedule(Schedule $schedule) {\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n echo date(\"Y-m-d H:i:s\").\"\\n\";\n $schedule->command('flow:sync 0 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 1 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 0 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:20');\n $schedule->command('flow:sync 1 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:40');\n }", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "protected function scheduleTimezone()\n {\n return 'America/New_York';\n }", "public static function getTimeToRun();", "protected function schedule(Schedule $schedule)\n {\n /* $schedule->command('inspire')\n ->hourly();\n */ \n $schedule->command('sync:sfa')\n \t\t\t->dailyAt('3:00')\n \t\t\t//->withoutOverlapping()\n \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync1.log');\n \n// \t\t$schedule->command('sync:sfa')\n// \t\t\t->dailyAt('12:00')\n// \t\t\t//->withoutOverlapping()\n// \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync2.log');\n \n $schedule->command('reset:admin_password')\n\t\t\t ->weekly()\n\t\t\t ->mondays()\n\t\t\t ->at('2:30')\n\t\t\t ->withoutOverlapping()\n\t\t\t ->appendOutputTo(storage_path('logs/cron').'/password.log');\n }", "function CreateSchedule($arraypost) {\n\tglobal $server;\n\tglobal $user;\n\tglobal $device;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t\n\t$status \t= (empty($arraypost[\"status\"]) ? \"enabled\" : $arraypost[\"status\"]);\n\t\n\t$on \t\t= (empty($arraypost[\"on\"]) ? 0 : $arraypost[\"on\"]);\n\t$colorhex \t= (empty($arraypost[\"colorhex\"]) ? \"#fead59\" : \"#\".$arraypost[\"colorhex\"]);\n\t$alert \t\t= (empty($arraypost[\"alert\"]) ? \"none\" : $arraypost[\"alert\"]);\n\t$bri \t\t= (empty($arraypost[\"bri\"]) ? \"254\" : $arraypost[\"bri\"]);\n\t$ct \t\t= (empty($arraypost[\"ct\"]) ? \"369\" : $arraypost[\"ct\"]);\n\t$hue \t\t= (empty($arraypost[\"hue\"]) ? \"14910\" : $arraypost[\"hue\"]);\n\t$sat \t\t= (empty($arraypost[\"sat\"]) ? \"144\" : $arraypost[\"sat\"]);\n\t$transition = (empty($arraypost[\"transition\"]) ? \"0\" : $arraypost[\"transition\"]);\n\t$effect\t \t= (empty($arraypost[\"effect\"]) ? \"none\" : $arraypost[\"effect\"]);\n\t\n\t$arrayattr = array();\n\t\n\t// Name -------------------------------------\n\t$arrayattr[] = \"\\\"name\\\":\\\"\".$arraypost[\"name\"].\"\\\"\";\n\t\n\t// Description -------------------------------------\n\t$arrayattr[] = \"\\\"description\\\":\\\"\".$arraypost[\"description\"].\"\\\"\";\n\t\n\t// Command -------------------------------------\n\t\n\t// State On ----------------------------------\n\t$arrayattr1[] = \"\\\"on\\\":\".($on==1 ? \"true\" : \"false\").\"\";\n\t\n\t// Color hex ---------------------------------\n\tif (!empty($colorhex)) {\n\t\t$tabcolor = convertColorHextoxyY($colorhex);\n\t\t$x = $tabcolor[\"x\"];\n\t\t$y = $tabcolor[\"y\"];\n\t\t$bri = intval($tabcolor['Y']);\n\t\t$arrayattr1[] = \"\\\"xy\\\":[\".$x.\",\".$y.\"]\";\n\t}\n\tif ($colorhex=\"#fead59\") {\n\t\t$bri = \"254\";\n\t}\n\t/*\n\t// Alert -------------------------------------\n\t$arrayattr1[] = \"\\\"alert\\\":\\\"\".$alert.\"\\\"\";\n\t\n\t// Brightness --------------------------------\n\t$arrayattr1[] = \"\\\"bri\\\":\".$bri;\n\t\n\t// Colour Temperature ------------------------\n\t$arrayattr1[] = \"\\\"ct\\\":\".$ct;\n\t\n\t// Hue ---------------------------------------\n\t$arrayattr1[] = \"\\\"hue\\\":\".$hue;\n\t\n\t// Saturation --------------------------------\n\t$arrayattr1[] = \"\\\"sat\\\":\".$sat;\n\t\n\t// Transition --------------------------------\n\t$arrayattr1[] = \"\\\"transitiontime\\\":\".$transition;\n\t\n\t// Effect ------------------------------------\n\t$arrayattr1[] = \"\\\"effect\\\":\\\"\".$effect.\"\\\"\";\n\t*/\n\t\n\t$arrayattr[] = \"\\\"command\\\":{\n\t\t\\\"address\\\": \\\"/api/\".$user.\"/groups/\".$arraypost[\"group\"].\"/action\\\",\n\t\t\\\"method\\\": \\\"PUT\\\",\n\t\t\\\"body\\\": { \".implode(\",\", $arrayattr1).\" }}\";\n\t\n\t// LocalTime -------------------------------------\n\t$arrayattr[] = \"\\\"localtime\\\":\\\"\".$arraypost[\"localtime\"].\"\\\"\";\n\t\n\t// Status -------------------------------------\n\t$arrayattr[] = \"\\\"status\\\":\\\"\".$status.\"\\\"\";\n\t\n\t$attr = \"{\";\n\t$attr .= implode($arrayattr, \",\");\n\t$attr .= \"}\";\n\techo $attr;\n\treturn LaunchCurl($url,\"post\",$attr);\n}", "protected function scheduleTimezone()\n {\n return 'America/Los_Angeles';\n }", "static function fetchJobSchedules() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \" SELECT job_id, classname, repeat_time_minutes, repeat_daily_at, active_yn, last_run_date \n FROM job_scheduler\n ORDER BY job_id\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n $schedule = array();\n foreach( $resultset as $record ) {\n if( false === empty( $record->repeat_time_minutes ) ) {\n $schedule[] = new ScheduledJobRepeat(\n $record->job_id, \n $record->classname, \n $record->repeat_time_minutes, \n $record->active_yn == 'Y',\n $record->last_run_date,\n self::fetchJobScheduleParameters( $record->job_id ));\n }\n else if( false === empty( $record->repeat_daily_at ) ) {\n $schedule[] = new ScheduledJobDaily(\n $record->job_id, \n $record->classname, \n $record->repeat_daily_at,\n $record->active_yn == 'Y',\n $record->last_run_date,\n self::fetchJobScheduleParameters( $record->job_id ));\n }\n }\n return $schedule;\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n $schedule->call(function () {\n Log::info('更新热度');\n Commodity::updateCommodityTemperature();\n Article::updateArticleTemperature();\n Activity::updateActivityTemperature();\n Recruit::updateRecruitTemperature();\n News::updateNewsTemperature();\n })->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n\n\n // $billerId = JosPostpaid::select('billerRequestId')->orderBy('requestId','desc')->first();\n // $response = $schedule->command(Http::withHeaders([\n // 'MAC' => '632b046efead2c90494545b4c0a526d7e7545ca65ec6494119cd10dba8eb387b',\n // 'CLIENT_CODE' => 'CAPRI-DWTH8PYN9N3F',\n // ])->post('http://132.145.231.191/vasb2b/dev/Api/query',[\n // 'id' => $billerId,\n // ]))->everyFiveMinutes();\n\n\n // $billerId = Prepaid::select('billerRequestId')->orderBy('id','desc')->first();\n $billerId = DB::table('prepaid_payment_histories')->select('requestId')->where(['status' => 'PENDING'])->first();\n\n \n // dd($billerId->billerRequestId,$billerId->phone);\n $response = $schedule->command(Http::withHeaders([\n 'MAC' => '632b046efead2c90494545b4c0a526d7e7545ca65ec6494119cd10dba8eb387b',\n 'CLIENT_CODE' => 'CAPRI-DWTH8PYN9N3F',\n ])->post('http://132.145.231.191/vasb2b/dev/Api/query',[\n 'id' =>$billerId->requestId,\n ]))->everyFiveMinutes()\n ->sendOutPutTo('localhost/Ebill/services/file.txt');\n\n \n // $schedule->command('inspire')->hourly();\n }", "protected function schedule ( Schedule $schedule )\n {\n\n /** BEGIN: FETCH APPWORKS API DATA ****************************************/\n\n $schedule->command( 'ot-appworks:fetch-events' )\n ->hourlyAt(0)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-appworks:fetch-event-data' )\n ->hourlyAt(5)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-scoreboard:fetch-new-points' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n $schedule->command( 'ot-socialcards:fetch-new-posts' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n /** END: FETCH APPWORKS API DATA ******************************************/\n\n /** BEGIN: FETCH TWITTER API DATA *****************************************/\n\n $schedule->command( 'ot-socialcards:fetch-new-tweets' )\n ->everyMinute()\n ->withoutOverlapping();\n\n /** END: FETCH TWITTER API DATA *******************************************/\n\n }", "public function weekly()\n {\n return $this->cron('0 0 * * 0 *');\n }", "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('inspire')->hourly();\n\n\n\n $schedule->command('emails:evento')->everyFiveMinutes();\n\n $schedule->command('emails:oportunidad')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:tareas')->everyFiveMinutes();\n \n $schedule->command('clear')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('repeat')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:send')->daily()->timezone('America/Mexico_City');\n\n }", "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}", "function recurringdowntime_ccm_hostservice_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'host') {\n $tmp['host_name'] = $cbargs['host_name'];\n } else if ($cbargs['type'] == 'service') {\n $tmp['service_description'] = $cbargs['service_description'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n // Check if host name changed\n if ($cbargs['type'] == 'host') {\n\n // Check if host name changed\n if (!empty($cbargs['old_host_name']) && $cbargs['host_name'] != $cbargs['old_host_name']) {\n foreach ($cfg as $id => $c) {\n\n if ($c['schedule_type'] == 'host' || $c['schedule_type'] == 'service') {\n\n // Replace config host_name that used the old host name\n if ($c['host_name'] == $cbargs['old_host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'host_name' => $cbargs['host_name']\n );\n }\n\n }\n\n }\n }\n\n\n // Check for service description change\n } else if ($cbargs['type'] == 'service') {\n\n // This one is complicated ... we will only do the hosts defined directly to the service\n if (!empty($cbargs['old_service_description']) && $cbargs['service_description'] != $cbargs['old_service_description']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('service_description', $c) && $c['service_description'] == $cbargs['old_service_description']) {\n\n // Get all hosts attached to service\n $sql = \"SELECT host_name FROM nagiosql.tbl_lnkServiceToHost AS lnk\n LEFT JOIN nagiosql.tbl_host AS h ON h.id = lnk.idSlave\n WHERE idMaster = \".intval($cbargs['id']).\";\";\n if (!($rs = exec_sql_query(DB_NAGIOSQL, $sql))) {\n continue;\n }\n\n // Check all hosts against current cfg\n $arr = $rs->GetArray();\n foreach ($arr as $a) {\n if ($c['host_name'] == $a['host_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'service_description' => $cbargs['service_description']\n );\n }\n }\n\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "protected function schedule(Schedule $schedule)\n {\n //admim模块下的demo测试任务\n $schedule->command('task_admin_demo_taskone')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务1\n $schedule->command('task_admin_demo_tasktwo')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务2\n $schedule->command('task_admin_demo_taskthree')->everyFiveMinutes()->withoutOverlapping();//admim模块下的demo测试任务3\n\n //xx模块xx任务\n\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "function QuerySchedule($query, $connection, $in){\n\t$result = mysqli_query($connection, $query) or die(mysqli_error($connection));\n\twhile($row = mysqli_fetch_array($result)){\n\t\t$output = $row[$in];\n\t}\n\treturn $output;\n}" ]
[ "0.6441508", "0.5780437", "0.5704298", "0.55298406", "0.5511373", "0.53337395", "0.5330446", "0.5330446", "0.5286463", "0.52236176", "0.52180034", "0.51969993", "0.51543605", "0.51543605", "0.502302", "0.5002092", "0.49786305", "0.4949699", "0.4949699", "0.49372575", "0.49258074", "0.48882324", "0.48824474", "0.48610678", "0.48523596", "0.4836941", "0.4828622", "0.48160744", "0.4801189", "0.47990522", "0.47692847", "0.47613764", "0.47531927", "0.47514606", "0.47209185", "0.47186255", "0.47066557", "0.47045487", "0.47040486", "0.46978763", "0.4697495", "0.46923408", "0.46922216", "0.46895584", "0.467858", "0.46676543", "0.46613997", "0.46604657", "0.4653129", "0.46526068", "0.46514115", "0.46497133", "0.4647086", "0.46318895", "0.46297517", "0.46268606", "0.4608753", "0.4607584", "0.4606902", "0.46065784", "0.4604846", "0.460092", "0.45975438", "0.45870623", "0.45841438", "0.45640004", "0.4560313", "0.45542762", "0.4550404", "0.4548948", "0.45407885", "0.45343214", "0.45313194", "0.45176545", "0.45168358", "0.45102328", "0.45068595", "0.44967735", "0.44962168", "0.44779235", "0.44775358", "0.44766027", "0.44724056", "0.44673914", "0.4464721", "0.44510758", "0.44495618", "0.44407725", "0.44402358", "0.4439329", "0.44374552", "0.44365856", "0.4434372", "0.44333497", "0.44311768", "0.44276386", "0.442456", "0.4422045", "0.4422045", "0.44168428" ]
0.5986708
1
Get downtime schedule for specified hostgroup
function recurringdowntime_get_hostgroup_cfg($hostgroup = false) { $cfg = recurringdowntime_get_cfg(); $ret = array(); foreach ($cfg as $sid => $schedule) { if (array_key_exists('schedule_type', $schedule)) { if ($schedule["schedule_type"] != "hostgroup") { continue; } } if ($hostgroup && !(strtolower($schedule["hostgroup_name"]) == strtolower($hostgroup))) { continue; } if (array_key_exists('hostgroup_name', $schedule)) { if (is_authorized_for_hostgroup(0, $schedule["hostgroup_name"])) { $ret[$sid] = $schedule; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_host_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"service\") {\n continue;\n }\n }\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n if (array_key_exists('host_name', $schedule)) {\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_servicegroup_cfg($servicegroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"servicegroup\") {\n continue;\n }\n }\n if ($servicegroup && !(strtolower($schedule[\"servicegroup_name\"]) == strtolower($servicegroup))) {\n continue;\n }\n if (array_key_exists('servicegroup_name', $schedule)) {\n if (is_authorized_for_servicegroup(0, $schedule[\"servicegroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_service_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"host\") {\n continue;\n }\n }\n\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n\n if (array_key_exists('host_name', $schedule)) {\n if (array_key_exists('service_description', $schedule)) {\n if ($schedule[\"service_description\"] != '*') {\n $search_str = $schedule[\"service_description\"];\n\n if (strstr($schedule[\"service_description\"], \"*\")) {\n $search_str = \"lk:\" . str_replace(\"*\", \"%\", $schedule[\"service_description\"]);\n }\n if (!is_authorized_for_service(0, $schedule[\"host_name\"], $search_str)) {\n continue;\n }\n }\n }\n\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_show_downtime()\n{\n global $request;\n\n do_page_start(array(\"page_title\" => _(\"Recurring Downtime\")), true);\n\n if (isset($request[\"host\"])) {\n $host_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n $service_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n if (is_authorized_for_host(0, $request[\"host\"])) {\n $host_data = recurringdowntime_get_host_cfg($request[\"host\"]);\n $service_data = recurringdowntime_get_service_cfg($request[\"host\"]);\n }\n } elseif (isset($request[\"hostgroup\"])) {\n $hostgroup_tbl_header = _(\"Recurring Downtime for Hostgroup: \") . $request[\"hostgroup\"];\n if (is_authorized_for_hostgroup(0, $request[\"hostgroup\"])) {\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($request[\"hostgroup\"]);\n }\n } elseif (isset($request[\"servicegroup\"])) {\n $servicegroup_tbl_header = _(\"Recurring Downtime for Servicegroup: \") . $request[\"servicegroup\"];\n if (is_authorized_for_servicegroup(0, $request[\"servicegroup\"])) {\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($request[\"servicegroup\"]);\n }\n }\n\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n /*\n $host_tbl_header = \"Recurring Downtime for All Hosts\";\n $hostgroup_tbl_header = \"Recurring Downtime for All Hostgroups\";\n $servicegroup_tbl_header = \"Recurring Downtime for All Servicegroups\";\n */\n $host_tbl_header = _(\"Host Schedules\");\n $service_tbl_header = _(\"Service Schedules\");\n $hostgroup_tbl_header = _(\"Hostgroup Schedules\");\n $servicegroup_tbl_header = _(\"Servicegroup Schedules\");\n $host_data = recurringdowntime_get_host_cfg($host = false);\n $service_data = recurringdowntime_get_service_cfg($host = false);\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($hostgroup = false);\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($servicegroup = false);\n $showall = true;\n }\n\n ?>\n <h1><?php echo _(\"Recurring Downtime\"); ?></h1>\n\n <?php echo _(\"Scheduled downtime definitions that are designed to repeat (recur) at set intervals are shown below. The next schedule for each host/service are added to the monitoring engine when the cron runs at the top of the hour.\"); ?>\n\n <?php\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n ?>\n <p>\n <?php } ?>\n\n <script type=\"text/javascript\">\n function do_delete_sid(sid) {\n input = confirm('<?php echo _(\"Are you sure you wish to delete this downtime schedule?\"); ?>');\n if (input == true) {\n window.location.href = 'recurringdowntime.php?mode=delete&sid=' + sid + '&nsp=<?php echo get_nagios_session_protector_id();?>';\n }\n }\n </script>\n\n <?php\n if ($showall) {\n ?>\n <script type=\"text/javascript\">\n $(document).ready(function () {\n $(\"#tabs\").tabs().show();\n });\n </script>\n\n <div id=\"tabs\" class=\"hide\">\n <ul>\n <li><a href=\"#host-tab\"><?php echo _(\"Hosts\"); ?></a></li>\n <li><a href=\"#service-tab\"><?php echo _(\"Services\"); ?></a></li>\n <li><a href=\"#hostgroup-tab\"><?php echo _(\"Hostgroups\"); ?></a></li>\n <li><a href=\"#servicegroup-tab\"><?php echo _(\"Servicegroups\"); ?></a></li>\n </ul>\n <?php\n }\n ?>\n\n <?php if (!empty($_GET[\"host\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n\n // hosts tab\n if ($showall) {\n echo \"<div id='host-tab'>\";\n }\n ?>\n\n <h4 <?php if ($host) { echo 'style=\"margin-top: 20px;\"'; } ?>><?php echo $host_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n }\n ?>\n\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Months\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Handle Child Hosts\"); ?></th>\n <th class=\"center\" style=\"width: 80px;\"><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($host_data) {\n $i = 0;\n\n $host_names = array();\n foreach ($host_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n }\n array_multisort($host_names, SORT_ASC, $host_data);\n\n foreach ($host_data as $sid => $schedule) {\n if (empty($schedule['childoptions'])) {\n $schedule['childoptions'] = 0;\n }\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? _(\"Yes\") : _(\"No\"); ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"months_of_year\"]) {\n echo $schedule[\"months_of_year\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"childoptions\"] == 0) {\n echo _(\"No\");\n } elseif ($schedule[\"childoptions\"] == 1) {\n echo _(\"Yes, triggered\");\n } elseif ($schedule[\"childoptions\"] == 2) {\n echo _(\"Yes, non-triggered\");\n } ?></td>\n <td class=\"center\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>&nbsp;\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"10\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if host_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end host tab?>\n\n<?php } // end if host or showall\n\nif (!empty($_GET[\"service\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n $service = grab_request_var('service', '');\n\n if ($showall) {\n echo \"<div id='service-tab'>\";\n }\n ?>\n\n <h4><?php echo $service_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Service\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($service_data) {\n $i = 0;\n\n $host_names = array();\n $service_names = array();\n foreach ($service_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n $service_names[$k] = $data['service_description'];\n }\n\n array_multisort($host_names, SORT_ASC, $service_names, SORT_ASC, $service_data);\n\n foreach ($service_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo $schedule[\"service_description\"]; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php'. \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php }?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"9\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host/service recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if service_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end service tab?>\n\n<?php } // end if service or showall\n\nif (!empty($_GET[\"hostgroup\"]) || $showall) {\n\n $hostgroup = grab_request_var('hostgroup', '');\n\n if ($showall) {\n echo \"<div id='hostgroup-tab'>\";\n }\n ?>\n\n <h4><?php echo $hostgroup_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($hostgroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&hostgroup_name=<?php echo $hostgroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this hostgroup\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Hostgroup\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n\n <?php\n\n if ($hostgroup_data) {\n $i = 0;\n\n $hostgroup_names = array();\n foreach ($hostgroup_data as $k => $data) {\n $hostgroup_names[$k] = $data['hostgroup_name'];\n }\n\n array_multisort($hostgroup_names, SORT_ASC, $hostgroup_data);\n\n foreach ($hostgroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"hostgroup_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? \"Yes\" : \"No\"; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n <?php } else { ?>\n <tr>\n <td colspan=\"8\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no hostgroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if hostrgroup_data ?>\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end hostgroup tab?>\n\n<?php } // end if hostgroup or showall\n\nif (!empty($_GET[\"servicegroup\"]) || $showall) {\n\n $servicegroup = grab_request_var('servicegroup', '');\n\n if ($showall) {\n echo \"<div id='servicegroup-tab'>\";\n }\n ?>\n <h4><?php echo $servicegroup_tbl_header; ?></h4>\n <?php\n if (!is_readonly_user(0)) {\n if ($servicegroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&servicegroup_name=<?php echo $servicegroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this servicegroup\"); ?></a>\n </div>\n <?php } else { ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?>\n </a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Servicegroup\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n if ($servicegroup_data) {\n $i = 0;\n\n $servicegroup_names = array();\n foreach ($servicegroup_data as $k => $data) {\n $servicegroup_names[$k] = $data['servicegroup_name'];\n }\n\n array_multisort($servicegroup_names, SORT_ASC, $servicegroup_data);\n\n foreach ($servicegroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"servicegroup_name\"]; ?></td>\n <td><?php echo $schedule[\"comment\"]; ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"recurringdowntime.php?mode=edit&sid=<?php echo $sid; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"7\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no servicegroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if servicegroup_data ?>\n\n\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end servicegroup tab?>\n\n <?php } // end if servicegroup or showall ?>\n\n <?php\n if ($showall) { // end of tabs container\n ?>\n </div>\n <?php\n }\n do_page_end(true);\n}", "public function findHostDowntimesForAdminUser(): array;", "public function findHostDowntimesForNonAdminUser(): array;", "public static function get24HourDivisionIntervals($groupScheduledIntervals)\n {\n foreach ($groupScheduledIntervals as &$scheduledIntervals) {\n foreach ($scheduledIntervals as &$schedulerInterval) {\n $schedulerInterval['start'] = $schedulerInterval['start']->format('H:i');\n $end = clone $schedulerInterval['end'];\n $schedulerInterval['end'] = $end->add(new DateInterval(\"PT1H\"))->format('H:i');\n }\n }\n\n return $groupScheduledIntervals;\n }", "protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['emailchef']['fields']['emailchef_cron_frequency']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_frequency']['value'] :\n EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['emailchef']['fields']['emailchef_cron_offset']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_offset']['value'] :\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log('eMailChef: Could not find cron frequency in valid list. Defaulted to hourly', Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }", "public function getTaskGroup() {}", "public function findDowntimes(int $hostId, int $serviceId): array;", "public static function get24ScheduledIntervals($groupedPeriods, $groupFieldName)\n {\n\n $groupScheduledIntervals = array();\n $scheduledIndex = 0;\n foreach ($groupedPeriods as $periods) {\n\n $startPeriod = TimezoneHelper::getDateFromString(reset($periods)->$groupFieldName);\n $endPeriod = clone TimezoneHelper::getDateFromString(end($periods)->$groupFieldName);\n $endPeriod->add(new DateInterval('PT1H'));\n\n $dateRange = new DatePeriod($startPeriod, new DateInterval('PT1H'), $endPeriod);\n $dateRange = iterator_to_array($dateRange);\n $dateRangeCount = count($dateRange);\n\n //init first start day\n for ($dateRangeIndex = 0; $dateRangeIndex < $dateRangeCount; $dateRangeIndex++) {\n $date = $dateRange[$dateRangeIndex];\n// print $dateRangeCount.' = '.$dateRangeIndex.' = '.$scheduledIndex.' == '.$date->format('Y-m-d H:i:s').\"\\n\";\n $formatDate = $date->format('Y-m-d');\n\n //if first element\n if ($dateRangeIndex == 0) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['start'] = $date;\n if ($dateRangeCount == 1) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = clone $date;\n $scheduledIndex++;\n }\n } else if ($dateRangeIndex == $dateRangeCount - 1) {\n //if last element\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = $date;\n $scheduledIndex++;\n }\n\n if (isset($dateRange[$dateRangeIndex + 1]) && $dateRange[$dateRangeIndex + 1]->format('Y-m-d') != $date->format('Y-m-d')) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = $dateRange[$dateRangeIndex];\n $scheduledIndex = 0;\n $startDate = $dateRange[$dateRangeIndex + 1]->format('Y-m-d');\n $groupScheduledIntervals[$startDate][$scheduledIndex]['start'] = $dateRange[$dateRangeIndex + 1];\n }\n }\n }\n\n return $groupScheduledIntervals;\n }", "function has_schedules( $group_id = null ) {\r\n global $bp;\r\n $schedule_ids = null;\r\n $schedules = array();\r\n \r\n if( empty( $group_id ) )\r\n $group_id = $bp->groups->current_group->id;\r\n \r\n $term_id = get_term_by( 'slug', $group_id, 'group_id' );\r\n if( !empty( $term_id ) )\r\n $schedule_ids = get_objects_in_term( $term_id->term_id, 'group_id' );\r\n \r\n if( !empty( $schedule_ids ) )\r\n arsort( $schedule_ids ); // Get latest entries first\r\n else\r\n return null;\r\n \r\n foreach ( $schedule_ids as $sid )\r\n $schedules[] = self::is_schedule( $sid );\r\n \r\n return array_filter( $schedules );\r\n }", "public function findDowntimesForAdminUser(): array;", "function get_schedule($usrid){\r\n\t\r\n}", "public function testSetGet_schedule_where_time_of_day_has_past() {\n\t\t//The blog time is 10 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '+10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Next week in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+7 days', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Next week in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+7 days', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "function timeconditions_timegroups_buildtime( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish) {\n\t//\n\tif ($minute_start == '-') {\n\t\t$time_minute_start = \"00\";\n\t} else {\n\t\t$time_minute_start = sprintf(\"%02d\",$minute_start);\n\t}\n\tif ($minute_finish == '-') {\n\t\t$time_minute_finish = \"00\";\n\t} else {\n\t\t$time_minute_finish = sprintf(\"%02d\",$minute_finish);\n\t}\n\tif ($hour_start == '-') {\n\t\t$time_hour_start = '*';\n\t} else {\n\t\t$time_hour_start = sprintf(\"%02d\",$hour_start) . ':' . $time_minute_start;\n\t}\n\tif ($hour_finish == '-') {\n\t\t$time_hour_finish = '*';\n\t} else {\n\t\t$time_hour_finish = sprintf(\"%02d\",$hour_finish) . ':' . $time_minute_finish;\n\t}\n\tif ($time_hour_start === '*') {\n\t\t$time_hour_start = $time_hour_finish;\n\t}\n\tif ($time_hour_finish === '*') {$time_hour_finish = $time_hour_start;}\n\tif ($time_hour_start == $time_hour_finish) {\n\t\t$time_hour = $time_hour_start;\n\t} else {\n\t\t$time_hour = $time_hour_start . '-' . $time_hour_finish;\n\t}\n\n\t//----- Time Week Day Interval proccess -----\n\t//\n\tif ($wday_start == '-') {\n\t\t$time_wday_start = '*';\n\t} else {\n\t\t$time_wday_start = $wday_start;\n\t}\n\tif ($wday_finish == '-') {\n\t\t$time_wday_finish = '*';\n\t} else {\n\t\t$time_wday_finish = $wday_finish;\n\t}\n\tif ($time_wday_start === '*') {\n\t\t$time_wday_start = $time_wday_finish;\n\t}\n\tif ($time_wday_finish === '*') {\n\t\t$time_wday_finish = $time_wday_start;\n\t}\n\tif ($time_wday_start == $time_wday_finish) {\n\t\t$time_wday = $time_wday_start;\n\t} else {\n\t\t$time_wday = $time_wday_start . '-' . $time_wday_finish;\n\t}\n\n\t//----- Time Month Day Interval proccess -----\n\t//\n\tif ($mday_start == '-') {\n\t\t$time_mday_start = '*';\n\t} else {\n\t\t$time_mday_start = $mday_start;\n\t}\n\tif ($mday_finish == '-') {\n\t\t$time_mday_finish = '*';\n\t} else {\n\t\t$time_mday_finish = $mday_finish;\n\t}\n\tif ($time_mday_start === '*') {\n\t\t$time_mday_start = $time_mday_finish;\n\t}\n\tif ($time_mday_finish === '*') {\n\t\t$time_mday_finish = $time_mday_start;\n\t}\n\tif ($time_mday_start == $time_mday_finish) {\n\t\t$time_mday = $time_mday_start;\n\t} else {\n\t\t$time_mday = $time_mday_start . '-' . $time_mday_finish;\n\t}\n\n\t//----- Time Month Interval proccess -----\n\t//\n\tif ($month_start == '-') {\n\t\t$time_month_start = '*';\n\t} else {\n\t\t$time_month_start = $month_start;\n\t}\n\tif ($month_finish == '-') {\n\t\t$time_month_finish = '*';\n\t} else {\n\t\t$time_month_finish = $month_finish;\n\t}\n\tif ($time_month_start === '*') {\n\t\t$time_month_start = $time_month_finish;\n\t}\n\tif ($time_month_finish === '*') {\n\t\t$time_month_finish = $time_month_start;\n\t}\n\tif ($time_month_start == $time_month_finish) {\n\t\t$time_month = $time_month_start;\n\t} else {\n\t\t$time_month = $time_month_start . '-' . $time_month_finish;\n\t}\n\t$time = $time_hour . '|' . $time_wday . '|' . $time_mday . '|' . $time_month;\n\treturn $time;\n}", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function findDowntimesByServiceForAdminUser(int $hostId, int $serviceId): array;", "function nth_weekly_schedule($action,$id,$start,$end,$day,$non_workdays,$nth_value=1)\n {\n $params = array($start,$end,$day);\n $results = array();\n $this->_where = $this->_where.' AND `cal_day_of_week` = ?';\n switch ($non_workdays){\n case 1:\n $sched_date = 'next_work_day';\n break;\n case 2:\n $sched_date = 'prev_work_day';\n break;\n case 0:\n $sched_date = 'cal_date';\n $this->_where = $this->_where.' AND `cal_is_weekday` = ?';\n array_push($params,1);\n break;\n }\n $sql = 'SELECT `cal_date` AS `report_date`, '.$sched_date.' AS `sched_date`,`cal_is_work_day` FROM `calendar__bank_holiday_offsets` ';\n $sql = $sql.$this->_where;\n \n $query = $this->_db->query($sql,$params);\n //echo $nth_value;\n \n if($query->count()){\n $results = $query->results();\n $results = ($nth_value > 1 || $non_workdays == 0 ? $this->nth_date($results,$nth_value):$results);\n if($action == 'preview') {\n return $results;\n } else if ($action == 'commit') {\n $this->commit_schedule($results,$id);\n }\n }\n }", "public function findDowntimesForNonAdminUser(): array;", "function timeconditions_timegroups_get_group($timegroup) {\n\tglobal $db;\n\n\t$sql = \"select id, description from timegroups_groups where id = $timegroup\";\n\t$results = $db->getAll($sql);\n\tif(DB::IsError($results)) {\n \t\t$results = null;\n\t}\n\t$tmparray = array($results[0][0], $results[0][1]);\n\treturn $tmparray;\n}", "public function findDowntimesByServiceForNonAdminUser(int $hostId, int $serviceId): array;", "function retrieve_day_guest_lists($weekday){\n\t\t\n\t\t\n\t\t//Do any given operation for a specific weekday...\n\t\tswitch($weekday){\n\t\t\tcase 'mondays':\n\t\t\t\tbreak;\n\t\t\tcase 'tuesdays':\n\t\t\t\tbreak;\n\t\t\tcase 'wednesdays':\n\t\t\t\tbreak;\n\t\t\tcase 'thursdays':\n\t\t\t\tbreak;\n\t\t\tcase 'fridays':\n\t\t\t\tbreak;\n\t\t\tcase 'saturdays':\n\t\t\t\tbreak;\n\t\t\tcase 'sundays':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshow_404('Invalid url');\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->CI->load->model('model_guest_lists', 'guest_lists', true);\n\t\treturn $this->CI->guest_lists->retrieve_day_guest_lists($this->promoter->up_id, $weekday, $this->promoter->t_fan_page_id);\n\t\t\n\t}", "public static function getSchedulePattern(): string;", "public function testSetGet_schedule_where_time_of_day_has_not_past() {\n\t\t//The blog time is 2 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$day = date( 'H', $blog_time ) + 1;\n\t\tif ( $day < 10 ) {\n\t\t\t$day = \"0$day\";\n\t\t}\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), $day . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', $blog_time ) . ' ' . $day . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 hour', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "function block_ranking_get_points_evolution_by_group($groupid) {\n global $DB;\n\n $sql = \"SELECT\n rl.id, rl.points, rl.timecreated\n FROM {ranking_logs} rl\n INNER JOIN {ranking_points} rp ON rp.id = rl.rankingid\n INNER JOIN {groups_members} gm ON gm.userid = rp.userid\n INNER JOIN {groups} g ON g.id = gm.groupid\n WHERE g.id = :groupid AND rl.timecreated > :lastweek\";\n\n $lastweek = time() - (7 * 24 * 60 * 60);\n\n $params['groupid'] = $groupid;\n $params['lastweek'] = $lastweek;\n\n return array_values($DB->get_records_sql($sql, $params));\n}", "public function findDowntimesByHostForAdminUser(int $hostId, bool $withServices): array;", "public function getBackupSchedule()\n {\n return $this->backup_schedule;\n }", "function getScheduledTasks ( $notification )\n\t{\n\t\t$maxHourOffset = 0;\n\t\t$sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess();\n\t\t$baseDate = Piwik_Date::factory(\"1971-01-01\");\n\t\tforeach($sites as &$site)\n\t\t{\n\t\t\t$offsetDate = Piwik_Date::factory($baseDate, $site['timezone']);\n\n\t\t\t// Earlier means a negative timezone\n\t\t\tif ( $offsetDate->isEarlier($baseDate) )\n\t\t\t{\n\t\t\t\t// Gets the timezone offset\n\t\t\t\t$hourOffset = (24 - date ('H', $offsetDate->getTimestamp()));\n\n\t\t\t\tif ( $hourOffset > $maxHourOffset )\n\t\t\t\t{\n\t\t\t\t\t$maxHourOffset = $hourOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tasks = &$notification->getNotificationObject();\n\n\t\t$dailySchedule = new Piwik_ScheduledTime_Daily();\n\t\t$dailySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'dailySchedule', $dailySchedule );\n\n\t\t$weeklySchedule = new Piwik_ScheduledTime_Weekly();\n\t\t$weeklySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'weeklySchedule', $weeklySchedule );\n\n\t\t$monthlySchedule = new Piwik_ScheduledTime_Monthly();\n\t\t$monthlySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'monthlySchedule', $monthlySchedule );\n\t}", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "public static function get($group);", "public function get_payout_schedule() {\n $crons = _get_cron_array();\n\n $schedule = array();\n\n foreach ( $crons as $timestamp => $cron ) {\n if ( isset( $cron[ 'edd_commissions_payout' ] ) ) {\n $schedule[] = $timestamp;\n }\n }\n\n sort( $schedule, SORT_NUMERIC );\n\n return $schedule;\n }", "public function findDowntimesByHostForNonAdminUser(int $hostId, bool $withServices): array;", "protected function schedule(Schedule $schedule){\n\n\t\t$schedule->command('CheckChallengeDeadlines:expirations')->dailyAt('04:00')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [3])->weekly()->mondays()->at('04:30')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [4])->weekly()->thursdays()->at('04:30')->timezone('America/New_York');\n\n\t}", "function recurringdowntime_ccm_group_sync($cbtype, &$cbargs)\n{\n $cfg = recurringdowntime_get_cfg();\n $pending = recurringdowntime_get_pending_changes();\n\n // Check if the object is part of the pending changes\n foreach ($pending as $i => $p) {\n if ($p['object_id'] == $cbargs['id']) {\n $tmp = $p;\n if ($cbargs['type'] == 'hostgroup') {\n $tmp['hostgroup_name'] = $cbargs['hostgroup_name'];\n } else if ($cbargs['type'] == 'servicegroup') {\n $tmp['servicegroup_name'] = $cbargs['servicegroup_name'];\n }\n $pending[$i] = $tmp;\n recurringdowntime_update_pending_changes($pending);\n return;\n }\n }\n\n if ($cbargs['type'] == 'hostgroup') {\n\n if ($cbargs['old_hostgroup_name'] != $cbargs['hostgroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('hostgroup_name', $c) && $c['hostgroup_name'] == $cbargs['old_hostgroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'hostgroup_name' => $cbargs['hostgroup_name']\n );\n }\n }\n }\n\n } else if ($cbargs['type'] == 'servicegroup') {\n\n if ($cbargs['old_servicegroup_name'] != $cbargs['servicegroup_name']) {\n foreach ($cfg as $id => $c) {\n if (array_key_exists('servicegroup_name', $c) && $c['servicegroup_name'] == $cbargs['old_servicegroup_name']) {\n $pending[] = array(\n 'cfg_id' => $id,\n 'object_id' => $cbargs['id'],\n 'servicegroup_name' => $cbargs['servicegroup_name']\n );\n }\n }\n }\n\n }\n\n // Save pending changes\n recurringdowntime_update_pending_changes($pending);\n}", "function backup_migrate_drush_schedules() {\n backup_migrate_include('schedules');\n $rows = array(array(dt('ID'), dt('Name')));\n foreach (backup_migrate_get_schedules() as $schedule) {\n $rows[] = array(\n $schedule->get_id(),\n $schedule->get_name(),\n );\n }\n drush_print_table($rows, TRUE, array(32, 32));\n}", "public function deleteVendorScheduleEntryFromWeekday($weekday) {\n return $this->repository->deleteScheduleEntryFromWeekday($weekday);\n }", "function jetpack_sync_full_sync_interval( $schedule_name ) {\n\treturn 'twicedaily';\n}", "public function getWFScheduleTime() {\n\t\tif (isset($this->multipleschtime)) {\n\t\t\t$multipleschtime = explode(',', $this->multipleschtime);\n\t\t\tusort($multipleschtime, function ($time1, $time2) {\n\t\t\t\t$t1 = strtotime($time1);\n\t\t\t\t$t2 = strtotime($time2);\n\t\t\t\treturn $t1 - $t2;\n\t\t\t});\n\t\t\t$currentTrigger = array_search(date('g:i a', strtotime($this->schtime)), $multipleschtime);\n\t\t\tif (!$currentTrigger && $currentTrigger !== 0) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[0]));\n\t\t\t\t$this->updateSchtime($multipleschtime[0]);\n\t\t\t} elseif (!isset($multipleschtime[$currentTrigger + 1])) {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[count($multipleschtime)-1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t} else {\n\t\t\t\t$nextTiggerTime = date('H:i', strtotime($multipleschtime[$currentTrigger + 1]));\n\t\t\t\t$this->updateSchtime($nextTiggerTime);\n\t\t\t}\n\t\t\treturn $nextTiggerTime;\n\t\t}\n\t\treturn $this->schtime;\n\t}", "private static function repeatSched($sched) {\n $sql = \"DELETE FROM scheds WHERE sched_id<>\" . $sched->id . \" AND sched_event_id=\" . $sched->schedEvent->id;\n query($sql);\n $max = 300;\n $dates = SchedDao::buildRepeatSchedDates($sched, $max);\n $maxLastDate = null;\n if (count($dates) == $max) {\n $maxLastDate = $dates[count($dates) - 1];\n }\n $values = array();\n for ($i = 0; $i < count($dates); $i++) {\n $sched->date = $dates[$i];\n $values[] = SchedDao::insertSchedSql($sched, true); \n }\n $values = array_chunk($values, 20); // chunk insert calls into batches\n for ($i = 0; $i < count($values); $i++) {\n $sql = \"INSERT INTO scheds (sched_id,user_id,user_group_id,client_id,date,time_start,duration,closed,status,comment,type,timestamp,sched_event_id) VALUES\" . implode(\",\", $values[$i]);\n query($sql);\n logit_r($sql, 'repeatsched'); \n }\n return $maxLastDate;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "function dayScheduleA()\n\t{\n\t$scheduleDay = array(45, 60, 90, 120, 150, 180, 210, 240);\n\treturn $scheduleDay;\n\t}", "private function retrieveSchedule($team_id, $start_date, $end_date)\n {\n if (isset($team_id, $start_date, $end_date)) {\n try {\n $start_date = new Carbon($start_date);\n $end_date = new Carbon($end_date);\n $schedule = \\Roster::where('date_start', '=', $start_date->toDateString())->where('team_id', '=', $team_id)->first();\n if (!isset($schedule)) {\n $schedule = new \\Roster;\n $schedule->team_id = $team_id;\n $schedule->date_start = $start_date->toDateString();\n $schedule->date_ending = $end_date->toDateString();\n $schedule->roster_stage = 'pending';\n $schedule->save();\n }\n $schedule = \\Roster::where('date_start', '=', $start_date->toDateString())->where('team_id', '=', $team_id)\n ->with('rosteredshift.task')->with(array('team.user' => function ($query) use ($start_date, $end_date) {\n $query->where('user.active', '=', true)\n ->with(array('availspecific' => function ($query) use ($start_date, $end_date) {\n $query->where(function ($query) use ($start_date, $end_date) {\n $query->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '<=', $start_date->toDateString())\n ->where('end_date', '>=', $start_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '>=', $start_date->toDateString())\n ->where('start_date', '<=', $end_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '<=', $start_date->toDateString())\n ->where('end_date', '>=', $end_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '>=', $start_date->toDateString())\n ->where('end_date', '<=', $end_date->toDateString());\n });\n })\n ->where('user_avail_spec.authorized', '=', 'approved');\n }))\n ->with('availgeneral');\n }))->first();\n } catch (\\Exception $e) {\n return Helper::jsonLoader(EXCEPTION, array(\"message\" => $e->getMessage(), \"line\" => $e->getLine(), \"file\" => $e->getFile()));\n }\n foreach ($schedule->rosteredshift as $key => $shift) {\n if ($shift->rostered_start_time !== '0000-00-00 00:00:00') {\n $temp = Carbon::parse($shift->rostered_start_time)->timezone(Helper::organisationTimezone())->toDateTimeString();\n $schedule->rosteredshift[$key]->rostered_start_time = $temp;\n }\n if ($shift->rostered_end_time !== '0000-00-00 00:00:00') {\n $temp = Carbon::parse($shift->rostered_end_time)->timezone(Helper::organisationTimezone())->toDateTimeString();\n $schedule->rosteredshift[$key]->rostered_end_time = $temp;\n }\n }\n $schedule = $schedule->toArray();\n $schedule['timezone'] = Carbon::now(Helper::organisationTimezone())->offset / 60;\n return $schedule;\n } else {\n return Helper::jsonLoader(INCORRECT_DATA);\n }\n }", "public function getWeeklyChartList($group)\n {\n return $this->getClient()->call('group.getweeklychartlist', array(\n 'group' => $group,\n ));\n }", "public function findServicesDowntimesForAdminUser(): array;", "private function getBreakPointConfig($breakpoint_group) {\n $data = [];\n $breakpoint_group_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/breakpoint_groups');\n foreach ($breakpoint_group_config_files as $file) {\n $breakpoint_group_config = parent::getConfig($file);\n if ($breakpoint_group_config['machine_name'] == $breakpoint_group) {\n // return $breakpoint_group_config;\n foreach ($breakpoint_group_config['breakpoints'] as $map) {\n $data[$map['machine_name']] = $map;\n }\n break;\n }\n }\n return $data;\n }", "public function testSetGet_schedule_where_time_of_day_has_past_and_no_day_supplied() {\n\t\t//The blog time is -4 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( null, date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+1 day', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 day', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "function eo_schedule_end($format='d-m-Y',$id=''){\n\techo eo_get_schedule_end($format,$id);\n}", "public function schedules()\n {\n $inVacation = config('schedules')['vacation'];\n $weekdays = config('schedules')['tabData']['days'];\n\n if ($inVacation) {\n $schedules = [\n 'sun' => null,\n 'mon' => null,\n 'tue' => null,\n 'wed' => null,\n 'thu' => null,\n 'fri' => null,\n 'sat' => null\n ];\n\n $scheduleMessage = config('schedules')['vacationMessage'] . '<br>...';\n } else {\n $schedules = $this->schedules->getByDay();\n $scheduleMessage = 'Sem horários<br>...';\n }\n\n return [\n 'weekDays' => $weekdays,\n 'currentDay' => \\strtolower(\\date('D')),\n 'schedules' => $schedules,\n 'scheduleEmptyMessage' => $scheduleMessage\n ];\n }", "function GetAllSchedules() {\n\tglobal $server;\n\tglobal $user;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t$array = LaunchCurl($url);\n\treturn $array;\n}", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "function get_scheduled_days() {\n\t\treturn Clean::ids( $this->get_option( 'scheduled_day' ) );\n\t}", "public function findServicesDowntimesForNonAdminUser(): array;", "public function testGetScheduleByScheduleDayOfWeek() {\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::getScheduleByScheduleDayOfWeek($this->getPDO(), $schedule->getScheduleCompanyId());\n\n\t\t//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 get_timetable() {\n $week = $this->qc->timetable_get_week();\n $days = array();\n\n for ($i=2; $i < count($week); $i++) {\n $day = $this->qc->timetable_get_day($week[$i]);\n array_push($days, $day);\n }\n }", "static function process_scheduler(){\n\t\treturn self::process_offline_leads();\n\t}", "function get_hostgroup_data()\n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\n\t$hostgroups = $NagiosData->getProperty('hostgroups');\n\t$hosts = $NagiosData->getProperty('hosts');\n\n\t$hostgroup_data = array();\n\tforeach ($hostgroups as $group => $members) \n\t{\n\t\t\n\t\t\n\t\t$hostgroup_data[$group] = array(\n\t\t\t'member_data' => array(),\n\t\t\t'host_counts' => get_state_of('hosts', build_hostgroup_details($members)),\n\t\t\t'service_counts' => get_state_of('services', build_host_servicegroup_details($members))\n\t\t\t);\n\t\t\n\t\t//skip ahead if there are no authorized hosts\t\t\t\n\t\tif(array_sum($hostgroup_data[$group]['host_counts'])==0) continue; //skip empty groups \n\t\t\t\n\t\tforeach ($members as $member) \n\t\t{\n\t\t\n\t\t\tif(!$NagiosUser->is_authorized_for_host($member)) continue; //user-level filtering \t\t\n\t\t\n\t\t\t$host = $hosts[$member];\n\t\t\tprocess_host_status_keys($host); \n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_name'] = $host['host_name'];\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_state'] = $host['current_state'];\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['state_class'] = get_color_code($host);\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['services'] = array();\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_url'] = \n\t\t\t\tBASEURL.'index.php?type=hostdetail&name_filter='.urlencode($host['host_name']);\n\n\t\t\t\n\t\t\tif (isset($host['services'])) {\n\t\t\t\tforeach($host['services'] as $service) {\n\t\t\t\t\n\t\t\t\t\tif(!$NagiosUser->is_authorized_for_service($member,$service['service_description'])) continue; //user-level filtering \t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tprocess_service_status_keys($service);\n\t\t\t\t\t$service_data = array(\n\t\t\t\t\t\t'state_class' => get_color_code($service),\n\t\t\t\t\t\t'description' => $service['service_description'],\n\t\t\t\t\t\t'service_url' => htmlentities(BASEURL.'index.php?type=servicedetail&name_filter='.$service['service_id']),\n\t\t\t\t\t);\n\t\t\t\t\t$hostgroup_data[$group]['member_data'][$member]['services'][] = $service_data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}\n\treturn $hostgroup_data;\n}", "public function getNextTriggerTimeForWeekly($scheduledDaysOfWeek, $scheduledTime) {\n\t\t$weekDays = array('0' => 'Sunday', '1' => 'Monday', '2' => 'Tuesday', '3' => 'Wednesday', '4' => 'Thursday', '5' => 'Friday', '6' => 'Saturday', '7' => 'Sunday');\n\t\t$currentTime = time();\n\t\t$currentWeekDay = date('N', $currentTime);\n\t\t$nextTime = null;\n\t\tif ($scheduledDaysOfWeek) {\n\t\t\t$scheduledDaysOfWeek = json_decode($scheduledDaysOfWeek, true);\n\t\t\tif (is_array($scheduledDaysOfWeek)) {\n\t\t\t\t// algorithm :\n\t\t\t\t//1. First sort all the weekdays(stored as 0,1,2,3 etc in db) and find the closest weekday which is greater than currentWeekDay\n\t\t\t\t//2. If found, set the next trigger date to the next weekday value in the same week.\n\t\t\t\t//3. If not found, set the trigger date to the next first value.\n\t\t\t\t$nextTriggerWeekDay = null;\n\t\t\t\tsort($scheduledDaysOfWeek);\n\t\t\t\tforeach ($scheduledDaysOfWeek as $index => $weekDay) {\n\t\t\t\t\tif ($weekDays[$weekDay-1] == $weekDays[$currentWeekDay]) { //if today is the weekday selected\n\t\t\t\t\t\t$scheduleWeekDayInTime = strtotime(date('Y-m-d', strtotime($weekDays[$currentWeekDay])) . ' ' . $scheduledTime);\n\t\t\t\t\t\tif ($currentTime < $scheduleWeekDayInTime) { //if the scheduled time is greater than current time, select today\n\t\t\t\t\t\t\t$nextTriggerWeekDay = $currentWeekDay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//current time greater than scheduled time, get the next weekday\n\t\t\t\t\t\t\tif (count($scheduledDaysOfWeek) == 1) { //if only one weekday selected, then get next week\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$weekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[$index + 1];\n\t\t\t\t\t\t\t\tif (empty($nextWeekDay)) { // its the last day of the week i.e. sunday\n\t\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$nextWeekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($weekDay-1 > $currentWeekDay) {\n\t\t\t\t\t\t$nextTriggerWeekDay = $weekDay-1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($nextTime == null) {\n\t\t\t\t\tif (!empty($nextTriggerWeekDay)) {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$nextTriggerWeekDay] . ' ' . $scheduledTime));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$scheduledDaysOfWeek[0]-1] . ' ' . $scheduledTime));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $nextTime;\n\t}", "public function getScheduleTime(){return $this->time_of_day;}", "public function getTriggerDefs($group) {\n\t\ttry {\n\t\t\tif (!empty($_REQUEST['access_token'])) {\n\t\t\t\t$group = $this->dm->getRepository('MongoDocs\\Group')->findOneByMachineName($group);\n\t\t\t\t\n\t\t\t\tif ($group == null) {\n\t\t\t\t\t$this->respondError('Invalid group machine name.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qb = $this->dm->createQueryBuilder('MongoDocs\\TriggerDef')\n\t\t\t\t\t->field('group')->references($group)\n\t\t\t\t\t->sort('name');\n\t\t\t\t$triggerDefs = $qb->getQuery()->execute();\n\n\t\t\t\t$this->respond($triggerDefs->toArray());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->respondError('Missing access token.', 401);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$this->respondError($e->getMessage() . \" in \" . $e->getFile() . \" on line \" . $e->getLine() . \"\\n\" . $e->getTraceAsString());\n\t\t}\n\t}", "function filter_cron_schedules($schedules) {\n $schedules['once_half_hour'] = array(\n 'interval' => 1800, // seconds\n 'display' => __('Once Half an Hour')\n );\n $schedules['half_part_time'] = array(\n 'interval' => 900, // seconds\n 'display' => __('Half Part Time')\n );\n\n return $schedules;\n}", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysdate() as now\n from schedule\n ORDER BY gameDate\";\n\n try {\n return $this->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"\"}}';\n }\n }", "public static function getSchedDay($date, $user) {\n\n // Slot defaults\n $schedDay = new SchedDay($date);\n /*\n $sql = SchedDao::SQL_SELECT_SCHED .\n \" WHERE user_id=\" . $user->id . \" AND date=\" . quote($date) .\n \" ORDER BY time_start, client_id\";\n $res = query($sql); \n $scheds = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $sched = SchedDao::buildSched($row);\n $sched->client = SchedDao::getClient($sched->clientId);\n $scheds[] = $sched;\n }\n */\n logit_r('here getschedday');\n $scheds = Scheduling::getAppts($date, $user->id);\n $schedUser = new SchedUser($user->id, $user->uid, $user->name);\n $schedUser->scheds = $scheds;\n $schedDay->users[] = $schedUser;\n return $schedDay;\n }", "function recurringdowntime_array_to_cfg($arr)\n{\n if (count($arr) == 0) {\n return \"\";\n }\n $cfg_str = \"\";\n foreach ($arr as $sid => $schedule) {\n if (count($schedule) == 0) {\n continue;\n }\n $cfg_str .= \"define schedule {\\n\";\n $cfg_str .= \"\\tsid\\t\\t\\t$sid\\n\";\n foreach ($schedule as $var => $val) {\n\n // get a sane tab count for proper viewing/troubleshooting\n $tabs = \"\\t\\t\";\n if ($var == 'servicegroup_name' || $var == 'service_description')\n $tabs = \"\\t\";\n if ($var == 'user' || $var == 'comment' || $var == 'time' || $var == 'svcalso')\n $tabs .= \"\\t\";\n\n $cfg_str .= \"\\t$var{$tabs}$val\\n\";\n }\n $cfg_str .= \"}\\n\\n\";\n }\n return $cfg_str;\n}", "protected function schedule(Schedule $schedule)\n {\n //更新wiki的昨天热度数据,每天5点执行\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('5:00');\n //从欢网数据中心同步7天节目单,每周日早上3点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0,+1,+2,+3,+4,+5,+6,+7'])->dailyAt('3:00')->sundays();\n //从欢网数据中心同步当天和昨天节目单任务,每天6,10点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=-1,0,+1'])->twiceDaily(6, 10);\n //从欢网数据中心同步当天节目单任务,每天13,15,18,23点执行\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(13, 15);\n $schedule->command(Commands\\CronSyncProgramFromHuan::class,['--dayNums=0'])->twiceDaily(18, 23);\n //从欢网数据中心同步频道热度,每五分钟执行一次\n $schedule->command(Commands\\CronUpdateChannelHotFromHuan::class)->everyFiveMinutes();\n //更新正在播出的节目,每分钟执行一次\n $schedule->command(Commands\\CronUpdateLiveProgram::class)->everyMinute();\n //维基热度,可回看,可预约维基计算,每天8点执行一次\n $schedule->command(Commands\\CronUpdateWikiExtendInfo::class)->dailyAt('8:00');\n //从腾讯视频获取vod的热度数据\n $schedule->command(Commands\\CronUpdateQQAlbumHotFromQQ::class)->twiceDaily(7, 11);\n //从HDP更新频道列表,每天一次\n $schedule->command(Commands\\CronUpdateHdpChannels::class)->dailyAt('8:20');\n }", "function get_weekday_stats(){\n if(!DashboardCommon::is_su()) return null;\n \n $sat = strtotime(\"last saturday\");\n $sat = date('w', $sat) == date('w') ? $sat + 7 * 86400 : $sat;\n $fri = strtotime(date(\"Y-m-d\", $sat) . \" +6 days\");\n $from = date(\"Y-m-d\", $sat);//for current week only\n $to = date(\"Y-m-d\", $fri);//for current week only\n $sql = \"SELECT DAYNAME(atr.call_start) as dayname,count(*) as total \n FROM week_days wd \n LEFT JOIN ( SELECT * FROM calls WHERE call_start >= '\" . $this->from . \"' AND call_start <= '\" . $this->to . \"') atr\n ON wd.week_day_num = DAYOFWEEK(atr.call_start)\n GROUP BY\n DAYOFWEEK(atr.call_start)\";\n\n $this_week_rec = DashboardCommon::db()->Execute($sql);\n $saturday = $sunday = $monday = $tuesday = $wednesday = 0;\n $thursday = $friday = 0;\n// $data = array();\n// while (!$this_week_rec->EOF) {\n// $k = $this_week_rec->fields['dayname'];\n// $data[$k]= $this_week_rec->fields['total'];\n// $this_week_rec->MoveNext();\n// }\n// \n// return array_keys($data, max($data));\n\n while (!$this_week_rec->EOF) {\n $daynames = $this_week_rec->fields['dayname'];\n $totalcalls = $this_week_rec->fields['total'];\n if ($daynames == 'Saturday') {\n $saturday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Sunday') {\n $sunday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Monday') {\n $monday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Tuesday') {\n $tuesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Wednesday') {\n $wednesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Thursday') {\n $thursday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Friday') {\n $friday = $this_week_rec->fields['total'];\n }\n\n $this_week_rec->MoveNext();\n }\n\n $arr = array('Saturday' => $saturday,\n 'Sunday' => $sunday,\n 'Monday' => $monday,\n 'Tuesday' => $tuesday,\n 'Wednesday' => $wednesday,\n 'Thursday' => $thursday,\n 'Friday' => $friday\n );\n $max_day = array_keys($arr, max($arr));\n \n $avg_calltime_sql = \"SELECT sum(duration) as total_call_time, count(*) as total_records, \n sum(duration) / count(*) as avg_time\n FROM \n (\n SELECT call_end-call_start as duration\n FROM calls\n WHERE call_start >= '\".$this->from.\"' AND call_start <= '\".$this->to.\"'\n ) as dt\";\n $avg_calltime_res = DashboardCommon::db()->Execute($avg_calltime_sql);\n \n \n return array('weekday'=>$max_day[0],'avg_call_time'=>$avg_calltime_res->fields['avg_time']);\n \n }", "function timeconditions_timegroups_get_times($timegroup, $convert=false) {\n\tglobal $db;\n\tglobal $version;\n\n if ($convert && (!isset($version) || $version == '')) {\n $engineinfo = engine_getinfo();\n $version = $engineinfo['version'];\n }\n if ($convert) {\n $ast_ge_16 = version_compare($version,'1.6','ge');\n }\n\t$sql = \"select id, time from timegroups_details where timegroupid = $timegroup\";\n\t$results = $db->getAll($sql);\n\tif(DB::IsError($results)) {\n\t\t$results = null;\n\t}\n\tforeach ($results as $val) {\n $times = ($convert && $ast_ge_16) ? strtr($val[1],'|',',') : $val[1];\n $tmparray[] = array($val[0], $times);\n\t}\n\treturn $tmparray;\n}", "protected function schedule(Schedule $schedule)\n {\n //admim模块下的demo测试任务\n $schedule->command('task_admin_demo_taskone')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务1\n $schedule->command('task_admin_demo_tasktwo')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务2\n $schedule->command('task_admin_demo_taskthree')->everyFiveMinutes()->withoutOverlapping();//admim模块下的demo测试任务3\n\n //xx模块xx任务\n\n }", "public function getNextTriggerTime() {\n\t\tglobal $default_timezone;\n\t\t$admin = Users::getActiveAdminUser();\n\t\t$adminTimeZone = $admin->time_zone;\n\t\t@date_default_timezone_set($adminTimeZone);\n\n\t\t$scheduleType = $this->getWFScheduleType();\n\t\t$scheduleMinute= $this->getScheduleMinute();\n\t\t$nextTime = date('Y-m-d H:i:s');\n\t\tif ($scheduleType==Workflow::$SCHEDULED_BY_MINUTE) {\n\t\t\t$nextTime=date('Y-m-d H:i:s', strtotime(\"+ $scheduleMinute minutes\"));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_HOURLY) {\n\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime('+1 hour'));\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_DAILY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForDaily($this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_WEEKLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForWeekly($this->getWFScheduleWeek(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_DATE) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByDate($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_MONTHLY_BY_WEEKDAY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForMonthlyByWeekDay($this->getWFScheduleDay(), $this->getWFScheduleTime());\n\t\t}\n\n\t\tif ($scheduleType == Workflow::$SCHEDULED_ON_SPECIFIC_DATE || $scheduleType == Workflow::$SCHEDULED_ANNUALLY) {\n\t\t\t$nextTime = $this->getNextTriggerTimeForAnnualDates($this->getWFScheduleAnnualDates(), $this->getWFScheduleTime());\n\t\t}\n\t\t@date_default_timezone_set($default_timezone);\n\t\treturn $nextTime;\n\t}", "function card_schedule_get(){\n\t\tif ($this->get('idspbu') == NULL){\n\t\t\t$this->response(array( 'status' => \"ID SPBU not found\" ), 408);\n\t\t} else {\n\t\t\t$param['id_spbu'] = $this->get('idspbu');\n\t\t\t$param['id_pelanggan'] = $this->get('idpelanggan');\n\t\t\t$param['id_card'] = $this->get('idcard');\n\t\t\t$param['nik'] = $this->get('nik');\n\t\t\t\n\t\t\t$response = $this->rest_model->getCard($this->get('idspbu'), $param);\n\t\t\tif(!empty($response)){\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"NULL\" ), 406);\n\t\t\t}\n\t\t}\n\t}", "public static function HostGroup(){\n return bzhyCBase::getInstanceByObject('hostgroup',[]);\n }", "function jetpack_sync_incremental_sync_interval( $schedule_name ) {\n\treturn 'hourly';\n}", "function showschedule($id){\r\n\tglobal $conn;\r\n\t$time=getdate();\r\n\t\r\n\t$query = \"SELECT * FROM schedules WHERE id='\".$id.\"' ORDER BY fin_date ASC\";\r\n\t$res = mysql_query($query,$conn);\r\n\twhile ($rows = mysql_fetch_array($res)){\r\n\r\n\t\r\n\r\n\t\tif($rows['onoff'] == 1){\r\n\r\n\t\t\t$lock=0;\r\n\t\t\t$firsthourpassed=0;\r\n\t\t\t$de = 0;\r\n\t\t\t$min = \"00\";\r\n\t\t\t$tim = \"00\";\r\n\t\t\t$stopschdl=0;\r\n\r\n\r\n\t\t\tif($rows['fin_date'] == $today){\r\n\t\t\t\tif((($time['hours'] > $rows['start_hour']) || ($time['hours'] == $rows['start_hour'] && $time['minutes'] >= $rows['start_minute'])) && (($time['hours'] < $rows['fin_hour']) || ($time['hours'] == $rows['fin_hour'] && $time['minute'] <= $rows['fin_minute']))){\r\n\t\t\t\t\t$lock=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t\tfor ($j = $rows['start_hour']; $j <= $rows['fin_hour']; $j++) {\r\n\t\t\t\tfor ($i = 0; $i < 60; $i= $i+$rows['minutes']) {\r\n\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($rows['fin_minute'] <= $i) ){\r\n\t\t\t\t\t\t\t$stopschdl=1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($stopschdl==0){\r\n\t\t\t\t\t\tif($i >0){\r\n\t\t\t\t\t\t\t$finalleftover= 60 - $i;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($firsthourpassed==1 && $i==0 && $finalleftover>0){\r\n\t\t\t\t\t\t\tif($finalleftover < $rows['minutes']){\r\n\t\t\t\t\t\t\t\t$i = $rows['minutes']-$finalleftover;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($firsthourpassed==0){\r\n\t\t\t\t\t\t\t$i=$rows['start_minute'];\r\n\t\t\t\t\t\t\t$firsthourpassed=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($i < 10){\r\n\t\t\t\t\t\t\t$min= \"0\".$i;\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t$min= $i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($rows['seconds'] == '30'){\r\n\t\t\t\t\t\t\tif($de == 1){\r\n\t\t\t\t\t\t\t\t$tim = \"30\";\r\n\t\t\t\t\t\t\t\t$de=0;\r\n\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t$tim = \"00\";\r\n\t\t\t\t\t\t\t\t$de=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$q = \"SELECT * FROM studentslots WHERE sch_date_id ='\".$rows['id'].$j.$min.$tim.\"'\";\r\n\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\t\t\t\t\t\t$date_id=$rows['id'].$j.$min.$tim ;\r\n\r\n\t\t\t\t\t\tif(isset($row['user_id'])){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$q = \"SELECT * FROM users WHERE id ='\".$row['user_id'].\"'\";\r\n\t\t\t\t\t\t\t$result = mysql_query($q,$conn);\r\n\t\t\t\t\t\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-theme='c' class='ui-li ui-li-static ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\techo \"<p class='ui-li-aside ui-li-desc'><strong>\".$j.\":\".$min.\":\".$tim.\"</strong></p> <h3 class='ui-li-heading'>Name : \" . $row['first_name'] . \" \" . $row['last_name'] . \"</h3> <p class='ui-li-desc'><strong>AEM : \" . $row['aem'] . \" </strong></p>\" ;\r\n\t\t\t\t\t\t\techo \"</div></div></li>\";\r\n\r\n\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-icon='arrow-r' data-iconpos='right' data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(isset($_SESSION['username'])){\r\n\t\t\t\t\t\t\t\techo \"<a href='mobilefunctions.php?id=\".$rows['id'].\"&date_id=\".$date_id.\"&user_id=\".$_SESSION['id'].\"&gid=\".$rows['gid'].\"' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\techo \"<a href='login.php' data-rel='dialog' class='ui-link-inherit'>\";\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\techo \"<tr> <td id='timetd'>\".$j.\":\".$min.\":\".$tim.\" </td> <td id='nametd'> </td><td id='aemtd'> </td>\" ;\r\n\t\t\t\t\t\t\techo \"</a></div><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></div></li>\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"</li>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tempmin = $rows['minutes'] + $i; \r\n\r\n\t\t\t\t\t\tif($tempmin >= 60){\r\n\t\t\t\t\t\t\t$tempmin = $tempmin - 60 ;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif( ($j == $rows['fin_hour']) && ($tempmin >= $rows['fin_minute']) ) {\r\n\t\t\t\t\t\t\t$i=61;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n // Da ka Event\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/PunchEvent';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('9:13');\n // Check sprint progress.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/amChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('10:00');\n // Verify completed tasks\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/doneIssueChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('17:30');\n // volunteer for unassigned task.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/todoChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n })->weekdays()\n ->everyFiveMinutes()\n ->timezone('Asia/Shanghai')\n ->between('9:50', '22:00');\n }", "function dayHourWise($dev) {\n\treturn dayHourWiseGraph(commitDayHourDistribution($dev));\n\t\n}", "public function get_weekday($weekday_number)\n {\n }", "public function findOneDowntimeForNonAdminUser(int $downtimeId): ?Downtime;", "function CreateSchedule($arraypost) {\n\tglobal $server;\n\tglobal $user;\n\tglobal $device;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t\n\t$status \t= (empty($arraypost[\"status\"]) ? \"enabled\" : $arraypost[\"status\"]);\n\t\n\t$on \t\t= (empty($arraypost[\"on\"]) ? 0 : $arraypost[\"on\"]);\n\t$colorhex \t= (empty($arraypost[\"colorhex\"]) ? \"#fead59\" : \"#\".$arraypost[\"colorhex\"]);\n\t$alert \t\t= (empty($arraypost[\"alert\"]) ? \"none\" : $arraypost[\"alert\"]);\n\t$bri \t\t= (empty($arraypost[\"bri\"]) ? \"254\" : $arraypost[\"bri\"]);\n\t$ct \t\t= (empty($arraypost[\"ct\"]) ? \"369\" : $arraypost[\"ct\"]);\n\t$hue \t\t= (empty($arraypost[\"hue\"]) ? \"14910\" : $arraypost[\"hue\"]);\n\t$sat \t\t= (empty($arraypost[\"sat\"]) ? \"144\" : $arraypost[\"sat\"]);\n\t$transition = (empty($arraypost[\"transition\"]) ? \"0\" : $arraypost[\"transition\"]);\n\t$effect\t \t= (empty($arraypost[\"effect\"]) ? \"none\" : $arraypost[\"effect\"]);\n\t\n\t$arrayattr = array();\n\t\n\t// Name -------------------------------------\n\t$arrayattr[] = \"\\\"name\\\":\\\"\".$arraypost[\"name\"].\"\\\"\";\n\t\n\t// Description -------------------------------------\n\t$arrayattr[] = \"\\\"description\\\":\\\"\".$arraypost[\"description\"].\"\\\"\";\n\t\n\t// Command -------------------------------------\n\t\n\t// State On ----------------------------------\n\t$arrayattr1[] = \"\\\"on\\\":\".($on==1 ? \"true\" : \"false\").\"\";\n\t\n\t// Color hex ---------------------------------\n\tif (!empty($colorhex)) {\n\t\t$tabcolor = convertColorHextoxyY($colorhex);\n\t\t$x = $tabcolor[\"x\"];\n\t\t$y = $tabcolor[\"y\"];\n\t\t$bri = intval($tabcolor['Y']);\n\t\t$arrayattr1[] = \"\\\"xy\\\":[\".$x.\",\".$y.\"]\";\n\t}\n\tif ($colorhex=\"#fead59\") {\n\t\t$bri = \"254\";\n\t}\n\t/*\n\t// Alert -------------------------------------\n\t$arrayattr1[] = \"\\\"alert\\\":\\\"\".$alert.\"\\\"\";\n\t\n\t// Brightness --------------------------------\n\t$arrayattr1[] = \"\\\"bri\\\":\".$bri;\n\t\n\t// Colour Temperature ------------------------\n\t$arrayattr1[] = \"\\\"ct\\\":\".$ct;\n\t\n\t// Hue ---------------------------------------\n\t$arrayattr1[] = \"\\\"hue\\\":\".$hue;\n\t\n\t// Saturation --------------------------------\n\t$arrayattr1[] = \"\\\"sat\\\":\".$sat;\n\t\n\t// Transition --------------------------------\n\t$arrayattr1[] = \"\\\"transitiontime\\\":\".$transition;\n\t\n\t// Effect ------------------------------------\n\t$arrayattr1[] = \"\\\"effect\\\":\\\"\".$effect.\"\\\"\";\n\t*/\n\t\n\t$arrayattr[] = \"\\\"command\\\":{\n\t\t\\\"address\\\": \\\"/api/\".$user.\"/groups/\".$arraypost[\"group\"].\"/action\\\",\n\t\t\\\"method\\\": \\\"PUT\\\",\n\t\t\\\"body\\\": { \".implode(\",\", $arrayattr1).\" }}\";\n\t\n\t// LocalTime -------------------------------------\n\t$arrayattr[] = \"\\\"localtime\\\":\\\"\".$arraypost[\"localtime\"].\"\\\"\";\n\t\n\t// Status -------------------------------------\n\t$arrayattr[] = \"\\\"status\\\":\\\"\".$status.\"\\\"\";\n\t\n\t$attr = \"{\";\n\t$attr .= implode($arrayattr, \",\");\n\t$attr .= \"}\";\n\techo $attr;\n\treturn LaunchCurl($url,\"post\",$attr);\n}", "function getCalendarsForAdmin() {\n //\n // http://dev4.krubner.com/admin.php?page=admin_calendar\n //\n // this brings back 2 months worth of days to show in a calendar\n\n global $controller; \n\n $today = new DateTime(date('Y-m-d'));\n\n //Get Calendar for this week\n if(!isset($_GET['ym'])){\n $top_month = date('Y-m');\n } else {\n $top_month = $_GET['ym'];\n }\n\n $firstDayOfMonthDateTime = new DateTime($top_month.\"-01\");\n $lastDayOfMonthDateTime = clone $firstDayOfMonthDateTime;\n $lastDayOfMonthDateTime->modify(\"+1 month\");\n $lastDayOfMonthDateTime->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime, $lastDayOfMonthDateTime); \n\n $calendars = array();\n $calendars[$top_month] = $arrayOfDaysForThisMonth;\n\n $firstDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime;\n $firstDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime2;\n $lastDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime2, $lastDayOfMonthDateTime2); \n\n $calendars[$lastDayOfMonthDateTime2->format('Y-m')] = $arrayOfDaysForThisMonth;\n\n return $calendars; \n}", "public function test_it_sends_daily() {\n $tasks = null;\n require(__DIR__ . '/../../../db/tasks.php');\n self::assertNotNull($tasks);\n foreach ($tasks as $task) {\n if ($task['classname'] == email_digest_task::class) {\n self::assertNotSame('*', $task['minute'], 'minute');\n self::assertNotSame('*', $task['hour'], 'hour');\n self::assertSame('*', $task['day'], 'day');\n self::assertSame('*', $task['dayofweek'], 'dayofweek');\n self::assertSame('*', $task['month'], 'month');\n return;\n }\n }\n self::fail('Not found: ' . email_digest_task::class);\n }", "private function getEventTimeThreshold($eventGroup) {\n if (array_key_exists($eventGroup, $this->eventTimeThresholds)) {\n return $this->eventTimeThresholds[$eventGroup];\n } else {\n return $this->eventTimeThresholds['default'];\n }\n }", "function wpcron_intervals( $schedules ) {\n\n\t// one minute\n\n\t$one_minute = array(\n\t\t\t\t\t'interval' => 60,\n\t\t\t\t\t'display' => 'One Minute'\n\t\t\t\t);\n\n\t$schedules[ 'one_minute' ] = $one_minute;\n\n\t// five minutes\n\n\t$five_minutes = array(\n\t\t\t\t\t'interval' => 300,\n\t\t\t\t\t'display' => 'Five Minutes'\n\t\t\t\t);\n\n\t$schedules[ 'five_minutes' ] = $five_minutes;\n\n\t// return data\n\n\treturn $schedules;\n\n}", "public function getMonthlySchedule()\n {\n return $this->monthly_schedule;\n }", "function getEventByWorkingGroup($idWG)\n{\n require_once 'model/dbConnector.php';\n $connexion = openDBConnexion();\n $request = $connexion->prepare('SELECT Events_idEvents FROM bdd_satisfevent.workinggroups_has_events WHERE Workinggroups_idWorkinggroups = ?');\n $request->execute(array($idWG));\n $result = $request->fetchAll();\n return $result[0];\n}", "protected function schedule(Schedule $schedule)\n {\n \n //$schedule->command('add:winners')->everyMinute();\n \n //$schedule->command('add:winners')->cron('00 18 31 10 * *');\n \n /*$schedule->command('test:test')\n ->everyMinute()\n ->sendOutputTo(base_path() . '/public/output_files/test.txt');\n */\n \n //$schedule->command('add:winners')->cron('52 13 02 11 * *');\n \n $periods = Period::all();\n \n foreach($periods as $period) {\n \n $enddate_month = explode('-', $period->enddate)[1];\n $enddate_day = explode(' ', explode('-', $period->enddate)[2])[0];\n //echo(\"maand: \" . $enddate_month . \" en dag \" . $enddate_day . \"<br>\");\n $schedule->command('add:winners')->cron('40 22 ' . $enddate_day . ' ' . $enddate_month . ' * *');\n }\n \n \n }", "function schedule_generate($classes_arr, $options) {\n\t\tif ( intval($options[\"row_interval\"]) == 0 ) $options[\"row_interval\"] = 30;\t\n\n\t\t// Define como hora de inicio 07:30 si no se establece\n\t\tif ( ! isset($options[\"start_time\"]) ) {\n\t\t\t$options[\"start_time\"] = 730;\n\t\t}\n\t\telse {\n\t\t\t// change to the nearest row interval hour down\n\t\t\t$time_hour = ($options[\"start_time\"] - $options[\"start_time\"] % 100) / 100; \n\t\t\t$time_min = $options[\"start_time\"] % 100;\n\t\t\t\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\n\t\t\t\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) $time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\n\t\t\t$options[\"start_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// Define la hora final como 21:00 si no se establece\n\t\tif ( ! isset($options[\"end_time\"]) ) {\n\t\t\t$options[\"end_time\"] = 2100;\n\t\t}\n\t\telse {\n\t\t\t// change to the nearest row interval hour down.\n\t\t\t$time_hour = ($options[\"end_time\"] - $options[\"end_time\"] % 100) / 100; \n\t\t\t$time_min = $options[\"end_time\"] % 100;\n\t\t\t\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\n\t\t\t\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) $time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\n\t\t\t$options[\"end_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\n\t\t\n\t\t}\n\n\t\t$days_arr = array(\"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\");\n\t\t$days_norow = array(0, 0, 0, 0, 0, 0);\n\n\t\t\n\t\t$html = \"<table border=1px width=\\\"100%\\\" bgcolor=\\\"#000000\\\" cellspacing=\\\"1\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\n\t\t// output title if set in $options.\n\t\tif ( isset($options[\"title\"]) ) {\n\t\t\t$cell_style = \"background-color: #000; color: #ffffff; border: 1px;\"; // default title style \n \t\t\t$cell_style .= $options[\"title_style\"];\n\t\t\t\n\t\t\t$html .= \"\t<tr>\\n\t\t<th colspan=\\\"8\\\" style=\\\"$cell_style\\\">\".$options[\"title\"].\"</th>\\n\t</tr>\\n\";\n\t\t}\n\t\t\n\t\t$cell_style = \"border: 1px; background-color: #c0c0c0; color: #000000;\"; // default day header style\n\t\t$cell_style .= $options[\"dayheader_style\"];\n\t\t\n\t\t$html .= \"\t<tr style=\\\"$cell_style\\\">\\n\t\t<th></th>\\n\";\n\t\tforeach ($days_arr as $day){\n\t\t\t$html .= \"\t\t<th>$day</th>\\n\";\n\t\t}\n\t\t$html .= \"\t</tr>\\n\";\n\t\t\n\t\t$cur_time = $options[\"start_time\"];\n\t\twhile ($cur_time < $options[\"end_time\"]) {\n\t\t\t$format_time = date(\"H:i\", strtotime(substr($cur_time, 0, strlen($cur_time) - 2).\":\".substr($cur_time, -2, 2)));\n\t\t\t\n\t\t\t$cell_style = \"background-color: #c0c0c0; color: #000000;\"; // default time cell style\n\t\t\t$cell_style .= $options[\"time_style\"];\t\t\t\n\t\t\t\t\n\t\t\t$html .= \"\t<tr bgcolor=\\\"#ffffff\\\">\\n\t\t<td align=\\\"center\\\" width=\\\"2%\\\" style=\\\"$cell_style\\\"><b>$format_time</b></td>\\n\";\n\t\t\tfor ($cur_day = 0; $cur_day < 6; $cur_day++) {\n\t\t\t\n\t\t\t\t// if flag is set not to print any row for the next\n\t\t\t\t// row (since a class spans more than one row), then\n\t\t\t\t// continue.\n\t\t\t\tif ($days_norow[$cur_day] > 0) {\n\t\t\t\t\t$days_norow[$cur_day]--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t // check if there is a class during this day/time\n\t\t\t\tif ( isset($classes_arr[$cur_day][$cur_time]) ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$class_interval = intval($classes_arr[$cur_day][$cur_time][\"interval\"]);\n\t\t\t\t\t\tif ( $class_interval == 0 ) $class_interval = 60; // default interval is 60mins\n\t\t\t\t\t\t\n\t\t\t\t\t\t// round to nearest interval\n\t\t\t\t\t\t$class_span = intval($class_interval / $options[\"row_interval\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// flag that for the next $class_span rows, we should not print a cell\n\t\t\t\t\t\t$days_norow[$cur_day] += $class_span - 1;\t\t\n\t\t\t\t\t\n\t\t\t\t\t if ( isset($classes_arr[$cur_day][$cur_time][\"style\"]) )\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"].\"; \".$classes_arr[$cur_day][$cur_time][\"style\"];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$html .= \"\t\t<td width=\\\"14%\\\" rowspan=\\\"$class_span\\\" style=\\\"$cell_style\\\">\".$classes_arr[$cur_day][$cur_time][\"html\"].\"</td>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\telse {\n\t\t\t\t\t\t$html .= \"\t\t<td width=\\\"14%\\\">&nbsp;</td>\\n\";\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$html .= \"\t</tr>\\n\";\n\t\t\t\n\t\t\t$cur_time += $options[\"row_interval\"]; // increment to next row interval\n\t\t\tif ($cur_time % 100 >= 60) $cur_time = $cur_time - $cur_time % 100 + 100;\n\t\t};\n\t\t\t\t\n\t\t\n\t\t\n\t\t$html .= \"</table>\\n\";\n\t\t\n\t\t\n\t\treturn $html;\t\n\t\n}", "function get_viewed_hosts($perm, $groupid = 0, $options = array(), $nodeid = null, $sql = array()) {\n\tglobal $USER_DETAILS, $page;\n\n\t$userid = $USER_DETAILS['userid'];\n\n\t$def_sql = array(\n\t\t// hostname to avoid confusion with node name\n\t\t'select' => array('h.hostid','h.name as hostname'),\n\t\t'from' => array('hosts h'),\n\t\t'where' => array(),\n\t\t'order' => array()\n\t);\n\n\t$def_options = array(\n\t\t'deny_all' =>\t\t\t\t\t\t0,\n\t\t'allow_all' =>\t\t\t\t\t\t0,\n\t\t'select_first_host' =>\t\t\t\t0,\n\t\t'select_first_host_if_empty' =>\t\t0,\n\t\t'do_not_select' =>\t\t\t\t\t0,\n\t\t'do_not_select_if_empty' =>\t\t\t0,\n\t\t'monitored_hosts' =>\t\t\t\t0,\n\t\t'templated_hosts' =>\t\t\t\t0,\n\t\t'real_hosts' =>\t\t\t\t\t\t0,\n\t\t'not_proxy_hosts' =>\t\t\t\t0,\n\t\t'with_items' =>\t\t\t\t\t\t0,\n\t\t'with_monitored_items' =>\t\t\t0,\n\t\t'with_historical_items' =>\t\t\t0,\n\t\t'with_triggers' =>\t\t\t\t\t0,\n\t\t'with_monitored_triggers' =>\t\t0,\n\t\t'with_httptests' =>\t\t\t\t\t0,\n\t\t'with_monitored_httptests' =>\t\t0,\n\t\t'with_graphs' =>\t\t\t\t\t0,\n\t\t'only_current_node' =>\t\t\t\t0\n\t);\n\n\t$def_options = zbx_array_merge($def_options, $options);\n\n\t$config = select_config();\n\n\t$dd_first_entry = $config['dropdown_first_entry'];\n\tif ($def_options['allow_all']) {\n\t\t$dd_first_entry = ZBX_DROPDOWN_FIRST_ALL;\n\t}\n\tif ($def_options['deny_all']) {\n\t\t$dd_first_entry = ZBX_DROPDOWN_FIRST_NONE;\n\t}\n\n\t$result = array('original' => -1, 'selected' => 0, 'hosts' => array(), 'hostids' => array());\n\t$hosts = &$result['hosts'];\n\t$hostids = &$result['hostids'];\n\n\t$first_entry = ($dd_first_entry == ZBX_DROPDOWN_FIRST_NONE) ? _('not selected') : _('all');\n\n\t$hosts['0'] = $first_entry;\n\n\tif (!is_array($groupid) && ($groupid == 0)) {\n\t\tif ($dd_first_entry == ZBX_DROPDOWN_FIRST_NONE) {\n\t\t\treturn $result;\n\t\t}\n\t}\n\telse {\n\t\tzbx_value2array($groupid);\n\n\t\t$def_sql['from'][] = 'hosts_groups hg';\n\t\t$def_sql['where'][] = dbConditionInt('hg.groupid',$groupid);\n\t\t$def_sql['where'][] = 'hg.hostid=h.hostid';\n\t}\n\n\t$_REQUEST['hostid'] = $result['original'] = get_request('hostid', -1);\n\n\tif (is_null($nodeid)) {\n\t\tif (!$def_options['only_current_node']) {\n\t\t\t$nodeid = get_current_nodeid();\n\t\t}\n\t\telse {\n\t\t\t$nodeid = get_current_nodeid(false);\n\t\t}\n\t}\n\n\tif (USER_TYPE_SUPER_ADMIN != $USER_DETAILS['type']) {\n\t\t$userGroups = getUserGroupsByUserId($userid);\n\n\t\t$def_sql['where'][] = 'EXISTS ('.\n\t\t\t\t'SELECT NULL'.\n\t\t\t\t' FROM hosts_groups hgg'.\n\t\t\t\t\t' JOIN rights r'.\n\t\t\t\t\t\t' ON r.id=hgg.groupid'.\n\t\t\t\t\t\t\t' AND '.dbConditionInt('r.groupid', $userGroups).\n\t\t\t\t' WHERE h.hostid=hgg.hostid'.\n\t\t\t\t' GROUP BY hgg.hostid'.\n\t\t\t\t' HAVING MIN(r.permission)>='.$perm.\n\t\t\t\t')';\n\t}\n\n\t// nodes\n\tif (ZBX_DISTRIBUTED) {\n\t\t$def_sql['select'][] = 'n.name';\n\t\t$def_sql['from'][] = 'nodes n';\n\t\t$def_sql['where'][] = 'n.nodeid='.DBid2nodeid('h.hostid');\n\t\t$def_sql['order'][] = 'n.name';\n\t}\n\n\t// hosts\n\tif ($def_options['monitored_hosts']) {\n\t\t$def_sql['where'][] = 'h.status='.HOST_STATUS_MONITORED;\n\t}\n\telseif ($def_options['real_hosts']) {\n\t\t$def_sql['where'][] = 'h.status IN('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.')';\n\t}\n\telseif ($def_options['templated_hosts']) {\n\t\t$def_sql['where'][] = 'h.status='.HOST_STATUS_TEMPLATE;\n\t}\n\telseif ($def_options['not_proxy_hosts']) {\n\t\t$def_sql['where'][] = 'h.status<>'.HOST_STATUS_PROXY;\n\t}\n\n\t// items\n\tif ($def_options['with_items']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL FROM items i WHERE h.hostid=i.hostid )';\n\t}\n\telseif ($def_options['with_monitored_items']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL FROM items i WHERE h.hostid=i.hostid AND i.status='.ITEM_STATUS_ACTIVE.')';\n\t}\n\telseif ($def_options['with_historical_items']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL FROM items i WHERE h.hostid=i.hostid AND (i.status='.ITEM_STATUS_ACTIVE.' OR i.status='.ITEM_STATUS_NOTSUPPORTED.') AND i.lastvalue IS NOT NULL)';\n\t}\n\n\t// triggers\n\tif ($def_options['with_triggers']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL'.\n\t\t\t\t\t\t\t\t\t\t' FROM items i,functions f,triggers t'.\n\t\t\t\t\t\t\t\t\t\t' WHERE i.hostid=h.hostid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND i.itemid=f.itemid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND f.triggerid=t.triggerid)';\n\t}\n\telseif ($def_options['with_monitored_triggers']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL'.\n\t\t\t\t\t\t\t\t\t\t' FROM items i,functions f,triggers t'.\n\t\t\t\t\t\t\t\t\t\t' WHERE i.hostid=h.hostid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND i.status='.ITEM_STATUS_ACTIVE.\n\t\t\t\t\t\t\t\t\t\t\t' AND i.itemid=f.itemid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND f.triggerid=t.triggerid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND t.status='.TRIGGER_STATUS_ENABLED.')';\n\t}\n\n\t// httptests\n\tif ($def_options['with_httptests']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL'.\n\t\t\t\t\t\t\t\t\t\t' FROM applications a,httptest ht'.\n\t\t\t\t\t\t\t\t\t\t' WHERE a.hostid=h.hostid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND ht.applicationid=a.applicationid)';\n\t}\n\telseif ($def_options['with_monitored_httptests']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL'.\n\t\t\t\t\t\t\t\t\t\t' FROM applications a,httptest ht'.\n\t\t\t\t\t\t\t\t\t\t' WHERE a.hostid=h.hostid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND ht.applicationid=a.applicationid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND ht.status='.HTTPTEST_STATUS_ACTIVE.')';\n\t}\n\n\t// graphs\n\tif ($def_options['with_graphs']) {\n\t\t$def_sql['where'][] = 'EXISTS (SELECT NULL'.\n\t\t\t\t\t\t\t\t\t\t' FROM items i,graphs_items gi'.\n\t\t\t\t\t\t\t\t\t\t' WHERE i.hostid=h.hostid'.\n\t\t\t\t\t\t\t\t\t\t\t' AND i.itemid=gi.itemid)';\n\t}\n\n\t$def_sql['order'][] = 'h.name';\n\n\tforeach ($sql as $key => $value) {\n\t\tzbx_value2array($value);\n\n\t\tif (isset($def_sql[$key])) {\n\t\t\t$def_sql[$key] = zbx_array_merge($def_sql[$key], $value);\n\t\t}\n\t\telse {\n\t\t\t$def_sql[$key] = $value;\n\t\t}\n\t}\n\n\t$def_sql['select'] = array_unique($def_sql['select']);\n\t$def_sql['from'] = array_unique($def_sql['from']);\n\t$def_sql['where'] = array_unique($def_sql['where']);\n\t$def_sql['order'] = array_unique($def_sql['order']);\n\n\t$sql_select = '';\n\t$sql_from = '';\n\t$sql_where = '';\n\t$sql_order = '';\n\tif (!empty($def_sql['select'])) {\n\t\t$sql_select .= implode(',', $def_sql['select']);\n\t}\n\tif (!empty($def_sql['from'])) {\n\t\t$sql_from .= implode(',', $def_sql['from']);\n\t}\n\tif (!empty($def_sql['where'])) {\n\t\t$sql_where .= ' AND '.implode(' AND ', $def_sql['where']);\n\t}\n\tif (!empty($def_sql['order'])) {\n\t\t$sql_order .= implode(',', $def_sql['order']);\n\t}\n\n\t$res = DBselect(\n\t\t'SELECT DISTINCT '.$sql_select.\n\t\t' FROM '.$sql_from.\n\t\t' WHERE '.DBin_node('h.hostid', $nodeid).\n\t\t\t$sql_where.\n\t\t' ORDER BY '.$sql_order\n\t);\n\twhile ($host = DBfetch($res)) {\n\t\t$hosts[$host['hostid']] = $host['hostname'];\n\t\t$hostids[$host['hostid']] = $host['hostid'];\n\n\t\tif (bccomp($_REQUEST['hostid'], $host['hostid']) == 0) {\n\t\t\t$result['selected'] = $host['hostid'];\n\t\t}\n\t}\n\n\t$profile_hostid = CProfile::get('web.'.$page['menu'].'.hostid');\n\n\tif ($def_options['do_not_select']) {\n\t\t$_REQUEST['hostid'] = $result['selected'] = 0;\n\t}\n\telseif ($def_options['do_not_select_if_empty'] && $_REQUEST['hostid'] == -1) {\n\t\t$_REQUEST['hostid'] = $result['selected'] = 0;\n\t}\n\telseif ($def_options['select_first_host']\n\t\t\t\t|| ($def_options['select_first_host_if_empty'] && $_REQUEST['hostid'] == -1 && is_null($profile_hostid))) {\n\t\t$first_hostid = next($hostids);\n\t\treset($hostids);\n\n\t\tif ($first_hostid !== false) {\n\t\t\t$_REQUEST['hostid'] = $result['selected'] = $first_hostid;\n\t\t}\n\t\telse {\n\t\t\t$_REQUEST['hostid'] = $result['selected'] = 0;\n\t\t}\n\t}\n\telse {\n\t\tif ($config['dropdown_first_remember']) {\n\t\t\tif ($_REQUEST['hostid'] == -1) {\n\t\t\t\t$_REQUEST['hostid'] = is_null($profile_hostid) ? '0' : $profile_hostid;\n\t\t\t}\n\n\t\t\tif (isset($hostids[$_REQUEST['hostid']])) {\n\t\t\t\t$result['selected'] = $_REQUEST['hostid'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_REQUEST['hostid'] = $result['selected'];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$_REQUEST['hostid'] = $result['selected'];\n\t\t}\n\t}\n\n\treturn $result;\n}", "public function get_schedule( $schedule_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'schedules/' . abs( intval( $schedule_id ) ),\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "function getSportsDays($params = array()){\r\n $seasonID = trim($this->seasonInfo['id']);\r\n if(!$seasonID) {\r\n $this->errorMessage[] = 'SeasonID is not specified';\r\n return array();\r\n }\r\n $leagueID = trim($this->seasonInfo['league_id']);\r\n if(!$leagueID) {\r\n $this->errorMessage[] = 'leagueID is not specified';\r\n return array();\r\n }\r\n if(!is_array($params)) $params = array();\r\n // $this->dbInstance()->queryParams['fields'] = '*';\r\n $this->dbInstance()->queryParams['table'] = 'league_season_sportsday';\r\n\r\n\r\n if(isset($params['scheduledAfter']) && intval($params['scheduledAfter'])){\r\n $scheduledAfter = \"&& (SELECT COUNT(`id`) FROM `league_season_sportsday_game` WHERE `sportsday_id` = `league_season_sportsday`.`id` && `datetime` > \".intval($params['scheduledAfter']).\")\";\r\n }\r\n if(isset($params['scheduledBefore']) && intval($params['scheduledBefore'])){\r\n $scheduledBefore = \"&& (SELECT COUNT(`id`) FROM `league_season_sportsday_game` WHERE `sportsday_id` = `league_season_sportsday`.`id` && `datetime` < \".intval($params['scheduledBefore']).\")\";\r\n }\r\n $this->dbInstance()->queryParams['where'] = \"\r\n `league_id` = :leagueID && \r\n `season_id` = :seasonID \" . \r\n $scheduledAfter . \r\n $scheduledBefore;\r\n\r\n $this->dbInstance()->queryParams['params'] = array(\r\n 'leagueID' => $leagueID,\r\n 'seasonID' => $seasonID\r\n );\r\n \r\n $this->dbInstance()->queryParams['order'] = $this->dbInstance()->calcORDERcondition($params, 'sort', 'DESC');\r\n \r\n // $offset = ($page - 1) * $limit;\r\n $this->dbInstance()->queryParams['limit'] = $this->dbInstance()->calcLIMITcondition($params);\r\n $result = $this->dbInstance()->select();\r\n\r\n if(isset($params['extend'])){\r\n if(!is_array($params['extend'])) $params['extend'] = array($params['extend']);\r\n if(in_array('games', $params['extend'])){\r\n foreach ($result as $key => $value) {\r\n $result[$key]['games'] = $this->getSportsDayGames(\r\n $result[$key]['id'], \r\n array(\r\n 'scheduledAfter'=>$params['scheduledAfter'],\r\n 'scheduledBefore'=>$params['scheduledBefore']\r\n )\r\n );\r\n }\r\n }\r\n }\r\n\r\n return $result;\r\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('regverification:clean')\n// ->daily();\n// $schedule->command('activity:begin:remind')\n// ->dailyAt('12:30');\n// $schedule->command('teammember:report:pendingenrollmentrequests')\n// ->dailyAt('22:00');\n// // not need to remind\n//// $schedule->command('activity:report:pendingalbumimages')\n//// ->dailyAt('09:10');\n// $schedule->command(\"storage:tmp:clean -e '3 days'\")\n// ->dailyAt('03:00');\n// $schedule->command(\"attendant:export -l gaoxin_attendants -t [email protected]\")\n// ->dailyAt('08:00');\n }", "public function getGroup($group)\n\t{\n\t\tif (!in_array($group, $this->_loaded_groups)) {\n\t\t\t$this->_pending_groups[] = $group;\n\t\t\t$this->_loadPendingGroups();\n\t\t}\n\n\t\t$ret = array();\n\n\t\t$off = strlen($group) + 1;\n\t\tforeach ($this->settings as $k => $v) {\n\t\t\tif (strpos($k, $group) === 0) {\n\t\t\t\t$new_k = substr($k, $off);\n\t\t\t\t$ret[$new_k] = $v;\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "function nhymxu_weekly_cron_job_recurrence( $schedules ) {\n\t$schedules['weekly'] = array(\n\t\t'display' => 'weekly',\n\t\t'interval' => 604800,\n\t);\n\treturn $schedules;\n}", "function cron_add_weekly( $schedules ) {\n $schedules['weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly' )\n );\n return $schedules;\n}", "public function findOneDowntimeForAdminUser(int $downtimeId): ?Downtime;", "function update_interval_schedule($int) {\n\t//check schedule exists, remove it, add new one\t\n\twp_clear_scheduled_hook('standards_resource_check');\t\n\tif ($int > 0)\n\t\twp_schedule_single_event( time() + 3600 * $int, 'standards_resource_check' );\n}", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "public function getHourlySchedule()\n {\n return $this->hourly_schedule;\n }", "function timeconditions_timegroups_del_group($timegroup) {\n\tglobal $db;\n\n\t$sql = \"delete from timegroups_details where timegroupid = $timegroup\";\n\t$db->query($sql);\n\t$sql = \"delete from timegroups_groups where id = $timegroup\";\n\t$db->query($sql);\n\tneedreload();\n}" ]
[ "0.5926294", "0.57772595", "0.5629028", "0.5561237", "0.5469031", "0.5372213", "0.53004146", "0.5245684", "0.5170883", "0.5101887", "0.49500608", "0.4927373", "0.4859486", "0.4842459", "0.4835791", "0.48098764", "0.47947094", "0.47947094", "0.4790069", "0.47781736", "0.47557384", "0.47427857", "0.47409266", "0.47135225", "0.4680135", "0.4635542", "0.4626696", "0.46069995", "0.4577087", "0.45739117", "0.45328698", "0.45158473", "0.45091677", "0.4505", "0.44881186", "0.44636846", "0.44571185", "0.44378212", "0.44209105", "0.44145152", "0.4409951", "0.44089806", "0.44089806", "0.4397609", "0.4391263", "0.43839976", "0.43545744", "0.43522534", "0.43453676", "0.43395248", "0.4333235", "0.4332231", "0.4312527", "0.43101978", "0.43005335", "0.42960364", "0.4291473", "0.4278478", "0.427574", "0.42709777", "0.42703068", "0.4257806", "0.42534536", "0.4251763", "0.42481983", "0.42459828", "0.42413312", "0.4235924", "0.4234328", "0.42332017", "0.42267793", "0.42122427", "0.42099208", "0.42098027", "0.42022", "0.4197646", "0.41961944", "0.4192071", "0.4189188", "0.41858137", "0.41854832", "0.41847566", "0.4183184", "0.41809073", "0.41785443", "0.4178191", "0.4172616", "0.41665286", "0.4163714", "0.41635114", "0.41632372", "0.41587", "0.4156602", "0.41537517", "0.4150996", "0.4149418", "0.41476816", "0.41462642", "0.41462642", "0.41454613" ]
0.6838731
0
Get downtime schedule for specified servicegroup
function recurringdowntime_get_servicegroup_cfg($servicegroup = false) { $cfg = recurringdowntime_get_cfg(); $ret = array(); foreach ($cfg as $sid => $schedule) { if (array_key_exists('schedule_type', $schedule)) { if ($schedule["schedule_type"] != "servicegroup") { continue; } } if ($servicegroup && !(strtolower($schedule["servicegroup_name"]) == strtolower($servicegroup))) { continue; } if (array_key_exists('servicegroup_name', $schedule)) { if (is_authorized_for_servicegroup(0, $schedule["servicegroup_name"])) { $ret[$sid] = $schedule; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recurringdowntime_get_hostgroup_cfg($hostgroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"hostgroup\") {\n continue;\n }\n }\n if ($hostgroup && !(strtolower($schedule[\"hostgroup_name\"]) == strtolower($hostgroup))) {\n continue;\n }\n if (array_key_exists('hostgroup_name', $schedule)) {\n if (is_authorized_for_hostgroup(0, $schedule[\"hostgroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_get_service_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"host\") {\n continue;\n }\n }\n\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n\n if (array_key_exists('host_name', $schedule)) {\n if (array_key_exists('service_description', $schedule)) {\n if ($schedule[\"service_description\"] != '*') {\n $search_str = $schedule[\"service_description\"];\n\n if (strstr($schedule[\"service_description\"], \"*\")) {\n $search_str = \"lk:\" . str_replace(\"*\", \"%\", $schedule[\"service_description\"]);\n }\n if (!is_authorized_for_service(0, $schedule[\"host_name\"], $search_str)) {\n continue;\n }\n }\n }\n\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "function recurringdowntime_show_downtime()\n{\n global $request;\n\n do_page_start(array(\"page_title\" => _(\"Recurring Downtime\")), true);\n\n if (isset($request[\"host\"])) {\n $host_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n $service_tbl_header = _(\"Recurring Downtime for Host: \") . $request[\"host\"];\n if (is_authorized_for_host(0, $request[\"host\"])) {\n $host_data = recurringdowntime_get_host_cfg($request[\"host\"]);\n $service_data = recurringdowntime_get_service_cfg($request[\"host\"]);\n }\n } elseif (isset($request[\"hostgroup\"])) {\n $hostgroup_tbl_header = _(\"Recurring Downtime for Hostgroup: \") . $request[\"hostgroup\"];\n if (is_authorized_for_hostgroup(0, $request[\"hostgroup\"])) {\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($request[\"hostgroup\"]);\n }\n } elseif (isset($request[\"servicegroup\"])) {\n $servicegroup_tbl_header = _(\"Recurring Downtime for Servicegroup: \") . $request[\"servicegroup\"];\n if (is_authorized_for_servicegroup(0, $request[\"servicegroup\"])) {\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($request[\"servicegroup\"]);\n }\n }\n\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n /*\n $host_tbl_header = \"Recurring Downtime for All Hosts\";\n $hostgroup_tbl_header = \"Recurring Downtime for All Hostgroups\";\n $servicegroup_tbl_header = \"Recurring Downtime for All Servicegroups\";\n */\n $host_tbl_header = _(\"Host Schedules\");\n $service_tbl_header = _(\"Service Schedules\");\n $hostgroup_tbl_header = _(\"Hostgroup Schedules\");\n $servicegroup_tbl_header = _(\"Servicegroup Schedules\");\n $host_data = recurringdowntime_get_host_cfg($host = false);\n $service_data = recurringdowntime_get_service_cfg($host = false);\n $hostgroup_data = recurringdowntime_get_hostgroup_cfg($hostgroup = false);\n $servicegroup_data = recurringdowntime_get_servicegroup_cfg($servicegroup = false);\n $showall = true;\n }\n\n ?>\n <h1><?php echo _(\"Recurring Downtime\"); ?></h1>\n\n <?php echo _(\"Scheduled downtime definitions that are designed to repeat (recur) at set intervals are shown below. The next schedule for each host/service are added to the monitoring engine when the cron runs at the top of the hour.\"); ?>\n\n <?php\n if (!isset($request[\"host\"]) && !isset($request[\"hostgroup\"]) && !isset($request[\"servicegroup\"])) {\n ?>\n <p>\n <?php } ?>\n\n <script type=\"text/javascript\">\n function do_delete_sid(sid) {\n input = confirm('<?php echo _(\"Are you sure you wish to delete this downtime schedule?\"); ?>');\n if (input == true) {\n window.location.href = 'recurringdowntime.php?mode=delete&sid=' + sid + '&nsp=<?php echo get_nagios_session_protector_id();?>';\n }\n }\n </script>\n\n <?php\n if ($showall) {\n ?>\n <script type=\"text/javascript\">\n $(document).ready(function () {\n $(\"#tabs\").tabs().show();\n });\n </script>\n\n <div id=\"tabs\" class=\"hide\">\n <ul>\n <li><a href=\"#host-tab\"><?php echo _(\"Hosts\"); ?></a></li>\n <li><a href=\"#service-tab\"><?php echo _(\"Services\"); ?></a></li>\n <li><a href=\"#hostgroup-tab\"><?php echo _(\"Hostgroups\"); ?></a></li>\n <li><a href=\"#servicegroup-tab\"><?php echo _(\"Servicegroups\"); ?></a></li>\n </ul>\n <?php\n }\n ?>\n\n <?php if (!empty($_GET[\"host\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n\n // hosts tab\n if ($showall) {\n echo \"<div id='host-tab'>\";\n }\n ?>\n\n <h4 <?php if ($host) { echo 'style=\"margin-top: 20px;\"'; } ?>><?php echo $host_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=host&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n }\n ?>\n\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Months\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Handle Child Hosts\"); ?></th>\n <th class=\"center\" style=\"width: 80px;\"><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($host_data) {\n $i = 0;\n\n $host_names = array();\n foreach ($host_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n }\n array_multisort($host_names, SORT_ASC, $host_data);\n\n foreach ($host_data as $sid => $schedule) {\n if (empty($schedule['childoptions'])) {\n $schedule['childoptions'] = 0;\n }\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? _(\"Yes\") : _(\"No\"); ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"months_of_year\"]) {\n echo $schedule[\"months_of_year\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo _(\"All\");\n } ?></td>\n <td><?php if ($schedule[\"childoptions\"] == 0) {\n echo _(\"No\");\n } elseif ($schedule[\"childoptions\"] == 1) {\n echo _(\"Yes, triggered\");\n } elseif ($schedule[\"childoptions\"] == 2) {\n echo _(\"Yes, non-triggered\");\n } ?></td>\n <td class=\"center\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23host-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>&nbsp;\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"10\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if host_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end host tab?>\n\n<?php } // end if host or showall\n\nif (!empty($_GET[\"service\"]) || $showall) {\n\n $host = grab_request_var('host', '');\n $service = grab_request_var('service', '');\n\n if ($showall) {\n echo \"<div id='service-tab'>\";\n }\n ?>\n\n <h4><?php echo $service_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($host) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&host_name=<?php echo $host; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this host\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=service&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Host\"); ?></th>\n <th><?php echo _(\"Service\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n if ($service_data) {\n $i = 0;\n\n $host_names = array();\n $service_names = array();\n foreach ($service_data as $k => $data) {\n $host_names[$k] = $data['host_name'];\n $service_names[$k] = $data['service_description'];\n }\n\n array_multisort($host_names, SORT_ASC, $service_names, SORT_ASC, $service_data);\n\n foreach ($service_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"host_name\"]; ?></td>\n <td><?php echo $schedule[\"service_description\"]; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php'. \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23service-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php }?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"9\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no host/service recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if service_data ?>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end service tab?>\n\n<?php } // end if service or showall\n\nif (!empty($_GET[\"hostgroup\"]) || $showall) {\n\n $hostgroup = grab_request_var('hostgroup', '');\n\n if ($showall) {\n echo \"<div id='hostgroup-tab'>\";\n }\n ?>\n\n <h4><?php echo $hostgroup_tbl_header; ?></h4>\n\n <?php\n if (!is_readonly_user(0)) {\n if ($hostgroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&hostgroup_name=<?php echo $hostgroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this hostgroup\"); ?></a>\n </div>\n <?php\n } else {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=hostgroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?></a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Hostgroup\"); ?></th>\n <th><?php echo _(\"Services\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n\n <?php\n\n if ($hostgroup_data) {\n $i = 0;\n\n $hostgroup_names = array();\n foreach ($hostgroup_data as $k => $data) {\n $hostgroup_names[$k] = $data['hostgroup_name'];\n }\n\n array_multisort($hostgroup_names, SORT_ASC, $hostgroup_data);\n\n foreach ($hostgroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"hostgroup_name\"]; ?></td>\n <td><?php echo (isset($schedule[\"svcalso\"]) && $schedule[\"svcalso\"] == 1) ? \"Yes\" : \"No\"; ?></td>\n <td><?php echo encode_form_val($schedule[\"comment\"]); ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"<?php echo 'recurringdowntime.php' . \"?mode=edit&sid=\" . $sid . \"&return=\" . urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23hostgroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n <?php } else { ?>\n <tr>\n <td colspan=\"8\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no hostgroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if hostrgroup_data ?>\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end hostgroup tab?>\n\n<?php } // end if hostgroup or showall\n\nif (!empty($_GET[\"servicegroup\"]) || $showall) {\n\n $servicegroup = grab_request_var('servicegroup', '');\n\n if ($showall) {\n echo \"<div id='servicegroup-tab'>\";\n }\n ?>\n <h4><?php echo $servicegroup_tbl_header; ?></h4>\n <?php\n if (!is_readonly_user(0)) {\n if ($servicegroup) {\n ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&servicegroup_name=<?php echo $servicegroup; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add schedule for this servicegroup\"); ?></a>\n </div>\n <?php } else { ?>\n <div style=\"clear: left; margin: 0 0 10px 0;\">\n <a href=\"recurringdowntime.php?mode=add&type=servicegroup&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-plus l\"></i> <?php echo _(\"Add Schedule\"); ?>\n </a>\n </div>\n <?php\n }\n } // end is_readonly_user\n ?>\n <table class=\"tablesorter table table-condensed table-striped table-bordered\" style=\"width:100%\">\n <thead>\n <tr>\n <th><?php echo _(\"Servicegroup\"); ?></th>\n <th><?php echo _(\"Comment\"); ?></th>\n <th><?php echo _(\"Start Time\"); ?></th>\n <th><?php echo _(\"Duration\"); ?></th>\n <th><?php echo _(\"Weekdays\"); ?></th>\n <th><?php echo _(\"Days in Month\"); ?></th>\n <th><?php echo _(\"Actions\"); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n if ($servicegroup_data) {\n $i = 0;\n\n $servicegroup_names = array();\n foreach ($servicegroup_data as $k => $data) {\n $servicegroup_names[$k] = $data['servicegroup_name'];\n }\n\n array_multisort($servicegroup_names, SORT_ASC, $servicegroup_data);\n\n foreach ($servicegroup_data as $sid => $schedule) {\n ?>\n <tr>\n <td><?php echo $schedule[\"servicegroup_name\"]; ?></td>\n <td><?php echo $schedule[\"comment\"]; ?></td>\n <td><?php echo $schedule[\"time\"]; ?></td>\n <td><?php echo $schedule[\"duration\"]; ?></td>\n <td><?php if ($schedule[\"days_of_week\"]) {\n echo $schedule[\"days_of_week\"];\n } else {\n echo \"All\";\n } ?></td>\n <td><?php if ($schedule[\"days_of_month\"]) {\n echo $schedule[\"days_of_month\"];\n } else {\n echo \"All\";\n } ?></td>\n <td style=\"text-align:center;width:60px\">\n <?php if (!is_readonly_user(0)) { ?>\n <a href=\"recurringdowntime.php?mode=edit&sid=<?php echo $sid; ?>&return=<?php echo urlencode($_SERVER[\"REQUEST_URI\"]); ?>%23servicegroup-tab&nsp=<?php echo get_nagios_session_protector_id(); ?>\" title=\"Edit Schedule\"><img src=\"<?php echo theme_image('pencil.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Edit schedule'); ?>\" alt=\"<?php echo _('Edit'); ?>\"></a>\n <a onClick=\"javascript:return do_delete_sid('<?php echo $sid; ?>');\" href=\"javascript:void(0);\" title=\"<?php echo _('Delete Schedule'); ?>\"><img src=\"<?php echo theme_image('cross.png'); ?>\" class=\"tt-bind\" title=\"<?php echo _('Delete schedule'); ?>\" alt=\"<?php echo _('Delete'); ?>\"></a>\n <?php } ?>\n </td>\n </tr>\n <?php } // end foreach ?>\n\n <?php } else { ?>\n <tr>\n <td colspan=\"7\">\n <div style=\"padding:4px\">\n <em><?php echo _(\"There are currently no servicegroup recurring downtime events defined.\"); ?></em>\n </div>\n </td>\n </tr>\n <?php } // end if servicegroup_data ?>\n\n\n </tbody>\n </table>\n\n <?php if ($showall) echo \"</div>\"; // end servicegroup tab?>\n\n <?php } // end if servicegroup or showall ?>\n\n <?php\n if ($showall) { // end of tabs container\n ?>\n </div>\n <?php\n }\n do_page_end(true);\n}", "function has_schedules( $group_id = null ) {\r\n global $bp;\r\n $schedule_ids = null;\r\n $schedules = array();\r\n \r\n if( empty( $group_id ) )\r\n $group_id = $bp->groups->current_group->id;\r\n \r\n $term_id = get_term_by( 'slug', $group_id, 'group_id' );\r\n if( !empty( $term_id ) )\r\n $schedule_ids = get_objects_in_term( $term_id->term_id, 'group_id' );\r\n \r\n if( !empty( $schedule_ids ) )\r\n arsort( $schedule_ids ); // Get latest entries first\r\n else\r\n return null;\r\n \r\n foreach ( $schedule_ids as $sid )\r\n $schedules[] = self::is_schedule( $sid );\r\n \r\n return array_filter( $schedules );\r\n }", "public function findDowntimes(int $hostId, int $serviceId): array;", "public function findDowntimesByServiceForNonAdminUser(int $hostId, int $serviceId): array;", "public function getTaskGroup() {}", "public function findDowntimesByServiceForAdminUser(int $hostId, int $serviceId): array;", "function get_schedule($usrid){\r\n\t\r\n}", "public function findServicesDowntimesForAdminUser(): array;", "public function findServicesDowntimesForNonAdminUser(): array;", "protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['emailchef']['fields']['emailchef_cron_frequency']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_frequency']['value'] :\n EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['emailchef']['fields']['emailchef_cron_offset']['value']) ?\n $data['emailchef']['fields']['emailchef_cron_offset']['value'] :\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = EMailChef_EMailChefSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log('eMailChef: Could not find cron frequency in valid list. Defaulted to hourly', Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "public function getDailySchedule()\n {\n return $this->daily_schedule;\n }", "private function retrieveSchedule($team_id, $start_date, $end_date)\n {\n if (isset($team_id, $start_date, $end_date)) {\n try {\n $start_date = new Carbon($start_date);\n $end_date = new Carbon($end_date);\n $schedule = \\Roster::where('date_start', '=', $start_date->toDateString())->where('team_id', '=', $team_id)->first();\n if (!isset($schedule)) {\n $schedule = new \\Roster;\n $schedule->team_id = $team_id;\n $schedule->date_start = $start_date->toDateString();\n $schedule->date_ending = $end_date->toDateString();\n $schedule->roster_stage = 'pending';\n $schedule->save();\n }\n $schedule = \\Roster::where('date_start', '=', $start_date->toDateString())->where('team_id', '=', $team_id)\n ->with('rosteredshift.task')->with(array('team.user' => function ($query) use ($start_date, $end_date) {\n $query->where('user.active', '=', true)\n ->with(array('availspecific' => function ($query) use ($start_date, $end_date) {\n $query->where(function ($query) use ($start_date, $end_date) {\n $query->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '<=', $start_date->toDateString())\n ->where('end_date', '>=', $start_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '>=', $start_date->toDateString())\n ->where('start_date', '<=', $end_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '<=', $start_date->toDateString())\n ->where('end_date', '>=', $end_date->toDateString());\n })->orWhere(function ($query) use ($start_date, $end_date) {\n $query->where('start_date', '>=', $start_date->toDateString())\n ->where('end_date', '<=', $end_date->toDateString());\n });\n })\n ->where('user_avail_spec.authorized', '=', 'approved');\n }))\n ->with('availgeneral');\n }))->first();\n } catch (\\Exception $e) {\n return Helper::jsonLoader(EXCEPTION, array(\"message\" => $e->getMessage(), \"line\" => $e->getLine(), \"file\" => $e->getFile()));\n }\n foreach ($schedule->rosteredshift as $key => $shift) {\n if ($shift->rostered_start_time !== '0000-00-00 00:00:00') {\n $temp = Carbon::parse($shift->rostered_start_time)->timezone(Helper::organisationTimezone())->toDateTimeString();\n $schedule->rosteredshift[$key]->rostered_start_time = $temp;\n }\n if ($shift->rostered_end_time !== '0000-00-00 00:00:00') {\n $temp = Carbon::parse($shift->rostered_end_time)->timezone(Helper::organisationTimezone())->toDateTimeString();\n $schedule->rosteredshift[$key]->rostered_end_time = $temp;\n }\n }\n $schedule = $schedule->toArray();\n $schedule['timezone'] = Carbon::now(Helper::organisationTimezone())->offset / 60;\n return $schedule;\n } else {\n return Helper::jsonLoader(INCORRECT_DATA);\n }\n }", "function recurringdowntime_get_host_cfg($host = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] == \"hostgroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"servicegroup\") {\n continue;\n }\n if ($schedule[\"schedule_type\"] == \"service\") {\n continue;\n }\n }\n if ($host && !(strtolower($schedule[\"host_name\"]) == strtolower($host))) {\n continue;\n }\n if (array_key_exists('host_name', $schedule)) {\n if (is_authorized_for_host(0, $schedule[\"host_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}", "public static function get24HourDivisionIntervals($groupScheduledIntervals)\n {\n foreach ($groupScheduledIntervals as &$scheduledIntervals) {\n foreach ($scheduledIntervals as &$schedulerInterval) {\n $schedulerInterval['start'] = $schedulerInterval['start']->format('H:i');\n $end = clone $schedulerInterval['end'];\n $schedulerInterval['end'] = $end->add(new DateInterval(\"PT1H\"))->format('H:i');\n }\n }\n\n return $groupScheduledIntervals;\n }", "public function getManualDateStop() {}", "public static function get24ScheduledIntervals($groupedPeriods, $groupFieldName)\n {\n\n $groupScheduledIntervals = array();\n $scheduledIndex = 0;\n foreach ($groupedPeriods as $periods) {\n\n $startPeriod = TimezoneHelper::getDateFromString(reset($periods)->$groupFieldName);\n $endPeriod = clone TimezoneHelper::getDateFromString(end($periods)->$groupFieldName);\n $endPeriod->add(new DateInterval('PT1H'));\n\n $dateRange = new DatePeriod($startPeriod, new DateInterval('PT1H'), $endPeriod);\n $dateRange = iterator_to_array($dateRange);\n $dateRangeCount = count($dateRange);\n\n //init first start day\n for ($dateRangeIndex = 0; $dateRangeIndex < $dateRangeCount; $dateRangeIndex++) {\n $date = $dateRange[$dateRangeIndex];\n// print $dateRangeCount.' = '.$dateRangeIndex.' = '.$scheduledIndex.' == '.$date->format('Y-m-d H:i:s').\"\\n\";\n $formatDate = $date->format('Y-m-d');\n\n //if first element\n if ($dateRangeIndex == 0) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['start'] = $date;\n if ($dateRangeCount == 1) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = clone $date;\n $scheduledIndex++;\n }\n } else if ($dateRangeIndex == $dateRangeCount - 1) {\n //if last element\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = $date;\n $scheduledIndex++;\n }\n\n if (isset($dateRange[$dateRangeIndex + 1]) && $dateRange[$dateRangeIndex + 1]->format('Y-m-d') != $date->format('Y-m-d')) {\n $groupScheduledIntervals[$formatDate][$scheduledIndex]['end'] = $dateRange[$dateRangeIndex];\n $scheduledIndex = 0;\n $startDate = $dateRange[$dateRangeIndex + 1]->format('Y-m-d');\n $groupScheduledIntervals[$startDate][$scheduledIndex]['start'] = $dateRange[$dateRangeIndex + 1];\n }\n }\n }\n\n return $groupScheduledIntervals;\n }", "public static function service_schedule_interval($version_id , $service_schedule_id , $lang){\n\t\t$api_param = $version_id.\"/\".$service_schedule_id.\"/\".$lang; \n\t\t$url = \"services_interval/\".$api_param;\n\t\t$database_response = Kromeda::get_response_api($url);\n\t\t if($database_response == FALSE){\n\t\t\t $sess_key = sHelper::generate_kromeda_session_key();\n\t\t\t $third_party_response = sHelper::Get_kromeda_Request($sess_key , 'SMR_GetIntervals' , false , $api_param);\n\t\t\t $add_response = Kromeda::add_response($url , $third_party_response , \"SMR_GetIntervals\");\n\t\t\t if($add_response){\n\t\t\t\t $database_response = Kromeda::get_response_api($url);\n\t\t\t\t}\n\t\t\t }\n\t\t return self::smr_response($database_response);\t \n\t}", "public function getStationsWithSchedules();", "public function getServices() {\n $services = Service::active()->get()->toArray();\n $outputArray = array();\n if ($services) {\n foreach ($services as $key => $value) {\n $begin = new DateTime($value['start_date']);\n $end = new DateTime($value['end_date']);\n if ($value['service_type'] == 'daily') {\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#605ca8\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n if ($value['service_type'] == 'weekly') {\n\n $schedule = Schedule::where('service_id', $value['id'])->get()->toArray();\n\n $weekNumber = array();\n for ($i = 0; $i < count($schedule); $i++) {\n $weekNumber[] = $schedule[$i]['week_number'];\n }\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n if (in_array($dt->format(\"w\"), $weekNumber)) {\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#f012be\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n\n if ($value['service_type'] == 'monthly') {\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#00a65a\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n\n if ($value['service_type'] == 'yearly') {\n $interval = DateInterval::createFromDateString('1 year');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"orange\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n }\n// echo \"<pre>\";\n// print_r($outputArray);\n// echo \"</pre>\";\n echo json_encode($outputArray);\n }", "public function findDowntimesForAdminUser(): array;", "public static function getSchedulePattern(): string;", "function getSportsDays($params = array()){\r\n $seasonID = trim($this->seasonInfo['id']);\r\n if(!$seasonID) {\r\n $this->errorMessage[] = 'SeasonID is not specified';\r\n return array();\r\n }\r\n $leagueID = trim($this->seasonInfo['league_id']);\r\n if(!$leagueID) {\r\n $this->errorMessage[] = 'leagueID is not specified';\r\n return array();\r\n }\r\n if(!is_array($params)) $params = array();\r\n // $this->dbInstance()->queryParams['fields'] = '*';\r\n $this->dbInstance()->queryParams['table'] = 'league_season_sportsday';\r\n\r\n\r\n if(isset($params['scheduledAfter']) && intval($params['scheduledAfter'])){\r\n $scheduledAfter = \"&& (SELECT COUNT(`id`) FROM `league_season_sportsday_game` WHERE `sportsday_id` = `league_season_sportsday`.`id` && `datetime` > \".intval($params['scheduledAfter']).\")\";\r\n }\r\n if(isset($params['scheduledBefore']) && intval($params['scheduledBefore'])){\r\n $scheduledBefore = \"&& (SELECT COUNT(`id`) FROM `league_season_sportsday_game` WHERE `sportsday_id` = `league_season_sportsday`.`id` && `datetime` < \".intval($params['scheduledBefore']).\")\";\r\n }\r\n $this->dbInstance()->queryParams['where'] = \"\r\n `league_id` = :leagueID && \r\n `season_id` = :seasonID \" . \r\n $scheduledAfter . \r\n $scheduledBefore;\r\n\r\n $this->dbInstance()->queryParams['params'] = array(\r\n 'leagueID' => $leagueID,\r\n 'seasonID' => $seasonID\r\n );\r\n \r\n $this->dbInstance()->queryParams['order'] = $this->dbInstance()->calcORDERcondition($params, 'sort', 'DESC');\r\n \r\n // $offset = ($page - 1) * $limit;\r\n $this->dbInstance()->queryParams['limit'] = $this->dbInstance()->calcLIMITcondition($params);\r\n $result = $this->dbInstance()->select();\r\n\r\n if(isset($params['extend'])){\r\n if(!is_array($params['extend'])) $params['extend'] = array($params['extend']);\r\n if(in_array('games', $params['extend'])){\r\n foreach ($result as $key => $value) {\r\n $result[$key]['games'] = $this->getSportsDayGames(\r\n $result[$key]['id'], \r\n array(\r\n 'scheduledAfter'=>$params['scheduledAfter'],\r\n 'scheduledBefore'=>$params['scheduledBefore']\r\n )\r\n );\r\n }\r\n }\r\n }\r\n\r\n return $result;\r\n }", "function nth_weekly_schedule($action,$id,$start,$end,$day,$non_workdays,$nth_value=1)\n {\n $params = array($start,$end,$day);\n $results = array();\n $this->_where = $this->_where.' AND `cal_day_of_week` = ?';\n switch ($non_workdays){\n case 1:\n $sched_date = 'next_work_day';\n break;\n case 2:\n $sched_date = 'prev_work_day';\n break;\n case 0:\n $sched_date = 'cal_date';\n $this->_where = $this->_where.' AND `cal_is_weekday` = ?';\n array_push($params,1);\n break;\n }\n $sql = 'SELECT `cal_date` AS `report_date`, '.$sched_date.' AS `sched_date`,`cal_is_work_day` FROM `calendar__bank_holiday_offsets` ';\n $sql = $sql.$this->_where;\n \n $query = $this->_db->query($sql,$params);\n //echo $nth_value;\n \n if($query->count()){\n $results = $query->results();\n $results = ($nth_value > 1 || $non_workdays == 0 ? $this->nth_date($results,$nth_value):$results);\n if($action == 'preview') {\n return $results;\n } else if ($action == 'commit') {\n $this->commit_schedule($results,$id);\n }\n }\n }", "public function findDowntimesForNonAdminUser(): array;", "function eo_schedule_end($format='d-m-Y',$id=''){\n\techo eo_get_schedule_end($format,$id);\n}", "function get_scheduled_days() {\n\t\treturn Clean::ids( $this->get_option( 'scheduled_day' ) );\n\t}", "public static function get($group);", "public function getBackupSchedule()\n {\n return $this->backup_schedule;\n }", "public static function getSchedDay($date, $user) {\n\n // Slot defaults\n $schedDay = new SchedDay($date);\n /*\n $sql = SchedDao::SQL_SELECT_SCHED .\n \" WHERE user_id=\" . $user->id . \" AND date=\" . quote($date) .\n \" ORDER BY time_start, client_id\";\n $res = query($sql); \n $scheds = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $sched = SchedDao::buildSched($row);\n $sched->client = SchedDao::getClient($sched->clientId);\n $scheds[] = $sched;\n }\n */\n logit_r('here getschedday');\n $scheds = Scheduling::getAppts($date, $user->id);\n $schedUser = new SchedUser($user->id, $user->uid, $user->name);\n $schedUser->scheds = $scheds;\n $schedDay->users[] = $schedUser;\n return $schedDay;\n }", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "public function get_payout_schedule() {\n $crons = _get_cron_array();\n\n $schedule = array();\n\n foreach ( $crons as $timestamp => $cron ) {\n if ( isset( $cron[ 'edd_commissions_payout' ] ) ) {\n $schedule[] = $timestamp;\n }\n }\n\n sort( $schedule, SORT_NUMERIC );\n\n return $schedule;\n }", "public function findHostDowntimesForAdminUser(): array;", "public function getDowntimes($id, $dayLimit) {\n if($dayLimit != null) {\n $di = \\DateInterval::createFromDateString($dayLimit . 'days');\n $dayLimit = new \\DateTime();\n $dayLimit->sub($di);\n }\n\n $dql = \"SELECT d FROM Downtime d\n WHERE d.id IN (\n SELECT d2.id FROM Site s\n JOIN s.services ses\n JOIN ses.downtimes d2\n WHERE s.id = :siteId\n )\n AND (\n :dayLimit IS NULL\n OR d.startDate > :dayLimit\n )\n ORDER BY d.startDate DESC\";\n\n $downtimes = $this->em\n ->createQuery($dql)\n ->setParameter('siteId', $id)\n ->setParameter('dayLimit', $dayLimit)\n ->getResult();\n\n return $downtimes;\n }", "function timeconditions_timegroups_buildtime( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish) {\n\t//\n\tif ($minute_start == '-') {\n\t\t$time_minute_start = \"00\";\n\t} else {\n\t\t$time_minute_start = sprintf(\"%02d\",$minute_start);\n\t}\n\tif ($minute_finish == '-') {\n\t\t$time_minute_finish = \"00\";\n\t} else {\n\t\t$time_minute_finish = sprintf(\"%02d\",$minute_finish);\n\t}\n\tif ($hour_start == '-') {\n\t\t$time_hour_start = '*';\n\t} else {\n\t\t$time_hour_start = sprintf(\"%02d\",$hour_start) . ':' . $time_minute_start;\n\t}\n\tif ($hour_finish == '-') {\n\t\t$time_hour_finish = '*';\n\t} else {\n\t\t$time_hour_finish = sprintf(\"%02d\",$hour_finish) . ':' . $time_minute_finish;\n\t}\n\tif ($time_hour_start === '*') {\n\t\t$time_hour_start = $time_hour_finish;\n\t}\n\tif ($time_hour_finish === '*') {$time_hour_finish = $time_hour_start;}\n\tif ($time_hour_start == $time_hour_finish) {\n\t\t$time_hour = $time_hour_start;\n\t} else {\n\t\t$time_hour = $time_hour_start . '-' . $time_hour_finish;\n\t}\n\n\t//----- Time Week Day Interval proccess -----\n\t//\n\tif ($wday_start == '-') {\n\t\t$time_wday_start = '*';\n\t} else {\n\t\t$time_wday_start = $wday_start;\n\t}\n\tif ($wday_finish == '-') {\n\t\t$time_wday_finish = '*';\n\t} else {\n\t\t$time_wday_finish = $wday_finish;\n\t}\n\tif ($time_wday_start === '*') {\n\t\t$time_wday_start = $time_wday_finish;\n\t}\n\tif ($time_wday_finish === '*') {\n\t\t$time_wday_finish = $time_wday_start;\n\t}\n\tif ($time_wday_start == $time_wday_finish) {\n\t\t$time_wday = $time_wday_start;\n\t} else {\n\t\t$time_wday = $time_wday_start . '-' . $time_wday_finish;\n\t}\n\n\t//----- Time Month Day Interval proccess -----\n\t//\n\tif ($mday_start == '-') {\n\t\t$time_mday_start = '*';\n\t} else {\n\t\t$time_mday_start = $mday_start;\n\t}\n\tif ($mday_finish == '-') {\n\t\t$time_mday_finish = '*';\n\t} else {\n\t\t$time_mday_finish = $mday_finish;\n\t}\n\tif ($time_mday_start === '*') {\n\t\t$time_mday_start = $time_mday_finish;\n\t}\n\tif ($time_mday_finish === '*') {\n\t\t$time_mday_finish = $time_mday_start;\n\t}\n\tif ($time_mday_start == $time_mday_finish) {\n\t\t$time_mday = $time_mday_start;\n\t} else {\n\t\t$time_mday = $time_mday_start . '-' . $time_mday_finish;\n\t}\n\n\t//----- Time Month Interval proccess -----\n\t//\n\tif ($month_start == '-') {\n\t\t$time_month_start = '*';\n\t} else {\n\t\t$time_month_start = $month_start;\n\t}\n\tif ($month_finish == '-') {\n\t\t$time_month_finish = '*';\n\t} else {\n\t\t$time_month_finish = $month_finish;\n\t}\n\tif ($time_month_start === '*') {\n\t\t$time_month_start = $time_month_finish;\n\t}\n\tif ($time_month_finish === '*') {\n\t\t$time_month_finish = $time_month_start;\n\t}\n\tif ($time_month_start == $time_month_finish) {\n\t\t$time_month = $time_month_start;\n\t} else {\n\t\t$time_month = $time_month_start . '-' . $time_month_finish;\n\t}\n\t$time = $time_hour . '|' . $time_wday . '|' . $time_mday . '|' . $time_month;\n\treturn $time;\n}", "public function findHostDowntimesForNonAdminUser(): array;", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function testSetGet_schedule_where_time_of_day_has_past() {\n\t\t//The blog time is 10 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '+10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), date( 'H', $blog_time ) . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Next week in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', strtotime( '+7 days', $blog_time ) ) . ' ' . date( 'H', $blog_time ) . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Next week in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+7 days', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "function recurringdowntime_array_to_cfg($arr)\n{\n if (count($arr) == 0) {\n return \"\";\n }\n $cfg_str = \"\";\n foreach ($arr as $sid => $schedule) {\n if (count($schedule) == 0) {\n continue;\n }\n $cfg_str .= \"define schedule {\\n\";\n $cfg_str .= \"\\tsid\\t\\t\\t$sid\\n\";\n foreach ($schedule as $var => $val) {\n\n // get a sane tab count for proper viewing/troubleshooting\n $tabs = \"\\t\\t\";\n if ($var == 'servicegroup_name' || $var == 'service_description')\n $tabs = \"\\t\";\n if ($var == 'user' || $var == 'comment' || $var == 'time' || $var == 'svcalso')\n $tabs .= \"\\t\";\n\n $cfg_str .= \"\\t$var{$tabs}$val\\n\";\n }\n $cfg_str .= \"}\\n\\n\";\n }\n return $cfg_str;\n}", "public function get_schedule( $schedule_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'schedules/' . abs( intval( $schedule_id ) ),\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "public function getMonthlySchedule()\n {\n return $this->monthly_schedule;\n }", "public static function getScheduleService($servicId, $timestamp) {\n $bookedArr = array();\n $availabilityArr = array();\n $date = date('Y-m-d',$timestamp);\n \n //get already booked spot\n $booking = Booking::select('bd.start_time','bd.end_time')\n ->join('bookings_details as bd','bookings.id','=','bd.booking_id')\n ->where('service_id',$servicId)\n ->where(DB::raw(\"date(start_time)\"),'=',$date)->get()->toArray();\n \n if($booking){\n foreach ($booking as $key => $value) {\n $bookedArr[] = date(\"H:i\", strtotime($value['start_time']));\n }\n }\n //end code\n \n $service = Service::find($servicId);\n $closeTime = $service->close_booking_before_time != \"\" ? $service->close_booking_before_time : 30;\n $int = $service->duration;\n \n if ($service->service_type != 'weekly') {\n $n = 0;\n $start_time = explode(':', $service['start_time']);\n $startMinutes = ($start_time[0]*60) + ($start_time[1]) + ($start_time[2]/60);\n\n $end_time = explode(':', $service['end_time']);\n $endMinutes = ($end_time[0]*60) + ($end_time[1]) + ($end_time[2]/60);\n\n $st = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $startMinutes . \" minutes\"));\n $et = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $endMinutes . \" minutes\"));\n \n $a = $st;\n $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\")); //default value for B is start time.\n\n for ($a = $st; $b <= $et; $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\"))) {\n //echo \"a: \".$a.\" // \".\"b: \".$b.\"<br />\";\n\n //$availabilityArr[date(\"Y-m-d\", strtotime($a))][] = date(\"H:i\", strtotime($a));\n if(strtotime($a) > strtotime('+'.$closeTime.' minutes', time())){\n $availabilityArr[] = date(\"H:i\", strtotime($a));\n }\n $a = $b;\n $n++;\n }\n }\n \n if ($service->service_type == 'weekly') {\n $dayOfWeek = date(\"w\", strtotime($date));\n $schedule = Schedule::where('service_id', $servicId)->where('week_number',$dayOfWeek)->get()->toArray();\n $n = 0;\n for ($i = 0; $i < count($schedule); $i++) {\n $start_time = explode(':', $schedule[$i]['start_time']);\n $startMinutes = ($start_time[0]*60) + ($start_time[1]) + ($start_time[2]/60);\n \n $end_time = explode(':', $schedule[$i]['end_time']);\n $endMinutes = ($end_time[0]*60) + ($end_time[1]) + ($end_time[2]/60);\n \n $st = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $startMinutes . \" minutes\"));\n $et = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $endMinutes . \" minutes\"));\n \n $a = $st;\n $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\")); //default value for B is start time.\n\n for ($a = $st; $b <= $et; $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\"))) {\n //echo \"a: \".$a.\" // \".\"b: \".$b.\"<br />\";\n \n //$availabilityArr[date(\"Y-m-d\", strtotime($a))][] = date(\"H:i\", strtotime($a));\n if(strtotime($a) > strtotime('+'.$closeTime.' minutes', time())){\n $availabilityArr[] = date(\"H:i\", strtotime($a));\n }\n $a = $b;\n $n++;\n }\n }\n }\n return array(\"availability\" => $availabilityArr, \"booked\" => $bookedArr, \"duration\" => $int,\"total_spots\" => $n);\n }", "public function calculate_payout_schedule( $mode, $interval, $repeats_on = array(), $hour = '00', $min = '00', $start = null ) {\n try {\n if ( ! in_array( $mode, array( 'daily', 'weekly', 'monthly', 'yearly' ) ) ) {\n throw new Exception( __( 'Scheduled payout mode is invalid.', 'edd-commissions-payouts' ) );\n }\n\n if ( ! is_array( $repeats_on ) || array_diff( $repeats_on, array( 'su', 'mo', 'tu', 'we', 'th', 'fr', 'sa' ) ) ) {\n throw new Exception( __( 'Days scheduled payouts can occur on is invalid.', 'edd-commissions-payouts' ) );\n }\n\n if ( ! ctype_digit( (string) $interval ) || $interval < 1 ) {\n throw new Exception( __( 'Scheduled payout interval must be a number greater than 0.', 'edd-commissions-payouts' ) );\n }\n\n if ( ! ctype_digit( (string) $hour ) || ! ctype_digit( (string) $min ) || strlen( $hour ) > 2 || strlen( $min ) > 2 || $hour > 23 || $min > 59 ) {\n throw new Exception( __( 'Scheduled payout time must be in a valid 24 hour format.', 'edd-commissions-payouts' ) );\n }\n\n if ( empty( get_option( 'timezone_string' ) ) ) {\n throw new Exception( __( 'Please set your websites timezone under Settings > General to schedule payouts.', 'edd-commissions-payouts' ) );\n }\n\n if ( ! $start instanceof DateTime ) {\n $start = new DateTime( null, new DateTimeZone( get_option( 'timezone_string' ) ) );\n }\n\n /**\n * If the set payout time is past the current time, set earliest start date to tomorrow\n */\n if ( $start->format( 'G' ) > $hour || ( $start->format( 'G' ) == $hour && $start->format( 'i' ) >= $min ) ) {\n $start->modify( '+1 day' );\n }\n\n $start->setTime( $hour, $min );\n\n $repeats_on_rrule = ! empty( $repeats_on ) ? \";BYDAY=\" . strtoupper( implode( ',', $repeats_on ) ) : '';\n\n $when = new \\When\\When;\n $when->RFC5545_COMPLIANT = \\When\\When::IGNORE;\n\n $rrule = apply_filters( 'edd_commissions_payout_payout_schedule_rrule', sprintf( 'FREQ=%s;INTERVAL=%s%s', strtoupper( $mode ), absint( $interval ), $repeats_on_rrule ), $mode, $interval, $repeats_on, $hour, $min );\n\n return $when->startDate( $start )->rrule( $rrule );\n\n }catch( Exception $e ) {\n throw new Exception( $e->getMessage() );\n }\n }", "public function getScheduling()\n {\n return $this->scheduling;\n }", "public function scheduledDeposit($id)\n {\n return $this->get(\"ach/deposit_schedules/{$id}\");\n }", "function eo_schedule_start($format='d-m-Y',$id=''){\n\techo eo_get_schedule_start($format,$id);\n}", "function getScheduledTasks ( $notification )\n\t{\n\t\t$maxHourOffset = 0;\n\t\t$sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess();\n\t\t$baseDate = Piwik_Date::factory(\"1971-01-01\");\n\t\tforeach($sites as &$site)\n\t\t{\n\t\t\t$offsetDate = Piwik_Date::factory($baseDate, $site['timezone']);\n\n\t\t\t// Earlier means a negative timezone\n\t\t\tif ( $offsetDate->isEarlier($baseDate) )\n\t\t\t{\n\t\t\t\t// Gets the timezone offset\n\t\t\t\t$hourOffset = (24 - date ('H', $offsetDate->getTimestamp()));\n\n\t\t\t\tif ( $hourOffset > $maxHourOffset )\n\t\t\t\t{\n\t\t\t\t\t$maxHourOffset = $hourOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$tasks = &$notification->getNotificationObject();\n\n\t\t$dailySchedule = new Piwik_ScheduledTime_Daily();\n\t\t$dailySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'dailySchedule', $dailySchedule );\n\n\t\t$weeklySchedule = new Piwik_ScheduledTime_Weekly();\n\t\t$weeklySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'weeklySchedule', $weeklySchedule );\n\n\t\t$monthlySchedule = new Piwik_ScheduledTime_Monthly();\n\t\t$monthlySchedule->setHour($maxHourOffset);\n\t\t$tasks[] = new Piwik_ScheduledTask ( $this, 'monthlySchedule', $monthlySchedule );\n\t}", "function nhymxu_weekly_cron_job_recurrence( $schedules ) {\n\t$schedules['weekly'] = array(\n\t\t'display' => 'weekly',\n\t\t'interval' => 604800,\n\t);\n\treturn $schedules;\n}", "function Get_Next_Action_Day($application_id, Array $schedule = null)\n{\n\tif (isset($schedule) && count($schedule))\n\t{\n\t\tforeach ($schedule as $event)\n\t\t{\n\t\t\tif ($event->status == 'scheduled')\n\t\t\t{\n\t\t\t\treturn $event->date_event;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$query = \"\n\t\t\tSELECT MIN(date_event) action_date\n\t\t\tFROM event_schedule\n\t\t\tWHERE application_id = {$application_id} AND event_status = 'scheduled'\n\t\t\";\n\n\t\t$db = ECash::getMasterDb();\n\t\t$result = $db->query($query);\n\n\t\tif ($row = $result->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\treturn $row['action_date'];\n\t\t}\n\t}\n\n\treturn false;\n}", "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function(){\n $orders = order::where('approved', 'pending')->get();\n foreach ($orders as $order) {\n $order->approved = 'cancelled';\n $order->save();\n }\n })->daily();\n\n $schedule->call(function(){\n $orders = Order::whereNotNull('until')->get();\n foreach ($orders as $order) {\n $service = Service::where('cost', $order->amount)->first();\n $username = $order->username;\n if (Carbon::parse(now())->diffInDays($order->until, false) <= 0) {\n \tif (is_null($order->until)) {\n\t\t\t\t\t\t$until = \"NULL\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$until = $order->until;\n\t\t\t\t\t\t$order->until = null;\n\t\t\t\t\t\t$order->save();\n\t\t\t\t\t\tLog::debug('Neteko Paslaugos: ' . $username . '---'. $service->name);\n\t\t\t\t\t}\n\n\t\t\t\t\t$host = env('Server_IP');\n\t $port = env('Server_PORT');\n\t $password = env('Server_PASS');\n\t $timeout = 3;\n\t $rcon = new Rcon($host, $port, $password, $timeout);\n\n\t if ($rcon->connect()){\n\n \t$rcon->sendCommand('pex user '.$username. 'group set lavonas'); \n \t$rcon->sendCommand('broadcast '.$username. ' Neteko paslaugos, nes jos galiojimas pasibaigė');\n \t\n \t}\n\t\t\t\t}\n\t\t\t}})->daily();\n\n $schedule->call(function(){\n $orders = Order::where('approved', 'done')->whereNull('until')->where('service_name', '!=', 'atleiskit')->delete();\n $orders2 = Order::where('approved', 'cancelled')->delete();\n })->weeklyOn(1, '7:00');;\n\n }", "function dayScheduleA()\n\t{\n\t$scheduleDay = array(45, 60, 90, 120, 150, 180, 210, 240);\n\treturn $scheduleDay;\n\t}", "function GetAllSchedules() {\n\tglobal $server;\n\tglobal $user;\n\t$url = \"http://\".$server.\"/api/\".$user.\"/schedules\";\n\t$array = LaunchCurl($url);\n\treturn $array;\n}", "public function getNextTriggerTimeForWeekly($scheduledDaysOfWeek, $scheduledTime) {\n\t\t$weekDays = array('0' => 'Sunday', '1' => 'Monday', '2' => 'Tuesday', '3' => 'Wednesday', '4' => 'Thursday', '5' => 'Friday', '6' => 'Saturday', '7' => 'Sunday');\n\t\t$currentTime = time();\n\t\t$currentWeekDay = date('N', $currentTime);\n\t\t$nextTime = null;\n\t\tif ($scheduledDaysOfWeek) {\n\t\t\t$scheduledDaysOfWeek = json_decode($scheduledDaysOfWeek, true);\n\t\t\tif (is_array($scheduledDaysOfWeek)) {\n\t\t\t\t// algorithm :\n\t\t\t\t//1. First sort all the weekdays(stored as 0,1,2,3 etc in db) and find the closest weekday which is greater than currentWeekDay\n\t\t\t\t//2. If found, set the next trigger date to the next weekday value in the same week.\n\t\t\t\t//3. If not found, set the trigger date to the next first value.\n\t\t\t\t$nextTriggerWeekDay = null;\n\t\t\t\tsort($scheduledDaysOfWeek);\n\t\t\t\tforeach ($scheduledDaysOfWeek as $index => $weekDay) {\n\t\t\t\t\tif ($weekDays[$weekDay-1] == $weekDays[$currentWeekDay]) { //if today is the weekday selected\n\t\t\t\t\t\t$scheduleWeekDayInTime = strtotime(date('Y-m-d', strtotime($weekDays[$currentWeekDay])) . ' ' . $scheduledTime);\n\t\t\t\t\t\tif ($currentTime < $scheduleWeekDayInTime) { //if the scheduled time is greater than current time, select today\n\t\t\t\t\t\t\t$nextTriggerWeekDay = $currentWeekDay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//current time greater than scheduled time, get the next weekday\n\t\t\t\t\t\t\tif (count($scheduledDaysOfWeek) == 1) { //if only one weekday selected, then get next week\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$weekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[$index + 1];\n\t\t\t\t\t\t\t\tif (empty($nextWeekDay)) { // its the last day of the week i.e. sunday\n\t\t\t\t\t\t\t\t\t$nextWeekDay = $scheduledDaysOfWeek[0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$nextTime = date('Y-m-d', strtotime('next ' . $weekDays[$nextWeekDay-1])) . ' ' . $scheduledTime;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($weekDay-1 > $currentWeekDay) {\n\t\t\t\t\t\t$nextTriggerWeekDay = $weekDay-1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($nextTime == null) {\n\t\t\t\t\tif (!empty($nextTriggerWeekDay)) {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$nextTriggerWeekDay] . ' ' . $scheduledTime));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$nextTime = date('Y-m-d H:i:s', strtotime($weekDays[$scheduledDaysOfWeek[0]-1] . ' ' . $scheduledTime));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $nextTime;\n\t}", "public function insert_services_slots($postdata) {\n $weekdays_timings = array();\n foreach ($postdata['weekdays']['start_time'] as $key => $value) {\n $weekdays_timings[$key]['start_time'] = $value;\n }\n foreach ($postdata['weekdays']['end_time'] as $key => $value) {\n $weekdays_timings[$key]['end_time'] = $value;\n }\n $i = 60;\n $current_date = date('Y-m-d');\n for ($z = 0; $z <= $i; $z++) {\n foreach ($postdata['weekdays']['day'] as $key => $value) {\n foreach ($weekdays_timings as $keys => $values) {\n $date = date('Y-m-d', strtotime($current_date . ' + ' . $z . ' days'));\n $check_date = date('D', strtotime($date));\n if ($check_date == $value) {\n $service_slots = array(\n 'service_id' => $postdata['services'],\n 'date' => $date,\n 'start_time' => $values['start_time'],\n 'end_time' => $values['end_time'],\n 'number_of_slots' => $postdata['no_slots'],\n 'active' => 'enable'\n );\n $this->db->insert('services_slots', $service_slots);\n }\n }\n }\n }\n $weekend_timings = array();\n foreach ($postdata['weekends']['start_time'] as $key => $value) {\n $weekend_timings[$key]['start_time'] = $value;\n }\n foreach ($postdata['weekends']['end_time'] as $key => $value) {\n $weekend_timings[$key]['end_time'] = $value;\n }\n\n $j = 60;\n for ($z = 0; $z <= $j; $z++) {\n foreach ($postdata['weekends']['day'] as $key => $value) {\n foreach ($weekend_timings as $keys => $values) {\n $date = date('Y-m-d', strtotime($current_date . ' + ' . $z . ' days'));\n $check_date = date('D', strtotime($date));\n if ($check_date == $value) {\n\n $service_slots = array(\n 'service_id' => $postdata['services'],\n 'date' => $date,\n 'start_time' => $values['start_time'],\n 'end_time' => $values['end_time'],\n 'number_of_slots' => $postdata['no_slots'],\n 'active' => 'enable'\n );\n $this->db->insert('services_slots', $service_slots);\n }\n }\n }\n }\n\n return true;\n }", "function jetpack_sync_full_sync_interval( $schedule_name ) {\n\treturn 'twicedaily';\n}", "public function getWeeklyChartList($group)\n {\n return $this->getClient()->call('group.getweeklychartlist', array(\n 'group' => $group,\n ));\n }", "function block_ranking_get_points_evolution_by_group($groupid) {\n global $DB;\n\n $sql = \"SELECT\n rl.id, rl.points, rl.timecreated\n FROM {ranking_logs} rl\n INNER JOIN {ranking_points} rp ON rp.id = rl.rankingid\n INNER JOIN {groups_members} gm ON gm.userid = rp.userid\n INNER JOIN {groups} g ON g.id = gm.groupid\n WHERE g.id = :groupid AND rl.timecreated > :lastweek\";\n\n $lastweek = time() - (7 * 24 * 60 * 60);\n\n $params['groupid'] = $groupid;\n $params['lastweek'] = $lastweek;\n\n return array_values($DB->get_records_sql($sql, $params));\n}", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysdate() as now\n from schedule\n ORDER BY gameDate\";\n\n try {\n return $this->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"\"}}';\n }\n }", "public function getScheduleTime(){return $this->time_of_day;}", "public function findOneDowntimeForNonAdminUser(int $downtimeId): ?Downtime;", "public function schedules()\n {\n $inVacation = config('schedules')['vacation'];\n $weekdays = config('schedules')['tabData']['days'];\n\n if ($inVacation) {\n $schedules = [\n 'sun' => null,\n 'mon' => null,\n 'tue' => null,\n 'wed' => null,\n 'thu' => null,\n 'fri' => null,\n 'sat' => null\n ];\n\n $scheduleMessage = config('schedules')['vacationMessage'] . '<br>...';\n } else {\n $schedules = $this->schedules->getByDay();\n $scheduleMessage = 'Sem horários<br>...';\n }\n\n return [\n 'weekDays' => $weekdays,\n 'currentDay' => \\strtolower(\\date('D')),\n 'schedules' => $schedules,\n 'scheduleEmptyMessage' => $scheduleMessage\n ];\n }", "public function createSchedule($data) {\n\t\t\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'EziDebitCustomerID' => $data['eziDebitCID'],\n\t\t\t\t'YourSystemReference' => $data['systemRef'],\n\t\t\t\t'ScheduleStartDate' => $data['scheduleStartDate'],\n\t\t\t\t'SchedulePeriodType' => $data['schedulePeriodType'],\n\t\t\t\t'DayOfWeek' => $data['dayOfWeek'],\n\t\t\t\t'DayOfMonth' => $data['dayOfMonth'],\n\t\t\t\t'FirstWeekOfMonth' => $data['firstWeekOfMonth'],\n\t\t\t\t'SecondWeekOfMonth' => $data['secondWeekOfMonth'],\n\t\t\t\t'ThirdWeekOfMonth' => $data['thirdWeekOfMonth'],\n\t\t\t\t'FourthWeekOfMonth' => $data['fourthWeekOfMonth'],\n\t\t\t\t'PaymentAmountInCents' => $data['paymentAmountInCents'],\n\t\t\t\t'LimitToNumberOfPayments' => $data['limitToNumberOfPayments'],\n\t\t\t\t'LimitToTotalAmountInCents' => $data['limitToTotalAmountInCents'],\n\t\t\t\t'KeepManualPayments' => $data['keepManualPayments'],\n\t\t\t\t'Username' => $data['username']\n\t\t];\n\n\t\treturn $soapclient->createSchedule($params);\n\t}", "function getCalendarsForAdmin() {\n //\n // http://dev4.krubner.com/admin.php?page=admin_calendar\n //\n // this brings back 2 months worth of days to show in a calendar\n\n global $controller; \n\n $today = new DateTime(date('Y-m-d'));\n\n //Get Calendar for this week\n if(!isset($_GET['ym'])){\n $top_month = date('Y-m');\n } else {\n $top_month = $_GET['ym'];\n }\n\n $firstDayOfMonthDateTime = new DateTime($top_month.\"-01\");\n $lastDayOfMonthDateTime = clone $firstDayOfMonthDateTime;\n $lastDayOfMonthDateTime->modify(\"+1 month\");\n $lastDayOfMonthDateTime->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime, $lastDayOfMonthDateTime); \n\n $calendars = array();\n $calendars[$top_month] = $arrayOfDaysForThisMonth;\n\n $firstDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime;\n $firstDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime2;\n $lastDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime2, $lastDayOfMonthDateTime2); \n\n $calendars[$lastDayOfMonthDateTime2->format('Y-m')] = $arrayOfDaysForThisMonth;\n\n return $calendars; \n}", "function timeconditions_timegroups_get_group($timegroup) {\n\tglobal $db;\n\n\t$sql = \"select id, description from timegroups_groups where id = $timegroup\";\n\t$results = $db->getAll($sql);\n\tif(DB::IsError($results)) {\n \t\t$results = null;\n\t}\n\t$tmparray = array($results[0][0], $results[0][1]);\n\treturn $tmparray;\n}", "private function getBreakPointConfig($breakpoint_group) {\n $data = [];\n $breakpoint_group_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/breakpoint_groups');\n foreach ($breakpoint_group_config_files as $file) {\n $breakpoint_group_config = parent::getConfig($file);\n if ($breakpoint_group_config['machine_name'] == $breakpoint_group) {\n // return $breakpoint_group_config;\n foreach ($breakpoint_group_config['breakpoints'] as $map) {\n $data[$map['machine_name']] = $map;\n }\n break;\n }\n }\n return $data;\n }", "function getEventByWorkingGroup($idWG)\n{\n require_once 'model/dbConnector.php';\n $connexion = openDBConnexion();\n $request = $connexion->prepare('SELECT Events_idEvents FROM bdd_satisfevent.workinggroups_has_events WHERE Workinggroups_idWorkinggroups = ?');\n $request->execute(array($idWG));\n $result = $request->fetchAll();\n return $result[0];\n}", "public function testGetScheduleByScheduleDayOfWeek() {\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::getScheduleByScheduleDayOfWeek($this->getPDO(), $schedule->getScheduleCompanyId());\n\n\t\t//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 setSchedule(Schedule $schedule): UpdateScheduleService;", "public function get_test_scheduled_events()\n {\n }", "function get_weekday_stats(){\n if(!DashboardCommon::is_su()) return null;\n \n $sat = strtotime(\"last saturday\");\n $sat = date('w', $sat) == date('w') ? $sat + 7 * 86400 : $sat;\n $fri = strtotime(date(\"Y-m-d\", $sat) . \" +6 days\");\n $from = date(\"Y-m-d\", $sat);//for current week only\n $to = date(\"Y-m-d\", $fri);//for current week only\n $sql = \"SELECT DAYNAME(atr.call_start) as dayname,count(*) as total \n FROM week_days wd \n LEFT JOIN ( SELECT * FROM calls WHERE call_start >= '\" . $this->from . \"' AND call_start <= '\" . $this->to . \"') atr\n ON wd.week_day_num = DAYOFWEEK(atr.call_start)\n GROUP BY\n DAYOFWEEK(atr.call_start)\";\n\n $this_week_rec = DashboardCommon::db()->Execute($sql);\n $saturday = $sunday = $monday = $tuesday = $wednesday = 0;\n $thursday = $friday = 0;\n// $data = array();\n// while (!$this_week_rec->EOF) {\n// $k = $this_week_rec->fields['dayname'];\n// $data[$k]= $this_week_rec->fields['total'];\n// $this_week_rec->MoveNext();\n// }\n// \n// return array_keys($data, max($data));\n\n while (!$this_week_rec->EOF) {\n $daynames = $this_week_rec->fields['dayname'];\n $totalcalls = $this_week_rec->fields['total'];\n if ($daynames == 'Saturday') {\n $saturday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Sunday') {\n $sunday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Monday') {\n $monday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Tuesday') {\n $tuesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Wednesday') {\n $wednesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Thursday') {\n $thursday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Friday') {\n $friday = $this_week_rec->fields['total'];\n }\n\n $this_week_rec->MoveNext();\n }\n\n $arr = array('Saturday' => $saturday,\n 'Sunday' => $sunday,\n 'Monday' => $monday,\n 'Tuesday' => $tuesday,\n 'Wednesday' => $wednesday,\n 'Thursday' => $thursday,\n 'Friday' => $friday\n );\n $max_day = array_keys($arr, max($arr));\n \n $avg_calltime_sql = \"SELECT sum(duration) as total_call_time, count(*) as total_records, \n sum(duration) / count(*) as avg_time\n FROM \n (\n SELECT call_end-call_start as duration\n FROM calls\n WHERE call_start >= '\".$this->from.\"' AND call_start <= '\".$this->to.\"'\n ) as dt\";\n $avg_calltime_res = DashboardCommon::db()->Execute($avg_calltime_sql);\n \n \n return array('weekday'=>$max_day[0],'avg_call_time'=>$avg_calltime_res->fields['avg_time']);\n \n }", "public function findDowntimesByHostForAdminUser(int $hostId, bool $withServices): array;", "public function getAdSchedule()\n {\n return $this->readOneof(10);\n }", "function backup_migrate_drush_schedules() {\n backup_migrate_include('schedules');\n $rows = array(array(dt('ID'), dt('Name')));\n foreach (backup_migrate_get_schedules() as $schedule) {\n $rows[] = array(\n $schedule->get_id(),\n $schedule->get_name(),\n );\n }\n drush_print_table($rows, TRUE, array(32, 32));\n}", "static function process_scheduler(){\n\t\treturn self::process_offline_leads();\n\t}", "public function findOneDowntimeForAdminUser(int $downtimeId): ?Downtime;", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "public function findDowntimesByHostForNonAdminUser(int $hostId, bool $withServices): array;", "public function scheduledDeposits($cursor = \"\")\n {\n return $this->get('ach/deposit_schedules', ['cursor' => $cursor]);\n }", "protected function schedule(Schedule $schedule)\n {\n \n //$schedule->command('add:winners')->everyMinute();\n \n //$schedule->command('add:winners')->cron('00 18 31 10 * *');\n \n /*$schedule->command('test:test')\n ->everyMinute()\n ->sendOutputTo(base_path() . '/public/output_files/test.txt');\n */\n \n //$schedule->command('add:winners')->cron('52 13 02 11 * *');\n \n $periods = Period::all();\n \n foreach($periods as $period) {\n \n $enddate_month = explode('-', $period->enddate)[1];\n $enddate_day = explode(' ', explode('-', $period->enddate)[2])[0];\n //echo(\"maand: \" . $enddate_month . \" en dag \" . $enddate_day . \"<br>\");\n $schedule->command('add:winners')->cron('40 22 ' . $enddate_day . ' ' . $enddate_month . ' * *');\n }\n \n \n }", "public function testSetGet_schedule_where_time_of_day_has_not_past() {\n\t\t//The blog time is 2 hours from now\n\t\t$blog_time = strtotime( date( 'Y-m-d H:00:00', strtotime( '-10 hours' ) ) );\n\t\t$this->setBlogTime( date( 'Y-m-d H:i:s ', $blog_time ) );\n\n\t\t$day = date( 'H', $blog_time ) + 1;\n\t\tif ( $day < 10 ) {\n\t\t\t$day = \"0$day\";\n\t\t}\n\n\t\t$this->config->set_schedule( date( 'D', $blog_time ), $day . ':00', 'daily' );\n\t\t$schedule = $this->config->get_schedule();\n\n\t\t//Today in the blog time time is expected\n\t\t$expected_date_time = date( 'Y-m-d', $blog_time ) . ' ' . $day . ':00:00';\n\t\t$this->assertEquals( $expected_date_time, date( 'Y-m-d H:i:s', $schedule[0] ) );\n\t\t$this->assertEquals( 'daily', $schedule[1] );\n\n\t\t//Today in the server time is expected\n\t\t$schedule = wp_next_scheduled( 'execute_periodic_drobox_backup' );\n\t\t$this->assertEquals( strtotime( '+1 hour', strtotime( date( 'Y-m-d H:00:00' ) ) ), $schedule );\n\t}", "public function get_schedules( $experiment_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'experiments/' . abs( intval( $experiment_id ) ) . '/schedules',\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "function get($scheduleEventId)\n\t{\n\t\t$kparams = array();\n\t\t$this->client->addParam($kparams, \"scheduleEventId\", $scheduleEventId);\n\t\t$this->client->queueServiceActionCall(\"schedule_scheduleevent\", \"get\", \"KalturaScheduleEvent\", $kparams);\n\t\tif ($this->client->isMultiRequest())\n\t\t\treturn $this->client->getMultiRequestResult();\n\t\t$resultXml = $this->client->doQueue();\n\t\t$resultXmlObject = new \\SimpleXMLElement($resultXml);\n\t\t$this->client->checkIfError($resultXmlObject->result);\n\t\t$resultObject = \\Kaltura\\Client\\ParseUtils::unmarshalObject($resultXmlObject->result, \"KalturaScheduleEvent\");\n\t\t$this->client->validateObjectType($resultObject, \"\\\\Kaltura\\\\Client\\\\Plugin\\\\Schedule\\\\Type\\\\ScheduleEvent\");\n\t\treturn $resultObject;\n\t}", "function retrieve_day_guest_lists($weekday){\n\t\t\n\t\t\n\t\t//Do any given operation for a specific weekday...\n\t\tswitch($weekday){\n\t\t\tcase 'mondays':\n\t\t\t\tbreak;\n\t\t\tcase 'tuesdays':\n\t\t\t\tbreak;\n\t\t\tcase 'wednesdays':\n\t\t\t\tbreak;\n\t\t\tcase 'thursdays':\n\t\t\t\tbreak;\n\t\t\tcase 'fridays':\n\t\t\t\tbreak;\n\t\t\tcase 'saturdays':\n\t\t\t\tbreak;\n\t\t\tcase 'sundays':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshow_404('Invalid url');\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->CI->load->model('model_guest_lists', 'guest_lists', true);\n\t\treturn $this->CI->guest_lists->retrieve_day_guest_lists($this->promoter->up_id, $weekday, $this->promoter->t_fan_page_id);\n\t\t\n\t}", "public function getScheduledPayments($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'DateFrom' => $data['dateFrom'],\n\t\t\t\t'DateTo' => $data['dateTo'],\n\t\t\t\t'EziDebitCustomerID' => $data['eziDebitCID'],\n\t\t\t\t'YourSystemReference' => $data['systemRef']\n\t\t];\n\n\t\treturn $response = $soapclient->getScheduledPayments($params);\n\t}", "function get($id) {\r\n\t\t$newsletterscheduleObj = NewsletterSchedulePeer::retrieveByPK($id);\r\n return $newsletterscheduleObj;\r\n }", "function my_add_weekly( $schedules ) {\n // add a 'weekly' schedule to the existing set\n $schedules['3_hours'] = array(\n 'interval' => 10800,\n 'display' => __('Every 3 Hours - (Flipkart API call)')\n );\n return $schedules;\n }", "function eo_get_schedule_end($format='d-m-Y',$id=''){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id);\n\n\t$date = esc_html($event->reoccurrence_end.' '.$event->StartTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}", "public function getLatestSchedule(BusStop $busStop, $currentDayOfWeek, Carbon $currentDateTime = null): ?BusSchedule;", "public static function weekly() {return new ScheduleViewMode(2);}", "public function modify_action_scheduler_default_interval( $schedules ) {\n\n\t\t\tif ( $this->is_process_running() ) {\n\n\t\t\t\t$schedules['every_minute'] = array(\n\t\t\t\t\t'interval' => 5,\n\t\t\t\t\t'display' => __( 'Every 5 Seconds' ),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $schedules;\n\n\t\t}", "private function generateSchedule($participant_id) {\n $schedule = array();\n $usable_surveys = array(1, 3, 4);\n $survey_info = array();\n foreach ($usable_surveys as $survey_id) {\n $temp = $this->getListFromDB('survey', array('survey_id' => $survey_id));\n if(! empty($temp)){\n\t$survey_info[] = $temp[0];\n }\n }\n $counter = count($usable_surveys);\n $surveyType = \"Primary\";\n for ($order = 1; $order <= $counter; $order++){\n $time_multiplier = 6 * ($order-1);\n $dateScheduled = date( 'Y-m-d H:i:s', strtotime(\"+$time_multiplier month\"));\n $schedule_details = array(\n\t\t\t\t'participant_id' => (int)$participant_id,\n\t\t\t\t'survey_id' => $usable_surveys[$order -1],\n\t\t\t\t'order_index' => $order,\n\t\t\t\t'surveyType' => $surveyType,\n\t\t\t\t'dateScheduled' => $dateScheduled,\n\t\t\t\t'dateActual' => $dateScheduled\n\t\t\t\t);\n $this->addThing('schedule', $schedule_details);\n $schedule[strval($order)] = array(\n\t\t\t\t \"participantId\" => $participant_id,\n\t\t\t\t \"surveyKeyword\" => $survey_info[$order-1]->surveyKeyword,\n\t\t\t\t \"survey\" => $survey_info[$order-1]->survey,\n\t\t\t\t \"surveyType\" => $surveyType,\n\t\t\t\t \"dateScheduled\" => $dateScheduled,\n\t\t\t\t \"dateActual\" => $dateScheduled\n\t\t\t\t );\n }\n return $schedule;\n }", "function update_interval_schedule($int) {\n\t//check schedule exists, remove it, add new one\t\n\twp_clear_scheduled_hook('standards_resource_check');\t\n\tif ($int > 0)\n\t\twp_schedule_single_event( time() + 3600 * $int, 'standards_resource_check' );\n}", "private function addWeekly($ItemData, $DataStartDate, $DataStopDate, $start_day) {\r\n\t\r\n\t\t$stop_day = (($DataStartDate->compareTime($DataStopDate) > 0) ? (($start_day + 1) % 7) : $start_day );\t\r\n\t\t\r\n\t\t$DateLooper = new SC_DateTime(1, $this->Month->getMonthOfYear(), $this->Month->getYear());\r\n\t\r\n\t\t// loop until stop day of week is reached\t\t\r\n\t\twhile ($DateLooper->getDayOfWeek() != $stop_day) $DateLooper->addDay(1);\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t// check if cross day\t\r\n\t\tif($start_day != $stop_day) {\r\n\t\t\r\n\t\t\t$LastDayOfMonth = new SC_DateTime($this->Month->getDaysInMonth(), $this->Month->getMonthOfYear(), $this->Month->getYear());\r\n\t\t\t\r\n\t\t\t// move date looper to the start day\r\n\t\t\t$DateLooper->removeDay(1);\r\n\t\t\r\n\t\t\twhile ($DateLooper->compareDate($DataStopDate) < 0 && $DateLooper->compareDate($LastDayOfMonth) <= 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$DatePointer = new SC_DateTime($DateLooper->getDay(), $DateLooper->getMonth(), $DateLooper->getYear());\r\n\t\t\t\t\r\n\t\t\t\t// save the stop day\r\n\t\t\t\t$DatePointer->addDay(1);\r\n\t\t\t\t\r\n\t\t\t\tif($DatePointer->compareDate($DataStartDate) > 0) {\r\n\t\t\t\t\r\n\t\t\t\t\t$Item = Utilities::createItem($ItemData, $DateLooper, $this->timezone, 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($DatePointer->getMonth() == $this->Month->getMonthOfYear())\t$this->Schedules[$DatePointer->getDay() - 1]->addItem($Item);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($DateLooper->getMonth() == $this->Month->getMonthOfYear())\t$this->Schedules[$DateLooper->getDay() - 1]->addItem($Item);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$DateLooper->addWeek(1);\r\n\t\t\t\t\r\n\t\t\t}\t// end while\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\twhile ($DateLooper->compareDate($DataStopDate) <= 0 && ($DateLooper->getMonth() == $this->Month->getMonthOfYear())) {\r\n\t\t\t\t\r\n\t\t\t\t$Item = Utilities::createItem($ItemData, $DateLooper, $this->timezone);\r\n\t\t\t\t\r\n\t\t\t\tif($DateLooper->compareDate($DataStartDate) >= 0) {\r\n\t\t\t\t\t// Check if time has been specified\t\r\n\t\t\t\t\tif($ItemData->getTimeSpec()) {\r\n\t\t\t\t\t\t$this->Schedules[$DateLooper->getDay() - 1]->addItem($Item);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->Schedules[$DateLooper->getDay() - 1]->addNoTimeItem($Item);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t$DateLooper->addWeek(1);\r\n\t\t\t\t\r\n\t\t\t}\t// end while\r\n\t\t\r\n\t\t}// end if \r\n\t\t\r\n\t}", "public function getTriggerDefs($group) {\n\t\ttry {\n\t\t\tif (!empty($_REQUEST['access_token'])) {\n\t\t\t\t$group = $this->dm->getRepository('MongoDocs\\Group')->findOneByMachineName($group);\n\t\t\t\t\n\t\t\t\tif ($group == null) {\n\t\t\t\t\t$this->respondError('Invalid group machine name.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qb = $this->dm->createQueryBuilder('MongoDocs\\TriggerDef')\n\t\t\t\t\t->field('group')->references($group)\n\t\t\t\t\t->sort('name');\n\t\t\t\t$triggerDefs = $qb->getQuery()->execute();\n\n\t\t\t\t$this->respond($triggerDefs->toArray());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->respondError('Missing access token.', 401);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$this->respondError($e->getMessage() . \" in \" . $e->getFile() . \" on line \" . $e->getLine() . \"\\n\" . $e->getTraceAsString());\n\t\t}\n\t}", "public function attendance_calendar($action = 'calendar_list', $attendance_id = 0, $calendar_id = 0)\n {\n $attendance = new Attendance();\n $calendar_id = intval($calendar_id);\n $data = array();\n $data['attendance_id'] = $attendance_id;\n $attendance_id = intval($attendance_id);\n $groupList = isset($_POST['groups']) ? array($_POST['groups']) : array();\n\n if ($action == 'calendar_add') {\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n if (isset($_POST['repeat'])) {\n //@todo check this error_logs\n $start_datetime = api_strtotime(\n api_get_utc_datetime($_POST['date_time']), 'UTC'\n );\n\n $end_datetime = api_strtotime(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'), 'UTC');\n $checkdate = api_is_valid_date(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'));\n\n $repeat_type = $_POST['repeat_type'];\n if (($end_datetime > $start_datetime) && $checkdate) {\n $attendance->attendance_repeat_calendar_add(\n $attendance_id,\n $start_datetime,\n $end_datetime,\n $repeat_type,\n $groupList\n );\n $action = 'calendar_list';\n } else {\n if (!$checkdate) {\n $data['error_checkdate'] = true;\n } else {\n $data['error_repeat_date'] = true;\n }\n $data['repeat'] = true;\n $action = 'calendar_add';\n }\n } else {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n if (!empty($datetime)) {\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_add($attendance_id, $groupList);\n $action = 'calendar_list';\n } else {\n $data['error_date'] = true;\n $action = 'calendar_add';\n }\n }\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action === 'calendar_edit') {\n $data['calendar_id'] = $calendar_id;\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_edit($calendar_id, $attendance_id);\n $data['calendar_id'] = 0;\n $action = 'calendar_list';\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action == 'calendar_delete') {\n $attendance->attendance_calendar_delete($calendar_id, $attendance_id);\n $action = 'calendar_list';\n } else if ($action == 'calendar_all_delete') {\n $attendance->attendance_calendar_delete(0, $attendance_id, true);\n $action = 'calendar_list';\n }\n\n $data['action'] = $action;\n $data['attendance_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n 'all',\n null,\n null,\n true\n );\n $data['is_locked_attendance'] = $attendance->is_locked_attendance($attendance_id);\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_calendar');\n $this->view->render();\n }", "function wpcron_intervals( $schedules ) {\n\n\t// one minute\n\n\t$one_minute = array(\n\t\t\t\t\t'interval' => 60,\n\t\t\t\t\t'display' => 'One Minute'\n\t\t\t\t);\n\n\t$schedules[ 'one_minute' ] = $one_minute;\n\n\t// five minutes\n\n\t$five_minutes = array(\n\t\t\t\t\t'interval' => 300,\n\t\t\t\t\t'display' => 'Five Minutes'\n\t\t\t\t);\n\n\t$schedules[ 'five_minutes' ] = $five_minutes;\n\n\t// return data\n\n\treturn $schedules;\n\n}", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n $schedule->call('App\\Http\\Controllers\\RequestKPController@rejectExpiredRequests')\n ->daily();\n $schedule->call('App\\Http\\Controllers\\RequestSkripsiController@rejectExpiredRequests')\n ->daily();\n\n // steven add new\n // kp\n // schedule to notify prodi admin for reschedule and update for prodi admin able to reschedule\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangKPController@notifyProdiAdminToRescheduleIfNeed')\n ->daily();\n // ->everyMinute();\n // set schedule end by the expired date\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangKPController@updateNoRevisionOnH2Request')\n ->daily();\n // ->everyMinute();\n // set the penjadwalan already past and it was old data\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangKPController@updatePenjadwalanIntoOldData')\n ->daily();\n // ->everyMinute();\n // set form to be available on participant list table to enter the form each row\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangKPController@scheduleBeritaAcaraForm')\n ->daily();\n // ->everyMinute();\n // set form cannot be open while expired date or if already submitted status completed dont need to show to the participant again\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangKPController@expiredDateForSubmitForm')\n ->daily();\n // ->everyMinute();\n\n // skripsi\n // schedule to notify prodi admin for reschedule and update for prodi admin able to reschedule\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangSkripsiController@notifyProdiAdminToRescheduleIfNeed')\n ->daily();\n // ->everyMinute();\n // set schedule end by the expired date\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangSkripsiController@updateNoRevisionOnH2Request')\n ->daily();\n // ->everyMinute();\n // set the penjadwalan already past and it was old data\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangSkripsiController@updatePenjadwalanIntoOldData')\n ->daily();\n // ->everyMinute();\n // set form to be available on participant list table to enter the form each row\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangSkripsiController@scheduleBeritaAcaraForm')\n ->daily();\n // ->everyMinute();\n // set form cannot be open while expired date or if already submitted status completed dont need to show to the participant again\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangSkripsiController@expiredDateForSubmitForm')\n ->daily();\n // ->everyMinute();\n\n // tesis\n // schedule to notify prodi admin for reschedule and update for prodi admin able to reschedule\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangTesisController@notifyProdiAdminToRescheduleIfNeed')\n ->daily();\n // ->everyMinute();\n // set schedule end by the expired date\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangTesisController@updateNoRevisionOnH2Request')\n ->daily();\n // ->everyMinute();\n // set the penjadwalan already past and it was old data\n $schedule->call('App\\Http\\Controllers\\ProdiPenjadwalanSidangTesisController@updatePenjadwalanIntoOldData')\n ->daily();\n // ->everyMinute();\n // set form to be available on participant list table to enter the form each row\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangTesisController@scheduleBeritaAcaraForm')\n ->daily();\n // ->everyMinute();\n // set form cannot be open while expired date or if already submitted status completed dont need to show to the participant again\n $schedule->call('App\\Http\\Controllers\\ProdiBeritaAcaraSidangTesisController@expiredDateForSubmitForm')\n ->daily();\n // ->everyMinute();\n\n // hard cover kp, skripsi, tesis api to store db every daily\n // on going status\n // validated status\n // first ongoing \n $schedule->call('App\\Http\\Controllers\\AdminHardcoverKPController@storeOngoingHardcoverKPByAPI')\n // ->daily();\n ->everyMinute();\n $schedule->call('App\\Http\\Controllers\\AdminHardcoverSkripsiController@storeOngoingHardcoverSkripsiByAPI')\n // ->daily();\n ->everyMinute();\n $schedule->call('App\\Http\\Controllers\\AdminHardcoverTesisController@storeOngoingHardcoverTesisByAPI')\n ->daily();\n // ->everyMinute();\n // second validated\n $schedule->call('App\\Http\\Controllers\\AdminHardcoverKPController@storeValidateHardcoverKPByAPI')\n ->daily();\n // ->everyMinute();\n $schedule->call('App\\Http\\Controllers\\AdminHardcoverSkripsiController@storeValidateHardcoverSkripsiByAPI')\n ->daily();\n // ->everyMinute();\n $schedule->call('App\\Http\\Controllers\\AdminHardcoverTesisController@storeValidateHardcoverTesisByAPI')\n ->daily();\n // ->everyMinute(); \n }" ]
[ "0.58345044", "0.5736114", "0.53156585", "0.5276781", "0.52673954", "0.51724213", "0.516231", "0.5149847", "0.51063615", "0.5032685", "0.50106406", "0.4944303", "0.4937936", "0.4937936", "0.49121478", "0.48890203", "0.4878822", "0.48649114", "0.4848549", "0.48189926", "0.47774595", "0.4765342", "0.47357452", "0.47152668", "0.46744213", "0.4672752", "0.46719733", "0.46698928", "0.46468604", "0.4635773", "0.46305668", "0.46293557", "0.46251088", "0.46156743", "0.46147355", "0.46016455", "0.45759124", "0.45658305", "0.45626575", "0.45626575", "0.4560206", "0.451562", "0.45103583", "0.45102796", "0.450602", "0.45019206", "0.44960746", "0.44956625", "0.44899052", "0.44852412", "0.4482899", "0.44795382", "0.4476853", "0.44708103", "0.44558477", "0.44541726", "0.44495973", "0.4447712", "0.44197512", "0.439497", "0.43943602", "0.43836123", "0.4381256", "0.43779832", "0.4367103", "0.43563452", "0.4352227", "0.43516606", "0.43379632", "0.43369204", "0.43357754", "0.4330556", "0.43277347", "0.43274942", "0.43187037", "0.43109095", "0.4309591", "0.43092316", "0.43087158", "0.43087035", "0.43050358", "0.43036845", "0.42903435", "0.42788354", "0.4269627", "0.42691204", "0.42682192", "0.42569163", "0.4253786", "0.42525408", "0.4245491", "0.42435244", "0.4237742", "0.4236716", "0.42339322", "0.42330736", "0.42235816", "0.42225993", "0.42217442", "0.42186928" ]
0.68916076
0
$date = date("Ymd H:m:s");
function setLog($proceso,$sucursal,$usuario){ $data = array( 'proceso_id' => $proceso, 'sucursal_id' => $sucursal, 'id_usuario' => $usuario ); $this->db->insert(self::sys_procesos_log,$data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "function getDatetime(){\n return date('Y-m-d H:i:s');\n}", "function make_date(){\n return strftime(\"%Y-%m-%d %H:%M:%S\", time());\n}", "function set_datetime($date)\n{\n return date(\"Y-m-d H:i:s\", strtotime($date));\n}", "function util_datetime()\n{\n\t\treturn date(\"Y-m-d H:i:s\");\n}", "public static function time($date){\n if (empty($date)) return;\n $php_date = strtotime($date);\n $formatted_date = date('h:i a', $php_date );\n return $formatted_date;\n\n }", "public static function getDate() {\r\n\t\treturn date('Y-m-d H:i:s');\r\n\t}", "function datetime_now() {\n return date(\"Y-m-d H:i:s\");\n}", "function getTimestamp(){\n return date('m/d/Y G:h');\n}", "function CIR_setDateAndTimeTemorarily()\n{\n\t$date = date('mdHiY.s');\n\techo(\"\\ndate $date\\n\");\n}", "function convDate($theDate) {\r\n return date(\"Y-m-d H:i:s\", strtotime($theDate));\r\n}", "function now(){\n\t$date = new DateTime();\n\t$datetime = $date->format('Y-m-d H:i:s');\n\treturn $datetime;\n}", "function makedate ($time) {\n return date (\"Y-m-d H:i:s\", $time);\n }", "function Now()\n{\n\t$now = date(\"Y-m-d H:i:s\");\n\treturn $now;\n}", "public static function datetime()\n {\n return date('Y-m-d H:i:s');\n }", "function timeStamp()\n {\n return date(\"YmdHis\");\n }", "public static function dateTimeSgbd()\n {\n return date('Y-m-d H:i:s');\n }", "function mysql_date($date){\n\t return date(\"Y-m-d H:i:s\", $date);\n\t}", "function datetime_now() {\n\treturn date('Y-m-d H:i:s');\n}", "function standard_date_time($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d M, Y H:i A', $timestamp);\n\treturn $fdate;\n\t}", "function tstotime($timestamp){\n return date(\"Y-m-d H:i:s\", $timestamp);\n}", "function mysql_date($time){\n\treturn date(\"Y-m-d H:i:s\",$time);\n}", "function make_date(){\n date_default_timezone_set(\"America/Mexico_City\");\n return strftime(\"%Y-%m-%d %H:%M:%S\", time());\n}", "function get_time(){\r\n\tdate_default_timezone_set('Asia/Ho_Chi_Minh');\r\n\treturn date(\"y/m/d H:i:s\");\r\n}", "function currentDate(){\n\t$date = date(\"Y-m-d H:i:s\");\n\treturn $date;\n}", "function time_now() {\n return date(\"H:i:s\");\n}", "function db_date() {\n\treturn date(\"Y-m-d H:i:s\");\n}", "public function getDateAndTime() {\n\t\t$dateAndTime = $this->date.$this->time;\n\t\treturn date(\"g:iA, l jS F Y\", strtotime($dateAndTime));\n\t}", "protected static function getTimestamp()\n\t{\n\t\treturn date(\"Y-m-d H:00:00\");\n\t}", "private static function timeStamp() {\n return date(\"Y-m-d H:i:s\");\n }", "function timeConversion($s) {\n return DATE(\"H:i:s\", STRTOTIME($s));\n\n}", "function now() {\r\n\t\tdate_default_timezone_set('GMT');\r\n\t\treturn date(\"d/m/Y H:i:s\");\r\n\t}", "function date_now() {\n return date(\"Y-m-d\");\n}", "public function current_date(){\n\t\t$date = date('Y-m-d H:i:s');\n\t\treturn $date;\n\t}", "public function current_date(){\n\t\t$date = date('Y-m-d H:i:s');\n\t\treturn $date;\n\t}", "function getDatetime() \r\n\t{\r\n\t\t$in_date = date(\"d/m/y\");\r\n\t\t$in_time = date(\"H:i:s\");\r\n\t\t\r\n\t\t$date_ = explode(\"/\",$in_date);\r\n\t\t\r\n\t\t$time_ = explode(\":\",$in_time);\r\n\t\t\r\n\t\treturn date(\"Y-m-d H:i:s\",mktime($time_[0],$time_[1],$time_[2],$date_[1],$date_[0],$date_[2]));\r\n\t}", "public function date(): string\n {\n [$sec, $msec] = explode('.', sprintf('%.3F', $_SERVER[\"REQUEST_TIME_FLOAT\"]));\n return date('Y-m-d H:i:s.', $sec) .$msec .' ';\n }", "public static function now(){\n\t\treturn date('Y-m-d H:i:s', time());\n\t}", "function convertdate($date) {\r\n\t$date = strtotime($date);\r\n\treturn date(\"M j, Y g:ia\", $date);\r\n}", "function getFecha(){\n\t\t\treturn date(\"Y-m-d H:i:s\");\n\t}", "protected function getDate() {\n\t\treturn date('Y-m-d h:i:s');\n\t}", "function standard_date_time2($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d M, Y h:i A', $timestamp);\n\treturn $fdate;\n\t}", "public function getTime($date=null){\n\t\treturn date_format($this->createDate($date),\"H:i:s\"); //H:i:s\n\t}", "public static final function now ()\n\t\t{\n\t\t\t\n\t\t\treturn date('Y-m-d H:i:s');\n\t\t\t\n\t\t}", "private function createTime($date)\n {\n $date = Carbon::parse($date)->format('H:i:s');\n return $date;\n }", "function convertdate($date) {\n\t$date = strtotime($date);\n\treturn date(\"M j, Y g:ia\", $date);\n}", "function my_dateFormat($date){\n return date(\"M d, Y h:i A\",strtotime($date));\n}", "function niceDate($time) {\n return date('M d, Y h:i a', strtotime($time)) . \" \";\n}", "protected function dt(){\n return date('Y-m-d\\TH:i:s');\n }", "public function time() {\n return date('j F Y, H:i', $this->time_changed); // 12 October 2010, 09:14\n // return date('j F Y, h:ia', $this->time_changed); // 12 October 2010, 09:14am\n }", "function getTimeString($DateTime){\n return $DateTime->format(\"Y-m-d H:i:s\"); \n}", "private function _getDateTime()\r\n\t\t{\r\n\t\t\t\treturn getDateTime('%Y-%m-%d %H:%M:%S');\r\n\t\t}", "function getDateTime(){\r\n return date('jS F Y\\, g:ia',$this->timestamp);\r\n }", "function getnow() {\n\t$dt = date('Y-m-d');\n\treturn $dt;\n}", "function now_date($time = false,$format = 'Y-m-d H:i:s') :string\n {\n $time = $time ?: time();\n return date($format, $time);\n }", "function todaysDate(){\n echo date('l, F j, Y');\n echo ' at ';\n echo date('h:i:s');\n}", "function mysqldate()\n{\n $mysqldate = date(\"m/d/y g:i A\", now());\n $phpdate = strtotime( $mysqldate );\n return date( 'Y-m-d H:i:s', $phpdate );\n}", "function getDateTime(){\ndate_default_timezone_set('America/Chicago');\n$dateTime = date('Y-m-d G:i:s', time());\n return $dateTime;\n}", "function getCurrentDateAndTime(){\n $newdate = date(\"l jS \\of F Y h:i:s A\");\n echo \"Today's date is \" . $newdate;\n //A.M.A\n}", "function dateForDatabase($date = null)\n{\n if ($date === null) {\n $date = time();\n }\n return date(\"Y-m-d H:i:s\", $date);\n}", "function my_date($date)\n {\n // Create DateTime object\n $t = new DateTime($date, new DateTimeZone('UTC'));\n\n // Get user's timezone\n /** @todo Complete getting user's timezone */\n $timezone = 'Asia/Tokyo';\n\n // Return date\n $t->setTimeZone(new DateTimeZone($timezone));\n return $t->format(__('Y-m-d H:i:s'));\n }", "function usatotime($datef) {\n return date('m/d/Y', strtotime($datef));\n}", "public static function getTimestamp($time){\n return date('Y-m-d H:i:s',$time);\n }", "function vads_trans_date() {\n $date = date('YmdHis');\n return $date;\n }", "function MyDateTimestamp($date)\r\n{\r\n\treturn gmmktime(\r\n\t\tsubstr($date, 11, 2), //h\r\n\t\tsubstr($date, 14, 2), //i\r\n\t\tsubstr($date, 17, 2), //s\r\n\t\tsubstr($date, 5, 2), //m\r\n\t\tsubstr($date, 8, 2), //d\r\n\t\tsubstr($date, 0, 4) //y\r\n\t);\r\n}", "private static function timestamp(){\n date_default_timezone_set('Africa/Nairobi');\n $time = time();\n return date(\"Y-m-d G:i:s\", $time);\n }", "public static function getDateTime()\n {\n date_default_timezone_set(\"Australia/Brisbane\"); \n return date('Y-m-d H:i:s');\n }", "public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}", "protected function _getDateTime()\n {\n return date('Y-m-d', time()) . 'T' . date('H:i:s', time());\n }", "function entrydate($str='now'){\n return $time=strtotime($str); \n }", "function date($date) {\n\t\tif (!is_int($date)) {\n\t\t\t$date = strtotime($date);\n\t\t}\n\t\t$format = 'd. M y @ H:i';\n\t\tif (date('Y', $date) == date('Y')) {\n\t\t\t$format = 'd. M @ H:i';\n\t\t}\n\t\treturn date($format, $date);\n\t}", "function to_mysqlDate($time)\r\n{\r\n // format 2012-05-21 18:54:49\r\n $mysqldate =strftime(\"%Y-%m-%d %H:%M:%S\",$time);\r\n \r\n return $mysqldate;\r\n \r\n}", "protected function _format_date($date)\n {\n $dateTime = new DateTime($date);\n return $dateTime->format(\"Y-m-d H:i:s\");\n }", "function date_today_db() {\n return date('Y-m-d H:i:s'); //in the format yyyy-mm-dd\n}", "function timeStamp(){\n\t\techo date(\"is\");\n\t}", "public static function now ()\n\t\t{\n\t\t\treturn date(self::$dtFormat);\n\t\t}", "function standard_date_time3($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d-m-Y H:i A', $timestamp);\n\treturn $fdate;\n\t}", "function created() {\n return date('Y-m-d H:i:s');\n }", "function date2Timestamp($date) {\r\n //2003-04-12 00:05:43\r\n if ($date == null) {\r\n return 0;\r\n }\r\n list($y, $mth, $d, $h, $min, $sec) = sscanf($date,\"%d-%d-%d %d:%d:%d\");\r\n return mktime ( $h, $min, $sec, $mth, $d, $y);\r\n}", "public function getDate()\n {\n if ($this->date)\n {\n return $this->date;\n }\n else\n {\n $this->date = time();\n }\n return $this->date;\n }", "static public function timestamp()\r\n {\r\n $output = date('Y-m-d H:i:s', time());\r\n return $output;\r\n }", "function get_str_time( $strdate )\r\n{\r\n $time = substr( $strdate, 11, 8);\r\n\r\n return $time;\r\n}", "public function GetCurrentTime(){\n\t\treturn date('y-m-d H:i:s', time());\n\t}", "public static function now() {\n\t\t\treturn date('Y-m-d');\n\t\t}", "function timeStamp() {\r\n\t\t$php_timestamp = time();\r\n\t\t$stamp = date(\" h:i:s A - m/d/Y\", $php_timestamp);\r\n\t\treturn $stamp;\r\n\t}", "function date_ajourdhui()\n{\n $date = localtime(time());\n\n $mois = $date[4]+1;\n $annee = $date[5] + 1900;\n\n $aujourdhui = mktime(0,0,0,$mois,$date[3],$annee,-1);\n \n return date('Y-m-d', $aujourdhui); \n}", "function format_time($mode='Y-m-d H:i:s')\r\n {\r\n\t\treturn date($mode,$_SERVER['REQUEST_TIME']);\r\n }", "public static function getCurrentDateAndTimeOnCurrentComputer() {\n\t\treturn date ( 'Y-m-d H:i:s');\n\t}", "public function get_date()\n {\n $start_date = $this->start_date;\n if (0 >= (int) $start_date) {\n return false;\n }\n\n return date('Y-m-d H:i', $start_date / 1000);\n }", "public function getDateTime() {\n date_default_timezone_set('Asia/Kolkata');\n $dateTime = date('Y:m:d-H:i:s');\n return $dateTime;\n }", "function _custom_date_time($date, $format = 'Y-m-d'){ \t\n return date_format(date_create($date),$format);\n}", "static function convertPHPDate($date){\n\t\treturn $date . ' 00:00:00'; //So difficult.\n\t}", "public function getCurrentTime()\n\t{\n\t\techo date(\"h-s-m\");\n\t\n\t}", "function getrsstime($d) \r\n{ \r\n $parts=explode(' ',$d); \r\n $month=$parts[2]; \r\n $monthreal=getmonth($month);\r\n $time=explode(':',$parts[4]); \r\n $date=\"$parts[3]-$monthreal-$parts[1] $time[0]:$time[1]:$time[2]\"; \r\n return $date;\r\n}", "function hoje() {\n $data_hoje = date(\"Y-m-d H:i:s\");\n return $data_hoje;\n }", "function maketime ($date) {\n return mktime (substr ($date, 11, 2), substr ($date, 14, 2),\n substr ($date, 17, 2), substr ($date, 5, 2),\n substr ($date, 8, 2), substr ($date, 0, 4));\n }", "public static function now()\n {\n return date(self::DATETIME_PHP_FORMAT);\n }", "function getTime()\n {\n return date('Y-m-d H:i:s', $this->model->getTime());\n }", "public function date();", "public function date();", "static public function now($format='Y-m-d H:i:s'){\n\t\treturn date($format);\n\t}" ]
[ "0.7524576", "0.75133795", "0.7349966", "0.7185182", "0.7143101", "0.71200067", "0.71122646", "0.708537", "0.7019367", "0.69959235", "0.69857705", "0.69281536", "0.68814355", "0.6862768", "0.685329", "0.6845252", "0.6810569", "0.68083584", "0.6808149", "0.67769957", "0.6772646", "0.67636734", "0.67580235", "0.6755792", "0.6701516", "0.6662973", "0.6662548", "0.66379386", "0.6598084", "0.6580608", "0.6580499", "0.6564027", "0.6563685", "0.6548073", "0.6548073", "0.65480685", "0.6546459", "0.65283763", "0.6527893", "0.6517482", "0.6511989", "0.6509533", "0.65006137", "0.63996387", "0.63971055", "0.63900197", "0.6350693", "0.633113", "0.6308199", "0.6293732", "0.625688", "0.6242177", "0.6238431", "0.6230663", "0.62236345", "0.62108713", "0.61999613", "0.6192353", "0.61910737", "0.6184352", "0.61672384", "0.615227", "0.6144587", "0.6139172", "0.61386645", "0.6122314", "0.61036414", "0.6097572", "0.60860616", "0.6080871", "0.60676116", "0.6045179", "0.60429806", "0.6041471", "0.60354245", "0.6034699", "0.6021188", "0.6015713", "0.6011045", "0.60107356", "0.60024476", "0.60015035", "0.6000838", "0.59891474", "0.59751755", "0.5972489", "0.5971448", "0.5958322", "0.5955683", "0.59535927", "0.59437567", "0.5942912", "0.5942488", "0.593943", "0.59390676", "0.5897682", "0.58913535", "0.58839744", "0.5881688", "0.5881688", "0.5875076" ]
0.0
-1
Make a grid builder.
protected function grid() { $grid = new Grid(new ProductSku); $grid->column('id', 'ID'); $grid->column('name', 'sku名称')->editable(); $grid->column('sku_number', 'sku编号')->editable(); // $grid->column('description', 'sku描述'); $grid->product("所属商品")->display(function ($product) { return $product['name']; }); $grid->column('price', '原价')->editable(); $grid->column('stock', '库存量')->editable(); $grid->column('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']); $grid->column('primary_picture', '商品主图'); $grid->column('retail_price', '零售价格')->editable(); $grid->column('is_promotion', '是否促销')->using([0 => '否', 1 => '是']); $grid->column('promotion_price', '促销价格')->editable(); return $grid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId) {\n if ($formId) {\n $form = Formulario::find($formId);\n return \"<span>{$form['name']}</span>\";\n }\n });\n\n $grid->model()->orderBy('id', 'asc');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Direction());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('intro', __(trans('hhx.intro')));\n $grid->column('Img', __(trans('hhx.img')))->image();\n $grid->column('status', __(trans('hhx.status')))->using(config('hhx.status'));\n $grid->column('order_num', __(trans('hhx.order_num')));\n $grid->column('all_num', __(trans('hhx.all_num')));\n $grid->column('this_year', __(trans('hhx.this_year')));\n $grid->column('stock', __(trans('hhx.stock')));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "public function getGridBuilder($name);", "protected function grid()\n {\n $grid = new Grid(new Good);\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('名称'));\n $grid->column('unit', __('单位'));\n //$grid->column('list_img', __('商品图片'))->image()->width(10);\n $grid->column('amount', __('价格'));\n $grid->column('created_at', __('创建时间'));\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableFilter();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('image', __('Image'));\n $grid->column('user_roles', __('User roles'));\n $grid->column('intro', __('Intro'));\n $grid->column('details', __('Details'));\n $grid->column('start_at', __('Start at'));\n $grid->column('end_at', __('End at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('location', __('Location'));\n $grid->column('fee', __('Fee'));\n $grid->column('involves', __('Involves'));\n $grid->column('involves_min', __('Involves min'));\n $grid->column('involves_max', __('Involves max'));\n $grid->column('status', __('Status'));\n $grid->column('organizers', __('Organizers'));\n $grid->column('views', __('Views'));\n $grid->column('collectors_num', __('Collectors num'));\n $grid->column('is_stick', __('Is stick'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new NewEnergy());\n\n $grid->column('user_id', __('用户'));\n $grid->column('car_id', __('车辆ID'));\n $grid->column('start_mileage', __('开始里程'));\n $grid->column('end_mileage', __('结束里程'));\n $grid->column('mileage', __('里程'));\n $grid->column('type', __('车辆类型'));\n $grid->column('status', __('状态'));\n $grid->column('remark', __('备注'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MachinesStyle());\n\n $grid->model()->latest();\n \n $grid->column('id', __('索引'))->sortable();\n\n $grid->column('style_name', __('型号名称'))->help('机具的型号名称');\n\n $grid->column('machines_fact.factory_name', __('所属厂商'))->help('机具型号所属的厂商');\n\n // $grid->column('machines_fact.machines_types.name', __('所属类型'))->help('机具型号所属的类型');\n\n $grid->column('created_at', __('创建时间'))->date('Y-m-d H:i:s')->help('机具型号的创建时间');\n\n $grid->column('updated_at', __('修改时间'))->date('Y-m-d H:i:s')->help('机具型号的最后修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Enseignant());\n\n $grid->column('id', __('Id'));\n $grid->column('matricule', __('Matricule'));\n $grid->column('nom', __('Nom'));\n $grid->column('postnom', __('Postnom'));\n $grid->column('prenom', __('Prenom'));\n $grid->column('sexe', __('Sexe'));\n $grid->column('grade', __('Grade'));\n $grid->column('fonction', __('Fonction'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new LotteryCode());\n $grid->model()->orderBy('prizes_time', 'desc');\n $grid->id('Id');\n $grid->code('抽奖码');\n $grid->batch_num('批次号');\n $grid->prizes_name('奖品');\n $grid->valid_period('有效期');\n $grid->prizes_time('抽奖时间');\n $grid->award_status('发奖状态')->editable('select', [0 => '未发放', 1 => '已发放']);\n $grid->disableCreateButton();\n $grid->disableActions();\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('code', '抽奖码');\n $filter->like('batch_num', '批次号');\n $filter->between('prizes_time', '抽奖时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Boarding());\n\n $grid->column('id', __('Id'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('reservation.date', __('Reservation Date'));\n $grid->column('cage_id', __('Cage Number'));\n $grid->column('end_date', __('End date'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('pet.name', 'Pet Name');\n \n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Engine());\n\n $grid->column('id', __('#'));\n $grid->column('power_station_id', __('Power station'))\n ->display(function ($userId) {\n $u = PowerStation::find($userId);\n if (!$u)\n return \"-\";\n return $u->name;\n })\n ->sortable();\n $grid->column('name', __('Tank Name'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Work);\n\n $grid->id('Id')->sortable();;\n $grid->name(trans('Название'))->sortable();;\n $grid->description(trans('Описание'))->sortable();;\n $grid->order_id(trans('Порядок'))->sortable();;\n\n $grid->paginate(20);\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('name', trans('Название'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Cate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('link', __('Link'));\n $grid->column('thumb', __('Thumb'));\n $grid->column('status', __('Status'));\n $grid->column('sort', __('Sort'));\n $grid->column('createtime', __('Createtime'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new BrandCooperation);\n\n $grid->sort('排序')->editable()->sortable();\n $grid->name('品牌名称');\n $grid->is_show('是否显示')->editable('select', [1 => '显示', 0 => '隐藏']);\n $grid->created_at('添加时间')->sortable();\n\n// $grid->actions(function ($actions) {\n// $actions->disableView(); // 禁用查看\n// });\n\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n // 查询\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->like('name', '品牌名称');\n $filter->equal('is_show', '显隐')->radio([1 => '显示', 0 => '隐藏']);\n });\n\n return $grid;\n }", "public function buildGrid() {\n // Processing Grids\n if ($this->getContext('container.grids')) {\n $grids = new VTCore_Bootstrap_Grid_Column($this->getContext('container.grids'));\n $this->addClass($grids->getClass(), 'grids');\n }\n\n return $this;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('ID');\n $grid->name('Название');\n //$grid->intro_img('Превью');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity);\n\n $grid->id('Id');\n $grid->log_name('Log name');\n $grid->description('Description');\n $grid->subject_id('Subject id');\n $grid->subject_type('Subject type');\n $grid->causer_id('Causer id');\n $grid->causer_type('Causer type');\n $grid->properties('Properties');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableEdit();\n $actions->disableView();\n });\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->between('created_at', '创建时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Banner);\n\n $grid->id('Id');\n $grid->title('Title');\n $grid->image('Image')->display(function($image) {\n return '<img width=\"30\" src=\"' . (env('APP_URL') . '/storage/' . ($image ?: 'images/default.png')) . '\"\"/>';\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->id('ID')->sortable();\n\n $grid->company_id('公司名称')->display(function ($company_id) {\n $company = Company::find($company_id);\n if ($company) {\n return $company->company_name;\n }\n return $company_id;\n });\n $grid->project_name('项目名称')->sortable();\n $grid->link_url('项目链接');\n $grid->display('公开度')->display(function ($display) {\n return $display == 0 ? '公开' : '私密';\n });\n $grid->created_at('添加时间')->sortable();\n\n return $grid;\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function grid()\n {\n $grid = new Grid(new Clinic());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('image', __('Image'))->image();\n $grid->column('name', __('Name'))->filter();\n $grid->column('type', __('Type'))->using(['1' => 'Clinic', '2' => 'Hospital'])->filter();\n $grid->column('email', __('Email'))->filter();\n $grid->column('phone', __('Phone'))->filter();\n $grid->column('address', __('Address'))->filter();\n $grid->column('website_url', __('Website url'))->link()->filter();\n $grid->column('profile_finish', __('Profile finish'))->bool()->filter();\n $grid->column('status', __('Status'))->bool()->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Information);\n\n $grid->model()->where('adminuser_id', '=', Admin::user()->id);\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('项目名称'));\n $grid->column('content', __('项目简介'))->limit(30);\n $grid->column('industry', __('行业类别'));\n $grid->column('investment', __('投资金额')); \n $grid->column('cont_name', __('资方联系人'));\n $grid->column('cont_phone', __('资方联系方式'));\n $grid->column('staff_name', __('工作人员姓名'));\n $grid->column('staff_phone', __('工作人员电话'));\n $grid->column('created_at', __('上报时间'));\n $grid->column('updated_at', __('更新时间'));\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('name', '项目名称');\n $filter->like('cont_name', '资方联系人');\n $filter->like('content', '项目情况');\n });\n\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n $grid->column('id', __('Id'));\n $grid->column('currency', __('Currency'));\n $grid->column('amount', __('Amount'));\n $grid->column('state', __('State'));\n $grid->column('game_id', __('Game id'));\n $grid->column('user_id', __('User id'));\n $grid->column('product_id', __('Product id'));\n $grid->column('product_name', __('Product name'));\n $grid->column('cp_order_id', __('Cp order id'));\n $grid->column('callback_url', __('Callback url'));\n $grid->column('callback_info', __('Callback info'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Dictionary());\n $grid->disableRowSelector();\n $grid->disableExport();\n\n $grid->column('id', __('Id'));\n $grid->column('type', __('Type'))->display(function () {\n return $this->type ? Dictionary::TYPES[$this->type] : null;\n })->label();\n $grid->column('option', __('Option'));\n $grid->column('slug', __('Slug'));\n $grid->column('alternative', __('Alternative'));\n $grid->column('approved', __('Approved'))->switch();\n $grid->column('sort', __('Sort'));\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->expand();\n $filter->where(function ($query) {\n $query->where('dictionaries.type', '=', $this->input);\n }, __('Фильтровать по типу'))->select(Dictionary::TYPES);\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SpecificationTemplate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('keys', __('Keys'))->display(function ($keys) {\n return implode(',', $keys);\n });\n $grid->column('content', __('Content'))->display(function ($content) {\n return implode('<br/>', array_map(fn($values) => implode(',', $values), $content));\n });\n $grid->column('sort', __('Sort'))->editable();\n $grid->column('is_display', __('Is display'))->switch();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n\n //only display paid order\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('order number');\n $grid->column('user.name', 'Buyer');\n $grid->total_amount('Total Amount')->sortable();\n $grid->paid_at('Paid Time')->sortable();\n $grid->ship_status('Shipment')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('Refund Status')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Book());\n\n $grid->column('id', __('Id'));\n $grid->author()->display(function($v) {\n return $v['name'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('year', __('Year'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Blog());\n\n $grid->column('id', __('Id'));\n $grid->column('title', __('Title'));\n $grid->column('sub_title', __('Sub title'));\n $grid->column('tag', __('Tag'));\n $grid->column('body', __('Body'));\n $grid->column('posted_by', __('Posted by'));\n $grid->column('posted_at', __('Posted at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new PointMachine());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('point.name', __('Point name'));\n $grid->column('machine_no', __('Machine no'));\n // 1-自助型 2-全自动型\n $grid->column('type', __('Type'))->display(function ($type) {\n return $type == 1 ? '自助型 ' : '全自动型';\n });\n $grid->column('cost', __('Cost'));\n $grid->column('cost_at', __('Cost at'));\n $grid->column('build_at', __('Build at'));\n $grid->column('remark', __('Remark'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n $grid->column('id', __('Id'));\n $grid->column('sort', __('Sort'));\n $grid->column('name', __('Name'));\n $grid->column('slug', __('Slug'));\n $grid->column('description', __('field.description'))->display(function ($item) {\n return mb_strimwidth($item, 0, 500, '...');\n });\n $grid->column('files', __('field.images'))->display(function () {\n $images = array();\n foreach ($this->files as $file) {\n array_push($images, preg_replace(\"/images\\//\", \"images/small.\", $file->file));\n }\n return $images;\n })->carousel(150, 100);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Talent);\n\n $grid->column('talents_id', 'ID');\n $grid->column('name', '姓名')->filter('like');\n $grid->column('sex', '性别')->filter('like');\n $grid->column('jobtitle', '工作单位及职务')->filter('like');\n $grid->column('education', '学历学位')->filter('like');\n $grid->column('university', '毕业院校与专业')->filter('like');\n $grid->column('major', '目前的专业/技术特长')->filter('like');\n $grid->column('linkphone', '联系电话')->filter('like');\n $grid->exporter(new TalentExporter());\n $grid->actions(function ($actions) {\n // 去掉查看\n $actions->disableView();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Resources);\n\n $grid->id('ID');\n $grid->type('类型')->using(Resources::TYPE)->filter(Resources::TYPE);\n $grid->name('名称');\n $grid->url('图片')->image();\n $grid->sort_num('排序')->editable()->sortable();\n $grid->memo('备注');\n\n $grid->disableExport();\n $grid->disableFilter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SiteHelp);\n\n $grid->model()->latest();\n\n $grid->filter(function ($filter) {\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->equal('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->select(SiteHelpCategory::pluck('name', 'id'));\n $filter->like('title', __('site-help::help.title'));\n $filter->equal('status', __('site-help::help.status.label'))\n ->select(__('site-help::help.status.value'));\n });\n\n $grid->column('thumbnail', __('site-help::help.thumbnail'))->image('', 66);\n $grid->column('id', __('site-help::help.id'));\n $grid->column('category.name', __('site-help::help.site_help_category_id'));\n $grid->column('title', __('site-help::help.title'));\n $grid->column('useful', __('site-help::help.useful'));\n $grid->column('status', __('site-help::help.status.label'))\n ->using(__('site-help::help.status.value'));\n $grid->column('created_at', __('admin.created_at'));\n $grid->column('updated_at', __('admin.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Platform());\n\n $grid->column('platform_number', __('Platform number'));\n $grid->column('platform_name', __('Platform name'))->label()\n ->expand(function ($model){\n $shops = $model->shops()->get()->map(function ($shop){\n return $shop->only(['shop_number', 'shop_name']);\n });\n\n return new Table([__('Platform number'), __('Platform name')], $shops->toArray());\n });\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->equal('platform_number', __('Platform number'));\n $filter->like('platform_name', __('Platform name'));\n });\n\n $grid->paginate(10);\n\n $grid->disableRowSelector();\n\n $grid->actions(function ($actions){\n $actions->disableView();\n $actions->disableDelete();\n });\n\n return $grid;\n }", "public function getDatagridViewBuilder();", "protected function grid()\n {\n $grid = new Grid(new Barang());\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('nama', 'Nama');\n });\n $grid->column('id', __('Id'));\n $grid->column('nama', __('Nama'));\n $grid->column('harga', __('Harga Beli'));\n $grid->column('harga_jual', __('Harga Jual'));\n $grid->column('satuan_id', __('Satuan id'))->display(function($satuan) {\n return Satuan::find($satuan)->nama;\n });\n $grid->column('jumlah_unit', __('Jumlah Unit'));\n $grid->column('parent_id', 'Parent')->display(function($id) {\n if($id) {\n return Barang::find($id)->nama;\n }\n else {\n return null;\n }\n });\n $grid->column('b_pengiriman', __('Pengiriman'));\n $grid->column('b_keamanan', __('Keamanan'));\n // $grid->column('created_at', __('Created at'));\n // $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Collect());\n $grid->disableActions();\n $grid->disableCreateButton();\n $grid->column('name','姓名');\n $grid->column('phone','手机号');\n $grid->column('address','地址');\n $grid->column('time','时间');\n $grid->column('message','备注');\n\n $postsExporter = new ColectExport();\n $postsExporter->fileName = date('Y-m-d H:i:s').'.xlsx';\n $grid->exporter($postsExporter);\n $url = url()->current();\n $url .= \"?_export_=all\";\n $grid->tools(function ($tools)use($grid,$url){\n $tools->append(new Export($grid,$url));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Customer);\n $grid->model()->where('is_delete',0)->orderBy('id','desc');\n $grid->id('ID')->sortable();\n $grid->code('客户编号');\n $grid->name('客户名称');\n $grid->contactor('联系人');\n $grid->tel('联系电话');\n $grid->email('邮箱');\n $grid->address('地址');\n $grid->receivables('应收账款数字');\n\n $grid->create_time('创建时间')->display(function ($create_time) {\n return date('Y-m-d H:i',$create_time);\n })->sortable();\n\n // 查询过滤\n $grid->filter(function($filter){\n $filter->column(1/2, function ($filter) {\n $filter->like('code', '客户编号');\n $filter->like('name', '客户名称');\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('contactor', '联系人');\n $filter->like('tel', '联系电话');\n $filter->use(new TimestampBetween('create_time','创建时间'))->datetime();\n });\n\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Setting());\n\n $grid->column('id', __('Id'));\n $grid->column('member_fee', __('Member fee'));\n $grid->column('task_rate', __('Task rate'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HhxEquip());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('hhx_travel_id', __(trans('hhx.hhx_travel_id')))->display(function ($hhx_travel_id){\n return self::getTravelService()->getNameByTravelId($hhx_travel_id);\n });\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.equip_status'));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Sections());\n\n $grid->column('id', __('ID'))->editable() -> sortable();\n $grid->column('name', __('Nazwa'))->editable() -> sortable();\n $grid->column('pageId', __('ID sekcji (w sensie HTML)'))->editable() -> sortable();\n $grid->column('content', __('Zawartość'))->editable() -> sortable();\n $grid->column('style', __('Style(CSS)'))->editable() -> sortable();\n $grid->column('created_at', __('Utworzono')) -> sortable();\n $grid->column('updated_at', __('Zauktalizowano')) -> sortable() ;\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MethodPrice);\n\n $grid->id('ID');\n $grid->entity('Сущность')->select(Pest::all()->pluck('name','id'));\n $grid->method('Сущность')->select(Method::all()->pluck('name','id'));\n $grid->chemical('Сущность')->select(Chemical::all()->pluck('name','id'));\n $grid->square_1('Сущность')->select(Chemical::all()->pluck('name','id'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feedback);\n $grid->column('id', 'ID');\n $grid->column('content', '内容');\n $grid->column('member', '用户')->display(function(){\n return $this->member->nickname;\n });\n $grid->column('created_at', '时间');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Site());\n\n $grid->id('ID');\n $grid->category()->title('分类');\n $grid->title('标题');\n $grid->thumb('图标')->gallery(['width' => 50, 'height' => 50]);\n $grid->describe('描述')->limit(40);\n $grid->url('地址');\n\n $grid->disableFilter();\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $grid->id('Id');\n $grid->title(trans('admin.title'));\n $grid->slogan(trans('admin.slogan'));\n $grid->name(trans('admin.name'));\n $grid->price(trans('admin.price'))->editable();\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n $grid->model()->orderBy('created_at','desc');\n\n $grid->column('id', __('Id'));\n $grid->column('log_name', __('Log name'))->using($this->log_name);\n $grid->column('description', __('Description'))->limit(10);\n $grid->column('subject_id', __('Subject id'));\n $grid->column('subject_type', __('Subject type'));\n $grid->column('causer_id', __('Causer id'));\n $grid->column('causer_type', __('Causer type'));\n $grid->column('properties', __('Properties'))->display(function ($properties) {\n $properties = [\n '详情' => isset($properties['description']) ? $properties['description'] : '',\n '备注' => isset($properties['remark']) ? $properties['remark'] : '',\n ];\n return new Table([], $properties);\n });\n $grid->column('created_at', __('Created at'))->sortable();\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter) {\n\n $filter->equal('log_name', __('Log name'))->select($this->log_name);\n\n });\n\n #禁用创建按钮\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n $actions->disableEdit();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Usertype());\n\n $grid->column('id', 'ID');\n $grid->column('usertype', '分类名称');\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '修改时间');\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Regional());\n\n $grid->column('id', 'ID');\n $grid->column('logo', 'Logo')->image('', '50', '50');\n $grid->column('name', 'Nama');\n $grid->column('address', 'Alamat');\n $grid->column('created_at', 'Dibuat')->date('d-m-Y');\n $grid->column('updated_at', 'Diubah')->date('d-m-Y');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Plan);\n $grid->model()->whereHas('category');\n\n $grid->column('category.name', __('Категория'));\n $grid->column('count', __('План'))->editable()->sortable();\n $grid->column('month_name', __('Месяц'));\n $grid->column('year', __('Год'))->sortable();\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order());\n\n $grid->column('id', __('Id'));\n $grid->column('trip', __('Trip'))->display(function () {\n return $this->trip->name;\n });\n $grid->column('user', __('User'))->display(function () {\n return $this->user->name . ' ' . $this->user->surname . \" ({$this->user->email})\";\n });\n $grid->column('paid', __('Paid'))->bool()->filter([\n 0 => 'No',\n 1 => 'Yes',\n ]);\n $grid->column('reservation_expires', __('Reservation expires'))->sortable();\n $grid->column('price', __('Price'));\n\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Terrace());\n\n $grid->column('id', __('Id'))->sortable()->style('text-align:center');\n $grid->column('image', __('平台图片'))->style('text-align:center')->image();\n $grid->column('name', __('平台名称'))->style('text-align:center');\n $grid->column('path', __('外链'))->style('text-align:center');\n $grid->column('notice_info', __('提示语'))->style('text-align:center');\n $grid->column('status', __('状态'))->display(function($status){\n return $status == 1 ? '未推荐' : '已推荐';\n })->style('text-align:center');\n $grid->column('created_at', __('创建时间'))->style('text-align:center');\n $grid->disableExport();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->add(new Terracedel());\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatUser);\n\n $grid->column('id', __('ID'));\n $grid->column('nick_name', __('昵称'));\n $grid->column('name', __('用户名'));\n $grid->column('password', __('密码'));\n $grid->column('mobile', __('手机号'));\n $grid->column('mini_program_open_id', __('OpenId'));\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Code());\n\n\n \n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->column(1 / 2, function ($filter) {\n $filter->like('phone', '手机号');\n $filter->like('ip', 'IP');\n });\n\n $filter->column(1 / 2, function ($filter) {\n $filter->between('created_at', '时间范围')->datetime();\n });\n\n\n });\n\n\n // $grid->column('id', __('Id'));\n $grid->column('phone', __('手机号'))->filter('like');\n $grid->column('code', __('验证码'));\n $grid->column('created_at', __('发送时间'));\n $grid->column('used_at', __('使用时间'));\n $grid->column('ip', __('IP'));\n $grid->model()->latest();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Purchase());\n\n $grid->column('id', \"编号\");\n $grid->column('consumer_name', \"客户\")->display(function () {\n return $this->consumer->full_name;\n });\n $grid->column('house_readable_name', \"房源\")->display(function () {\n return $this->house->readable_name;\n });\n $grid->column('started_at', \"生效日期\");\n $grid->column('ended_at', \"结束日期\");\n $grid->column('sell_type', \"出售方式\")->display(function ($sell_type) {\n return Purchase::$type[$sell_type];\n });\n $grid->column('price', \"成交价格\")->display(function ($price) {\n return \"¥$price\";\n });\n $grid->column('created_at', \"创建日期\");\n $grid->column('updated_at', \"更新日期\");\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Specialization);\n\n $grid->id('Id');\n $grid->full_name('Полное найменование');\n $grid->short_name('Краткое найменование');\n $grid->code('Код специальности');\n $grid->cathedra_id('Кафедра')->using(Cathedra::all()->pluck('abbreviation', 'id')->toArray());\n $grid->created_at('Создано');\n $grid->updated_at('Обновлено');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->hyzz('资质证书')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->type('类型');\n $grid->username('用户名称');\n $grid->password('密码');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n $grid->status('账户状态')->radio([\n 0=> '审核中',\n 1=> '审核通过',\n 2=> '冻结账户'\n ]);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n// $grid->column('id', __('Id'));\n $grid->column('date', __('Дата'));\n $grid->column('name', __('Город'))->display(function () {\n return '<a href=\"/admin/city-users?set='.$this->id.'\">'.$this->name.'</a>';\n });\n $grid->column('image', 'Картинка')->display(function () {\n $str = $this->image!='' ? '<img src=\"/uploads/images/'.$this->image.'\" height=\"100\"/>' : '';\n return $str;\n });\n// $grid->column('text', __('Text'));\n $grid->column('show', 'Активен')->display(function () {\n return $this->show ? 'да' : 'нет';\n });\n// $grid->column('orders', __('Orders'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('Id');\n $grid->parent_id('父ID');\n $grid->name('名称');\n $grid->order('排序');\n $grid->image('图片');\n $grid->index_template('首页模版');\n $grid->detail_template('详情模版');\n $grid->status('Status')->display(function ($status){\n return $status ? '<p class=\"text-success\">启用</p>' : '<p class=\"text-muted\">禁用</p>';\n });\n $grid->created_at('创建时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Member());\n\n $grid->column('id', 'id')->sortable();\n $grid->column('username','用户名');\n $grid->column('phone', '手机号')->display(function() {\n return substr($this->phone, 0, 3).'****'.substr($this->phone, 7);\n });\n $grid->column('avatar', '头像')->image('', 50, 50);\n $grid->column('created_at', '注册时间')->sortable();\n $grid->disableCreateButton();\n $grid->disableExport();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n\n // 设置created_at字段的范围查询\n $filter->between('created_at', '创建时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid() {\n\t\t$grid = new Grid(new Payment);\n\t\t$grid->disableCreateButton();\n\t\t$grid->column('id', __('Id'));\n\t\t$grid->column('user_id', __('用户'));\n\t\t// $grid->column('app_id', __('App id'));\n\t\t$grid->column('price', __('金额'));\n\t\t$grid->column('transaction_id', __('三方订单号'));\n\t\t$grid->column('out_trade_no', __('平台订单号'));\n\t\t$grid->column('type', __('订单类型'))->using(['20' => '商城订单']);\n\t\t$grid->column('status', __('状态'))->using(['0' => '未支付', '1' => '已支付', '2' => '未支付']);\n\t\t// $grid->column('other', __('Other'));\n\t\t$grid->column('payment_at', __('支付时间'));\n\t\t$grid->column('created_at', __('创建时间'));\n\t\t$grid->column('updated_at', __('更新时间'));\n\n\t\treturn $grid;\n\t}", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->id('Id');\n $grid->name('商品名');\n $grid->column('category.name', '品类');\n $grid->fabric('Fabric');\n $grid->gsm('Gsm');\n $grid->material('Material');\n $grid->attach('Attach');\n $grid->head_image('商品图')->image('http://yujiaknit.test/images/', 100, 100);\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feed());\n\n $grid->column('id', __('Id'));\n $grid->column('url', __('url'));\n $grid->column('id_author', __('Id author'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Withdrawal());\n\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n $filter->like('name', __('分区名称'));\n });\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('uid', __('用户昵称(UID)'))->display(function ($uid) {\n return UsersInfo::where('id',$uid)->value('nickname').\"({$uid})\";\n });\n $grid->column('real_name', __('实名姓名'));\n $grid->column('id_card', __('身份证号码'));\n $grid->column('mobile', __('联系电话'));\n $grid->column('amount', __('提现数量'));\n $grid->column('status', __('状态'))->display(function ($status) {\n return Withdrawal::$status[$status];\n });\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('修改时间'));\n\n $grid->disableActions();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StationBannerImage());\n\n $grid->column('id', __('Id'));\n $grid->column('station.station_name', __('測站'));\n $grid->column('image', __('輪播圖'))->image('', '50');\n $grid->column('url', __('連結'))->link();\n $grid->column('order', __('排序'));\n $grid->column('valid_at', __('有效日期'));\n $grid->column('mod_user', __('異動人員'));\n $grid->column('updated_at', __('異動時間'));\n\n if (Admin::user()->username != 'admin') {\n $grid->model()->where('station_id', '=', Admin::user()->station_id);\n }\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new KuponGroup);\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name',__('Nama'));\n $grid->column('total',__('Jumlah Kupon'));\n $grid->column('amount_per_kupon',__('Nilai Per Kupon'));\n $grid->column('expired',__('Kedaluwarsa'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n return Admin::grid(Classroom::class, function (Grid $grid) {\n\n $grid->id('ID')->sortable();\n\n // $grid->column();\n\n $grid->column('number', '编号');\n $grid->column('name', '名称');\n $grid->column('location', '地点');\n $grid->column('square', '面积');\n $grid->column('floor', '楼层');\n $grid->column('is_free', '是否空闲');\n $grid->column('building_name', '建筑物名称');\n\n $grid->created_at();\n $grid->updated_at();\n });\n }", "protected function grid()\n {\n $grid = new Grid(new Milestone);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('type', __('Type'))->select(Milestone::TYPE_MAP);\n $grid->column('version', __('Version'));\n $grid->column('content', __('Content'));\n $grid->column('detail', __('Detail'));\n $grid->column('created_at', __('Created at'))->sortable()->hide();\n $grid->column('updated_at', __('Updated at'))->sortable()->hide();\n\n $grid->model()->orderBy('id', 'desc');\n\n $grid->filter(function ($filter) {\n $filter->equal('version', '版本');\n $filter->like('content', '内容');\n $filter->equal('type', '类型')->select(Milestone::TYPE_MAP);\n $filter->between('created_at', '创建时间')->datetime();\n $filter->between('updated_at', '更新时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Test());\n\n $grid->id('编号');\n $grid->name('教师姓名');\n $grid->work_point('教学分数');\n $grid->science_point('科研分数');\n $grid->disableCreateButton();\n $grid->disableFilter();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new UserHealth());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('height', __('Height'))->filter();\n $grid->column('weight', __('Weight'))->filter();\n $grid->column('blood_pressure', __('Blood pressure'))->filter();\n $grid->column('sugar_level', __('Sugar level'))->filter();\n $grid->column('blood_type', __('Blood type'))->filter();\n $grid->column('muscle_mass', __('Muscle mass'))->filter();\n $grid->column('metabolism', __('Metabolism'))->filter();\n $grid->column('genetic_history', __('Genetic history'))->filter();\n $grid->column('illness_history', __('Illness history'))->filter();\n $grid->column('allergies', __('Allergies'))->filter();\n $grid->column('prescription', __('Prescription'))->filter();\n $grid->column('operations', __('Operations'))->filter();\n $grid->column('user_id', __('User id'))->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n return $grid;\n }", "protected function grid()\n { \n \n $grid = new Grid(new Blog);\n\n $grid->id('Id')->sortable();\n $grid->title('标题');\n // $grid->content('内容');\n $grid->logo('图片')->display(function ($value) {\n return \"<img width='50' src='/upload/$value'>\";\n });\n $grid->discuss('评论');\n $grid->display('浏览');\n \n $grid->lab_id('标签')->display(function ($value) {\n $lab_name = Lab::select('lab_name')->where('id',$value)->get();\n \n return $lab_name[0]->lab_name;\n });\n\n $grid->cat_id('分类')->display(function ($value) {\n $cat_name = Cat::select('cat_name')->where('id',$value)->get();\n return $cat_name[0]->cat_name;\n });\n \n\n\n $grid->created_at('添加时间');\n \n $grid->actions(function ($actions){\n $actions->disableView();\n });\n\n $grid->filter(function($filter){\n $filter->like('title', '标题');\n $filter->like('content', '内容');\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('surname', __('Surname'));\n $grid->column('email', __('Email'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->model()->small();\n \n $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n $create->text('erp_id', 'ERP ID');\n $create->text('name', '小分類名稱');\n $create->select('parent_id', __('中分類'))->options(\n Category::Mid()->pluck('name', 'id')\n );\n $create->text('type','分級(不需改)')->default(3);\n });\n\n $grid->column('erp_id', __('ERP Id'));\n $grid->column('name', __('小分類名稱'));\n $grid->column('parent_id', __('中分類'))->display(function($userId) {\n return Category::find($userId)->name;\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatEvent);\n\n $grid->id('Id');\n $grid->title('事件标题');\n $grid->key('Key');\n $grid->event('事件类型')->using(WechatEvent::EVENTLIST);\n $grid->method('执行方法');\n $grid->column('message.title', '消息标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Station());\n\n $grid->column('id', __('Id'));\n $grid->column('area.area_name', __(trans('admin.area_name')));\n $grid->column('station_code', __(trans('admin.station_code')));\n $grid->column('station_name', __(trans('admin.station_name')));\n $grid->column('telno', __(trans('admin.telno')));\n $grid->column('order', __(trans('admin.order')));\n $grid->column('valid_at', __(trans('admin.valid_at')));\n $grid->column('mod_user', __(trans('admin.mod_user')));\n $grid->column('updated_at', __(trans('admin.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GithubRepositories());\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('项目名'))->limit(20);\n $grid->column('full_name', __('项目全名'))->limit(40);\n $grid->column('description', __('简介'))->limit(60);\n// $grid->column('owner', __('作者资料'));\n $grid->column('html_url', __('网页地址'))->link();\n// $grid->column('original_data', __('原始数据'));\n $grid->column('created_at', __('创建时间'));\n// $grid->column('updated_at', __('更新时间'));\n\n //快捷搜索\n $grid->quickSearch('name', 'full_name', 'description');\n\n //倒叙\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->column('id', __('Id'));\n $grid->column('type.name', __('分类名称'));\n $grid->column('recommend.name', __('推荐名称'));\n $grid->column('name', __('产品名称'));\n $grid->column('description', __('产品描述'));\n $states = [\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n ];\n $grid->column('pop', __('推荐'))->switch($states);\n $grid->column('logo','logo图')->display(function (){\n if ($this->logo){\n return '<div class=\"pop\"><img src='.env('APP_URl').'/uploads/'.$this->logo.' style=\"width:100px;height:100px;\"></div>';\n }else{\n return ;\n }\n });\n $grid->column('price', __('价格'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Student);\n\n $grid->id('Id');\n $grid->surname('Фамилия');\n $grid->name('Имя');\n $grid->family_name('Отчество');\n $grid->telegram_id('Telegram-id');\n $grid->email('Email');\n $grid->number('Контактный телефон');\n $grid->groups_id('Группа')->using(Group::all()->pluck('name', 'id')->toArray());\n $grid->created_at('Создание записи');\n $grid->updated_at('Редактирование записи');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n $grid->id('ID')->sortable();\n $grid->name('名称');\n $grid->type('分类')->display(function($status) {\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n foreach ($arr as $key => $value) {\n if($status==$value['id']) return $value['type']; \n }\n \n });\n $grid->cover('商品大图')->image('',70, 70);\n $grid->image('详情图')->image('',70, 70);\n $grid->stock('库存');\n $grid->price('积分价格');\n $grid->status('状态')->display(function($status) {\n if($status==1) return \"上架中\";\n if($status==0) return \"已下架\"; \n });\n $grid->disableExport();//禁用导出数据按钮\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();//禁用查询过滤器\n });\n \n \n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n //$filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('title_designer_cn', '标题(设计师)');\n $filter->like('title_name_cn', '标题(项目名称)');\n $filter->like('title_intro_cn', '标题(项目介绍)');\n\n });\n\n $grid->id('ID')->sortable();\n $grid->title_designer_cn('标题(中)')->display(function () {\n return CurrentModel::formatTitle($this, 'cn');\n });\n $grid->title_designer_en('标题(英)')->display(function () {\n return CurrentModel::formatTitle($this, 'en');\n });\n $grid->article_status('状态')->display(function ($article_status) {\n switch ($article_status) {\n case '0' :\n $article_status = '草稿';\n break;\n case '1' :\n $article_status = '审核中';\n break;\n case '2' :\n $article_status = '已发布';\n break;\n }\n return $article_status;\n });\n $grid->release_time('发布时间')->sortable();\n \n // $grid->column('created_at', __('发布时间'));\n $grid->created_at('添加时间')->sortable();\n // $grid->column('updated_at', __('添加时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatMessage);\n\n $grid->id('Id');\n $grid->msg_type('消息类型');\n $grid->media_id('素材id');\n $grid->title('标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('field.id'));\n $grid->column('name', __('Name'));\n $grid->column('email', __('Email'));\n $grid->column('email_verified_at', __('Email verified at'));\n $grid->column('password', __('Password'));\n $grid->column('remember_token', __('Remember token'));\n $grid->column('point', __('Point'));\n $grid->column('status', __('field.status'));\n $grid->column('created_at', __('field.created_at'));\n $grid->column('updated_at', __('field.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n $grid->model()->where('type',$this->getProductType())->orderBy('id','desc');\n //调用自定义的Grid\n\n $this->customGird($grid);\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new News);\n\n $grid->id('Id');\n $grid->title('题目');\n $grid->category_id('分类ID');\n // $grid->content('内容');\n $grid->thumbnail('封面图');\n $grid->status('状态');\n $grid->read_count('阅读数量');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new DbTop());\n $grid->header(function ($query) {\n $alread = DbTop::whereStatus(1)->count();\n $notyet = DbTop::whereStatus(0)->count();\n $notok = DbTop::whereStatus(2)->count();\n $pan = DbTop::where('pan_url', '<>', '')->count();\n $x = '已看:' . $alread . '<br />未看:' . $notyet . '<br />不感兴趣:' . $notok . '<br />资源:' . $pan;\n return '<div class=\"alert alert-success\" role=\"alert\">' . $x . '</div>';\n });\n $grid->column('no', __(trans('hhx.no')))->display(function ($no) {\n return 'No.' . $no;\n });\n $grid->column('img', __(trans('hhx.img')))->image();\n $grid->column('c_title', __(trans('hhx.c_title')))->display(function () {\n return $this->c_title . ' ' . $this->year;\n });\n $grid->column('rating_num', __(trans('hhx.rating_num')));\n $grid->column('inq', __(trans('hhx.inq')));\n $grid->column('actor', __(trans('hhx.actor')));\n $grid->column('type', __(trans('hhx.type')));\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.db_status'));\n $grid->filter(function ($filter) {\n $filter->like('c_title', '中文名');\n $filter->like('year', '年');\n $filter->like('status', trans('hhx.status'))->select(config('hhx.db_status'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Drug);\n\n $grid->id('ID');\n $grid->street_name('«Уличное» название');\n $grid->city('Город');\n $grid->column('photo_drug','Фотография наркотика')->display(function () {\n $photo = Photo::whereDrugId($this->id)->where('type', 0)->first();\n\n if ($photo) {\n return $photo->photo;\n } else {\n return '';\n }\n })->image();\n\n $grid->column('confirm', 'Подтверждение')->display(function ($confirm) {\n if ($confirm) {\n return '✅Подтверждено';\n } else {\n return '❌Не подтверждено';\n }\n });\n $grid->updated_at('Дата изменения');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Profile());\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name', __('ID'))->sortable();\n $grid->column('surname', __('ID'))->sortable();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Leavetime());\n $grid->filter(function ($filter) {\n $filter->like('designer.name', '设计师');\n $filter->between('created_at','创建时间')->datetime();\n });\n $grid->column('id', __('Id'));\n $grid->column('designer.name', __('设计师'));\n $grid->column('type', __('请假类型'))->display(function ($value) {\n return $value ? '半天' : '全天';\n });\n $grid->column('date', __('请假日期'));\n $grid->column('time', __('时间段'))->display(function ($time) {\n $html = '';\n foreach ($time as $k => $value){\n $work = Worktime::where('id','=',$value)->first();\n if($work){\n $html .= \"<span class='label label-success' style='margin-left: 10px'>{$work['time']}</span>\";\n }else{\n $html = '';\n }\n\n }\n return $html;\n });\n $grid->column('created_at', __('创建日期'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n //$actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku());\n\n $grid->column('id', __('Id'));\n $grid->column('product', __('产品'))->display(function ($product){\n return $product['title'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('price', __('Price'));\n $grid->column('stock', __('Stock'));\n $grid->column('options', __('sku规格'))->display(function ($options){\n if (count($options) > 0){\n $strOption = '';\n foreach ($options as $option) {\n $strOption .= \"<p>{$option['product_property_name']}:{$option['product_property_value']}</p>\";\n }\n return $strOption;\n }\n return '';\n });\n\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n // 只展示已支付的订单,并且默认按支付时间倒序排序\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('订单流水号');\n //展示关联关系的字段时,使用column方法\n $grid->column('user.name','买家');\n $grid->total_amount('总金额')->sortable();\n $grid->paid_at('支付时间')->sortable();\n $grid->ship_status('物流')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('退款状态')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n // 禁用创建按钮,后台不需要创建订单\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n // 禁用删除和编辑按钮\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n// return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SkuModel);\n\n $grid->column('s_id', __('skuid'));\n $grid->column('sku_num', __('编号'));\n $grid->column('goods_id', __('商品id'));\n $grid->column('sku_name', __('sku名称'));\n $grid->column('sku_price', __('Sku价格'));\n $grid->column('sku_goods_repertory', __('库存'));\n $grid->column('sku_goods_img', __('照片'))->image();\n $grid->column('created_at', __('添加时间'));\n $grid->column('updated_at', __('修改时间'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StockProduct);\n\n $grid->column('id', __('Id'));\n // $grid->column('product_id', __('Product id'))->modal('Product Name', function($model){\n // $products = $model->product()->get()->map(function($product) {\n // return $product->only('id','product_name');\n // });\n // return new Table(['ID', 'Product Name'], $products->toArray());\n // });\n $grid->column('product.product_name', __('Name'));\n $grid->column('moq', __('Moq'));\n $grid->column('quantity', __('Quantity'));\n $grid->column('price', __('Price'));\n $grid->column('note', __('Note'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Project());\n $grid->model()->orderBy('id', 'desc');\n $grid->id('ID')->sortable();\n $grid->name('项目名称')->editable();\n $grid->url('项目地址')->link();\n $grid->username('账号');\n $grid->password('密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],\n ];\n $grid->status('状态')->switch($status);\n $grid->created_at('创建时间');\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Subscribe());\n $grid->column('number', __('商品编号'));\n $grid->column('name', __('商品名称'));\n $grid->column('subtitle', __('商品副标题'));\n $grid->column('price', __('单价'));\n $grid->column('quantity', __('库存'));\n $grid->column('type', __('分类'));\n $grid->column('status', __('状态'));\n $grid->column('recommend', __('推荐'));\n $grid->column('sold', __('总售量'));\n $grid->column('integral', __('返还碳积分'));\n $grid->column('emission', __('返还碳减排'));\n $grid->column('place', __('地点'));\n $grid->column('maintenance', __('养护'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GroupTask());\n $grid->column('name', __('messages.name'));\n $grid->column('active', __('messages.active'))->switch();\n $grid->column('sort', __('messages.sort'))->editable();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HotRank());\n\n// $grid->column('id', __('Id'));\n $grid->column('sort', __('排序'))->editable();\n $grid->column('nickname', __('昵称'));\n $grid->column('avatar', __('头像'))->image();\n $grid->column('gender', __('性别'))->using([\n 1 => '男',\n 2 => '女'\n ]);\n// $grid->column('role', __('Role'));\n// $grid->column('intro', __('Intro'));\n $grid->column('fans', __('粉丝数'));\n $grid->column('red_book_link', __('小红书链接'));\n $grid->column('red_book_fans', __('小红书粉丝'));\n $grid->column('douyin_link', __('抖音链接'));\n $grid->column('douyin_fans', __('抖音粉丝'));\n $grid->column('created_at', __('创建时间'));\n $grid->actions(function ($actions) use ($grid) {\n // 去掉删除\n// $actions->disableDelete();\n// // 去掉编辑\n// $actions->disableEdit();\n // 去掉查看\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new TaskOrder);\n $grid->model()->orderBy('id', 'desc');\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->equal('eid','快递单号')->integer();\n $filter->equal('store','快递网点')->select(storedatas(1));\n $filter->equal('etype','快递公司')->select(edatas());\n $filter->equal('sname','客服名称');\n $filter->between('created_at', '导入时间')->datetime();\n });\n $grid->id('ID');\n $grid->eid('快递单号');\n $grid->sname('客服名称');\n $grid->store('快递网点');\n $grid->etype('快递公司');\n\n $grid->created_at('分配时间');\n //$grid->updated_at('分配时间');\n $excel = new ExcelExpoter();\n $excel->setAttr([ '快递单号','快递网点','快递公司','负责客服','导入时间'], ['eid','store','etype','sname','created_at']);\n $grid->exporter($excel);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new AnswerList);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('title', trans('admin.title_answer'))->width(500);\n $grid->column('A', trans('admin.A'))->width(150);\n $grid->column('B', trans('admin.B'))->width(150);\n $grid->column('C', trans('admin.C'))->width(150);\n $grid->column('D', trans('admin.D'))->width(150);\n $grid->column('correct', trans('admin.correct'))->width(100);\n $grid->column('status', trans('admin.status'))->using(AnswerList::STATUSES)->label(['warning', 'primary']);\n $grid->column('created_at', trans('admin.created_at'));\n $grid->column('updated_at', trans('admin.updated_at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('id', __('Id'));\n });\n $filter->column(1 / 2, function ($filter) {\n $filter->like('title', trans('admin.title'));\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new userWhitelist());\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->like('accountName', ___('accountName'));\n });\n $grid->column('id', ___('Id'));\n $grid->column('accountId', ___('AccountId'));\n $grid->column('accountName', ___('AccountName'));\n $grid->column('nickName', ___('NickName'));\n\n return $grid;\n }", "protected function grid()\n {\n $Adv=new Adv();\n $grid = new Grid($Adv);\n\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"array\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"array\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>\"start_time\",\"title\"=>\"活动开始时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"end_time\",\"title\"=>\"活动结束时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::setlist_show($grid,$list_array);\n\n $grid->filter(function($filter) use($platform,$type){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->in('platform', \"平台\")->multipleSelect($platform);\n $filter->in('type', \"类型\")->multipleSelect($type);\n });\n return $grid;\n }" ]
[ "0.72541326", "0.7218252", "0.7064843", "0.70040804", "0.6995721", "0.69847125", "0.695367", "0.6928443", "0.6927314", "0.69256824", "0.6923453", "0.69233567", "0.6922796", "0.6907988", "0.6889554", "0.6888196", "0.6878719", "0.6845261", "0.68254143", "0.6818076", "0.6810526", "0.6801908", "0.68007404", "0.6792371", "0.67900723", "0.6785066", "0.67814827", "0.67809147", "0.6773841", "0.67679495", "0.6767842", "0.67664576", "0.67600983", "0.6759144", "0.6747873", "0.67451704", "0.6735288", "0.6732706", "0.6727944", "0.6718374", "0.6718129", "0.67142314", "0.6713679", "0.67077774", "0.66969377", "0.66829485", "0.6681708", "0.66795236", "0.66743", "0.6665543", "0.66581196", "0.6655195", "0.6648576", "0.6647211", "0.6639091", "0.6634314", "0.66231555", "0.6622456", "0.6605076", "0.6601071", "0.6595906", "0.6595102", "0.6593814", "0.65931946", "0.6590833", "0.65907514", "0.65832734", "0.657433", "0.6573453", "0.65642095", "0.65639156", "0.655778", "0.65577185", "0.6556319", "0.6553949", "0.6552593", "0.6549884", "0.6542962", "0.65393496", "0.65337956", "0.6528965", "0.6526889", "0.65218806", "0.650997", "0.6508564", "0.65050364", "0.6498207", "0.647587", "0.6474169", "0.6469046", "0.6464774", "0.6463954", "0.64510244", "0.6450445", "0.6450348", "0.64481837", "0.64450586", "0.6444865", "0.6443929", "0.64308834" ]
0.6491189
87
Make a show builder.
protected function detail($id) { $productSku = ProductSku::findOrFail($id); $show = new Show($productSku); $show->field('id', 'ID'); $show->field('name', 'sku名称'); $show->field('sku_number', 'sku编号'); $show->field('description', 'sku描述'); $show->field('product', '所属商品')->as(function ($product) { return $product->name; }); $show->field('price', '原价'); $show->field('stock', '库存量'); $show->field('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']); $show->field('primary_picture', '商品主图'); $show->field('retail_price', '零售价格'); $show->field('is_promotion', '是否促销')->using([0 => '否', 1 => '是']); $show->field('promotion_price', '促销价格'); return $show; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function buildShowLayout(): void;", "public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->withSingleField('name');\n $column->withSingleField('url');\n $column->withSingleField('vendor_id');\n $column->withSingleField('parent_id');\n $column->withSingleField('created_at');\n $column->withSingleField('updated_at');\n });\n })->addEntityListSection('products', 'products');\n }", "function Show()\n {}", "public static function builder();", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "public function show() {\n \n }", "public function show();", "public function show();", "public function show();", "public function show();", "public function show() {\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()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t\n\t}", "abstract protected function show();", "public function show()\n\t{\n\n\t}", "public function show($show)\n {\n \n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "abstract function buildShowFields(): void;", "public function show()\n {\n //\n }", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show() {\n \n \n }", "function Show()\r\n\t{\r\n\r\n\t}", "public function show()\n\t{\n\t\treturn $this;\n\t}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show()\n {\n\n }", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n { \n \n }", "function show()\n {\n }", "public function show()\n { \n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "public function createBuilder();", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }", "public function show(){\n\n }", "public function show(){\n\n }", "public function show()\n {\n new $this->controller();\n }", "public function show()\n {\n //\n }", "public function show(Menu_builder $menu_builder)\n {\n //\n }", "public function getBuilder();", "public static function builder() {\n return new self();\n }", "public function show()\n {\n return view('scaffold::show');\n }", "function buildShowConfig(): void\n {\n // No default implementation\n }", "function show(){\n\t}", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function __construct(bool $show = false)\n {\n $this->show = $show;\n }", "public static function build() {\n return new Builder();\n }", "public function setShow($val = 'null')\n {\n $this->addParams('show', $val);\n\n return $this;\n }", "public function show()\n {\n return view(\n 'manager/job-builder-root'\n )->with([\n 'title' => Lang::get('manager/job_builder.title'),\n ]);\n }", "public function show() {\n echo $this->mountElement();\n }", "public function builder()\n {\n return new Builder($this);\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "public function create()\n {\n /*return view(\"banda\");*/\n }", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }", "function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}", "public function setAsBuilder() {\r\n\t\t$this->setFrontEnd(false);\r\n\t\t$this->RenderWhole = true;\r\n\t\t$this->setMenuTemplate(__DIR__ . '/myNavigationBuilder.latte');\r\n\t}", "protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function create()\n {\n return view('liquors.create')->with(['makers' => Maker::toSelectArray()]);\n }", "public function show()\n {\n return view('panel::show');\n }", "public function show()\n {\n return view('panel::show');\n }", "protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "public function setBuilder(ViewBuilder $builder): View;", "public function show()\n {\n return $this->view();\n }", "public function show()\n {\n return view('hirmvc::show');\n }" ]
[ "0.6526378", "0.65068364", "0.6488276", "0.64457935", "0.6348684", "0.6289494", "0.62589526", "0.62589526", "0.62589526", "0.62589526", "0.62530345", "0.62369376", "0.62369376", "0.62369376", "0.62308425", "0.62241685", "0.6219827", "0.6176313", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.61007607", "0.6096217", "0.60745347", "0.60663223", "0.60663223", "0.6063096", "0.6033626", "0.6030661", "0.6002087", "0.5987225", "0.5987225", "0.5970227", "0.5969409", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5931462", "0.5922726", "0.5919749", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.5879185", "0.586704", "0.585249", "0.5838603", "0.5833667", "0.5788966", "0.5788966", "0.5779055", "0.5776268", "0.5771026", "0.57695717", "0.5753653", "0.5723977", "0.5723901", "0.5711733", "0.569598", "0.568028", "0.5659107", "0.56448984", "0.5629633", "0.5625937", "0.561372", "0.5596805", "0.5579148", "0.556807", "0.5562583", "0.5560726", "0.5540813", "0.5527313", "0.55215013", "0.55149764", "0.5511598", "0.550713", "0.55048674", "0.55048674", "0.55004644", "0.5499924", "0.54946667", "0.5489878" ]
0.0
-1
Make a form builder.
protected function form() { $form = new Form(new ProductSku); $products = Product::all()->pluck("name", "id")->toArray(); $form->display('id', 'ID'); $form->text('name', 'sku名称'); $form->text('sku_number', 'sku编号'); $form->textarea('description', 'sku描述'); $form->select('product_id', '所属商品')->options($products); $form->decimal('price', '原价'); $form->number('stock', '库存量')->default(0); $form->switch('is_on_sale', '是否上架')->default(1); $form->text('primary_picture', '商品主图')->default(''); $form->decimal('retail_price', '零售价格'); $form->switch('is_promotion', '是否促销')->default(0); $form->decimal('promotion_price', '促销价格')->default(0.00); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n }", "private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}", "public function setFormFieldBuilder(FormFieldBuilder $form_field_builder): Form;", "public function setFormBuilder(FormBuilder $form_builder): Form;", "public function getFormFieldBuilder(): FormFieldBuilder;", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "protected function form()\n {\n $form = new Form(new Book());\n\n $form->select('author_id', __('Author id'))\n ->options(collect(Author::all())->mapWithKeys(function ($v){\n return [$v->id => $v->name];\n }));\n\n $form->text('title', __('Title'));\n $form->textarea('description', __('Description'));\n $form->text('year', __('Year'));\n\n return $form;\n }", "function store_form($model = null, $prefix = null)\n {\n return new FormBuilder($model, $prefix);\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }", "protected function form()\n {\n $form = new Form(new GuestBook);\n\n $form->textarea('body', __('Body'));\n $form->number('user_id', __('User id'));\n $form->number('guest_id', __('Guest id'));\n $form->number('guest_book_id', __('Guest book id'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Gys);\n\n $form->text('name', 'Name');\n $form->text('tel', 'Tel');\n $form->textarea('file', 'File');\n $form->number('type', 'Type');\n $form->text('username', 'Username');\n $form->password('password', 'Password');\n $form->number('status', 'Status');\n // 在表单提交前调用\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BorrowComment);\n\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('student_name', __('Student name'));\n $form->image('student_avatar', __('Student avatar'));\n $form->textarea('content', __('Content'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }", "protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\n }", "protected function form()\n {\n $form = new Form(new Blog());\n\n $form->text('title', __('Title'));\n $form->text('sub_title', __('Sub title'));\n $form->text('tag', __('Tag'));\n $form->textarea('body', __('Body'));\n $form->text('posted_by', __('Posted by'));\n $form->datetime('posted_at', __('Posted at'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Barang());\n\n $form->text('nama', __('Nama'));\n $form->currency('harga', __('Harga Beli'))->symbol('Rp');\n $form->currency('harga_jual', __('Harga Jual'))->symbol('Rp');\n $form->select('satuan_id', __('Satuan id'))->options(\n Satuan::get()->pluck('nama', 'id')\n );\n $form->number('jumlah_unit', __('Jumlah Unit'));\n $form->select('parent_id', 'Parent Barang')->options(\n Barang::where('satuan_id', 1)->get()->pluck('nama', 'id')\n );\n $form->currency('b_pengiriman', __('Pengiriman'))->symbol('Rp');\n $form->currency('b_keamanan', __('Keamanan'))->symbol('Rp');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Formulario());\n\n $form->text('name', 'Nombre')\n ->required()\n ->creationRules(['required', \"unique:formularios\"])\n ->updateRules(['required', \"unique:formularios,name,{{id}}\"]);\n $form->text('description', 'Descripción');\n\n $fields = Field::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('fields', 'Campos')->options($fields);\n\n $forms = Formulario::all()->pluck('name', 'id')->toArray();\n $form->select('go_to_formulario', 'Continuar a formulario')->options($forms);\n\n $form->divider('Quiénes tienen acceso a este Formulario?');\n\n $permissions = Permission::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('permissions', 'Permisos')->options($permissions);\n\n $roles = Role::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('roles', 'Roles')->options($roles);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->mobile('phone', __('手机号'));\n $form->text('uname', __('姓名'));\n $form->text('wechat', __('微信号'));\n $form->text('phonenumber', __('联系电话'));\n $form->text('position', __('岗位'));\n $form->text('company', __('公司'));\n $form->switch('role', __('角色'));\n $form->switch('state', __('核实状态'));\n $form->datetime('create_date', __('创建时间'))->default(date('Y-m-d H:i:s'));\n // $form->text('openid', __('Openid'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}", "protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Site);\n\n $form->select('category_id', '分类')->options(SiteCategory::selectOptions(null, ''))->rules('required');\n $form->text('title', '标题')->attribute('autocomplete', 'off')->rules('required|max:50');\n $form->image('thumb', '图标')->resize(120, 120)->uniqueName();\n $form->text('describe', '描述')->attribute('autocomplete', 'off')->rules('required|max:300');\n $form->url('url', '地址')->attribute('autocomplete', 'off')->rules('required|max:250');\n $this->disableFormFooter($form);\n return $form;\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "protected function form()\n {\n $form = new Form(new Code());\n\n $form->mobile('phone', __('Phone'));\n $form->number('code', __('Code'));\n $form->ip('ip', __('IP'));\n\n return $form;\n }", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function buildForm()\n {\n }", "protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }", "abstract function builder_form(): string;", "public function toForm(){\n return $this->form_builder()->form();\n }", "public function build() { $this->form_built = TRUE; return $this; }", "public function getFormBuilder()\n {\n return $this['form.factory'];\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n\n\n return $form;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "protected function form()\n {\n $form = new Form(new Cases);\n\n $form->select('cate_id', '分类')->options('/admin/api/getcasecate');\n $form->select('algw_id', '顾问')->options('/admin/api/getgw');\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->text('desc', '副标题');\n $form->text('author', '来源');\n $form->radio('is_tj', '推荐')->options([0=>'否',1=>'是']);\n $form->image('thumb', '缩略图')->uniqueName();\n $form->editor('data', '详情');\n\n\n return $form;\n }", "public static function builder();", "protected function form()\n {\n $form = new Form(new WechatUser);\n\n $form->text('nick_name', __('昵称'));\n $form->text('name', __('用户名'));\n $form->password('password', __('密码'));\n $form->mobile('mobile', __('手机号'));\n $form->text('mini_program_open_id', __('OpenId'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goods);\n\n $form->text('title', trans('admin.title'))->required()->rules('required');\n $form->text('slogan', trans('admin.slogan'))->required()->rules('required');\n $form->text('name', trans('admin.name'))->required()->rules('required');\n $form->decimal('price', trans('admin.price'))->required()->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n return $form;\n }", "public function createForm();", "public function createForm();", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Engine());\n\n $form->text('name', __('Name'))\n ->required();\n $form->select('power_station_id', __('Power station'))\n ->options(PowerStation::all()->pluck('name', 'id'))\n ->required();\n $form->image('photo', __('Photo'));\n $form->textarea('details', __('Details'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "protected function form()\n {\n $form = new Form(new Usertype());\n\n $form->text('usertype', '类型名称')->rules('required|max:10');\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableList();\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', 'Имя');\n\n $form->textarea('text');\n\n $form->switch('status', 'Статус')->states([\n 'on' => ['value' => '1', 'text' => 'Публиковать', 'color' => 'success'],\n 'off' => ['value' => '0', 'text' => 'Не публиковать', 'color' => 'danger'],\n ]);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "public function createBuilder();", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order());\n\n $form->switch('paid', __('Paid'));\n $form->datetime('reservation_expires', __('Reservation expires'))->default(date('Y-m-d H:i:s'));\n $form->decimal('price', __('Price'));\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Customer);\n\n $form->text('code', '客户编号');\n $form->text('name', '客户名称');\n// $form->text('openid', '客户openid');\n $form->text('contactor', '联系人');\n $form->text('tel', '联系电话');\n $form->email('email', '邮箱');\n $form->text('address', '地址');\n $form->decimal('receivables', '应收账款数字')->default(0.00);\n $form->text('fax', '传真');\n $form->switch('is_delete', '是否删除');\n\n return $form;\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "protected function makeFormCreator()\n {\n if ($this->isTestMode()) {\n return null;\n }\n\n if (empty($this->formConfiguration)) {\n throw new BadMethodCallException(\n 'Please define the form configuration to use via $this->setFormConfiguration().', 1333293139\n );\n }\n\n \\tx_rnbase::load(\\tx_mkforms_forms_Factory::class);\n $form = \\tx_mkforms_forms_Factory::createForm(null);\n\n /**\n * Configuration instance for plugin data. Necessary for LABEL translation.\n *\n * @var \\tx_rnbase_configurations $pluginConfiguration\n */\n $pluginConfiguration = \\tx_rnbase::makeInstance(tx_rnbase_configurations::class);\n $pluginConfiguration->init($this->conf, $this->cObj, 'mkforms', 'mkforms');\n\n // Initialize the form from TypoScript data and provide configuration for the plugin.\n $form->initFromTs(\n $this, $this->formConfiguration,\n ($this->getObjectUid() > 0) ? $this->getObjectUid() : false,\n $pluginConfiguration, 'form.'\n );\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Specialization);\n\n $form->text('full_name', 'Полное найменование')->rules('required|max:255');\n $form->text('short_name', 'Краткое найменование')->rules('required|max:255');\n $form->text('code', 'Код специальности')->rules('nullable|max:100');\n $form->select('cathedra_id', 'Кафедра')->options(Cathedra::all()->pluck('name', 'id'))\n ->rules('required|numeric|exists:cathedras,id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Good);\n\n $form->hidden('group_id')->value(session('group_id'));\n $form->text('name', __('Наименование'));\n $form->text('size', __('Объем/кол-во'));\n $form->decimal('price', __('Цена'))->default(0);\n $form->image('file', 'Фото');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Sections());\n\n $form->text('name', __('Nazwa'));\n $form->text('pageId', __('ID sekcji (w sensie HTML)'));\n $form->textarea('content', __('Zawartość'));\n $form->textarea('style', __('Style(CSS'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n $form->text('no', 'No');\n $form->number('user_id', 'User id');\n $form->textarea('address', 'Address');\n $form->decimal('total_amount', 'Total amount');\n $form->textarea('remark', 'Remark');\n $form->datetime('paid_at', 'Paid at')->default(date('Y-m-d H:i:s'));\n $form->text('payment_method', 'Payment method');\n $form->text('payment_no', 'Payment no');\n $form->text('refund_status', 'Refund status')->default('pending');\n $form->text('refund_no', 'Refund no');\n $form->switch('closed', 'Closed');\n $form->switch('reviewed', 'Reviewed');\n $form->text('ship_status', 'Ship status')->default('pending');\n $form->textarea('ship_data', 'Ship data');\n $form->textarea('extra', 'Extra');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new TagModel);\n\n $form->text('tag_name', 'Tag name');\n $form->number('tag_id', 'Tag id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->select('cid', __('分类'))->options(CategoryModel::selectOptions());\n $form->text('goods_name', __('Goods name'));\n $form->image('goods_img', __('Goods img'));\n $form->textarea('content', __('Content'));\n $form->number('goods_pricing', __('Goods pricing'));\n $form->number('goods_price', __('Goods price'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "protected function form()\n {\n $form = new Form(new UsersOpenclose);\n\n $form->text('srvkey', __('srvkey'));\n $form->text('KtvBoxid', __('机器码'));\n $form->datetime('opendate', __('开房时间'))->default(date('Y-m-d H:i:s'));\n $form->datetime('closedate', __('关房时间'))->default(date('Y-m-d H:i:s'));\n $form->select('feesmode', __('收费模式'))->options([0=>'非扫码收费',1=>'扫码收费']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member());\n\n $form->text('open_id', __('微信openid'));\n $form->image('head', __('头像'));\n $form->text('nickname', __('昵称'));\n $form->mobile('mobile', __('手机号码'));\n $form->text('email', __('邮箱'));\n $form->text('name', __('姓名'));\n $form->text('weixin', __('微信号'));\n $form->text('qq', __('qq'));\n $form->text('city', __('所在城市'));\n $form->text('yidudian', __('易读点'));\n $form->text('integral', __('积分'));\n $form->text('balance', __('余额'));\n $states = [\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '冻结', 'color' => 'danger'],\n ];\n $form->switch('status', '是否使用')->states($states);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new RequestForConfirmation());\n\n $form->switch('status', __('Status'));\n $form->text('comment', __('Comment'));\n $form->select('user_id', __('User id'))->options(User::all()->pluck('name', 'id'))->required();\n $form->select('project_id', __('Project id'))->options(Project::all()->pluck('project_name', 'id'))->required();\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function create(): Form\n {\n $form = new Form();\n \n return $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new User);\n\n// $form->number('role_id', 'Role id');\n $form->text('name', 'Name');\n// $form->email('email', 'Email');\n// $form->image('avatar', 'Avatar')->default('users/default.png');\n// $form->password('password', 'Password');\n// $form->text('remember_token', 'Remember token');\n// $form->textarea('settings', 'Settings');\n $form->text('username', 'Username');\n// $form->text('access_token', 'Access token');\n// $form->text('no_hp', 'No hp');\n// $form->number('location_id', 'Location id');\n// $form->switch('gender', 'Gender')->default(1);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }", "protected function form()\n {\n return new Form(new Attention);\n }", "protected function form()\n {\n $form = new Form(new Purchase());\n if ($form->isCreating()) {\n $form->select('consumer_id', \"客户\")->options(Consumer::all()->pluck('full_name', 'id'))->required();\n $form->select('house_id', \"购买房源\")->options(House::purchasable()->pluck('readable_name', 'id'))->required();\n }\n $form->datetime('started_at', \"生效日期\");\n $form->datetime('ended_at', \"结束日期\");\n $form->select('sell_type', \"出售方式\")->options(Purchase::$type)->required();\n $form->currency('price', \"成交价格\")->symbol('¥')->required();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Drug);\n\n $form->text('street_name', '«Уличное» название');\n $form->text('city', 'Город');\n $form->text('active_substance', 'Активное вещество');\n $form->text('symbol', 'Символ');\n $form->text('state', 'Состояние');\n $form->text('color', 'Цвет');\n $form->text('inscription', 'Надпись');\n $form->text('shape', 'Форма');\n $form->text('weight', 'Вес таблетки');\n $form->text('weight_active', 'Вес действующего вещества');\n $form->text('description', 'Описание');\n $form->text('negative_effect', 'Негативный эффект');\n $form->switch('confirm', 'Подтверждение');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Room);\n\n if ($form->isEditing())\n $form->display('id', 'ID');\n\n $form->text('name', 'Nama');\n $form->select('room_type_id', 'Tipe Ruangan')->options(function ($id) {\n return RoomType::all()->pluck('name', 'id');\n });\n $form->slider('max_people', 'Maksimal Orang')->options([\n 'min' => 1,\n 'max' => 100,\n 'from' => 20,\n 'postfix' => ' orang'\n ]);\n $form->radio('status', 'Status')->options(RoomStatus::asSelectArray())->stacked();\n $form->textarea('notes', 'Catatan');\n\n if ($form->isEditing()) {\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n }\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->text('name', __('Name'));\n $form->email('email', __('Email'));\n $form->datetime('email_verified_at', __('Email verified at'))->default(date('Y-m-d H:i:s'));\n $form->password('password', __('Password'));\n $form->text('remember_token', __('Remember token'));\n $form->decimal('point', __('Point'))->default(0.000);\n $form->switch('status', __('field.status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WechatEvent);\n\n $form->text('title', '事件标题')->help('起说明性作用');\n $form->text('key', 'Key')->default(md5(time()));\n $form->select('event', '事件类型')->options(WechatEvent::EVENTLIST);\n $form->text('method', '执行方法')->help('namespace\\\\class@method');\n $form->select('wechat_message_id', '消息')->options(WechatMessage::select('id', 'title')->pluck('title', 'id'));\n\n return $form;\n }", "public function builder()\n {\n return new Builder($this);\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "public function getBuilder();", "protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n\n $form = new Form(new Goods);\n\n //分类树形\n $cateTree = getTree(Category::all()->where('is_show',1)->toArray());\n $cate_map = [];\n foreach ($cateTree as $key => $value) {\n $cate_map[$value['id']] = str_repeat('&#12288;&#12288;',$value['level']).$value['title'];\n }\n\n $form->display('id', 'ID');\n $form->select('cate_id', '分类')->rules('required')->options($cate_map);\n $form->text('name', '商品')->rules('required')->attribute(['autocomplete' => 'off']);\n $form->textarea('remark', '备注');\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('is_valid',trans('admin.is_show'))->states($states)->default(1);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->hidden('operated_admin_id')->value(Admin::user()->id);\n $form->hidden('hos_id')->value(session('hos_id'));\n\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Posts);\n\n $form->text('title', 'Title');\n $form->text('content', 'Content');\n $form->text('video_url', 'Video url');\n $form->switch('status', '审核状态')->states( [ \n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'primary'],\n 'on' => ['value' => 1, 'text' => '通过', 'color' => 'default']\n ]);\n $form->number('content_type', 'Content type');\n $form->number('member_id', 'Member id');\n return $form;\n }" ]
[ "0.7879594", "0.7565762", "0.75185436", "0.73564214", "0.7287918", "0.7232044", "0.7194646", "0.71785986", "0.7157999", "0.7133095", "0.7074416", "0.7062337", "0.7057251", "0.70530677", "0.7030334", "0.7013398", "0.7013392", "0.700392", "0.6994234", "0.6989912", "0.69835144", "0.69762033", "0.6969788", "0.69647014", "0.6960803", "0.6935731", "0.6933645", "0.693018", "0.6929853", "0.6922171", "0.6899249", "0.6898999", "0.6896955", "0.6884745", "0.6883799", "0.68799394", "0.68773663", "0.6858968", "0.68572146", "0.6849476", "0.68494356", "0.68457323", "0.683979", "0.6838948", "0.68381685", "0.6837478", "0.68369275", "0.6835372", "0.6829178", "0.6829178", "0.6827735", "0.6824148", "0.6814151", "0.6814151", "0.68126297", "0.68100345", "0.6799133", "0.6796184", "0.6796183", "0.679273", "0.6789645", "0.67891073", "0.67802215", "0.6777215", "0.67713845", "0.67656654", "0.67652607", "0.6762471", "0.6762306", "0.6757059", "0.67485", "0.6748214", "0.67443055", "0.67347735", "0.67322046", "0.6728608", "0.67255265", "0.67190623", "0.6717706", "0.6717264", "0.6716446", "0.6714048", "0.67092955", "0.67060614", "0.67057306", "0.66996336", "0.66883796", "0.66845274", "0.66823155", "0.6681058", "0.66770256", "0.6673304", "0.66728455", "0.6672371", "0.6667153", "0.66663986", "0.66527224", "0.66501147", "0.6644649", "0.66419464", "0.6638926" ]
0.0
-1
Get All Data from this method.
public function __construct() { //load database in autoload libraries parent::__construct(); $this->load->model('DashboardModal'); if(!$this->session->userdata('id')) { redirect('login'); } $this->load->helper('url', 'form'); $this->load->library('form_validation'); $this->load->library('form_validation'); $this->load->library('upload'); $this->load->model('ImageModel'); $this->load->library('session'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function all () {\n return $this -> data;\n }", "public function getAllData() {\n\t\treturn $this->data;\n\t}", "public function get_all_data()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getAllData() {\n\t\treturn $this->_data;\n\t}", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "public function all() {\n return $this->_data;\n }", "public function all()\n {\n return $this->data;\n }", "public function all()\n {\n return $this->data;\n }", "public function all()\n {\n return $this->data;\n }", "public function all() {\n\t\treturn $this->data;\n\t}", "public function getAll()\n {\n return $this->data;\n }", "public function getAll()\n {\n return $this->data;\n }", "public function getAll() {\n return $this->data;\n }", "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "function getAll(){\r\n \treturn $this->data;\r\n }", "public function getAll() {\n\t\treturn $this->data;\n\t}", "function &getAllData() {\n\t\treturn $this->_data;\n\t}", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function getAll()\n {\n if (!isset($this->data)) {\n $this->init();\n }\n\n return $this->data;\n }", "public function getAll()\n\t{\n\t\treturn $this->data;\n\t}", "public function getAllData() {\n $allData = parent::getAllData();\n $this->stream->close();\n return $allData;\n }", "public function getAllData()\n {\n // dd($this->student);\n return $this->student->getAllData();\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function readAll( ) {\n\n\t\treturn $this->_data;\n\t}", "public final function get_all()\n {\n }", "public function getData()\n {\n }", "public function getAll()\n {\n return $this->prepareData($this->model->all());\n }", "protected function getAll() {}", "public function getAll()\n {\n return $this->get();\n }", "public function getAll()\n {\n }", "public function getData()\r\n {\r\n }", "public function getData()\n {\n if ($this->today == $this->first_day) {\n $data = $this->getAllData();\n }\n\n if (!empty($data)) {\n foreach ($data as $datum) {\n $this->handleData($datum);\n }\n }\n\n }", "public function data()\n\t{\n\t\t$query = $this->query;\n\t\t$query['limit'] = $this->per_page;\n\t\t$query['offset'] = ($this->get_cur_page() - 1) * $this->per_page;\n\t\treturn $this->model->all($query);\n\t}", "public function get_data();", "public function getAll()\n {\n return $this->jsonToArray($this->applyEncode($this->download()));\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function all()\n {\n // set the url\n $url = self::$apiUrl . self::$servicePoint;\n\n // get a raw response\n self::$rawData = self::apiCall($url, '', array('headers' => array('Accept: ' . self::$httpAccept), 'options' => $this->getOptions()));\n\n // decode it and set php native rough data....\n if (self::$httpAccept == 'application/xml') {\n self::$data = simplexml_load_string(self::$rawData);\n } elseif (self::$httpAccept == 'application/json') {\n self::$data = json_decode(self::$rawData);\n }\n\n $data = self::getData();\n\n if (is_object($data) && property_exists($data, 'context')) {\n $context = (array)$data->context;\n } else {\n $context = null;\n }\n\n $model = self::$model;\n $class = 'MIMAS\\\\Service\\Jorum\\\\' . strtoupper(substr($model, 0, 1)) . substr($model, 1);\n\n $data = array();\n\n foreach (self::getData()->$model as $i => $object) {\n $data[] = new $class((array)$object);\n }\n\n $ret = new \\MIMAS\\Service\\DataCollection($data, $context);\n\n return ($ret);\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function getAll()\n {\n return parent::getAll();\n }", "public function get_all_data()\n\t{\n\treturn $this->cal;\n\t}", "private function getData()\n {\n if (!$this->dataLoaded) {\n $this->refreshData();\n $this->dataLoaded = true;\n }\n }", "public function getAll() {\n $this->loadData(EBlazonDataType::ALL);\n return $this->data;\n }", "public function getAll()\n {\n return $this->_info;\n\n }", "protected function getData()\n {\n return [];\n }", "public function getData()\n {\n // TODO: Implement getData() method.\n }", "public function getData()\n {\n // TODO: Implement getData() method.\n }", "public function getAllData()\n {\n $result = array();\n\n foreach ($this->list as $item)\n $result[] = $item->getAllData();\n\n return $result;\n }", "public abstract function getAll();", "public function getAll()\n {\n return $this->all;\n }", "protected function getData() { }", "public function getDatas()\n {\n return $this->datas;\n }", "protected function obtainData()\n\t{\n\t\t$this->obtainDataReferences();\n\t\t$this->obtainDataOrders();\n\t}", "public function getData()\n {\n $data = parent::getData();\n\n return $data;\n }", "public function getDataList(){\n return $this->_get(1);\n }", "public function get_data()\n {\n\n\n }", "public function getData() {}", "public function get()\n {\n return self::fetchAll();\n }", "public function collectAllData()\n {\n $this->collectPlusCode();\n $this->collectGeographyData();\n $this->collectAddressData();\n\n return $this;\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "function &getData()\r\n\t{\r\n\r\n\t\tif ($this->_loadData())\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telse $this->_initData();\r\n\r\n\t\treturn $this->_data;\r\n\t}", "protected static function getData()\n {\n }", "protected static function getAll()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public function getData()\n {\n }", "public static function getAll() {}", "public function all(){\n return $this;\n }", "protected function getAllData() : array\n {\n if (method_exists($this, 'withOtherData'))\n {\n $this->otherData += $this->withOtherData();\n }\n\n return $this->otherData;\n }", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "public function getAll()\n\t{\n\t\treturn $this->all;\n\t}", "function get_data() {\r\n return $this->data;\r\n }", "public function get_data() {\r\n return $this->data;\r\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();" ]
[ "0.85840416", "0.84294516", "0.8429239", "0.8336666", "0.83070374", "0.8305469", "0.8240841", "0.8240841", "0.8240841", "0.8224393", "0.82223606", "0.82223606", "0.82218486", "0.8201272", "0.81959414", "0.8194866", "0.818217", "0.8144788", "0.8144788", "0.8144788", "0.8128181", "0.8121695", "0.77261114", "0.7705523", "0.76836187", "0.76836187", "0.76836187", "0.7682333", "0.7600349", "0.7550375", "0.75154763", "0.74805444", "0.74801403", "0.747687", "0.74641937", "0.74520963", "0.74209857", "0.7402947", "0.7400904", "0.73821855", "0.73814976", "0.73517734", "0.73253167", "0.73253167", "0.73253167", "0.7324874", "0.7324874", "0.73104644", "0.729626", "0.729626", "0.729626", "0.729626", "0.7291535", "0.7288136", "0.7281981", "0.7272038", "0.7247821", "0.7245419", "0.7245419", "0.7225632", "0.72236913", "0.72221655", "0.72186184", "0.72182924", "0.7172734", "0.7168577", "0.7160061", "0.7141708", "0.71376985", "0.71274644", "0.7125313", "0.7124911", "0.7124911", "0.7124911", "0.7124911", "0.7124911", "0.7124911", "0.7124911", "0.7124911", "0.7124489", "0.71236527", "0.71076554", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.7098097", "0.70885503", "0.70832705", "0.70794153", "0.7079214", "0.7076937", "0.70768684", "0.7056453", "0.7054928", "0.7054928", "0.7054928" ]
0.0
-1
Store Data from this method.
public function store() { $products=new DashboardModal;; $products->insert_product(); redirect(base_url('LoginDashboard')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t {\n\t //\n\t }", "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\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store(){\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.78831536", "0.7853703", "0.7706655", "0.7706655", "0.7706655", "0.7704193", "0.7704193", "0.7704193", "0.7616251", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007", "0.76076007" ]
0.0
-1
Edit Data from this method.
public function edit($id) { $product = $this->db->get_where('codeigniter_register', array('id' => $id))->row(); $this->load->view('includes/header'); $this->load->view('dashboard/edit',array('product'=>$product)); $this->load->view('includes/footer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function updateData();", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n {\n \n }", "public function edit()\n\t{\n\t\t//\n\t}", "protected function editar()\n {\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n {\n \n \n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit() {\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function modifyVegData()\n\t{\n\t\tif('A' != $this->Session->read('UserType'))\n\t\t{\n\t\t\t$this->Session->setFlash(__('You do not have permissions to access this page !'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->VegSample->recursive = 0;\n\t\t\t$startDate = $this->request->params['pass']['0'];\n\t\t\t$endDate = $this->request->params['pass']['1'];\n\t\t\t$this->set('VegSample', $this->VegSample->getVegData($startDate,$endDate));\n\t\t\t$this->set('startDate', $startDate);\n\t\t\t$this->set('endDate',$endDate);\n\t\t}\n\t}", "protected function update() {}", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit(ScrapeData $scrapeData)\n {\n //\n }", "public function edit($data)\n {\n $this->pagamento = $data['pagamento'];\n $this->sconto = $data['sconto'];\n $this->save();\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function Update($data) {\n\n }", "public function editar()\n {\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "public function edit() {\n\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function edit()\n { \n }", "public function update($data) {}", "public function update($data) {}", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "public function update_with($new_data)\n {\n }", "public function edit()\n { }", "public function setData($data) { \n $this->data = $data; \n }", "public function edit(ProData $proData)\n {\n //\n }", "public function edit($data) \n \t\t{\n \t\t#update data\n \t\t$this->db->update('table_post', $data, array('post_id' => $data['post_id']));\n \t\t}", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function updateMultiple_data()\n {\n \n }", "public function editData() {\n $this->daftar_barang = array_values($this->daftar_barang);\n $data_barang = json_encode($this->daftar_barang, JSON_PRETTY_PRINT);\n file_put_contents($this->file, $data_barang);\n $this->ambilData();\n }", "public function setData($data)\r\n {\r\n }", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function update()\r\n {\r\n \r\n }", "protected function _update()\n\t{\n\t}", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "public function update()\n {\n return $this->edit();\n }", "public function edit($data){\n\t\t$this->db->where('id_pinjam',$data['id_pinjam']);\n\t\t$this->db->update('pinjam_uang', $data);\n\n\t}", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function data(){\n\t\t$get_data = json_decode($_GET['data']);\n\t\t//update db\n\t\tforeach($get_data as $key=>$value){\n\t\t\t$data = array(\n\t\t\t\t'slide_order'=>$key+1,\n\t\t\t);\n\t\t\t$this->slide_model->update($value->id,$data);\n\t\t}\n\t}", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function edit() {\n $sticky = Sticky::find(Input::get('id'));\n $sticky->sitck_data = Input::get('data');\n $sticky->save();\n exit;\n }", "public function update() {\r\n\r\n\t}", "public function edit_toko(){\n\t}", "public function editar()\n {\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t$this->editar_post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->editar_get();\n\t\t}\n }", "public function update()\r\n {\r\n //\r\n }", "public function updating()\n {\n # code...\n }", "public function edit() {\r\n\t\treturn $this->_edit(false);\r\n\t}", "public function update()\n {\n }", "private function setData($data)\n {\n \t$this->data = $data;\n }", "function a_edit() {\n\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t$u=new Gestionnaire($id);\n\t\textract($u->data);\t\n\t\trequire $this->gabarit;\n\t}", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "function edit(){\n $this->connect(); // open connection\n $this->disconnect(); // close connection\n }", "public function edit($obj) {\n\t}", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function setData($data)\n {\n $this->_data = $data;\n }", "public function edit() {\n\t\t\n\t\t$data = array(\n\t\t\t'user_id' => $this->_user_id,\n\t\t\t'date' => $this->_date,\n\t\t\t'time_of_day' => $this->_time_of_day,\n\t\t\t'type_id' => $this->_type_id,\n\t\t\t'route_id' => $this->_route_id,\n\t\t\t'distance' => $this->_distance,\n\t\t\t'time' => $this->_time,\n\t\t\t'shoe_id' => $this->_shoe_id,\n\t\t\t'quality' => $this->_quality,\n\t\t\t'effort' => $this->_effort,\n\t\t\t'weather_ids' => $this->_weather_ids,\n\t\t\t'temperature' => $this->_temperature,\n\t\t\t'notes' => $this->_notes,\n\t\t\t'field' => $this->_field,\n\t\t\t'placement' => $this->_placement,\n\t\t\t'group_min_age' => $this->_group_min_age,\n\t\t\t'group_max_age' => $this->_group_max_age,\n\t\t\t'group_age_size' => $this->_group_age_size,\n\t\t\t'group_age_placement' => $this->_group_age_placement,\n\t\t\t'group_gender_size' => $this->_group_gender_size,\n\t\t\t'group_gender_placement' => $this->_group_gender_placement,\n\t\t\t'active' => $this->_active\t\t\t\n\t\t);\n\t\t$this->db->where('id',$this->_id);\n\t\t$this->db->update($this->_table,$data);\n\t\t\n\t\treturn true;\n\t}", "public function form()\n {\n $this->setData();\n }", "public function dataAction() {\n parent::dataAction();\n }", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "public function edit()\n {\n\t$this->log(\"edit function\");\n\n \t// Check whether client is logged in\n // $logged_in = false;\n // if ($this->isLoggedIn()) {\n // $logged_in = true;\n // }\n\n // Get custom fields from Client controller => save\n \t$client_custom_fields = $this->Clients->getCustomFieldValues(1);\n return $this->set('client_custom_fields', $client_custom_fields);\n }" ]
[ "0.72822595", "0.71372586", "0.6881146", "0.6873769", "0.6872038", "0.6818677", "0.67760456", "0.67701715", "0.67240393", "0.67240393", "0.67240393", "0.6721128", "0.67084634", "0.67084634", "0.6629793", "0.6628123", "0.6626255", "0.6626255", "0.6626255", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6600118", "0.6593495", "0.6591925", "0.65833545", "0.6580371", "0.65752405", "0.6563768", "0.65617245", "0.6515204", "0.6515204", "0.6515204", "0.6515204", "0.64973736", "0.64912915", "0.6490598", "0.6490598", "0.6479535", "0.6479535", "0.6479535", "0.6466851", "0.64549667", "0.64549667", "0.64528996", "0.6403627", "0.63989854", "0.638253", "0.63732177", "0.6356834", "0.632841", "0.632841", "0.632841", "0.632841", "0.6292661", "0.62820643", "0.62801605", "0.6279163", "0.62703395", "0.6213023", "0.6207894", "0.6207894", "0.6207894", "0.6207894", "0.6207894", "0.6206519", "0.6206386", "0.6193277", "0.61796147", "0.6175225", "0.61550343", "0.61487436", "0.61447734", "0.61338973", "0.61304647", "0.61168224", "0.60975164", "0.60916376", "0.6085328", "0.6075369", "0.6069597", "0.6067689", "0.6063347", "0.6063347", "0.6057808", "0.6041684", "0.60384154", "0.60360307", "0.6030162", "0.60231656", "0.60140663", "0.60094774", "0.60087353" ]
0.0
-1
Update Data from this method.
public function update($id) { $products=new DashboardModal;; $products->update_product($id); redirect(base_url('LoginDashboard')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function updateData();", "protected function update() {}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update()\r\n {\r\n \r\n }", "public function update()\n {\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\r\n\r\n\t}", "public function update() {\n \n }", "public function update() {\r\n\t\t$this->getMapper()->update($this);\r\n\t}", "protected function _update()\n\t{\n\t}", "public function update() {\r\n }", "public function update($data) {}", "public function update($data) {}", "public function update()\r\n {\r\n //\r\n }", "public function update() {\n parent::update();\n }", "public function updateMultiple_data()\n {\n \n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function Update($data) {\n\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "public abstract function update();", "function update() {\n\n\t\t\t}", "protected function performUpdate() {}", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "abstract public function update();", "abstract public function update();", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n\t{\n\n\t}", "public function update() {\n\t\tTournamentDBClient::update($this);\n\t}", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function updating()\n {\n # code...\n }", "public function update () {\n\n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "abstract protected function update ();", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function update_with($new_data)\n {\n }", "public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }", "public function update() {\n\t\treturn;\n\t}", "public function update();", "public function update();", "public function update();", "public function update();", "public function update(){\n\n }", "public function update(){\n\n }", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function updateTweetsData() \n {\n $tweets = Tweet::all();\n if ($tweets->count()) {\n foreach ($tweets as $tweet) {\n $tweetData = $this->getTweetDataFromApi($tweet->tweet_id);\n $attributes = $this->prepareAttributes($tweetData);\n $tweet->update($attributes);\n }\n }\t\n }", "public function update()\n {\n # code...\n }", "public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }", "public static function update(){\n }", "public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }", "abstract function update();", "public function updateData()\n {\n return ([\n [\"2\", \"9898989898\", \"pune\", 302, \"manager-records\"]\n ]);\n }", "public function updateData(){\n try{\n $this->dbConnection->query($this->query);\n $this->message = $this->moduleName.' Successfully Updated';\n $this->data = array();\n $this->data['id'] = $this->dbConnection->lastInsertId();\n $this->sendJSONResponse();\n \n }catch( PDOException $ex ) {\n $this->message = 'Error storing '.$this->moduleName.' :'. $ex->getMessage();\n $this->sendJSONErrorReponse();\n }\n }", "public function refresh() {\n \tif( $this->fetchData ) {\n \t\t\n \t\t// send data to view\n \t\t$this->set(array(\n \t\t\t'data' => $this->Reading->find('all'),\n \t\t\t'_serialize', array('data')));\n \t}\n\n }", "public function update_data()\n {\n $token = $this->getAuthHeader();\n $data = $this->request->getJSON();\n\n //get data from token\n $result = $this->_checkToken( $token );\n\n if ( !isset( $result ) ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->db->error()['message'];\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, TOKEN_NOT_FOUND );\n }\n\n if ( $data->id == '-1' ) {\n unset($data->id);\n $data->active_flag = true;\n $data->create_date = date( DATE_FORMAT_YMDHMS );\n $data->create_user = $result->user_id;\n } else {\n $data->active_flag = true;\n $data->update_date = date( DATE_FORMAT_YMDHMS );\n $data->update_user = $result->user_id;\n }\n\n $my_date = explode(\"/\",$data->exam_date);\n\n if ( count($my_date) == 3 ) {\n $data->exam_date = $my_date[2].\"-\".$my_date[1].\"-\".$my_date[0];\n }\n $data->question_12 = ($this->calculateBMI($data->weight,$data->height) < 18.5) ? 1 : 0;\n $data->living_status = $this->getLivingStatus($data);\n $data->hypokinesia = $this->getHypokinesia($data);\n $data->decreased_nutrition = $this->getDecreasedNutrition($data);\n $data->deterioration_mouth = $this->getDeteriorationMouth($data);\n $data->withdrawal = $this->getWithdrawal($data);\n $data->forget = $this->getForget($data);\n $data->depression = $this->getDepression($data);\n $data->total_score = $this->getTotalScore($data);\n $data->frailty_judgment = $this->getFrailtyJudgment($data->total_score);\n\n $this->db->transStart();\n if ( $this->prgExaminersFraAModel->save($data) === false ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->prgExaminersFraAModel->errors();\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, HTML_STATUS_DB_ERROR );\n }\n\n $this->db->transComplete();\n\n $dataDB['status'] = \"success\";\n $dataDB['message'] = \"\";\n $dataDB['data'] = $data;\n\n return $this->respond( $dataDB, HTML_STATUS_SUCCESS );\n }", "public static function update(){\r\n }", "protected function update(){\n\t\t$this->aggregations = array();\n\t\t\n\t\t// also update any groups\n\t\tforeach($this->getGroups() as $group){\n\t\t\t$group->update();\n\t\t}\n\t}", "public function data(){\n\t\t$get_data = json_decode($_GET['data']);\n\t\t//update db\n\t\tforeach($get_data as $key=>$value){\n\t\t\t$data = array(\n\t\t\t\t'slide_order'=>$key+1,\n\t\t\t);\n\t\t\t$this->slide_model->update($value->id,$data);\n\t\t}\n\t}", "protected function _update(array $data)\n {\n return parent::_update($data);\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "public function update(){\n parent::update();\n $this->collection = null;\n $this->files = null;\n $this->dublinCore = null;\n }", "public function updateData(array $data);", "public function updateData( ){\n\t\t$fnName = \"getId\";\n\t\t$_id = -1;\n\t\t$result = -1;\n\t\t\n\t\tforeach(get_class_methods( $this ) as $id => $vl){\n\t\t\tif( strtolower( $vl ) == strtolower( $fnName ) ){\n\t\t\t\t$_id = $this->$fnName();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!is_numeric($_id)){\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t\tif( $_id > 0 ){\n\t\t\t$_nombre = get_class( $this ) ;\n\t\t\t$valores = array();\n\t\n\t\t\t$stmt = null;\n\t\t\t$query = \"SELECT * FROM \" . strtolower( $_nombre ) . \" limit 1\";\n\t\t\tif ($stmt = self::$lnk->prepare($query)) {\n\t\t\t\t$meta = $stmt->result_metadata();\n\t\t\t\twhile ($field = $meta->fetch_field()) {\n\t\t\t\t\t$nmF = $field->name;\n\t\t\t\t\tif( strtolower( $nmF ) != \"id\" ){\n\t\t\t\t\t\t$tmpVl = $this->{ \"get\" . Singleton::toCap( $nmF )}( );\n\t\t\t\t\t\tif( strlen( $tmpVl ) > 0 ){\n\t\t\t\t\t\t\t$valores[ $nmF ] = $tmpVl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$valores[\"id\"] = $_id;\t// Se agrega el valor del id como último valor\n\t\t\t\t$stmt->close();\n\t\t\t}else {\n\t \t$this->mensaje_error = self::$lnk->error;\n\t\t\t\treturn $result; \n\t }\n\t\t\t\n\t if( sizeof( $valores ) > 0 ){\t \n\t\t\t\t$stmt = null;\n\t\t\n\t\t\t\t$keys = array();\n\t\t\t\t$values = array();\t\t\t\t\n\t\t\t\tforeach($valores as $k => $v) {\n\t\t\t\t\tif( $k != \"id\" ){\n\t\t\t\t\t\t$keys[] = $k . \"=?\";\n\t\t\t\t\t}\n\t\t\t\t\t$values[] = !empty($v) ? $v : null;\n\t\t\t\t}\n\t\t\t\t$query = 'UPDATE ' . strtolower( $_nombre ) . ' SET ' . implode(', ', $keys) . ' where id = ? ';\n\t\t\t\t$stmt = self::$lnk->prepare($query);\n\t\t\t\t\n\t\t\t\tif( $stmt === false ){\n\t\t\t\t\t$this->mensaje_error = self::$lnk->error;\n\t\t\t\t\treturn $result;\n\t\t\t\t}else{\n\t\t\t\t\t$params = array();\n\t\t\t\t\tforeach ($valores as &$value) {\n\t\t\t\t\t\t$params[] = &$value;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$types = array(str_repeat('s', count($params)-1) . \"i\"); \n\t\t\t\t\t$values = array_merge($types, $params);\n\t\t\t\t\t\n\t\t\t\t\tcall_user_func_array(array($stmt, 'bind_param'), $values);\n\t\t\t\t\t$success = $stmt->execute();\n\t\t\t\t\tif (!$success) {\n\t\t\t \t$this->mensaje_error = self::$lnk->error;\n\t\t\t \t$stmt->close();\n\t\t\t\t\t\treturn $result; \n\t\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $stmt->affected_rows;\n\t\t $stmt->close();\n\t\t \n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "public function update( $data )\n {\n foreach ( $data as $key => $value )\n {\n $this->{$key} = $value;\n }\n return $this->save();\n }", "public function update($data)\n {\n\n// $this->node->getF\n }", "public function update()\n {\n $ipodates = $this->fetchList();\n foreach ($ipodates as $key => $ipo) {\n $this->updateIPO($ipo[0], $ipo[1]);\n }\n }", "protected function update()\n {\n $this->preUpdate();\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->update($this->id, $this->data)[static::$api_name];\n } else {\n $this->data = $this->api->update($this->id, $this->data)[static::$api_name];\n }\n $this->postUpdate();\n\n return $this;\n }", "protected function _updatefields() {}", "protected function updateObject()\n {\n $gatewayData = $this->encodeDataToJson();\n\n $query = $this->db->getQuery(true);\n\n $query\n ->update($this->db->quoteName(\"#__crowdf_intentions\"))\n ->set($this->db->quoteName(\"user_id\") . \"=\" . $this->db->quote($this->user_id))\n ->set($this->db->quoteName(\"project_id\") . \"=\" . $this->db->quote($this->project_id))\n ->set($this->db->quoteName(\"reward_id\") . \"=\" . $this->db->quote($this->reward_id))\n ->set($this->db->quoteName(\"unique_key\") . \"=\" . $this->db->quote($this->unique_key))\n ->set($this->db->quoteName(\"gateway\") . \"=\" . $this->db->quote($this->gateway))\n ->set($this->db->quoteName(\"gateway_data\") . \"=\" . $this->db->quote($gatewayData))\n ->set($this->db->quoteName(\"auser_id\") . \"=\" . $this->db->quote($this->auser_id))\n ->set($this->db->quoteName(\"session_id\") . \"=\" . $this->db->quote($this->session_id))\n ->where($this->db->quoteName(\"id\") .\"=\". (int)$this->id);\n\n $this->db->setQuery($query);\n $this->db->execute();\n }", "protected function rewriteData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$fields = array('someval_facebook_valid', 'someval_facebook_type', 'someval_facebook_friends_or_likes',\n\t\t\t\t\t\t'someval_twitter_valid', 'someval_twitter_tweets', 'someval_twitter_followers', 'someval_twitter_following');\n\n\t\tforeach ($this->aData AS &$elm)\n\t\t{\n\t\t\t$query = $db->getQuery(true);\n\n\t\t\t$query->update($db->qn('#__accountdata'))\n\t\t\t\t\t->where('bid = ' . $elm->bid);\n\n\t\t\tforeach ($fields as $f)\n\t\t\t{\n\t\t\t\t$query->set($db->qn($f) . ' = ' . $db->q($elm->$f));\n\t\t\t}\n\n\t\t\t$db->setQuery($query);\n\n\t\t\tif (!$db->execute())\n\t\t\t{\n\t\t\t\tLog::add('Something went wrong for bid=:' . $elm->bid);\n\t\t\t}\n\t\t}\n\t}", "public function testUpdateServiceData()\n {\n\n }", "abstract protected function updateResponse(Model $data);", "abstract protected function updateModel();", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "private function getData()\n {\n if (!$this->dataLoaded) {\n $this->refreshData();\n $this->dataLoaded = true;\n }\n }", "public static function update_data()\n {\n \t$data = \\Request::only(self::expected_input('update'));\n\n \t\n \t$image_list = ['featured_image','image1','image2','image3','image4','image5','image6','business_logo'];\n\n \t// loop through and upload \n \tforeach($image_list as $image_file):\n\n\t\t\t\tif(\\Request::hasFile($image_file))\n\t\t \t{\n\t\t \t\t$upload_folder = 'uploads/images/'.date(\"Y/m\");\n\t\t \t\t\n\t\t\t $extension = \\Request::file($image_file)->extension();\n\t\t\t $new_name = str_slug($image_file.'-'.$data['title'].microtime().rand(111,666));\n\n\t\t\t $full_file_name = \"$new_name.$extension\";\n\n\t\t\t $data[$image_file] = \\Request::file($image_file)->storeAs($upload_folder,$full_file_name,'uploads');\n\t\t \t}\n\n \tendforeach;\n\n \t$open_hours = ['monday','tuesday','wednesday','thursday','friday','saturday','sunday'];\n\n \t// loop through and upload \n \tforeach($open_hours as $weekday):\n\n\t\t\t\tif(strlen(\\Request::input($weekday.'_open_time')) > 4 )\n\t\t \t{\n\t\t \t\t$data[$weekday.'_status'] = 'open' ;\n\t\t \t}\n\n \tendforeach;\n \t\n \t$data['last_update_time'] = time();\n\n\n\n \treturn \\DB::table('9jb_listings')->where('id',$data['id']) \n\t\t\t\t\t\t\t\t\t\t\t->update($data);\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}", "private function internalUpdate()\n {\n $param = array();\n\n // Run before update methods and stop here if the return bool false\n if ($this->runBefore('update') === false)\n return false;\n\n // Define fieldlist array\n $fieldlist = array();\n\n // Build updatefields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n $val = $this->checkFieldvalue($fld, $val);\n $type = $val == 'NULL' ? 'raw' : $this->getFieldtype($fld);\n\n $fieldlist[] = $this->alias . '.' . $fld . '={' . $type . ':' . $fld . '}';\n $param[$fld] = $val;\n }\n\n // Create filter\n $filter = ' WHERE ' . $this->alias . '.' . $this->pk . '={' . $this->getFieldtype($this->pk) . ':' . $this->pk . '}';\n\n // Even if the pk value is present in data, we set this param manually to prevent errors\n $param[$this->pk] = $this->data->{$this->pk};\n\n // Build fieldlist\n $fieldlist = implode(', ', $fieldlist);\n\n // Create complete sql string\n $sql = \"UPDATE {db_prefix}{$this->tbl} AS {$this->alias} SET {$fieldlist}{$filter}\";\n\n // Run query\n $this->db->query($sql, $param);\n\n // Run after update event methods\n if ($this->runAfter('update') === false)\n return false;\n }" ]
[ "0.8132871", "0.7496503", "0.7255103", "0.7255103", "0.6973369", "0.69371736", "0.6861455", "0.68517387", "0.68387526", "0.6798161", "0.67917156", "0.67531496", "0.67020714", "0.67020714", "0.6683915", "0.66772294", "0.6671383", "0.6658202", "0.6658202", "0.66477835", "0.66397065", "0.6599411", "0.6574186", "0.65734154", "0.6562351", "0.6562351", "0.6536592", "0.6536592", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.65294594", "0.6519401", "0.6498053", "0.64772046", "0.64772046", "0.64617515", "0.6451117", "0.6446288", "0.64443785", "0.64443785", "0.64443785", "0.64443785", "0.64431757", "0.6380454", "0.637898", "0.6363964", "0.63184726", "0.62877905", "0.6286831", "0.6286831", "0.6286831", "0.6286831", "0.6284476", "0.6284476", "0.6267042", "0.6254904", "0.62522286", "0.6247732", "0.6222853", "0.6220083", "0.62135375", "0.62024236", "0.61937296", "0.61902195", "0.6170947", "0.617008", "0.6145689", "0.6143769", "0.6142901", "0.61400265", "0.61399895", "0.61319476", "0.6117398", "0.61118865", "0.61046904", "0.60746425", "0.60714316", "0.6065054", "0.6048966", "0.6028018", "0.60227007", "0.59850174", "0.5983322", "0.5976265", "0.5975701", "0.5975701", "0.5975701", "0.597458", "0.5972559", "0.59692633", "0.5947069", "0.59467465" ]
0.0
-1
Delete Data from this method.
public function delete($id) { $this->db->where('id', $id); $this->db->delete('codeigniter_register'); redirect(base_url('codeigniter_register')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function delete($data)\n {\n }", "public function delete($data)\n {\n }", "public function clearData() {\n unset($this->data);\n }", "public final function delete() {\n }", "public function destroy(Data $data)\n {\n //\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete() {\r\n }", "public function DELETE() {\n #\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "protected function delete() {\n\t}", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "private function clearData()\n {\n $this->_data=array();\n }", "public function deleting()\n {\n # code...\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function delete()\n {\n \n }", "public static function delete() {\n\n\n\t\t}", "public function delete()\n {\n //\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function del()\n {\n }", "public function delete()\n {\n return;\n }", "public function delete()\r\n\t{\r\n\t}", "public function delete_data_to_tombstone(){\n }", "function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function remove_all_data()\n\t{\n\t\t$this->_data = array();\n\t}", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function delete()\n {\n \n }", "public function __destruct()\n {\n unset($this->data);\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete()\n\t{\n\t}", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "protected function setDeleteData()\n\t{\n\n\t}", "public function delete()\n {\n\n }", "public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function delete() {\n\n }", "public function clear()\n {\n $this->data = [];\n }", "public function clear() {\n $this->_data = [];\n }", "public function deleting(Dataset $dataset)\n {\n //\n }", "public function clear()\n {\n $this->_data = [];\n }", "public function delete(){\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function flushData()\n\t{\n\t\t$class = get_class($this);\n\t\tunset($this->_data[$class]);\n\t}", "public function delete($data)\n {\n return $this->em->getRepository($this->repository)->delete($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 deleteData($name) {\n if (isset($this->data[$name])) {\n unset($this->data[$name]);\n }\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }", "public function deleteDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n $contents = $contentService->contentsDelete($filter);\n $this->view->data = $contents;\n }", "function delete() {\n\t\treturn $this->destroy();\n\n\t}", "public static function delete() {\r\n\t\t\r\n\t}", "public function deleted() {\n // TODO Implement this\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public abstract function delete();", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function delete() {\n Gallery3_Helper::request(\"delete\", $this->url, $this->token);\n $this->data = array();\n $this->url = null;\n return $this;\n }", "public function deleteData($sql, $params=[]){\n $this->create($sql,$params);\n\n }", "public function delete()\n {\n $content = $this->get();\n\n foreach ($content as $key=>$value)\n {\n $this->set($key, null);\n }\n\n return $this->save();\n }", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}", "protected function _delete()\n\t{\n\t}", "public static function delete(){\r\n }", "function Delete()\n\t{\n\t\tglobal $dal_info;\n\t\t\n\t\t$deleteFields = \"\";\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\t\t//\tprepare parameters\t\t\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\tif( isset($this->{$fld['varname']}) )\n\t\t\t{\n\t\t\t\t$this->Param[ $fieldname ] = $this->{$fld['varname']};\n\t\t\t}\n\t\t\t\n\t\t\tforeach($this->Param as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$deleteFields.= $this->_connection->addFieldWrappers( $fieldname ).\"=\". $this->PrepareValue($value, $fld[\"type\"]) . \" and \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//\tdo delete\n\t\tif ($deleteFields)\n\t\t{\n\t\t\t$deleteFields = substr($deleteFields, 0, -5);\n\t\t\t$dalSQL = \"delete from \".$this->_connection->addTableWrappers( $this->m_TableName ).\" where \".$deleteFields;\n\t\t\t$this->_connection->exec( $dalSQL );\n\t\t}\n\t\n\t\t//\tcleanup\n\t $this->Reset();\n\t}", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function clearData() {\n $this->viewData = array();\n }", "function delete_graphql_data()\n {\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "abstract public function delete();", "abstract public function delete();" ]
[ "0.79104495", "0.75630206", "0.75630206", "0.73789", "0.71398276", "0.7054691", "0.7028456", "0.70002383", "0.69834363", "0.69571", "0.69564706", "0.6931199", "0.691435", "0.6901109", "0.6900521", "0.6887708", "0.6884362", "0.6879276", "0.6869475", "0.6869475", "0.68693346", "0.68677753", "0.6866966", "0.68660814", "0.6849356", "0.68343395", "0.68188536", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.67989695", "0.6797738", "0.67717063", "0.6765235", "0.67615795", "0.67317253", "0.67090726", "0.67074263", "0.67012095", "0.67001384", "0.6697461", "0.66950625", "0.66928554", "0.6666819", "0.6662472", "0.66583055", "0.66516453", "0.66256446", "0.6597344", "0.6587947", "0.6571243", "0.65567136", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6556565", "0.6537098", "0.6528578", "0.652333", "0.6522266", "0.6517292", "0.65169805", "0.6506162", "0.6500941", "0.6497808", "0.6496948", "0.6495031", "0.6495031", "0.64865065", "0.64644265", "0.6451294", "0.6443373", "0.6435433", "0.6434776", "0.6432456", "0.64233065", "0.6423129", "0.641962", "0.64165115", "0.64146507", "0.6413345", "0.64048046", "0.63982445", "0.63982445" ]
0.0
-1
Display a listing of the resource.
public function index($cliente_id) { $locacao = Cliente::find($cliente_id)->locacoes()->get();; return view('locacao.index', compact('locacao')); }
{ "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($id) { $cliente = Cliente::findOrFail($id); return view('locacao.create' , compact('cliente')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request, $id) { //dd($request); $cliente = Cliente::findOrFail($id); $validatedData = $request->validate([ 'dataLocacao' => 'required|max:255', 'dataEntrega' => 'required|max:255', 'valor' => 'required|max:15' ]); $locacao = new Locacao; //$pedido = $validatedData; $locacao->cliente_id = $id; $locacao->data = $request->input('data'); $locacao->valor = $request->input('valor'); $locacao->save(); $cliente->locacoes->push($locacao); $cliente->save(); //Pessoa::whereId($pessoa->id)->update($validatedData); return redirect(route('cliente.index'))->with('success', 'is successfully saved'); }
{ "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.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($cliente_id, Locacao $locacao) { return view('locacao.edit', compact('cliente_id', 'locacao')); }
{ "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($cliente_id, Request $request, Locacao $locacao) { $validatedData = $request->validate([ 'dataLocacao' => 'required|max:255', 'dataEntrega' => 'required|max:255', 'valor' => 'required|max:15', ]); // dd($validatedData); //locacao::update($validatedData); $locacao->data = $request->input('data'); $locacao->valor = $request->input('valor'); $locacao->save(); return redirect(route('cliente.locacao.index', $cliente_id))->with('success', 'Rent is successfully saved'); }
{ "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($cliente_id, Locacao $locacao) { // $locacao = locacao::findOrFail($locacao->id); $locacao->delete(); return redirect(route('cliente.locacao.index', $cliente_id))->with('success', 'Rent is successfully deleted'); }
{ "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 deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\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 function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\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 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 $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 File::find($id)->remove();\n \n return redirect()->route('files.index');\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 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 delete($path, $data = null);", "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 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 removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\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 destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\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 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(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\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 }", "public function remove($id);", "public function remove($id);", "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 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 }", "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 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 {\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 }", "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 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.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853", "0.58968836", "0.58958197", "0.58958197", "0.58958197", "0.58958197", "0.58800334", "0.5869308", "0.5861188", "0.5811069", "0.5774596", "0.5763277", "0.5755447", "0.5747713", "0.5742094", "0.573578", "0.5727048", "0.57164854", "0.5712422", "0.57092893", "0.57080173", "0.5707143", "0.5704078", "0.5696418", "0.5684556", "0.5684556", "0.56790006", "0.5678463", "0.5658492", "0.564975", "0.5648406", "0.56480885", "0.5641393", "0.5638992", "0.56302536", "0.56228197", "0.5616424", "0.5607389", "0.56033397", "0.5602035", "0.55991143", "0.55988586", "0.5590501", "0.5581284", "0.55681103", "0.5566215", "0.55644745", "0.5563726", "0.55593926", "0.55583876", "0.5548547", "0.5542015", "0.5541403", "0.5541403", "0.55397224", "0.55390894", "0.55376494", "0.5531044", "0.5529739", "0.55279493", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527671", "0.5527155", "0.5526666", "0.55245256", "0.552101", "0.55183184" ]
0.0
-1
Load request values from environment
public function __construct() { // Use POST and GET if there are any if (!empty($_GET) || !empty($_POST)) { // GET POST and GET values $values = array_merge($_POST, $_GET); // Trim values $trim_func = function (&$item, $key) { $item = trim($item); }; array_walk_recursive($values, $trim_func); // Store values $this->assign($values); } // If command line, then also parse arguments if (PHP_SAPI == 'cli') { $values = $_SERVER['argv']; array_shift($values); foreach ($values as $arg) { parse_str($arg, $params); if (!empty($params)) { $this->assign($params); } } } // Set NULL to be returned for undefined values $this->setUndefinedValue(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load()\n {\n $data = array(\n 'get' => (isset($_GET)) ? $_GET : null, \n 'post' => (isset($_POST)) ? $_POST : null,\n 'request' => (isset($_REQUEST)) ? $_REQUEST : null,\n 'files' => (isset($_FILES)) ? $_FILES : null,\n 'server' => (isset($_SERVER)) ? $_SERVER : null,\n 'session' => (isset($_SESSION)) ? $_SESSION : null\n );\n\n foreach ($data as $name => $value) {\n if ($value !== null) {\n $this->$name = $value;\n $global = strtoupper($name);\n unset($$global);\n }\n }\n }", "function Cgn_SystemRequest() {\n\t\t/*\n\t\t$this->vars = Cgn_ObjectStore::getObject('request://request');\n\t\t$this->getvars = Cgn_ObjectStore::getObject('request://get');\n\t\t$this->postvars = Cgn_ObjectStore::getObject('request://post');\n\t\t$this->cookies = Cgn_ObjectStore::getObject('request://cookie');\n\t\t */\n\n\t\tif (defined ('CGN_PRODUCTION_ENVIRONMENT')) \n\t\t$this->prodEnv = CGN_PRODUCTION_ENVIRONMENT;\n\t}", "public static function load()\n {\n $path = dirname(__DIR__);\n\n $parsed = parse_ini_file($path . '/environment.ini', true);\n\n $_ENV['ENVIRONMENT'] = $parsed['ENVIRONMENT'];\n\n foreach ($parsed[$parsed['ENVIRONMENT']] as $key => $value) {\n $_ENV[$key] = $value;\n }\n }", "protected function loadEnvironmentVariables()\n {\n (new Dotenv())->load($this->basePath.'/.env');\n }", "private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }", "public function load($environment = null);", "final public function envGetRetrievesValuesFromEnvGlobal(): void\n {\n $_ENV['TEST_ENV_GET_TEST'] = 'test';\n $_ENV['TEST_ENV_GET_TEST_2']['details'] = 'test2';\n $this->assertEquals('test', envGet('TEST_ENV_GET_TEST'));\n $this->assertEquals('test2', envGet('TEST_ENV_GET_TEST_2.details'));\n }", "protected static function loadEnv()\n\t{\n\t\tif (! getenv('APP_ENV')) {\n\t\t\t// Load Dotenv if in a dev environment (no environment vars loaded)\n\t\t\t(new Dotenv(__DIR__ . '/../'))->load();\n\t\t}\n\t}", "protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }", "private static function loadEnvSettings()\n {\n require_once self::$envPath;\n return $env;\n }", "private function loadReleaseFromEnv()\n {\n $this->release['version'] = getenv('SHOPWARE_VERSION') === false ? self::VERSION : getenv('SHOPWARE_VERSION');\n $this->release['revision'] = getenv('SHOPWARE_REVISION') === false ? self::REVISION : getenv('SHOPWARE_REVISION');\n $this->release['version_text'] = getenv('SHOPWARE_VERSION_TEXT') === false ? self::VERSION_TEXT : getenv('SHOPWARE_VERSION_TEXT');\n }", "public static function setEnvironnement()\n\t{\n\t\tUz_Autoloader::init(array(static::$framework_namespace=>$framework_path, static::$application_namespace=>static::$application_path),static::$framework_namespace,array());\n\t\t//On construit la session\n\t\tUz_Service_HTTP_Session::build();\n\t\t//On recupere la requete dans cet objet\n\t\tUz_Service_HTTP_Request::build();\n\t\tUz_Controller_Dispatcher::init(static::$application_namespace);\n\t\tUz_Mapper_Generic::init(static::configureDb());\n\t\t\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }", "function init_env() {\n $envs_filename = base_path().DIRECTORY_SEPARATOR.'.env';\n $envs = $envs_array = [];\n \n if ($ressources = fopen($envs_filename, 'r')) {\n while (!feof($ressources)) {\n $element = fgets($ressources);\n\n if (!empty(trim($element))) {\n $element_array = explode('=', $element);\n $envs_array[$element_array[0]] = $element_array[1];\n }\n\n $envs[] = $element;\n }\n\n fclose($ressources);\n }\n\n $_ENV = array_merge($envs_array, $_ENV);\n }", "public function loadFromRequest(Request $req)\n {\n $config = $req->get('storageLocationConfig');\n\n $this->bucketName = $config['bucketName'];\n $this->accessKey = $config['accessKey'];\n $this->secret = $config['secret'];\n\n $this->region = $config['region'];\n $this->version = $config['version'];\n }", "function init_from_globals () {\n\t\t$this->init($_SERVER, $_GET, $_POST, $_FILES, 'php://input', $_COOKIE, MICROTIME);\n\t}", "public function getDataWithTypeGetenv() {}", "protected function initVars() {\n\n\t\t}", "public function load()\n {\n $this->checkForSpecificEnvironmentFile();\n $dotEnv = Dotenv::createImmutable($this->getEnvironmentPath(),$this->getEnvironmentFile());\n //$dotEnv = new Dotenv($this->getEnvironmentPath(), $this->getEnvironmentFile());\n\n $dotEnv->load();\n\n $this->validateEnvironmentFile($dotEnv);\n }", "public static function createFromGlobals() {\n throw new Exception(\"Can not generate request from globals in a hprose environment.\");\n }", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "protected static function loadEnv()\n {\n global $argv;\n /* Unset the first item (file name) */\n unset($argv[0]);\n\n $name_map = self::$environment_arguments_map;\n\n $tmp = [];\n foreach ($argv as $index => $value) {\n if (StringHelper::contains('=', $value)) {\n /* explode the key value pair */\n $value_array = explode('=', $value);\n /* Strip the quotes from the value */\n $tmp[$value_array[0]] = ltrim(rtrim($value_array[1], '\"'), '\"');\n } elseif (StringHelper::startsWith('--', $value) || StringHelper::startsWith('-', $value)) {\n $tmp[str_replace('--', '', $value)] = true;\n } else {\n /* Check if we have names left */\n if (!empty($name_map)) {\n /* add the first name to this value */\n $tmp[array_shift($name_map)] = $value;\n } else {\n /* Otherwise, don't mind */\n $tmp[] = $value;\n }\n }\n }\n /* Store it in $env */\n Console::$env = $tmp;\n }", "public static function collect(): void\n {\n static::parameter('_get', $_GET);\n static::parameter('_post', $_POST);\n static::parameter('_files', $_FILES);\n\n foreach ($_SERVER as $key => $value) {\n if (!in_array($key, static::$serverVariables)) {\n continue;\n }\n static::parameter('server_' . strtolower($key), $value);\n }\n\n foreach ($_COOKIE as $key => $value) {\n if (!in_array($key, static::$cookieVariables)) {\n continue;\n }\n static::parameter('cookie_' . strtolower($key), $value);\n }\n }", "private function loadEnvironment () : void {\n $env = new Dotenv(__DIR__);\n if (file_exists(__DIR__ . '/.env')) {\n $env->load();\n }\n $env->required('SERVERS_LOG_FILE');\n }", "public static function provideOnResourceLoaderGetConfigVars() {\n\t}", "function populate_from_request();", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }", "function initializer() {\n init_env();\n }", "private function initialization() {\n //global $_POST,$_GET,$_SERVER,$_FILES,$_COOKIE,$_ENV;\n \n $this->ServerVar = &$_SERVER;\n $this->EnvVar = &$_ENV;\n $this->CookieVar = &$_COOKIE;\n $this->VARS = daddslashes(array_merge($_POST, $_GET, $_FILES));\n //$this->VARS = array_merge($_POST, $_GET, $_FILES);\n }", "private function initEnvironment() {\n\t\t$env = getenv('APP_ENV');\n\n\t\t$this->_env = ($env !== FALSE) ? $env : 'development';\n\t}", "public static function importJson() {\n\t if(self::isJson()) {\n\t foreach (self::getJson() as $name => $value) {\n\t $_REQUEST[$name] = $value;\n\t }\n\t }\n\t}", "public function init()\n {\n $this->setEnv();\n }", "public static function start()\n {\n $buffer = File::readFile(\".env\");\n $pairs = explode(\"\\n\", $buffer);\n\n foreach ($pairs as $pair) {\n $keyValuePair = explode(\"=\", $pair);\n\n $key = (isset($keyValuePair[0])) ? $keyValuePair[0] : null;\n $value = (isset($keyValuePair[1])) ? $keyValuePair[1] : null;\n\n self::$environment[$key] = $value;\n }\n }", "public function getAllEnvironmentVariables()\n {\n return include $_SERVER['DOCUMENT_ROOT'] . '/env.php';\n }", "public function patch()\n\t{\n\t\t$env_override_file = __DIR__ . '/../../.env';\n\n\t\tif ( file_exists($env_override_file) ) {\n\t\t\t$env_override_vars = parse_ini_file($env_override_file);\n\n\t\t\tforeach ( $env_override_vars as $var_name => $var_value ) {\n\t\t\t\t$_SERVER[$var_name] = $var_value;\n\t\t\t}\n\t\t}\n\t}", "public function populate_from_request()\r\n\t\t{\t\t\r\n\t\t\t// Interate through each class method.\r\n\t\t\tforeach(get_class_methods($this) as $method) \r\n\t\t\t{\t\t\r\n\t\t\t\t$key = str_replace('set_', '', $method);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t// If there is a request var with key matching\r\n\t\t\t\t// current method name, then the current method \r\n\t\t\t\t// is a set mutator for this request var. Run \r\n\t\t\t\t// it (the set method) with the request var. \r\n\t\t\t\tif(isset($_GET[$key]))\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\t$this->$method($_GET[$key]);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected static function initializeGlobalVariables() {}", "protected function setUp () : void {\n\n $_ENV['foo'] = \"bar\";\n $_SERVER['foo'] = \"baz\";\n\n $_ENV['bar'] = \"lorem\";\n $_SERVER['baz'] = \"ipsum\";\n\n // And quux isn't defined.\n }", "public function testEnvironmentVariablesCanBeValidated()\n {\n /** @noinspection PhpParamsInspection */\n $egg = $this->cloneEggAndVariables(Egg::query()->findOrFail(1));\n\n try {\n $this->getService()->handle($egg->id, [\n 'BUNGEE_VERSION' => '1.2.3',\n ]);\n\n $this->assertTrue(false, 'This statement should not be reached.');\n } catch (ValidationException $exception) {\n $errors = $exception->errors();\n\n $this->assertCount(2, $errors);\n $this->assertArrayHasKey('environment.BUNGEE_VERSION', $errors);\n $this->assertArrayHasKey('environment.SERVER_JARFILE', $errors);\n $this->assertSame('The Bungeecord Version variable may only contain letters and numbers.', $errors['environment.BUNGEE_VERSION'][0]);\n $this->assertSame('The Bungeecord Jar File variable field is required.', $errors['environment.SERVER_JARFILE'][0]);\n }\n\n $response = $this->getService()->handle($egg->id, [\n 'BUNGEE_VERSION' => '1234',\n 'SERVER_JARFILE' => 'server.jar',\n ]);\n\n $this->assertInstanceOf(Collection::class, $response);\n $this->assertCount(2, $response);\n $this->assertSame('BUNGEE_VERSION', $response->get(0)->key);\n $this->assertSame('1234', $response->get(0)->value);\n $this->assertSame('SERVER_JARFILE', $response->get(1)->key);\n $this->assertSame('server.jar', $response->get(1)->value);\n }", "abstract public function initFromRequest(\\App\\Request $request);", "private static function _initialise () {\r\n\t\tif (!self::$_request) {\r\n\t\t\tself::$_request = array_merge ($_GET, $_POST);\r\n\t\t}\n\t\t\r\n\t}", "public function setGlobalsData()\n\t{\n\t\t$GLOBALS['controller'] = $this->class_Name;\n\t\t$GLOBALS['action'] = $this->action_Name;\n\t}", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "private function setQuantumVars() {\n \n if (!empty($_REQUEST['controller'])) {\n \n $this->controller = $_REQUEST['controller'];\n \n };\n \n if (!empty($_REQUEST['task'])) {\n \n $this->task = $_REQUEST['task'];\n \n }\n \n if (!empty($_REQUEST['object_id'])) {\n \n $this->object_id = $_REQUEST['object_id'];\n \n }\n \n \n }", "public function setEnvironment($environmentVars);", "protected function get_env_parameters()\n\t{\n\t\t$parameters = array();\n\t\tforeach ($_SERVER as $key => $value)\n\t\t{\n\t\t\tif (0 === strpos($key, 'PHPBB__'))\n\t\t\t{\n\t\t\t\t$parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $parameters;\n\t}", "public function getVars()\n\t{\n\t\treturn $this->requestVars;\n\t}", "public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function getGlobals() {\r\n\t\treturn [\r\n 'REQUEST' => [\r\n\t\t\t\t'url' => Response::$url\r\n\t\t\t],\r\n 'SESSION' => (isset($_SESSION)) ? $_SESSION : [],\r\n 'SERVER' => $_SERVER,\r\n 'INPUT' => App::$input,\r\n 'ENV' => App::$env\r\n ];\r\n }", "function import_request_variables(string $types, string $prefix = null): void\n{\n error_clear_last();\n if ($prefix !== null) {\n $result = \\import_request_variables($types, $prefix);\n } else {\n $result = \\import_request_variables($types);\n }\n if ($result === false) {\n throw VarException::createFromPhpError();\n }\n}", "public function setEnvironment();", "public function serverVariables()\n {\n return array_merge(Fpm::resolve()->serverVariables(), array_filter([\n 'AWS_REQUEST_ID' => $_ENV['AWS_REQUEST_ID'] ?? null,\n ]));\n }", "public function beginRequest()\n {\n Yii::app()->name = Yii::app()->settings->get('common', 'site_name');\n Yii::app()->language = Yii::app()->settings->get('common', 'language');\n }", "function getEnvironmentVariables()\n{\n\tglobal $config_array;\n\n\tif ($customnr = getenv('CUSTOMERNR')) {\n\t\t$config_array['CUSTOMERNR'] = $customnr;\n\t}\n\n\tif ($apikey = getenv('APIKEY')) {\n\t\t$config_array['APIKEY'] = $apikey;\n\t}\n\n\tif ($apipassword = getenv('APIPASSWORD')) {\n\t\t$config_array['APIPASSWORD'] = $apipassword;\n\t}\n\n\tif ($domain = getenv('DOMAIN')) {\n\t\t$config_array['DOMAIN'] = $domain;\n\t}\n\n\tif ($hostipv4 = getenv('HOST_IPv4')) {\n\t\t$config_array['HOST_IPv4'] = $hostipv4;\n\t}\n\n\tif ($hostipv6 = getenv('HOST_IPv6')) {\n\t\t$config_array['HOST_IPv6'] = $hostipv6;\n\t}\n\n\tif ($useipv4 = getenv('USE_IPV4')) {\n\t\t$config_array['USE_IPV4'] = $useipv4;\n\t}\n\n\tif ($usefb = getenv('USE_FRITZBOX')) {\n\t\t$config_array['USE_FRITZBOX'] = $usefb;\n\t}\n\n\tif ($fbip = getenv('FRITZBOX_IP')) {\n\t\t$config_array['FRITZBOX_IP'] = $fbip;\n\t}\n\n\tif ($useipv6 = getenv('USE_IPV6')) {\n\t\t$config_array['USE_IPV6'] = $useipv6;\n\t}\n\n\tif ($ipv6interface = getenv('IPV6_INTERFACE')) {\n\t\t$config_array['IPV6_INTERFACE'] = $ipv6interface;\n\t}\n\n\tif ($ipv6priv = getenv('NO_IPV6_PRIVACY_EXTENSIONS')) {\n\t\t$config_array['NO_IPV6_PRIVACY_EXTENSIONS'] = $ipv6priv;\n\t}\n\n\tif ($changettl = getenv('CHANGE_TTL')) {\n\t\t$config_array['CHANGE_TTL'] = $changettl;\n\t}\n\n\tif ($apiurl = getenv('APIURL')) {\n\t\t$config_array['APIURL'] = $apiurl;\n\t}\n\n\tif ($sendmail = getenv('SEND_MAIL')) {\n\t\t$config_array['SEND_MAIL'] = $sendmail;\n\t}\n\n\tif ($mailrec = getenv('MAIL_RECIPIENT')) {\n\t\t$config_array['MAIL_RECIPIENT'] = $mailrec;\n\t}\n\n\tif ($sleepinsec = getenv('SLEEP_INTERVAL_SEC')) {\n\t\t$config_array['SLEEP_INTERVAL_SEC'] = $sleepinsec;\n\t}\n}", "public function getReqVars()\n\t{\n\t\treturn $this->_requestVars;\n\t}", "protected function loadEnvironmentVariables()\n {\n try {\n $dotenv = new \\Dotenv\\Dotenv(base_path());\n $dotenv->load();\n } catch (\\Exception $exception) {\n if ($exception instanceof InvalidPathException) {\n die('No .env file found');\n }\n }\n }", "public function init()\n {\n if (isset($this->_server['REQUEST_METHOD'])) {\n $this->_properties = $this->_request;\n\n if (array_key_exists('parameters', $this->_get)\n && gettype($this->_get['parameters']) != 'array'\n && strlen(trim($this->_get['parameters'])) > 0\n ) {\n $paramData = explode('/', $this->_get['parameters']);\n for ($index = 0, $maxCount = sizeof($paramData); $index < $maxCount; $index += 2) {\n if (isset($paramData[$index+1])) {\n if ($paramData[$index+1] == \"_\") {\n $value = \"\";\n } else {\n $value = $paramData[$index+1];\n }\n $this->setProperty(\n $paramData[$index], $value\n );\n }\n }\n } elseif (isset($this->_get['parameters'])\n && gettype($this->_get['parameters']) == 'array'\n && count($this->_get['parameters']) > 0) {\n\n $paramData = $this->_get['parameters'];\n\n foreach ($paramData as $index => $value) {\n $this->setProperty($index, $value);\n }\n }\n\n return;\n }\n\n if (isset($this->_server['argv'])) {\n foreach ($this->_server['argv'] as $arg) {\n if (strpos($arg, '=')) {\n list($key, $val) = explode(\"=\", $arg);\n $this->setProperty($key, $val);\n }\n }\n }\n }", "public function requestValueProvider()\n {\n $values = [];\n $values[] = [ 'protocol', 'resque' ];\n $values[] = [ 'domain', 'www.domain.com' ];\n $values[] = [ 'port', '666' ];\n $values[] = [ 'base_path', '/path' ];\n $values[] = [ 'base_url', 'http://www.domain.com:666/path/' ];\n $values[] = [ 'sapi', 'cli' ];\n $values[] = [ 'controller', 'resque' ];\n $values[] = [ 'method', '' ];\n $values[] = [ 'params', [] ];\n $values[] = [ 'call', 'resque/' ];\n\n return $values;\n }", "private function loadGetParams()\n {\n if(isset($_GET)) {\n $this->getParams = $_GET;\n }\n }", "public function testManipulateGlobalVariables()\n {\n $this->request->setQuery('global_get_variable', 42);\n $this->request->setPost('global_post_variable', 42);\n }", "public static function env() {\n\n $GLOBAL['_ENV'] = array();\n $GLOBAL['_ENV']['PATH_INFO'] = getenv('PATH_INFO');\n $GLOBAL['_ENV']['HTTP_USER_AGENT'] = getenv('HTTP_USER_AGENT');\n return true;\n }", "public static function getRequestVars() {\n return self::$_request_vars;\n }", "protected function setEnv()\n {\n // this function called before ?\n static $called = false;\n\n // prevent for calling multiple times\n if ( $called ) return; $called = true;\n\n // Create a ref. of _SERVER array\n // to simplify coding ^_*\n $s = &$_SERVER;\n\n // Set some environment vars\n $s['DEFAULT_SCHEME'] = empty($s['DEFAULT_SCHEME']) ? 'http' : $s['DEFAULT_SCHEME']; \n $s['DEFAULT_DOMAIN'] = (empty($s['DEFAULT_DOMAIN']) ? $s['SERVER_NAME'] : $s['DEFAULT_DOMAIN']);\n $s['SIMULATOR'] = (empty($s['SIMULATOR']) ? ($s['SIMULATOR'] = 'on') : strtolower($s['SIMULATOR']));\n $s['SIMULATED'] = isset($s['PATH_INFO']);\n $s['URL'] = $s['DEFAULT_SCHEME'] . '://' . $s['DEFAULT_DOMAIN'] . '/' . rtrim(ltrim(dirname($s['SCRIPT_NAME']), '/\\\\'), '\\\\/') . '/';\n $s['ROUTE'] = $s['URL'] . (($s['SIMULATOR'] == 'on') ? 'index.php/' : '');\n $s['QUERY_STRING'] = str_replace(array(\"\\0\", chr(0), '%00'), '', ($s['QUERY_STRING']));\n $s['REQUEST_METHOD'] = strtoupper($s['REQUEST_METHOD']);\n\n // simulator started ?\n if ( $s['SIMULATOR'] == 'on' )\n $s['SIMULATED'] || header(\"Location: {$s['ROUTE']}\", TRUE, 302);\n\n // update the path_info\n $s['PATH_INFO'] = empty($s['PATH_INFO']) ? '/' : preg_replace('/\\/+/', '/', ('/'.(rtrim(ltrim($s['PATH_INFO'], '/'), '/')).'/'));\n $s['PATH_INFO'] = str_replace(array(\"\\0\", chr(0), '%00'), '', ($s['PATH_INFO']));\n\n // disable libxml errors\n libxml_use_internal_errors(TRUE);\n\n // Read header_inputs\n $_INPUT = array();\n $i = str_replace(array(\"\\0\", chr(0), '%00'), '', rawurldecode(file_get_contents('php://input')));\n\n // then parse it and detect whether it is\n // basic_string, json or xml\n if ( is_array($t = json_decode($i, true)) && $t != FALSE )\n $_INPUT = &$t;\n elseif ( ($t = simplexml_load_string($i)) && $t != FALSE )\n $_INPUT = &$t;\n else \n parse_str($i, $_INPUT);\n\n // _POST ?\n $_POST = &$_INPUT;\n\n // Read query_string\n // then parse it and detect whether it is\n // basic_string, json or xml\n $decoded = rawurldecode($s['QUERY_STRING']);\n if (is_array($x = json_decode($decoded, true)) && $x != FALSE )\n $_GET = &$x;\n elseif ( ($x = simplexml_load_string($decoded)) && $x != FALSE )\n $_GET = &$x;\n else \n parse_str($s['QUERY_STRING'], $_GET);\n\n // enable libxml errors again\n libxml_use_internal_errors(FALSE);\n\n // Set the requests arrays [get, post, request]\n $_GET = (array) $_GET;\n $_POST = (array) $_POST;\n $_REQUEST = (array) array_merge($_GET, $_POST, (array) $_INPUT);\n\n // Set environment headers\n header('Content-Type: text/html; charset=UTF-8', TRUE);\n header('X-Powered-By: HORUS/PHP', TRUE);\n\t\theader(\"Cache-Control: no-store, no-cache, must-revalidate, max-age=0\", TRUE);\n\t\theader(\"Cache-Control: post-check=0, pre-check=0\", TRUE);\n\t\theader(\"Pragma: no-cache\", TRUE);\n header(\"X-Frame-Options: SAMEORIGIN\", TRUE);\n header(\"X-XSS-Protection: 1; mode=block\", TRUE);\n header(\"X-Content-Type-Options: nosniff\", TRUE);\n\n // free memory from some vars\n unset($s, $i, $x, $t, $_INPUT, $path);\n\n return $this;\n }", "private function parseSettingsForEnvVariables()\n {\n foreach ($this->settings as $key => $value)\n {\n $this->settings[ $key ] = craft()->config->parseEnvironmentString($value);\n }\n }", "protected function getPreserveGetVars() {}", "public function get_request_arguments();", "private function loadEnvironment(string $name) : void\n {\n $this->current[] = $name;\n $filename = $name;\n if (strlen($filename)) {\n $filename = \".$filename\";\n }\n if (file_exists(\"{$this->path}/.env$filename\")) {\n $filename = \".env$filename\";\n } else {\n // The config file does not exist. Instead of throwing an error,\n // we fail silently. This allows e.g. .env.test to exist on\n // developer machines, but not on production.\n return;\n }\n $env = new Parser(file_get_contents(\"{$this->path}/$filename\"));\n $vars = $env->getContent();\n foreach ($vars as $name => $value) {\n $this->setVariable($name, $value);\n }\n }", "public function __construct()\n {\n $items = getenv();\n $this->set($items);\n }", "public static function loadEvironmentVariables($_file=null) {\n // If no file is specified, try to find .env file.\n if($_file === null) {\n $_file = LoadEnvironment::findEnvFile();\n }\n // Throw exception if file is not found.\n if ( !file_exists($_file) ) {\n print(\"<strong>Fatal Error:</strong> Environment Variable file \\\".env\\\" was not found. Check it is defined and populated according to the \\\"env.example.txt\\\" file and in an appropriate location.\");\n exit();\n }\n\n // Opening file.\n try {\n // Read in the file.\n $envFile = fopen($_file, \"r\");\n //Throw exception if file not opened.\n if ( !$envFile ) {\n throw new Exception('Environment Variable File failed to open.');\n }\n\n // Loop through each line of the file, parsing each line to a new environment variable.\n while( !feof($envFile) ) {\n // Get new line and parse.\n $envLine = fgets($envFile);\n LoadEnvironment::parseEnvVar($envLine);\n }\n // Close the file.\n fclose($envFile);\n\n }catch( Exception $e ) {\n throw $e;\n exit();\n }\n\n }", "public static function Load(): array{\n if(file_exists(path(\"env.json\"))){\n $JsonContent = file_get_contents(path(\"env.json\"),true);\n $envData = json_decode($JsonContent, true) ;\n if (!$envData == null){\n return $envData;\n } else {\n throw new Exception(\"Invalid JSON format at file 'env.json'\"); \n }\n }else{\n throw new Exception('Target file \"env.json\" dosen\\'t exist. '); \n }\n }", "private function getVars() {\n if (strlen(trim($vars = file_get_contents('php://input'))) === 0) {\n $vars = false;\n }\n return $vars;\n }", "private function defineAmbient(Request $request)\n {\n // Endpoint da rota\n $endpoint = explode('@', ($request->route()->getActionName()));\n\n // mdd($request->route()->getActionName());\n\n // Define a localizacao do esquema\n $data = array();\n\n // Se o endpoint for Closure, indica que e uma acao de fim iminente\n if($endpoint[0] == 'Closure'){\n $data = array(\n 'module' => $request->route()->getPrefix()?:'site',\n 'controller' => 'SystemController',\n 'action' => 'getClosure',\n 'route' => $request->route()->getAction()\n );\n } else {\n $data = array(\n 'module' => $request->route()->getPrefix()?:'site',\n 'controller' => $endpoint[0],\n 'action' => $endpoint[1],\n 'route' => $request->route()->getAction()\n );\n }\n\n \n\n app()->make('\\Mkny\\Cinimod\\Logic\\UtilLogic')->addViewVar($data);\n\n // Setta na classe, para que caso as sub-classes precisem utilizar\n $this->module = $data['module'];\n $this->action = $data['action'];\n $this->controller = $data['controller'];\n\n // Adiciona as variaveis na requisicao\n $this->addVar($request, ['module' => $this->module]);\n $this->addVar($request, ['action' => $this->action]);\n $this->addVar($request, ['controller' => $this->controller]);\n }", "public function properRequestValueProvider()\n {\n $values = [];\n $values[] = [ 'protocol', 'resque' ];\n $values[] = [ 'domain', 'www.domain.com' ];\n $values[] = [ 'port', '666' ];\n $values[] = [ 'base_path', '/path' ];\n $values[] = [ 'base_url', 'http://www.domain.com:666/path/' ];\n $values[] = [ 'sapi', 'cli' ];\n $values[] = [ 'controller', 'resque' ];\n $values[] = [ 'method', '' ];\n $values[] = [ 'params', [ ] ];\n $values[] = [ 'call', 'resque/' ];\n\n return $values;\n }", "private function __get_all_form_validate_params()\n {\n $this->__all_form_validation_params =\n require_once(FORM_REQUEST_VALIDATE_PARAMS_CONFIG_FILE)\n ;\n }", "public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}", "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']='(count($_POST)>0)?NULL:array()'; // No cache on POST as this is when we save text data\n\t\t$info['ttl']=60*5;\n\t\treturn $info;\n\t}", "public function getEnvs();", "private function setupApplicationEnvironment(){\n\n // TODO: MAKE MORE EFFICENT WITH CACHING\n if($this->version == null)\n $this->version = env('PAYPAL_VERSION', 'dev-2.0-beta');\n\n if($this->endpoint == null)\n $this->endpoint = env('PAYPAL_ENDPOINT');\n \n if($this->username == null)\n $this->username = env('PAYPAL_USERNAME');\n\n if($this->password == null)\n $this->password = env('PAYPAL_PASSWORD');\n\n if($this->signature == null)\n $this->signature = env('PAYPAL_SIGNATURE');\n\n if($this->isDirect == null)\n $this->isDirect = env('PAYPAL_DIRECT', true);\n\n if($this->payment_method == null) \n $this->payment_method = ($this->isDirect) ? Objects::CREDIT_CARD : env('PAYMENT_METHOD');\n\n // Set our enviornment based on production or development\n $this->environment = (!$this->isDevelopment) ? new ProductionEnvironment() : new SandboxEnvironment();\n\n $this->client = new PayPalHttpClient($this->environment);\n\n }", "private static function importVariables(Request $request, $exp_id, $access_token)\n {\n $vars_to_send = [];\n foreach ($request->getParsedBody()['variables'] as $var) {\n $body = [\n 'name' => $var['name'],\n 'code' => $var['code'],\n ];\n $rsp = DataApi::post('experiments/'.$exp_id.'/variables', json_encode($body), $access_token);\n $vars_to_send[$var['name_in_file']] = $rsp['id'];\n }\n\n return $vars_to_send;\n\n }", "protected function get_wp_environment()\n {\n }", "public function get_params(string $env): array {\n $generic_params = $this->_parse_content($this->_generic_content);\n $env_params = $this->_parse_content($this->_fetch_env_content($env));\n\n return f\\concat($generic_params, $env_params);\n }", "public function testMutableLoaderClearsEnvironmentVars()\n {\n $this->_mutableLoader->setEnvironmentVariable($this->key(), $this->value());\n $this->_mutableLoader->clearEnvironmentVariable($this->key());\n\n $this->assertSame(\n null,\n $this->_mutableLoader->getEnvironmentVariable($this->key())\n );\n\n $this->assertSame(false, getenv($this->key()));\n $this->assertSame(false, isset($_ENV[$this->key()]));\n $this->assertSame(false, isset($_SERVER[$this->key()]));\n\n $this->assertTrue(is_array($this->_mutableLoader->variableNames));\n $this->assertFalse(empty($this->_mutableLoader->variableNames));\n\n }", "public static function getRequestVariables()\n {\n $vars = $_REQUEST;\n unset($vars['appId']);\n unset($vars['appSecret']);\n unset($vars['clientId']);\n unset($vars['clientSecret']);\n unset($vars['itemid']);\n unset($vars['identifier']);\n unset($vars['emailPreview']);\n unset($vars['telPreview']);\n unset($vars['fetchURL']);\n unset($vars['version']);\n\n //Try to remove the random variable added for get requests to break cache\n foreach ($vars as $key => $var) {\n if ($var === '' && preg_match('/^[a-z0-9]{8}/', $key)) {\n unset ($vars[$key]);\n }\n }\n\n return $vars;\n }", "function env_get( $variable ){\n\t\t// not this function!\n\t\t$data = file_get_contents( 'env/env.json' );\n\t\t$json = json_decode( $data, true );\n\t\treturn $json[ $variable ];\n\t}", "private function init() {\n $apiParts = $this->request->getApiParts();\n $this->requestedId = array_shift($apiParts);\n $this->apiParts = $apiParts;\n \n $this->siteDriver = Datastore::getSiteDriver();\n }", "public function getValueFromRequest() {\n\t\tglobal $wgRequest;\n\t\t$this->aActiveValues = $wgRequest->getArray( $this->getParamKey(), array() );\n\t}", "function init_request($request)\n {\n }", "function init_request($request)\n {\n }", "protected function mapRequest() {\n foreach($_REQUEST as $key => $value) {\n $this->data[$key] = $value;\n }\n }", "function env($key = null)\n{\n if (!isset($GLOBALS['configs']))\n $GLOBALS['configs'] = json_decode(file_get_contents($GLOBALS['config_path'] . DIRECTORY_SEPARATOR . 'env.json'));\n\n if (!is_null($key) && isset($GLOBALS['configs']->$key))\n return $GLOBALS['configs']->$key;\n elseif (is_null($key) && isset($GLOBALS['configs']))\n return $GLOBALS['configs'];\n else\n Throw new \\Atom\\Environment\\EnvironmentException(\"Environment variable \" . $key . \" not found.\");\n}", "function _load_get_params(&$app, &$c) {\n\t\t$params =& $c->param('app.view_http.request.params');\n\t\tif (is_array($params)) {\n\t\t\tforeach($params as $p_name => $p_value) {\n\t\t\t\t$this->_http->addQueryString($p_name, $p_value);\n\t\t\t}\n\t\t}\n\t}", "protected function defineEnvironmentConstants()\n {\n /** Environment name for development. */\n define('ENVIRONMENT_DEV', 'dev');\n /** Environment name for development. */\n define('ENVIRONMENT_TEST', 'test');\n /** Environment name for staging. */\n define('ENVIRONMENT_STAGING', 'staging');\n /** Environment name for production. */\n define('ENVIRONMENT_PRODUCTION', 'production');\n }", "function __construct($requestVal = array()) {\n /*\n * TO SET THAT APPLICATION IS LIVE OR NOT\n */\n $this->IS_LIVE = TRUE;\n\n /*\n * SET PLATEFORM TYPE/APPLICATION VALUE [ IS IT LIVE OR NOT ?? ]\n */\n if (!empty($requestVal)) {\n foreach ($requestVal as $KEY => $VAL) {\n $this->$KEY = $VAL;\n }\n }\n\n\n /*\n * SET PRIMARY VALUES..\n * STEP 1\n */\n $this->_setPrimaryValue();\n\n /*\n * SET OBEJCT VALUE\n * STEP 2\n */\n $this->_setObjectValue();\n }", "protected function simulateFrontendEnvironment() {}", "public function testApiCredentialsFromEnvironment() {\n // set home directory that would be necessary for a file\n $_SERVER['HOME'] = dirname(__FILE__);\n // set the environment variable, this is what it should be set to\n $envVarKey = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::ENV_KEY;\n $envVarSite = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::ENV_SITE;\n $_SERVER[$envVarKey] = \"BARKEY\";\n $_SERVER[$envVarSite] = \"FOOSITE\";\n $oApiCredentials = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::factory();\n\n $this->assertNotNull($oApiCredentials);\n \n $this->assertEquals($_SERVER[$envVarKey], $oApiCredentials->getDeveloperKey());\n $this->assertEquals($_SERVER[$envVarSite], $oApiCredentials->getWebsiteId());\n \n }" ]
[ "0.6168943", "0.61480606", "0.61329156", "0.6039796", "0.6032748", "0.6025325", "0.5972167", "0.59245706", "0.5905273", "0.58701926", "0.5858606", "0.58585787", "0.5821272", "0.5805023", "0.5780787", "0.5726633", "0.57041657", "0.56705743", "0.5660793", "0.5636668", "0.56125486", "0.559744", "0.55893356", "0.55879855", "0.5575873", "0.55599636", "0.55306244", "0.55294836", "0.55177987", "0.5482286", "0.54674417", "0.5465412", "0.54615253", "0.54541194", "0.54335797", "0.5433402", "0.5416331", "0.5412086", "0.5387835", "0.53858143", "0.538454", "0.5382931", "0.5380876", "0.53776985", "0.53776985", "0.53776985", "0.53776985", "0.53776985", "0.53776985", "0.5368081", "0.5367867", "0.5355473", "0.53398156", "0.53367937", "0.5314211", "0.5309561", "0.53091645", "0.530858", "0.53081083", "0.53070015", "0.53041005", "0.5295534", "0.5293555", "0.528054", "0.5276197", "0.5269794", "0.5254957", "0.5252389", "0.52412295", "0.5238387", "0.52214575", "0.52118504", "0.520025", "0.5196876", "0.5192594", "0.5185614", "0.51811886", "0.5179745", "0.5176316", "0.5175971", "0.51733255", "0.5168047", "0.5158464", "0.5145079", "0.5141826", "0.5138751", "0.51370263", "0.5136449", "0.5135734", "0.51338124", "0.51308334", "0.5129424", "0.5127746", "0.5127746", "0.5127391", "0.51260847", "0.5123201", "0.51217854", "0.5120778", "0.5120079", "0.5113104" ]
0.0
-1
Return a variable in super global array
private function getGLOBAL($variable, $name) { if (!empty($this->undefValue) || (isset($GLOBALS[$variable]) && is_array($GLOBALS[$variable]) && array_key_exists($name, $GLOBALS[$variable]))) { return $GLOBALS[$variable][$name]; } else { return $this->undefValue; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function variables(): array;", "public function variables(): array;", "public function getGlobals();", "public function getGlobals();", "public function getGlobals()\n {\n return [\n 'cache' => $this->flextype['cache'],\n ];\n }", "public function getAvailableVariables() :array\n {\n return [];\n }", "function getVariableContainer() ;", "public function getGetVariables();", "public function getVariables()\n {\n \treturn isset($this->all['variables']) ? $this->all['variables'] : array();\n }", "public function getGlobals()\n {\n return array();\n }", "public function getGlobals()\n {\n return array();\n }", "function return_globals() {\r\n foreach ($GLOBALS as $k => $v) {\r\n\tif ($k !== 'GLOBALS')\r\n\t $arr[$k] = $v;\r\n }\r\n return @json_encode($arr);\r\n}", "public function getGlobals()\n {\n }", "public function getVars() {\n return array();\n }", "public function get() : array;", "public static function assign()\n {\n return array();\n }", "public function getDataWithTypeGlobal() {}", "public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }", "public static function get($_name) {\n\t\tif (!$_name) {\n\t\t\ttrigger_error(self::TEXT_Variable);\n\t\t\treturn array(FALSE,NULL);\n\t\t}\n\t\t$_name=self::resolve($_name);\n\t\t$_hash='var.'.self::hashCode(self::remix($_name));\n\t\t$_cached=Cache::cached($_hash);\n\t\tif ($_cached)\n\t\t\treturn unserialize(gzinflate(Cache::fetch($_hash)));\n\t\tif (preg_match('/^('.self::PHP_Globals.')\\b/',$_name,$_match)) {\n\t\t\t// Synchronize PHP and framework globals\n\t\t\tif (substr($_name,0,7)=='SESSION' && !strlen(session_id()))\n\t\t\t\tsession_start();\n\t\t\tself::$global[$_match[1]]=&$GLOBALS['_'.$_match[1]];\n\t\t}\n\t\treturn self::ref($_name);\n\t}", "protected function getVar(): array\n {\n if (!is_array($this->var)) {\n return [];\n }\n return $this->var;\n }", "public function getTemplateVariables(): array;", "abstract public function getPrimary(): array;", "protected function getLocalVars() {\r\n\t\treturn [\r\n\t\t\t'model' => & $this->model,\r\n\t\t\t'log' => & $this->log,\r\n\t\t];\r\n\t}", "public static function fromGlobals() {}", "function getArray();", "public function getGetVariables() {}", "function getPublicVarArray($dbConnect, $group, $name){\r\n $ret = array();\r\n\r\n $sql = \"select * from public_vars where gruppe = '\" .$group .\"' and name = '\" .$name .\"' ORDER BY sortnr\";\r\n $res = $dbConnect->executeQuery($sql);\r\n \r\n while ($row = mysql_fetch_array($res)){\r\n $ret[$row['titel']] = $row['text'];\r\n }\r\n\r\n return $ret; \r\n }", "public function globalData() {\n $globalData = array();\n\n $this->db->select('*');\n $this->db->from('settings');\n $result = $this->db->get();\n foreach ($result->result_array() as $value) {\n $global[$value['setting_name']] = $value['setting_value'];\n }\n return $global;\n }", "function getPrisijungimas(){\n global $prisijungimas;\n return $prisijungimas;\n}", "function getPrisijungimas(){\n global $prisijungimas;\n return $prisijungimas;\n}", "public function getGlobals() {\r\n\t\treturn [\r\n 'REQUEST' => [\r\n\t\t\t\t'url' => Response::$url\r\n\t\t\t],\r\n 'SESSION' => (isset($_SESSION)) ? $_SESSION : [],\r\n 'SERVER' => $_SERVER,\r\n 'INPUT' => App::$input,\r\n 'ENV' => App::$env\r\n ];\r\n }", "public function get(): array;", "public function get(): array;", "public function getVariableContainer() {}", "public function getVariables(): Mailcode_Variables_Collection_Regular;", "function get_global_assigned($key)\n {\n return $this->mGlobalAssignArray[$key];\n }", "public function getVars() {\r\n return $this->VARS;\r\n }", "public function provideVariables()\n {\n return [\n 'first test' => [\n 'variables' => [\n 'var1' => 'val1',\n 'var2' => 'val2',\n 'var3' => 'val3',\n ],\n ]\n ];\n }", "function getArray() {\n\treturn array('Red', 'Green', 'Blue');\n}", "function SM_getVar($varName) {\n global $SM_siteManager;\n return $SM_siteManager->inVarH->getVar($varName);\n}", "function test() {\n \t$foo = \"Value one\";\n \t$bar = \"Value two\";\n\n \treturn array($foo, $bar);\n }", "public static function getDefaultGlobals(){\n\t\treturn Array(\n\t\t);\n\t}", "function &arr(array $value, string $namespace = 'default'): array\n{\n $var = new Variable\\ArrayVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function values() : array;", "public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }", "static function getLangVars()\n\t{\n\t\treturn array(\"pc_mob\");\n\t}", "public function get_var() {\r\n\t\treturn $this->header_vars;\r\n\t}", "private function globals() {\n global $pagesArray;\n \n $xml = XML2Array::createArray(file_get_contents(GSDATAOTHERPATH.'website.xml'));\n \n // turn PRETTYURLS into boolean\n if ($xml['item']['PRETTYURLS']=='') $xml['item']['PRETTYURLS'] = false;\n else $xml['item']['PRETTYURLS'] = true;\n \n // globals array\n $globals = array(\n 'sitename' => $xml['item']['SITENAME']['@cdata'],\n 'siteurl' => $xml['item']['SITEURL']['@cdata'],\n 'template' => $xml['item']['TEMPLATE']['@cdata'],\n 'pages' => $pagesArray,\n 'permalink' => $xml['item']['PERMALINK'],\n 'prettyurls' => $xml['item']['PRETTYURLS'],\n );\n return $globals;\n }", "public function getData(): array\n {\n return $this->variables;\n }", "public function getVariables ()\n {\n /**\n * Specification:\n * - itemkey used to identify variable in your other functions\n * - type text, textarea, yesno, password, hidden (type hidden are variables used by CE and are required)\n * - description description of the variable, displayed in ClientExec\n * - encryptable used to indicate the variable's value must be encrypted in the database\n */\n $variables = array(\n lang('Name') => array(\n 'type' => 'hidden',\n 'description' => lang('Used by ClientExec to display plugin. It must match the action function name(s).'),\n 'value' => 'InterWorx-CP'\n ),\n lang('Description') => array (\n 'type' => 'hidden',\n 'description' => lang('Description viewable by admin in server settings'),\n 'value' => lang('InterWorx-CP integration.')\n ),\n lang('Access Key') => array (\n 'type' => 'textarea',\n 'description' => lang('Access key used to authenticate to server.'),\n 'value' => '',\n 'encryptable' => true\n ),\n lang('Actions') => array (\n 'type' => 'hidden',\n 'description' => lang('Actions currently available for this plugin.'),\n 'value' => 'Create,Delete,Suspend,UnSuspend'\n )\n );\n\n return $variables;\n }", "public static function get_template_global_variables()\n {\n return [\n 'TemplateConfig' => 'current_template_config',\n ];\n }", "public function identifier(): array;", "public function getInternalArray() {}", "abstract public static function getValues(): array;", "public function register()\n {\n return array(T_VARIABLE);\n\n }", "public static function get_template_global_variables()\n {\n return [\n 'FoxyStripe' => 'current_foxystripe_setting',\n ];\n }", "public function get_data(): array;", "public function get_data(): array;", "public function & toArray () {\n return $this->varContainer;\n }", "abstract public function getArray();", "public function getVars() : array {\n\n\t\t\treturn $this->variables;\n\t\t}", "public function getGlobals()\n\t{\n\t\treturn array(\n\t\t\t'uri' => $this->app->get('uri'),\n\t\t\t'uri.base.path' => $this->app->get('uri.base.path')\n\t\t);\n\t}", "public function get_variable() {\n\t\treturn $this->variable;\n\t}", "public function getVara() {\n return $this->iVara;\n }", "public function getGlobals()\n {\n return [\n 'snippets' => new SnippetsTwig($this->flextype)\n ];\n }", "function _getVar($name) {\n if( is_array($this->_vars) && isset($this->_vars[\"$name\"]) )\n return $this->_vars[\"$name\"];\n else\n return \"\";\n }", "function p(){\r\n\t//print_r($GLOBALS);\r\n\t$GLOBALS[\"a\"]=99;\r\n}", "function fiorello_mikado_get_global_variables() {\n\t\t$global_variables = array();\n\n\t\t$global_variables['mkdfAddForAdminBar'] = is_admin_bar_showing() ? 32 : 0;\n\t\t$global_variables['mkdfElementAppearAmount'] = -100;\n\t\t$global_variables['mkdfAjaxUrl'] = esc_url( admin_url( 'admin-ajax.php' ) );\n\n\t\t$global_variables = apply_filters( 'fiorello_mikado_filter_js_global_variables', $global_variables );\n\n\t\twp_localize_script( 'fiorello-mikado-modules', 'mkdfGlobalVars', array(\n\t\t\t'vars' => $global_variables\n\t\t) );\n\t}", "public function getVar($name) {\r\n return $this->VARS[$name];\r\n }", "function maquetador_estado( $cual){\n global $aEstado;\n return $aEstado[$cual];\n}", "static function getLangVars()\n\t{\n\t\treturn array(\"pc_vacc\", \"pc_hacc\");\n\t}", "function globalVariable(){\n global $b; //made it global\n echo $b;\n}", "public function extra(): array;", "function pnUserGetVar($name, $uid=-1)\r\n{\r\n static $vars = array();\r\n\r\n if (empty($name)) {\r\n return;\r\n }\r\n\r\n if ($uid == -1) {\r\n $uid = pnSessionGetVar('uid');\r\n }\r\n if (empty($uid)) {\r\n return;\r\n }\r\n\r\n // Get this user's variables if not already obtained\r\n if (!isset($vars[$uid])) {\r\n $vars[$uid] = pnUserGetVars($uid);\r\n }\r\n\r\n // Return the variable\r\n if (isset($vars[$uid][$name])) {\r\n return $vars[$uid][$name];\r\n } else {\r\n return;\r\n }\r\n}", "private function _getVariableStore()\n {\n return $this->_vars;\n }", "public function get_var ($a_name) {\n\t\t\n\t\tif ($this->loaded == 0) {\n\t\t\t$this->load();\n\t\t}\n\t\t\n\t\tif (isset($this->data[$a_name])) {\n\t\t\treturn $this->data[$a_name];\n\t\t}\n\t\t\n\t}", "public function getAsArray();", "function v1_get_data($object, $att_name, &$global_var) {\n\t\n\t// XML functions\n\trequire_once \"php/funcs/xml_funcs.php\";\n\t\n\t// Get code\n\t$code=xml_get_att($object, $att_name);\n\n\t// Store eruption in list\n\tarray_unshift($global_var, $code);\n}", "public function vars()\n {\n $v = &$this->vars;\n return $v;\n }", "function getTemplateVars() {\n return array();\n }", "public function vars()\n {\n return array_merge(parent::vars(), [\n 'user' => (string) $this->key->sysuser ? $this->key->sysuser->name : 'sitepilot',\n 'key' => (string) $this->key->key\n ]);\n }", "public function exportedVars(): iterable;", "protected function struct() {\n\t\tif (is_callable(CMS::$navigation_struct)) return call_user_func(CMS::$navigation_struct);\n\t\tif (is_string(self::$var)) return CMS::vars()->get(self::$var);\n\t\treturn array();\n\t}", "public function getValues(): array;", "public function getValues(): array;", "public static function get(): ?array\n {\n return self::$defined;\n }", "function runkit_superglobals() : array {\n}", "function &getVariables($question_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT svy_variable.*, svy_category.title FROM svy_variable LEFT JOIN \".\n\t\t\t\"svy_category ON svy_variable.category_fi = svy_category.category_id WHERE svy_variable.question_fi = %s \".\n\t\t\t\"ORDER BY svy_variable.sequence\",\n\t\t\tarray('integer'),\n\t\t\tarray($question_id)\n\t\t);\n\t\twhile ($row = $ilDB->fetchObject($result))\n\t\t{\n\t\t\t$result_array[$row->sequence] = $row;\n\t\t}\n\t\treturn $result_array;\n\t}", "function getConfig($key)\n{\n return $GLOBALS['config'][$key];\n}", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "protected function getVars()\n {\n return array_merge(parent::getVars(),get_object_vars($this));\n }", "public function register(): array;", "public function getAll(): array\n {\n return $this->variables;\n }", "abstract public function values(): array;", "public function state(): array;", "private function get_vars2export() {\n\t\treturn array(\n\t\t\t'var_id' => !empty($this->var_id) ? $this->var_id : FALSE\n\t\t);\n\t}", "public function register()\n {\n return array(T_GLOBAL);\n\n }", "public function getGlobals()\n {\n return self::$globalsCache;\n }", "public function arr()\n {\n return $this->array;\n }", "private static function &ref($_name,$_set=FALSE) {\n\t\t$_name=self::remix($_name);\n\t\tif (empty($_name))\n\t\t\treturn NULL;\n\t\t// Traverse array\n\t\tpreg_match_all(\n\t\t\t'/\\[[\\'\"]*(.*?)[\\'\"]*\\]/',$_name,$_matches,PREG_SET_ORDER\n\t\t);\n\t\tif ($_set)\n\t\t\t$_var=&self::$global;\n\t\telse\n\t\t\t$_var=self::$global;\n\t\tforeach ($_matches as $_match) {\n\t\t\tif (!$_set && (!is_array($_var) || !isset($_var[$_match[1]])))\n\t\t\t\t// No such element\n\t\t\t\treturn NULL;\n\t\t\tif ($_set)\n\t\t\t\t$_var=&$_var[$_match[1]];\n\t\t\telse\n\t\t\t\t$_var=$_var[$_match[1]];\n\t\t}\n\t\treturn $_var;\n\t}", "function get_array(){\n return $this->getArrayCopy();\n }" ]
[ "0.70819163", "0.70819163", "0.66705555", "0.66705555", "0.65966976", "0.6475029", "0.646486", "0.63875175", "0.6374696", "0.6342084", "0.6342084", "0.63091856", "0.62967837", "0.6276462", "0.62549055", "0.62433237", "0.6215405", "0.62122333", "0.62053347", "0.6186555", "0.6171926", "0.6168004", "0.61494917", "0.612887", "0.6128021", "0.6088496", "0.60875994", "0.6052681", "0.6049532", "0.6049532", "0.6039288", "0.6027382", "0.6027382", "0.6016096", "0.5973091", "0.596558", "0.5962929", "0.59516585", "0.5929914", "0.5888251", "0.5885901", "0.5880478", "0.5864418", "0.5845489", "0.5831301", "0.5824047", "0.577767", "0.57602996", "0.57590365", "0.5758633", "0.5756507", "0.5744802", "0.57398605", "0.57349473", "0.5725485", "0.57181287", "0.5715928", "0.5715928", "0.57073456", "0.5706165", "0.56898963", "0.56762564", "0.5675489", "0.5673705", "0.56651706", "0.5659882", "0.56557626", "0.5654977", "0.5636274", "0.56221443", "0.5620268", "0.56196964", "0.56195456", "0.5619039", "0.56165326", "0.56129766", "0.560767", "0.5604596", "0.55941486", "0.55927736", "0.5591841", "0.5590171", "0.5571011", "0.5568706", "0.5568706", "0.5563817", "0.5555312", "0.5553463", "0.55479217", "0.55431956", "0.55428976", "0.5539688", "0.55358374", "0.55289567", "0.55208796", "0.5513013", "0.5504818", "0.55048", "0.5501506", "0.55012923", "0.5499691" ]
0.0
-1
Methods for returning variables in super global arrays
public function getCOOKIE($name) { return $this->getGLOBAL('_COOKIE', $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function variables(): array;", "public function variables(): array;", "public function getGlobals();", "public function getGlobals();", "public function getGlobals()\n {\n }", "public function getGetVariables();", "public function getGlobals()\n {\n return [\n 'cache' => $this->flextype['cache'],\n ];\n }", "public function getVars() {\n return array();\n }", "public function getGlobals()\n {\n return array();\n }", "public function getGlobals()\n {\n return array();\n }", "public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }", "function getArray();", "abstract public function getArray();", "public function getAvailableVariables() :array\n {\n return [];\n }", "public function getGlobals() {\r\n\t\treturn [\r\n 'REQUEST' => [\r\n\t\t\t\t'url' => Response::$url\r\n\t\t\t],\r\n 'SESSION' => (isset($_SESSION)) ? $_SESSION : [],\r\n 'SERVER' => $_SERVER,\r\n 'INPUT' => App::$input,\r\n 'ENV' => App::$env\r\n ];\r\n }", "public function getGetVariables() {}", "public function get() : array;", "function return_globals() {\r\n foreach ($GLOBALS as $k => $v) {\r\n\tif ($k !== 'GLOBALS')\r\n\t $arr[$k] = $v;\r\n }\r\n return @json_encode($arr);\r\n}", "public function getInternalArray() {}", "abstract public static function getValues(): array;", "public static function assign()\n {\n return array();\n }", "public function getVariables()\n {\n \treturn isset($this->all['variables']) ? $this->all['variables'] : array();\n }", "public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }", "public function values() : array;", "protected function getVars()\n {\n return array_merge(parent::getVars(),get_object_vars($this));\n }", "public function getRetVals()\n {\n }", "protected function getLocalVars() {\r\n\t\treturn [\r\n\t\t\t'model' => & $this->model,\r\n\t\t\t'log' => & $this->log,\r\n\t\t];\r\n\t}", "abstract public function values(): array;", "public static function fromGlobals() {}", "function test() {\n \t$foo = \"Value one\";\n \t$bar = \"Value two\";\n\n \treturn array($foo, $bar);\n }", "public function getVars() {\r\n return $this->VARS;\r\n }", "abstract public function getPrimary(): array;", "private function globals() {\n global $pagesArray;\n \n $xml = XML2Array::createArray(file_get_contents(GSDATAOTHERPATH.'website.xml'));\n \n // turn PRETTYURLS into boolean\n if ($xml['item']['PRETTYURLS']=='') $xml['item']['PRETTYURLS'] = false;\n else $xml['item']['PRETTYURLS'] = true;\n \n // globals array\n $globals = array(\n 'sitename' => $xml['item']['SITENAME']['@cdata'],\n 'siteurl' => $xml['item']['SITEURL']['@cdata'],\n 'template' => $xml['item']['TEMPLATE']['@cdata'],\n 'pages' => $pagesArray,\n 'permalink' => $xml['item']['PERMALINK'],\n 'prettyurls' => $xml['item']['PRETTYURLS'],\n );\n return $globals;\n }", "public function extra(): array;", "public function get(): array;", "public function get(): array;", "public function get_data(): array;", "public function get_data(): array;", "public static function getDefaultGlobals(){\n\t\treturn Array(\n\t\t);\n\t}", "public function result() : array;", "private function _getData():array {\n\n # Set result\n $result = [];\n\n # Return result\n return $result;\n\n }", "function getArray() {\n\treturn array('Red', 'Green', 'Blue');\n}", "function getRetVals()\n\t\t{\n\t\treturn null;\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "function getRetVals()\r\n\t\t{\r\n\t\treturn null;\r\n\t\t}", "public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }", "public function getVars() : array {\n\n\t\t\treturn $this->variables;\n\t\t}", "function getVariableContainer() ;", "public function getVariables(): Mailcode_Variables_Collection_Regular;", "public function getData(): array\n {\n return $this->variables;\n }", "function getPrisijungimas(){\n global $prisijungimas;\n return $prisijungimas;\n}", "function getPrisijungimas(){\n global $prisijungimas;\n return $prisijungimas;\n}", "function extraVars() {\n\t\tif (func_num_args()) {\n\t\t\tif (is_array(func_get_arg(0))) {\n\t\t\t\t$this->_extraVars = func_get_arg(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_extraVars = array(func_get_arg(0)=>'');\n\t\t\t}\t\t\t\n\t\t}\n\t\telse return $this->_extraVars;\n\t}", "public function getTemplateVariables(): array;", "function get_array(){\n return $this->getArrayCopy();\n }", "function get_array(){\n return $this->getArrayCopy();\n }", "public function exportedVars(): iterable;", "public function getValues(): array;", "public function getValues(): array;", "public function provideVariables()\n {\n return [\n 'first test' => [\n 'variables' => [\n 'var1' => 'val1',\n 'var2' => 'val2',\n 'var3' => 'val3',\n ],\n ]\n ];\n }", "public function getDataArr(){\n\t\treturn $this->data_arr;\n\t}", "function getVars() {\n return $this->vars;\n }", "public function vars()\n {\n $v = &$this->vars;\n return $v;\n }", "public function &getVars() {\n return $this->app->getVars();\n }", "protected function getVar(): array\n {\n if (!is_array($this->var)) {\n return [];\n }\n return $this->var;\n }", "public function & toArray () {\n return $this->varContainer;\n }", "public function getInfo():array;", "public function aArray() {}", "protected abstract function getUserData(): array;", "protected function get_variables_for_view()\n\t{\n\t\t$ary = array();\n\t\tforeach (get_object_vars ($this->set) as $k => $v)\n\t\t\t$ary[$k] = $v;\n\t\treturn $ary;\n\t}", "public function &getVars()\n\t{\n\t\treturn $this->_vars;\n\t}", "public function getAsArray();", "public function getData() : array;", "public function getData() : array;", "protected function variables()\n {\n $this->variables['grid'] = $this;\n\n return $this->variables;\n }", "function runkit_superglobals() : array {\n}", "public function getGlobals()\n\t{\n\t\treturn array(\n\t\t\t'uri' => $this->app->get('uri'),\n\t\t\t'uri.base.path' => $this->app->get('uri.base.path')\n\t\t);\n\t}", "public function getVars(){\n return $this->getClassVars()->getValues();\n }", "public function getVariables ()\n {\n /**\n * Specification:\n * - itemkey used to identify variable in your other functions\n * - type text, textarea, yesno, password, hidden (type hidden are variables used by CE and are required)\n * - description description of the variable, displayed in ClientExec\n * - encryptable used to indicate the variable's value must be encrypted in the database\n */\n $variables = array(\n lang('Name') => array(\n 'type' => 'hidden',\n 'description' => lang('Used by ClientExec to display plugin. It must match the action function name(s).'),\n 'value' => 'InterWorx-CP'\n ),\n lang('Description') => array (\n 'type' => 'hidden',\n 'description' => lang('Description viewable by admin in server settings'),\n 'value' => lang('InterWorx-CP integration.')\n ),\n lang('Access Key') => array (\n 'type' => 'textarea',\n 'description' => lang('Access key used to authenticate to server.'),\n 'value' => '',\n 'encryptable' => true\n ),\n lang('Actions') => array (\n 'type' => 'hidden',\n 'description' => lang('Actions currently available for this plugin.'),\n 'value' => 'Create,Delete,Suspend,UnSuspend'\n )\n );\n\n return $variables;\n }", "public function getVars()\n {\n return $this->vars;\n }", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "public function globalData() {\n $globalData = array();\n\n $this->db->select('*');\n $this->db->from('settings');\n $result = $this->db->get();\n foreach ($result->result_array() as $value) {\n $global[$value['setting_name']] = $value['setting_value'];\n }\n return $global;\n }", "function getArrRet(){\n\n\t\treturn $this->arrRet;\n\t\n\t}", "public function vars()\n\t{\n\t\treturn $this->vars;\n\t}", "public function getVars()\n\t{\n\t\treturn $this->vars;\n\t}", "public function getDataWithTypeGlobal() {}", "public function parameters(): array;", "function getPublicVarArray($dbConnect, $group, $name){\r\n $ret = array();\r\n\r\n $sql = \"select * from public_vars where gruppe = '\" .$group .\"' and name = '\" .$name .\"' ORDER BY sortnr\";\r\n $res = $dbConnect->executeQuery($sql);\r\n \r\n while ($row = mysql_fetch_array($res)){\r\n $ret[$row['titel']] = $row['text'];\r\n }\r\n\r\n return $ret; \r\n }", "public function exibir(){\n\t\treturn array(\n\t\t\t\"modelo\" => $this->getModelo(),\n\t\t\t\"motor\" => $this->getMotor(), \n\t\t\t\"ano\" => $this->getAno()\n\t\t);\n\t}", "public function arr()\n {\n return $this->array;\n }", "private function getExtraArray() {\n\t\treturn $this->extraArray;\n\t}" ]
[ "0.7648373", "0.7648373", "0.710164", "0.710164", "0.69003475", "0.68881285", "0.6883657", "0.6852582", "0.6838942", "0.6838942", "0.68377554", "0.68244547", "0.6745534", "0.66831845", "0.66654193", "0.6621989", "0.6596047", "0.6590983", "0.6588172", "0.65783304", "0.6570518", "0.65366006", "0.65109557", "0.6502003", "0.6475127", "0.646747", "0.64655566", "0.64462644", "0.6424762", "0.639885", "0.6394211", "0.63807875", "0.6366595", "0.6350922", "0.6283576", "0.6283576", "0.6278675", "0.6278675", "0.6265038", "0.62575257", "0.62417537", "0.6238532", "0.6230044", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6205793", "0.6203421", "0.6187118", "0.6175432", "0.617266", "0.6171924", "0.61673546", "0.61673546", "0.61566895", "0.6142576", "0.61355317", "0.61355317", "0.6135145", "0.6108414", "0.6108414", "0.6105462", "0.60998994", "0.6091832", "0.60822403", "0.60787165", "0.6075876", "0.60750157", "0.606194", "0.60585356", "0.60507214", "0.604857", "0.60434175", "0.6043377", "0.60315657", "0.60315657", "0.6027961", "0.601395", "0.60060805", "0.60042065", "0.5998063", "0.5994021", "0.59871894", "0.5985719", "0.5983434", "0.5979668", "0.5976693", "0.5976318", "0.59698915", "0.5969321", "0.5964693", "0.5963756", "0.59597516" ]
0.0
-1
Return an instance of object
public static function getInstance() { $class_name = get_called_class(); if (empty(self::$instances[$class_name])) { self::$instances[$class_name] = new $class_name(); } return self::$instances[$class_name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function newInstance(): object;", "public function getInstance(): object;", "abstract public function instance();", "public function instance();", "abstract public function get_instance();", "public function construct()\n {\n return $this->object;\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function getObject(): object;", "public function getInstance(): object\n {\n }", "function instance($obj) {\n\tif (is_string($obj)) {\n\t\t$obj = new $obj;\n\t}\n\treturn $obj;\n}", "public function newInstance();", "public function newInstance();", "public static function getInstance(): object\n {\n if (!isset(static::$instance[static::$class])) {\n static::$instance[static::$class] = new static::$class(...func_get_args());\n }\n\n return static::$instance[static::$class];\n }", "public function getObject();", "public function getObject();", "public function create(){\r\n\treturn new $this->class();\r\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public static function instance();", "public function getObject() {}", "public function getObject() {}", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }", "function instance($obj) {\n if (is_string($obj)) {\n $obj = new $obj;\n }\n return $obj;\n}", "public static function instance() {\n\t\treturn new self;\n\t}", "function get_instance($class)\n {\n }", "public function getInstance(): mixed;", "public function &create()\n {\n $obj = null;\n\n if (class_exists($this->_class_name)) {\n // Assigning the return value of new by reference\n $obj = new $this->_class_name();\n }\n\n return $obj;\n }", "public function as_object()\n {\n $this->return_as = 'object';\n return $this;\n }", "public function __construct()\n {\n if (!self::$instance) {\n self::$instance = $this;\n //echo \"Create new object\";\n return self::$instance;\n } else {\n //echo \"Return old object\";\n return self::$instance;\n }\n }", "function get_instance()\r\n{\r\n\t\r\n}", "abstract public function object();", "public function getObj();", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public function as_object($class = TRUE, $arguments = array());", "public function instance() {\n\t\t\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public static function newInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public function current() {\t\t\n\t\treturn new $this->object_class($this->storage);\n\t}", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public function getInstance($objectClass);", "public function getObject()\n {\n return $this;\n }", "public function newInstance()\n {\n return new self();\n }", "public static abstract function createInstance();", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public static function get_instance ();", "public function getObject()\n\t{\n\t\t// Create the OPF instance.\n\t\treturn new Opf_Class($this->_serviceLocator->get('template.Opt'));\n\t}", "protected function getObject()\n {\n return $this;\n }", "public static function i()\n\t{\n\t\treturn new self;\n\t}", "public static function fetch()\n {\n if (!isset(self::$instance)) {\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public function getInstance(/* ... */)\n {\n $reflection = new ReflectionClass($this->getClass());\n return $reflection->newInstanceArgs(func_get_args());\n }", "abstract protected function createObject();", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function toObject(){\r\n $args = func_get_args();\r\n \r\n if(count($args) >=2){\r\n $className = '\\\\'.str_replace('.', '\\\\', $args[0]);\r\n $refClass = new \\ReflectionClass($className);\r\n $toObjInstance = $refClass->newInstance();\r\n\r\n unset($args[0]);\r\n \r\n foreach($args as $arg){\r\n \r\n if(is_object($arg)){\r\n $arg = Obj::getProperties($arg);\r\n }\r\n \r\n if(is_array($arg)){\r\n foreach($arg as $propertyName=>$propertyValue){\r\n if($refClass->hasProperty($propertyName)){\r\n $property = $refClass->getProperty($propertyName);\r\n $property->setAccessible(true);\r\n $property->setValue($toObjInstance, $propertyValue);\r\n }\r\n }\r\n }\r\n }\r\n return $toObjInstance;\r\n }\r\n }", "public static function init() \n {\n if (!isset(self::$o_instance)) \n\t\t{\n $c = __CLASS__;\n self::$o_instance = new $c;\n }\n\n return self::$o_instance;\n }", "public static function getInstance(): self;", "public function & create($class) {\n\t\t# Add namepsace to class\n\t\t$objectFactoryClass = $this->getFactoryClassName($this->getFactoryClass($class));\n\t\t# Creating Factory object\n\t\t$objectFactory = new $objectFactoryClass();\n\t\t# Creating orignal object\n\t\t$object = $objectFactory->getInstance($this);\n\t\t# Returning object\n\t\treturn $object;\n\t}", "public static function getInstance()\n {\n $object = __CLASS__;\n self::$instance = new $object();\n return self::$instance;\n }", "public static function getInstance()\n {\n $object = __CLASS__;\n self::$instance = new $object();\n return self::$instance;\n }", "public function getObject(): mixed\n {\n // how can i derive this class from a string?\n if (!$object = call_user_func('App\\\\'.ucfirst($this->object_type).'::find', $this->object_id)) {\n return $object;\n }\n\n return null;\n }", "public static function instance() {\n\t\tif (!Registry::exists($class=get_called_class())) {\n\t\t\t$ref=new \\Reflectionclass($class);\n\t\t\t$args=func_get_args();\n\t\t\tRegistry::set($class,\n\t\t\t\t$args?$ref->newinstanceargs($args):new $class);\n\t\t}\n\t\treturn Registry::get($class);\n\t}", "function get($object_name){\r\n if(isset($this->singleton_instances[$object_name]))\r\n return $this->singleton_instances[$object_name];\r\n \r\n $definition = parent::get($object_name);\r\n $this->singleton_instances[$object_name] = new lako_object($definition);\r\n return $this->singleton_instances[$object_name];\r\n }", "public static function make() {\n return new self();\n }", "static function get_instance() {\n\t\tstatic $instance;\n\t\t$class = __CLASS__;\n\t\tif ( ! is_a( $instance, $class ) ) {\n\t\t\t$instance = new $class;\n\t\t}\n\t\treturn $instance;\n\t}", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "function getObject();", "function getObject();", "public static function new(){\n self::$instance = new self();\n return self::$instance;\n }", "public static function getInstance() {\n return new self();\n }", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "public static function instance() {\n return new static();\n }", "public static function me(): Instantiatable\n {\n return self::instantiate();\n }", "public function getInstance()\n {\n return $this;\n }", "public static function factory()\n {\n return new self;\n }", "public function get_object(): ActiveRecordInterface\n {\n\n if ($this->is_new()) {\n throw new RunTimeException(sprintf(t::_('The method %s() can not be invoked on new instances.'), __METHOD__));\n }\n $class = ActiveRecord::get_class_name($this->object_alias_class_id);\n return new $class($this->object_alias_object_id);\n }", "public static function get_instance() {\n\t\tif (is_null(self::$instance)) {\n\t\t\t$className = __CLASS__;\n self::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function getInstance()\n {\n return new self();\n }", "public static function inst()\n {\n return new static();\n }", "public static function instantiateObject()\n {\n if (static::$bxObject) {\n return static::$bxObject;\n }\n\n if (class_exists(static::$objectClass)) {\n return static::$bxObject = new static::$objectClass();\n }\n\n throw new LogicException('Object initialization failed');\n }", "static function create(): self;", "public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function getInstance () {\n\t\tif(!isset(self::$oInstance)){\n\t\t\t$sClass = __CLASS__;\n\t\t\tself::$oInstance = new $sClass();\n\t\t}\n\t\treturn self::$oInstance;\n\t}", "public static function &CreateInstanceIfNotExists(){\n static $oInstance = null;\n\n if(!$oInstance instanceof self)\n $oInstance = new self();\n\n return $oInstance;\n }", "public static function instance()\n {\n return new static;\n }", "public static function instance()\n {\n return new static;\n }", "public static function getInstance()\n\t{\n\t\tif(!isset(self::$instance)){\n\t\t\t$object = __CLASS__;\n\t\t\tself::$instance = new $object;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function create(){\r\n\t\tif(self::$instance === null){\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}", "public static function createInstance()\n {\n return new self();\n }", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();" ]
[ "0.79393303", "0.7881171", "0.7769631", "0.7508021", "0.74731755", "0.74381894", "0.73974174", "0.73840225", "0.73424196", "0.7328931", "0.72247314", "0.7096461", "0.7096461", "0.7035041", "0.70289683", "0.70289683", "0.70272654", "0.70269793", "0.7020026", "0.7016876", "0.7016876", "0.70153654", "0.69943106", "0.69567835", "0.69101393", "0.6875587", "0.6872248", "0.68601334", "0.6847702", "0.6821535", "0.6794254", "0.6789369", "0.6752891", "0.6702974", "0.66953003", "0.6626592", "0.66193825", "0.66075444", "0.66075444", "0.65903324", "0.6582611", "0.6580839", "0.65808195", "0.65808195", "0.65808195", "0.65808195", "0.65807706", "0.65698797", "0.6554823", "0.6543949", "0.6543646", "0.6520978", "0.65046877", "0.64995086", "0.6475336", "0.6449489", "0.6447928", "0.6441793", "0.64370704", "0.6436737", "0.6415457", "0.6392558", "0.63857174", "0.63824224", "0.6380658", "0.6380658", "0.63766736", "0.63610643", "0.63578683", "0.6349474", "0.63479364", "0.6345067", "0.6345067", "0.63424045", "0.63424045", "0.63423127", "0.6338873", "0.63378274", "0.63367116", "0.63328654", "0.6332353", "0.6331234", "0.63263303", "0.6324522", "0.6323531", "0.6320643", "0.6320212", "0.6312973", "0.6310799", "0.6310168", "0.63023466", "0.6296072", "0.6296072", "0.6293065", "0.62790513", "0.62773585", "0.6265344", "0.6265344", "0.6265344", "0.6265344", "0.6265344" ]
0.0
-1
Reset database to known state
public function setUp() { TestConfiguration::setupDatabase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function reset()\n {\n self::$dbm = null;\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 }", "function resetEverything() {\n\t\texecSql(\"drop table gamestate_characters\");\n\t\texecSql(\"create table gamestate_characters select * from initialstate_players\");\n\t\t$this->printState();\n\n\t}", "public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\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 reset()\n {\n delete_option($this->dbVersionKey);\n }", "function databaseReset() {\n return $this->db->Connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n }", "protected function dbReset() {\r\n $this->query_result = '';\r\n }", "public function shutdown()\n {\n $this->dbTable = null;\n }", "static function empty_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t// be reset whenever the database is cleaned out\n\t\t\tforeach(array_merge(ClassInfo::subclassesFor('DataExtension'), ClassInfo::subclassesFor('DataObject')) as $class) {\n\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t}\n\t\t}\n\t}", "public function reset() {\n $this->databasefieldcount = 0;\n $this->databaserecordcount = 0;\n\n parent::reset();\n }", "protected function reset() {\n //query builder reset\n $this->queryBuilder->reset();\n $this->numRows = 0;\n $this->insertId = null;\n $this->query = null;\n $this->result = array();\n $this->data = array();\n $this->queryCount = 0;\n }", "abstract public function unloadDatabase();", "public function clear()\n {\n $this->conn->flushDb();\n }", "public static function dbClear(){\n\t\tif (App::runningUnitTests()) {\n\t\t\tself::clearModelTables(TestSettings::$modelTables);\n\t\t\tself::clearTables(TestSettings::$pivotTables);\n\t\t}\n\t}", "public function reset() : void {\n\t\tforeach ($this->propertyMap as $propertyName => $dbName) {\n\t\t\t$this->{$propertyName} = null;\n\t\t}\n\t}", "public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}", "public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}", "public function resetDbSessions()\n {\n $ttl = (int)Phpr::$config->get('STORED_SESSION_TTL', 3);\n Db_DbHelper::query(\n 'delete from db_session_data where created_at < DATE_SUB(now(), INTERVAL :seconds SECOND)',\n array('seconds' => $ttl)\n );\n }", "public function reset()\n\t{\n\t\t$this->queries = [];\n\t\t$this->count = [\n\t\t\t'total' => 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0\n\t\t];\n\n\t\t$this->modelsActions = [];\n\t\t$this->modelsCount = [\n\t\t\t'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => []\n\t\t];\n\n\t\t$this->nextQueryModel = null;\n\t}", "public function reset()\n {\n // reset properties\n $this->query = '';\n $this->rewind();\n \n // release result resource\n if (!empty($this->db) && !empty($this->result) &&\n is_resource($this->db) && is_resource($this->result)) {\n $this->free_result();\n }\n }", "public function clearDatabase()\n {\n $purger = new ORMPurger($this->getEntityManager());\n $purger->purge();\n }", "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 resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}", "function ClearDatabase() {\n $link = mysql_connect($this->servername, $this->username, $this->password);\n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n \n //Make Players the current database\n $db_selected = mysql_select_db($this->dbname, $link);\n \n $delete = \"DELETE FROM Player\";\n mysql_query($delete, $link);\n \n mysql_close($link);\n \n $this->GenerateJSONResponseData();\n }", "public function reset_db_sessions()\n\t{\n\t\t$ttl = (int)Phpr::$config->get('STORED_SESSION_TTL', 3);\n\t\tDb_Helper::query('delete from db_session_data where created_at < DATE_SUB(now(), INTERVAL :seconds SECOND)', array('seconds'=>$ttl));\n\t}", "public static function unsetDbConnection(){\n\t\tself::$db=null;\n\t}", "public function clearCheckDatabase()\n {\n $this->dbCheck = null;\n // force the check even if the application is already installed\n // this is required to avoid collisions during the installation\n $this->installed = false;\n }", "public function resetDatabase()\n\t{\n\t\tself::$test->reset1();\n\n\t\treturn $this;\n\t}", "function workflow_reset()\n{\n\tglobal $db;\n\t\n\t$columns['status']\t= 'ready';\n\t$columns['request'] = 'done';\n\t$db->update(\"station\",$columns);\n}", "public function reset()\n {\n $this->_metaData = array();\n $this->_columnMap = array();\n }", "public function reset()\n\t{\n\t\tforeach ($_SESSION as $name=>$value)\n\t\t\tunset($_SESSION[$name]);\n\t\t\t\n\t\t$this->reset_db_sessions();\n\t}", "public function uninitialize()\n {\n $table_name = $this->get_table_name();\n $sql = \"DROP TABLE IF EXISTS $table_name;\";\n\n if (!is_null($this->wpdb)) {\n $this->wpdb->query($sql);\n }\n }", "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "protected function _teardownDb()\n {\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n try {\n Sopha_Db::deleteDb($db, $host, $port);\n } catch (Sopha_Db_Exception $e) {\n if ($e->getCode() != 404) {\n throw $e;\n }\n }\n }", "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "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 }", "public function reset()\n {\n $this->values[self::SCHEMA] = null;\n }", "protected function __clean_database()\n {\n $this->db = null;\n\n return true;\n }", "public function flushDataStore()\n {\n $this->database->flushAll(); \n }", "public function unload()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->orm = null;\n\n $this->multiRef = [];\n $this->i18n = null;\n\n }", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::getConn()->databaseExists($dbName)) {\n\t\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t\t// be reset whenever the database is killed\n\t\t\t\tforeach(ClassInfo::subclassesFor('DataExtension') as $class) {\n\t\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t\t}\n\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "public function reset() {\n\t\t\tforeach ( $this->dbFields as $property ) {\n\t\t\t\t$this->$property = '';\n\t\t\t}\n\t\t\t$this->pageData = null;\n\t\t\t$this->attributes = null;\n\t\t\t// TODO: set exdata to array()?\n\t\t}", "public function resetTable();", "function clearSQL() {}", "function userports_clear_db() {\n}", "protected function tearDown(): void\n {\n $this->dbClear();\n }", "public function emptyDb()\n {\n $this->client->run('MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r,n', null, null);\n }", "protected function resetExistingTables()\n {\n $this->existingTables = null;\n }", "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 resetData();", "private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}", "public function reset(){\r\n try{\r\n self::$PDO->reset();\r\n }\r\n catch(Exception $e){\r\n self::$error_message = $e->getMessage();\r\n self::reportError();\r\n }\r\n }", "function clear() {\r\n /* clear datasource. you should call this before calling another populate() to avoid datasource gets appended\r\n */\r\n $this->ds = new DataSource;\r\n $this->db_count = 0;\r\n }", "private function primeDatabaseServer(): void\n {\n try {\n $this->connection->getSchemaManager()->dropAndCreateDatabase(BuoyRepository::BUOY_DATABASE_NAME);\n } catch (\\Exception $e) {\n return;\n }\n }", "public function disconnect() {\n $this->db = null;\n }", "public static function reset()\n\t{\n\t\tself::engine()->reset();\n\t}", "protected function tearDown()\n {\n ORM::reset_db();\n }", "public function resetState() {}", "public function tearDown(): void\n {\n unset($this->db);\n }", "function _clearDBCache() {\n $db =& ConnectionManager::getDataSource($this->useDbConfig);\n $db->_queryCache = array();\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshInMemoryDatabase()\n {\n $this->artisan('migrate',[\n '--path' => 'database/migrations/tenant'\n ]);\n\n $this->app[Kernel::class]->setArtisan(null);\n }", "function SQLReset()\n\t{\n\t\t$sql_1 = 'TRUNCATE TABLE `egl_inetopia_newsletter`';\n\t\t$sql_2 = 'TRUNCATE TABLE `egl_inetopia_newsletter_drafts`';\n\t\t\n\t\t\n\t\tglobal $gl_oVars;\n\t\t\n\t\t// interface correct?\n\t\tif( $gl_oVars->cDBInterface )\n\t\t{\n\t\t\tif( $gl_oVars->cDBInterface->Query( $sql_1 ) )\n\t\t\t{\n\t\t\t\tif( $gl_oVars->cDBInterface->Query( $sql_2 ) )\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}//if\n\t\t\t}//if\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDEBUG( MSGTYPE_ERROR, __FILE__, __LINE__, \"Couldn't execute SQL reset by Module [\".$this->oInfos->ID.\"] - DBInterface not initialised\" );\n\t\t}\n\t\treturn 0;\n\t}", "public function resetInitial()\n {\n // drop column\n DB::query()->selectRaw('SET SQL_SAFE_UPDATES = 0;');\n QueryProfile::query()->where('initial_avg_position', '!=', 0)->update(['initial_avg_position' => 0]);\n QueryProfile::query()->where('initial_ctr_value', '!=', 0)->update(['initial_ctr_value' => 0]);\n QueryProfile::query()->where('initial_impressions', '!=', 0)->update(['initial_impressions' => 0]);\n DB::query()->selectRaw('SET SQL_SAFE_UPDATES = 1;');\n }", "public function reset() {\n\n\t\t$type = Dba::escape($this->type);\n\t\t$uid = Dba::escape($this->uid);\n\n\t\t$sql = \"DELETE FROM `image` WHERE `object_id`='$uid' AND `object_type`='$type'\";\n\t\t$db_results = Dba::write($sql);\n\n\t}", "public function disconnect() {\n $this->db = null;\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}", "protected function tearDown()\n {\n \n unset($this->object->db);\n\n }", "public function flushdb(){\n\n //get flush db\n $this->client->flushdb();\n }", "public function refreshDatabase()\n {\n $this->validateDatabase();\n $this->copySqliteCreate();\n $this->runMigrations();\n\n copy($this->baseSqlite(), $this->copySqlite());\n }", "function clear() {\n\n switch ($this->type) {\n case 'sqlite':\n case 'mysql':\n $query[0] = 'DROP TABLE `enrolled`;';\n\n $query[1] = 'DROP TABLE `paid`;';\n\n $query[2] = 'DROP TABLE `admin`;';\n\n $query[3] = 'DROP TABLE `log`';\n\n $query[4] = 'DROP TABLE `stage`';\n\n\t\t\t\t$query[5] = 'DROP TABLE `guest`';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $drop) {\n $this->query($drop);\n }\n\n /**\n * Integrity Checking goes here\n */\n\n }", "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$this->call('DatabaseResetter');\n\t}", "public function reset()\n {\n $this->values[self::_OWNER] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_TYPE_ID] = null;\n $this->values[self::_TEAM] = array();\n $this->values[self::_STATE] = null;\n $this->values[self::_STATE_END_TS] = null;\n $this->values[self::_PRODUCE_SPEED] = null;\n $this->values[self::_STORAGE] = null;\n }", "protected function resetStatement(): void\n {\n $this->statement = null;\n }", "protected function tearDown() {\r\n\t\t$this->dropDatabase();\r\n\t\tunset ( $this->cacheDatabaseEntryRepository );\r\n\t\t\r\n\t}", "abstract public function FlushToDatabase();", "public function resetDbName() {\n $this->setDbName(null);\n }", "public function cleanState()\n {\n $this->state = array();\n $this->saveState();\n }", "private function clear_dummy_data()\n {\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "private function closeConnection(){\n $this->db =null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RSEED] = null;\n $this->values[self::_HERO_BASES] = array();\n $this->values[self::_HERO_DYNAS] = array();\n }", "protected function doPurgeDatabase()\n {\n }", "public function reset()\n {\n // don't start a new session to remove something that isn't there\n $this->lazyStart();\n $this->_store = array();\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 reset(): void\n {\n $this->level = 0;\n $this->statements = [];\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_LAST_AUTO_REFRESH_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_LAST_MANUAL_REFRESH_TIME] = null;\n $this->values[self::_TODAY_TIMES] = null;\n $this->values[self::_CURRENT_GOODS] = array();\n }", "private function cleanUpDatabase(){\n\t\t$this->cleanUpSessions();\n\t\t// reports older 90 days\n\t\t$this->cleanUpReports();\n\t\t// delete unregistered users without actions older 30 days\n\t\t$this->cleanUpUsers();\n\t}", "public function reset()\n\t{\n\t\t$this->get(1);\n\t}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}" ]
[ "0.7485755", "0.73346984", "0.7331069", "0.7276688", "0.72642976", "0.7081225", "0.7026163", "0.69762933", "0.69408697", "0.69161314", "0.68803287", "0.68199927", "0.67913103", "0.6765225", "0.6739657", "0.6739456", "0.6738869", "0.6738869", "0.6693763", "0.6687193", "0.6685623", "0.66686654", "0.66649836", "0.6622356", "0.6602201", "0.65970814", "0.65883636", "0.65761584", "0.65560955", "0.6553654", "0.65106255", "0.6470779", "0.64706284", "0.64698565", "0.64691985", "0.64453316", "0.64308906", "0.6426051", "0.64250773", "0.642285", "0.63958824", "0.63928974", "0.639049", "0.63881856", "0.63832724", "0.63807654", "0.6373758", "0.6367497", "0.63577104", "0.634429", "0.63437575", "0.63382083", "0.63318706", "0.63311464", "0.62920475", "0.6283851", "0.62771803", "0.6275182", "0.62642926", "0.62563425", "0.6254889", "0.6229496", "0.6229496", "0.6229496", "0.6229496", "0.6229496", "0.6229496", "0.6229496", "0.6229496", "0.6220251", "0.6214998", "0.62113607", "0.6210914", "0.6207774", "0.6183525", "0.616798", "0.6166431", "0.6165371", "0.61572766", "0.6152543", "0.6147856", "0.61395866", "0.61321175", "0.61199105", "0.6098986", "0.60984826", "0.60957074", "0.60758036", "0.6065007", "0.6065006", "0.6064663", "0.60536975", "0.6050037", "0.60467863", "0.6040956", "0.6036094", "0.6036094", "0.6036094", "0.60355943", "0.60355943", "0.60355943" ]
0.0
-1
Tests impact of several boolean settings simultaneously.
public function testSpecifyingFieldNameSpecifyingBoolValues1() { $testName = 'MyField'; $fieldSetting = array( 'label' => 'Label', 'footnote' => 'Footnote', 'hide' => false, 'readOnly' => false, 'recommended' => true); $field = new Application_Model_Field($testName, $fieldSetting); // Test all methods that don't have unmet preconditions. $this->assertSame($testName, $field->getDbFieldName()); $this->assertFalse($field->isReadOnly()); $this->assertTrue($field->isVisible()); $this->assertSame("Label", $field->getLabel()); $this->assertSame("Footnote", $field->getFieldFootnote()); // Recommended will not be true because the field is not in the table $this->assertFalse($field->isRecommended()); $this->assertFalse($field->isDiscouraged()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetAndRetrieveBoolean(): void\n {\n $key = \"A test key\";\n $this->testNotStrict->set($key, true);\n $actual = $this->testNotStrict->get($key);\n $this->assertTrue($actual);\n $this->testNotStrict->set($key, false);\n $actual = $this->testNotStrict->get($key);\n $this->assertFalse($actual);\n }", "function wpsl_bool_check( $atts ) {\n\n foreach ( $atts as $key => $val ) {\n if ( in_array( $val, array( 'true', '1', 'yes', 'on' ) ) ) {\n $atts[$key] = true;\n } else if ( in_array( $val, array( 'false', '0', 'no', 'off' ) ) ) {\n $atts[$key] = false;\n }\n }\n\n return $atts;\n}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function assertAllTrue()\n {\n $bools = func_get_args();\n\n if (is_array(func_get_arg(0))) {\n $bools = func_get_arg(0);\n }\n\n return ! collect($bools)->contains(false);\n }", "public function testGetBoolTrue(): void\n {\n // 1\n $_SERVER['MY_KEY'] = 1;\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // true\n $_SERVER['MY_KEY'] = true;\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // '1'\n $_SERVER['MY_KEY'] = '1';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'true'\n $_SERVER['MY_KEY'] = 'true';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'yes'\n $_SERVER['MY_KEY'] = 'yes';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'on'\n $_SERVER['MY_KEY'] = 'on';\n $this->assertTrue(Env::getBool('MY_KEY'));\n }", "protected function fix_boolean_settings() {\n\t\tforeach ($this->boolean_settings as $setting) {\n\t\t\t$val = $this->get_setting($setting);\n\t\t\tif ($val) {\n\t\t\t\t$this->add_setting($setting, filter_var($val, FILTER_VALIDATE_BOOLEAN));\n\t\t\t}\n\t\t}\n\t}", "function test_settings($settings)\n {\n //can even register results, so you can give errors or whatever if you want..\n geoAdmin::m('I\\'m sure the settings are just fine. (CHANGE THIS! FOR DEMONSTRATION ONLY)');\n\n return true;\n }", "public function testConvertToBoolean() {\r\n $data = array(\r\n true => true,\r\n false => false,\r\n 'true' => true,\r\n 'false' => false,\r\n 'test' => true,\r\n 0 => false,\r\n '0' => false,\r\n 1 => true\r\n );\r\n\r\n foreach ($data as $value => $expected) {\r\n $this->assertSame($expected, $this->_utils->convertToBoolean($value));\r\n }\r\n }", "public function canBeDisabledAndEnabled() {}", "public function testStatusFlags()\n {\n $page = SiteTree::create();\n $page->Title = 'stuff';\n DBDatetime::set_mock_now('2016-01-16 00:00:00');\n\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = '2016-02-01 00:00:00';\n $page->UnPublishOnDate = null;\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = null;\n $page->UnPublishOnDate = '2016-02-01 00:00:00';\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = '2016-02-01 00:00:00';\n $page->UnPublishOnDate = '2016-02-08 00:00:00';\n $flags = $page->getStatusFlags(false);\n $this->assertContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n }", "function assertTrue($bool){\r\n $this->log($bool);\r\n if($bool){\r\n $status = \"passed\";\r\n }\r\n else{\r\n $status = \"failed\";\r\n }\r\n \r\n $this->updateStatus($status);\r\n $this->updateAction(__FUNCTION__);\r\n \r\n }", "public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decide(FLAG_KEY, $options);\n\n $this->printDecision($decision, 'Modify the OptimizelyDecideOptions and check the decision variables expected');\n }", "private function test()\n {\n return (bool) Mage::getStoreConfig('actions/settings/test');\n }", "function testValueForTrue(){\n $this->assertTrue(true);\n }", "public function testSpecifyingFieldNameSpecifyingBoolValues2()\n {\n $testName = 'MyField';\n $fieldSetting = array(\n 'label' => 'Label',\n 'footnote' => 'Footnote',\n 'hide' => true,\n 'readOnly' => true,\n 'recommended' => false,\n 'discouraged' => true);\n\n $field = new Application_Model_Field($testName, $fieldSetting);\n\n // Test all methods that don't have unmet preconditions.\n $this->assertSame($testName, $field->getDbFieldName());\n $this->assertTrue($field->isReadOnly());\n $this->assertFalse($field->isVisible());\n $this->assertSame(\"Label\", $field->getLabel());\n $this->assertSame(\"Footnote\", $field->getFieldFootnote());\n $this->assertFalse($field->isRecommended());\n // Discouraged will not be true because the field is not in the table\n $this->assertFalse($field->isDiscouraged());\n $this->_assertNoMetaInfo($field);\n }", "function serendipity_ini_bool($var) {\n return ($var === 'on' || $var == '1');\n}", "public function testGetBoolFalse(): void\n {\n // 0\n $_SERVER['MY_KEY'] = 0;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // false\n $_SERVER['MY_KEY'] = false;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // '0'\n $_SERVER['MY_KEY'] = '0';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'false'\n $_SERVER['MY_KEY'] = 'false';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'no'\n $_SERVER['MY_KEY'] = 'no';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'off'\n $_SERVER['MY_KEY'] = 'off';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'unknown'\n $_SERVER['MY_KEY'] = 'unknown';\n $this->assertFalse(Env::getBool('MY_KEY'));\n }", "public function testFilterCheckboxesToggleSettings() {\n $page = $this->getSession()->getPage();\n $assert_session = $this->assertSession();\n\n $this->createNewTextFormat($page, $assert_session);\n\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $page->find('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertFalse($media_tab->isVisible(), 'Media filter settings should not be present because media filter is not enabled');\n\n $this->assertTrue($page->hasUncheckedField('filters[media_embed][status]'));\n $page->checkField('filters[media_embed][status]');\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $assert_session->waitForElementVisible('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertTrue($media_tab->isVisible(), 'Media settings should appear when media filter enabled');\n\n $page->uncheckField('filters[media_embed][status]');\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $page->find('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertFalse($media_tab->isVisible(), 'Media settings should be removed when media filter disabled');\n }", "public function provideBoolValues(): array\n {\n return [\n [true],\n [false],\n ];\n }", "public function check() {\n\t\t$values = array($this->value);\n\t\tif ($this->value == 'On') {\n\t\t\t$values[] = '1';\n\t\t}\n\t\telseif ($this->value == 'Off') {\n\t\t\t// TODO check it, empty is default value\n\t\t\t$values[] = '';\n\t\t\t$values[] = '0';\n\t\t}\n\t\tif (!in_array(ini_get($this->name), $values)) {\n\t\t\t$this->log('Setting '.$this->name.'='.ini_get($this->name).'. \"'.$this->value.'\" is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$this->log('Setting '.$this->name.' is passed', Project::MSG_VERBOSE);\n\t\treturn 0;\n\t}", "public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decideForKeys(FLAG_KEYS, $options);\n\n $this->printDecisions($decision, \"Modify the OptimizelyDecideOptions and check all the decisions' are as expected\");\n }", "static function unittest_nonEmptyBoolGuarantee () {\n PhlintTest::assertIssues('\n $foo = false;\n if (rand(0, 1))\n $foo = new ArrayObject();\n if (!empty($foo))\n foreach ($foo as $bar) {}\n ', [\n ]);\n }", "public function testIsBoolean() {\n\t\t$result = _::isBoolean(true);\n\t\t$this->assertTrue($result);\n\n\t\t// test that false is a boolean\n\t\t$result = _::isBoolean(false);\n\t\t$this->assertTrue($result);\n\n\t\t// test that null is not a boolean\n\t\t$result = _::isBoolean(null);\n\t\t$this->assertFalse($result);\n\t}", "public function testOn()\n\t{\n\t\t$this->assertTrue(Catapult\\Log::isOn());\n\t}", "public function testIfStockManagementIsBool()\n {\n $this->assertIsBool($this->stock->isStock());\n }", "public function canFlag()\n {\n return in_array('flag', $this->actions);\n }", "public function testCustomValidatorWithManyArgs()\n {\n $this->klein_app->service()->addValidator(\n 'booleanEqual',\n function ($string, $args) {\n // Get the args\n $args = func_get_args();\n array_shift($args);\n\n $previous = null;\n\n foreach ($args as $arg) {\n if (null !== $previous) {\n if ((bool) $arg !== (bool) $previous) {\n return false;\n }\n } else {\n $previous = $arg;\n }\n }\n\n return true;\n }\n );\n\n $this->klein_app->service()->validateParam('tRUe')\n ->isBooleanEqual(1, true, 'true');\n\n $this->klein_app->service()->validateParam('false')\n ->isBooleanEqual(0, null, '', array(), '0', false);\n }", "public function isButtonValidBrokenSetupMultiplePrimaryActionsGivenExpectFalse() {}", "public function isTestMode(): bool;", "function testPersonSearchByBoolean() {\n\t\t$this->setUrl('/search/advanced?r=per&q[per_can_call][value]=FALSE');\n\t\t$this->app->go();\n\t\t$this->assertPattern('/id=\"qb_per_can_call\"/', $this->view->output);\n\t\t$this->assertPattern('/<th>Can Call<\\/th>/', $this->view->output);\n\t\t$this->assertPattern('/<td><img src=\"\\/graphics\\/tactile\\/false.png\" alt=\"f\" \\/><\\/td>/', $this->view->output);\n\t\t$collection = $this->view->get('collection');\n\t\t$this->assertIsA($collection, 'Omelette_PersonCollection');\n\t\t$names = $collection->pluck('name');\n\t\t$this->assertEqual($names, array('Greg Jones', 'Simon Kamina'));\n\t}", "public function testBooleanField()\n {\n $field = $this->table->getField('trueorfalse'); // Boolean\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean',\n $field);\n $this->assertEquals('trueorfalse', $field->getName());\n\n $this->assertTrue($field->getPHPValue(1));\n $this->assertFalse($field->getPHPValue(0));\n $this->assertNull($field->getPHPValue(null));\n\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('falsedef'); // Boolean, No Nulls, default False\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('falsedef', $field->getName());\n\n $this->assertFalse($field->getPHPValue(null));\n\n // Check for an exception when in strict\n $field->setStrictValues();\n $x = false;\n\n try\n {\n $field->getPHPValue(null);\n }\n catch ( RangeException )\n {\n $x = true;\n }\n\n $this->assertTrue($x);\n\n $field = $this->table->getField('truedef'); // Boolean, No Nulls, default true\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('truedef', $field->getName());\n\n $this->assertTrue($field->getPHPValue(null));\n $boundVal = $field->getSqlBoundValue(null);\n $valMarker = $boundVal->getValueMarker();\n\n $this->assertEquals('true', $boundVal->getBoundValues()[$valMarker]);\n }", "function pseudoTypeFalseAndBool(bool|false $var = false) {}", "public function testSetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->setMultiple($keyValuePairs);\n }", "public function testTrue()\n {\n $testtrue = true;\n $this->assertTrue($testtrue);\n\n\treturn false;\n }", "function test_checkMode_newArgs()\n {\n $result = $this->bax->_checkMode($this->bax->_newArgs());\n $this->assertTrue($result === true);\n }", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function testTrueIsTrue(){\n $foo = true;\n $this->assertTrue($foo);\n }", "function isEnabled();", "function isEnabled();", "public function validBooleanTrueProvider() {\n\t\treturn [\n\t\t\t\"string TRUE\"\t=> [\"TRUE\"],\n\t\t\t\"string ON\"\t\t=> [\"ON\"],\n\t\t\t\"string YES\"\t=> [\"YES\"],\n\t\t\t\"string 1\"\t\t=> [\"1\"],\n\t\t\t\"integer 1\"\t\t=> [1]\n\t\t];\n\t}", "public function assertQueryTrue($prop, ...$props)\n {\n global $wp_query;\n $all = array(\n 'is_404',\n 'is_admin',\n 'is_archive',\n 'is_attachment',\n 'is_author',\n 'is_category',\n 'is_comment_feed',\n 'is_date',\n 'is_day',\n 'is_embed',\n 'is_feed',\n 'is_front_page',\n 'is_home',\n 'is_month',\n 'is_page',\n 'is_paged',\n 'is_post_type_archive',\n 'is_posts_page',\n 'is_preview',\n 'is_robots',\n 'is_search',\n 'is_single',\n 'is_singular',\n 'is_tag',\n 'is_tax',\n 'is_time',\n 'is_trackback',\n 'is_year',\n );\n\n $props = array_merge((array)$prop, ...$props);\n\n foreach ($props as $true_thing) {\n $this->assertContains($true_thing, $all, \"{$true_thing}() is not handled by assertQueryTrue().\");\n }\n\n $passed = true;\n $not_false = $not_true = array(); // properties that were not set to expected values\n\n foreach ($all as $query_thing) {\n $result = is_callable($query_thing) ? $query_thing() : $wp_query->$query_thing;\n\n if (in_array($query_thing, $props, true)) {\n if (!$result) {\n $not_true[] = $query_thing;\n $passed = false;\n }\n } elseif ($result) {\n $not_false[] = $query_thing;\n $passed = false;\n }\n }\n\n $message = '';\n if (count($not_true)) {\n $message .= implode(', ', $not_true) . ' is expected to be true. ';\n }\n if (count($not_false)) {\n $message .= implode(', ', $not_false) . ' is expected to be false.';\n }\n $this->assertTrue($passed, $message);\n }", "public function makeMenuAllGoodExpectTrue() {}", "public function testOff()\n\t{\n\t\tCatapult\\Log::on(FALSE);\n\t\t$this->assertTrue(!Catapult\\Log::isOn());\n\t}", "function ffw_port_multicheck_callback( $args ) {\n global $ffw_port_settings;\n\n foreach( $args['options'] as $key => $option ):\n if( isset( $ffw_port_settings[$args['id']][$key] ) ) { $enabled = $option; } else { $enabled = NULL; }\n echo '<input name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"checkbox\" value=\"' . $option . '\" ' . checked($option, $enabled, false) . '/>&nbsp;';\n echo '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n endforeach;\n echo '<p class=\"description\">' . $args['desc'] . '</p>';\n}", "protected function _setBoolean($name, $value) {}", "public function testGetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function toggle_activeness( $curr ) { // param type: int\n\t\t$bypass_list = self::get_option( 'bypass_list' , array() );\n\t\tif ( in_array( $curr, $bypass_list ) ) { // when the ith opt was off / in the bypassed list, turn it on / remove it from the list\n\t\t unset( $bypass_list[ array_search( $curr, $bypass_list ) ] );\n\t\t\t$bypass_list = array_values( $bypass_list );\n\t\t\tself::update_option( 'bypass_list', $bypass_list );\n\t\t\treturn true;\n\t\t} else { \t// when the ith opt was on / not in the bypassed list, turn it off / add it to the list\n\t\t\t$bypass_list[] = ( int ) $curr;\n\t\t\tself::update_option( 'bypass_list', $bypass_list );\n\t\t\treturn false;\n\t\t}\n\t}", "protected function _setBooleanValue($key, $value) {}", "public function it_shows_a_boolean_input_which_can_be_a_select_or_radio_input()\n {\n // configure\n $inputs = [\n [\n 'type' => 'boolean',\n 'name' => 'maintenance_mode',\n 'label' => 'Maintenance',\n 'true_label' => 'Yes',\n 'false_label' => 'No',\n 'true_value' => '1',\n 'false_value' => '0',\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('type=\"radio\"', false)\n ->assertSee('Maintenance');\n\n\n // configure with options to show as select\n $inputs = [\n [\n 'type' => 'boolean',\n 'name' => 'maintenance_mode',\n 'label' => 'Maintenance',\n 'options' => [\n '1' => 'Yes',\n '0' => 'No',\n ]\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('Yes')\n ->assertSee('No')\n ->assertSee('Maintenance');\n }", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function testCanSetGetFlags()\n {\n $flags = ['-h', '-a'];\n $command = $this->createInstance();\n foreach ($flags as $_flag) {\n $command->addFlag($_flag);\n }\n $this->assertSame($flags, $command->getFlags(), 'Must be able to get and set multiple flags');\n }", "public function testEnabled(): void\n {\n $agentWithoutEnabling = $this->agentFromConfigArray();\n self::assertFalse($agentWithoutEnabling->enabled());\n\n // but a config that has monitor = true, it is set\n $enabledAgent = $this->agentFromConfigArray([ConfigKey::MONITORING_ENABLED => 'true']);\n self::assertTrue($enabledAgent->enabled());\n }", "private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }", "public function automated() : bool;", "function isEnabled ();", "public function testIsChecked() {\r\n $this->timer = new Timer(function() {\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(FALSE);\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->timer->destroy();\r\n\r\n $this->application->stop();\r\n }, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n\r\n $this->timer->start();\r\n\r\n $this->application->start();\r\n }", "public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decide(FLAG_KEY);\n\n $this->printDecision($decision, \"Check that the following decision properties are expected for user $this->userId\");\n }", "static function logicalAnd()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::logicalAnd', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "public function testBoolean()\r\n {\r\n $s = new XML_Serializer();\r\n $s->serialize(true);\r\n $this->assertEquals('<boolean>1</boolean>', $s->getSerializedData());\r\n $s->serialize(false);\r\n $this->assertEquals('<boolean />', $s->getSerializedData());\r\n }", "public static function and_() {\n $result = new qti_variable('single', 'boolean', array('value' => true));\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\n if (!$param->value) {\n $result->value = false;\n return $result;\n }\n }\n return $result;\n }", "public function turn_on()\n {\n $this->testing = TRUE;\n }", "public static function isApplicable(): bool;", "public function testCustomOption() {\n // Add the boolean field handler to the test view.\n $view = Views::getView('test_view');\n $view->setDisplay();\n\n $view->displayHandlers->get('default')->overrideOption('fields', [\n 'age' => [\n 'id' => 'age',\n 'table' => 'views_test_data',\n 'field' => 'age',\n 'relationship' => 'none',\n 'plugin_id' => 'boolean',\n ],\n ]);\n $view->save();\n\n $this->executeView($view);\n\n $custom_true = 'Yay';\n $custom_false = 'Nay';\n\n // Set up some custom value mappings for different types.\n $custom_values = [\n 'plain' => [\n 'true' => $custom_true,\n 'false' => $custom_false,\n 'test' => 'assertStringContainsString',\n ],\n 'allowed tag' => [\n 'true' => '<p>' . $custom_true . '</p>',\n 'false' => '<p>' . $custom_false . '</p>',\n 'test' => 'assertStringContainsString',\n ],\n 'disallowed tag' => [\n 'true' => '<script>' . $custom_true . '</script>',\n 'false' => '<script>' . $custom_false . '</script>',\n 'test' => 'assertStringNotContainsString',\n ],\n ];\n\n // Run the same tests on each type.\n foreach ($custom_values as $type => $values) {\n $options = [\n 'options[type]' => 'custom',\n 'options[type_custom_true]' => $values['true'],\n 'options[type_custom_false]' => $values['false'],\n ];\n $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/field/age');\n $this->submitForm($options, 'Apply');\n\n // Save the view.\n $this->drupalGet('admin/structure/views/view/test_view');\n $this->submitForm([], 'Save');\n\n $view = Views::getView('test_view');\n $output = $view->preview();\n $output = \\Drupal::service('renderer')->renderRoot($output);\n $this->{$values['test']}($values['true'], (string) $output, new FormattableMarkup('Expected custom boolean TRUE value %value in output for %type', ['%value' => $values['true'], '%type' => $type]));\n $this->{$values['test']}($values['false'], (string) $output, new FormattableMarkup('Expected custom boolean FALSE value %value in output for %type', ['%value' => $values['false'], '%type' => $type]));\n }\n }", "static function isTrue()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isTrue', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function setAllowedOptionsBool (...$options);", "public function isTestMode() {\n\t\treturn (bool) $this->app->store->get()->params->get('anet.test_mode');\n\t}", "function setIsCorrect( $value )\r\n {\r\n if ( $value == true )\r\n $this->IsCorrect = 1;\r\n else\r\n $this->IsCorrect = 0;\r\n }", "public function isTesting() {}", "function ini_get_bool($ini_get_arg) {\n\t$temp = ini_get($ini_get_arg);\n\n\tif ($temp == '1' or strtolower($temp) == 'on') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function testGetDataTableBooleanDataType() {\r\n\t\t// Insert border values into database\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid0\\',0)');\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid1\\',1)');\r\n\t\t// Extract datatable\r\n\t\t$datatable = $this->getPersistenceAdapter()->getDataTable('select BOOLEAN_VALUE from POTEST order by UUID');\r\n\t\t$datamatrix = $datatable->getDataMatrix();\r\n\t\t// Check strings for correct conversion\r\n\t\t$this->assertEquals('0', $datamatrix[0][0], 'Minimum boolean value is not converted to string as expected.');\r\n\t\t$this->assertEquals('1', $datamatrix[1][0], 'Maximum boolean value is not converted to string as expected.');\r\n\t}", "function test_wp_theme_network_enable_multiple_themes() {\n\t\t$themes = array( 'testtheme-2', 'testtheme-3' );\n\t\t$current_allowed_themes = get_site_option( 'allowedthemes' );\n\t\tWP_Theme::network_enable_theme( $themes );\n\t\t$new_allowed_themes = get_site_option( 'allowedthemes' );\n\t\tupdate_site_option( 'allowedthemes', $current_allowed_themes ); // reset previous value.\n\t\t$current_allowed_themes = array_merge(\n\t\t\t$current_allowed_themes,\n\t\t\tarray(\n\t\t\t\t'testtheme-2' => true,\n\t\t\t\t'testtheme-3' => true,\n\t\t\t)\n\t\t);\n\n\t\t$this->assertSameSetsWithIndex( $current_allowed_themes, $new_allowed_themes );\n\t}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function setMultiple($values) : bool;", "function configurationTestRules(&$deviceInfo, $ruleOverride = false) {\n if (is_string($ruleOverride)) $rules[] = $ruleOverride;\n else $rules = getSettingsValue(SETTING_CATEGORY_CONFIGMGMT, \"rules\",[]);\n\n foreach ($rules as $rule) {\n $rule = strtolower($rule);\n\n $a = explode(\" run \",$rule);\n $rLogic = $a[0];\n $rScript = isset($a[1])?$a[1]:\"not set\";\n //print_r($a);\n\n if ($rScript != \"\") {\n //parse the logic\n $logicPassed = true; //AND comparing this so it must start true\n foreach (explode(\" and \",$rLogic) as $rAnd) {\n $blockPassed = false; //OR comparing this so it must start false\n foreach (explode(\" or \",$rAnd) as $rOr) {\n //test the contains block\n $c = explode(\" contains \", $rOr);\n $c[0] = trim($c[0],' \"\\'');\n $devText = isset($deviceInfo[$c[0]])?strtolower($deviceInfo[$c[0]]):\"\";\n $devSearch = isset($c[1])?trim($c[1],' \"\\''):\"\";\n $test = ($devSearch==\"\")?false:is_numeric(strpos($devText,$devSearch));\n\n //see if we're testing an OR block or an AND block\n if (count($rOr)>0) $blockPassed = $blockPassed || $test; //we have an or statement\n else $blockPassed = $test;\n\n //echo \"[$rOr] = $blockPassed\\ndevText = [$devText]\\ndevSearch = [$devSearch]\";\n }\n $logicPassed = $logicPassed && $blockPassed;\n }\n\n //done testing logic, if we have a winner then lets return it\n if ($logicPassed) return trim($rScript);\n }\n\n }\n\n //no rules were found that matched, return nothing\n return \"\";\n\n}", "function add_test($condition, $result_true, $recommend_true, $result_false, $recommend_false, $recommend_condition = FALSE) \n{\n\tglobal $recommendation, $test_result;\n\t\n\tif ($condition) {\n\t\t$test_result[] = \"<span style='color: green;'>\" . $result_true . \"</span>\";\n\t\tif (!$recommend_condition)\n\t\t\t$recommendation[] = $recommend_true;\n\t}\n\telse {\t\t\n\t\t$test_result[] = \"<span style='color: red;'>\" . $result_false . \"</span>\";\n\t\t$recommendation[] = $recommend_false;\n\t}\n}", "public function testSetChecked() {\r\n $this->timer = new Timer(function() {\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(FALSE);\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->timer->destroy();\r\n\r\n $this->application->stop();\r\n }, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n\r\n $this->timer->start();\r\n\r\n $this->application->start();\r\n }", "public function check_onoff($ar)\n\t{\n\t\tforeach ( $this->ar_onoff as $k1 => $v1 )\n\t\t{\n\t\t\tif ( is_array( $v1 ) )\n\t\t\t{\n\t\t\t\tforeach ( $v1 as $k2 => $v2 )\n\t\t\t\t{\n\t\t\t\t\tif ( is_array( $v2 ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $v2 as $k3 => $v3 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ar[$k1][$k2][$v3] = isset( $ar[$k1][$k2][$v3] ) ? '1' : '0';\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$ar[$k1][$v2] = isset( $ar[$k1][$v2] ) ? '1' : '0';\n \t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ar[$v1] = isset($ar[$v1]) ? '1' : '0';\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function init_settings() {\n\t\tparent::init_settings();\n\t\t$this->enabled = ! empty( $this->settings['enabled'] ) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no';\n\t}", "function sanitize_bool( $value, $key, array $data ) {\n\tif ( is_bool( $value ) ) {\n\t\treturn $value;\n\t} elseif ( is_numeric( $value ) ) {\n\t\treturn (bool) $value;\n\t} elseif ( is_string( $value ) ) {\n\t\tif ( in_array( strtolower( $value ), array( 'true', 'on', 'yes' ), true ) ) {\n\t\t\treturn true;\n\t\t} elseif ( in_array( strtolower( $value ), array( 'false', 'off', 'no' ), true ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn (bool) $value;\n}" ]
[ "0.63476765", "0.6294186", "0.62608695", "0.6260179", "0.6086997", "0.6086696", "0.6028529", "0.6017502", "0.5926697", "0.58748007", "0.5869335", "0.5716484", "0.56961155", "0.56292003", "0.56189394", "0.5593241", "0.5574341", "0.55518603", "0.55393416", "0.5497705", "0.5487841", "0.5449872", "0.5444169", "0.542416", "0.54170156", "0.54071814", "0.5402142", "0.53954124", "0.5380137", "0.5370167", "0.5350161", "0.53385717", "0.53371656", "0.53371334", "0.53216654", "0.53156555", "0.5294494", "0.5288464", "0.5281749", "0.5281749", "0.5281749", "0.5281749", "0.5280262", "0.5247954", "0.5247954", "0.5247052", "0.524438", "0.52420485", "0.5226816", "0.522569", "0.5223205", "0.5222755", "0.52205044", "0.5217768", "0.52044874", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.5192927", "0.51905096", "0.5187232", "0.51868767", "0.5183536", "0.51738554", "0.51705515", "0.5166959", "0.5164621", "0.51590204", "0.5151186", "0.5149183", "0.5147306", "0.5135782", "0.51225054", "0.5114248", "0.5113117", "0.5112097", "0.5109521", "0.5087137", "0.5086561", "0.50825214", "0.5081686", "0.5076072", "0.5075715", "0.5075297", "0.50703216", "0.50640094", "0.50481933", "0.504407", "0.5038837", "0.5037289" ]
0.55801624
16
Tests impact of several boolean settings simultaneously.
public function testSpecifyingFieldNameSpecifyingBoolValues2() { $testName = 'MyField'; $fieldSetting = array( 'label' => 'Label', 'footnote' => 'Footnote', 'hide' => true, 'readOnly' => true, 'recommended' => false, 'discouraged' => true); $field = new Application_Model_Field($testName, $fieldSetting); // Test all methods that don't have unmet preconditions. $this->assertSame($testName, $field->getDbFieldName()); $this->assertTrue($field->isReadOnly()); $this->assertFalse($field->isVisible()); $this->assertSame("Label", $field->getLabel()); $this->assertSame("Footnote", $field->getFieldFootnote()); $this->assertFalse($field->isRecommended()); // Discouraged will not be true because the field is not in the table $this->assertFalse($field->isDiscouraged()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetAndRetrieveBoolean(): void\n {\n $key = \"A test key\";\n $this->testNotStrict->set($key, true);\n $actual = $this->testNotStrict->get($key);\n $this->assertTrue($actual);\n $this->testNotStrict->set($key, false);\n $actual = $this->testNotStrict->get($key);\n $this->assertFalse($actual);\n }", "function wpsl_bool_check( $atts ) {\n\n foreach ( $atts as $key => $val ) {\n if ( in_array( $val, array( 'true', '1', 'yes', 'on' ) ) ) {\n $atts[$key] = true;\n } else if ( in_array( $val, array( 'false', '0', 'no', 'off' ) ) ) {\n $atts[$key] = false;\n }\n }\n\n return $atts;\n}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function assertAllTrue()\n {\n $bools = func_get_args();\n\n if (is_array(func_get_arg(0))) {\n $bools = func_get_arg(0);\n }\n\n return ! collect($bools)->contains(false);\n }", "public function testGetBoolTrue(): void\n {\n // 1\n $_SERVER['MY_KEY'] = 1;\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // true\n $_SERVER['MY_KEY'] = true;\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // '1'\n $_SERVER['MY_KEY'] = '1';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'true'\n $_SERVER['MY_KEY'] = 'true';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'yes'\n $_SERVER['MY_KEY'] = 'yes';\n $this->assertTrue(Env::getBool('MY_KEY'));\n\n // 'on'\n $_SERVER['MY_KEY'] = 'on';\n $this->assertTrue(Env::getBool('MY_KEY'));\n }", "protected function fix_boolean_settings() {\n\t\tforeach ($this->boolean_settings as $setting) {\n\t\t\t$val = $this->get_setting($setting);\n\t\t\tif ($val) {\n\t\t\t\t$this->add_setting($setting, filter_var($val, FILTER_VALIDATE_BOOLEAN));\n\t\t\t}\n\t\t}\n\t}", "function test_settings($settings)\n {\n //can even register results, so you can give errors or whatever if you want..\n geoAdmin::m('I\\'m sure the settings are just fine. (CHANGE THIS! FOR DEMONSTRATION ONLY)');\n\n return true;\n }", "public function testConvertToBoolean() {\r\n $data = array(\r\n true => true,\r\n false => false,\r\n 'true' => true,\r\n 'false' => false,\r\n 'test' => true,\r\n 0 => false,\r\n '0' => false,\r\n 1 => true\r\n );\r\n\r\n foreach ($data as $value => $expected) {\r\n $this->assertSame($expected, $this->_utils->convertToBoolean($value));\r\n }\r\n }", "public function canBeDisabledAndEnabled() {}", "public function testStatusFlags()\n {\n $page = SiteTree::create();\n $page->Title = 'stuff';\n DBDatetime::set_mock_now('2016-01-16 00:00:00');\n\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = '2016-02-01 00:00:00';\n $page->UnPublishOnDate = null;\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = null;\n $page->UnPublishOnDate = '2016-02-01 00:00:00';\n $flags = $page->getStatusFlags(false);\n $this->assertNotContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertContains('expiry', array_keys($flags ?? []));\n\n $page->PublishOnDate = '2016-02-01 00:00:00';\n $page->UnPublishOnDate = '2016-02-08 00:00:00';\n $flags = $page->getStatusFlags(false);\n $this->assertContains('embargo_expiry', array_keys($flags ?? []));\n $this->assertNotContains('embargo', array_keys($flags ?? []));\n $this->assertNotContains('expiry', array_keys($flags ?? []));\n }", "function assertTrue($bool){\r\n $this->log($bool);\r\n if($bool){\r\n $status = \"passed\";\r\n }\r\n else{\r\n $status = \"failed\";\r\n }\r\n \r\n $this->updateStatus($status);\r\n $this->updateAction(__FUNCTION__);\r\n \r\n }", "public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decide(FLAG_KEY, $options);\n\n $this->printDecision($decision, 'Modify the OptimizelyDecideOptions and check the decision variables expected');\n }", "private function test()\n {\n return (bool) Mage::getStoreConfig('actions/settings/test');\n }", "public function testSpecifyingFieldNameSpecifyingBoolValues1()\n {\n $testName = 'MyField';\n $fieldSetting = array(\n 'label' => 'Label',\n 'footnote' => 'Footnote',\n 'hide' => false,\n 'readOnly' => false,\n 'recommended' => true);\n\n $field = new Application_Model_Field($testName, $fieldSetting);\n\n // Test all methods that don't have unmet preconditions.\n $this->assertSame($testName, $field->getDbFieldName());\n $this->assertFalse($field->isReadOnly());\n $this->assertTrue($field->isVisible());\n $this->assertSame(\"Label\", $field->getLabel());\n $this->assertSame(\"Footnote\", $field->getFieldFootnote());\n // Recommended will not be true because the field is not in the table\n $this->assertFalse($field->isRecommended());\n $this->assertFalse($field->isDiscouraged());\n $this->_assertNoMetaInfo($field);\n }", "function testValueForTrue(){\n $this->assertTrue(true);\n }", "function serendipity_ini_bool($var) {\n return ($var === 'on' || $var == '1');\n}", "public function testGetBoolFalse(): void\n {\n // 0\n $_SERVER['MY_KEY'] = 0;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // false\n $_SERVER['MY_KEY'] = false;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // '0'\n $_SERVER['MY_KEY'] = '0';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'false'\n $_SERVER['MY_KEY'] = 'false';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'no'\n $_SERVER['MY_KEY'] = 'no';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'off'\n $_SERVER['MY_KEY'] = 'off';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'unknown'\n $_SERVER['MY_KEY'] = 'unknown';\n $this->assertFalse(Env::getBool('MY_KEY'));\n }", "public function testFilterCheckboxesToggleSettings() {\n $page = $this->getSession()->getPage();\n $assert_session = $this->assertSession();\n\n $this->createNewTextFormat($page, $assert_session);\n\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $page->find('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertFalse($media_tab->isVisible(), 'Media filter settings should not be present because media filter is not enabled');\n\n $this->assertTrue($page->hasUncheckedField('filters[media_embed][status]'));\n $page->checkField('filters[media_embed][status]');\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $assert_session->waitForElementVisible('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertTrue($media_tab->isVisible(), 'Media settings should appear when media filter enabled');\n\n $page->uncheckField('filters[media_embed][status]');\n $assert_session->assertWaitOnAjaxRequest();\n\n $media_tab = $page->find('css', '[href^=\"#edit-filters-media-embed-settings\"]');\n $this->assertFalse($media_tab->isVisible(), 'Media settings should be removed when media filter disabled');\n }", "public function provideBoolValues(): array\n {\n return [\n [true],\n [false],\n ];\n }", "public function check() {\n\t\t$values = array($this->value);\n\t\tif ($this->value == 'On') {\n\t\t\t$values[] = '1';\n\t\t}\n\t\telseif ($this->value == 'Off') {\n\t\t\t// TODO check it, empty is default value\n\t\t\t$values[] = '';\n\t\t\t$values[] = '0';\n\t\t}\n\t\tif (!in_array(ini_get($this->name), $values)) {\n\t\t\t$this->log('Setting '.$this->name.'='.ini_get($this->name).'. \"'.$this->value.'\" is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$this->log('Setting '.$this->name.' is passed', Project::MSG_VERBOSE);\n\t\treturn 0;\n\t}", "public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decideForKeys(FLAG_KEYS, $options);\n\n $this->printDecisions($decision, \"Modify the OptimizelyDecideOptions and check all the decisions' are as expected\");\n }", "static function unittest_nonEmptyBoolGuarantee () {\n PhlintTest::assertIssues('\n $foo = false;\n if (rand(0, 1))\n $foo = new ArrayObject();\n if (!empty($foo))\n foreach ($foo as $bar) {}\n ', [\n ]);\n }", "public function testIsBoolean() {\n\t\t$result = _::isBoolean(true);\n\t\t$this->assertTrue($result);\n\n\t\t// test that false is a boolean\n\t\t$result = _::isBoolean(false);\n\t\t$this->assertTrue($result);\n\n\t\t// test that null is not a boolean\n\t\t$result = _::isBoolean(null);\n\t\t$this->assertFalse($result);\n\t}", "public function testOn()\n\t{\n\t\t$this->assertTrue(Catapult\\Log::isOn());\n\t}", "public function testIfStockManagementIsBool()\n {\n $this->assertIsBool($this->stock->isStock());\n }", "public function canFlag()\n {\n return in_array('flag', $this->actions);\n }", "public function testCustomValidatorWithManyArgs()\n {\n $this->klein_app->service()->addValidator(\n 'booleanEqual',\n function ($string, $args) {\n // Get the args\n $args = func_get_args();\n array_shift($args);\n\n $previous = null;\n\n foreach ($args as $arg) {\n if (null !== $previous) {\n if ((bool) $arg !== (bool) $previous) {\n return false;\n }\n } else {\n $previous = $arg;\n }\n }\n\n return true;\n }\n );\n\n $this->klein_app->service()->validateParam('tRUe')\n ->isBooleanEqual(1, true, 'true');\n\n $this->klein_app->service()->validateParam('false')\n ->isBooleanEqual(0, null, '', array(), '0', false);\n }", "public function isButtonValidBrokenSetupMultiplePrimaryActionsGivenExpectFalse() {}", "public function isTestMode(): bool;", "function testPersonSearchByBoolean() {\n\t\t$this->setUrl('/search/advanced?r=per&q[per_can_call][value]=FALSE');\n\t\t$this->app->go();\n\t\t$this->assertPattern('/id=\"qb_per_can_call\"/', $this->view->output);\n\t\t$this->assertPattern('/<th>Can Call<\\/th>/', $this->view->output);\n\t\t$this->assertPattern('/<td><img src=\"\\/graphics\\/tactile\\/false.png\" alt=\"f\" \\/><\\/td>/', $this->view->output);\n\t\t$collection = $this->view->get('collection');\n\t\t$this->assertIsA($collection, 'Omelette_PersonCollection');\n\t\t$names = $collection->pluck('name');\n\t\t$this->assertEqual($names, array('Greg Jones', 'Simon Kamina'));\n\t}", "public function testBooleanField()\n {\n $field = $this->table->getField('trueorfalse'); // Boolean\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean',\n $field);\n $this->assertEquals('trueorfalse', $field->getName());\n\n $this->assertTrue($field->getPHPValue(1));\n $this->assertFalse($field->getPHPValue(0));\n $this->assertNull($field->getPHPValue(null));\n\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('falsedef'); // Boolean, No Nulls, default False\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('falsedef', $field->getName());\n\n $this->assertFalse($field->getPHPValue(null));\n\n // Check for an exception when in strict\n $field->setStrictValues();\n $x = false;\n\n try\n {\n $field->getPHPValue(null);\n }\n catch ( RangeException )\n {\n $x = true;\n }\n\n $this->assertTrue($x);\n\n $field = $this->table->getField('truedef'); // Boolean, No Nulls, default true\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('truedef', $field->getName());\n\n $this->assertTrue($field->getPHPValue(null));\n $boundVal = $field->getSqlBoundValue(null);\n $valMarker = $boundVal->getValueMarker();\n\n $this->assertEquals('true', $boundVal->getBoundValues()[$valMarker]);\n }", "function pseudoTypeFalseAndBool(bool|false $var = false) {}", "public function testSetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->setMultiple($keyValuePairs);\n }", "public function testTrue()\n {\n $testtrue = true;\n $this->assertTrue($testtrue);\n\n\treturn false;\n }", "function test_checkMode_newArgs()\n {\n $result = $this->bax->_checkMode($this->bax->_newArgs());\n $this->assertTrue($result === true);\n }", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function testTrueIsTrue(){\n $foo = true;\n $this->assertTrue($foo);\n }", "function isEnabled();", "function isEnabled();", "public function validBooleanTrueProvider() {\n\t\treturn [\n\t\t\t\"string TRUE\"\t=> [\"TRUE\"],\n\t\t\t\"string ON\"\t\t=> [\"ON\"],\n\t\t\t\"string YES\"\t=> [\"YES\"],\n\t\t\t\"string 1\"\t\t=> [\"1\"],\n\t\t\t\"integer 1\"\t\t=> [1]\n\t\t];\n\t}", "public function assertQueryTrue($prop, ...$props)\n {\n global $wp_query;\n $all = array(\n 'is_404',\n 'is_admin',\n 'is_archive',\n 'is_attachment',\n 'is_author',\n 'is_category',\n 'is_comment_feed',\n 'is_date',\n 'is_day',\n 'is_embed',\n 'is_feed',\n 'is_front_page',\n 'is_home',\n 'is_month',\n 'is_page',\n 'is_paged',\n 'is_post_type_archive',\n 'is_posts_page',\n 'is_preview',\n 'is_robots',\n 'is_search',\n 'is_single',\n 'is_singular',\n 'is_tag',\n 'is_tax',\n 'is_time',\n 'is_trackback',\n 'is_year',\n );\n\n $props = array_merge((array)$prop, ...$props);\n\n foreach ($props as $true_thing) {\n $this->assertContains($true_thing, $all, \"{$true_thing}() is not handled by assertQueryTrue().\");\n }\n\n $passed = true;\n $not_false = $not_true = array(); // properties that were not set to expected values\n\n foreach ($all as $query_thing) {\n $result = is_callable($query_thing) ? $query_thing() : $wp_query->$query_thing;\n\n if (in_array($query_thing, $props, true)) {\n if (!$result) {\n $not_true[] = $query_thing;\n $passed = false;\n }\n } elseif ($result) {\n $not_false[] = $query_thing;\n $passed = false;\n }\n }\n\n $message = '';\n if (count($not_true)) {\n $message .= implode(', ', $not_true) . ' is expected to be true. ';\n }\n if (count($not_false)) {\n $message .= implode(', ', $not_false) . ' is expected to be false.';\n }\n $this->assertTrue($passed, $message);\n }", "public function makeMenuAllGoodExpectTrue() {}", "public function testOff()\n\t{\n\t\tCatapult\\Log::on(FALSE);\n\t\t$this->assertTrue(!Catapult\\Log::isOn());\n\t}", "function ffw_port_multicheck_callback( $args ) {\n global $ffw_port_settings;\n\n foreach( $args['options'] as $key => $option ):\n if( isset( $ffw_port_settings[$args['id']][$key] ) ) { $enabled = $option; } else { $enabled = NULL; }\n echo '<input name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"checkbox\" value=\"' . $option . '\" ' . checked($option, $enabled, false) . '/>&nbsp;';\n echo '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n endforeach;\n echo '<p class=\"description\">' . $args['desc'] . '</p>';\n}", "protected function _setBoolean($name, $value) {}", "public function testGetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function toggle_activeness( $curr ) { // param type: int\n\t\t$bypass_list = self::get_option( 'bypass_list' , array() );\n\t\tif ( in_array( $curr, $bypass_list ) ) { // when the ith opt was off / in the bypassed list, turn it on / remove it from the list\n\t\t unset( $bypass_list[ array_search( $curr, $bypass_list ) ] );\n\t\t\t$bypass_list = array_values( $bypass_list );\n\t\t\tself::update_option( 'bypass_list', $bypass_list );\n\t\t\treturn true;\n\t\t} else { \t// when the ith opt was on / not in the bypassed list, turn it off / add it to the list\n\t\t\t$bypass_list[] = ( int ) $curr;\n\t\t\tself::update_option( 'bypass_list', $bypass_list );\n\t\t\treturn false;\n\t\t}\n\t}", "protected function _setBooleanValue($key, $value) {}", "public function it_shows_a_boolean_input_which_can_be_a_select_or_radio_input()\n {\n // configure\n $inputs = [\n [\n 'type' => 'boolean',\n 'name' => 'maintenance_mode',\n 'label' => 'Maintenance',\n 'true_label' => 'Yes',\n 'false_label' => 'No',\n 'true_value' => '1',\n 'false_value' => '0',\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('type=\"radio\"', false)\n ->assertSee('Maintenance');\n\n\n // configure with options to show as select\n $inputs = [\n [\n 'type' => 'boolean',\n 'name' => 'maintenance_mode',\n 'label' => 'Maintenance',\n 'options' => [\n '1' => 'Yes',\n '0' => 'No',\n ]\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('Yes')\n ->assertSee('No')\n ->assertSee('Maintenance');\n }", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function testCanSetGetFlags()\n {\n $flags = ['-h', '-a'];\n $command = $this->createInstance();\n foreach ($flags as $_flag) {\n $command->addFlag($_flag);\n }\n $this->assertSame($flags, $command->getFlags(), 'Must be able to get and set multiple flags');\n }", "public function testEnabled(): void\n {\n $agentWithoutEnabling = $this->agentFromConfigArray();\n self::assertFalse($agentWithoutEnabling->enabled());\n\n // but a config that has monitor = true, it is set\n $enabledAgent = $this->agentFromConfigArray([ConfigKey::MONITORING_ENABLED => 'true']);\n self::assertTrue($enabledAgent->enabled());\n }", "private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }", "public function automated() : bool;", "function isEnabled ();", "public function testIsChecked() {\r\n $this->timer = new Timer(function() {\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(FALSE);\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->timer->destroy();\r\n\r\n $this->application->stop();\r\n }, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n\r\n $this->timer->start();\r\n\r\n $this->application->start();\r\n }", "public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decide(FLAG_KEY);\n\n $this->printDecision($decision, \"Check that the following decision properties are expected for user $this->userId\");\n }", "static function logicalAnd()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::logicalAnd', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "public function testBoolean()\r\n {\r\n $s = new XML_Serializer();\r\n $s->serialize(true);\r\n $this->assertEquals('<boolean>1</boolean>', $s->getSerializedData());\r\n $s->serialize(false);\r\n $this->assertEquals('<boolean />', $s->getSerializedData());\r\n }", "public static function and_() {\n $result = new qti_variable('single', 'boolean', array('value' => true));\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\n if (!$param->value) {\n $result->value = false;\n return $result;\n }\n }\n return $result;\n }", "public function turn_on()\n {\n $this->testing = TRUE;\n }", "public static function isApplicable(): bool;", "public function testCustomOption() {\n // Add the boolean field handler to the test view.\n $view = Views::getView('test_view');\n $view->setDisplay();\n\n $view->displayHandlers->get('default')->overrideOption('fields', [\n 'age' => [\n 'id' => 'age',\n 'table' => 'views_test_data',\n 'field' => 'age',\n 'relationship' => 'none',\n 'plugin_id' => 'boolean',\n ],\n ]);\n $view->save();\n\n $this->executeView($view);\n\n $custom_true = 'Yay';\n $custom_false = 'Nay';\n\n // Set up some custom value mappings for different types.\n $custom_values = [\n 'plain' => [\n 'true' => $custom_true,\n 'false' => $custom_false,\n 'test' => 'assertStringContainsString',\n ],\n 'allowed tag' => [\n 'true' => '<p>' . $custom_true . '</p>',\n 'false' => '<p>' . $custom_false . '</p>',\n 'test' => 'assertStringContainsString',\n ],\n 'disallowed tag' => [\n 'true' => '<script>' . $custom_true . '</script>',\n 'false' => '<script>' . $custom_false . '</script>',\n 'test' => 'assertStringNotContainsString',\n ],\n ];\n\n // Run the same tests on each type.\n foreach ($custom_values as $type => $values) {\n $options = [\n 'options[type]' => 'custom',\n 'options[type_custom_true]' => $values['true'],\n 'options[type_custom_false]' => $values['false'],\n ];\n $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/field/age');\n $this->submitForm($options, 'Apply');\n\n // Save the view.\n $this->drupalGet('admin/structure/views/view/test_view');\n $this->submitForm([], 'Save');\n\n $view = Views::getView('test_view');\n $output = $view->preview();\n $output = \\Drupal::service('renderer')->renderRoot($output);\n $this->{$values['test']}($values['true'], (string) $output, new FormattableMarkup('Expected custom boolean TRUE value %value in output for %type', ['%value' => $values['true'], '%type' => $type]));\n $this->{$values['test']}($values['false'], (string) $output, new FormattableMarkup('Expected custom boolean FALSE value %value in output for %type', ['%value' => $values['false'], '%type' => $type]));\n }\n }", "static function isTrue()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isTrue', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function setAllowedOptionsBool (...$options);", "public function isTestMode() {\n\t\treturn (bool) $this->app->store->get()->params->get('anet.test_mode');\n\t}", "function setIsCorrect( $value )\r\n {\r\n if ( $value == true )\r\n $this->IsCorrect = 1;\r\n else\r\n $this->IsCorrect = 0;\r\n }", "public function isTesting() {}", "function ini_get_bool($ini_get_arg) {\n\t$temp = ini_get($ini_get_arg);\n\n\tif ($temp == '1' or strtolower($temp) == 'on') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function testGetDataTableBooleanDataType() {\r\n\t\t// Insert border values into database\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid0\\',0)');\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid1\\',1)');\r\n\t\t// Extract datatable\r\n\t\t$datatable = $this->getPersistenceAdapter()->getDataTable('select BOOLEAN_VALUE from POTEST order by UUID');\r\n\t\t$datamatrix = $datatable->getDataMatrix();\r\n\t\t// Check strings for correct conversion\r\n\t\t$this->assertEquals('0', $datamatrix[0][0], 'Minimum boolean value is not converted to string as expected.');\r\n\t\t$this->assertEquals('1', $datamatrix[1][0], 'Maximum boolean value is not converted to string as expected.');\r\n\t}", "function test_wp_theme_network_enable_multiple_themes() {\n\t\t$themes = array( 'testtheme-2', 'testtheme-3' );\n\t\t$current_allowed_themes = get_site_option( 'allowedthemes' );\n\t\tWP_Theme::network_enable_theme( $themes );\n\t\t$new_allowed_themes = get_site_option( 'allowedthemes' );\n\t\tupdate_site_option( 'allowedthemes', $current_allowed_themes ); // reset previous value.\n\t\t$current_allowed_themes = array_merge(\n\t\t\t$current_allowed_themes,\n\t\t\tarray(\n\t\t\t\t'testtheme-2' => true,\n\t\t\t\t'testtheme-3' => true,\n\t\t\t)\n\t\t);\n\n\t\t$this->assertSameSetsWithIndex( $current_allowed_themes, $new_allowed_themes );\n\t}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function setMultiple($values) : bool;", "function configurationTestRules(&$deviceInfo, $ruleOverride = false) {\n if (is_string($ruleOverride)) $rules[] = $ruleOverride;\n else $rules = getSettingsValue(SETTING_CATEGORY_CONFIGMGMT, \"rules\",[]);\n\n foreach ($rules as $rule) {\n $rule = strtolower($rule);\n\n $a = explode(\" run \",$rule);\n $rLogic = $a[0];\n $rScript = isset($a[1])?$a[1]:\"not set\";\n //print_r($a);\n\n if ($rScript != \"\") {\n //parse the logic\n $logicPassed = true; //AND comparing this so it must start true\n foreach (explode(\" and \",$rLogic) as $rAnd) {\n $blockPassed = false; //OR comparing this so it must start false\n foreach (explode(\" or \",$rAnd) as $rOr) {\n //test the contains block\n $c = explode(\" contains \", $rOr);\n $c[0] = trim($c[0],' \"\\'');\n $devText = isset($deviceInfo[$c[0]])?strtolower($deviceInfo[$c[0]]):\"\";\n $devSearch = isset($c[1])?trim($c[1],' \"\\''):\"\";\n $test = ($devSearch==\"\")?false:is_numeric(strpos($devText,$devSearch));\n\n //see if we're testing an OR block or an AND block\n if (count($rOr)>0) $blockPassed = $blockPassed || $test; //we have an or statement\n else $blockPassed = $test;\n\n //echo \"[$rOr] = $blockPassed\\ndevText = [$devText]\\ndevSearch = [$devSearch]\";\n }\n $logicPassed = $logicPassed && $blockPassed;\n }\n\n //done testing logic, if we have a winner then lets return it\n if ($logicPassed) return trim($rScript);\n }\n\n }\n\n //no rules were found that matched, return nothing\n return \"\";\n\n}", "function add_test($condition, $result_true, $recommend_true, $result_false, $recommend_false, $recommend_condition = FALSE) \n{\n\tglobal $recommendation, $test_result;\n\t\n\tif ($condition) {\n\t\t$test_result[] = \"<span style='color: green;'>\" . $result_true . \"</span>\";\n\t\tif (!$recommend_condition)\n\t\t\t$recommendation[] = $recommend_true;\n\t}\n\telse {\t\t\n\t\t$test_result[] = \"<span style='color: red;'>\" . $result_false . \"</span>\";\n\t\t$recommendation[] = $recommend_false;\n\t}\n}", "public function testSetChecked() {\r\n $this->timer = new Timer(function() {\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(FALSE);\r\n $this->assertEquals(FALSE, $this->checkbox->isChecked());\r\n\r\n $this->checkbox->setChecked(TRUE);\r\n $this->assertEquals(TRUE, $this->checkbox->isChecked());\r\n\r\n $this->timer->destroy();\r\n\r\n $this->application->stop();\r\n }, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n\r\n $this->timer->start();\r\n\r\n $this->application->start();\r\n }", "public function check_onoff($ar)\n\t{\n\t\tforeach ( $this->ar_onoff as $k1 => $v1 )\n\t\t{\n\t\t\tif ( is_array( $v1 ) )\n\t\t\t{\n\t\t\t\tforeach ( $v1 as $k2 => $v2 )\n\t\t\t\t{\n\t\t\t\t\tif ( is_array( $v2 ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $v2 as $k3 => $v3 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ar[$k1][$k2][$v3] = isset( $ar[$k1][$k2][$v3] ) ? '1' : '0';\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$ar[$k1][$v2] = isset( $ar[$k1][$v2] ) ? '1' : '0';\n \t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ar[$v1] = isset($ar[$v1]) ? '1' : '0';\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function init_settings() {\n\t\tparent::init_settings();\n\t\t$this->enabled = ! empty( $this->settings['enabled'] ) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no';\n\t}", "function sanitize_bool( $value, $key, array $data ) {\n\tif ( is_bool( $value ) ) {\n\t\treturn $value;\n\t} elseif ( is_numeric( $value ) ) {\n\t\treturn (bool) $value;\n\t} elseif ( is_string( $value ) ) {\n\t\tif ( in_array( strtolower( $value ), array( 'true', 'on', 'yes' ), true ) ) {\n\t\t\treturn true;\n\t\t} elseif ( in_array( strtolower( $value ), array( 'false', 'off', 'no' ), true ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn (bool) $value;\n}" ]
[ "0.63476765", "0.6294186", "0.62608695", "0.6260179", "0.6086997", "0.6086696", "0.6028529", "0.6017502", "0.5926697", "0.58748007", "0.5869335", "0.5716484", "0.56961155", "0.56292003", "0.56189394", "0.5593241", "0.55801624", "0.5574341", "0.55393416", "0.5497705", "0.5487841", "0.5449872", "0.5444169", "0.542416", "0.54170156", "0.54071814", "0.5402142", "0.53954124", "0.5380137", "0.5370167", "0.5350161", "0.53385717", "0.53371656", "0.53371334", "0.53216654", "0.53156555", "0.5294494", "0.5288464", "0.5281749", "0.5281749", "0.5281749", "0.5281749", "0.5280262", "0.5247954", "0.5247954", "0.5247052", "0.524438", "0.52420485", "0.5226816", "0.522569", "0.5223205", "0.5222755", "0.52205044", "0.5217768", "0.52044874", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.51963985", "0.5192927", "0.51905096", "0.5187232", "0.51868767", "0.5183536", "0.51738554", "0.51705515", "0.5166959", "0.5164621", "0.51590204", "0.5151186", "0.5149183", "0.5147306", "0.5135782", "0.51225054", "0.5114248", "0.5113117", "0.5112097", "0.5109521", "0.5087137", "0.5086561", "0.50825214", "0.5081686", "0.5076072", "0.5075715", "0.5075297", "0.50703216", "0.50640094", "0.50481933", "0.504407", "0.5038837", "0.5037289" ]
0.55518603
18
Assumed visible because columns shown by default (even though
public function testWhenColsShownByDefaultAndHideNotSpecified() { // no label provide), and not explicitly hidden. $testName = 'MyField'; $showColsByDefault = 'true'; $field = new Application_Model_Field($testName, array(), array(), $showColsByDefault); $this->assertTrue($field->isVisible()); $this->assertSame("MyField", $field->getLabel()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "public function toString()\n {\n return 'All column is visible.';\n }", "public function getShowColumn()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "public function previewColumns();", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "protected function hiddenColumns(): array\n {\n return [];\n }", "public function get_hidden_columns() {\n\t\treturn array();\n\t}", "function get_hidden_columns($screen)\n {\n }", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function column_visible($link)\n {\n }", "protected function getAllVisible()\n {\n $col = 'visible';\n $result = $this->db->newQuery('select', $this->table)\n ->addWhere()\n ->Equals($col)\n ->makeStatement()\n ->Bind($col, [$col => 1])\n ->FetchAll();\n\n return ($result) ?: null;\n }", "public function getVisibleColumns()\n {\n $definitions = $this->defineListColumns();\n $columns = [];\n\n /*\n * Supplied column list\n */\n if ($this->columnOverride === null) {\n $this->columnOverride = $this->getSession('visible', null);\n }\n\n if ($this->columnOverride && is_array($this->columnOverride)) {\n\n $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));\n if (!count($definitions)) {\n throw new ApplicationException(Lang::get(\n 'backend::lang.list.missing_column',\n ['columns'=>implode(',', $invalidColumns)]\n ));\n }\n\n $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));\n foreach ($availableColumns as $columnName) {\n $definitions[$columnName]->invisible = false;\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n /*\n * Use default column list\n */\n else {\n foreach ($definitions as $columnName => $column) {\n if ($column->invisible) {\n continue;\n }\n\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n\n return $this->visibleColumns = $columns;\n }", "function getVisible() { return $this->readVisible(); }", "public function hidden(): Column\n {\n return $this->booleanAttribute('visible', false);\n }", "function getVisible() { return $this->readVisible(); }", "function get_hidden_columns( ) {\r\n\t\t$columns = get_user_option( 'managemedia_page_' . MLACore::ADMIN_PAGE_SLUG . 'columnshidden' );\r\n\r\n\t\tif ( is_array( $columns ) ) {\r\n\t\t\tforeach ( $columns as $index => $value ){\r\n\t\t\t\tif ( empty( $value ) ) {\r\n\t\t\t\t\tunset( $columns[ $index ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$columns = self::$default_hidden_columns;\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_hidden_columns', $columns );\r\n\t}", "function getVisible() {return $this->readVisible();}", "public function testWhenColsShownByDefaultButHideIsTrue()\n {\n // explicitly hidden with 'hide' set to true.\n $testName = 'MyField';\n $fieldSetting = array(\n 'label' => 'Label',\n 'hide' => true);\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, $fieldSetting,\n array(), $showColsByDefault);\n $this->assertFalse($field->isVisible());\n $this->assertSame(\"Label\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "public function is_visible() {\n\t\treturn true;\n\t}", "public function isVisible();", "public function isVisible();", "public function get_hidden_columns() {\n\n\t\t// Return a blank array, filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_hidden_columns', array() );\n\t}", "abstract protected function columns();", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }", "public function getTableColumns()\n\t{\n\t}", "public function summaryColumns();", "public function display_rows_or_placeholder()\n {\n }", "public static function columns()\n {\n return filterColumnByRole([\n 'plot_ref' => trans('system.code'),\n 'plot_name' => trans_title('plots'),\n 'user.name' => trans_title('users'),\n 'city.city_name' => trans_title('cities'),\n 'plot_percent_cultivated_land' => sections('plots.cultivated_land'),\n 'plot_real_area' => sections('plots.real_area'),\n 'plot_start_date' => sections('plots.start_date'),\n 'plot_active' => trans('persona.contact.active'),\n 'plot_green_cover' => sections('plots.green_cover'),\n 'plot_pond' => sections('plots.pond'),\n 'plot_road' => sections('plots.road'),\n ],\n $roleFilter = Credentials::isAdmin(),\n $newColumns = ['client.client_name' => trans_title('clients')],//Admits multiple arrays\n $addInPosition = 3\n );\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "function wp_ajax_hidden_columns()\n {\n }", "function wpc_client_my_show_columns( $column_name ) {\r\n global $post, $wpc_client;\r\n if ( $column_name == 'clients' ) {\r\n $users = get_post_meta( $post->ID, 'user_ids', true );\r\n\r\n if( is_array( $users ) && 0 < count( $users ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n //show all clients\r\n foreach ( $users as $key => $value ) {\r\n $data = get_user_meta( $value, 'wpc_cl_business_name' );\r\n if ( isset( $data[0] ) )\r\n echo $data[0] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n if ( $column_name == 'groups' ) {\r\n $groups_id = get_post_meta( $post->ID, 'groups_id', true );\r\n if( is_array( $groups_id ) && 0 < count( $groups_id ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n foreach ( $groups_id as $group_id ) {\r\n $group = $wpc_client->get_group( $group_id );\r\n echo $group['group_name'] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n }", "public function render_list_table_columns_preferences()\n {\n }", "public function filterVisible(): self;", "function getColumns() {return $this->_columns;}", "public function getColumns()\r\n {\r\n }", "abstract public function listColumns();", "function get_display_columns() {\n return $columns = array('id' => __('id', 'kkl-ligatool'), 'name' => __('name', 'kkl-ligatool'), 'club_id' => __('club', 'kkl-ligatool'), 'season_id' => __('season', 'kkl-ligatool'), 'short_name' => __('url_code', 'kkl-ligatool'),);\n }", "public function isBrowsable() {\n return true;\n }", "static function getColumns()\n {\n }", "public function isVisible() {\n return !is_null($this->num);\n }", "function feature_model_detail_list_table_visible_columns(String $table) {\n\n $model = $this->CI->grants->load_detail_model($table);\n\n $detail_list_table_visible_columns = [];\n \n if(method_exists($this->CI->$model,'detail_list_table_visible_columns') && \n is_array($this->CI->$model->detail_list_table_visible_columns())\n ){\n $detail_list_table_visible_columns = $this->CI->$model->detail_list_table_visible_columns();\n \n //Add the table id columns if does not exist in $columns\n if(is_array($detail_list_table_visible_columns) && \n !in_array($this->CI->grants->primary_key_field($table),$detail_list_table_visible_columns)){\n array_unshift($detail_list_table_visible_columns,$this->CI->grants->primary_key_field($table));\n }\n\n //Remove status and approval columns if the approveable item is not approveable\n if(!$this->CI->grants_model->approveable_item($table)) {\n $this->CI->grants->remove_mandatory_lookup_tables($detail_list_table_visible_columns,['status_name','approval_name']);\n }else{\n $this->CI->grants->add_mandatory_lookup_tables($detail_list_table_visible_columns,['status_name','approval_name']);\n }\n \n }\n \n return $detail_list_table_visible_columns;\n }", "public function hasColumns(){\n return $this->_has(3);\n }", "public function isBrowsable() {}", "public function getColumnsList(){\n return $this->_get(3);\n }", "protected function getShowColumnCreateModal()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS) && !in_array($key, self::DISABLED_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}", "function feature_model_master_table_visible_columns():Array {\n $model = $this->current_model;\n\n $master_table_visible_columns = [];\n \n if(\n method_exists($this->CI->$model,'master_table_visible_columns') &&\n is_array($this->CI->$model->master_table_visible_columns())\n ){\n \n $master_table_visible_columns = $this->CI->$model->master_table_visible_columns();\n \n //Add the table id columns if does not exist in $columns\n if(is_array($master_table_visible_columns) && \n !in_array($this->CI->grants->primary_key_field($this->controller),\n $master_table_visible_columns)){\n array_unshift($master_table_visible_columns,\n $this->CI->grants->primary_key_field($this->controller));\n }\n \n }\n \n return $master_table_visible_columns;\n }", "public function isVisible() :bool {\n return false;\n }", "public function showAllColumns(array $exceptions = []): void\n {\n $this->ensureManagerVisible();\n\n $rows = $this->getColumnManagerTable()->getRows();\n foreach ($rows as $row) {\n $name = $row->getCellValue('Name');\n\n // Skip exceptions\n if (in_array($name, $exceptions, true)) {\n continue;\n }\n\n $this->tickCheckbox($this->getVisibilityCheckboxFromRow($row));\n\n $shortName = $this->getColumnShortName($name);\n $header = $this->grid->getHeader();\n $isColumnVisible = $this->spin(fn () => ($header->hasColumn($name) || $header->hasColumn($shortName)), 5);\n\n self::assertTrue(\n $isColumnVisible,\n sprintf('Column %s did not appear in grid after enabling in column manager', $name)\n );\n }\n }", "public function getTableColumns(){\n\n $show_columns_statement = $this->grammer->compileShowColumns($this);\n return $this->connection->getTableColumns($show_columns_statement);\n\n }", "function insert_status_column_to_master_view(Array $visible_columns): Array {\n \n $status_name_field = $this->CI->grants->name_field('status');\n\n if($this->controller !== \"approval\"){\n if(\n in_array('status',$this->CI->grants->lookup_tables($this->controller)) && \n !in_array($status_name_field,$visible_columns) \n ){\n array_push($visible_columns,$status_name_field);\n } \n }\n\n return $visible_columns;\n }", "public function isVisible()\n {\n return true;\n }", "function is_visible()\n\t{\n\t\treturn $this->visible;\n\t}", "public function setVisibility() {}", "private function searchableColumns()\n {\n return empty($this->searchables) ? array_diff($this->fillable, $this->hidden) : $this->searchables;\n }", "public function firstCol() {\n\t}", "public function VisibleFields()\n {\n return $this->Fields()->VisibleFields();\n }", "public function showColumns(array $columns)\n {\n $this->_columnsToShow = $columns;\n return $this;\n }", "public function discardPreviewColumns();", "function RGC_dashboard_columns() {\n add_screen_option(\n 'layout_columns',\n array(\n 'max' => 1,\n 'default' => 1\n )\n );\n}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "protected function get_sortable_columns()\n {\n }", "protected function get_sortable_columns()\n {\n }", "protected function get_sortable_columns()\n {\n }", "private function getIsVisibleColumn()\n {\n $shareableField['arguments']['data']['config'] = [\n 'label' => __('Is visible'),\n 'formElement' => Form\\Element\\Select::NAME,\n 'componentType' => Form\\Field::NAME,\n 'dataType' => Form\\Element\\DataType\\Number::NAME,\n 'dataScope' => 'is_visible',\n 'options' => $this->visible->toOptionArray(),\n ];\n\n return $shareableField;\n }", "function visible() {\n\t\treturn $this->attribute_bool(\"visible\")\n\t\t && $this->visible_range()->contains_now();\n\t}", "public function setupVisibility();", "public function getDefaultFilterColumns();", "function _showTables() {\n print \"<pre>\";\n print_r($this->_tables);\n print \"</pre>\";\n }", "public function ShowInTable()\n {\n if ($this->Name) {\n return true;\n }\n }", "function is_visible() {\n\t\tif ($this->visibility=='hidden') return false;\n\t\tif ($this->visibility=='visible') return true;\n\t\tif ($this->visibility=='search' && is_search()) return true;\n\t\tif ($this->visibility=='search' && !is_search()) return false;\n\t\tif ($this->visibility=='catalog' && is_search()) return false;\n\t\tif ($this->visibility=='catalog' && !is_search()) return true;\n\t}", "protected function _isVisible($column)\n {\n // maybe we should show only some particular columns\n if ($this->_columnsToShow) {\n if (!in_array($column, $this->_columnsToShow)) {\n return false;\n }\n }\n\n // skip the column\n if ($this->_column($column)->hidden) {\n return false;\n }\n\n return true;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getColumns()\n {\n return array_flip($this->model->getStream()->view_options);\n }", "public function getAccessibleColumn(){\n return [\n 'name'=>'Name',\n 'price'=>'Price',\n 'updated_price_at'=>'Updated Price At',\n 'copy_number'=>'Quantity',\n // 'view'=>'View',\n 'categoryName'=>'Category',\n\n 'columnCount' => '',\n // 'brands' => 'Brands',\n\n // 'imageCount'=>'Images',\n // 'commentCount'=>'Comment',\n // 'upVoteCount'=> 'Up Vote',\n // 'downVoteCount'=> 'Down Vote'\n // 'category_id'=>'Category',\n ];\n }", "private function show_columns() {\n\t\tglobal $wpdb, $utils;\n\t\t$domain = $utils->text_domain;\n\t\t$tables = $wpdb->tables('all');\n\t\tif (!isset($_POST['table'])) {\n\t\t\t$message = __('Table name is not selected.', $domain);\n\t\t\treturn $message;\n\t\t} elseif (!in_array($_POST['table'], $tables)) {\n\t\t\t$message = __('There\\'s no such table.', $domain);\n\t\t\treturn $message;\n\t\t}\telse {\n\t\t\t$table_name = $_POST['table'];\n\t\t\t$results = $wpdb->get_results(\"SHOW COLUMNS FROM $table_name\");\n\t\t\treturn $results;\n\t\t}\n\t}" ]
[ "0.72374153", "0.70898914", "0.7089616", "0.7075522", "0.7056172", "0.7056172", "0.6979283", "0.6977216", "0.6961342", "0.69556785", "0.69125164", "0.6852285", "0.6800841", "0.6800841", "0.67913556", "0.65988576", "0.65859056", "0.6560013", "0.6558168", "0.6556573", "0.65409976", "0.6530614", "0.6519831", "0.64308757", "0.64292455", "0.64292455", "0.6392386", "0.6345655", "0.6339733", "0.6339733", "0.6338833", "0.6338833", "0.6338833", "0.6338833", "0.6307296", "0.6291414", "0.628567", "0.6282777", "0.6265392", "0.6260869", "0.6260629", "0.62595063", "0.625545", "0.6219809", "0.6214528", "0.62131", "0.61881787", "0.6180683", "0.6152165", "0.6121938", "0.6078797", "0.60572743", "0.6056221", "0.60535264", "0.6046359", "0.60224295", "0.60177654", "0.6010776", "0.6010776", "0.6010776", "0.6010776", "0.6010776", "0.6010776", "0.6010776", "0.5993137", "0.5983933", "0.59784496", "0.5976649", "0.59322745", "0.5921718", "0.5913734", "0.5896704", "0.5887125", "0.5879255", "0.5864226", "0.58630234", "0.5860828", "0.5860681", "0.5848744", "0.58476925", "0.5822359", "0.5820183", "0.5820183", "0.58009005", "0.57985985", "0.5790947", "0.5790797", "0.5786602", "0.57837826", "0.5783677", "0.57767266", "0.57732713", "0.57732713", "0.57732713", "0.57732713", "0.57732713", "0.57732713", "0.5772125", "0.57636774", "0.57622975" ]
0.68087703
12
Assumed visible because columns shown by default, but
public function testWhenColsShownByDefaultButHideIsTrue() { // explicitly hidden with 'hide' set to true. $testName = 'MyField'; $fieldSetting = array( 'label' => 'Label', 'hide' => true); $showColsByDefault = 'true'; $field = new Application_Model_Field($testName, $fieldSetting, array(), $showColsByDefault); $this->assertFalse($field->isVisible()); $this->assertSame("Label", $field->getLabel()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString()\n {\n return 'All column is visible.';\n }", "private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "public function getShowColumn()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "protected function hiddenColumns(): array\n {\n return [];\n }", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "public function column_visible($link)\n {\n }", "public function previewColumns();", "public function get_hidden_columns() {\n\t\treturn array();\n\t}", "function get_hidden_columns($screen)\n {\n }", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "function getVisible() { return $this->readVisible(); }", "function getVisible() { return $this->readVisible(); }", "function getVisible() {return $this->readVisible();}", "protected function getAllVisible()\n {\n $col = 'visible';\n $result = $this->db->newQuery('select', $this->table)\n ->addWhere()\n ->Equals($col)\n ->makeStatement()\n ->Bind($col, [$col => 1])\n ->FetchAll();\n\n return ($result) ?: null;\n }", "public function testWhenColsShownByDefaultAndHideNotSpecified()\n {\n // no label provide), and not explicitly hidden.\n $testName = 'MyField';\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, array(),\n array(), $showColsByDefault);\n $this->assertTrue($field->isVisible());\n $this->assertSame(\"MyField\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "public function hidden(): Column\n {\n return $this->booleanAttribute('visible', false);\n }", "public function isVisible();", "public function isVisible();", "public function is_visible() {\n\t\treturn true;\n\t}", "public function getVisibleColumns()\n {\n $definitions = $this->defineListColumns();\n $columns = [];\n\n /*\n * Supplied column list\n */\n if ($this->columnOverride === null) {\n $this->columnOverride = $this->getSession('visible', null);\n }\n\n if ($this->columnOverride && is_array($this->columnOverride)) {\n\n $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));\n if (!count($definitions)) {\n throw new ApplicationException(Lang::get(\n 'backend::lang.list.missing_column',\n ['columns'=>implode(',', $invalidColumns)]\n ));\n }\n\n $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));\n foreach ($availableColumns as $columnName) {\n $definitions[$columnName]->invisible = false;\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n /*\n * Use default column list\n */\n else {\n foreach ($definitions as $columnName => $column) {\n if ($column->invisible) {\n continue;\n }\n\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n\n return $this->visibleColumns = $columns;\n }", "function get_hidden_columns( ) {\r\n\t\t$columns = get_user_option( 'managemedia_page_' . MLACore::ADMIN_PAGE_SLUG . 'columnshidden' );\r\n\r\n\t\tif ( is_array( $columns ) ) {\r\n\t\t\tforeach ( $columns as $index => $value ){\r\n\t\t\t\tif ( empty( $value ) ) {\r\n\t\t\t\t\tunset( $columns[ $index ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$columns = self::$default_hidden_columns;\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_hidden_columns', $columns );\r\n\t}", "public function filterVisible(): self;", "public function get_hidden_columns() {\n\n\t\t// Return a blank array, filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_hidden_columns', array() );\n\t}", "abstract protected function columns();", "function wp_ajax_hidden_columns()\n {\n }", "public function isVisible() {\n return !is_null($this->num);\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "function getColumns() {return $this->_columns;}", "public static function columns()\n {\n return filterColumnByRole([\n 'plot_ref' => trans('system.code'),\n 'plot_name' => trans_title('plots'),\n 'user.name' => trans_title('users'),\n 'city.city_name' => trans_title('cities'),\n 'plot_percent_cultivated_land' => sections('plots.cultivated_land'),\n 'plot_real_area' => sections('plots.real_area'),\n 'plot_start_date' => sections('plots.start_date'),\n 'plot_active' => trans('persona.contact.active'),\n 'plot_green_cover' => sections('plots.green_cover'),\n 'plot_pond' => sections('plots.pond'),\n 'plot_road' => sections('plots.road'),\n ],\n $roleFilter = Credentials::isAdmin(),\n $newColumns = ['client.client_name' => trans_title('clients')],//Admits multiple arrays\n $addInPosition = 3\n );\n }", "public function display_rows_or_placeholder()\n {\n }", "public function getTableColumns()\n\t{\n\t}", "public function isBrowsable() {\n return true;\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "function wpc_client_my_show_columns( $column_name ) {\r\n global $post, $wpc_client;\r\n if ( $column_name == 'clients' ) {\r\n $users = get_post_meta( $post->ID, 'user_ids', true );\r\n\r\n if( is_array( $users ) && 0 < count( $users ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n //show all clients\r\n foreach ( $users as $key => $value ) {\r\n $data = get_user_meta( $value, 'wpc_cl_business_name' );\r\n if ( isset( $data[0] ) )\r\n echo $data[0] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n if ( $column_name == 'groups' ) {\r\n $groups_id = get_post_meta( $post->ID, 'groups_id', true );\r\n if( is_array( $groups_id ) && 0 < count( $groups_id ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n foreach ( $groups_id as $group_id ) {\r\n $group = $wpc_client->get_group( $group_id );\r\n echo $group['group_name'] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n }", "public function summaryColumns();", "public function getColumns()\r\n {\r\n }", "public function isBrowsable() {}", "public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }", "public function isVisible() :bool {\n return false;\n }", "public function render_list_table_columns_preferences()\n {\n }", "function is_visible()\n\t{\n\t\treturn $this->visible;\n\t}", "public function isVisible()\n {\n return true;\n }", "abstract public function listColumns();", "public function hasColumns(){\n return $this->_has(3);\n }", "public function VisibleFields()\n {\n return $this->Fields()->VisibleFields();\n }", "static function getColumns()\n {\n }", "function get_display_columns() {\n return $columns = array('id' => __('id', 'kkl-ligatool'), 'name' => __('name', 'kkl-ligatool'), 'club_id' => __('club', 'kkl-ligatool'), 'season_id' => __('season', 'kkl-ligatool'), 'short_name' => __('url_code', 'kkl-ligatool'),);\n }", "function visible() {\n\t\treturn $this->attribute_bool(\"visible\")\n\t\t && $this->visible_range()->contains_now();\n\t}", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "function feature_model_detail_list_table_visible_columns(String $table) {\n\n $model = $this->CI->grants->load_detail_model($table);\n\n $detail_list_table_visible_columns = [];\n \n if(method_exists($this->CI->$model,'detail_list_table_visible_columns') && \n is_array($this->CI->$model->detail_list_table_visible_columns())\n ){\n $detail_list_table_visible_columns = $this->CI->$model->detail_list_table_visible_columns();\n \n //Add the table id columns if does not exist in $columns\n if(is_array($detail_list_table_visible_columns) && \n !in_array($this->CI->grants->primary_key_field($table),$detail_list_table_visible_columns)){\n array_unshift($detail_list_table_visible_columns,$this->CI->grants->primary_key_field($table));\n }\n\n //Remove status and approval columns if the approveable item is not approveable\n if(!$this->CI->grants_model->approveable_item($table)) {\n $this->CI->grants->remove_mandatory_lookup_tables($detail_list_table_visible_columns,['status_name','approval_name']);\n }else{\n $this->CI->grants->add_mandatory_lookup_tables($detail_list_table_visible_columns,['status_name','approval_name']);\n }\n \n }\n \n return $detail_list_table_visible_columns;\n }", "protected function getShowColumnCreateModal()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS) && !in_array($key, self::DISABLED_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }", "public function getColumnsList(){\n return $this->_get(3);\n }", "private function getIsVisibleColumn()\n {\n $shareableField['arguments']['data']['config'] = [\n 'label' => __('Is visible'),\n 'formElement' => Form\\Element\\Select::NAME,\n 'componentType' => Form\\Field::NAME,\n 'dataType' => Form\\Element\\DataType\\Number::NAME,\n 'dataScope' => 'is_visible',\n 'options' => $this->visible->toOptionArray(),\n ];\n\n return $shareableField;\n }", "public function setVisibility() {}", "function feature_model_master_table_visible_columns():Array {\n $model = $this->current_model;\n\n $master_table_visible_columns = [];\n \n if(\n method_exists($this->CI->$model,'master_table_visible_columns') &&\n is_array($this->CI->$model->master_table_visible_columns())\n ){\n \n $master_table_visible_columns = $this->CI->$model->master_table_visible_columns();\n \n //Add the table id columns if does not exist in $columns\n if(is_array($master_table_visible_columns) && \n !in_array($this->CI->grants->primary_key_field($this->controller),\n $master_table_visible_columns)){\n array_unshift($master_table_visible_columns,\n $this->CI->grants->primary_key_field($this->controller));\n }\n \n }\n \n return $master_table_visible_columns;\n }", "function is_visible() {\n\t\tif ($this->visibility=='hidden') return false;\n\t\tif ($this->visibility=='visible') return true;\n\t\tif ($this->visibility=='search' && is_search()) return true;\n\t\tif ($this->visibility=='search' && !is_search()) return false;\n\t\tif ($this->visibility=='catalog' && is_search()) return false;\n\t\tif ($this->visibility=='catalog' && !is_search()) return true;\n\t}", "function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}", "function insert_status_column_to_master_view(Array $visible_columns): Array {\n \n $status_name_field = $this->CI->grants->name_field('status');\n\n if($this->controller !== \"approval\"){\n if(\n in_array('status',$this->CI->grants->lookup_tables($this->controller)) && \n !in_array($status_name_field,$visible_columns) \n ){\n array_push($visible_columns,$status_name_field);\n } \n }\n\n return $visible_columns;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getVisible() {\r\n return $this->bVisible;\r\n }", "protected function _isVisible($column)\n {\n // maybe we should show only some particular columns\n if ($this->_columnsToShow) {\n if (!in_array($column, $this->_columnsToShow)) {\n return false;\n }\n }\n\n // skip the column\n if ($this->_column($column)->hidden) {\n return false;\n }\n\n return true;\n }", "public function isVisible() {\n\t\tif ($this->hidden === TRUE) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function isVisible()\n {\n return $this->visible;\n }", "public function isVisible()\n {\n return $this->visible;\n }", "private function searchableColumns()\n {\n return empty($this->searchables) ? array_diff($this->fillable, $this->hidden) : $this->searchables;\n }", "public function get_visibility()\n {\n }", "public function setupVisibility();", "public function getPageVisible() {}", "public function showAllColumns(array $exceptions = []): void\n {\n $this->ensureManagerVisible();\n\n $rows = $this->getColumnManagerTable()->getRows();\n foreach ($rows as $row) {\n $name = $row->getCellValue('Name');\n\n // Skip exceptions\n if (in_array($name, $exceptions, true)) {\n continue;\n }\n\n $this->tickCheckbox($this->getVisibilityCheckboxFromRow($row));\n\n $shortName = $this->getColumnShortName($name);\n $header = $this->grid->getHeader();\n $isColumnVisible = $this->spin(fn () => ($header->hasColumn($name) || $header->hasColumn($shortName)), 5);\n\n self::assertTrue(\n $isColumnVisible,\n sprintf('Column %s did not appear in grid after enabling in column manager', $name)\n );\n }\n }", "public function getTableColumns(){\n\n $show_columns_statement = $this->grammer->compileShowColumns($this);\n return $this->connection->getTableColumns($show_columns_statement);\n\n }", "public function showColumns(array $columns)\n {\n $this->_columnsToShow = $columns;\n return $this;\n }", "public function firstCol() {\n\t}", "function isVisible() {\n return ($this->entry->staff_id || $this->entry->user_id)\n && $this->entry->type != 'R' && $this->isEnabled();\n }", "public function isVisible() : bool\n {\n return $this->attributes['visible'] ? true : false;\n }", "protected function get_sortable_columns()\n {\n }", "public function isVisible() : bool\n {\n return $this->visible;\n }", "protected function get_sortable_columns()\n {\n }", "protected function get_sortable_columns()\n {\n }" ]
[ "0.71218276", "0.70857346", "0.7060256", "0.7058681", "0.7021207", "0.7021207", "0.6947317", "0.69387156", "0.69169515", "0.6906879", "0.688181", "0.68798614", "0.6851356", "0.6846464", "0.6846464", "0.68138963", "0.68125784", "0.6785917", "0.6734491", "0.6661822", "0.6640833", "0.66364807", "0.66364807", "0.6575625", "0.6564734", "0.65016824", "0.6488995", "0.6355605", "0.6275018", "0.6271829", "0.62698007", "0.6256793", "0.6256793", "0.62557495", "0.62557495", "0.62557495", "0.62557495", "0.62511563", "0.6235552", "0.62212336", "0.61832786", "0.6180722", "0.6179814", "0.61794144", "0.6170371", "0.6166557", "0.61640203", "0.6154837", "0.6151703", "0.6143899", "0.60974646", "0.6094232", "0.6093944", "0.60711604", "0.6056006", "0.6049396", "0.60358346", "0.6033454", "0.60329175", "0.60219926", "0.60219926", "0.60219926", "0.60219926", "0.60219926", "0.60219926", "0.6001352", "0.598466", "0.59831554", "0.59734166", "0.5970745", "0.59696305", "0.5969487", "0.5966019", "0.595974", "0.5957098", "0.5957098", "0.5957098", "0.5957098", "0.5957098", "0.5957098", "0.5957098", "0.5938406", "0.5914931", "0.5904134", "0.5900059", "0.5900059", "0.58988076", "0.5895269", "0.5889978", "0.58630836", "0.5850271", "0.58356124", "0.58284444", "0.58282787", "0.58154714", "0.57954806", "0.57900995", "0.5789156", "0.5787838", "0.5787838" ]
0.63937855
27