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
Make sure we clean up after ourselves:
public function tearDown(): void { if (file_exists(static::$in)) { unlink(static::$in); } if (file_exists(static::$ou)) { unlink(static::$ou); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanup() {\n\t\t//TODO\n\t}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanup()\n\t{\n\t\t\n\t}", "public function cleanup()\n\t{\n\t}", "public function cleanup()\n {\n }", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function __destruct() {\n\t\t$this->clean();\n\t}", "public function cleanup(): void\n {\n }", "public function cleanup(): void\n {\n }", "abstract protected function _finalize();", "public function __destruct()\r\n {\r\n // Perform any clean-up here\r\n }", "protected function parentCleanup() {\n }", "public function finalize() { }", "private function __destruct() {}", "public function Cleanup()\r\n\t{\r\n\t}", "protected function childCleanup() {\n }", "protected function __del__() { }", "public function __destruct()\n\t{\n\t\t$this->db = null;\n\t\t$this->cat_data = false;\n\t\t$this->settings = null;\n\t}", "public function cleanup()\n\t{\n\t\t$this->getObject()->cleanup();\n\t}", "function __destruct()\n\t{\n\t\t$this->Pre_GastosModel->close();\n\t}", "protected function cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}", "public function finalize();", "public function __destruct()\n\t\t{\n\t\t\t// caches. \n\t\t\t//$this->clean_cache();\n\t\t}", "function __destruct() {\n\t\t$this->close();\n\t}", "function cleanup()\n {\n return true;\n }", "public function __destruct()\r\n\t\t{\t\t\t\r\n\t\t}", "public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}", "public function cleanup() \n {\n return true;\n }", "public function __destruct()\n {\n $this->clear();\n }", "public function __destruct()\n {\n $this->clear();\n }", "public function __destruct()\n {\n if ($this->uri) {\n librdf_free_uri($this->uri);\n }\n }", "public function __destruct()\n {\n // Vacio por el momento.\n }", "public function __destruct()\n {\n }", "public function __destruct()\n {\n }", "private function finalize()\n {\n $this->temp_files_path[] = L_FRAME_LIST_FILE;\n $this->delete_files();\n }", "protected function garbageCollect()\n {\n \n }", "public function __destruct() {\n\n\t\t}", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->metadata);\n\t\t\tunset($this->models);\n\t\t\tunset($this->translators);\n\t\t}", "public function __destruct() {\r\n\t\t$this->close();\r\n\t}", "public function __destruct() {\n\t\t$this->close();\n\t}", "protected function __destruct() {\n\n parent::__destruct();\n }", "function __destruct()\n {\n }", "function __destruct()\n {\n }", "function __destruct()\n {\n }", "private function _destruct()\r\n {\r\n $this->table = null;\r\n $this->select = null;\r\n $this->fields = null;\r\n $this->where = null;\r\n $this->ar_where = null;\r\n }", "function __destruct() {\r\n $this->Initialize();\r\n }", "public function __destruct()\n\t\t{\n\t\t\t$this->close();\n\t\t}", "function __destruct() {\n\t\t\tunset($this->db);\n\t\t}", "public function __destruct(){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t$this->GetModelOrganize;\n\t\t\t\t\t\t\t$this->getLibBaseUrl;\n\t\t\t\t\t\t\t$this->_Categories;\n\t\t\t\t\t\t\tsession_write_close();\n\t\t\t\t\t\t}catch(ErrorException $ex){\n\t\t\t\t\t\t\techo \"Message:\" . $ex->getMessage ();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}", "protected function __destruct() \r\n {\r\n parent::__destruct();\r\n }", "public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->after);\n\t\t\tunset($this->before);\n\t\t\tunset($this->builder);\n\t\t\tunset($this->data_source);\n\t\t}", "function __destruct()\n {\n $this->release();\n }", "function __destruct(){ $this->close(); }", "public function __destruct() {\n $this->close();\n }" ]
[ "0.7923063", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.7868171", "0.78680736", "0.78680736", "0.78680736", "0.78680736", "0.78680736", "0.78680736", "0.78680736", "0.78674334", "0.78674334", "0.78674334", "0.78674334", "0.78674334", "0.78674334", "0.7842958", "0.78102493", "0.77703816", "0.7553729", "0.7553729", "0.7553729", "0.74197495", "0.7298996", "0.7298996", "0.72986573", "0.7226946", "0.72225225", "0.71590865", "0.71568865", "0.7149682", "0.7147391", "0.71385264", "0.7034208", "0.7033437", "0.70077735", "0.7000633", "0.6992431", "0.6985301", "0.69846624", "0.6979503", "0.6976902", "0.69741035", "0.69643414", "0.6955007", "0.6955007", "0.69506776", "0.6933619", "0.6930786", "0.69295794", "0.69271004", "0.69234246", "0.6922011", "0.6919562", "0.6912406", "0.69086504", "0.690664", "0.69057274", "0.69057274", "0.69057274", "0.69040245", "0.6888199", "0.6882976", "0.6882687", "0.6862875", "0.68596834", "0.6855115", "0.6852965", "0.68163896", "0.6813903" ]
0.0
-1
Lists all Incident entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('ComDaufinBundle:Incident')->findAll(); return $this->render('ComDaufinBundle:Incident:index.html.twig', array( 'entities' => $entities, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return IncidentResource::collection(Incident::all());\n }", "public function index()\n {\n //\n return Incidencies::get();\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CMSBundle:Client')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAllEntities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeKindergartenBundle:AttendanceEmployed')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackOfficebackBundle:Extraitnaissances')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function findAllEntities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('EnterpriseBundle:Customer')->findAll();\n\n return $this->render('EnterpriseBundle:Default:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SmathEmpresaBundle:Empleado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return Entity::all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20InventarioBundle:Estado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MrsBlogBundle:Cidades')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('CmarMeetingBundle:Meeting')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $repository = $em->getRepository('COEShopBundle:Discount');\n\n $entities = $repository->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function indexAction()\n {\n $entities = $this->get('InspectionManager')->getAllEntity();\n return array(\n 'entities' => $entities,\n 'headerTitle' => 'Inspections');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('uesperaBundle:ClienteCredito')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n \n $entity = new Incapacidad();\n $form = $this->createCreateForm($entity);\n \n $entities = $em->getRepository('DGPlusbelleBundle:Incapacidad')->findAll();\n\n return array(\n 'form'=>$form->createView(),\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SiteSavalizeBundle:Company')->findAll();\n\n return $this->render('SiteSavalizeBundle:Company:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HaccoDeeeBundle:DevisSetup')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CrudforgeBundle:Users')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }", "public function listAllIdentities($id){\n return $this->accountGateway->listAllIdentities($id);\n }", "public function getEntities();", "public function getEntities();", "public function viewAllReportedAccidents(Request $request)\n {\n //get all the emergency requests that are reported as accidents\n $accidents = Emergencies::where('type','=','accident')->latest()->paginate(10);\n if(!$accidents)\n {\n $request->session()->flash('error','No acciden data reported yet');\n return redirect()->back();\n }\n else\n {\n return view('nurses.emergencies.accidents.index', compact('accidents'));\n }\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20EquipoBundle:Componente')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HffBlogBundle:Comentarios')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->findOrden();\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function showAllAction( Request $request)\n { $em = $this->getDoctrine()->getManager();\n\n $entrepots = $em->getRepository('GererEntrepotBundle:Entrepot')->findAll();\n\n\n return $this->render('@GererEntrepot/admin/index.html.twig', array(\n 'entrepots' => $entrepots,\n ));\n\n }", "public function get_entities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalsifdaBundle:SifdaEquipoTrabajo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entities = $em->getRepository('JYPSRegisterBundle:IntrestConfig')->findAll();\n\n\t\treturn $this->render('JYPSRegisterBundle:IntrestConfig:index.html.twig', array(\n\t\t\t'entities' => $entities,\n\t\t));\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $eventInscriptions = $em->getRepository('EHSBundle:EventInscription')->findAll();\n\n return $this->render('eventinscription/index.html.twig', array(\n 'eventInscriptions' => $eventInscriptions,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('casamunozempresaBundle:Sucursal')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return AtendenteResource::collection(Atendente::all());\n }", "public function indexAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n\n return array(\n 'entities' => $entities,\n 'configtypes' => new ConfigTypes(),\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsIncidentBundle:GdpMails')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:Configuracao')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return Inventario::all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:LocalBanner')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $account = $em->getRepository('AppBundle:Account')->findAll();\n\n return array(\n 'accounts' => $account,\n );\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 indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppWebBundle:Catalogo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeChildrenBundle:Vaccines')->findAll();\n\n return $this->render('AcmeChildrenBundle:Vaccines:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function getIncidents(array $requestData = []): array\n {\n $data = $this->request('incidents', $requestData);\n\n $incidents = [];\n foreach (ArrayHelper::getValue($data, 'incidents', []) as $i) {\n $incident = new Incident();\n $incident->setAttributes($i);\n $incidents[] = $incident;\n }\n\n return $incidents;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CBWarehouseBundle:Container')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $id_cal = $this->getCalendarRoot();\n $rootcalendar = $em->getRepository('ApplicationCalendarBundle:CalendarRoot')->findOneById($id_cal);\n $entities = $em->getRepository('ApplicationCalendarBundle:CalendarCategories')->myFindAll($id_cal);\n return $this->render('ApplicationCalendarBundle:CalendarCategories:index.html.twig', array(\n 'entities' => $entities,\n 'root_calendar' => $rootcalendar\n ));\n }", "public function index()\n {\n return $this->articalRepository->all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DGPlusbelleBundle:SesionVentaTratamiento')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmebsceneBundle:Account')->findAll();\n\n return $this->render('AcmebsceneBundle:Account:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $events = $em->getRepository('ClassBundle:Events')->findAll();\n\n return $this->render('events/index.html.twig', array(\n 'events' => $events,\n ));\n }", "public static function get_all_entities($conn) \n {\n Ossim_db::check_connection($conn);\n \n $entities = array();\n $ctxs = self::get_ctx_where();\n \n $query = \"SELECT HEX(id) AS id, name FROM acl_entities\";\n \n if ($ctxs) \n\t\t{\n\t\t\t$query .= \" WHERE id in ($ctxs)\";\n\t\t} \n \n $rs = $conn->Execute($query); \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n }\n else\n {\n while (!$rs->EOF) \n {\n $entities[$rs->fields['id']] = $rs->fields['name'];\n \n $rs->MoveNext();\n } \n }\n \n return $entities;\n }", "public function indexAction()\n {\n /* $em = $this->getDoctrine()->getManager();\n\n $events = $em->getRepository('EventBundle:Event')->findAll();\n\n return array(\n 'events' => $events,\n );*/\n return array();\n }", "public function getAll()\n {\n return $this->indicacaoRepository->getAll();\n }", "public function index()\n {\n $occupations = Occupation::getAllOccupations();\n return OccupationResource::collection($occupations);\n }", "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $companyStatuses = $em->getRepository('AppBundle:CompanyStatus')->findBy(array('isDeleted' => false), array('position' => 'ASC'));\n\n return [\n 'companyStatuses' => $companyStatuses,\n ];\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VCReservasBundle:Reserva')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('FnxAdminBundle:Categoria')->findAll();\n\n return array('entities' => $entities);\n }", "public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\n $ingredients = $em->getRepository(Ingredient::class)->findAll();\n } else {\n $ingredients = $em->getRepository(Ingredient::class)->getOwnedByUser($user);\n }\n\n return [\n 'ingredients' => $ingredients,\n ];\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CheckmanBundle:Spendings')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexActionEntities() {\n return [];\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('CreditUnionFrontendBundle:Pricelist')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('TroulitePathfinderBundle:Party')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('EventFormBundle:PeriodoDeInscricao')->findAll();\n\n return $this->render('EventFormBundle:PeriodoDeInscricao:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function getAllIdentifiers() {}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $instrumentations = $em->getRepository('AppBundle:Instrumentation')->findAll();\n\n return $this->render('instrumentation/index.html.twig', array(\n 'instrumentations' => $instrumentations,\n ));\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BEEServicesBeeeaseBundle:ActionListe')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SubscriptionBundle:SubscriptionBase')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return $this->attendanceRepository->all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('IrvyneBlogBundle:Article')->findAll();\n\n return array('entities' => $articles);\n }", "public function getIdentities()\n {\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('DteBtsBundle:User')->findAll();\n\n return array(\n 'entities' => $users,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('NRTestPetClinicBundle:Visit')->findAll();\n\n return $this->render('NRTestPetClinicBundle:Visit:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:Vluchten')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return Api_Employees::all()->toArray(); \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $crmClientes = $em->getRepository('ERPAdminBundle:CrmCliente')->findAll();\n\n return $this->render('crmcliente/index.html.twig', array(\n 'crmClientes' => $crmClientes,\n ));\n }", "public function incidences() {\n return $this->hasMany(Incidence::class);\n }", "public function indexAction()\r\n {\r\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\r\n throw new AccessDeniedException('Access Denied!!!!!');\r\n }\r\n else{\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $actualites = $em->getRepository('ActualityBundle:Actualites')->findAll();\r\n\r\n return $this->render('@Actuality/actualites/index.html.twig', array(\r\n 'actualites' => $actualites,\r\n ));\r\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 all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $clients = $em->getRepository('App:Clients')->selectAllClient();\n return $this->render('base.html.twig', [\n 'clients' => $clients\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new EntOficialesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllIncReslt() {\n $inc = IncidenceModel::where('id_estado', 6)->get();\n\n return $inc;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $m_employees = $em->getRepository('AppBundle:m_employee')->findAll();\n\n return $this->render('m_employee/index.html.twig', array(\n 'm_employees' => $m_employees,\n ));\n }", "public function getAll(){\n //old : \n // $events = $this->events;\n // return $events;\n $repo = $this->om->getRepository(Event::class); \n return $repo->findAll();\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 index()\n {\n return Industry::all();\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CabinetMedicalBundle:actualite')->findAll();\n\n return $this->render('CabinetMedicalBundle:actualite:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('AcseoStartupBundle:Comment')->findAll();\n\n return array('entities' => $entities);\n }", "function GetIncidentsByDay($date)\n\t\t{\n\t\t\t$db = new DatabaseManager();\n\t\t\t$db->Connect();\n\t\t\t\n\t\t\t// sanitize inputs\n\t\t\t$date = $db->SanitizeInput($date);\n\t\t\t\n\t\t\t// create the query\n\t\t\t$query = 'SELECT DISTINCT itemid,event,address,pubdate,pubtime,status,itemid,scrapedatetime,agencyid FROM incidents WHERE pubdate=\"' . $date . '\" GROUP BY itemid ORDER BY pubtime DESC';\n\t\t\t\n\t\t\t// execute the query\n\t\t\t$results = $db->Query($query);\n\t\t\t\n\t\t\t// create an array to put our results into\n\t\t\t$incidents = array();\n\t\t\t\n\t\t\t// decode the rows\n\t\t\twhile($r = mysql_fetch_assoc($results)) {\n\t\t\t\n\t\t\t\t$incident = new Incident();\n\t\t\t\n\t\t\t\t// pull the information from the row\n\t\t\t\t$incident->event = $r['event'];\n\t\t\t\t$incident->address = $r['address'];\n\t\t\t\t$incident->pubdate = $r['pubdate'];\n\t\t\t\t$incident->pubtime = $r['pubtime'];\n\t\t\t\t$incident->status = $r['status'];\n\t\t\t\t$incident->itemid = $r['itemid'];\n\t\t\t\t$incident->scrapedatetime = $r['scrapedatetime'];\n\t\t\t\t$incident->agencyid = $r['agencyid'];\n\t\t\t\t\n\t\t\t\t$incidents[] = $incident;\n\t\t\t}\n\t\t\t\n\t\t\treturn $incidents;\n\t\t}", "public function getEntities(): array;" ]
[ "0.7005375", "0.64993304", "0.6474207", "0.6351045", "0.6330612", "0.6325362", "0.62754", "0.62179345", "0.604176", "0.60272324", "0.59795886", "0.59509426", "0.5944533", "0.5941982", "0.5938184", "0.59238094", "0.5922805", "0.5902203", "0.5880296", "0.5874867", "0.58739233", "0.5871087", "0.5864848", "0.5864387", "0.5854387", "0.5854387", "0.58463544", "0.58458966", "0.58202523", "0.5818584", "0.58132684", "0.57962173", "0.5792577", "0.57735306", "0.57715374", "0.576253", "0.57595855", "0.5753417", "0.57509154", "0.5740396", "0.5729757", "0.57270986", "0.57106173", "0.5705953", "0.56949556", "0.56943965", "0.5692501", "0.56869376", "0.56860256", "0.56698364", "0.56697285", "0.56594056", "0.5630779", "0.5622917", "0.5616267", "0.5615035", "0.56126374", "0.56098735", "0.560618", "0.5603983", "0.55927396", "0.55884874", "0.55691767", "0.55685556", "0.5564752", "0.5564015", "0.55593604", "0.5554071", "0.5551334", "0.55494004", "0.5548776", "0.5546114", "0.5540314", "0.55372715", "0.5531759", "0.5531592", "0.55311984", "0.5530727", "0.5520772", "0.5518699", "0.5498377", "0.5495747", "0.5492764", "0.5490892", "0.5490753", "0.5480046", "0.54762805", "0.5471034", "0.54684204", "0.5467472", "0.5462302", "0.5459371", "0.545237", "0.5451802", "0.5450579", "0.54489636", "0.54425097", "0.5427947", "0.5427691", "0.5422077" ]
0.70976186
0
Creates a new Incident entity.
public function createAction(Request $request) { $entity = new Incident(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('com_incident_show', array('id' => $entity->getId()))); } return $this->render('ComDaufinBundle:Incident:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function create(Entity $entity);", "public function create($entity);", "public function createEntity();", "function create($entity);", "function create(IContract $entity);", "public function createEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function store(Request $request)\n {\n $log = new Log;\n $log->owner = $request->owner;\n $log->device_id = $request->device_id;\n $log->resolved = $request->resolved;\n $log->description = $request->description;\n\n $incident = new Incident;\n $incident->title = $request->title;\n $incident->save();\n $incident->logs()->save($log);\n\n return new IncidentResource($incident);\n }", "public function newAction()\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createEntity($entityName = null);", "public function store(CreateIncidenceRequest $request)\n {\n $input = $request->all();\n\n $incidence = $this->incidenceRepository->create($input);\n\n Flash::success('Incidence saved successfully.');\n\n return redirect(route('incidences.index'));\n }", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "public function create($service, $entity);", "abstract protected function createEntityInstance();", "public function createEntity()\n {\n $createdCompany = new Company();\n $createdCompany->setTitle('Test Company')\n ->setIco('11025848744')\n ->setDic('1258745968444')\n ->setStreet('Cesta 125')\n ->setZip('021478')\n ->setCity('Bratislava')\n ->setCountry('Slovenska Republika');\n\n $this->em->persist($createdCompany);\n $this->em->flush();\n\n return $createdCompany;\n }", "public function createEntity($name);", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "public static function create($entity)\n {\n return static::mapper()->create($entity);\n }", "public function createEntity($data = array());", "private function createRecord($entityName, array $data) {\n $response = $this->callRaynetcrmRestApi($entityName, self::HTTP_METHOD_PUT, $data);\n $body = Json::decode($response->getBody());\n\n if ($response->getStatusCode() === self::HTTP_CODE_CREATED) {\n return $body->data->id;\n } else {\n throw new RaynetGenericException(\n $body->translatedMessage ? $body->translatedMessage : $body->message,\n $response->getStatusCode()\n );\n }\n }", "public function create(array $entity)\n {\n \n }", "public function create($entityDict)\r\n {\r\n return $this->conn->insert($this, __FUNCTION__, $entityDict);\r\n }", "public function create()\n {\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, null);\n }", "public function createAction(Request $request)\n {\n $entity = new Resident();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('resident_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create(Request $request)\n {\n \t$leiNumber = $this->legalEntityGenerateUniqueService->generateUniqueLegalEntity();\n \t$version = $this->legalEntityGenerateUniqueService->defaultLegalEntityVersion();\n \n \t$data = ['lei' => $leiNumber,\n 'version' => $version,\n 'name' => $request->name,\n 'country_code' => $request->country,\n 'status' => $request->status\n \t]; \n \t$resourceObj = $this->legalEntityRepository->store($data);\n if($resourceObj){\n ProcessLegalEntityValidation::dispatch($resourceObj->id)->delay(now()->addSeconds(30));\n }\n return $resourceObj;\n }", "public function create($attributes): EntityIdInterface\n {\n return parent::create($attributes);\n }", "public function create($data = array()) { \r\n \tforeach(array_keys($data) as $name) {\r\n \t\t$this->_checkAttributesValue($data, $name);\r\n \t}\r\n \t\r\n \treturn $entity = new $this->_entityClass($this, $this->_getPrimary(), $data);\r\n }", "protected function createEntity($entityType, $values) {\n $entity = \\Drupal::entityManager()->getStorage($entityType)->create($values);\n $status = $entity->save();\n\n $this->assertEqual(\n $status,\n SAVED_NEW,\n SafeMarkup::format('Created %label entity %type.', [\n '%label' => $entity->getEntityType()->getLabel(),\n '%type' => $entity->id()]\n )\n );\n\n return $entity;\n }", "public function store(Request $request)\n {\n $data = $request->except(['employments', 'contacts', 'assessors', 'recruitments']);\n $enterprise = Enterprise::create($data);\n\n return response()->json([\n 'created'\t=> true,\n 'id' => $enterprise->ID,\n ]);\n }", "public function createAction()\n {\n $entity = new Customer();\n $request = $this->getRequest();\n $form = $this->createForm(new CustomerType(), $entity);\n\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('enterprise_show', array('id' => $entity->getId())));\n }\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public static function create($entity = '')\n\t{\n\t\t$entityObject = '\\\\model\\\\orm\\\\'.$entity;\n\n\t\treturn new $entityObject;\n\t}", "public function create() {\n // Insert the client in the db\n $db = new Database('cliente');\n $this->id = $db->insert([\n 'name' => $this->name,\n 'address' => $this->address,\n 'zip' => $this->zip,\n 'phone' => $this->phone,\n 'mPhone' => $this->mPhone,\n 'email' => $this->email,\n 'gender' => $this->gender,\n 'obs' => $this->obs,\n ]);\n\n // Return success\n return true;\n }", "public function create()\n {\n $credentials = Request()->validate([\n 'name' => ['required','string'],\n 'price' => ['required','numeric'],\n 'stock' => ['required','numeric'],\n 'instrument_type_id' => ['required']\n ]);\n Instrument::create([\n 'name' => request('name'),\n 'price' => request('price'),\n 'stock' => request('stock'),\n 'instrument_type_id' => request('instrument_type_id')\n ]);\n Binnacle::create([\n 'entity' => \"El insumo : \". request('name'),\n 'action' => \"inserto\",\n 'table' => \"Insumos\",\n 'user_id'=> Auth::user()->id\n ]);\n return redirect()->route('instruments.eachOne');\n }", "public function create(NationalityCreateRequest $request) : NationalityResource\n {\n $result = $this->nationalityService->saveNationality($request->only(['nationality']));\n\n return (new NationalityResource($result))\n ->additional(['message' => config('api-response-messages.nationality_add_success.message')]);\n }", "public function createAction()\n {\n $type = $this->params('type');\n $instance = $this->getInstanceManager()->getInstanceFromRequest();\n $query = $this->params()->fromQuery();\n $entity = $this->getEntityManager()->createEntity(\n $type,\n $query,\n $instance\n );\n $this->getEntityManager()->flush();\n\n $data = ['entity' => $entity, 'data' => $query];\n $response = $this->getEventManager()->trigger('create.postFlush', $this, $data);\n return $this->checkResponse($response);\n }", "public function store(Request $request)\n {\n Incidente::create($request->all());\n\n return redirect()->route('incidentes.index');\n }", "public function store(Request $request)\n {\n $atendente = Atendente::create([\n 'Id_atendente' => $request->Id_atendente,\n\t\t\t'Id_estabelecimento' => $request->Id_estabelecimento,\n\t\t\t'Nm_atendente' => $request->Nm_atendente,\n\t\t\t'Observacao' => $request->Observacao,\n\t\t\t'ATIVO' => $request->ATIVO,\n\t\t\t'Dt_bloqueio' => $request->Dt_bloqueio,\n ]);\n\n return new AtendenteResource($atendente);\n }", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "protected function createEntity($entityType, $values) {\n $storage = \\Drupal::entityManager()->getStorage($entityType);\n $entity = $storage->create($values);\n $status = $entity->save();\n $this->assertEqual($status, SAVED_NEW, SafeMarkup::format('Created %label entity %type.', [\n '%label' => $entity->getEntityType()->getLabel(),\n '%type' => $entity->id()\n ]));\n // The newly saved entity isn't identical to a loaded one, and would fail\n // comparisons.\n $entity = $storage->load($entity->id());\n\n return $entity;\n }", "public function newEntity($attributes = [])\n {\n $class = static::$associatedEntity;\n\n return new $class($attributes, $this->client);\n }", "public function createNewEntity($entityid, $type)\n {\n assert('is_string($entityid)');\n assert('is_string($type)');\n\n if($this->isEntityIdInUse($entityid, $errorMessage)) {\n return $errorMessage;\n }\n\n if($this->hasEntityIdBeenUsed($entityid, $errorMessage)) {\n return $errorMessage;\n }\n\n $startstate = $this->_config->getString('workflowstate.default');\n\n // Get the default ARP\n $default_arp = '0';\n $st = $this->execute(\"SELECT aid FROM \" . self::$prefix . \"arp WHERE is_default = TRUE AND deleted = ''\");\n if ($st) {\n $rows = $st->fetchAll();\n if (count($rows) === 1) {\n $default_arp = $rows[0]['aid'];\n }\n }\n\n // Instantiate a new entity\n $entity = new sspmod_janus_Entity($this->_config, true);\n $entity->setEntityid($entityid);\n $entity->setWorkflow($startstate);\n $entity->setType($type);\n $entity->setArp($default_arp);\n $entity->setUser($this->_user->getUid());\n $entity->setRevisionnote('Entity created.');\n $entity->save();\n\n $st = $this->execute(\n 'INSERT INTO '. self::$prefix .'hasEntity \n (`uid`, `eid`, `created`, `ip`) \n VALUES \n (?, ?, ?, ?);',\n array(\n $this->_user->getUid(),\n $entity->getEid(),\n date('c'),\n $_SERVER['REMOTE_ADDR'],\n )\n );\n\n if ($st === false) {\n return 'error_db';\n }\n\n $ec = new sspmod_janus_EntityController($this->_config);\n $ec->setEntity($entity);\n\n $update = false;\n \n // Get metadatafields for new type\n $nm_mb = new sspmod_janus_MetadatafieldBuilder(\n $this->_config->getArray('metadatafields.' . $type)\n );\n $metadatafields = $nm_mb->getMetadatafields();\n \n // Add all required fileds\n foreach ($metadatafields AS $mf) {\n if (isset($mf->required) && $mf->required === true) {\n $ec->addMetadata($mf->name, $mf->default);\n $update = true;\n }\n }\n \n if ($update === true) {\n $ec->saveEntity();\n }\n\n // Reset list of entities\n $this->_entities = null;\n $this->_loadEntities();\n\n return $entity->getEid();\n }", "public function create(\\stdClass $data)\n {\n // Determine entity name\n $entity = $this->getRepository()->getClassName();\n\n /**\n * Create new entity\n *\n * @var Entity $entity\n */\n $entity = new $entity();\n\n // Before callback method call\n if (method_exists($this, 'beforeCreate')) {\n $this->beforeCreate($data, $entity);\n }\n\n // Create or update entity\n $this->persistEntity($entity, $data);\n\n // After callback method call\n if (method_exists($this, 'afterCreate')) {\n $this->afterCreate($data, $entity);\n }\n\n return $entity;\n }", "public function create(Company $company)\n {\n //\n }", "public function create(Company $company)\n {\n //\n }", "function _create($entity)\n {\n $retval = FALSE;\n $id = $this->object->_wpdb()->insert($this->object->get_table_name(), $this->object->_convert_to_table_data($entity));\n if ($id) {\n $key = $this->object->get_primary_key_column();\n $retval = $entity->{$key} = intval($this->object->_wpdb()->insert_id);\n }\n return $retval;\n }", "public function create()\n {\n $input = Input::all();\n $chars = \"#*.!_<>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $handler = new IncidentHandler;\n $access = new Access;\n $types = AccessType::lists('name', 'id');\n $log = new Log\\Logger();\n\n if (isset($input['name'])) {\n $handler->name = $input['name'];\n $handler->lastname = $input['lastname'];\n $handler->phone = $input['phone'];\n $handler->mail = $input['mail'];\n $handler->save();\n $pass = substr(str_shuffle($chars), 0, 8);\n $access->username = $input['username'];\n $access->password = Hash::make($pass);\n $access->access_types_id = $input['access_types_id'];\n $access->incident_handler_id = $handler->id;\n $access->active = 0;\n $access->save();\n\n $log->info(Auth::user()->id, Auth::user()->username, 'Se creó el Incident Handler con ID: ' . $handler->id);\n\n Mail::send('usuarios.mail', array('user' => $input['username'], 'pass' => $pass), function ($message) {\n $message->to(Input::get('mail'))->subject('[GCS-IM]-Alta en Incident Manager');\n });\n return Redirect::to('handler/view/' . $handler->id);\n } else {\n //$this->layout = View::make(\"incidentHandler.create\",array('handler' => $handler));\n return $this->layout = View::make(\"incidentHandler.form\", array(\n 'handler' => $handler,\n 'access' => $access,\n 'types' => $types,\n 'action' => 'IncidentHandlerController@create',\n 'title' => \"Nuevo Incident Handler\",\n ));\n }\n\n }", "public function create()\n {\n //TODO\n }", "public function store(EntityRequest $request)\n {\n\n\n $dataForm = $request->all();\n $dataForm['active'] = filter_var($dataForm['active'], FILTER_VALIDATE_BOOLEAN);\n $dataForm['access_application'] = filter_var($dataForm['access_application'], FILTER_VALIDATE_BOOLEAN);\n\n $dataForm['created_by'] = auth()->user()->id;\n $dataForm['updated_by'] = auth()->user()->id;\n\n $entity = Entity::create($dataForm);\n\n return redirect()->route('entity.show', $entity->id);\n }", "public function create()\n {\n $this->validate();\n Contest::create($this->modelData());\n $this->modalFormVisible = false;\n $this->resetVars();\n }", "public function create() {\n //\n }", "public function createEntity(array $attributes) {\n return $this->entityManager->createEntity($attributes);\n }", "public function create($entidad) {\n\n if (parent::backendIsLogged()) {\n if (RoleService::getInstance()->hasRolePermission($_SESSION[\"roleID\"], __CLASS__ . \":\" . __FUNCTION__)) {\n\n try {\n $fecha = new DateTime();\n\n $entrega = new EntregaDirectaModel(null, $entidad[\"entidad\"], $fecha->format(\"Y/m/d\"));\n $id = EntregaDirectaRepository::getInstance()->add($entrega);\n foreach ($entidad[\"detalle_alimento_id\"] as $k => $v) {\n $alim = new AlimentoEntregaDirectaModel($id, $v, $entidad[\"cantidad\"][$k]);\n AlimentoEntregaDirectaRepository::getInstance()->add($alim);\n }\n $_SESSION[\"message\"] = new MessageService(\"createSuccess\", [\" envío inmediato \" . $data['razonSocial']]);\n } catch (Exception $e) {\n $_SESSION['message'] = $e->getMessage();\n }\n }\n }\n }", "public function create(Request $request)\n {\n $data = $request->all();\n $event = Event::make($data);\n $event->user_id = Auth::user()->id;\n $event->save();\n }", "public function testExternNewEntity() {\n $backend = $this->getMock('backend', array('create'));\n $this->s = new IdentitySerializer('Fxrm\\\\Store\\\\TESTIDENTITY', $backend);\n\n $id = new TESTIDENTITY();\n\n $backend->expects($this->once())->method('create')->with($this->equalTo('Fxrm\\\\Store\\\\TESTIDENTITY'))->will($this->returnValue('TESTID'));\n $this->assertSame('TESTID', $this->s->extern($id));\n $this->assertSame('TESTID', $this->s->extern($id)); // run a second time to check\n\n $this->assertSame($id, $this->s->intern('TESTID'));\n }", "public function generateIncident(){\r\n $level = $this->incidentLevel[mt_rand(0, (count($this->incidentLevel) -1) )];\r\n\r\n $messages = getIncidentMessages(); // from config\r\n\r\n if(self::GLOBAL_INCIDENT == $level){\r\n $incidentType = mt_rand(0,1);\r\n\r\n $message = $messages[self::GLOBAL_INCIDENT][$incidentType ];\r\n\r\n if(self::BANK_INCIDENT == $incidentType){\r\n\r\n $bankList = $_SESSION['state']->getBankList();\r\n $bank = $bankList[mt_rand(0, (count($bankList) -1))];\r\n\r\n $this->incidentEvent = new GlobalBankEvent($message, $bank);\r\n\r\n }\r\n else if(self::REGION_INCIDENT == $incidentType){\r\n\r\n $regionList = $_SESSION['map']->getRegions();\r\n\r\n $region = $regionList[ mt_rand(0, (count($regionList)-1 )) ];\r\n\r\n $this->incidentEvent = new GlobalRegionEvent($message, $region);\r\n }\r\n\r\n\r\n }\r\n else if(self::LOCAL_INCIDENT == $level){\r\n\r\n $bankList = $_SESSION['state']->getBankList();\r\n $bank = $bankList[mt_rand(0, (count($bankList) -1))];\r\n\r\n $isPositive = $this->boolList[mt_rand(0, (count($this->boolList) -1))];\r\n\r\n $message = $messages[self::LOCAL_INCIDENT][$bank->getCountry()->getName()];\r\n\r\n $message = $message[$isPositive ? \"positive\" : \"negative\"];\r\n\r\n $message = $message[mt_rand(0,2)];\r\n\r\n $this->incidentEvent = new LocalIncidentEvent($message, $bank, $isPositive);\r\n\r\n }\r\n\r\n // calculates when the incident occurs, relative to the acctual move\r\n $this->numberOfMoves = mt_rand(MIN_MOVES_FOR_INCIDENT, MAX_MOVES_FOR_INCIDENT);\r\n $this->isActive = true;\r\n }", "public function actionCreate()\n {\n $post = Yii::$app->request->post();\n\n //参数检查\n if (!isset($post['name'])\n || !isset($post['address'])\n || !isset($post['tel'])\n || !isset($post['chief'])\n || !isset($post['idcard'])\n || !isset($post['Business_license_img'])\n || !isset($post['local_img'])\n || !isset($post['doctor_certificate_img'])\n ) {\n return Service::sendError(10400, '缺少参数');\n }\n\n //当前用户\n $user = \\yii::$app->user->identity;\n\n //判断当前用户类型,只有诊所(type=2)才可以注册,并且之前没有注册过\n if ($user->type != User::USER_CLINIC) {\n return Service::sendError(20701, '用户类型错误,不能注册诊所');\n }\n\n if (Clinic::findOne(['user_uuid' => $user->uuid])) {\n return Service::sendError(20702, '用户已经注册过诊所了');\n }\n\n //检查名字是否已经被注册\n if (Clinic::findOne(['name' => $post['name']])) {\n return Service::sendError(20702, '诊所名称已经被注册了');\n }\n\n $clinic = new Clinic();\n $clinic->name = $post['name'];\n $clinic->address = $post['address'];\n $clinic->tel = $post['tel'];\n $clinic->chief = $post['chief'];\n $clinic->idcard = $post['idcard'];\n $clinic->Business_license_img = $post['Business_license_img'];\n $clinic->local_img = $post['local_img'];\n $clinic->doctor_certificate_img = $post['doctor_certificate_img'];\n $clinic->user_uuid = $user->uuid;\n if ($clinic->save()) {\n return Service::sendSucc();\n } else {\n return Service::sendError(20703, '注册出错');\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 createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function create()\n {}", "public function createDefaultEntrant(): void\n {\n $entrant = new Entrant();\n $entrant->first_name = $this->first_name;\n $entrant->family_name = $this->last_name;\n $entrant->can_retain_data = $this->can_retain_data;\n if ($entrant->save()) {\n $this->entrants()->save($entrant);\n }\n }", "protected function createEntityId($entityId = null) {\n $entity = new $this->managerName;\n $entityObject = $entity;\n $entity = $entity->toArray();\n if ($entityId) {\n $params = \"id, broadcast_segment_broadcast_type_rels.*,\";\n foreach ($this->fields as $k => $v) {\n $params .= $k . \",\";\n }\n if (in_array('can_be_deleted', array_keys($entity))) {\n $params .= \"can_be_deleted\";\n }\n $params = rtrim($params, ',');\n ManagerHolder::get($this->managerName)->clearCacheGroup();\n $entity = ManagerHolder::get($this->managerName)->getById($entityId, $params);\n if (empty($entity)) {\n redirect($this->adminBaseRoute . '/' . strtolower($this->entityUrlName));\n }\n if (!empty($entity['broadcast_types']) && !empty($entity['broadcast_segment_broadcast_type_rels'])) {\n foreach ($entity['broadcast_types'] as $k => $v) {\n $entity['broadcast_types'][$k] = array_merge($v, $entity['broadcast_segment_broadcast_type_rels'][$k]);\n }\n }\n // Decode json fields\n if (!empty($entity['last_login_filter'])) {\n $entity['last_login_filter'] = json_decode($entity['last_login_filter'], TRUE);\n }\n if (!empty($entity['receipt_type_filter'])) {\n $entity['receipt_type_filter'] = json_decode($entity['receipt_type_filter'], TRUE);\n }\n if (!empty($entity['open_type_filter'])) {\n $entity['open_type_filter'] = json_decode($entity['open_type_filter'], TRUE);\n }\n if (!empty($entity['page_visit_filter'])) {\n $entity['page_visit_filter'] = json_decode($entity['page_visit_filter'], TRUE);\n }\n }\n return $entity;\n }", "public function createAction(Request $request)\n {\n $entity = new SolMantenimientoIdentificacion();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('solmantenimientoidentificacion_show', array('id' => $entity->getId())));\n }\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n // handled by client\n }", "public function Create()\n\t\t{\n\t\t\t$this->ID = null;\n\t\t\t$this->Created = new DateTime();\n\t\t\t$this->CreatedBy = User::GetCurrentUser();\n\t\t\t$this->Modified = new DateTime();\n\t\t\t$this->ModifiedBy = User::GetCurrentUser();\n\t\t\t\n\t\t\t$type = strtolower($this->GetType());\n\t\t\t$values = $this->GetChangedValues();\n\t\t\t\n\t\t\t$id = DomainObjectAccess::Create($type, $values);\n\t\t\t$this->ID = $id;\n\t\t\t\n\t\t\treturn true;\n\t\t}", "protected function createEntity()\n {\n return new $this->entityClass();\n }", "public function createInvoice(Invoice $invoice): Invoice;", "public function create()\n {\n }", "public function create()\n {\n }", "public function create($request)\n {\n return $this->atividadeComercialRepository->create($request);\n }", "protected function create()\n {\n return new $this->entityClass();\n }", "public function create()\n {\n \n //\n }", "public function create($audience)\n {\n if (!($audience instanceOf \\WebMarketingROI\\OptimizelyPHP\\Resource\\v2\\Audience)) {\n throw new Exception(\"Expected argument of type Audience\",\n Exception::CODE_INVALID_ARG);\n }\n \n $postData = $audience->toArray();\n \n $result = $this->client->sendApiRequest(\"/audiences\", array(), 'POST', \n $postData, array(201));\n \n $audience = new Audience($result->getDecodedJsonData());\n $result->setPayload($audience);\n \n return $result;\n }", "public function actionCreate ()\n {\n $model = new Client();\n\n return $this->createOrUpdate('create', $model);\n }", "public function create() {\n\t\t\t//\n\t\t}", "public function create($data)\n\t{\n\t\treturn $this->entity->create($data);\n\t}", "public function store(Request $request)\n {\n $industry = new Industry;\n\n $industry->country = $request->country; \n $industry->postal_code = $request->postal_code; \n $industry->industry = $request->industry; \n $industry->user_id=$request->user_id;\n\n\n \n $industry->save();\n\n return $industry; //importante altrimenti bacbone non riceve l'id in ritorno\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}", "protected abstract function importCreate($entity);", "public function create(){}", "protected function createEntityInstance($entityName) {\n\t\tif (is_subclass_of($entityName, '\\vBuilder\\Orm\\ActiveEntity')) {\t\n\t\t\treturn $this->context->repository->create($entityName);\n\t\t}\n\t\tthrow new Nette\\InvalidArgumentException(\"An entity must be a subclass of vBuilder\\Orm\\ActiveEntity!\");\n\t}", "public function createHospital(){\n\n\t}", "public function getEx4 () {\n $incident = new \\Safetymap\\Incident();\n\n # Set the parameters\n # Note how each parameter corresponds to a field in the table\n $incident->latitude= 42.358551;\n $incident->longitude = -71.053229;\n $incident->neighborhood = 'South Boston Waterfront';\n $incident->type = 'People double park their vehicles';\n $incident->text = 'Nearly every day there is a Budweiser or other beer delivery truck (never Harpoon, though!) double parked on India St. Sometimes they are even partially blocking Milk. This makes it impossible to see down India street for oncoming traffic.';\n $incident->user_id = 2;\n $incident->target_id = 2;\n # Invoke the Eloquent save() method\n # This will generate a new row in the `incidents` table, with the above data\n $incident->save();\n\n echo 'Added: '.$incident->type;\n }", "protected function createEntity()\n {\n return (new LogRecord());\n }", "public function insert(stubObject $entity);", "public function store(IncomeRequest $request)\n {\n try {\n $income = $request->user()->income()->create($request->validated());\n\n return (new IncomeResource($income))->additional([\n 'message' => 'Account record retrieved successfully',\n 'status' => 'success'\n ]);\n } catch (QueryException $e) {\n report($e);\n return response()->errorResponse(\n \"Error creating {$request->type}\",\n $e->getMessage()\n );\n }\n }", "public function create()\n {\n //\n }", "public function create(Request $request) {\n $data = $request->all();\n $invoice = $this->service\n ->store($data);\n return response()->json($invoice);\n }", "public function create(ArtRequestServiceEntity $e)\n {\n \n try\n { \n $q = \\ArtRequestORM\\ArtRequestorQuery::create()\n ->filterByDceName($e->getRequestorDCE())\n ->findOneOrCreate();\n \n if($q->isNew())\n {\n $q->setFirstName($e->getRequestorFirstName());\n $q->setLastName($e->getRequestorLastName());\n $q->setEmailAddress($e->getRequestorEmail());\n $q->setPhoneNumber($e->getRequestorPhoneNumber());\n $q->save();\n }\n \n return $q->getArtRequestorId();\n \n }\n catch(\\Exception $e)\n {\n throw new ModelException('Error Creating Art Requestor', $e);\n }\n \n }", "public function create(array $params)\n { \n $entity = $this->getRepository()->newEntity();\n $entity->uid = $this->getRepository()->generateUID();\n return $this->update($entity, $params);\n\n }", "public function create() {}", "protected function newEntity($className, array $data) {\n\t\t$entity = new $className;\n\t\tforeach ($data as $property => $value) {\n\t\t\tif ( ! Util::hasObjectSetMethod($entity, $property)) {\n\t\t\t\tthrow new \\Exception(\"The entity ({$className}) doesn't have a setter for the given property ({$property})!\");\n\t\t\t}\n\t\t\t\n\t\t\tUtil::callObjectSetMethod($entity, $property, $value);\n\t\t}\n\t\t\n\t\t$this->om->persist($entity);\n\t\t\n\t\treturn $entity;\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}" ]
[ "0.6706735", "0.6457992", "0.6446366", "0.6385899", "0.6277113", "0.61486065", "0.5979126", "0.59275085", "0.5880445", "0.58601385", "0.5850204", "0.5766788", "0.56750894", "0.5626665", "0.5607427", "0.55651003", "0.5553112", "0.55517745", "0.5489903", "0.54832596", "0.5471144", "0.5407186", "0.5400533", "0.537982", "0.53782713", "0.5362724", "0.53362167", "0.5333813", "0.53268206", "0.53237695", "0.52835685", "0.5273148", "0.52352375", "0.5217923", "0.5196197", "0.51930475", "0.5190664", "0.518286", "0.5179609", "0.51748294", "0.51743203", "0.5153871", "0.5129839", "0.5129839", "0.5127748", "0.5123809", "0.51118344", "0.5106595", "0.5095895", "0.50954574", "0.5094802", "0.5085931", "0.50786203", "0.5075811", "0.5074798", "0.50728947", "0.5068863", "0.5068863", "0.5068863", "0.5068863", "0.5067582", "0.50655884", "0.5062566", "0.50530636", "0.5052931", "0.5052464", "0.50396127", "0.5037701", "0.50336933", "0.5033204", "0.5033204", "0.50299126", "0.5026058", "0.5020627", "0.50152147", "0.5013797", "0.50077075", "0.50053173", "0.5003657", "0.49953312", "0.49953312", "0.49943334", "0.49941003", "0.49940637", "0.4987001", "0.49843398", "0.4980394", "0.4979946", "0.4977403", "0.49748817", "0.49748468", "0.4973004", "0.49708655", "0.49586704", "0.49569336", "0.49492466", "0.49492466", "0.49492466", "0.49492466", "0.49492466" ]
0.66564465
1
Creates a form to create a Incident entity.
private function createCreateForm(Incident $entity) { $form = $this->createForm(new IncidentType(), $entity, array( 'action' => $this->generateUrl('com_incident_create'), 'method' => 'POST', )); $form->add('submit', 'submit', array('label' => 'Créer','attr'=>array('class'=>'btn btn-success','style'=>'width:100px;'))); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createAction(Request $request)\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('com_incident_show', array('id' => $entity->getId())));\n }\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "private function createCreateForm(Resident $entity)\n {\n $form = $this->createForm(new ResidentType(), $entity, array(\n 'action' => $this->generateUrl('resident_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Incapacidad $entity)\n {\n $form = $this->createForm(new IncapacidadType(), $entity, array(\n 'action' => $this->generateUrl('admin_incapacidad_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar','attr'=>\n array('class'=>'btn btn-primary btn-sm')\n ));\n\n return $form;\n }", "private function createCreateForm(SolMantenimientoIdentificacion $entity)\n {\n $form = $this->createForm(new SolMantenimientoIdentificacionType(), $entity, array(\n 'action' => $this->generateUrl('solmantenimientoidentificacion_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Acc $entity)\n {\n $form = $this->createForm(new AccType(), $entity, array(\n 'action' => $this->generateUrl('acc_create'),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_create'),\n\t\t\t'method' => 'POST',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Create'));\n\n\t\treturn $form;\n\t}", "private function createCreateForm(Servicio $entity)\n {\n $securityContext = $this->container->get('security.context');\n $form = $this->createForm(new ServicioType($securityContext), $entity, array(\n 'action' => $this->generateUrl('administracion_servicio_create'),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Cosecha $entity)\n {\n $form = $this->createForm(new CosechaType(), $entity, array(\n 'action' => $this->generateUrl('cosecha_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Invoice $entity)\n {\n $form = $this->createForm(new InvoiceType(), $entity, array(\n 'action' => $this->generateUrl('invoice_create'),\n 'method' => 'POST',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Inspection $entity)\n {\n $form = $this->createForm(new InspectionType(), $entity, array(\n 'action' => $this->generateUrl('inspection_create'),\n 'method' => 'POST'\n ));\n\n $form->add('submit', 'submit', array('label' => 'Enregistrer','attr' => array('class'=>\"btn btn-default\"))); \n \n return $form;\n }", "private function createCreateForm(Cole $entity)\n {\n $form = $this->createForm(new ColeType(), $entity, array(\n 'action' => $this->generateUrl('cole_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Endroit $entity)\n {\n $form = $this->createForm(new EndroitType(), $entity, array(\n 'action' => $this->generateUrl('endroit_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(SkIdentificationModule $entity)\n {\n $form = $this->createForm(new SkIdentificationModuleType(), $entity, array(\n 'action' => $this->generateUrl('identification_module_admin_create'),\n 'method' => 'POST',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(DevisSetup $entity)\n {\n $form = $this->createForm(new DevisSetupType(), $entity, array(\n 'action' => $this->generateUrl('devissetup_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function newAction()\n {\n $entity = new Servicio();\n $entity->setActivo(1);\n\n //Se carga una provincia por defecto\n $provincia = $this->getDoctrine()\n ->getRepository('sisconeeAppBundle:Provincia')\n ->find(2);\n //Se le establece la provincia por defecto al servicio (necesario para el funcionamiento de la programacion asociada\n //a los eventos PRE_SET_DATA y PRE_SUBMIT)\n //var_dump($provincia);\n $entity->setProvincia($provincia);\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('incidentes.create');\n }", "private function createCreateForm(EventRegistration $entity)\n {\n\n\n $flow = $this->get('pixeloid_app.flow.eventRegistration'); // must match the flow's service id\n $flow->bind($entity);\n\n\n // $reservation = new AccomodationReservation;\n // $entity->setReservation($reservation);\n\n\n $flow->setGenericFormOptions(array(\n 'action' => $this->generateUrl('eventregistration_create'),\n 'method' => 'POST',\n ));\n\n\n return $flow;\n }", "function createCompany() {\n\t\t\t\t\t$addForm = new h2o('views/addCompany.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "private function createCreateForm(Client $entity) {\n $form = $this->createForm(new ClientType(), $entity, array(\n 'action' => $this->generateUrl('client_create'),\n 'method' => 'POST',\n ));\n\n return $form;\n }", "public function createAction()\n {\n $entity = new Customer();\n $request = $this->getRequest();\n $form = $this->createForm(new CustomerType(), $entity);\n\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('enterprise_show', array('id' => $entity->getId())));\n }\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "private function createCreateForm(Notice $entity)\n {\n $form = $this->createForm(new NoticeType(), $entity, array(\n 'action' => $this->generateUrl('_create'),\n 'method' => 'POST',\n ));\n $form->add('end', 'choice', [\n 'choices' => [\n '1 day' => '86400',\n '3 days' => '259200',\n '5 days' => '432000',\n '7 days' => '604800',\n '14 days' => '1209600',\n ],\n 'choices_as_values' => true,\n ]);\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function create()\n {\n return view('industry.form');\n }", "private function createCreateForm(Entreprise $entity)\n {\n $form = $this->createForm(new EntrepriseType(), $entity, array(\n 'action' => $this->generateUrl('ad_entreprise_create'),\n 'method' => 'POST',\n ));\n\n return $form;\n }", "private function createCreateForm(ClienteCredito $entity)\n {\n $form = $this->createForm(new ClienteCreditoType( $this->getDestinosCh() ), $entity, array(\n 'action' => $this->generateUrl('clientecredito_create'),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessType(), $entity, array(\n 'action' => $this->generateUrl('business_admin_create'),\n 'method' => 'POST',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function createForm();", "public function createForm();", "private function createEditForm(Incident $entity)\n {\n $form = $this->createForm(new IncidentType(), $entity, array(\n 'action' => $this->generateUrl('com_incident_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier','attr'=>array('class'=>'btn btn-warning','style'=>'width:100px;')));\n\n return $form;\n }", "private function createCreateForm(Intervalosips $entity)\n {\n $form = $this->createForm(new IntervalosipsType(), $entity, array(\n 'action' => $this->generateUrl('intervalosips_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Criar'));\n\n return $form;\n }", "public function newAction()\r\n {\r\n $entity = new Consulta();\r\n //Recuperación del paciente\r\n $request = $this->getRequest();\r\n $identidad= $request->get('identidad');\r\n $form = $this->createCreateForm($entity,1,$identidad);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function create()\n {\n return view('authorisations.form', [\n 'tab' => 'authorisations',\n 'types' => self::$types,\n 'notifyPeriods' => $this->notifyPeriods\n ]);\n }", "function createApprentice() {\n\t\t\t\t\t$addForm = new h2o('views/addApprentice.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "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}", "private function createCreateForm(Cidades $entity)\n {\n $form = $this->createForm(new CidadesType(), $entity, array(\n 'action' => $this->generateUrl('cidades_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(InvoiceAccountEntry $entity,$invoice_id)\n {\n $form = $this->createForm(new InvoiceAccountEntryType(), $entity, array(\n 'action' => $this->generateUrl('invoice_accountentry_create',array('invoice_id' => $invoice_id)),\n 'method' => 'POST',\n ));\n\n return $form;\n }", "private function createCreateForm(Sucursal $entity)\n {\n $form = $this->createForm(new SucursalType(), $entity, array(\n 'action' => $this->generateUrl('sucursal_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(PeriodoDeInscricao $entity)\n {\n $form = $this->createForm(new PeriodoDeInscricaoType(), $entity, array(\n 'action' => $this->generateUrl('periododeinscricao_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Enquiry $entity) {\n $form = $this->createForm(new EnquiryType(), $entity, array(\n 'action' => $this->generateUrl('contact_contact_contact'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit');\n\n return $form;\n }", "private function createCreateForm(Appointment $entity)\n {\n $form = $this->createForm(new AppointmentType(), $entity, array(\n 'action' => $this->generateUrl('appointment_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function createAction()\n {\n \tif (false === $this->get('security.context')->isGranted('ROLE_HUMAIN')) {\r\n \t\tthrow new AccessDeniedException();\r\n \t}\n $entity = new DisponibiliteInscription();\n $request = $this->getRequest();\n $form = $this->createForm(new DisponibiliteInscriptionType(), $entity);\n $form->bindRequest($request);\n\n \n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n return $this->redirect($this->generateUrl('disponibiliteinscription'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function newAction()\n {\n $entity = new Invoice();\n $form = $this->createCreateForm($entity);\n\n $invoiceLine = new InvoiceLine();\n $invoiceLineForm = $this->createForm(\n new InvoiceLineType($this->get('security.context')),\n $invoiceLine,\n array(\n 'action' => 'javascript:void(0);',\n 'method' => 'POST',\n )\n );\n $this->viewData['form'] = $form->createView();\n $this->viewData['entities'] = $entity;\n\n return $this->render('AcmeInvoiceBundle:Invoice:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'line_form' => $invoiceLineForm->createView(),\n ));\n }", "private function createCreateForm(Customer $entity)\n {\n $user = $this->getUser();\n $agency = $user->getAgency();\n $em = $this->getDoctrine()->getManager();\n \n $form = $this->createForm(new CustomerType(), $entity, array(\n 'action' => $this->generateUrl('customer_create'),\n 'method' => 'POST',\n ));\n \n if ($agency->getType() == \"MASTER\") {\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($user->getMaincompany());\n $form->add('agency', 'entity', array('label' => false, 'class' => 'NvCargaBundle:Agency', \n 'placeholder' => '--Seleccione una agencia--', \n 'choices' => $agencies,\n 'data' => $agency));\n } else {\n $form->add('agency', 'entity', array('label' => false, 'class' => 'NvCargaBundle:Agency', \n 'data' => $agency, 'readonly'=>true));\n \n $form->add('submit', 'submit', array('label' => 'Crear'));\n }\n $form->add('submit', 'submit', array('label' => 'Crear'));\n\n return $form;\n }", "private function createCreateForm(EnvaseIngreso $entity)\n {\n $form = $this->createForm(new EnvaseIngresoType(), $entity, array(\n 'action' => $this->generateUrl('envase_ingreso_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Ingresar', 'attr' => array('class' => \"btn btn-success\")));\n\n return $form;\n }", "public function create()\n {\n return view('incidences.create');\n }", "private function createCreateForm(Encuesta $entity)\n {\n $form = $this->createForm(new EncuestaType(), $entity, array(\n 'action' => $this->generateUrl('encuesta_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function create()\n {\n $this->validate();\n Contest::create($this->modelData());\n $this->modalFormVisible = false;\n $this->resetVars();\n }", "public function newAction()\n {\n $this->view->org = new OrganizationForm();\n }", "private function createCreateForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }", "public function createAction()\n {\n $em \t\t= $this->getDoctrine()->getEntityManager();\n $locale\t\t= $this->container->get('session')->getLocale();\n \n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n $entity \t= new Corporation();\n $request \t= $this->getRequest();\n $form \t= $this->createForm(new CorporationType($em, $this->container), $entity, array('show_legend' => false));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setTranslatableLocale($locale);\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('admin_gedmo_corporation_show', array('id' => $entity->getId(), 'NoLayout' => $NoLayout, 'category' => $category)));\n \n }\n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' \t=> $entity,\n 'form' \t=> $form->createView(),\n 'NoLayout' => $NoLayout,\n 'category'\t=> $category,\n ));\n }", "private function createCreateForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Crear','attr' => array('class' => 'btn btn-success'),));\n return $form;\n }", "private function createCreateForm(AdTiposComision $entity)\n {\n $form = $this->createForm(new AdTiposComisionType(), $entity, array(\n 'action' => $this->generateUrl('adtiposcomision_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Event $entity)\n {\n $eventType = new EventType();\n $form = $this->createForm($eventType, $entity, array(\n 'attr' => ['id' => $eventType->getName() . \"_id\"],\n 'action' => $this->generateUrl('event_create'),\n 'method' => 'POST',\n ));\n\n return $form;\n }", "public function create()\n {\n return \"Formulário para cadastrar um novo cliente.\";\n }", "private function createCreateForm(Annonce $entity)\n {\n $form = $this->createForm(new AnnonceType(), $entity, array(\n 'action' => $this->generateUrl('annonce_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }", "public function createForm()\n {\n }", "private function createCreateForm(Experience $entity)\n {\n $form = $this->createForm(new ExperienceType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "public function newAction()\n {\n $document = new Document();\n $type = $this->getDoctrine()->getManager()->getRepository('FlowerFinancesBundle:DocumentType')->findOneBy(array(\n 'name' => \\Flower\\FinancesBundle\\Entity\\DocumentType::TYPE_CUSTOMER_INVOICE\n ));\n $document->setType($type);\n\n $form = $this->createForm($this->get('finances.form.type.customer_invoice'), $document);\n\n return array(\n 'document' => $document,\n 'form' => $form->createView(),\n );\n }", "abstract public function createForm();", "abstract public function createForm();", "public function create()\n {\n return view('continents.create');\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('documento_institucionals.create');\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function actionCreate()\n {\n $model = new HospitalForm();\n if ($model->load(Yii::$app->request->post())) {\n $model->groupid=Groups::GROUP_HOSPITAL;\n $model->admin_user_id=Yii::$app->user->id;\n if($res = $model->signup()){\n return $this->redirect(['details', 'id' => $res->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'roles' => ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name')\n ]);\n }", "public function create()\n {\n $account = new AccountClient;\n return view('modules.organization.AccountClient.form', compact('account'));\n }", "public function newAction()\n {\n \tif (false === $this->get('security.context')->isGranted('ROLE_HUMAIN')) {\r\n \t\tthrow new AccessDeniedException();\r\n \t}\n $entity = new DisponibiliteInscription();\n $form = $this->createForm(new DisponibiliteInscriptionType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function newconcitaAction()\r\n {\r\n //Metodo para consulta nueva con el id de cita\r\n $entity = new Consulta();\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n \r\n //Recuperación del id\r\n $request = $this->getRequest();\r\n $cadena= $request->get('id');\r\n //$identidad= $request->get('identidad');\r\n //Obtener el id del parametro\r\n $idEntidad = substr($cadena, 1);\r\n $cita = $em->getRepository('DGPlusbelleBundle:Cita')->find($idEntidad);\r\n //var_dump($cadena);\r\n //var_dump($cita);\r\n $tratamiento = $cita->getTratamiento();\r\n \r\n $entity->setTratamiento($tratamiento);\r\n $idpaciente=$cita->getPaciente()->getId();\r\n \r\n //Busqueda del paciente\r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idpaciente);\r\n //Seteo del paciente en la entidad\r\n $entity->setPaciente($paciente);\r\n \r\n $form = $this->createCreateForm($entity,2,$cadena);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "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 }", "private function createCreateForm(Partner $entity)\n {\n $form = $this->createForm(new PartnerType(), $entity, array(\n 'action' => $this->generateUrl('admin_partners_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Créer',\n 'attr' => array(\n 'class' => 'btn btn-success'\n )\n ));\n\n return $form;\n }", "private function createCreateForm(DetailsProduits $entity) {\n $form = $this->createForm(new DetailsProduitsType(), $entity, array(\n 'action' => $this->generateUrl('detailsproduits_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Custom $entity)\n {\n $form = $this->createForm(new CustomType(), $entity, array(\n 'action' => $this->get('router')->generate('front_custom_create'),\n 'method' => 'POST',\n 'attr' => array(\n 'class' => 'log-reg-block sky-form',\n 'id' => 'sky-form4'\n ) \n ));\n\n return $form;\n }", "public function newAction()\n {\n \t$em \t\t= $this->getDoctrine()->getEntityManager();\n \t$entity \t= new Corporation();\n $form \t= $this->createForm(new CorporationType($em, $this->container), $entity, array('show_legend' => false));\n \n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n if($category)\n \t$entity->setCategory($category); \n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' \t=> $entity,\n 'form' \t=> $form->createView(),\n 'NoLayout' => $NoLayout,\n 'category'\t=> $category,\n ));\n }", "private function createCreateForm(Equipo $entity)\n {\n $form = $this->createForm(new EquipoType(), $entity, array(\n 'action' => $this->generateUrl('tecnoequipo_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Blackout $entity)\n {\n\n $form = $this->createForm(new BlackoutType(), $entity , array(\n 'action' => $this->generateUrl('blackout_create'),\n 'method' => 'POST',\n 'attr' => array(\n 'class' => 'form-horizontal',\n 'novalidate' => 'novalidate',\n )\n ));\n\n $form->add('submit', 'submit', array('label' => 'Submit', 'attr' => array('class' => 'btn btn-primary')));\n return $form;\n }", "private function createCreateForm(Fichepatient $entity)\n {\n $form = $this->createForm(new FichepatientType(), $entity, array(\n 'action' => $this->generateUrl('fichepatient_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function newAction()\n {\n $entity = new Incapacidad();\n \n $em = $this->getDoctrine()->getManager();\n $request = $this->getRequest();\n $cadena= $request->get('id');\n $idEntidad = substr($cadena, 1);\n\n if($idEntidad!=0){\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idEntidad);\n $entity->setPaciente($paciente);\n }\n else{\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->findAll();\n }\n \n \n \n $form = $this->createCreateForm($entity);\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view('client.form');\n }", "public function newAction()\n {\n/* \t$numfields = $this->getDoctrine()\n \t->getRepository('HegesAppConfigBundle:Configlinetype')\n \t->find($fieldsnumber);\n */\n \t\n \t\n $entity = new Configline();\n $form = $this->createForm(new ConfiglineType(), $entity);\n\n return $this->render('HegesAppConfigFileBundle:Configline:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "private function createCreateForm(Examen $entity)\n {\n $form = $this->createForm(new ExamenType(), $entity, array(\n 'action' => $this->generateUrl('examen_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Estadofondo $entity,$idperiodo)\n {\n $form = $this->createForm(new EstadofondoType(), $entity, array(\n 'action' => $this->generateUrl('estadofondo_create',array('idperiodo'=>$idperiodo)),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function actionCreate()\n\t{\n\n\t\t$model=new Companyorganisation;\n\t\tif(isset($_POST['Companyorganisation']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Companyorganisation'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->fOrgNo));\n\t\t}\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "private function createEditForm(Resident $entity)\n {\n $form = $this->createForm(new ResidentType(), $entity, array(\n 'action' => $this->generateUrl('resident_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createCreateForm(Dzialy $entity) {\n $form = $this->createForm(new DzialyType(), $entity, array(\n 'action' => $this->generateUrl('dzialy_create'),\n 'method' => 'POST',\n )); \n\n return $form;\n }", "public function actionCreate()\n\t{\n\t\t$model=new ClientInvoice;\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['ClientInvoice']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ClientInvoice'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n return view('pages.incident-types');\n }", "public function create()\n {\n return view('bsd-admin.expences.create');\n }", "public function newAction()\n {\n $entity = new Customer();\n $form = $this->createForm(new CustomerType(), $entity);\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "private function createCreateForm(Account $entity) {\n $form = $this->createForm(new AccountType(), $entity, array(\n 'action' => $this->generateUrl('account_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Reserva $entity){\n\t\t$user = $this->getUser();\n\t\tif ($user != null) {\n\t\t\t$roles = $user->getRoles();\n\t\t\tif (in_array('ROLE_ADMIN', $roles)) {\n\t\t\t\t$form = $this->createForm(new ReservaType(), $entity, array(\n\t\t\t\t\t'action' => $this->generateUrl('reserva_create'),\n\t\t\t\t\t'method' => 'POST',\n\t\t\t\t));\n\t\t\t}else{\n\t\t\t\t$form = $this->createForm(new ReservaUsuarioType(), $entity, array(\n\t\t\t\t\t'action' => $this->generateUrl('reserva_create'),\n\t\t\t\t\t'method' => 'POST',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t$form->add('submit', 'submit', array('label' => 'Crear Nueva Reserva', 'attr' => array('class' => 'btn btn-block btn-info')));\n\n\t\treturn $form;\n\t}", "public function createAction()\n {\n if ($this->request->isPost()) {\n\n $npfOffice = new NpfOffices();\n\n\n $npfOffice->assign(array(\n 'name_bn' => $this->request->getPost('name_bn', 'striptags'),\n 'name_en' => $this->request->getPost('name_en', 'striptags'),\n 'address_bn' => $this->request->getPost('address_bn', 'striptags'),\n 'address_en' => $this->request->getPost('address_en', 'striptags'),\n 'phone' => $this->request->getPost('phone', 'striptags'),\n 'email' => $this->request->getPost('email', 'striptags'),\n 'domain_id' => $this->request->getPost('domain_id', 'int'),\n ));\n\n if (!$npfOffice->save()) {\n $this->flash->error($npfOffice->getMessages());\n } else {\n\n $this->flash->success(\"Office was created successfully\");\n\n Tag::resetInput();\n }\n }\n\n $this->view->form = new NpfOfficesForm(null);\n }", "private function createCreateForm(Asignacion $entity)\n {\n $form = $this->createForm(new AsignacionType(), $entity, array(\n 'action' => $this->generateUrl('tecnoasignar_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "private function createCreateForm(Energy $entity)\n {\n $form = $this->createForm(new EnergyType(), $entity, array(\n 'action' => $this->generateUrl('energy_create'),\n 'method' => 'POST',\n ));\n\n return $form;\n }", "public function create()\n {\n $model = $this->getClassName();\n $config = $this->getCrudConfig('create');\n $item = app('App\\\\' . $model);\n $viewVars = [\n 'model' => $model,\n $config['viewVar'] => $item,\n 'viewVar' => $config['viewVar']\n ];\n foreach ($config['relatedModels'] as $var => $relatedModel) {\n $viewVars[$var] = app($relatedModel)::pluck('name', 'id');\n }\n return view(strtolower($model) . '.form', $viewVars);\n }", "private function createCreateForm(Reserva $entity)\n {\n $form = $this->createForm(new HorarioReservaType(), $entity, array(\n 'action' => $this->generateUrl('_horario_crear_reserva'),\n 'method' => 'POST',\n ));\n\n // $form->add('submit', 'submit', array('label' => '<span>Guardar</span>'));\n\n return $form;\n }", "public function create()\n {\n $data['action'] = 'invoice.store';\n return view('invoice.form', $data);\n }" ]
[ "0.7192309", "0.68735206", "0.68468374", "0.6635487", "0.66038954", "0.65442777", "0.65247846", "0.6472963", "0.64462566", "0.6418852", "0.6418213", "0.63939124", "0.6363234", "0.6362272", "0.6343542", "0.6338978", "0.63089514", "0.6285326", "0.62333995", "0.6231594", "0.62127304", "0.6202248", "0.6191603", "0.61807257", "0.61793405", "0.6178248", "0.61762017", "0.61762017", "0.6165312", "0.6110974", "0.61086315", "0.60997844", "0.6095326", "0.607868", "0.60717916", "0.6055979", "0.6047492", "0.6046441", "0.6039123", "0.60279024", "0.60194683", "0.60162246", "0.6004449", "0.60041344", "0.60017693", "0.59894955", "0.5983419", "0.5974642", "0.5972691", "0.59710157", "0.5961289", "0.5954528", "0.59541565", "0.5951346", "0.5948827", "0.59477115", "0.5945108", "0.5944669", "0.5940554", "0.5940554", "0.5939955", "0.59355", "0.59312916", "0.5922581", "0.5919072", "0.5915157", "0.59092504", "0.5908248", "0.5905535", "0.5884864", "0.5883476", "0.5880786", "0.58703387", "0.586018", "0.5859558", "0.5857122", "0.585301", "0.5847127", "0.58405143", "0.5838659", "0.5838659", "0.58295876", "0.58258003", "0.5820201", "0.5818875", "0.5812893", "0.58090687", "0.5805587", "0.5803747", "0.5796559", "0.57939243", "0.5789074", "0.57877076", "0.5786758", "0.57819945", "0.57765144", "0.5770897", "0.57695985", "0.57695186", "0.5766946" ]
0.74190396
0
Displays a form to create a new Incident entity.
public function newAction() { $entity = new Incident(); $form = $this->createCreateForm($entity); return $this->render('ComDaufinBundle:Incident:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n {\n $entity = new Customer();\n $form = $this->createForm(new CustomerType(), $entity);\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "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 createAction(Request $request)\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('com_incident_show', array('id' => $entity->getId())));\n }\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createAction()\n {\n $entity = new Customer();\n $request = $this->getRequest();\n $form = $this->createForm(new CustomerType(), $entity);\n\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('enterprise_show', array('id' => $entity->getId())));\n }\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n {\n return view('incidentes.create');\n }", "public function newAction()\n {\n $entity = new Invoice();\n $form = $this->createCreateForm($entity);\n\n $invoiceLine = new InvoiceLine();\n $invoiceLineForm = $this->createForm(\n new InvoiceLineType($this->get('security.context')),\n $invoiceLine,\n array(\n 'action' => 'javascript:void(0);',\n 'method' => 'POST',\n )\n );\n $this->viewData['form'] = $form->createView();\n $this->viewData['entities'] = $entity;\n\n return $this->render('AcmeInvoiceBundle:Invoice:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'line_form' => $invoiceLineForm->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Servicio();\n $entity->setActivo(1);\n\n //Se carga una provincia por defecto\n $provincia = $this->getDoctrine()\n ->getRepository('sisconeeAppBundle:Provincia')\n ->find(2);\n //Se le establece la provincia por defecto al servicio (necesario para el funcionamiento de la programacion asociada\n //a los eventos PRE_SET_DATA y PRE_SUBMIT)\n //var_dump($provincia);\n $entity->setProvincia($provincia);\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new SolMantenimientoIdentificacion();\n $form = $this->createCreateForm($entity);\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\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 newAction()\n {\n \t$em \t\t= $this->getDoctrine()->getEntityManager();\n \t$entity \t= new Corporation();\n $form \t= $this->createForm(new CorporationType($em, $this->container), $entity, array('show_legend' => false));\n \n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n if($category)\n \t$entity->setCategory($category); \n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' \t=> $entity,\n 'form' \t=> $form->createView(),\n 'NoLayout' => $NoLayout,\n 'category'\t=> $category,\n ));\n }", "private function createCreateForm(Incident $entity)\n {\n $form = $this->createForm(new IncidentType(), $entity, array(\n 'action' => $this->generateUrl('com_incident_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer','attr'=>array('class'=>'btn btn-success','style'=>'width:100px;')));\n\n return $form;\n }", "public function newAction()\n {\n $entity = new Entreprise();\n $form = $this->createCreateForm($entity);\n $erreur = \"\";\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:new.html.twig', array(\n 'entity' => $entity,\n 'erreur' => $erreur,\n 'form' => $form->createView(),\n ));\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 newAction()\n {\n $this->view->org = new OrganizationForm();\n }", "public function newAction()\n {\n/* \t$numfields = $this->getDoctrine()\n \t->getRepository('HegesAppConfigBundle:Configlinetype')\n \t->find($fieldsnumber);\n */\n \t\n \t\n $entity = new Configline();\n $form = $this->createForm(new ConfiglineType(), $entity);\n\n return $this->render('HegesAppConfigFileBundle:Configline:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\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 $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 newAction()\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n } \n\n $entity = new Intervalosips();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SytemSGBundle:Intervalosips:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Acc();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FlyPlatformBundle:Acc:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('incidences.create');\n }", "public function create()\n {\n return view('industry.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 createAction()\n {\n $em \t\t= $this->getDoctrine()->getEntityManager();\n $locale\t\t= $this->container->get('session')->getLocale();\n \n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n $entity \t= new Corporation();\n $request \t= $this->getRequest();\n $form \t= $this->createForm(new CorporationType($em, $this->container), $entity, array('show_legend' => false));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setTranslatableLocale($locale);\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('admin_gedmo_corporation_show', array('id' => $entity->getId(), 'NoLayout' => $NoLayout, 'category' => $category)));\n \n }\n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' \t=> $entity,\n 'form' \t=> $form->createView(),\n 'NoLayout' => $NoLayout,\n 'category'\t=> $category,\n ));\n }", "public function create()\n {\n return \"Formulário para cadastrar um novo cliente.\";\n }", "public function newAction()\n {\n $entity = new Vaccines();\n $form = $this->createForm(new VaccinesType(), $entity);\n\n return $this->render('AcmeChildrenBundle:Vaccines:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\r\n {\r\n $entity = new Consulta();\r\n //Recuperación del paciente\r\n $request = $this->getRequest();\r\n $identidad= $request->get('identidad');\r\n $form = $this->createCreateForm($entity,1,$identidad);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function newAction()\n {\n $entity = new Resident();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "function createCompany() {\n\t\t\t\t\t$addForm = new h2o('views/addCompany.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "public function newAction()\n {\n $entity = new Encuesta();\n $form = $this->createCreateForm($entity);\n\n return $this->render('EncuestaBundle:Encuesta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction() {\n\n $entity = $this->get('admin.helper.ClothingType')->createNew();\n $form = $this->createForm(new ClothingTypes('add',$entity), $entity);\n return $this->render('LoveThatFitAdminBundle:ClothingType:new.html.twig', array(\n 'form' => $form->createView()));\n }", "public function newAction()\n {\n $entity = new Cosecha();\n $form = $this->createCreateForm($entity);\n\n return $this->render('UpaoFundoBundle:Cosecha:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new PeriodoDeInscricao();\n $form = $this->createCreateForm($entity);\n\n return $this->render('EventFormBundle:PeriodoDeInscricao:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n {\n $model = new HospitalForm();\n if ($model->load(Yii::$app->request->post())) {\n $model->groupid=Groups::GROUP_HOSPITAL;\n $model->admin_user_id=Yii::$app->user->id;\n if($res = $model->signup()){\n return $this->redirect(['details', 'id' => $res->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'roles' => ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name')\n ]);\n }", "public function actionCreate()\n {\n $model = new Inventorier();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->codebien]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function incomeFormAction()\n\t{\n\t\tView::renderTemplate('Income/addIncome.html', [\n\t\t\t'date' => date('Y-m-d'),\n\t\t\t'incomes' => Income::getIncomesCategories()\n\t\t]);\n\t}", "public function create()\n {\n return view('bsd-admin.expences.create');\n }", "public function newAction()\n {\n $entity = new SkIdentificationModule();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SkaphandrusAppBundle:SkIdentificationModule:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new CarpetaEmprendimiento();\n $form = $this->createForm(new CarpetaEmprendimientoType(), $entity);\n\n return $this->render('IamSoftAndrethaBundle:CarpetaEmprendimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function newAction()\n {\n \tif (false === $this->get('security.context')->isGranted('ROLE_HUMAIN')) {\r\n \t\tthrow new AccessDeniedException();\r\n \t}\n $entity = new DisponibiliteInscription();\n $form = $this->createForm(new DisponibiliteInscriptionType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n {\n return view('continents.create');\n }", "public function nuevoAction()\n {\n $entity = new EnvaseIngreso();\n $entity->setFecha(new \\DateTime('NOW'));\n \n $form = $this->createCreateForm($entity);\n \n return $this->render('NossisBundle:EnvaseIngreso:new.html.twig',\n array( 'form' => $form->createView(), 'entity' => $entity,\n )); \n \n }", "public function newAction()\n {\n $entity = new Capacitador();\n $form = $this->createForm(new CapacitadorType(), $entity);\n\n /*** -Institucion ***/\n $institucion = new Institucioncapacitadora();\n $forminst = $this->createForm(new InstitucioncapacitadoraType(), $institucion);\n /** ---- **/\n \n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Facilitadores\", $this->get(\"router\")->generate(\"pantalla_facilitadores\"));\n $breadcrumbs->addItem(\"Registrar facilitador\", $this->get(\"router\")->generate(\"hello_page\"));\n\n return $this->render('CapacitacionBundle:Capacitador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'forminst'=>$forminst->createView(),\n ));\n }", "public function create()\n {\n return view('documento_institucionals.create');\n }", "function createApprentice() {\n\t\t\t\t\t$addForm = new h2o('views/addApprentice.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "public function create()\n {\n return view('admin.insurance.create');\n }", "public function newAction() {\n $entity = new Customers();\n $form = $this->createCreateForm($entity);\n\n return $this->render('NumaCCCAdminBundle:Customers:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction() {\n $entity = new actualite();\n $form = $this->createForm(new actualiteType(), $entity);\n\n return $this->render('CabinetMedicalBundle:actualite:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Event();\n $form = $this->createCreateForm($entity);\n\n return $this->render('HospiceSiteBundle:Event:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n\t{\n\n\t\t$model=new Companyorganisation;\n\t\tif(isset($_POST['Companyorganisation']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Companyorganisation'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->fOrgNo));\n\t\t}\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new InterviewDistrict();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function newAction() {\n $entity = new Gasolina();\n $form = $this->createForm(new GasolinaType(), $entity);\n\n return $this->render('TxinbometroBundle:Gasolina:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create(){\n\t\treturn view('driver.expense.create');\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 create()\n {\n return view('warrant::admin.acts.create');\n }", "public function newAction()\n {\n $entity = new Server();\n $form = $this->createForm(new ServerType(), $entity);\n\n return $this->render('HegesAppManagementBundle:Server:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n {\n return view('company.companycreate' );\n }", "public function newAction() {\n $entity = new Account();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AcmebsceneBundle:Account:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n if (! Gate::allows('Admin_Manage')) {\n return abort(401);\n }\n return view('system.company.create');\n }", "public function newAction()\n {\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('CREATE', $journal, 'design')) {\n throw new AccessDeniedException(\"You are not authorized for create a this journal's design!\");\n }\n $entity = new JournalDesign();\n $form = $this->createCreateForm($entity, $journal->getId());\n\n return $this->render(\n 'OjsJournalBundle:JournalDesign:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\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 newAction()\n {\n $entity = new Visit();\n $form = $this->createForm(new VisitType(), $entity);\n\n return $this->render('NRTestPetClinicBundle:Visit:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function newFormAction()\n {\n $entity = new BaseEntity();\n $form = $this->createForm(BaseType::class, $entity);\n\n return $this->render('backOffice/area/new.html.twig', array(\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n\t{\n\t\t$model = new AccountInvoice();\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "public function create()\n {\n return view('dashboard.company_insert',[\n \"title\" => \"Insert Company\",\n \"active\" => \"company\"\n ]);\n }", "public function create()\n {\n return view('company.insertcompany');\n }", "public function newAction()\n {\n $entity = new Pensum();\n $form = $this->createForm(new PensumType(), $entity);\n\n return $this->render('QQiRecordappBundle:Pensum:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $this->authorize('admin.resident.create');\n\n return view('admin.resident.create');\n }", "public function create()\n {\n //\n return view('admin.incoterm.create');\n }", "public function newAction()\n {\n $entity = new Airoport();\n $form = $this->createForm(new AiroportType(), $entity);\n\n return $this->render('BackendAdminBundle:Airoport:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function newAction()\n {\n $entity = new ingrediente();\n $form = $this->createCreateForm($entity);\n\n return $this->render('uniRecetasBundle:ingrediente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n {\n\t\t$idInstitucion = $_SESSION['instituciones'][0];\n $model = new InfraestructuraEducativa();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\t\n\t\t$sedes = $this->obtenerSedes($idInstitucion);\n\t\t$estados = $this->obtenerEstados();\n\t\t\n return $this->render('create', [\n 'model' => $model,\n\t\t\t'sedes'=> $sedes,\n\t\t\t'estados'=>$estados,\n\t\t\t'idInstitucion'=>$idInstitucion,\n ]);\n }", "public function newAction()\n {\n $entity = new Fichepatient();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MedecinIBundle:Fichepatient:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createAction()\n {\n $entity = new Visit();\n $request = $this->getRequest();\n $form = $this->createForm(new VisitType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('visit_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('NRTestPetClinicBundle:Visit:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function newAction()\n {\n $entity = new Utente();\n $form = $this->createCreateForm($entity);\n\n return $this->render('estarRdaBundle:Utente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $societe = new Societe();\n\n $form = $this->createCreateForm($societe);\n\n $pages = array();\n $pages['Sociétés'] = \"movibe_backend_societe\";\n $pages['Creation'] = \"\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:Societe:new.html.twig', array(\n 'societe' => $societe,\n 'form' => $form->createView(),\n ));\n }", "public function newAction() {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'index');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = new Demande();\n $form = $this->createForm(new DemandeType(), $entity);\n\n return $this->render('AeagDieBundle:Demande:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('pages.incident-types');\n }", "public function newAction()\n {\n $entity = new Bien();\n $form = $this->createCreateForm($entity);\n\n return $this->render('InventarioBundle:Bien: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 actionCreate()\n {\n $model = new EntOficiales();\n $model->uddi = Utils::generateToken();\n $model->fch_creacion = Calendario::getFechaActual();\n $model->txt_rol='oficial';\n $model->b_habilitado=1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function newAction()\n {\n $entity = new Feriado();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BaseBundle:Feriado:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $manager = $this->container->get('app_manager_listkdo');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n 'AppBundle:ListKdo:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "public function create()\n {\n return view('cat_edo_civils.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}", "public function newAction()\n {\n $entity = new Fluidite();\n $form = $this->createCreateForm($entity);\n\n return $this->render('GestionPassBundle:Fluidite:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $account = new AccountClient;\n return view('modules.organization.AccountClient.form', compact('account'));\n }", "public function newAction()\n {\n $entity = new Education();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SyndicateComponentBundle:Education:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n {\n $model = new CompanyForm();\n\n if ($model->load(Yii::$app->request->post()) && ($company = $model->create())) {\n return $this->redirect(['view', 'id' => $company->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function newAction()\n {\n $entity = new CaracteristicasEquipo();\n $form = $this->createCreateForm($entity);\n\n return $this->render('EquipoBundle:CaracteristicasEquipo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n {\n if (!Yii::$app->user->can(\"lentEdc\"))\n throw new ForbiddenHttpException(\"ไม่มีสิทธิ์เข้าถึงข้อมูล\");\n\n $model = new LentSave();\n\n if ($model->load(Yii::$app->request->post())) {\n\n if ($model->save())\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function newAction()\n {\n $entity = new Customer();\n $maincompany = $this->getUser()->getMaincompany();\n $em = $this->getDoctrine()->getManager();\n $flashBag = $this->get('session')->getFlashBag();\n foreach ($flashBag->keys() as $type) {\n $flashBag->set($type, array());\n }\n $countcustomer = $maincompany->getCountcustomers();\n $plan = $maincompany->getPlan();\n if (($plan->getCustomers()) && ($countcustomer >= $plan->getMaxcustomers())) {\n $message = 'Ha llegado al número máximo de CLIENTES permitidos. Para crear más debe actualizar su plan a uno superior.';\n if ($this->isGranted('ROLE_ADMIN')) {\n $message = $message . '<a href=\"' . $this->generateUrl('loginmain') . '\" > Actualizar ahora</a>';\n }\n $flashBag->add('notice',$message);\n }\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n\t{\n return view('backend.clienti.create');\n\t}", "public function create()\n {\n return view('backend.partner.create');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('admin.company.create');\n }", "public function create()\n {\n if (!checkRole(getUserGrade(1)))\n {\n prepareBlockUserMessage();\n return back();\n }\n\n $data['title'] = 'Create Industry Type';\n $data['active_class'] = 'industry_type';\n \n\n $data['subscribers'] = Subscriber::getSubscriberOptions();\n \n return view('admin.industry_type.create', $data);\n }", "public function create()\n {\n return view('authorisations.form', [\n 'tab' => 'authorisations',\n 'types' => self::$types,\n 'notifyPeriods' => $this->notifyPeriods\n ]);\n }" ]
[ "0.70455056", "0.7045127", "0.7003517", "0.69731975", "0.6914362", "0.68953305", "0.68729633", "0.681382", "0.6805253", "0.6802053", "0.67273897", "0.66950154", "0.6684786", "0.6684345", "0.66575485", "0.66535896", "0.6651636", "0.66473633", "0.66428775", "0.66112876", "0.6584669", "0.6580263", "0.6570392", "0.65697837", "0.65558267", "0.6555764", "0.6555622", "0.65489566", "0.65382814", "0.6534316", "0.65237844", "0.6483092", "0.64804995", "0.64799196", "0.6477847", "0.64723337", "0.6471646", "0.64615536", "0.6460349", "0.64528054", "0.6452558", "0.64508724", "0.6442295", "0.6437479", "0.6425792", "0.64251304", "0.6424208", "0.64205295", "0.6417639", "0.641665", "0.6415978", "0.6398831", "0.6395287", "0.6394779", "0.63923556", "0.6389879", "0.6383385", "0.6382892", "0.63823307", "0.6380315", "0.6380287", "0.6372198", "0.6371455", "0.63669044", "0.63596636", "0.6359402", "0.63567674", "0.6353228", "0.63494897", "0.6345898", "0.6341233", "0.6339335", "0.6335563", "0.6329592", "0.6320999", "0.6314969", "0.6313603", "0.63039505", "0.63006055", "0.6297374", "0.62946784", "0.6289507", "0.62889546", "0.62859666", "0.6285519", "0.62844855", "0.6282208", "0.6277481", "0.6274288", "0.6269291", "0.62666136", "0.6261591", "0.62543344", "0.62515455", "0.62513727", "0.6248298", "0.6247942", "0.62465864", "0.62459415", "0.62351424" ]
0.82271135
0
Finds and displays a Incident entity.
public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Incident entity.'); } $deleteForm = $this->createDeleteForm($id); return $this->render('ComDaufinBundle:Incident:show.html.twig', array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ComDaufinBundle:Incident')->findAll();\n\n return $this->render('ComDaufinBundle:Incident:index.html.twig', array(\n 'entities' => $entities,\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 show(Ong $entity)\n {\n return $entity;\n }", "public function show(cr $cr)\n {\n //\n }", "public function show(cr $cr)\n {\n //\n }", "public function show(cr $cr)\n {\n //\n }", "public function show(cr $cr)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function viewEntity($entity_id) {\n $account = $this->getAccount();\n return parent::viewEntity($account->uid);\n }", "public function show(Corporate $corporate)\n {\n //\n }", "public function show($id)\n {\n $incidente = Incidente::find($id);\n // select * from incidente where id = $id;\n\n return view('incidentes.show', compact('incidente'));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SolMantenimientoIdentificacion entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showIncoherenceInFormAction() {\n $incoherenceRepository = $this->getDoctrine()->getRepository('CoreBundle:IncoherenceLog');\n $incoherences = $incoherenceRepository->findByUser($this->getUser());\n\n return $this->render('@Core/Social/incoherence.html.twig', array(\n 'incoherences' => $incoherences,\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Incident entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ComDaufinBundle:Incident:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Cause $entity)\n {\n return $entity;\n }", "public function show(Incident $incident)\n {\n return new IncidentResource($incident);\n }", "public function newAction()\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function showAction()\n {\n $myCompany = $this->get('mycompany')->getOrCreateDefaultMyCompany();\n\n return $this->render('mycompany/show.html.twig', array('mycompany' => $myCompany,));\n }", "public function show(EvidentionStatus $evidentionStatus)\n {\n //\n }", "public function viewCampaignInvoiceAction()\n {\n $id = $this->request->query->get('id');\n $easyadmin = $this->request->attributes->get('easyadmin');\n $entity = $easyadmin['item'];\n\n return $this->render('easy_admin/Campaign/viewInvoice.html.twig', array(\n 'entity' => $entity\n ));\n }", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $actualite = $em->getRepository('MyAppEspritBundle:Actualite')->findAll();\n\n return $this->render('MyAppEspritBundle:Actualite:show.html.twig', array(\n 'actualite' => $actualite,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeInvoiceBundle:Invoice')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Invoice entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeInvoiceBundle:Invoice:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Attendence $attendence)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EnterpriseBundle:Customer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el cliente solicitado');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EnterpriseBundle:Default:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->findOrden();\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BackendBundle:Founder')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Founder entity.');\n }\n\n return $this->render('BackendBundle:Founder:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "public function show(ExpenceHead $expenceHead)\n {\n\n }", "public function find($entity_id);", "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetMedicalBundle:actualite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find actualite entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetMedicalBundle:actualite:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),));\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //recupérer le repo\n $repository = $em->getRepository('InsatGl2Bundle:Personne');\n\n $personnes = $repository->findAll();\n\n\n return $this->render('@InsatGl2\\Personne\\show.html.twig',\n array(\n 'personnes'=> $personnes\n ));\n }", "public function show($id)\n {\n $enterprise = Enterprise::findOrFail($id);\n //dd($enterprise);\n $data = [\n 'enterprise' => $enterprise,\n \n ];\n return view('enterprise.show')->with($data);\n }", "public function show(Entrenador $entrenador)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HospiceSiteBundle:Event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Event entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HospiceSiteBundle:Event:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function show(Company $company)\n {\n\n }", "public function show(ExpenceManagement $expenceManagement) {\n\t\t//\n\t}", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function showAction(Request $request, $id) {\n\n\n $em = $this->getDoctrine()->getManager();\n\n\n $entity = $em->getRepository('AcmebsceneBundle:Account')->find($id);\n $eventList = $this->getUpcomingMeetingList($id);\n $pastEventList = $this->getPastMeetingList($id);\n $eventCount = \\Count($eventList);\n $pastEventCount = \\Count($pastEventList);\n $noEventsMsg = \"There are no upcoming events posted by this user\";\n $noPastEventsMsg = \"There are no past events for this user\";\n\n $organization = $this->getOrgUrl($id);\n\n\n if ($eventCount > 3) {\n $eventList = array_slice($eventList, 0, 3);\n }\n if ($pastEventCount > 3) {\n $pastEventList = array_slice($pastEventList, 0, 3);\n }\n\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Account entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmebsceneBundle:Account:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n 'upcoming' => $eventList,\n 'past' => $pastEventList,\n 'noEventsMsg' => $noEventsMsg,\n 'noPastEventsMsg' => $noPastEventsMsg,\n 'eventCount' => $eventCount,\n 'pastEventCount' => $pastEventCount,\n 'organization' => $organization,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteSavalizeBundle:Company')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Company entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteSavalizeBundle:Company:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function show($id)\n {\n $incidente=Incidente::find($id);\n \n $tipos = Tipo::find($incidente->tipo_id);\n $reporter = User::find($incidente->reporter_id);\n\n $sectores = Sector::all();\n $users = User::all();\n $detallesInci = DetalleDeIncidente::where('incidente_id',$id)->get();\n\n if($incidente->estado == \"Finalizado\"){\n $resolver = User::find($incidente->resolver_id);\n }\n else{\n $resolver = null;\n\n }\n return view('incidente.show',compact('sectores','users','detallesInci','incidente','tipos','reporter','resolver'));\n }", "public function display()\n {\n if ($this->_query == '')\n {\n WCFDataServicesEntity::displayEntities();\n }\n else\n {\n WCFDataServicesEntity::displayEntityData();\n }\n }", "function showCompany() {\n\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\n\t\t\t\t\t$editForm = new h2o('views/editCompany.html');\n\t\t\t\t\techo $editForm->render(compact('company'));\n\t\t\t\t}", "function showkid_civicrm_managed(&$entities) {\n return _showkid_civix_civicrm_managed($entities);\n}", "public function show(Efectivo $efectivo)\n {\n //\n }", "public function show($id)\n {\n $entity = Entity::with('user')->findOrFail($id);\n\n return view('entities.show', compact('entity'));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('sisconeeAppBundle:Servicio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Servicio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showIngredient($identifier);", "public function show(Invoice $invoice)\n {\n //\n }", "public function show(Invoice $invoice)\n {\n //\n }", "public function show(Invoice $invoice)\n {\n //\n }", "public function displayperson() {\r\n if (isset($_GET['id'])) {\r\n $display = $this->model->displayPerson($_GET['id']);\r\n }\r\n return $this->view('/company/displayperson', $display);\r\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AciliaCmsBundle:Energy')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Energy entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AciliaCmsBundle:Energy:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfectBackendBundle:Species')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Species entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfectBackendBundle:Species:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function showAction($id)\n {\n $em \t\t= $this->getDoctrine()->getEntityManager();\n $locale\t\t= $this->container->get('session')->getLocale();\n $entity \t= $em->getRepository(\"PiAppGedmoBundle:Corporation\")->findOneByEntity($locale, $id, 'object');\n \n $type\t = $this->container->get('request')->query->get('type');\n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout) \t$template = \"show.html.twig\"; else $template = \"show.html.twig\"; \n\n if (!$entity) {\n throw ControllerException::NotFoundException('Corporation');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' => $entity,\n 'NoLayout'\t => $NoLayout,\n 'category'\t => $category,\n 'delete_form' => $deleteForm->createView(),\n \t'type'\t\t => $type,\n ));\n }", "public function show(EmployeeInfo $employee)\n {\n\n }", "public function getEx3 (){\n $incidents= \\DB::select(\"SELECT * FROM incidents WHERE neighborhood LIKE '%North%'\");\n\n // Output the results\n foreach($incidents as $incident) {\n echo $incident->type.'<br>';\n }\n\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmiageReviewManagerBundle:Examen')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Examen entity.');\n }\n\n return $this->render('EmiageReviewManagerBundle:Examen:print.html.twig', array(\n 'entity' => $entity,));\n }", "public function show(Expense $expense)\n {\n //\n }", "public function show(Expense $expense)\n {\n //\n }", "public function show(Insurance $insurance)\n {\n //\n }", "public function show(Insurance $insurance)\n {\n //\n }", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "public function show($oid)\n {\n //\n }", "public function show(Income $income)\n {\n //\n }", "public function show(Vendor $vendor)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FlyPlatformBundle:Acc')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Acc entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FlyPlatformBundle:Acc:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\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($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('estarRdaBundle:Utente')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Utente entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('estarRdaBundle:Utente:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(IntentionToPay $intentionToPay)\n {\n //\n }", "public function show($id)\n\t{\n\t\t//\n\n\t\t$exhibitionevent=ExhibitionEvent::find($id);\n\n\t\t// $systemtrack=new Systemtrack;\n // $systemtrack->user_id=Auth::User()->id;\n // // $systemtrack->spot_id=$booth->spot_id;\n // $systemtrack->do=Auth::User()->name.' '.'visit'.' '.$exhibitionevent->name.' Event '.'at'.' '.date(\"Y-m-d H:i:s\");\n // $systemtrack->comein_at=date(\"Y-m-d H:i:s\");\n\n // $systemtrack->type='exhibitionevent';\n // $systemtrack->type_id=$id;\n\n // $systemtrack->save();\n\n\n\t\treturn view('exhibitionevents.show',compact('exhibitionevent'));\n\t}", "public function show(Evange $evange)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('OjsUserBundle:EventLog')->find($id);\n\n if (!$entity)\n throw $this->createNotFoundException('notFound');\n\n $token = $this\n ->get('security.csrf.token_manager')\n ->refreshToken('ojs_admin_event_log'.$entity->getId());\n\n return $this->render(\n 'OjsAdminBundle:AdminEventLog:show.html.twig',\n ['entity' => $entity, 'token' => $token]\n );\n }", "public function showAction(Request $request, $id)\n {\n $session = $request->getSession();\n $menu = $session->get('_menu');\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('VictoriaAppBundle:AdTiposComision')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find AdTiposComision entity.');\n }\n\n\n return $this->render('VictoriaAppBundle:AdTiposComision:show.html.twig', array(\n 'entity' => $entity,\n 'menu' => $menu,\n ));\n }", "public function show( int $expenseId );", "public function showAction($id)\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SytemSGBundle:Intervalosips')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervalos de Ips entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SytemSGBundle:Intervalosips:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Venue $venue)\n {\n //\n }", "public function show($id)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n return view('incidences.show')->with('incidence', $incidence);\n }", "public function show(InvoicesDetails $invoicesDetails)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:show.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function showMeTheWayAction()\n {\n $em = $this->get('doctrine.orm.entity_manager');\n // first check our log entries\n $repo = $em->getRepository('Gedmo\\Loggable\\Entity\\LogEntry'); // we use default log entry class\n $client = $em->find('AppBundle:Client', 10 /*article id*/);\n dump($client->getFullname()); // prints \"my title\"\n $logs = $repo->getLogEntries($client);\n dump($logs);\n /* $logs contains 2 logEntries */\n // lets revert to first version\n //$repo->revert($client, 1/*version*/);\n // notice article is not persisted yet, you need to persist and flush it\n //$em->persist($client);\n //$em->flush();\n }", "public function show($id)\n {\n //\n return Incidencies::get()->where('ass_id','=',$id);\n }", "public function show(Incoterm $incoterm)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Education entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SyndicateComponentBundle:Education:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EquipoBundle:CaracteristicasEquipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CaracteristicasEquipo entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EquipoBundle:CaracteristicasEquipo:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(SubjectShow $request, $tenant,Subject $subject)\n {\n// event(new IncidentShowed($incident));\n// return $incident->map();\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EncuestaBundle:Encuesta')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Encuesta entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EncuestaBundle:Encuesta:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showInformation($id){\n\t\t$client = $this->clientdb->read($id);\n\t\tif ($client!== null) {\n\t\t\t$this->view->makeClientPage($id, $client);\n\t\t}else{\n\t\t\t$this->view->makeUnknownClientPage();\n\t\t}\n\t}", "public function incident() {\n return StatusBoard_Incident::fromId($this->incident);\n }", "public function show($id)\n {\n $client = Client::findOrFail($id);\n //$client = Issue::with('inserate')->find($id);\n $inserate = $client->inserate;\n return view('clients.show', compact('client','inserate'));\n }", "public function index()\n {\n return IncidentResource::collection(Incident::all());\n }" ]
[ "0.616971", "0.59756875", "0.5934177", "0.58935094", "0.58935094", "0.58935094", "0.58935094", "0.584898", "0.584898", "0.584898", "0.584898", "0.58170164", "0.5796828", "0.5766367", "0.5760096", "0.57500017", "0.5737531", "0.572718", "0.56909657", "0.56738275", "0.56692946", "0.563424", "0.561939", "0.5618902", "0.5577329", "0.55715346", "0.55620164", "0.55574024", "0.5545755", "0.5534951", "0.55319965", "0.5514674", "0.551449", "0.5499501", "0.54721934", "0.54533935", "0.54369384", "0.5428652", "0.54209864", "0.5418598", "0.5416144", "0.5416144", "0.5416144", "0.5416144", "0.5416144", "0.5416144", "0.5416144", "0.5394797", "0.5385123", "0.53845775", "0.53721833", "0.5366777", "0.5364127", "0.53619605", "0.5361895", "0.53482735", "0.53371125", "0.53331834", "0.53331834", "0.53331834", "0.53248364", "0.530445", "0.5297584", "0.52951545", "0.5286217", "0.52846706", "0.5283724", "0.5263081", "0.5263081", "0.52554256", "0.52554256", "0.52442086", "0.5242086", "0.5228718", "0.52269465", "0.52224237", "0.52190715", "0.52145284", "0.5211547", "0.52060944", "0.52004224", "0.51950496", "0.5192072", "0.5189847", "0.51842093", "0.51826227", "0.5179453", "0.5175277", "0.5169717", "0.51612544", "0.51590145", "0.5158987", "0.5154841", "0.5153246", "0.5147167", "0.5143441", "0.51245755", "0.5120449", "0.51198125", "0.5113555" ]
0.6801066
0
Displays a form to edit an existing Incident entity.
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Incident entity.'); } $editForm = $this->createEditForm($entity); $deleteForm = $this->createDeleteForm($id); return $this->render('ComDaufinBundle:Incident:edit.html.twig', array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeInvoiceBundle:Invoice')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Invoice entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeInvoiceBundle:Invoice: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 $incidente = Incidente::find($id);\n\n return view('incidentes.edit', compact('incidente'));\n }", "public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EnterpriseBundle:Customer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el cliente solicitado');\n }\n\n $editForm = $this->createForm(new CustomerType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EnterpriseBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }", "public function edit(Corporate $corporate)\n {\n //\n }", "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteSavalizeBundle:Company')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Company entity.');\n }\n\n $editForm = $this->createForm(new CompanyType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteSavalizeBundle:Company:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function editAction($id)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('sisconeeAppBundle:Servicio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Servicio entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HospiceSiteBundle:Event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Event entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HospiceSiteBundle:Event:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n $entities = $this->_transformAllConfigEntities($entities);\n $form = $this->createForm(new ConfigType(), array(\n 'configentities' => $entities,\n ));\n\n return array(\n 'form' => $form->createView(),\n );\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\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}", "private function createEditForm(Incident $entity)\n {\n $form = $this->createForm(new IncidentType(), $entity, array(\n 'action' => $this->generateUrl('com_incident_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier','attr'=>array('class'=>'btn btn-warning','style'=>'width:100px;')));\n\n return $form;\n }", "public function edit($id)\n {\n $industry = Industry::find($id);\n return view('industry.edit-form', ['industry'=>$industry]);\n }", "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function editAction($id)\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN')) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SytemSGBundle:Intervalosips')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervalos Ips entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SytemSGBundle:Intervalosips:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function editAction($id)\n {\n $aem = $this->get('morus_accetic.entity_manager'); // Get Accetic Entity Manager from service\n $unitRepos = $aem->getUnitRepository();\n\n $unit = $unitRepos->find($id);\n\n if (!$unit) {\n throw $this->createNotFoundException('Unable to find Entity unit.');\n }\n\n $editForm = $this->genEditForm($unit);\n $deleteForm = $this->genDeleteForm($id);\n\n return $this->render('MorusFasBundle:Contacts:edit.html.twig', array(\n 'unit' => $unit,\n 'form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FlyPlatformBundle:Acc')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Acc entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FlyPlatformBundle:Acc:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EncuestaBundle:Encuesta')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Encuesta entity.');\n }\n\n\n\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EncuestaBundle:Encuesta:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id) {\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entity = $em->getRepository('JYPSRegisterBundle:IntrestConfig')->find($id);\n\n\t\tif (!$entity) {\n\t\t\tthrow $this->createNotFoundException('Unable to find IntrestConfig entity.');\n\t\t}\n\n\t\t$editForm = $this->createEditForm($entity);\n\t\t$deleteForm = $this->createDeleteForm($id);\n\n\t\treturn $this->render('JYPSRegisterBundle:IntrestConfig:edit.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'edit_form' => $editForm->createView(),\n\t\t\t'delete_form' => $deleteForm->createView(),\n\t\t));\n\t}", "public function edit($model, $form);", "private function createEditForm(Resident $entity)\n {\n $form = $this->createForm(new ResidentType(), $entity, array(\n 'action' => $this->generateUrl('resident_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit($id)\n {\n $outlet_data = Outlet::find($id);\n $companies = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', compact('outlet_data', 'companies'));\n }", "public function edit(enquiryForm $enquiryForm)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EventFormBundle:PeriodoDeInscricao')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PeriodoDeInscricao entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EventFormBundle:PeriodoDeInscricao:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function actionEdit($id) { }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetMedicalBundle:actualite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find actualite entity.');\n }\n\n $editForm = $this->createForm(new actualiteType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetMedicalBundle:actualite:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function editAction($id)\n {\n $entity = $this->getColeService()->findByCole($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Cole entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('PhpbrAppBundle:Cole:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function edit(Invoice $invoice) {\n\n\t\t// $return['invoices'] = \\App\\Invoice::all();\n\t\t// return view('/invoices/editform', $return);\n\t}", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction($id)\n {\n\n //echo $this->getDoctrine()->getRepository('SyndicateComponentBundle:Education')->getGeoCode();\n //exit;\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Education entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SyndicateComponentBundle:Education: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 // show form edit user info\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('UpaoFundoBundle:Cosecha')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Cosecha entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('UpaoFundoBundle:Cosecha:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit(Resident $resident)\n {\n $this->authorize('admin.resident.edit', $resident);\n\n\n return view('admin.resident.edit', [\n 'resident' => $resident,\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AciliaCmsBundle:Energy')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Energy entity.');\n }\n\n $user = $entity->getUser();\n if(!empty($user))\n {\n $field = $entity->getName();\n if(empty($field))\n {\n $entity->setName($user->getName());\n }\n\n $field = $entity->getSurname();\n if(empty($field))\n {\n $entity->setSurname($user->getSurname().' '.$user->getSurname2());\n }\n\n $field = $entity->getTlf();\n if(empty($field))\n {\n $entity->setTlf($user->getTlf());\n }\n\n $field = $entity->getEmail();\n if(empty($field))\n {\n $entity->setEmail($user->getEmail());\n }\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AciliaCmsBundle:Energy:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\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 $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('HegesAppManagementBundle:Server')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Server entity.');\n }\n\n $editForm = $this->createForm(new ServerType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HegesAppManagementBundle:Server:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function action_edit()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t\tthrow new HTTP_Exception_404;\r\n\t\t\r\n\t\t// Can user edit this event's details?\r\n\t\tif ( ! $this->user->can('event_edit', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.edit.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// Valid csrf, etc.\r\n\t\tif ($this->valid_post())\r\n\t\t{\r\n\t\t\t// Get event data from $_POST\r\n\t\t\t$event_post = Arr::get($this->request->post(), 'event', array());\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// Save data to event object\r\n\t\t\t\t$event->edit_event($event_post);\r\n\t\t\t\t\r\n\t\t\t\tNotices::success('event.edit.success');\r\n\t\t\t\t\r\n\t\t\t\t// Display edited event\r\n\t\t\t\t$this->request->redirect(Route::url('event').'#'.$event->id);\r\n\t\t\t}\r\n\t\t\tcatch(ORM_Validation_Exception $e)\r\n\t\t\t{\r\n\t\t\t\t$this->view->errors = $e->errors('event');\r\n\t\t\t\t$this->view->values = $event_post;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->view->values = $event->as_array();\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event object 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\t\r\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfectBackendBundle:Species')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Species entity.');\n }\n\n $editForm = $this->createForm(new SpeciesType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfectBackendBundle:Species:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Form $form)\n {\n //\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 editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "public function edit(Insurance $insurance)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EquipoBundle:CaracteristicasEquipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CaracteristicasEquipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EquipoBundle:CaracteristicasEquipo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "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 edit()\n {\n $company = auth()->user()->company;\n\n return view('app.company.edit', compact('company'));\n }", "public function edit($id)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n return view('incidences.edit')->with('incidence', $incidence);\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('NumaCCCAdminBundle:Customers')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Customers entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('NumaCCCAdminBundle:Customers:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\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 updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Incident entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('com_incident_edit', array('id' => $id)));\n }\n\n return $this->render('ComDaufinBundle:Incident:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n\t{\n\t\treturn view('account.edit');\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeChildrenBundle:Vaccines')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Vaccines entity.');\n }\n\n $editForm = $this->createForm(new VaccinesType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeChildrenBundle:Vaccines:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "public function editAction()\n {\n $ctrlRow = new Admin_Model_DbRow_Controller($this->dbCtrl->find($this->checkControllerIdParam()));\n $form = new Admin_Form_Controller_Edit($ctrlRow);\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams())) {\n $ctrlRow->fromArray(array(\n 'description' => $this->getRequest()->getParam('description')\n ));\n $this->dbCtrl->update($ctrlRow->toDbArray(array('description')), $ctrlRow->get('id'));\n \n $this->_redirect('admin/controller/index');\n }\n }\n\n $this->view->form = $form;\n }", "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 $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function modifyAction()\n {\n\n $id = $this->get('security.context')->getToken()->getUser()->getId();\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->findOneBy(array('user'=>$id));\n\n if (!$entity) {\n return $this->redirect($this->generateUrl('education_new'));\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n\n ));\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n\t{\n\t\t$this->is_allowed('amuco_credit_insurance_update');\n\n\t\t$this->data['amuco_credit_insurance'] = $this->model_amuco_credit_insurance->find($id);\n\n\t\t$this->template->title('Amuco Credit Insurance Update');\n\t\t$this->render('backend/standart/administrator/amuco_credit_insurance/amuco_credit_insurance_update', $this->data);\n\t}", "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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:edit.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\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 editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('uniRecetasBundle:ingrediente')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ingrediente entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('uniRecetasBundle:ingrediente:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }" ]
[ "0.6804953", "0.6797847", "0.6790573", "0.67861074", "0.67824024", "0.6764167", "0.6758988", "0.67570597", "0.6756569", "0.6752052", "0.67458874", "0.67458874", "0.6735235", "0.6734836", "0.67290646", "0.6704641", "0.6695267", "0.666571", "0.6652674", "0.6652674", "0.6647207", "0.66422987", "0.66360956", "0.6622499", "0.6606057", "0.65981746", "0.65903926", "0.6576666", "0.65734476", "0.6565011", "0.65587807", "0.6553996", "0.65527165", "0.6538302", "0.6529722", "0.65182364", "0.6508453", "0.65073085", "0.6504571", "0.6501002", "0.64990455", "0.64931923", "0.64914584", "0.64899164", "0.64867884", "0.6466131", "0.6464542", "0.64569986", "0.6455984", "0.6455844", "0.6455332", "0.64542556", "0.64487135", "0.64433587", "0.64367247", "0.6435895", "0.6435102", "0.64313173", "0.64310944", "0.6431016", "0.6429984", "0.6423714", "0.642357", "0.6423153", "0.6414775", "0.64112085", "0.6410727", "0.64014065", "0.6400619", "0.63964856", "0.6388762", "0.63884723", "0.637875", "0.63778734", "0.63699645", "0.636582", "0.6365381", "0.6357959", "0.63570595", "0.63510656", "0.6347461", "0.63452613", "0.63429594", "0.6342607", "0.6339846", "0.63369167", "0.6333986", "0.6333927", "0.6333522", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.6332226", "0.632873" ]
0.76934713
0
Creates a form to edit a Incident entity.
private function createEditForm(Incident $entity) { $form = $this->createForm(new IncidentType(), $entity, array( 'action' => $this->generateUrl('com_incident_update', array('id' => $entity->getId())), 'method' => 'PUT', )); $form->add('submit', 'submit', array('label' => 'Modifier','attr'=>array('class'=>'btn btn-warning','style'=>'width:100px;'))); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createEditForm(Resident $entity)\n {\n $form = $this->createForm(new ResidentType(), $entity, array(\n 'action' => $this->generateUrl('resident_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Hospital $entity)\n {\n $form = $this->createForm(new HospitalType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Изменить', 'attr' => array('class' => 'btn btn-default btn-lg btn-block')));\n\n return $form;\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Incident entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ComDaufinBundle:Incident:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createEditForm(Incapacidad $entity)\n {\n $form = $this->createForm(new IncapacidadType(), $entity, array(\n 'action' => $this->generateUrl('admin_incapacidad_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modificar','attr'=>\n array('class'=>'btn btn-primary btn-sm')\n ));\n\n return $form;\n }", "private function createEditForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}", "private function createEditForm(SolMantenimientoIdentificacion $entity)\n {\n $form = $this->createForm(new SolMantenimientoType(), $entity, array(\n 'action' => $this->generateUrl('solmantenimientoidentificacion_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'attr'=>array('class'=>'btn btn-primary btn-lg btn-block')));\n\n return $form;\n }", "private function createEditForm(Cosecha $entity)\n {\n $form = $this->createForm(new CosechaType(), $entity, array(\n 'action' => $this->generateUrl('cosecha_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Cole $entity)\n {\n $form = $this->createForm(new ColeType(), $entity, array(\n 'action' => $this->generateUrl('cole_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\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(Servicio $entity)\n {\n $securityContext = $this->container->get('security.context');\n $form = $this->createForm(new ServicioType($securityContext), $entity, array(\n 'action' => $this->generateUrl('administracion_servicio_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Endroit $entity)\n {\n $form = $this->createForm(new EndroitType(), $entity, array(\n 'action' => $this->generateUrl('endroit_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Inspection $entity)\n {\n $form = $this->createForm(new InspectionType(), $entity, array(\n 'action' => $this->generateUrl('inspection_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier','attr' => array('class' => 'btn btn-default'))); \n\n return $form;\n }", "private function createEditForm(Acc $entity)\n {\n $form = $this->createForm(new AccType(), $entity, array(\n 'action' => $this->generateUrl('acc_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(DevisSetup $entity)\n {\n $form = $this->createForm(new DevisSetupType(), $entity, array(\n 'action' => $this->generateUrl('devissetup_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Estadofondo $entity)\n {\n $form = $this->createForm(new EstadofondoType(), $entity, array(\n 'action' => $this->generateUrl('estadofondo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Invoice $entity)\n {\n $form = $this->createForm(new InvoiceType(), $entity, array(\n 'action' => $this->generateUrl('invoice_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(SkIdentificationModule $entity)\n {\n $form = $this->createForm(new SkIdentificationModuleType(), $entity, array(\n 'action' => $this->generateUrl('identification_module_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(enquiryForm $enquiryForm)\n {\n //\n }", "private function createEditForm(SkSpecies $entity) {\n $em = $this->getDoctrine()->getManager();\n\n // Get criterias from species\n $criteria_ids = $em->getRepository('SkaphandrusAppBundle:SkIdentificationCriteria')->getCriteriasFromSpecies($entity->getId());\n\n\n\n $form = $this->createForm(new SkIdentificationSpeciesType(), $entity, array(\n 'action' => $this->generateUrl('identification_species_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'criterias' => $criteria_ids\n ));\n return $form;\n }", "private function createEditForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessType(), $entity, array(\n 'action' => $this->generateUrl('business_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Sucursal $entity)\n {\n $form = $this->createForm(new SucursalType(), $entity, array(\n 'action' => $this->generateUrl('sucursal_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(PeriodoDeInscricao $entity)\n {\n $form = $this->createForm(new PeriodoDeInscricaoType(), $entity, array(\n 'action' => $this->generateUrl('periododeinscricao_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Entreprise $entity)\n {\n $form = $this->createForm(new EntrepriseType(), $entity, array(\n 'action' => $this->generateUrl('ad_entreprise_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "private function createEditForm(Client $entity) {\n $form = $this->createForm(new ClientType(), $entity, array(\n 'action' => $this->generateUrl('client_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "private function createEditForm(ClienteCredito $entity)\n {\n $form = $this->createForm(new ClienteCreditoType( $this->getDestinosCh() ), $entity, array(\n 'action' => $this->generateUrl('clientecredito_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Examen $entity)\n {\n $form = $this->createForm(new ExamenType(), $entity, array(\n 'action' => $this->generateUrl('examen_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(EnvaseIngreso $entity)\n {\n $form = $this->createForm(new EnvaseIngresoType(), $entity, array(\n 'action' => $this->generateUrl('envase_ingreso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar', 'attr' => array('class' => \"btn btn-success\")));\n\n return $form;\n }", "private function createEditForm(Customers $entity) {\n $form = $this->createForm(new CustomersType(), $entity, array(\n 'action' => $this->generateUrl('customers_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Cidades $entity)\n {\n $form = $this->createForm(new CidadesType(), $entity, array(\n 'action' => $this->generateUrl('cidades_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function newAction()\n {\n $entity = new Incident();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ComDaufinBundle:Incident:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "private function createEditForm(Equipo $entity)\n {\n $form = $this->createForm(new EquipoType(), $entity, array(\n 'action' => $this->generateUrl('tecnoequipo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Notice $entity)\n {\n $form = $this->createForm(new NoticeType(), $entity, array(\n 'action' => $this->generateUrl('_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('end');\n $form->add('submit', 'submit', array('label' => 'Update'));\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 editAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n $entities = $this->_transformAllConfigEntities($entities);\n $form = $this->createForm(new ConfigType(), array(\n 'configentities' => $entities,\n ));\n\n return array(\n 'form' => $form->createView(),\n );\n }", "private function createEditForm(EntradaDetalles $entity)\n {\n $form = $this->createForm(new EntradaDetallesType(), $entity, array(\n 'action' => '',\n 'method' => 'PUT',\n 'mostrar_campo_articulo' => false,\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'icon' => 'floppy-disk', 'attr' => array('class' => 'btn-primary')));\n\n return $form;\n }", "private function createEditForm(Experience $entity)\n {\n $form = $this->createForm(new ExperienceType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "private function createEditForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(form $form)\n {\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 }", "private function createEditForm(Fluidite $entity)\n {\n $form = $this->createForm(new FluiditeType(), $entity, array(\n 'action' => $this->generateUrl('fluidite_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn ')\n \n ));\n\n return $form;\n }", "private function createEditForm(EventRegistration $entity)\n { \n $form = $this->createForm(new EventRegistrationEditType(), $entity, array(\n 'action' => $this->generateUrl('eventregistration_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $cats = array();\n foreach ($entity->getMovieCategories() as $cat) {\n $cats[] = $cat->getCategory();\n }\n $form->get('moviecategories')->setData($cats);\n\n $form->add('submit', 'submit', array('label' => 'Mentés'));\n\n return $form;\n }", "private function createEditForm(Intervalosips $entity)\n {\n $form = $this->createForm(new IntervalosipsType(), $entity, array(\n 'action' => $this->generateUrl('intervalosips_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Atualizar'));\n\n return $form;\n }", "public function edit(Form $form)\n {\n //\n }", "private function createEditForm(Fichepatient $entity)\n {\n $form = $this->createForm(new FichepatientType(), $entity, array(\n 'action' => $this->generateUrl('fichepatient_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Blackout $entity)\n {\n\n $form = $this->createForm(new BlackoutType(), $entity, array(\n 'action' => $this->generateUrl('blackout_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n 'attr' => array(\n 'class' => 'form-horizontal',\n 'novalidate' => 'novalidate',\n )\n ));\n\n $form->add('submit', 'submit', array('label' => 'Submit', 'attr' => array('class' => 'btn btn-primary')));\n return $form;\n }", "private function createEditForm(Feriado $entity)\n {\n $form = $this->createForm(new FeriadoType(), $entity, array(\n 'action' => $this->generateUrl('feriado_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(InvoiceAccountEntry $entity,$invoice_id)\n {\n $form = $this->createForm(new InvoiceAccountEntryType(), $entity, array(\n 'action' => $this->generateUrl('invoice_accountentry_update', array('id' => $entity->getId(),'invoice_id' => $invoice_id)),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "private function createEditForm(Dzialy $entity) {\n $form = $this->createForm(new DzialyType(true), $entity, array(\n 'action' => $this->generateUrl('dzialy_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n \n\n return $form;\n }", "public function edit($model, $form);", "private function createEditForm(Encuesta $entity)\n {\n $form = $this->createForm(new EncuestaType(), $entity, array(\n 'action' => $this->generateUrl('encuesta_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(CaracteristicasEquipo $entity)\n {\n $form = $this->createForm(new CaracteristicaEquipoType(), $entity, array(\n 'action' => $this->generateUrl('caracteristicasequipo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function getEditForm();", "private function createEditForm(Event $entity)\n {\n $form = $this->createForm(new EventType(), $entity, array(\n 'action' => $this->generateUrl('event_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\n }", "private function createEditForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }", "private function createEditForm(DetailsProduits $entity) {\n $form = $this->createForm(new DetailsProduitsType(), $entity, array(\n 'action' => $this->generateUrl('detailsproduits_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EnterpriseBundle:Customer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el cliente solicitado');\n }\n\n $editForm = $this->createForm(new CustomerType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EnterpriseBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createEditForm(Functions $entity) {\n $session = $this->get(\"session\");\n $form = $this->createForm(new FunctionsType(), $entity, array(\n 'action' => $this->generateUrl('hall_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n \n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }", "private function createEditForm(Container $entity)\n {\n $form = $this->createForm(new ContainerType(), $entity, array(\n 'action' => $this->generateUrl('container_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(OfficeFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "private function createEditForm(Custom $entity)\n {\n $form = $this->createFormBuilder($entity, array(\n 'action' => $this->generateUrl('front_profile_custom_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array(\n 'class' => 'log-reg-block sky-form',\n 'id' => 'sky-form4'\n )))\n ->add('name', 'text', array('label' => '姓名'))\n ->add('email', 'email', array('label' => 'Email', 'read_only' => true, 'required' => true))\n ->add('birthday', 'birthday', array(\n 'label' => '生日',\n 'view_timezone' => 'Asia/Taipei',\n 'model_timezone' => 'Asia/Taipei'\n ))\n ->add('sex', 'choice', array('label' => '性別', 'choices' => array(\n '保密' => '保密',\n '先生' => '先生',\n '女士' => '女士'\n )))\n ->add('address', 'text', array('label' => '地址'))\n ->add('password', 'hidden')\n ->getForm();\n\n return $form;\n }", "private function createEditForm(Ligne $entity)\n {\n $form = $this->createForm(new LigneType(), $entity, array(\n 'action' => $this->generateUrl('ligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(PromoCmdes $entity)\n {\n $form = $this->createForm(PromoCmdesType::class, $entity, array(\n 'action' => $this->generateUrl('adminPromoCmdes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Empleado $entity)\n {\n $form = $this->createForm(new EmpleadoType(), $entity, array(\n 'action' => $this->generateUrl('empleado_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Fileops $entity)\n {\n $form = $this->createForm(new FileopsType(), $entity, array(\n 'action' => $this->generateUrl('fileops_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Account $entity) {\n $form = $this->createForm(new AccountType(), $entity, array(\n 'action' => $this->generateUrl('account_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Expense $entity)\n {\n $form = $this->createForm(new ExpenseType(), $entity, array(\n 'action' => $this->generateUrl('expense_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '更新', 'attr' => array('class' => 'btn-primary')));\n\n return $form;\n }", "private function createEditForm(SesionVentaTratamiento $entity)\n {\n $form = $this->createForm(new SesionVentaTratamientoType(), $entity, array(\n 'action' => $this->generateUrl('admin_sesionventatratamiento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Education $entity)\n {\n $user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new EducationType($user->getId()), $entity, array(\n 'action' => $this->generateUrl('education_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array(\n 'class' => 'form-horizontal',\n 'novalidate' => 'novalidate',\n )\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n $form->add('reset', 'reset', array('label' => 'Reset', 'attr' => array('class' => 'btn btn-danger')));\n\n\n return $form;\n }", "public function edit(EventFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "private function createEditForm(Asignacion $entity)\n {\n $form = $this->createForm(new AsignacionType(), $entity, array(\n 'action' => $this->generateUrl('tecnoasignar_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Partner $entity)\n {\n $form = $this->createForm(new PartnerType(), $entity, array(\n 'action' => $this->generateUrl('admin_partners_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Modifier',\n 'attr' => array(\n 'class' => 'btn btn-warning'\n )));\n\n return $form;\n }", "private function createEditForm(Dream $entity)\n {\n $form = $this->createForm(new DreamType(), $entity, array(\n 'action' => $this->generateUrl('dreams_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createCreateForm(Incident $entity)\n {\n $form = $this->createForm(new IncidentType(), $entity, array(\n 'action' => $this->generateUrl('com_incident_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer','attr'=>array('class'=>'btn btn-success','style'=>'width:100px;')));\n\n return $form;\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteSavalizeBundle:Company')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Company entity.');\n }\n\n $editForm = $this->createForm(new CompanyType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteSavalizeBundle:Company:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createEditForm(Reserva $entity){\n\t\t$user = $this->getUser();\n\t\tif ($user != null) {\n\t\t\t$roles = $user->getRoles();\n\t\t\tif (in_array('ROLE_ADMIN', $roles)) {\n\t\t\t\t$form = $this->createForm(new ReservaType(), $entity, array(\n\t\t\t\t\t'action' => $this->generateUrl('reserva_update', array('id' => $entity->getId())),\n\t\t\t\t\t'method' => 'PUT',\n\t\t\t\t));\n\t\t\t}else{\n\t\t\t\t$form = $this->createForm(new ReservaUsuarioType(), $entity, array(\n\t\t\t\t\t'action' => $this->generateUrl('reserva_update', array('id' => $entity->getId())),\n\t\t\t\t\t'method' => 'PUT',\n\t\t\t\t));\n\t\t\t\t$form->add('cliente');\n\t\t\t\t$form->add('estadoReserva','choice', array(\n\t 'choices' => array(\n\t $entity->getEstadoReserva() => $entity->getEstadoReserva()),\n\t 'disabled' => 'disabled'\n\t ))\n\t\t\t\t->add('fecha_desde', 'date', array(\n 'years' => range($entity->getFechaDesde()->format('Y'), $entity->getFechaDesde()->format('Y')),\n 'months' => range($entity->getFechaDesde()->format('m'), $entity->getFechaDesde()->format('m')),\n 'days' => range($entity->getFechaDesde()->format('d'), $entity->getFechaDesde()->format('d')),\n 'format' => 'dd MMMM yyyy',\n 'label' => 'Fecha de Inicio de la Reserva',\n 'disabled' => 'disabled'\n ));\n\t\t\t}\n\t\t}\n\n\t\t$form->add('submit', 'submit', array('label' => 'Actualizar Reserva', 'attr' => array('class' => 'btn btn-info btn-block')));\n\n\t\treturn $form;\n\t}", "private function createEditForm(Project $entity)\n {\n $form = $this->createForm(new ProjectType(), $entity);\n $form->add('submit', 'submit', array('label' => 'Update'));\n return $form;\n }", "public function edit(Corporate $corporate)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeInvoiceBundle:Invoice')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Invoice entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeInvoiceBundle:Invoice:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createEditForm(BonCommandeLigne $entity)\n {\n $form = $this->createForm(new BonCommandeLigneType(), $entity, array(\n 'action' => $this->generateUrl('boncommandeligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(CalendarCategories $entity) {\n $form = $this->createForm(new CalendarCategoriesType(), $entity, array(\n 'action' => $this->generateUrl('calendarcategories_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Cardtype $entity)\n {\n $form = $this->createForm(new CardtypeType(), $entity, array(\n 'action' => $this->generateUrl('cardtype_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(IdeaPrize $entity)\n {\n $form = $this->createForm(new IdeaPrizeType(), $entity, array(\n 'action' => $this->generateUrl('premiacao_ideia_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessSettingsType($entity), $entity, array(\n 'action' => $this->generateUrl('business_settings_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Vluchten $entity)\n {\n $form = $this->createForm(new VluchtenType(), $entity, array(\n 'action' => $this->generateUrl('vluchten_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(TypeFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "private function createEditForm(Testimonial $entity)\n {\n $form = $this->createForm(new TestimonialType(), $entity, array(\n 'action' => $this->generateUrl('config_testimonial_update', array('id' => $entity->getId())),\n 'attr' => array('enctype' => 'multipart/form-data'),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "private function createEditForm(Configuracao $entity)\n {\n $translated = $this->get('translator');\n $form = $this->createForm(new ConfiguracaoType($this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')), $entity, array(\n 'action' => $this->generateUrl('configuracao_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => $translated->transChoice('txt.editar',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-primary btn-lg')));\n\n return $form;\n }", "public function edit($id)\n {\n $industry = Industry::find($id);\n return view('industry.edit-form', ['industry'=>$industry]);\n }", "private function createEditForm(SifdaInformeOrdenTrabajo $entity)\n {\n $form = $this->createForm(new SifdaInformeOrdenTrabajoType(), $entity, array(\n 'action' => $this->generateUrl('sifdainformeordentrabajo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar informe'));\n\n return $form;\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "private function createEditForm(Consulta $entity,$tipo)\r\n {\r\n if($tipo==1){\r\n $form = $this->createForm(new ConsultaConPacienteType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_consulta_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n }\r\n else{\r\n $form = $this->createForm(new ConsultaConPacienteType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_consulta_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n )); \r\n }\r\n \r\n\r\n $form->add('submit', 'submit', array('label' => 'Modificar',\r\n 'attr'=>\r\n array('class'=>'btn btn-success btn-sm')));\r\n\r\n return $form;\r\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('sisconeeAppBundle:Servicio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Servicio entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }" ]
[ "0.7342424", "0.6961575", "0.6939798", "0.69292074", "0.68942547", "0.6856624", "0.68178684", "0.679424", "0.6787024", "0.67820334", "0.6758182", "0.67476124", "0.6735985", "0.6683128", "0.6670898", "0.66447186", "0.6642921", "0.66244024", "0.6619014", "0.6599569", "0.6597531", "0.6578096", "0.65621555", "0.6547592", "0.65354854", "0.64820135", "0.64756304", "0.6474595", "0.6456525", "0.6444583", "0.6444083", "0.6439317", "0.643493", "0.64214784", "0.64214194", "0.64182043", "0.64150107", "0.63998383", "0.63983685", "0.63922775", "0.6392133", "0.63814914", "0.6381058", "0.6363702", "0.635778", "0.63577783", "0.6350939", "0.63496333", "0.63479793", "0.6344726", "0.6322914", "0.6321974", "0.63156354", "0.63116056", "0.6311185", "0.6310461", "0.6297361", "0.62956136", "0.62956136", "0.62914443", "0.6284094", "0.62776583", "0.6269008", "0.6263839", "0.6262294", "0.62611943", "0.62586534", "0.6251094", "0.6239599", "0.62345296", "0.6227424", "0.62217844", "0.6207962", "0.6206407", "0.6194679", "0.6174138", "0.6173292", "0.61631334", "0.61455005", "0.61434597", "0.6138526", "0.6137651", "0.6133327", "0.612959", "0.6121711", "0.6115924", "0.6115175", "0.6111766", "0.6111722", "0.61107194", "0.61092705", "0.61087865", "0.6101858", "0.61017394", "0.60997623", "0.60982585", "0.6093314", "0.60921526", "0.6090851", "0.6086204" ]
0.7549447
0
Edits an existing Incident entity.
public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Incident entity.'); } $deleteForm = $this->createDeleteForm($id); $editForm = $this->createEditForm($entity); $editForm->handleRequest($request); if ($editForm->isValid()) { $em->flush(); return $this->redirect($this->generateUrl('com_incident_edit', array('id' => $id))); } return $this->render('ComDaufinBundle:Incident:edit.html.twig', array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Incident entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ComDaufinBundle:Incident:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function update(Request $request, Incident $incident)\n {\n $log = new Log;\n $log->owner = $request->owner;\n $log->device_id = $request->device_id;\n $log->description = $request->description;\n $log->resolved = $request->resolved;\n\n $incident->title = $request->title;\n $incident->update();\n $incident->logs()->update($log->toArray());\n \n return new IncidentResource($incident);\n }", "public function update(Request $request, Incidencia $incidencia)\n {\n //\n }", "public function update(Request $request, Incidencia $incidencia)\n {\n //\n }", "public function edit(Corporate $corporate)\n {\n //\n }", "public function edit(Attendence $attendence)\n {\n //\n }", "public function edit(Insurance $insurance)\n {\n //\n }", "public function update(Request $request, $id)\n {\n \n $industry = Industry::find($id); \n\n $industry->country = $request->country; \n $industry->postal_code = $request->postal_code; \n $industry->industry = $request->industry; \n \n $industry->save();\n }", "public function update($entity);", "public function update($entity);", "public function edit(Inventario $inventario)\n {\n //\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function edit(Income $income)\n {\n //\n }", "function update(IContract $entity);", "public function updateEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function edit(ContinuousAssessment $continuousAssessment)\n {\n //\n }", "public function edit(InvoicesDetails $invoicesDetails)\n {\n //\n }", "public function edit(Suitcase $suitcase)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Attendance $attendance)\n {\n //\n }", "public function edit(Attendance $attendance)\n {\n //\n }", "public function edit(Attendance $attendance)\n {\n //\n }", "public function edit(Entrenador $entrenador)\n {\n //\n }", "public function update(Request $request, $id)\n {\n if (!Sentinel::hasAccess('capital.update')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n $capital = Capital::find($id);\n $capital->amount = $request->amount;\n $capital->debit_account_id = $request->debit_account_id;\n $capital->credit_account_id = $request->credit_account_id;\n $capital->notes = $request->notes;\n $capital->date = $request->date;\n $date = explode('-', $request->date);\n $capital->year = $date[0];\n $capital->month = $date[1];\n $capital->save();\n JournalEntry::where('capital_id', $id)->delete();\n if (!empty($capital->credit_chart)) {\n $journal = new JournalEntry();\n $journal->user_id = Sentinel::getUser()->id;\n $journal->account_id = $capital->credit_chart->id;\n $journal->date = $request->date;\n $journal->year = $date[0];\n $journal->month = $date[1];\n $journal->transaction_type = 'capital';\n $journal->name = \"Capital\";\n $journal->capital_id = $capital->id;\n $journal->credit = $request->amount;\n $journal->reference = $capital->id;\n $journal->save();\n }\n if (!empty($capital->debit_chart)) {\n $journal = new JournalEntry();\n $journal->user_id = Sentinel::getUser()->id;\n $journal->account_id = $capital->debit_chart->id;\n $journal->date = $request->date;\n $journal->year = $date[0];\n $journal->month = $date[1];\n $journal->transaction_type = 'capital';\n $journal->name = \"Capital\";\n $journal->capital_id = $capital->id;\n $journal->debit = $request->amount;\n $journal->reference = $capital->id;\n $journal->save();\n }\n GeneralHelper::audit_trail(\"Updated Capital with id:\" . $capital->id);\n Flash::success(trans('general.successfully_saved'));\n if (isset($request->return_url)) {\n return redirect($request->return_url);\n }\n return redirect('capital/data');\n }", "public function edit(IntentionToPay $intentionToPay)\n {\n //\n }", "public function edit(Holiday $holiday)\n {\n //\n }", "public function edit(Absent $absent)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $enterprise = Enterprise::findOrFail($id);\n $data = $request->except(['employments', 'contacts', 'assessors', 'recruitments']);\n\n $enterprise->update($data);\n return response()->json([\n 'updated'\t=> true,\n ]);\n }", "public function update($entity)\n {\n \n }", "public function edit(Expense $expense)\n {\n //\n }", "public function edit(Expense $expense)\n {\n //\n }", "public function update(Request $request, $id)\n {\n request()->validate([\n 'type'=>'required',\n 'reason'=>'required',\n 'observation'=>'required',\n 'tutor_c_id'=>'required',\n ]);\n //Enterprise::find($id)->update($request->all());\n Tracing::where('id', $id)->update($request->except('_token','_method'));\n return redirect()->route('Tracing.index')->with('success','Registro creado correctamente.');\n }", "public function update(Request $request, Corporate $corporate)\n {\n //\n }", "public function update(IEntity $entity);", "public function edit(PatientDiscount $patientDiscount)\n {\n //\n }", "public function edit(Invoices $invoice)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $incidencia= Incidencia::find($id);\n $incidencia->id_empleado=$request->id_empleado;\n $incidencia->id_concepto=$request->id_concepto;\n $incidencia->cantidad=$request->cantidad;\n $incidencia->importe=$request->importe;\n $incidencia->monto=$request->monto;\n $incidencia->observaciones=$request->observaciones;\n $incidencia->soporte=$request->soporte;\n $incidencia->save();\n return redirect()->action('IncidenciaController@index');\n }", "public function edit(ExpenceManagement $expenceManagement) {\n\t\t//\n\t}", "public function update(Entity $entity);", "public function update($id_cliente){}", "public function edit(Contratos $contratos)\n {\n //\n }", "public function updateAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EnterpriseBundle:Customer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el cliente solicitado');\n }\n\n $editForm = $this->createForm(new CustomerType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n $request = $this->getRequest();\n\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->persist($entity);\n $em->flush();\n\n //return $this->redirect($this->generateUrl('enterprise_edit', array('id' => $id)));\n return $this->redirect($this->generateUrl('enterprise_show', array('id' => $entity->getId())));\n }\n\n return $this->render('EnterpriseBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Instituicao $instituicao)\n {\n //\n }", "public function edit(Evange $evange)\n {\n //\n }", "public function edit(Request $request, $id)\n {\n\t\t\t$this->validate($request, [\n\t\t\t 'number_of_hectares' => 'required|numeric',\n\t\t\t 'proposed_subscription_date' => 'required',\n\t\t\t 'postal_address' => 'required',\n\t\t\t 'occupation' => 'required',\n\t\t ]);\n\t\t $eoi = $this->repo->edit($request, $id);\n\t\t if($eoi){\n\t\t\t return redirect()->back()\n\t\t\t\t\t\t\t ->with('success', 'Interest form updated successfully');\n\t\t\t }else{\n\t\t\t\t \t\treturn back()\n\t\t\t\t\t\t\t\t ->withInput()\n\t\t\t\t\t\t\t\t ->with('error', 'Interest form submission was not updated. Try Again!!!');\n\t\t\t \t\t\t }\n\t }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'date' => 'required',\n 'name' => 'required',\n 'total' => 'required'\n ]);\n\n $expence = Expence::findOrFail($id);\n $expence->date = $request->date;\n $expence->name = $request->name;\n $expence->details = $request->details;\n $expence->total = $request->total;\n $expence->save();\n return redirect()->route('expences.index')->with('success', 'Expence updated successfully');\n }", "public function edit(EvidentionStatus $evidentionStatus)\n {\n //\n }", "public function edit(ExpenceHead $expenceHead)\n {\n //\n }", "public function edit(Appointment $appointment)\n {\n //\n }", "public function edit(Appointment $appointment)\n {\n //\n }", "public function edit(OtherIncome $otherIncome)\n {\n //\n }", "public function edit(ImportInvoice $importInvoice)\n {\n //\n }", "public function edit(Appointments $appointments)\n {\n //\n }", "public function edit(Oficina $oficina)\n {\n //\n }", "public function update(EntityRequest $request, Entity $entity)\n {\n\n $entity->name = $request->name;\n $entity->social_denomination = $request->input('social_denomination');\n $entity->nif = $request->input('nif');\n $entity->type_company = $request->input('type_company');\n $entity->access_application = filter_var($request->input('access_application'), FILTER_VALIDATE_BOOLEAN);\n $entity->active = filter_var($request->input('ative'), FILTER_VALIDATE_BOOLEAN);\n $entity->updated_by = auth()->user()->id;\n\n $entity->update();\n\n return redirect()->route('entity.show', $entity->id);\n }", "public function edit(cr $cr)\n {\n //\n }", "public function edit(cr $cr)\n {\n //\n }", "public function edit(cr $cr)\n {\n //\n }", "public function edit(cr $cr)\n {\n //\n }", "public function edit(cr $cr)\n {\n //\n }", "public function update(Request $request, InvoicesDetails $invoicesDetails)\n {\n //\n }", "public function update(Request $request, Evange $evange)\n {\n //\n }", "public function update(stubObject $entity);", "public function edit(inversion $inversion)\n {\n //\n }", "public function update(Request $request, Expense $expense)\n {\n //\n }", "public function update(Request $request, ExpenceManagement $expenceManagement) {\n\t\t//\n\t}", "public function update($id, UpdateIncidenceRequest $request)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n $incidence = $this->incidenceRepository->update($request->all(), $id);\n\n Flash::success('Incidence updated successfully.');\n\n return redirect(route('incidences.index'));\n }", "public function Update($entity) {\n }", "public function update(Requests\\CreateOffenceRequest $request, $id)\n {\n $StudentOffense = StudentOffense::find($id);\n\n $StudentOffense->teacher_id = $request->input('teacher_id');\n $StudentOffense->student_id = $request->input('student_id');\n $StudentOffense->offense_id = $request->input('offense_id');\n $StudentOffense->tarikh_kesalahan = $request->input('tarikh_kesalahan');\n $StudentOffense->masa_kesalahan = $request->input('masa_kesalahan');\n $StudentOffense->tempat_kesalahan = $request->input('tempat_kesalahan');\n\n $StudentOffense->save();\n\n Session::flash('flash_message','Maklumat disiplin pelajar berjaya dikemaskini.');\n\n return redirect('studentoffense');\n }", "public function edit(resumenclinico $resumenclinico)\n {\n //\n }", "public function update(Request $request, Suitcase $suitcase)\n {\n //\n }", "public function edit(venue $venue)\n {\n //\n }", "public function update(EspEditRequest $request, $id)\n {\n $data = $request->all();\n $data['email_id_field'] = $data['email_id_field'] == -1 ? \"\": $data['email_id_field'];\n $data['email_address_field'] = $data['email_address_field'] == -1 ? \"\": $data['email_address_field'];\n $data['open_email_id_field'] = $data['open_email_id_field'] == -1 ? \"\": $data['open_email_id_field'];\n $data['open_email_address_field'] = $data['open_email_address_field'] == -1 ? \"\": $data['open_email_address_field'];\n unset($data['email_address_field_toggle']);\n unset($data['email_id_field_toggle']);\n unset($data['open_email_address_field_toggle']);\n unset($data['open_email_id_field_toggle']);\n unset($data['canEdit']);\n $this->espService->updateAccount( $id , $data );\n Flash::success(\"ESP Account was Successfully Updated\");\n }", "public function edit($id_cliente){}", "public function update(Request $request, Inventario $inventario)\n {\n //\n }", "public function edit(Nurse $nurse)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function edit(Company $company)\n {\n //\n }", "public function update(ResidentRequest $request, Resident $resident)\n {\n $resident->update($request->all());\n\n return response([\n 'message' => 'Updated Successfully',\n 'resident' => new ResidentResource($resident),\n ], 200);\n\n }", "public function edit(Service $partner)\n {\n //\n }", "public function update(StoreClinicRequest $request, $id)\n {\n \n try {\n $clinic = Clinic::find($id)->fill($request->all());\n $clinic->save();\n\n notify()->preset('update');\n\n return redirect()->route('clinics.index');\n\n } catch (\\Illuminate\\Database\\QueryException $exception) {\n notify()->error($exception->errorInfo[2]);\n return redirect()->back();\n }\n\n }", "public function update( int $expenseId, array $parameters );", "public function edit(InstitutoProcedencia $institutos_procedencia)\n {\n //\n }", "public function update(Request $request, Invoice $invoice) {\n\t\t//\n\t}", "public function edit(ClienteEnvio $clienteEnvio)\n {\n //\n }" ]
[ "0.6319217", "0.63158965", "0.627774", "0.627774", "0.6185913", "0.61171865", "0.61171865", "0.6106951", "0.60550815", "0.59439", "0.59278923", "0.5907007", "0.5907007", "0.5906806", "0.5882417", "0.5877427", "0.58710736", "0.5850906", "0.58480793", "0.58137566", "0.57866013", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5780228", "0.5772313", "0.5772313", "0.5772313", "0.57672167", "0.57380706", "0.5730643", "0.5705441", "0.56924677", "0.568283", "0.56593436", "0.565029", "0.565029", "0.5645838", "0.5631068", "0.5629333", "0.5620462", "0.5619769", "0.56119007", "0.55998796", "0.5595916", "0.5595477", "0.5595315", "0.55942476", "0.5591091", "0.5579127", "0.5574022", "0.557346", "0.556939", "0.55678475", "0.55646783", "0.55646783", "0.5562566", "0.55533105", "0.5543002", "0.55422235", "0.5541899", "0.55290693", "0.55290693", "0.55290693", "0.55290693", "0.55290693", "0.55269724", "0.55247647", "0.55234826", "0.5523136", "0.5521499", "0.55199564", "0.5519101", "0.55186653", "0.5509409", "0.5499769", "0.5493221", "0.549175", "0.54904896", "0.5487263", "0.54823816", "0.54786146", "0.54753476", "0.54753476", "0.54753476", "0.54753476", "0.54753476", "0.54747397", "0.5474318", "0.547304", "0.5472309", "0.54656225", "0.5459409", "0.5459278" ]
0.66009545
0
Deletes a Incident entity.
public function deleteAction(Request $request, $id) { $form = $this->createDeleteForm($id); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ComDaufinBundle:Incident')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Incident entity.'); } $em->remove($entity); $em->flush(); } return $this->redirect($this->generateUrl('com_incident')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($entity);", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "public function deleteById($entityId);", "public function deleteById($entityId);", "public function delete(string $entityId): void;", "public function delete(DimeEntityInterface $entity);", "public function delete($Enterprise) { ; }", "public function delete($entity)\n {\n \n }", "public function delete(IndexableEntity $entity);", "public function Delete($entity) {\n }", "public function destroy($incidencia)\n {\n //\n Incidencies::find($incidencia)->delete();\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function delete($entity)\n {\n $this->getObjectManager()->remove($entity);\n $this->getObjectManager()->flush();\n }", "function delete(IContract $entity);", "public function delete(Request $request)\n\t{\n\t\t$id = $request -> id;\n\t\t$expence = Expence::find($id);\n\t\t$response = $expence -> delete();\n\t\tif($response)\n\t\t\techo \"Record Deleted successfully.\";\n\t\telse\n\t\t\techo \"There was a problem. Please try again later.\";\n\t}", "public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}", "public function delete(EntityInterface $Entity);", "public function deleteEntity($entityId)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->delete()\n ->go();\n }", "public function delete(DataObject $entity){\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }", "public function deleted(CovidPatient $covidPatient)\n {\n //\n }", "public function deleteById($inquiryId);", "public function deleteEntity($eid)\n {\n $this->getConnectionService()->deleteById($eid);\n }", "public static function delete($entity)\n {\n return static::mapper()->delete($entity);\n }", "public function entityDelete(EntityInterface $entity) {\n if (($entity_type = $entity->getEntityTypeId()) == \\Drupal::config('recurly.settings')->get('recurly_entity_type')) {\n // Check for a local account first, no need to attempt to close an account\n // if we don't have any information about it.\n $local_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()], TRUE);\n if ($local_account) {\n $recurly_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()]);\n recurly_account_delete($recurly_account);\n }\n }\n }", "protected static function deleteEntity(\\ElggEntity $entity) {\n\n\t\tif (!$entity->getPrivateSetting(ELASTICSEARCH_INDEXED_NAME)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$client = elasticsearch_get_client();\n\t\tif (empty($client)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\telasticsearch_add_document_for_deletion($entity->getGUID(), [\n\t\t\t'_index' => $client->getIndex(),\n\t\t\t'_type' => $client->getDocumentTypeFromEntity($entity),\n\t\t\t'_id' => $entity->getGUID(),\n\t\t]);\n\t}", "public function delete($entity) : bool;", "public function destroy(incidencia $incidencia)\n {\n //\n }", "public function delete(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n return $table->delete($table->getAdapter()->quoteInto('id = ?',$entity->id));\n }", "public function deleteEntity($obj)\n\t{\n\t\t$this->db->deleteEntity($obj);\n\t}", "public function deleteEntity($entity): void\n {\n /** @var EntityRepository $repository */\n $repository = Prime::repository($entity);\n $mapper = $repository->mapper();\n\n $isReadOnly = $mapper->isReadOnly();\n $mapper->setReadOnly(false);\n\n $repository->disableEventNotifier();\n $repository->delete($entity);\n $repository->enableEventNotifier();\n\n $mapper->setReadOnly($isReadOnly);\n }", "public function delete($entity)\n {\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::PRE_DELETE,\n new TrackingHistoryEvent($entity)\n );\n\n parent::delete($entity);\n\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::POST_DELETE,\n new TrackingHistoryEvent($entity)\n );\n }", "function time_tracker_activity_delete($entity) {\n entity_get_controller('time_tracker_activity')->delete($entity);\n}", "public function delete($identifier, $flush = true);", "public function deleteAction(Request $request) {\n $id = $this->getRequest()->request->get('id');\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CMSBundle:Client')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Client entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n return $this->redirect($this->generateUrl('client'));\n }", "public function destroy(Incidencia $incidencia)\n {\n //\n }", "public function destroy(Incidencia $incidencia)\n {\n //\n }", "public function destroy(Incidencia $incidencia)\n {\n //\n }", "public function delete($vendor_id);", "public static function DeleteById($entity)\n {\n //When the precedent is GetById\n if(isset(StorageManager::$entities[$entity->Alias]))\n {\n unset(StorageManager::$entities[$entity->Alias][$entity->IdEntite]);\n }\n\n //When the precedent request is getByArg\n $stores = StorageManager::Find($entity);\n\n if(count($store) > 0 )\n {\n foreach($stores as $store)\n {\n if(isset($store::$entities))\n {\n unset($store::$entities[$entity->Alias][$entity->IdEntite]);\n }\n }\n }\n }", "public function delete(Identifiable $model);", "public function delete(Request $request)\n {\n $this->validate($request, [\n \"companyId\" => \"required|integer\",\n 'id' => 'required|max:20|alpha_num|exists:person_credentials,id']);\n\n $qualificationSource = $this->personCredentialDao->delete($request->id);\n\n $resp = new AppResponse($qualificationSource, trans('messages.dataDeleted'));\n return $this->renderResponse($resp);\n }", "public function delete($user, $ident);", "public function delete($entity){\n\n if(is_numeric($entity))\n {\n $entity = $this->findOrFail($entity);\n }\n $entity->delete();\n return $entity;\n }", "public function deleted(Investor $investor)\n {\n //\n }", "public function delete($entity)\n {\n if (!$this->isRepositoryDeletable()) {\n throw $this->createNotDeletableException();\n }\n\n return $this->trigger(__FUNCTION__, [\n 'entity' => $entity,\n ]);\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function delete(Request $request)\n {\n $this->validate($request, [\n \"id\" => \"required\",\n \"companyId\" => \"required\"\n ]);\n\n DB::transaction(function () use (&$request) {\n $jobFamily = [\n \"eff_end\" => Carbon::now()\n ];\n $this->jobFamilyDao->update($request->id, $jobFamily);\n });\n\n $resp = new AppResponse(null, trans('messages.dataDeleted'));\n return $this->renderResponse($resp);\n }", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function delete(Request $request)\n {\n $this->validate($request, [\n \"id\" => \"required|integer\",\n \"companyId\" => \"required|integer\"\n ]);\n\n DB::transaction(function () use (&$request) {\n $this->lookupDao->delete($request->id);\n });\n\n $resp = new AppResponse(null, trans('messages.dataDeleted'));\n return $this->renderResponse($resp);\n }", "public function delete(int $id):void\n {\n\t $this->tx_service->transaction(function () use ($id) {\n $endpoint = $this->repository->getById($id);\n if(is_null($endpoint)) throw new EntityNotFoundException();\n $this->repository->delete($endpoint);\n });\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('KbhGestionCongesBundle:Entreprise')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Entreprise entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('entreprise'));\n }", "public function deleted(CustomerInquiry $customerInquiry)\n {\n\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "public function destroy(Resident $resident)\n {\n $resident->delete();\n return response([\n 'message' => 'Resident Deleted',\n ]);\n\n }", "public function destroy(Corporate $corporate)\n {\n dd('delete corporate');\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function deleteAction(Request $req, Response $res)\n {\n\n // load the params with the entity data\n $parameterMap = $req->getParams();\n\n // check if the necessary params has been specified and are valid\n if (!array_key_exists('sampleId', $parameterMap)) {\n throw new \\Exception();\n } else {\n $sampleId = filter_var($parameterMap['sampleId'], FILTER_VALIDATE_INT);\n }\n\n // delete the entity\n $this->getProxy(self::PROXY_CLASS)->delete($sampleId);\n\n // reload all entities and render the dialog\n $this->indexAction($req, $res);\n }", "public function deleteAction(Request $request, Entreprise $entreprise)\n {\n $form = $this->createDeleteForm($entreprise);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($entreprise);\n $em->flush();\n }\n\n return $this->redirectToRoute('entreprise_index');\n }", "public function delete(Request $request)\n\t{\n\t\t$id = $request -> id;\n\t\t$yearclass = Yearclass::find($id);\n\t\t$yearclass = $yearclass -> delete();\n\t\tif($response)\n\t\t\techo \"Record Deleted successfully.\";\n\t\telse\n\t\t\techo \"There was a problem. Please try again later.\";\n\t}", "public function delete($customerId);", "public function delete(Request $request)\n {\n $this->validate(request(), [\n 'invoice_id' => 'required',\n ]);\n\n $invoice = $this->invoiceRepository->find($request->get('invoice_id'));\n\n if (!$invoice) {\n return response()->json(['status' => 'error'], 404);\n }\n\n if ($this->invoiceRepository->delete($invoice)) {\n return response()->json(['status' => 'success'], 200);\n }\n\n return response()->json(['status' => 'error'], 404);\n }", "function delete() {\n\t \t$sql = \"DELETE FROM evs_database.evs_identification\n\t \t\t\tWHERE idf_id=?\";\n\t \t$this->db->query($sql, array($this->idf_id));\n\t\t\n\t }", "public function remove($entity)\n {\n $this->em->remove($entity);\n $this->em->flush();\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //SET LAYOUT \n $this->_helper->layout->setLayout('default-simple');\n\n //GET CLAIM ID\n $claim_id = $this->_getParam('claim_id', 'null');\n\n //GET CLAIM ITEM\n $claim = Engine_Api::_()->getItem('sitepage_claim', $claim_id);\n if ($claim->user_id != Engine_Api::_()->user()->getViewer()->getIdentity()) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET FORM\n $this->view->form = $form = new Sitepage_Form_Deleteclaim();\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET CLAIM TABLE\n Engine_Api::_()->getDbtable('claims', 'sitepage')->delete(array('claim_id=?' => $claim_id));\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => true,\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('You have successfully deleted your claim request.'))\n ));\n }\n }", "public function destroy(Request $request)\n {\n ConsultationsICD::find($request->id)->delete();\n return;\n }", "public function delete($sessionID, $audience);", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('HospiceSiteBundle:Event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Event entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('event'));\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/transaction/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Transaction', 'transactionId', self::$objectId);\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n //$form->handleRequest($request);\n\n //if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('sisconeeAppBundle:Servicio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Servicio entity.');\n }\n\n $em->remove($entity);\n\n try {\n $em->flush();\n $this->get('session')->getFlashBag()->add(\n 'notice',\n 'El servicio fue eliminado satisfactoriamente.');\n }\n catch(\\Exception $e) {\n $this->get('session')->getFlashBag()->add(\n 'error',\n 'El servicio no pudo ser eliminado. Es posible que tenga registros relacionados.'\n );\n }\n //}\n\n return $this->redirect($this->generateUrl('administracion_servicio'));\n }", "public function deleting(Observation $observation)\n {\n //\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SkaphandrusAppBundle:SkBusiness')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SkBusiness entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('business_admin'));\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SkaphandrusAppBundle:SkBusiness')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SkBusiness entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('business_admin'));\n }", "public function deleteModel($entity){\n $this->entityManager->remove($entity);\n $this->entityManager->flush();\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('GFireInvoiceBundle:InvoiceAccountEntry')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find InvoiceAccountEntry entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('invoice_accountentry'));\n }", "public function deleteItem(Request $req)\n {\n Event::find($req->id)->delete();\n return response()->json();\n }", "public function deleteEntity($uuid)\n {\n return $this->delete('entities/' . $uuid);\n }", "public function removeEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->remove($entity);\n\t $entityManager->flush();\n\t}", "protected function _deleteEvent($eventId)\n {\n }", "public function delete( $oid=null );", "public function destroy($id_cliente){}", "public function delIdentity()\n\t{\n\t\t// Verifier l'adhesion\n\t\t$q = new Bn_query('u2a', '_asso');\n\t\t$q->setFields('u2a_adherentid');\n\t\t$q->addWhere('u2a_userid='. $this->getVal('id', -1));\n\t\t$adheId = $q->getOne();\n\t\t$q->deleteRow();\n\t\t$q->setTables('adherents');\n\t\t$q->deleteRow('adhe_id=' . $adheId);\n\t}", "public function deleteAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('AciliaCmsBundle:Energy')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Energy entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('energy'));\n }", "public function clientDeleted($client)\n\t{\n\t\t//$this->intercomService->deleteIntercomUser($client->getEmail());\n\t}", "abstract public function delete(Entity $oMappedEntity);", "public function delete($id) {\n entity_delete($this->entityType, $id);\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SiteSavalizeBundle:Company')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Company entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('company'));\n }", "public function deleteAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('EmiageReviewManagerBundle:Examen')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Examen entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('examen'));\n }", "public function deleteActuator(Request $request){\n $data = $request->json()->all();\n $actuator = Actuator::findOrFail($data['id']);\n $response = $actuator->delete();\n return response()->json($actuator, 201);\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SolMantenimientoIdentificacion entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('solmantenimientoidentificacion'));\n }", "public function deleteAction(Request $request, Actualites $actualite)\r\n {\r\n $form = $this->createDeleteForm($actualite);\r\n $form->handleRequest($request);\r\n\r\n\r\n if ($form->isSubmitted() && $form->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $em->remove($actualite);\r\n\r\n\r\n\r\n $em->flush();\r\n }\r\n\r\n return $this->redirectToRoute('actualites_index');\r\n }", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function deleteAction(Request $request, Event $event)\n {\n $this->enforceOwnerSecurity($event);\n $form = $this->createDeleteForm($event);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($event);\n $em->flush();\n }\n\n return $this->redirectToRoute('event_index');\n }", "public function postRemove($entity);", "function remove(iEntityComment $entity);" ]
[ "0.6830146", "0.68224484", "0.66419566", "0.6605579", "0.6605579", "0.6557135", "0.6520767", "0.64835405", "0.6448817", "0.6444898", "0.63975054", "0.63898546", "0.6381406", "0.637278", "0.63500845", "0.63316095", "0.6325505", "0.6271819", "0.6243988", "0.61904764", "0.61563766", "0.6154103", "0.61437434", "0.6105641", "0.6086107", "0.60771513", "0.6015804", "0.60144305", "0.5981088", "0.59794", "0.5972869", "0.5919906", "0.5888573", "0.5848134", "0.5829146", "0.5821858", "0.58152586", "0.5813358", "0.57995206", "0.5793171", "0.5793171", "0.5793171", "0.57841253", "0.57503265", "0.5717198", "0.5692717", "0.56778467", "0.5658677", "0.56561273", "0.5653421", "0.56524456", "0.56504184", "0.5634183", "0.56267637", "0.5625405", "0.56095695", "0.5588106", "0.55816865", "0.5579552", "0.55646825", "0.5556551", "0.55530435", "0.55464965", "0.55429614", "0.5541961", "0.5536475", "0.5532987", "0.55200464", "0.5515088", "0.5513676", "0.5505781", "0.5503441", "0.55018526", "0.5501089", "0.54951143", "0.54939616", "0.5479742", "0.5479742", "0.5479205", "0.5469879", "0.54674155", "0.5465287", "0.54598856", "0.545912", "0.5450864", "0.5446099", "0.544606", "0.5445161", "0.5444686", "0.5441292", "0.5440318", "0.5432757", "0.5431012", "0.54308945", "0.5428285", "0.5428161", "0.5427594", "0.5426218", "0.54210955", "0.54174775" ]
0.66085356
3
Creates a form to delete a Incident entity by id.
private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('com_incident_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Supprimer','attr'=>array('class'=>'btn btn-danger','style'=>'width:100px;'))) ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('resident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('endroit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_servicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clientecredito_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('energy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventregistration_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('customers_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm($id) {\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('member_intrestconfig_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('intervalosips_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_missatges_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sucursal_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('expense_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '削除', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_sesionventatratamiento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sales_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_accountentry_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm1($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('calendarcategories_delete', array('id' => $id)))\n ->setMethod('DELETE')\n /* ->add('submit', 'submit', array('label' => 'Delete')) */\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adtiposcomision_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('detailsproduits_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_incapacidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('periododeinscricao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifdainformeordentrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar informe'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('container_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n $session = $this->get(\"session\");\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hall_delete', array('id' => $id, )))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('config_testimonial_delete', array('id' => $id)))\n ->setAttribute('enctype', 'multipart/form-data')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('devissetup_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('arrangementprogram_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('education_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('medicamentossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->setAction($this->generateUrl('chofer_destroy', ['id' => $id]))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fichepatient_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'bttn')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoasignar_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR ASIGNACION'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('timerecord_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('premiacao_ideia_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acc_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cosecha_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('victoire_business_template_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, ['label' => 'Delete'])\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('encuesta_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('klasses_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadofondo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'BORRAR'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picfooter_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingrediente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionarioempresa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function deleteFormAction($id) {\n $form = $this->createDeleteForm($id);\n $entity = $this->getItem($id);\n\n return array(\n 'form' => $form->createView(),\n 'order' => $this->getOrder(),\n 'entity' => $this->getOrder()\n );\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('crud_spendings_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partners_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n )))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('identification_module_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('achats_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('gdpmails_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('account_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete Account',\n 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('posgradolineas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fluidite_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n ))\n \n )\n \n \n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('behalf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dreams_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cidades_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('performance_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visiteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adminPromoCmdes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('data_recipe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifda_equipotrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frontbottom_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partner_category_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit',\n array(\n 'label' => 'Supprimer',\n 'attr' => array('class' => 'btn btn-danger')\n ))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('airport_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userman_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('datoslistapublicidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder(array('id' => $id))\r\n ->add('id', 'hidden')\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fileops_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('whitelist_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder(array('id' => $id))\r\n ->add('id', 'hidden')\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder(array('id' => $id))\r\n ->add('id', 'hidden')\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n }" ]
[ "0.74156785", "0.72755706", "0.7257462", "0.7250423", "0.7204331", "0.7203511", "0.7182645", "0.7179833", "0.71696275", "0.71631914", "0.71582997", "0.71538776", "0.7147314", "0.7133575", "0.7127885", "0.7127556", "0.711653", "0.7115973", "0.7111385", "0.71107155", "0.7107131", "0.71063673", "0.7103756", "0.7103319", "0.7099287", "0.70988816", "0.7089436", "0.70801306", "0.7078813", "0.7068459", "0.70665133", "0.7051914", "0.7050413", "0.7048549", "0.7038883", "0.70379716", "0.7036595", "0.7035973", "0.7035903", "0.703564", "0.7034364", "0.7032952", "0.7029479", "0.70291066", "0.7019811", "0.7014596", "0.70109344", "0.7000691", "0.69958466", "0.69958115", "0.6990138", "0.6987724", "0.69873464", "0.69835126", "0.6978838", "0.6973036", "0.69695175", "0.6967346", "0.6965287", "0.69652444", "0.69650626", "0.69636846", "0.6963077", "0.6959965", "0.69595844", "0.69595844", "0.6957792", "0.69565374", "0.6955123", "0.6954412", "0.69456035", "0.6945598", "0.6937046", "0.69282687", "0.6926426", "0.69201875", "0.6919149", "0.69169664", "0.69154936", "0.69150543", "0.69096243", "0.6908756", "0.6906726", "0.6901071", "0.6900359", "0.68984264", "0.6892641", "0.6890964", "0.6887018", "0.6886279", "0.68862176", "0.6885144", "0.6881359", "0.6876512", "0.6876153", "0.6875088", "0.68743426", "0.6871783", "0.6871783", "0.6869938" ]
0.75169045
0
Getter for the google client.
public function getClient() { return $this->client; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClient(): GoogleClient\n {\n return $this->client;\n }", "final public function get_client() {\n\t\tif ( null === $this->google_client ) {\n\t\t\t$client = $this->setup_client();\n\t\t\tif ( ! $client instanceof Google_Site_Kit_Client ) {\n\t\t\t\tthrow new Exception( __( 'Google client not set up correctly.', 'google-site-kit' ) );\n\t\t\t}\n\t\t\t$this->google_client = $client;\n\t\t}\n\n\t\treturn $this->google_client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "public static function getClient() {\n return self::$client;\n }", "protected function getClient() {\n $client = new Google_Client();\n $client->useApplicationDefaultCredentials();\n $client->setScopes(SCOPES_APPOINTEMENT_PLUGIN);\n \n return $client;\n }", "function getClient() {\n return $this -> _client;\n }", "public function getClient()\r\n {\r\n if (is_null($this->client)) {\r\n $this->client = new \\Google_Client();\r\n }\r\n \r\n $client = $this->client;\r\n \r\n if ($client->getAccessToken() && $client->isAccessTokenExpired()) {\r\n \r\n $token = json_decode($client->getAccessToken());\r\n \r\n if (isset($token->refresh_token)) {\r\n $client->getAuth()->refreshToken($token->refresh_token);\r\n $client->setAccessToken($client->getAuth()->getAccessToken());\r\n $this->setTokenRefreshed(true);\r\n }\r\n }\r\n \r\n return $client;\r\n }", "public function getClient() {\n return $this->_get( 'client' );\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "protected function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "public function getClient() {\n return $this->client;\n }", "public function getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "public function client()\n {\n return $this->client;\n }", "public function client()\n {\n return $this->client;\n }", "protected function getClient() {\n\n\t\t\tif (!$this->client) {\n\n\t\t\t\t$client = $this->createClient();\n\n\t\t\t\treturn $this->client = $client;\n\t\t\t}\n\n\t\t\treturn $this->client;\n\n\t\t}", "protected function getClient()\n {\n if ($this->client == null) {\n $this->client = new Client();\n }\n\n return $this->client;\n }", "public function getClient(): string\n {\n return $this->client;\n }", "public function getClient(): Client\n {\n return $this->client;\n }", "public function getClient(): Client\n {\n return $this->client;\n }", "public function getClient() {\n\t\treturn $this->service; \n\t}", "public function &getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "public function getGMapClient()\n\t{\n\t\tif (null === $this->gMapClient)\n\t\t\t$this->gMapClient = new EGMapClient();\n\n\t\treturn $this->gMapClient;\n\t}", "public function getClient()\n {\n return $this->accessToken->getClient();\n }", "function getGoogleClient() {\n\t$client = getOauth2Client();\n\n\t// Refresh the token if it's expired.\n\tif ($client->isAccessTokenExpired()) {\n\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n\t\tfile_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n\t}\nreturn $client;\n}", "private function getClient()\n {\n if ($this->client === null) {\n // @codeCoverageIgnoreStart\n $this->setClient(new Client());\n }\n // @codeCoverageIgnoreEnd\n\n return $this->client;\n }", "public function get_client() {\r\n\r\n\t\t// Doesn't load client twice + gives ability to overwrite.\r\n\t\tif ( ! empty( $this->client ) ) {\r\n\t\t\treturn $this->client;\r\n\t\t}\r\n\r\n\t\t$this->client = new SimpleEmailService( $this->options['client_id'], $this->options['client_secret'], $this->options['region'] );\r\n\r\n\t\treturn $this->client;\r\n\t}", "public function getClient() : \\Elastica\\Client\n {\n return $this->elasticaClient;\n }", "private function getClient()\n {\n if ($this->client) {\n return $this->client;\n }\n\n return new Client();\n }", "static function getClient() {\n $credentials = new \\Google_Auth_AssertionCredentials(\n \\etc\\Config::API_ACCOUNT,\n array(\\Google_Service_Drive::DRIVE_FILE),\n file_get_contents(\\etc\\Config::AUTH_FILE)\n );\n\n $client = new \\Google_Client();\n $client->setAssertionCredentials($credentials);\n if ($client->getAuth()->isAccessTokenExpired()) {\n $client->getAuth()->refreshTokenWithAssertion();\n }\n\n return $client;\n }", "protected function getClient()\n {\n if ($this->_guzzle == null) {\n $this->_guzzle = new HttpClient();\n }\n return $this->_guzzle;\n }", "public function getClient()\n {\n // If the client is a closure, resolve it\n if($this->client instanceof Closure) {\n return $this->client = call_user_func($this->client);\n }\n\n // Return the client\n return $this->client;\n }", "protected function getClient()\n {\n return $this->httpClient;\n }", "public static function client(){\n\t\tif(!self::$client){\n\t\t\tself::$client = new self();\n\t\t}\n\t\treturn self::$client;\n\t}", "protected function getClient()\n {\n if ($this->_client == null) {\n $this->_client = new \\GuzzleHttp\\Client(['base_uri' => $this->getEndpoint()]);\n }\n\n return $this->_client;\n }", "public function google()\n {\n return $this->auth('Google');\n }", "function getClient() {\n $client = new Google_Client();\n $client->setAuthConfig('credentials.json');\n $client->setApplicationName('theName');\n $client->setAccessType('offline');\n // $client->setScopes([\\Google_Service_Sheets::SPREADSHEETS]);\n $client->setScopes(\n ['https://www.googleapis.com/auth/spreadsheets',\n 'https://www.googleapis.com/auth/drive']);\n\n\n return $client;\n}", "public function getClient()\n {\n if (!$this->getAPIKey() || !$this->isEnabled())\n return null;\n\n if (!$this->client) {\n require_once __DIR__ . '/../Raygun4php/RaygunClient.php'; \n\n $this->client = new \\Raygun4php\\RaygunClient($this->getAPIKey(), $this->getAsync(), false);\n $this->client->SetVersion($this->getVersion());\n\n $customer = Mage::helper('customer')->getCustomer();\n\n if ($customer !== null) {\n $this->client->SetUser(\n $customer->getEmail(), // Unique ID\n $customer->getFirstname(), // First name\n $customer->getName(), // Full name\n $customer->getEmail(), // Email\n ($customer->getEmail() == null), // Anonymous?\n null // UUID\n );\n }\n }\n\n return $this->client;\n }", "public function getClient()\n {\n if (!$this->client) {\n $this->client = $this->createClient();\n $this->client->addCache($this->cachePool);\n }\n\n return $this->client;\n }", "function getClient() {\n if (is_null($this->client)) {\n $params = array(\n 'key' => $this->container->getParameter('amazon_key'),\n 'secret' => $this->container->getParameter('amazon_secure'),\n 'region' => 'us-east-1'\n );\n $this->client = GlacierClient::factory($params);\n }\n\n return $this->client;\n }", "protected static function createClient()\n {\n $log = new Logger('debug');\n $client = new Google_Client();\n $client->setApplicationName(self::APPLICATION_NAME);\n $client->useApplicationDefaultCredentials();\n $client->addScope('https://www.googleapis.com/auth/drive');\n $client->setLogger($log);\n return $client;\n }", "protected function getClient($client = 'administrator')\n\t{\n\t\t$this->client = ApplicationHelper::getClientInfo($client, true);\n\n\t\treturn $this->client;\n\t}", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "protected function client() : GuzzleClient {\n return $this->client;\n }", "protected function getClient()\n {\n return $this->minionClient;\n }", "public function get() {\n $config = [\n 'base_uri' => 'https://example.com',\n ];\n\n $client = new Client($config);\n\n return $client;\n }", "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n if (file_exists(CREDENTIALS_PATH)) {\n $accessToken = json_decode(file_get_contents(CREDENTIALS_PATH), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname(CREDENTIALS_PATH))) {\n mkdir(dirname(CREDENTIALS_PATH), 0700, true);\n }\n file_put_contents(CREDENTIALS_PATH, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", CREDENTIALS_PATH);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $refreshTokenSaved = $client->getRefreshToken();\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n $accessTokenUpdated = $client->getAccessToken();\n $accessTokenUpdated['refresh_token'] = $refreshTokenSaved;\n file_put_contents(CREDENTIALS_PATH, json_encode($accessTokenUpdated));\n }\n return $client;\n }", "protected function getHttpClient()\n {\n return $this->getOAuthClient()->getHttpClient()->getClient();\n }", "public function getClient()\n {\n if ($this->http === null) {\n $this->http = $this->initClient();\n }\n return $this->http;\n }", "public function getGoogleToken()\n {\n return $this->googleToken;\n }", "public function getClient(): Client\n {\n return $this->flow_client->getClient();\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function getGoogleManaged()\n {\n return $this->google_managed;\n }", "public function getDiscordClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n if (!$this->client instanceof API) {\n $this->client = new API(\n $this->config->get('yandexmoney.access_token')\n );\n }\n return $this->client;\n }", "public function getClient()\n {\n if (null === $this->client) {\n $config = $this->getCurrentDomain() ? $this->getCurrentDomain()->getSessionProperties() : null;\n $this->client = $this->clientFactory->create($config);\n }\n\n return $this->client;\n }", "public function getGoogleApiKey()\n {\n return $this->getConfiguration('googleApiKey');\n }", "public static function get_client() {\r\n\t\t$url = get_option(\"eswp_server\");\r\n\t\treturn new \\Elastica\\Client(array(\r\n\t\t \"url\" => $url\r\n\t\t));\r\n\t}", "public static function client()\n {\n if (is_null(static::$client)) {\n static::$client = new Client();\n static::$client->authenticate(config('github.token'), Client::AUTH_HTTP_TOKEN);\n }\n\n return static::$client;\n }", "protected function getDocumentClient()\n\t{\n\t\tif (!isset($this->doc_client))\n\t\t{\n\t\t\t$this->doc_client = ECash::getFactory()->getDocumentClient();\n\t\t}\n\n\t\treturn $this->doc_client;\n\t}", "public static function get_instance() {\n\t\tstatic $instance = null;\n\t\tif ( $instance === null ) {\n\t\t\t$instance = new Ga_Lib_Api_Client();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function client()\n {\n if ( ! $this->bean->fetchAs('person')->client) $this->bean->client = R::dispense('person');\n return $this->bean->fetchAs('person')->client;\n }", "public function client()\n {\n if (!self::$client) {\n if (is_null($this->subAccount)) {\n MailLog::info(\"Using master account\");\n self::$client = new \\SendGrid($this->api_key);\n } else {\n MailLog::info(\"Using subaccount {$this->subAccount->getSubAccountUsername()}\");\n self::$client = new \\SendGrid($this->subAccount->api_key);\n }\n\n }\n\n return self::$client;\n }", "private function getClient()\n {\n return new \\GuzzleHttp\\Client([\n 'base_uri' => $this->url,\n 'timeout' => 2.0,\n ]);\n }", "protected function getAccessTokenClient()\n {\n $grantType = \"client_credentials\";\n return $this->getAccessToken($grantType);\n }", "public function getClient()\n {\n if($this->client == null)\n $this->client = $this->kernel->getContainer()->get('test.client');\n return $this->client;\n }", "function getClientInfo() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n// $client->setAuthConfig(CLIENT_SECRET);\n $client->setAuthConfigFile(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n // Load previously authorized credentials from a file.\n $credentialsPath = $this->expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = file_get_contents($credentialsPath);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->authenticate($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, $accessToken);\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->refreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, $client->getAccessToken());\n }\n return $client;\n }", "public function getGoogleAccessToken() {\n return $this->data->get(\"google_access_token\", null);\n }" ]
[ "0.8751706", "0.8221763", "0.7847299", "0.7847299", "0.7847299", "0.78089327", "0.77447075", "0.7680968", "0.76801217", "0.76339483", "0.75699747", "0.75699747", "0.75695187", "0.75695187", "0.75695187", "0.75688946", "0.7557225", "0.75440043", "0.7493169", "0.74301696", "0.73932886", "0.73648995", "0.7263545", "0.7215874", "0.7215874", "0.716522", "0.71535075", "0.71481407", "0.7138306", "0.711953", "0.7097217", "0.707556", "0.7011989", "0.699342", "0.69733506", "0.69727004", "0.69688934", "0.6944782", "0.69284344", "0.692769", "0.68999654", "0.68722445", "0.6869596", "0.6863085", "0.6848165", "0.68262756", "0.6813265", "0.67825365", "0.67825365", "0.67825365", "0.67825365", "0.67825365", "0.6758056", "0.6748303", "0.67360646", "0.672884", "0.6722347", "0.67038417", "0.66777", "0.66719973", "0.6642591", "0.66286594", "0.6621172", "0.65986747", "0.65963286", "0.6588387", "0.6574121", "0.6557788", "0.65576535", "0.65455425", "0.65086883", "0.6507333", "0.6505903", "0.64954257", "0.6480689", "0.64668006", "0.64615804" ]
0.75659597
36
Setter for the google client.
public function setClient(Google_Client $client) { $this->client = $client; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setClient(\\Google_Client $client)\r\n {\r\n $this->client = $client;\r\n return $this;\r\n }", "public function setClient(GoogleClient $client): self\n {\n $this->client = $client;\n\n return $this;\n }", "public function setClient($client);", "public function getClient(): GoogleClient\n {\n return $this->client;\n }", "public function __construct(Google_Client $client) {\n parent::__construct($client);\n $this->client = $client;\n }", "public function setClient($client)\n {\n $this->client = $client;\n }", "public function setClient($client)\n {\n $this->client = $client;\n }", "public function setClient($client)\n {\n $this->client = $client;\n }", "public function setClient($client)\n {\n $this->_client = $client;\n }", "public function setClient($client)\n\t{\n\t\t$this->client = $client;\n\t}", "public function setClientId(string $client_id);", "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "public function setClient(Client $client)\n\t{\n\t\t$this->_client = $client;\n\t}", "public function setClient(Guzzle\\Http\\Client $client) {\n $this->client = $client;\n }", "function set_client($client_id) {\n $this->_client_id_param = array(\"clientID\" => $client_id);\n }", "public function setClient(ClientInterface $client);", "public function setClient( $client ) {\n return $this->_set( 'client', $client );\n }", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "public function __construct(Google_Client $client)\n {\n $this->client = $client;\n\n $this->apiKey = [\n 'application' => Config::get(\"youtube-api.project_id\"),\n 'redirectUri' => Config::get(\"youtube-api.redirect_uri\"),\n 'client-id' => Config::get(\"youtube-api.client_id\"),\n 'client-secret' => Config::get(\"youtube-api.client_secret\")\n ];\n\n }", "final public function get_client() {\n\t\tif ( null === $this->google_client ) {\n\t\t\t$client = $this->setup_client();\n\t\t\tif ( ! $client instanceof Google_Site_Kit_Client ) {\n\t\t\t\tthrow new Exception( __( 'Google client not set up correctly.', 'google-site-kit' ) );\n\t\t\t}\n\t\t\t$this->google_client = $client;\n\t\t}\n\n\t\treturn $this->google_client;\n\t}", "public function setClient(\\Phalconry\\Http\\Client $client) {}", "public function setClient($clientObject) {\n\t\t$this->service = new Google_Service_Calendar($clientObject); \n\t}", "public function setHttpClient($client) {\n $this->_httpClient = $client;\n }", "public function setClient(?string $client) {\n $this->client = $client;\n return $this;\n }", "public function setClientId($client_id) {\n\t\t$this->client_id = $client_id;\n\t}", "public function setClient(HTTP_Request2 $client) {\n $this->client = $client;\n }", "public function setClient(ClientInterface $client) {\n $this->client = $client;\n }", "public function setClient(libhg_Client_Interface $client) {\n\t\t$this->client = $client;\n\t\treturn $this;\n\t}", "public function setClient(Client $client)\n {\n $this->http = $client;\n return $this;\n }", "public static function setInstance(Client $client);", "public function setClient($client)\n {\n $this->client = $client;\n\n return $this;\n }", "public function setClient($client)\n {\n $this->client = $client;\n\n return $this;\n }", "public function setClient($client)\n {\n $this->client = $client;\n\n return $this;\n }", "public function setClient($client)\n {\n $this->client = $client;\n\n return $this;\n }", "private function setClient(Client $client)\n {\n $this->minionClient = $client;\n }", "private function setClient(Client $client)\n {\n $this->client = $client;\n return $this;\n }", "public function setGMapClient($gMapClient)\n\t{\n\t\t$this->gMapClient = $gMapClient;\n\t}", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function __construct($googleClient, $googleService) {\n $this->googleClient = $googleClient;\n $this->googleService = $googleService;\n }", "public function setGoogle($code);", "public function setGoogle($code);", "function getClient() {\n return $this -> _client;\n }", "public function setClient(Ec2Client $client)\n {\n $this->client = $client;\n }", "public function __construct(&$client)\n {\n $this->client = $client;\n }", "public function __construct($client)\n {\n $this->client = $client;\n }", "public function __construct($client)\n {\n $this->client = $client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function client()\n {\n return $this->client;\n }", "public function __construct($client)\n {\n $this->_client = $client;\n }", "public function __construct($client)\n {\n $this->_client = $client;\n }", "public function __construct($client)\n {\n $this->_client = $client;\n }", "public function __construct($client)\n {\n $this->_client = $client;\n }", "public function __construct($client)\n {\n $this->_client = $client;\n }", "public function setClient($client = null): void\n {\n if ($client instanceof HttpClient) {\n $this->client = $client;\n\n return;\n }\n\n $this->client = new HttpClient([\n 'curl' => $this->httpClientConfig,\n ]);\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function client()\n {\n return $this->client;\n }", "public static function getUserGoogleCalendarConfigFromClient($client){\n\t\t$user = User::find(Session::get('id'));\n\t\t$gcalendar = $user->gcalendar;\n\t\t$gcalendar['token'] = $client->getAccessToken();\n\t\t$gcalendar['allow'] = true;\n\t\treturn $gcalendar;\n\t}", "public function setClientID( $client_id ) {\n $this->client_id = $client_id;\n }", "public function __construct()\n {\n\n $client = new Google_Client();\n $client->setAuthConfig('client_secret.json');\n $client->setAccessType(\"offline\"); // offline access\n $client->setIncludeGrantedScopes(true); // incremental auth\n $client->addScope(Google_Service_Calendar::CALENDAR);\n $client->setRedirectUri(url('oauth2callback'));\n\n $guzzleClient = new \\GuzzleHttp\\Client(array('curl' => array(CURLOPT_SSL_VERIFYPEER => false)));\n $client->setHttpClient($guzzleClient);\n\n $this->client = $client;\n }", "public function setClientId($value);", "public function setclient_id($value);", "public function getClient() {\n return $this->client;\n }", "public function setClient(Client $client)\n {\n $this->client = $client;\n\n return $this;\n }", "public static function getClient() {\n return self::$client;\n }", "function getClient() {\n $client = new Google_Client();\n $client->setAuthConfig('credentials.json');\n $client->setApplicationName('theName');\n $client->setAccessType('offline');\n // $client->setScopes([\\Google_Service_Sheets::SPREADSHEETS]);\n $client->setScopes(\n ['https://www.googleapis.com/auth/spreadsheets',\n 'https://www.googleapis.com/auth/drive']);\n\n\n return $client;\n}", "public function setClient(Client $client): self\n {\n $this->client = $client;\n\n return $this;\n }", "public function __construct(\n Client $client\n ){\n $this->client = $client;\n }", "public function getClient()\r\n {\r\n if (is_null($this->client)) {\r\n $this->client = new \\Google_Client();\r\n }\r\n \r\n $client = $this->client;\r\n \r\n if ($client->getAccessToken() && $client->isAccessTokenExpired()) {\r\n \r\n $token = json_decode($client->getAccessToken());\r\n \r\n if (isset($token->refresh_token)) {\r\n $client->getAuth()->refreshToken($token->refresh_token);\r\n $client->setAccessToken($client->getAuth()->getAccessToken());\r\n $this->setTokenRefreshed(true);\r\n }\r\n }\r\n \r\n return $client;\r\n }", "protected function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "public function setClient(CI $client) {\n $this->client = $client;\n\n return $this;\n }" ]
[ "0.73747283", "0.72117686", "0.6976156", "0.69015646", "0.6863136", "0.68357456", "0.68357456", "0.68357456", "0.68095446", "0.678631", "0.6668789", "0.66338456", "0.66338456", "0.66338456", "0.66220224", "0.6569491", "0.6456773", "0.6453873", "0.6440004", "0.6426204", "0.6426204", "0.6426204", "0.64068484", "0.6377251", "0.6359668", "0.6321953", "0.63151264", "0.63138205", "0.6305938", "0.6286515", "0.6276961", "0.6221551", "0.6183251", "0.61800027", "0.61463565", "0.61463565", "0.61463565", "0.61463565", "0.6145827", "0.61382717", "0.6121515", "0.6108746", "0.6108746", "0.6108746", "0.60942817", "0.6087632", "0.6087632", "0.6047338", "0.60123765", "0.5997138", "0.59756935", "0.59756935", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5965511", "0.5960701", "0.59603345", "0.59603345", "0.59603345", "0.59603345", "0.59603345", "0.5951666", "0.59510404", "0.59510404", "0.59425247", "0.5932853", "0.5931596", "0.5928724", "0.5924078", "0.59227973", "0.5919169", "0.59024143", "0.5877321", "0.5873601", "0.58696026", "0.5852184", "0.58455", "0.584224", "0.58326894" ]
0.7144233
2
Getter for the google service.
public function make($service, $username = '') { if ($username != '') { $this->client->setSubject($username); } else { $this->client->setSubject(array_get($this->config, 'service.username', $username)); } $service = 'Google_Service_' . ucfirst($service); if (class_exists($service)) { $class = new \ReflectionClass($service); return $class->newInstance($this->client); } throw new UnknownServiceException($service); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAuth_Provider_Oauth_Service_GoogleService()\n {\n return $this->services['auth.provider.oauth.service.google'] = new \\phpbb\\auth\\provider\\oauth\\service\\google(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }", "public function getGcpService()\n {\n return $this->gcp_service;\n }", "public function service()\r\n {\r\n return $this->service;\r\n }", "function getService() {\n return $this->service;\n }", "public function service()\n {\n return $this->service;\n }", "final protected function get_service( $identifier ) {\n\t\tif ( null === $this->google_services ) {\n\t\t\t$services = $this->setup_services( $this->get_client() );\n\t\t\tif ( ! is_array( $services ) ) {\n\t\t\t\tthrow new Exception( __( 'Google services not set up correctly.', 'google-site-kit' ) );\n\t\t\t}\n\t\t\tforeach ( $services as $service ) {\n\t\t\t\tif ( ! $service instanceof Google_Service ) {\n\t\t\t\t\tthrow new Exception( __( 'Google services not set up correctly.', 'google-site-kit' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->google_services = $services;\n\t\t}\n\n\t\tif ( ! isset( $this->google_services[ $identifier ] ) ) {\n\t\t\t/* translators: %s: service identifier */\n\t\t\tthrow new Exception( sprintf( __( 'Google service identified by %s does not exist.', 'google-site-kit' ), $identifier ) );\n\t\t}\n\n\t\treturn $this->google_services[ $identifier ];\n\t}", "public function service() {\n return $this->service;\n }", "public function getService()\n {\n return $this->_service;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "protected function getService()\n {\n return $this->service;\n }", "protected function getService()\n {\n return $this->service;\n }", "public function getService() {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "function getService()\n\t{\n\n\t // Load the Google API PHP Client Library.\n\t // require_once 'google-api-php-client/src/Google/autoload.php';\n\t require_once APPPATH.'third_party/Google_api/src/Google/autoload.php';\n\n\t $client = new Google_Client();\n\t $client->setApplicationName(\"[email protected]\");\n\t $client->setDeveloperKey(\"AIzaSyBX98zkxCCkQcxS_-qfKftDKgAgYPgS078\");\n\n\t \n\n\t // Create and configure a new client object.\n\t $client = new Google_Client();\n\t $client->setApplicationName(\"HelloAnalytics\");\n\t $analytics = new Google_Service_Analytics($client);\n\n\t // // Read the generated client_secrets.p12 key.\n\t // $key = file_get_contents($key_file_location);\n\t // $cred = new Google_Auth_AssertionCredentials(\n\t // $service_account_email,\n\t // array(Google_Service_Analytics::ANALYTICS_READONLY),\n\t // $key\n\t // );\n\t // $client->setAssertionCredentials($cred);\n\t // if($client->getAuth()->isAccessTokenExpired()) {\n\t // $client->getAuth()->refreshTokenWithAssertion($cred);\n\t // }\n\n\t return $analytics;\n\t}", "public function getService()\n\t{\n\t\treturn $this->_service;\n\t}", "public function getService()\n\t{\n\t\treturn $this->service;\n\t}", "public function getClient(): GoogleClient\n {\n return $this->client;\n }", "final public function get_client() {\n\t\tif ( null === $this->google_client ) {\n\t\t\t$client = $this->setup_client();\n\t\t\tif ( ! $client instanceof Google_Site_Kit_Client ) {\n\t\t\t\tthrow new Exception( __( 'Google client not set up correctly.', 'google-site-kit' ) );\n\t\t\t}\n\t\t\t$this->google_client = $client;\n\t\t}\n\n\t\treturn $this->google_client;\n\t}", "public function getGoogleManaged()\n {\n return $this->google_managed;\n }", "public function getAnalyticsService(): Google_Service_Analytics\n {\n return $this->client->getAnalyticsService();\n }", "private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }", "public function getService()\n {\n return $this->getKey('Service');\n }", "public function getService()\n {\n return $this->send('POST', 'getService');\n }", "public function getClient() {\n\t\treturn $this->service; \n\t}", "public function getService()\n {\n if (isset($this->data['ShippingService'])) {\n return $this->data['ShippingService'];\n } else {\n return false;\n }\n }", "public function google()\n {\n return $this->auth('Google');\n }", "function __get_service($service) {\n\n if ($this->services[$service] === null) {\n\n $url = $this->soap_endpoint.'/'.$service.'?wsdl';\n\n $this->services[$service] =\n $this->__create_soap_client($url, $this->soap_wsdl);\n\n }\n\n return $this->services[$service];\n\n}", "private function get_serviceClass()\n\t{\n\t\treturn $this->m_serviceClass;\n\t}", "protected function getClient() {\n $client = new Google_Client();\n $client->useApplicationDefaultCredentials();\n $client->setScopes(SCOPES_APPOINTEMENT_PLUGIN);\n \n return $client;\n }", "public static function get($name) {\r\n return self::getInstance()->getService($name);\r\n }", "public static function getServicePoint()\n {\n return self::$servicePoint;\n }", "public function get(string $service = '');", "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }", "public function getGoogleToken()\n {\n return $this->googleToken;\n }", "public function getService(): ?string\n {\n return $this->service;\n }", "public function get_client() {\r\n\r\n\t\t// Doesn't load client twice + gives ability to overwrite.\r\n\t\tif ( ! empty( $this->client ) ) {\r\n\t\t\treturn $this->client;\r\n\t\t}\r\n\r\n\t\t$this->client = new SimpleEmailService( $this->options['client_id'], $this->options['client_secret'], $this->options['region'] );\r\n\r\n\t\treturn $this->client;\r\n\t}", "public function getService()\n {\n return null;\n }", "public function get($serviceName);", "protected function getProfilefields_Type_GoogleplusService()\n {\n return $this->services['profilefields.type.googleplus'] = new \\phpbb\\profilefields\\type\\type_googleplus(${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }", "public static function google()\n {\n return 'google';\n }", "public function getserviceId()\n {\n return $this->service_id;\n }", "function getServiceName() { return $this->_servicename; }", "public function getGoogleApiKey()\n {\n return $this->getConfiguration('googleApiKey');\n }", "abstract protected function getService();", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function getServiceAccount()\n {\n return $this->service_account;\n }", "public function getServiceAccount()\n {\n return $this->service_account;\n }", "public function getServiceAccount()\n {\n return $this->service_account;\n }", "public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }", "public function getGoogleAccessToken() {\n return $this->data->get(\"google_access_token\", null);\n }", "public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }", "public static function service() {\n return self::$app->serviceContainer;\n }", "public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }", "public function getService() : ?ServiceOTP\n {\n return $this->service;\n }", "public function getServiceKey() {\n return $this->_get( 'service_key' );\n }", "public function getGMapClient()\n\t{\n\t\tif (null === $this->gMapClient)\n\t\t\t$this->gMapClient = new EGMapClient();\n\n\t\treturn $this->gMapClient;\n\t}", "function aurum_get_google_api() {\n\treturn apply_filters( 'aurum_google_api_key', get_data( 'google_maps_api' ) );\n}", "static private function getSpreadSheetService()\n {\n $client = self::getClient();\n if (!($client instanceof Google_Client)) {\n echo json_encode([\n 'success' => false,\n 'error' => '<br>認証情報が不正です。<br>client_secret.jsonは配置されていますか?<br>配置されているなら「認証情報の作成」ボタンを押してください。'\n ]);\n die();\n }\n\n /**\n * @var $client Google_Client\n */\n return new Google_Service_Sheets($client);\n }", "function getClient() {\n $client = new Google_Client();\n $client->setAuthConfig('credentials.json');\n $client->setApplicationName('theName');\n $client->setAccessType('offline');\n // $client->setScopes([\\Google_Service_Sheets::SPREADSHEETS]);\n $client->setScopes(\n ['https://www.googleapis.com/auth/spreadsheets',\n 'https://www.googleapis.com/auth/drive']);\n\n\n return $client;\n}", "private function get_service_options() {\n\n\t\treturn isset( $this->_options[ $this->_managed_solr_service_id ] ) ? $this->_options[ $this->_managed_solr_service_id ] : null;\n\t}", "public function getGRequest()\r\n {\r\n if (!$this->hasData('g_request')) {\r\n $this->setData('g_request', new GoogleRequest(\r\n $this->getMerchantId(),\r\n $this->getMerchantKey(),\r\n $this->getServerType(),\r\n $this->getCurrency()\r\n ));\r\n\r\n //Setup the log file\r\n $logDir = Mage::getBaseDir('log');\r\n $this->getData('g_request')->SetLogFiles(\r\n $logDir . DS . 'googleerror.log',\r\n $logDir . DS . 'googlemessage.log',\r\n L_ALL\r\n );\r\n }\r\n return $this->getData('g_request');\r\n }", "private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\n }", "public function getServiceId()\n {\n return $this->service_id;\n }", "public function grabService($class)\n {\n return $this->client->cake[$class];\n }", "public function getconfig()\r\n\t{\r\n\t\t// define('SCOPES', implode(' ', array(\r\n\t\t// Google_Service_Calendar::CALENDAR,'https://www.googleapis.com/auth/userinfo.email')\r\n\t\t// ));\r\n\t\t$hostName = $_SERVER['HTTP_HOST'];\r\n $protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';\r\n \t$server = $protocol.$hostName;\r\n\t\t\r\n\t\t$google_client = new Google_Client();\r\n\t\t$google_client->setApplicationName('Medicloud');\r\n\t\t$google_client->setRedirectUri($server.'/app/gcal/getClientToken');\r\n\t\t// $google_client->setRedirectUri('http://localhost/medicloud_v003/public/app/gcal/getClientToken');\r\n\t\t// $google_client->setRedirectUri('http://ec2-54-255-185-218.ap-southeast-1.compute.amazonaws.com/nuclei_mc_r1/public/app/gcal/getClientToken');\r\n\t\t// $google_client->setClientId('435398632542-oe70nsqe1mtpd5j1gteeb4anp4v5p315.apps.googleusercontent.com');\r\n\t\t// $google_client->setClientSecret('KZFY_DK7i21cBJuVyiGf8Of9');\r\n\t\t$google_client->setClientId('186173794919-hm0ejste4uocpnsg9p8hjd5ea3201ss8.apps.googleusercontent.com');\r\n\t\t$google_client->setClientSecret('FBBhPQ9SeHdEwUPTLKAuyn-5');\r\n\t\t// $google_client->setScopes(SCOPES);\r\n\t\t\r\n\r\n\t\treturn $google_client;\r\n\t}", "public function service()\n {\n if ($this->service !== null) {\n return call_user_func($this->service, $this);\n } else {\n throw new InvalidConfigException('Either \"' . get_class($this) . '::service\" must be set.');\n }\n }", "protected function _service( $name ) {\n\n\t\tif ( !isset( $this->_services[ $name ])) {\n\t\t\tthrow new Exception( \"The '$service' service is not configured.\" );\n\t\t}\n\n\t\treturn $this->_services[ $name ];\n\t}", "function get_service($limit = 3){\n return app(ServiceInterface::class)->getService();\n }", "public function getCodeService(){\r\n\t\treturn $this->code_service;\r\n\t}", "public function get($service)\n {\n return $this->neptune[$service];\n }", "protected function getConfigName()\n {\n return 'google';\n }", "public function getGoogleSession()\n\t{\n\t\treturn \\Session::get('google.session');\n\t}", "public function getService()\r\n\t{\r\n\t\t$this->_service = $this->getClient()->objectStoreService('cloudFiles', $this->region);\r\n\t\treturn $this->_service;\r\n\t}", "public function get(ServiceInterface $service);", "public function getServiceId()\r\n {\r\n return $this->serviceId;\r\n }", "public function get() {\n\t\t\\_deprecated_function( __METHOD__, 'WPSEO 14.9' );\n\n\t\treturn $this->presentation->googlebot;\n\t}", "public function getServiceId() {\n return $this->serviceId;\n }", "public function getIdService() {\n return $this->idService;\n }", "protected function getServiceUrl()\n {\n return $this->container->getParameter('g4_search_service_getavail_' . $this->getType());\n }", "protected function service()\n {\n return new Service();\n }", "public function getGoogleMap() \n {\n return $this->content;\n }", "function getGoogleClient() {\n\t$client = getOauth2Client();\n\n\t// Refresh the token if it's expired.\n\tif ($client->isAccessTokenExpired()) {\n\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n\t\tfile_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n\t}\nreturn $client;\n}", "public function getServiceId()\n {\n if (array_key_exists(\"serviceId\", $this->_propDict)) {\n return $this->_propDict[\"serviceId\"];\n } else {\n return null;\n }\n }", "public function getServiceAddress() {\n\t\treturn $this->serviceAddress;\n\t}", "public function getLocationService()\n {\n if (!$this->locationService) {\n $this->setLocationService(new LocationService($this));\n }\n\n return $this->locationService;\n }", "public function getService($service)\n {\n return $this->container[$service];\n }", "public function getClientServiceInfo($service, $package)\n {\n return '';\n }", "public function get()\r\n {\r\n return $this->location->with('services')->get();\r\n }", "public function getUserService()\n {\n return $this->userService;\n }", "public function __construct($googleClient, $googleService) {\n $this->googleClient = $googleClient;\n $this->googleService = $googleService;\n }", "function getService($service) {\n\t$i = 0;\n\t\tforeach ($this->services as $value) {\n\t\t\tif ($value == $service) {\n\t\t\t\treturn array(\n\t\t\t\t\"Keyword\" => $value,\n\t\t\t\t\"Description\" => $this->descriptions[$i],\n\t\t\t\t\"Information\" => $this->infos[$i]);\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t}", "public function getServicePath()\n {\n return $this->service_path;\n }", "public function getService() // TODO: add function return type\r\n {\r\n $connection_properties = $this->get();\r\n\r\n // load the services from the services store; for connections,\r\n // make sure the service also has the connection interface\r\n $connection_type = $connection_properties['connection_type'];\r\n $connection_info = $connection_properties['connection_info'];\r\n $service = \\Flexio\\Services\\Factory::create($connection_type, $connection_info);\r\n if (!($service instanceof \\Flexio\\IFace\\IConnection))\r\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::NO_SERVICE);\r\n\r\n // for oauth services, the access token may have been refreshed via\r\n // a refresh token, so these should be saved so that the access token\r\n // isn't refreshed in every subsequent call\r\n if ($service instanceof \\Flexio\\IFace\\IOAuthConnection)\r\n {\r\n $tokens = $service->getTokens();\r\n $connection_info = $connection_properties['connection_info'];\r\n\r\n $info_changed = false;\r\n if (!isset($connection_info))\r\n {\r\n $info_changed = true;\r\n }\r\n else\r\n {\r\n if (($connection_info['access_token'] ?? false) !== $tokens['access_token'])\r\n $info_changed = true;\r\n if (($connection_info['refresh_token'] ?? false) !== $tokens['refresh_token'])\r\n $info_changed = true;\r\n if (($connection_info['expires'] ?? false) !== $tokens['expires'])\r\n $info_changed = true;\r\n }\r\n\r\n if ($info_changed === true)\r\n $this->set([ 'connection_info' => $tokens]);\r\n }\r\n\r\n return $service;\r\n }", "public function woo_slg_load_google() {\n\t\t\t\n\t\t\tglobal $woo_slg_options;\n\t\t\t\n\t\t\t//google class declaration\n\t\t\tif( !empty( $woo_slg_options['woo_slg_enable_googleplus'] ) \n\t\t\t\t&& !empty( $woo_slg_options['woo_slg_gp_client_id'] ) && !empty( $woo_slg_options['woo_slg_gp_client_secret'] ) ) {\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }" ]
[ "0.78957677", "0.73489", "0.712035", "0.71058846", "0.7097972", "0.70928127", "0.709136", "0.6952296", "0.69340914", "0.6926755", "0.6926755", "0.6921906", "0.6892419", "0.6892419", "0.6892419", "0.6892419", "0.6892419", "0.6892419", "0.6892419", "0.68864363", "0.68561697", "0.6834078", "0.669536", "0.6601225", "0.6544108", "0.6539034", "0.65236247", "0.6520306", "0.6484254", "0.6429673", "0.6335205", "0.6334859", "0.63046634", "0.6267332", "0.6237922", "0.6231765", "0.62116987", "0.6207416", "0.61793166", "0.61636835", "0.61484134", "0.61332715", "0.61001056", "0.6092665", "0.60360146", "0.60158515", "0.6007557", "0.5990142", "0.5986612", "0.5964123", "0.59620845", "0.5955845", "0.5955845", "0.5955845", "0.5944343", "0.59085697", "0.58953136", "0.58887905", "0.5888752", "0.58876866", "0.5865783", "0.5799703", "0.5780448", "0.57718843", "0.5770655", "0.5768157", "0.57545114", "0.57537544", "0.5749863", "0.57440066", "0.5727602", "0.5721996", "0.571793", "0.57145995", "0.57084626", "0.5697623", "0.5687483", "0.5686515", "0.5674306", "0.5673425", "0.5668433", "0.566323", "0.565721", "0.56565523", "0.56449664", "0.5626934", "0.5614943", "0.56095433", "0.5580341", "0.55753696", "0.55740577", "0.5572501", "0.55708313", "0.5563104", "0.55628103", "0.555702", "0.55523926", "0.55483216", "0.55420464", "0.5539449", "0.55392426" ]
0.0
-1
Setup correct auth method based on type.
protected function auth($userEmail = '') { // see (and use) if user has set Credentials if ($this->useAssertCredentials($userEmail)) { return; } // fallback to compute engine or app engine $this->client->useApplicationDefaultCredentials(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAuthType($authtype){\n $this->authType=$authtype;\n }", "function setAuthType($authtype){\n $this->authType=$authtype;\n }", "function setAuthType($authtype){\r\n\t\t$this->authType=$authtype;\r\n\t}", "public function setAuthenticationType( $type ) {\n\t\t$this->_mAuthenticationType = $type;\n\t}", "public function getAuthType()\n {\n return $this->auth_type;\n }", "public function setDefaultAuthTypes()\n {\n global $user;\n\n // set the type 'basic_info'\n $name = \"basic_info\";\n $description = \"Access your basic account information like username,first name, last name, email address, date of birth\";\n $values = array('username' => $user->getUsername(), 'first_name' => $user->getFirstName(), 'last_name' => $user->getLastName(), 'email' => $user->getEmail(), 'birthday' => $user->getBirthDate());\n $this->addAuthType($name, $description, $values);\n\n }", "function _auth_type($str)\n\t{\n\t\tif(valid_email($str))\n\t\t{\n\t\t\treturn 'email';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'username';\n\t\t}\n\t}", "public function setType($type)\n {\n if (in_array($type, [self::AUTH_BASIC, self::AUTH_DIGEST])) {\n $this->type = $type;\n }\n\n return $this;\n }", "abstract protected function auth();", "public function setAuthType($auth_type)\n {\n $this->auth_type = $auth_type;\n return $this;\n }", "public function getAuthMode() {}", "function auth_user($type = 'general')\n\t{\n\t\tif($type != 'general' && isset($_SESSION['uid']))\n\t\t\tswitch($type)\n\t\t\t{\n\t\t\t\tcase 'webpagemanager': \n\t\t\t\t\t\tif($_SESSION['uType'] == 'webpagemanager' || $_SESSION['uType'] == 'super')\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'dataentryoperator': \n\t\t\t\t\t\tif($_SESSION['uType'] == 'dataentryoperator' || $_SESSION['uType'] == 'super')\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'salesmanager': \n\t\t\t\t\t\tif($_SESSION['uType'] == 'salesmanager' || $_SESSION['uType'] == 'super')\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 'super':\n\t\t\t\t\t\tif($_SESSION['uType'] == 'super')\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\n\t\t\t\tdefault: return false;\n\t\t\t}\n\t\t\n\t\tif(isset($_SESSION['uid'])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private function authenticate()\n {\n self::assertValidAuthType();\n\n $this->client\n ->getEmitter()\n ->attach(new $this->authenticators[$this->authType]($this));\n }", "public function getAuthType()\n {\n return isset($this->authType) ? $this->authType : null;\n }", "public function __construct($realm='lepton', $type=HttpAuthentication::AUTH_BASIC) {\n $this->type = $type;\n $this->realm = $realm;\n $this->username = $_SERVER['PHP_AUTH_USER'];\n $this->password = $_SERVER['PHP_AUTH_PW'];\n }", "public function getAuthMode();", "public function getAuthenticationMethod() {\n return @$this->attributes['authentication_method'];\n }", "public function allowedAuthMethods(): array\n {\n return [AuthMethodEnum::BASIC, AuthMethodEnum::BEARER];\n }", "public function isAuth() {}", "public function use_authentication()\n {\n }", "final public function isAuthType($type)\n {\n return in_array($type, $this->authTypes);\n }", "protected function initializeAuthCode($authCode, $type)\n {\n $authCodeString = $this->generateRandomString();\n $authCodeString = md5(serialize($authCode) . $authCodeString);\n $authCode->setAuthCode($authCodeString);\n\n $authCode->setType($type);\n $authCode->setValidUntil($this->getValidUntil());\n }", "protected function determine_method ( $data, $type = 'form' ) {\n\t\t$method = '';\n\t\t\n\t\tif ( ! in_array( $type, array( 'form', 'validate', 'check' ) ) ) { return; }\n\t\t\n\t\t// Check for custom functions.\n\t\tif ( isset( $data[$type] ) ) {\n\t\t\tif ( function_exists( $data[$type] ) ) {\n\t\t\t\t$method = $data[$type];\n\t\t\t}\n\t\t\t\n\t\t\tif ( $method == '' && method_exists( $this, $data[$type] ) ) {\n\t\t\t\tif ( $type == 'form' ) {\n\t\t\t\t\t$method = array( $this, $data[$type] );\n\t\t\t\t} else {\n\t\t\t\t\t$method = $data[$type];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $method == '' && method_exists ( $this, $type . '_field_' . $data['type'] ) ) {\n\t\t\tif ( $type == 'form' ) {\n\t\t\t\t$method = array( $this, $type . '_field_' . $data['type'] );\n\t\t\t} else {\n\t\t\t\t$method = $type . '_field_' . $data['type'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $method == '' && function_exists ( $this->token . '_' . $type . '_field_' . $data['type'] ) ) {\n\t\t\t$method = $this->token . '_' . $type . '_field_' . $data['type'];\n\t\t}\n\t\t\n\t\tif ( $method == '' ) {\n\t\t\tif ( $type == 'form' ) {\n\t\t\t\t$method = array( $this, $type . '_field_text' );\n\t\t\t} else {\n\t\t\t\t$method = $type . '_field_text';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $method;\n\t}", "public function setAuthType($authType = null)\n {\n // validation for constraint: string\n if (!is_null($authType) && !is_string($authType)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($authType, true), gettype($authType)), __LINE__);\n }\n if (is_null($authType) || (is_array($authType) && empty($authType))) {\n unset($this->authType);\n } else {\n $this->authType = $authType;\n }\n return $this;\n }", "public function authenticate(){\n\t\t// also return typeOfUser???\n\n\t\t// if user is logged\n\t\tif($this->model->isUserLogged($this->view->getServerInfo())){\n\t\t\t\n\t\t\t/* Use Case 2 Logging out an authenticated user */\n\t\t\treturn $this->logoutUser();\n\t\t\t\n\t\t// if user wants to register\n\t\t} else if($this->view->userGoRegister()){\n\t\t\t\n\t\t\treturn $this->view->showRegisterPage();\n\t\t\n\t\t// if user tries to save new credentials\n\t\t} else if($this->view->userTryRegister()){\n\t\n\t\t\treturn $this->doRegister();\n\t\n\t\t// if user is out logged and...\n\t\t} else {\n\t\t\t\n\t\t\t// ...has stored credentials\n\t\t\tif($this->view->hasStoredCredentials()){\n\t\t\t\t\n\t\t\t\t/* Use Case 3 Authentication with saved credentials */\n\t\t\t\treturn $this->authCredUser();\n\t\t\t\t\n\t\t\t// ...does not have stored credentials\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/* Use Case 1 Authenticate user */\n\t\t\t\treturn $this->authUser();\n\t\t\t}\n\t\t}\n\t}", "public function init() {\n\t\tparent::init();\n // Disable the main layout renderer\n $this->_helper->layout->disableLayout();\n // Do not even attempt to render a view\n $this->_helper->viewRenderer->setNoRender(true);\n if ($this->getRequest()->getParam('type')) {\n $this->_type = $this->getRequest()->getParam('type');\n\n $this->_auth = Zend_Auth::getInstance();\n\n $this->_adapter = Josh_Auth_Adapter_Factory::factory($this->_type, $this->getRequest()->getParams());\n }\n }", "public function getAuthenticationMethod() {\n\t\treturn $this->selectedEndpoint['authentication_method'];\n\t}", "abstract public function createLoginService($type='');", "public function getAuthenticationType() {\n\t\treturn $this->_mAuthenticationType;\n\t}", "public static function method($type) {\n return $_SERVER['REQUEST_METHOD'] == strtoupper($type);\n }", "function check_auth($type, $user, $pass) \r\n\t{\r\n\t\t$this->tx_cbywebdav_devlog(1,\"=== check_auth start; type : $type, user: $user, pass: **** \",\"cby_webdav\",\"check_auth\");\r\n\t\t$t3io=$this->CFG->t3io;\r\n\t\t$auth=$t3io->T3Authenticate($user,$pass);\r\n\t\t$this->tx_cbywebdav_devlog(1,\"=== check_auth end : $auth\",\"cby_webdav\",\"check_auth\");\r\n\t\treturn $auth;\r\n\t}", "abstract public function getAuthenticator();", "public function getAuthenticationMode() {\n\t}", "public function authorize()\n {\n return Auth::user()->type == 1;\n }", "public function authenticate() {}", "public abstract function authenticate(array &$options, Request $request);", "function ipmiAuthTypes($type = null) {\n\t$types = array(\n\t\tIPMI_AUTHTYPE_DEFAULT => _('Default'),\n\t\tIPMI_AUTHTYPE_NONE => _('None'),\n\t\tIPMI_AUTHTYPE_MD2 => _('MD2'),\n\t\tIPMI_AUTHTYPE_MD5 => _('MD5'),\n\t\tIPMI_AUTHTYPE_STRAIGHT => _('Straight'),\n\t\tIPMI_AUTHTYPE_OEM => _('OEM'),\n\t\tIPMI_AUTHTYPE_RMCP_PLUS => _('RMCP+'),\n\t);\n\n\tif (is_null($type)) {\n\t\treturn $types;\n\t}\n\telseif (isset($types[$type])) {\n\t\treturn $types[$type];\n\t}\n\telse {\n\t\treturn _('Unknown');\n\t}\n}", "function auth($auth_type, $auth_name=false, $object_id=false)\n\t{\n\t\tif ( $this->is_admin )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif ( is_array($auth_name) )\n\t\t{\n\t\t\tif ( $auth_name )\n\t\t\t{\n\t\t\t\tforeach ( $auth_name as $name )\n\t\t\t\t{\n\t\t\t\t\tif ( $this->auth($auth_type, $name, $object_id) )\n\t\t\t\t\t{\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\treturn false;\n\t\t}\n\n\t\t// everybody can see the root, but only main admin can do other thing onto than view\n\t\tif ( !$object_id && (($auth_name === false) || ($auth_name === 'view')) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// we may want to check the presence of a single auth, whatever the object_id\n\t\tif ( ($object_id === false) && ($auth_name !== false) )\n\t\t{\n\t\t\tif ( $this->auths && isset($this->auths[$auth_type]) && isset($this->auths[$auth_type][$auth_name]) && $this->auths[$auth_type][$auth_name] )\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// from there, we expect the auth_type to exists and to have data, and object_id to have a value\n\t\tif ( $object_id && $this->auths && isset($this->auths[$auth_type]) && $this->auths[$auth_type] )\n\t\t{\n\t\t\t// we don't check a specific auth, any will do for the id\n\t\t\tif ( $auth_name === false )\n\t\t\t{\n\t\t\t\tforeach ( $this->auths[$auth_type] as $name => $ids )\n\t\t\t\t{\n\t\t\t\t\tif ( isset($ids[$object_id]) )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// we have auth name & object_id\n\t\t\tif ( $auth_name && isset($this->auths[$auth_type][$auth_name]) && $this->auths[$auth_type][$auth_name] && isset($this->auths[$auth_type][$auth_name][$object_id]) )\n\t\t\t{\n\t\t\t\treturn $this->auths[$auth_type][$auth_name][$object_id];\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function setMethod($request_method) {}", "public function authenticate() {\n }", "abstract public function authenticate(Request $request);", "public function authenticate(Request $req)\n {\n $email = $req->input('email');\n $password = $req->input('password');\n\n\n if (Auth::attempt(['email' => $email, 'password' => $password,'user_type'=>1]) || Auth::attempt(['email' => $email, 'password' => $password,'user_type'=>0])) {\n Auth::login(Auth::user());\n return redirect()->intended('/');\n } else {\n $req->session()->put('error', 'Email address or password is/are invalid. Try again!');\n return redirect('/login')->with('error', 'Email address or password is/are invalid. Try again!');\n }\n }", "public function get_auth_methods()\n {\n return [\n 'hooks' => [\n 'title' => 'Event-Hooks',\n 'type' => 'boolean',\n 'rights' => [\n isys_auth::VIEW,\n isys_auth::EDIT\n ]\n ],\n 'history' => [\n 'title' => _L('LC__MODULE__EVENTS__HISTORY'),\n 'type' => 'boolean',\n 'rights' => [\n isys_auth::VIEW,\n isys_auth::EDIT\n ]\n ]\n /*,\n\t\t\t'config' => array(\n\t\t\t\t'title' => _L('LC__CONFIGURATION'),\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'rights' => array(isys_auth::VIEW, isys_auth::EDIT)\n\t\t\t)*/\n ];\n }", "public function getAuthorizationMethod()\n {\n return 'bearer';\n }", "public function getGrantType();", "public function isAuth();", "public function actionLogin($type) {\n\t\t$type = @$_GET['type'];\n\t\tif (!$type)\n\t\t\treturn $this->redirect(array('site/index'));\n\t\tYii::app()->session['type'] = $type;\n\t\t$authUrl = Yii::app()->singly->getAuthServiceUrl($this->getCallbackUrl(), $type);\n\t\t$this->redirect($authUrl);\n\t}", "function authUsers($userType, Request $request, Response $response) {\n $authHeader = $request->getHeader('Authorization');\n list($jwt) = sscanf($authHeader[0], 'Bearer %s');\n if ($jwt) {\n try {\n $data = getTokenData($request);\n if (in_array($data[Constants::USERS_FLD_USER_TYPE], $userType)) {\n return true;\n } else {\n return false;\n }\n } catch (Exception $e) {\n return false;\n }\n } else {\n return false;\n }\n return false;\n}", "private function setOptions($type)\n {\n // set a options index based on the requested type\n $actions = [\n 'get' => [\n 'setUrl', 'setHeader', 'setReturnTransfer', 'setHttpHeader',\n ],\n 'create' => [\n 'setUrl', 'setHeader', 'setReturnTransfer', ['setHttpHeader' => true], 'setPost',\n ],\n 'edit' => [\n 'setUrl', 'setHeader', 'setReturnTransfer', ['setHttpHeader' => true], 'setCustomRequestPath',\n ],\n 'delete' => [\n 'setUrl', 'setHeader', 'setReturnTransfer', 'setHttpHeader', 'setCustomRequestDelete',\n ],\n ];\n\n if (isset($actions[$type])) {\n\n foreach ($actions[$type] as $options) {\n\n if (is_array($options)) {\n\n $this->{key($options)}($options[key($options)]);\n } else {\n\n $this->$options();\n }\n }\n }\n }", "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "public function setType(String $type){\n $type = strtoupper($type);\n if(!in_array($type, self::getUserTypes())){\n throw new \\Exception('Incorrect User Type');\n }\n $this->type = constant('self::'. $type);\n }", "public function auth($data = null) {}", "public function getAuthMode()\r\n {\r\n return $this->authMode;\r\n }", "private function _setupAuth()\n {\n $this->_auth = Zend_Auth::getInstance();\n }", "protected function initAuth()\n {\n /** @var Auth $auth */\n Auth::getInstance()->setStorage();\n }", "public function setAuthenticationParams() {\n }", "protected function setProxyAuthScheme() {}", "public function setType(string $type) {\n if ($type == Router::API_ROUTE || $type == Router::CLOSURE_ROUTE ||\n $type == Router::CUSTOMIZED || $type == Router::VIEW_ROUTE) {\n $this->type = $type;\n }\n }", "abstract public function setDAO($type);", "public function authentication()\n {\n }", "function checkAuth($type, $username, $password)\n {\n if (!$_MIDCOM->authentication->is_user())\n {\n if (!$_MIDCOM->authentication->login($username, $password))\n {\n return false;\n }\n }\n return true;\n }", "public static function providerBoot($type=0)\n {\n if(Auth::guard('provider')->check()) {\n $authId = Auth::guard('provider')->id();\n self::bootAction($authId);\n }\n }", "public function doAuthentication();", "public function __construct()\n {\n // To ignore the Notice instead of Isset on missing POST vars\n error_reporting(E_ALL & ~E_NOTICE);\n $_SESSION['auth_service'] = $_POST['auth_type'];\n\n if ($_SESSION['auth_service'] == \"jwt\") {\n $this->authService = new JWTService();\n } else {\n $this->authService = new CodeGrantService();\n }\n }", "public function authenticate();", "public function authenticate();", "public function authenticate();", "protected function setGuard()\n {\n $user = request()->user ?? null;\n\n switch ($user) {\n case 'client':\n $this->guard = 'client-api';\n break;\n default:\n $this->guard = 'web';\n break;\n }\n\n }", "function authenticate() {}", "public function get_auth_methods()\n {\n return [\n 'table' => [\n 'title' => _L('LC__AUTH_GUI__DIALOG_TABLE_CONDITION'),\n 'type' => 'dialog_tables'\n ],\n 'custom' => [\n 'title' => _L('LC__AUTH_GUI__CUSTOM_DIALOG_TABLE_CONDITION'),\n 'type' => 'custom_dialog_tables'\n ]\n ];\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function auth($data = null);", "public function __construct()\n {\n // auth here\n }", "protected function get_method_type() {\n\n\t\treturn isset( $this->response_data->expMonth ) ? 'credit_card' : 'echeck';\n\t}", "public function setAuthenticated();", "public function setDefaultPermissions()\n {\n $this->allow('guest', 'default_error');\n $this->allow('guest', 'default_uploader');\n $this->allow('guest', 'default_lang');\n $this->allow('guest', 'people_auth');\n $this->allow('guest', 'api_auth');\n $this->allow('guest', 'api_search');\n $this->allow('guest', 'api_company');\n $this->allow('guest', 'api_entidad');\n $this->allow('guest', 'frontend_index');\n $this->allow('guest', 'frontend_auth');\n $this->allow('guest', 'frontend_account');\n $this->allow('guest', 'frontend_auction');\n $this->allow('guest', 'frontend_search');\n $this->allow('guest', 'frontend_product');\n $this->allow('guest', 'frontend_page');\n /**\n * User Access Level Permissions\n */\n $this->allow('user', 'default_index');\n $this->allow('user', 'default_error');\n $this->allow('user', 'default_uploader');\n $this->allow('user', 'default_lang');\n $this->allow('user', 'people_auth');\n $this->allow('user', 'search_index');\n $this->allow('user', 'frontend_search');\n $this->allow('user', 'frontend_product');\n $this->allow('user', 'frontend_page');\n $this->allow('user', 'people_user', array(\n 'my', // View My Details Page\n 'view', // View User Details Page\n 'changepassword', // Change Password Page\n 'updateavatar', // Update Avatar Lightbox\n 'getavatar', // Get Avatar JSON Call\n 'get-addr-avatar','setavatar', // Set Avatar JSON Call\n 'removeavatar' // Remove Avatar JSON Call\n ));\n\n /* $this->allow('user', 'company_manage', array(\n 'index', // Company List Page\n 'view' // Company View Page\n ));*/\n }", "private function getAndSetAuthInfo() {\n #Authentication\n #$this->userIdentifier will be empty if the unser doesn't provide a credential\n #If in the future we implement API keys, then I suggest we only look for\n #the DN if the API key isn't presented.\n #Failure to authenticate is handled elsewhere\n if(is_null($this->userIdentifier)){\n $this->userIdentifier = Get_User_Principle_PI();\n $this->userIdentifierType = 'X509';\n }\n }", "abstract protected function isSocialUser($type);", "public function setClientAuthenticationType($val)\n {\n $this->_propDict[\"clientAuthenticationType\"] = $val;\n return $this;\n }", "public function setAuth(string $mechanism, array $options = []): void\n {\n $this->authMechanism = $mechanism;\n $this->authOptions = $options;\n }", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(\n [\n 'login',\n 'logout',\n 'register',\n 'recover'\n ]\n );\n }", "public function test_auth()\n\t{\n\t\t//$role = Role::create(['name' => 'user']);\n\t\t//$permission = Permission::create(['guard_name' => 'web', 'name' => 'edit_post']);\n\t\t//auth()->user()->givePermissionTo(\"edit.post\");\n\t\t//auth()->user()->assignRole(\"user\");\n\t\t//$role = Role::find(['name' => 'user'])->first;\n\t\t//$role->givePermissionTo('edit.post');\n\t\t\n\t\t\n\t\treturn \"test_auth\";\n\t}", "public function authorize()\n {\n return Auth::user()->type == 'admin';\n }", "abstract public function goAuth(Request $request);", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(['logout','nfsaLogin','home', 'login', 'ercmsRequest', 'index']);\n }", "abstract public function authorize();", "abstract public function authorize();", "public function run($method){\n if(Vimerito::$configuration['automaticAuthentication'] == true){ \n if(!isset($method) or $method == ''){\n $method = $this->_methods['default'];\n }else{\n $method.=\"Action\";\n } \n if(VAccessRights::authenticateUser($method)){\n VEvent::triggerEventBefore(array(\n $this->__classname,\n $method\n ), $this);\n $this->$method();\n VEvent::triggerEventAfter(array(\n $this->__classname,\n $method\n ), $this);\n }else{\n Vimerito::redirect(401, false, VAccessRights::getRedirectController());\n }\n }else{\n if(!isset($method) or $method == '')\n $method = $this->_methods['default'];\n else\n $method.=\"Action\";\n VEvent::triggerEventBefore(array(\n $this->__classname,\n $method\n ), $this);\n $this->$method(); \n VEvent::triggerEventAfter(array(\n $this->__classname,\n $method\n ), $this); \n } \n }", "public function setWWWAuthenticate(string $type, string $realm=\"\"): WwwAuthenticate\n {\n if (!in_array(\n $type,\n [\n \"Basic\",\n \"Bearer\",\n \"Digest\",\n \"HOBA\",\n \"Mutual\",\n \"Negotiate\",\n \"OAuth\",\n \"SCRAM-SHA-1\",\n \"SCRAM-SHA-256\",\n \"vapid\"\n ]\n )\n ) {\n throw new UserException(\"Invalid value for header: WWW-Authenticate\");\n }\n $authenticate = new WwwAuthenticate($type, $realm);\n $this->wwwAuthenticate = $authenticate;\n return $authenticate;\n }", "public function getSupportedAuthenticationMethods()\n {\n if (!$this->_supportedAuthMethods) {\n $this->authenticateAsNone();\n }\n return $this->_supportedAuthMethods;\n }", "public function testGettingType()\n {\n $this->assertEquals('foo', $this->principal->getType());\n }", "public function verify()\n {\n switch ($this->type) {\n default:\n case self::AUTH_BASIC:\n\n if ($authorization = input()->server('HTTP_AUTHORIZATION')) {\n $authentication = unserialize(base64_decode($authorization));\n if ($this->login($authentication[ 'username' ], $authentication[ 'password' ])) {\n return true;\n }\n } else {\n $authentication = $this->parseBasic();\n }\n\n if ($this->login($authentication[ 'username' ], $authentication[ 'password' ])) {\n\n header('Authorization: Basic ' . base64_encode(serialize($authentication)));\n\n return true;\n } else {\n unset($_SERVER[ 'PHP_AUTH_USER' ], $_SERVER[ 'PHP_AUTH_PW' ]);\n $this->protect();\n }\n\n break;\n case self::AUTH_DIGEST:\n if ($authorization = input()->server('HTTP_AUTHORIZATION')) {\n $authentication = $this->parseDigest($authorization);\n } elseif ($authorization = input()->server('PHP_AUTH_DIGEST')) {\n $authentication = $this->parseDigest($authorization);\n }\n\n if (isset($authentication) AND\n false !== ($password = $this->login($authentication[ 'username' ]))\n ) {\n $A1 = md5($authentication[ 'username' ] . ':' . $this->realm . ':' . $password);\n $A2 = md5($_SERVER[ 'REQUEST_METHOD' ] . ':' . $authentication[ 'uri' ]);\n $response = md5(\n $A1\n . ':'\n . $authentication[ 'nonce' ]\n . ':'\n . $authentication[ 'nc' ]\n . ':'\n . $authentication[ 'cnonce' ]\n . ':'\n . $authentication[ 'qop' ]\n . ':'\n . $A2\n );\n\n if ($authentication[ 'response' ] === $response) {\n header(\n sprintf(\n 'Authorization: Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", qop=%s, nc=%s, cnonce=\"%s\", response=\"%s\", opaque=\"%s\"',\n $authentication[ 'username' ],\n $this->realm,\n $authentication[ 'nonce' ],\n $authentication[ 'uri' ],\n $authentication[ 'qop' ],\n $authentication[ 'nc' ],\n $authentication[ 'cnonce' ],\n $response,\n $authentication[ 'opaque' ]\n )\n );\n\n return true;\n }\n }\n\n unset($_SERVER[ 'PHP_AUTH_DIGEST' ], $_SERVER[ 'HTTP_AUTHORIZATION' ]);\n $this->protect();\n\n break;\n }\n\n return false;\n }", "public function getAuthTokenType()\n {\n return $this->authTokenType;\n }", "function authenticated() {\n switch (getConfig(\"auth_method\")) {\n case PASSWORD:\n // Static shared password authentication.\n requirePOST(\"pwd\");\n return password_verify($_POST[\"pwd\"], getConfig(\"password_hash\"));\n\n case HTPASSWD:\n // .htpasswd file based authentication.\n global $LANG;\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (file_exists(getConfig(\"htpasswd_path\"))) {\n $file = fopen(getConfig(\"htpasswd_path\"), \"r\");\n $authed = false;\n while (($line = fgets($file)) !== false && !$authed) {\n $creds = explode(\":\", trim($line));\n if ($creds[0] == $_POST[\"usr\"]) {\n $authed = password_verify($_POST[\"pwd\"], $creds[1]);\n }\n }\n fclose($file);\n return $authed;\n }\n\n case LDAP:\n // LDAP-based authentication.\n global $LANG;\n if (!extension_loaded(\"ldap\")) die($LANG[\"ldap_extension_missing\"]);\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (strlen($_POST[\"pwd\"]) == 0) die($LANG[\"incorrect_password\"]);\n\n // Connect to the LDAP server.\n $ldc = @ldap_connect(getConfig(\"ldap_uri\"));\n if ($ldc === false) die($LANG[\"ldap_config_error\"]);\n ldap_set_option($ldc, LDAP_OPT_PROTOCOL_VERSION, 3);\n ldap_set_option($ldc, LDAP_OPT_REFERRALS, 0);\n if (getConfig(\"ldap_start_tls\")) ldap_start_tls($ldc);\n\n // Bind the admin user.\n $ldbind = @ldap_bind($ldc, getConfig(\"ldap_bind_dn\"), getConfig(\"ldap_bind_pass\"));\n if ($ldbind === false) die($LANG[\"ldap_connection_failed\"]);\n\n // Search for the user.\n $ldsearch = @ldap_search($ldc, getConfig(\"ldap_base_dn\"), str_replace(\"%s\", ldap_escape($_POST[\"usr\"]), getConfig(\"ldap_user_filter\")), array(\"dn\"));\n if ($ldsearch === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_failed\"]);\n };\n $ldentries = @ldap_get_entries($ldc, $ldsearch);\n if ($ldentries[\"count\"] == 0) {\n // No users matched; throw a generic \"incorrect password\"\n // message anyway to prevent user enumeration issues.\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n } elseif ($ldentries[\"count\"] > 1) {\n // Filter matched multiple users; most likely a misconfiguration\n // of the filter.\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_ambiguous\"]);\n }\n\n // Bind as the user.\n $ldbind = @ldap_bind($ldc, $ldentries[0][\"dn\"], $_POST[\"pwd\"]);\n if ($ldbind === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n }\n\n // Successful authentication and authorization.\n ldap_unbind($ldc);\n return true;\n\n default:\n return false;\n }\n}", "public function authenticate($request);", "private function init_plugin($authtype) {\n $this->pluginconfig = 'auth_'.$authtype;\n $this->config = get_config($this->pluginconfig);\n if (empty($this->config->ldapencoding)) {\n $this->config->ldapencoding = 'utf-8';\n }\n if (empty($this->config->user_type)) {\n $this->config->user_type = 'default';\n }\n\n $ldap_usertypes = ldap_supported_usertypes();\n $this->config->user_type_name = $ldap_usertypes[$this->config->user_type];\n unset($ldap_usertypes);\n\n $default = ldap_getdefaults();\n\n // Use defaults if values not given.\n foreach ($default as $key => $value) {\n // Watch out - 0, false are correct values too.\n if (!isset($this->config->{$key}) or $this->config->{$key} == '') {\n $this->config->{$key} = $value[$this->config->user_type];\n }\n }\n\n // Hack prefix to objectclass.\n $this->config->objectclass = ldap_normalise_objectclass($this->config->objectclass);\n }", "public function Auth(){\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }", "public function postLogIn(Request $request)\n {\n $auth_type = $request['auth_type'];\n switch ($auth_type){\n case 1:\n $this->\nvalidate($request,[\n 'phone' => 'required',\n 'password' => 'required|min:4'\n ]); \n $phone = $request['phone'];\n $password = $request['password'];\n if (Auth::attempt(['phone' => $phone, 'password' => $password])){\n return redirect()->intended('/');\n };\n case 2:\n $this->validate($request,[\n 'email' => 'required',\n 'password' => 'required|min:4'\n ]); \n $email = $request['email'];\n $password = $request['password'];\n if (Auth::attempt(['email' => $email, 'password' => $password])){\n return redirect()->intended('/');\n };\n case 3:\n $this->validate($request,[\n 'card_serie' => 'required',\n 'card_number' => 'required',\n 'password' => 'required|min:4'\n ]); \n $card_serie = $request['card_serie'];\n $card_number = $request['card_number'];\n $password = $request['password'];\n\n /*GET THE CARD ID*/\n $card = DB::table('activated_cards')\n ->where('serie',$card_serie)\n ->where('num',$card_number)\n ->first();\n /**/\n if (Auth::attempt(['card_id' => $card->id, 'password' => $password])){\n return redirect()->intended('/');\n };\n\n }\n }", "public static function setMethod($val) \n { \n emailSettings::$method = $val; \n }" ]
[ "0.67937845", "0.67937845", "0.6751413", "0.64627504", "0.6237156", "0.6135115", "0.61311436", "0.6075073", "0.6052783", "0.5931882", "0.577759", "0.573098", "0.57279503", "0.571286", "0.56499", "0.5610476", "0.56008196", "0.55722994", "0.55034995", "0.54790825", "0.5440763", "0.5429138", "0.5425747", "0.5362243", "0.5352845", "0.5348958", "0.5338796", "0.53265256", "0.53012574", "0.5295182", "0.5293744", "0.52857155", "0.5275859", "0.52701545", "0.5265741", "0.52522385", "0.52369535", "0.5232797", "0.5223007", "0.5204152", "0.5192577", "0.51855487", "0.5180992", "0.5177704", "0.51763284", "0.51649326", "0.5144032", "0.5142965", "0.5139711", "0.51288885", "0.5110078", "0.5109044", "0.5106679", "0.51066273", "0.51066196", "0.5104553", "0.5102482", "0.5094265", "0.5085305", "0.50813335", "0.5077492", "0.5068111", "0.5065394", "0.50623584", "0.5041247", "0.5041247", "0.5041247", "0.5035973", "0.5018286", "0.50119305", "0.5011281", "0.5009291", "0.49995056", "0.4981159", "0.49785042", "0.49770308", "0.4974898", "0.49727812", "0.4969517", "0.49692327", "0.49670976", "0.49563792", "0.49500993", "0.4945986", "0.49406388", "0.49266613", "0.49266613", "0.49233738", "0.4919487", "0.49149847", "0.49127284", "0.4907641", "0.4898148", "0.48971716", "0.48934683", "0.48889977", "0.48863694", "0.4884639", "0.4879429", "0.4879053", "0.48763102" ]
0.0
-1
Determine and use credentials if user has set them.
protected function useAssertCredentials($userEmail = '') { $serviceJsonUrl = array_get($this->config, 'service.file', ''); if (empty($serviceJsonUrl)) { return false; } try { $this->client->setAuthConfig($serviceJsonUrl); } catch (\Google_Exception $e) { } if (!empty($userEmail)) { $this->client->setSubject($userEmail); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function credentials();", "public function checkCredentials()\n\t{\n\t\t$user = $this->_getLoggedUser();\n\t\tif (null === $user) {\n\t\t\t$_SESSION['url'] = $_SERVER['REQUEST_URI'];\n\t\t\t$this->redirectTo();\n\t\t}\n\t\treturn $user;\n\t}", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "private function authCredUser(){\n\t\t\n\t\t// UC 3 1: User wants to authenticate with saved credentials\n\t\t\t// - System authenticates the user and presents that the authentication succeeded and that it happened with saved credentials\n\t\t$inpName = $this->view->getInputName(true);\t\n\t\t$inpPass = $this->view->getInputPassword(true);\n\n\t\t$answer = $this->model->loginCredentialsUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\n\t\tif($answer == null){\n\t\t\t$this->view->showLogin(false);\n\t\t\t\n\t\t} else if($answer == true){\t\t\n\t\t\t$this->view->storeMessage(\"Inloggning lyckades via cookies\");\n\t\t\treturn $this->view->showLogin(true);\n\t\t} else {\t\t\n\t\t\t// 2a. The user could not be authenticated (too old credentials > 30 days) (Wrong credentials) Manipulated credentials.\n\t\t\t\t// 1. System presents error message\n\t\t\t\t// Step 2 in UC 1\t\t\t\t\n\t\t\t$this->view->removeCredentials();\n\t\t\t$this->view->storeMessage(\"Felaktig eller föråldrad information i cookie\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "protected function loginIfRequested() {}", "protected function loadApplicationCredentials() {\n\t\t$appCredentials = AppConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::APP_CREDENTIALS_REQUIRED);\n\t\tif($this->isValidCredentialsConfig($appCredentials,self::APP_CREDENTIALS_REQUIRED)) {\n\t\t\t$this->assignCredentials($appCredentials);\n\t\t}\n\t}", "abstract public function getCredentials();", "public function canManageCredentials()\n {\n return true;\n }", "public function authenticate(){\n $user = $_SERVER['PHP_AUTH_USER'];\n $pass = $_SERVER['PHP_AUTH_PW'];\n\n if(!empty($user) && $this->api_config['allowed_users'][$user] === $pass){\n return True;\n }\n return False;\n }", "private function getAndSetAuthInfo() {\n #Authentication\n #$this->userIdentifier will be empty if the unser doesn't provide a credential\n #If in the future we implement API keys, then I suggest we only look for\n #the DN if the API key isn't presented.\n #Failure to authenticate is handled elsewhere\n if(is_null($this->userIdentifier)){\n $this->userIdentifier = Get_User_Principle_PI();\n $this->userIdentifierType = 'X509';\n }\n }", "public function use_authentication()\n {\n }", "private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabilities', false);\n foreach ($meta[0] as $key => $value) {\n $k = strtoupper($key);\n if (($k == $this->PluginRole) or\n ($k == $this->AdminRole)) {\n $this->isAuthenticated = true;\n }\n }\n }\n }", "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "function test_authourization_fun( $vars ){\r\n\r\n if (isset($_GET['user']) && $_GET['user']){\r\n $_SERVER[\"PHP_AUTH_USER\"] = $_GET['user'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_USER\"] = 'NOUSER';\r\n }\r\n if (isset($_GET['pw']) && $_GET['pw']){\r\n $_SERVER[\"PHP_AUTH_PW\"] = $_GET['pw'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_PW\"] = 'ERRORPASSWORD';\r\n }\r\n}", "private static function has_credentials() {\r\n\t\t\t$credentials = self::get_credentials();\r\n\r\n\t\t\treturn is_array($credentials)\r\n\t\t\t\t\t&& isset($credentials['api-key'])\r\n\t\t\t\t\t&& isset($credentials['email'])\r\n\t\t\t\t\t&& isset($credentials['id'])\r\n\t\t\t\t\t&& !empty($credentials['api-key'])\r\n\t\t\t\t\t&& !empty($credentials['email'])\r\n\t\t\t\t\t&& !empty($credentials['id']);\r\n\t\t}", "private function assign_auth_values(){\n\t\t$is_authenticated = AuthManager::is_authenticated();\n\t\t$this->assign('batl_is_logged', $is_authenticated);\n\t\tif($is_authenticated && $this->is_db_available()){\n\t\t\t// check if logged in local server\n\t\t\t$this->assign('batl_is_admin', AuthManager::is_current_user_admin());\n\t\t\t$this->assign('batl_current_user', AuthManager::get_user_infos());\n\n\t\t}else{\n\t\t\t// check if logged in on FB\n\t\t\t/*$facebook_manager = new FacebookService();\n\t\t\t$batl_current_user = AuthManager::get_user_profile($facebook_manager);\n\t\t\t$this->assign('batl_current_user', $batl_current_user);\n\t\t\t$this->assign('fbloginouturl', AuthManager::get_loginout_url($facebook_manager,$batl_current_user));*/\n\t\t}\n\t}", "protected function loadModuleCredentials() {\n\t\t$moduleCredentials = ModuleConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::MODULE_CREDENTIALS_REQUIRED);\n\t\tif(is_array($moduleCredentials)) {\n\t\t\t$this->assignCredentials($moduleCredentials);\n\t\t}\t\t\n\t}", "public function setSandboxUserCredentials()\n {\n $userCredentials = $this->getClass('UserCredentials');\n\n $userCredentials->setUsername( 'Siteowner' );\n $userCredentials->setPassword( 'apitest1234' );\n $userCredentials->setSiteIDs( array(-99) );\n\n $this->userCredentials = $userCredentials;\n }", "public function use_authentication() {\n return $this->proxy_user && $this->proxy_pass;\n }", "private function ensureAuthed()\n\t{\n\t\t$auth = AuthBackend::getInstance();\n\t\tif (!($this->username = $auth->getCurrentUser()))\n\t\t{\n\t\t\tthrow new Exception('you are not logged in', E_PERM_DENIED);\n\t\t}\n\t\treturn $auth;\n\t}", "function canDisplayCredentials()\n\t{\n\t\treturn env('SHOW_CREDENTIALS','false') == 'true';\n\t}", "public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }", "private function authenticate()\n {\n $this->_validator->setCredentials($this->_user, $this->_pass);\n if ($this->_validator->authenticate()) {\n $this->_accepted = true;\n }\n }", "public function shouldAllowCredentials(): bool {\n return $this->configuration['allow_credentials'];\n }", "protected function _initAuth()\n {\n $dm = Registry::getInstance()->get('dm');\n $user = $dm->getRepository('Domain\\User\\Entity\\User')->find('4de999713eecad69a02e4145');\n \n // Simulate logged in User.\n Registry::getInstance()->set('user', $user);\n }", "public static function checkCredentials()\n {\n if (null === self::username() || null === self::password()) {\n echo self::errorMessage();\n die(1);\n }\n\n return true;\n }", "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "abstract protected function auth();", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "private function compare_with_login()\n {\n }", "protected function isUserAllowedToLogin() {}", "function getAuth() {\n parent::getAuth(); // load company!\n $au = $this->getAuthUser();\n if (!$au) {\n $this->jerr(\"Not authenticated\", array('authFailure' => true));\n }\n if ($au->company()->comptype != 'OWNER') {\n $this->jerr(\"Permission Denied\" );\n }\n $this->authUser = $au;\n return true;\n }", "function authenticated() {\n switch (getConfig(\"auth_method\")) {\n case PASSWORD:\n // Static shared password authentication.\n requirePOST(\"pwd\");\n return password_verify($_POST[\"pwd\"], getConfig(\"password_hash\"));\n\n case HTPASSWD:\n // .htpasswd file based authentication.\n global $LANG;\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (file_exists(getConfig(\"htpasswd_path\"))) {\n $file = fopen(getConfig(\"htpasswd_path\"), \"r\");\n $authed = false;\n while (($line = fgets($file)) !== false && !$authed) {\n $creds = explode(\":\", trim($line));\n if ($creds[0] == $_POST[\"usr\"]) {\n $authed = password_verify($_POST[\"pwd\"], $creds[1]);\n }\n }\n fclose($file);\n return $authed;\n }\n\n case LDAP:\n // LDAP-based authentication.\n global $LANG;\n if (!extension_loaded(\"ldap\")) die($LANG[\"ldap_extension_missing\"]);\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (strlen($_POST[\"pwd\"]) == 0) die($LANG[\"incorrect_password\"]);\n\n // Connect to the LDAP server.\n $ldc = @ldap_connect(getConfig(\"ldap_uri\"));\n if ($ldc === false) die($LANG[\"ldap_config_error\"]);\n ldap_set_option($ldc, LDAP_OPT_PROTOCOL_VERSION, 3);\n ldap_set_option($ldc, LDAP_OPT_REFERRALS, 0);\n if (getConfig(\"ldap_start_tls\")) ldap_start_tls($ldc);\n\n // Bind the admin user.\n $ldbind = @ldap_bind($ldc, getConfig(\"ldap_bind_dn\"), getConfig(\"ldap_bind_pass\"));\n if ($ldbind === false) die($LANG[\"ldap_connection_failed\"]);\n\n // Search for the user.\n $ldsearch = @ldap_search($ldc, getConfig(\"ldap_base_dn\"), str_replace(\"%s\", ldap_escape($_POST[\"usr\"]), getConfig(\"ldap_user_filter\")), array(\"dn\"));\n if ($ldsearch === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_failed\"]);\n };\n $ldentries = @ldap_get_entries($ldc, $ldsearch);\n if ($ldentries[\"count\"] == 0) {\n // No users matched; throw a generic \"incorrect password\"\n // message anyway to prevent user enumeration issues.\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n } elseif ($ldentries[\"count\"] > 1) {\n // Filter matched multiple users; most likely a misconfiguration\n // of the filter.\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_ambiguous\"]);\n }\n\n // Bind as the user.\n $ldbind = @ldap_bind($ldc, $ldentries[0][\"dn\"], $_POST[\"pwd\"]);\n if ($ldbind === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n }\n\n // Successful authentication and authorization.\n ldap_unbind($ldc);\n return true;\n\n default:\n return false;\n }\n}", "public function setAuthenticated();", "public function authenticate()\n\t{\n\n\t\t$username = strtolower($this->username);\n\t\t/** @var $user User */\n\t\t$user = User::model()->with('roles')->find('LOWER(use_username)=?', array($username));\n\t\tif ($user === null) {\n\t\t\t$this->errorCode = self::ERROR_USERNAME_INVALID;\n\t\t} else {\n\t\t\tif (!$user->validatePassword($this->password)) {\n\t\t\t\t$this->errorCode = self::ERROR_PASSWORD_INVALID;\n\t\t\t} else {\n\t\t\t\t$this->_id = $user->use_id;\n\t\t\t\t$this->username = $user->use_fname;\n\t\t\t\t$this->_branchId = $user->use_branch;\n\t\t\t\t$this->_scope = $user->use_scope;\n\t\t\t\t$this->_roles = $user->roles;\n\n\t\t\t\t$this->userData = serialize($user);\n\n\t\t\t\tYii::app()->user->setState(\"fullname\", $user->getFullName());\n\n\t\t\t\t$this->errorCode = self::ERROR_NONE;\n\t\t\t\t$this->loadSessionForOldLogin($user);\n\t\t\t}\n\t\t}\n\t\tLoginLog::model()->log($this, $user);\n\t\treturn $this->errorCode == self::ERROR_NONE;\n\t}", "public function read_credentials() {\n\t\t$user = ! empty( $_POST['connection']['kt_user'] ) ? sanitize_text_field( $_POST['connection']['kt_user'] ) : '';\n\t\t$password = ! empty( $_POST['connection']['kt_password'] ) ? sanitize_text_field( $_POST['connection']['kt_password'] ) : '';\n\n\t\tif ( empty( $user ) || empty( $password ) ) {\n\t\t\treturn $this->error( __( 'Email and password are required', 'thrive-dash' ) );\n\t\t}\n\n\t\t$this->set_credentials( array(\n\t\t\t'user' => $user,\n\t\t\t'password' => $password,\n\t\t) );\n\n\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t$api = $this->get_api();\n\n\t\ttry {\n\t\t\t$api->login();\n\n\t\t\t$result = $this->test_connection();\n\n\t\t\tif ( $result !== true ) {\n\t\t\t\treturn $this->error( sprintf( __( 'Could not connect to Klick Tipp using the provided data: %s', 'thrive-dash' ), $this->_error ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * finally, save the connection details\n\t\t\t */\n\t\t\t$this->save();\n\n\t\t\treturn $this->success( __( 'Klick Tipp connected successfully!', 'thrive-dash' ) );\n\n\t\t} catch ( Thrive_Dash_Api_KlickTipp_Exception $e ) {\n\t\t\treturn $this->error( sprintf( __( 'Could not connect to Klick Tipp using the provided data (%s)', 'thrive-dash' ), $e->getMessage() ) );\n\t\t}\n\t}", "protected function _secure()\n {\n // user already logged in?\n if($this->current_user && $this->current_user->user_id) \n {\n return;\n }\n \n $this->_current_user();\n \n if(!$this->current_user || !$this->current_user->user_id)\n {\n redirect('user');\n }\n // user is logged in \n //$this->current_user_role = $this->current_user->role ;\n \n \n }", "private function check_stored_login() {\n if(isset($_SESSION['admin_id'])) {\n $this->admin_id = $_SESSION['admin_id'];\n $this->username = $_SESSION['username'];\n $this->user_level = $_SESSION['user_level'];\n $this->last_login = $_SESSION['last_login'];\n }\n }", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "private function _getAuth()\n {\n if (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Sorry this action is not allowed for you';\n return false;\n } else {\n \n if ($_SERVER['PHP_AUTH_USER'] == 'testUser' && $_SERVER['PHP_AUTH_PW'] == 'testPassword') {\n return true;\n }\n \n return false;\n \n }\n }", "private function auth() {\n // If the user has previously been authenticated\n if(isset($_SESSION['adminUsername']) && isset($_SESSION['adminPassword'])) {\n $this->admin->username = $_SESSION['adminUsername'];\n $this->admin->password = $_SESSION['adminPassword'];\n $auth = $this->admin->get(1);\n\n if($this->admin->password == $auth['password']) {\n $logged = true;\n }\n }\n // If the user has long term login enabled\n elseif(isset($_COOKIE['adminUsername']) && isset($_COOKIE['adminToken'])) {\n $this->admin->username = $_COOKIE['adminUsername'];\n $this->admin->rememberToken = $_COOKIE['adminToken'];\n $auth = $this->admin->get(2);\n\n if($this->admin->rememberToken == $auth['remember_token'] && !empty($auth['remember_token'])) {\n $_SESSION['adminUsername'] = $this->admin->username;\n $this->setPassword($auth['password']);\n $logged = true;\n }\n }\n // If the user is authenticating\n else {\n $auth = $this->admin->get(0);\n\n // Set the sessions\n $_SESSION['adminUsername'] = $this->admin->username;\n $this->setPassword($this->admin->password);\n\n if(password_verify($this->admin->password, $auth['password'])) {\n if($this->admin->rememberToken) {\n $this->admin->renewToken();\n }\n session_regenerate_id();\n $logged = true;\n }\n }\n\n if(isset($logged)) {\n $_SESSION['isAdmin'] = true;\n return $auth;\n }\n\n return false;\n }", "protected function getCredentials()\n {\n $user = $this->options[\"USER\"];\n $password = $this->options[\"PASS\"];\n // 1BIS : encoded?\n if ($user == \"\" && isSet($this->options[\"ENCODED_CREDENTIALS\"])) {\n list($user,$password) = AJXP_Safe::getCredentialsFromEncodedString($this->options[\"ENCODED_CREDENTIALS\"]);\n }\n // 2. Try from session\n if ($user==\"\" && isSet($this->options[\"USE_SESSION_CREDENTIALS\"]) ) {\n $safeCred = AJXP_Safe::loadCredentials();\n if ($safeCred !== false) {\n $user = $safeCred[\"user\"];\n $password = $safeCred[\"password\"];\n } else {\n throw new Exception(\"Session credential are empty! Did you forget to check the Set Session Credential in the Authentication configuration panel?\");\n }\n }\n return array($user, $password);\n }", "public function getCredential();", "public function getServerCredentials()\n {\n if ($connections = $this->command->option('on')) {\n $this->connections->setActiveConnections($connections);\n }\n\n // Check for configured connections\n $availableConnections = $this->connections->getAvailableConnections();\n $activeConnections = $this->connections->getActiveConnections();\n\n // If we didn't set any connection, ask for them\n if (!$activeConnections->count() && empty($availableConnections)) {\n $connectionName = $this->ask('askWith', 'No connections have been set, please create one', 'production');\n $this->getConnectionCredentials($connectionName);\n\n return;\n } elseif (!$activeConnections->count()) {\n $available = array_keys($availableConnections);\n $connection = $this->ask('askWith', 'No default connection, pick one', head($available), $available);\n $this->connections->setActiveConnections($connection);\n }\n\n // Else loop through the connections and fill in credentials\n foreach ($activeConnections as $connection) {\n $connectionName = $connection->getConnectionKey()->name;\n\n $servers = Arr::get($availableConnections, $connectionName.'.servers');\n $servers = array_keys($servers);\n foreach ($servers as $server) {\n $this->getConnectionCredentials($connectionName, $server);\n }\n }\n }", "function authenticate() {}", "public function setCredentials($b64_user=\"\")\n\t{\t\n\t\t// It is possible to retrieve information form any user specified in here.\n\t\t// If no user is specified, the system will take the current one.\n\t\tif (empty($b64_user))\n\t\t{\n\t\t\tif (isset($_SESSION[\"USER\"]))\n\t\t\t{\n\t\t\t\t$this->curlObj->set_credentials($_SESSION[\"USER\"]);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->curlObj->set_credentials($b64_user);\n\t\t}\n\t}", "public function _setRawCredentials()\n\t{\n\t\t/* Check if an API Key or Access Token has been passed as a parameter in the query string. Because of the\n\t\t\tobvious security issues with this, we do not recommend it, but sometimes it is the only choice */\n\t\tif ( isset( \\IPS\\Request::i()->key ) )\n\t\t{\n\t\t\t$this->rawApiKey = \\IPS\\Request::i()->key;\n\t\t\treturn;\n\t\t}\n\t\tif ( isset( \\IPS\\Request::i()->access_token ) and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t{\n\t\t\t$this->rawAccessToken = \\IPS\\Request::i()->access_token;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Look for an API key in an automatically decoded HTTP Basic header */\n\t\tif ( isset( $_SERVER['PHP_AUTH_USER'] ) )\n\t\t{\n\t\t\t$this->rawApiKey = $_SERVER['PHP_AUTH_USER'];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* If we're still here, try to find an Authorization header - start with $_SERVER... */\n\t\t$authorizationHeader = NULL;\n\t\tforeach ( $_SERVER as $k => $v )\n\t\t{\n\t\t\tif ( mb_substr( $k, -18 ) == 'HTTP_AUTHORIZATION' )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* ...if we didn't find anything there, try apache_request_headers() */\n\t\tif ( !$authorizationHeader and \\function_exists('apache_request_headers') )\n\t\t{\n\t\t\t$headers = @apache_request_headers();\n\t\t\tif ( isset( $headers['Authorization'] ) )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $headers['Authorization'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* If we managed to get one, set if it's an API Key or an Access Token */\n\t\tif ( $authorizationHeader )\n\t\t{\n\t\t\tif ( mb_substr( $authorizationHeader, 0, 7 ) === 'Bearer ' and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t\t{\n\t\t\t\t$this->rawAccessToken = mb_substr( $authorizationHeader, 7 );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$exploded = explode( ':', base64_decode( mb_substr( $authorizationHeader, 6 ) ) );\n\t\t\t\tif ( isset( $exploded[0] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->rawApiKey = $exploded[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function checkAuthentication() {}", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "public function authenticate(){\n\t\t// also return typeOfUser???\n\n\t\t// if user is logged\n\t\tif($this->model->isUserLogged($this->view->getServerInfo())){\n\t\t\t\n\t\t\t/* Use Case 2 Logging out an authenticated user */\n\t\t\treturn $this->logoutUser();\n\t\t\t\n\t\t// if user wants to register\n\t\t} else if($this->view->userGoRegister()){\n\t\t\t\n\t\t\treturn $this->view->showRegisterPage();\n\t\t\n\t\t// if user tries to save new credentials\n\t\t} else if($this->view->userTryRegister()){\n\t\n\t\t\treturn $this->doRegister();\n\t\n\t\t// if user is out logged and...\n\t\t} else {\n\t\t\t\n\t\t\t// ...has stored credentials\n\t\t\tif($this->view->hasStoredCredentials()){\n\t\t\t\t\n\t\t\t\t/* Use Case 3 Authentication with saved credentials */\n\t\t\t\treturn $this->authCredUser();\n\t\t\t\t\n\t\t\t// ...does not have stored credentials\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/* Use Case 1 Authenticate user */\n\t\t\t\treturn $this->authUser();\n\t\t\t}\n\t\t}\n\t}", "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}", "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }", "private function _allowCredentials(): string\n {\n return ($this->config['AllowCredentials']) ? 'true' : 'false';\n }", "public function getCredentials(): ?object;", "public function read_credentials(){\n $query='SELECT * FROM '.$this->table.' WHERE name=? and password=?';\n\n $stmt = $this->conn->prepare($query);\n\n \n $stmt->bindparam(1,$this->name);\n $stmt->bindparam(2,$this->password);\n\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->name=$row['name'];\n $this->email=$row['email'];\n $this->status=$row['status'];\n\n if($stmt->execute()) {\n return true;\n }\n \n // Print error \n printf(\"Error: %s.\\n\", \"invalid user\");\n \n return false;\n \n \n }", "function verify_credentials($user, $pwd) {\n global $db;\n\n // query for admin users first\n $query = \"SELECT * FROM admin\n WHERE admin_user = :user\n AND admin_password = :pwd\";\n\n $statement = $db->prepare($query);\n $statement->bindValue(':user', $user);\n $statement->bindValue(':pwd', $pwd);\n $statement->execute();\n\n $result = $statement->fetch();\n\n $retval = $statement->closeCursor();\n\n if (isset($result['admin_user'])) {\n if (isset($result['admin_name'])) setcookie('name', $result['admin_name'], time() + 3600);\n $_SESSION['admin'] = true;\n $_SESSION['id'] = $result['admin_id'];\n return $retval;\n }\n\n // if no admin found, query for players\n $query = \"SELECT * FROM player\n WHERE player_user = :user\n AND player_password = :pwd\";\n\n $statement = $db->prepare($query);\n $statement->bindValue(':user', $user);\n $statement->bindValue(':pwd', $pwd);\n $statement->execute();\n\n $result = $statement->fetch();\n\n $retval = $statement->closeCursor();\n\n if (isset($result['player_user']) > 0) {\n if (isset($result['player_name'])) setcookie('name', $result['player_name'], time() + 3600);\n $_SESSION['id'] = $result['player_id'];\n return $retval;\n } else {\n return false;\n }\n }", "public function doAuthentication();", "private function authenticate() {\n\t\t//we do not need a session, so we don't need to have unnused db-entries in session db\n\t\tsession_destroy();\n\n\t\t$token = FormUtil::getPassedValue('token', null, 'GETPOST');\n\t\t$addr = $_SERVER['REMOTE_ADDR'];\n\n\t\tif($token == $this->getVar('Authtoken') && $this->getVar('Authtoken') != null && ($addr == $this->getVar('AllowedHost') || $this->getVar('AllowedHost') == '*')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\techo 'You are a hacker, right?';\n\t\t\texit();\n\t\t}\n\t}", "public function getCredential ()\n\t{\n\t\t$retVal = null;\n\t\tif ($this->isConsole()) {\n\t\t\t$retVal = MO_CONSOLE_CREDENTIAL;\n\t\t} elseif(!defined('MO_IS_CONSOLE')) {\n\t\t\t$retVal = parent::getCredential();\n\t\t}\n\t\treturn $retVal;\n\t}", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "public function wrapAuthenticate()\n {\n $username = (getenv('WRAP_USERID') == '') ? getenv('REDIRECT_WRAP_USERID') : getenv('WRAP_USERID');\n\n if ($username == '') {\n $username = getenv('REDIRECT_WRAP_USERID');\n }\n\n if ($username == '') {\n setrawcookie('WRAP_REFERER', $this->_getUrl(), 0, '/', '.ncsu.edu');\n header('location:https://webauth.ncsu.edu/wrap-bin/was16.cgi');\n die();\n }\n\n // Create new users automatically, if configured\n $user = get_userdatabylogin($username);\n if (!$user) {\n if (isset($this->_options['autoCreateUser']) && (bool)$this->_options['autoCreateUser']) {\n $user = $this->_createUser($username);\n }\n else {\n die(\"User $username does not exist in the WordPress database\");\n }\n }\n\n return $user;\n }", "public function init()\n {\n if (!$_SESSION[$this->cookie_prefix . '_user']) {\n $email = '';\n $password = '';\n \n if ($_COOKIE[$this->cookie_prefix . '_email'] and $_COOKIE[$this->cookie_prefix . '_password']) {\n $email = $_COOKIE[$this->cookie_prefix . '_email'];\n $password = $_COOKIE[$this->cookie_prefix . '_password'];\n } elseif ($_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']) { //check for basic authentication\n $email = $_SERVER['PHP_AUTH_USER'];\n $password = md5($this->secret_phrase . $_SERVER['PHP_AUTH_PW']);\n }/* elseif ($_GET['auth_user'] and $_GET['auth_pw']) {\n $email = $_GET['auth_user'];\n $password = md5($this->secret_phrase . $_GET['auth_pw']);\n }*/\n \n if ($email and $password and table_exists($this->table)) {\n $result = sql_query('SELECT * FROM ' . $this->table . \" WHERE\n \t\t\t\temail='\" . escape($email) . \"'\n \t\t\t\", 1);\n \n if ($result && $password == md5($this->secret_phrase . $result['password'])) {\n $_SESSION[$this->cookie_prefix . '_email'] = $result['email'];\n $_SESSION[$this->cookie_prefix . '_password'] = $result['password'];\n }\n }\n }\n\n //check if logged in\n if ($_SESSION[$this->cookie_prefix . '_user'] and time() < $_SESSION[$this->cookie_prefix . '_expires']) {\n $this->user = $_SESSION[$this->cookie_prefix . '_user'];\n } elseif ($_SESSION[$this->cookie_prefix . '_email'] and $_SESSION[$this->cookie_prefix . '_password'] and table_exists($this->table)) {\n $this->load();\n }\n\n if ($_GET['u']) {\n $_SESSION['request'] = $_GET['u'];\n }\n }", "function checkAuth() {\n\tglobal $conf;\n\t\n}", "static function setupUser()\n {\n global $sugar_config;\n require_once 'modules/Users/User.php';\n $_SESSION['unique_key'] = $sugar_config['unique_key'];\n $user_id = $GLOBALS['db']->getOne(\"SELECT id FROM users WHERE user_name='{$GLOBALS['bob_config']['global']['admin_user_name']}' AND is_admin=1\");\n if(empty($user_id)) {\n throw new Exception(\"Can't find user \".$GLOBALS['bob_config']['global']['admin_user_name'], 1);\n }\n $_SESSION['authenticated_user_id'] = $user_id;\n $GLOBALS['current_user'] = new User();\n $GLOBALS['current_user'] = $GLOBALS['current_user']->retrieve($user_id); \n }", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "public function retrieveAuthCredentials()\n\t{\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\n\t\t$username = $password = NULL;\n\t\t\n\t\t// mod_php\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \n\t\t{\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\n\t\t}\n\n\t\t// most other servers\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\n\t\t{\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\n\t\t\t{\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check them - if they're null a/o empty, they're invalid.\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\n\t\t\treturn FALSE;\n\t\telse\n\t\t\treturn array('username' => $username, 'password' => $password);\n\t}", "function _readUserData($handle, $passwd = '')\n {\n if (isset($this->authTableCols['required']['passwd'])\n && $this->authTableCols['required']['passwd']\n ) {\n if (!isset($_SESSION[$this->authTableCols['required']['passwd']['name']]) ||\n $_SESSION[$this->authTableCols['required']['passwd']['name']] !== $passwd\n ) {\n return false;\n }\n }\n\n $this->handle = $handle;\n $this->passwd = $passwd;\n $this->isActive = true;\n $this->lastLogin = time();\n\n return true;\n }", "abstract protected function getUser();", "function PMA_auth_set_user()\n {\n global $cfgServers, $server, $cfgServer;\n global $PHP_AUTH_USER, $PHP_AUTH_PW;\n global $from_cookie;\n\n // Ensures the valid 'only_db' setting is used\n if ($cfgServer['user'] != $PHP_AUTH_USER) {\n $servers_cnt = count($cfgServers);\n for ($i = 1; $i <= $servers_cnt; $i++) {\n if (isset($cfgServers[$i])\n && ($cfgServers[$i]['host'] == $cfgServer['host'] && $cfgServers[$i]['user'] == $PHP_AUTH_USER)) {\n $server = $i;\n $cfgServer = $cfgServers[$i];\n break;\n }\n } // end for\n } // end if\n\n $cfgServer['user'] = $PHP_AUTH_USER;\n $cfgServer['password'] = $PHP_AUTH_PW;\n\n // Set cookies if required (once per session)\n if (!$from_cookie) {\n // Duration = one month for username\n setcookie('pma_cookie_username',\n $cfgServer['user'],\n time() + (60 * 60 * 24 * 30),\n $GLOBALS['cookie_path'], '' ,\n $GLOBALS['is_https']);\n // Duration = till the browser is closed for password\n setcookie('pma_cookie_password',\n $cfgServer['password'],\n 0,\n $GLOBALS['cookie_path'], '',\n $GLOBALS['is_https']);\n } // end if\n\n return TRUE;\n }", "function authenticationNeeded()\n {\n\n // define all the global variables\n global $user;\n\n // check if user has 2-factor authentication enabled\n if (!$user->twoFactorEnabled()) {\n return false;\n }\n\n // check if secret key has been setup\n if ($user->get2FactorCode() == \"\") {\n return false;\n }\n\n // check if current session has been authenticated\n if (isset($_SESSION[\"authenticated\"])) {\n if ($_SESSION[\"authenticated\"] == true) {\n return false;\n }\n }\n\n // if no errors then ask for authentication\n return true;\n }", "private function _userAutehntication()\r\n {\r\n /* Check if the USERNAME and PASSWORD HTTP headers is set*/\r\n if(!(isset($_SERVER['HTTP_X_'.self::POSTAPI_KEY.'_USERNAME']) and isset($_SERVER['HTTP_X_'.self::POSTAPI_KEY.'_PASSWORD']))) {\r\n /* Error: Unauthorized User */\r\n $this->_sendResponse(401);\r\n }\r\n $username = $_SERVER['HTTP_X_'.self::POSTAPI_KEY.'_USERNAME'];\r\n $password = $_SERVER['HTTP_X_'.self::POSTAPI_KEY.'_PASSWORD']; \r\n \r\n /* Find the user */\r\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\r\n if($user===null) {\r\n /* Error: Unauthorized User, username doesn't exist */\r\n $this->_sendResponse(401, 'Error: Not a valid User');\r\n } else if(!$user->validatePassword($password)) {\r\n /* Error: Unauthorized User, Wrong Password */\r\n $this->_sendResponse(401, 'Error: Password is Wrong');\r\n }\r\n }", "public function getCredentials()\n { return $this->get('credentials'); }", "function wpcr_stc_get_credentials($force_check = false) {\n\t// cache the results in the session so we don't do this over and over\n\tif (!$force_check && $_SESSION['wpcr_stc_credentials']) return $_SESSION['wpcr_stc_credentials'];\n\n\t$_SESSION['wpcr_stc_credentials'] = wpcr_stc_do_request('http://twitter.com/account/verify_credentials');\n\n\treturn $_SESSION['wpcr_stc_credentials'];\n}", "function tp_get_credentials($force_check = false) {\r\n\r\n\tif(!$force_check && !$_SESSION['tw-connected']) return false;\r\n\r\n\t// cache the results in the session so we don't do this over and over\r\n\tif (!$force_check && isset($_SESSION['tp_credentials']) && $_SESSION['tp_credentials'] ) return $_SESSION['tp_credentials'];\r\n\r\n\t$_SESSION['tp_credentials'] = tp_do_request('account/verify_credentials');\r\n\r\n\treturn $_SESSION['tp_credentials'];\r\n}", "public function authenticate() {\n $user = SysAdminUser::model()->find('LOWER(account)=?', array(strtolower($this->username)));\n if ($user === null){\n $this->errorCode = self::ERROR_USERNAME_INVALID;\n }else if (!$user->validatePassword($this->password)){\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n }else {\n $this->_uid = $user->id;\n $this->username = $user->name;\n $this->setUser($user);\n $roleArr = OBJTool::convertModelToArray($user->role);\n if ($roleArr) {\n $role = $roleArr[0]['id'];\n } else {\n $role = NULL;\n }\n $this->setState('__role', $role);\n $this->errorCode = self::ERROR_NONE;\n //Yii::app()->user->setState(\"isadmin\", true);\n }\n return $this->errorCode == self::ERROR_NONE;\n }", "private static function get_credentials($credential_key = null) {\r\n\t\t\t$credentials = self::get_settings('credentials');\r\n\r\n\t\t\treturn empty($credentials) ? false :\r\n\t\t\t\t\t\t(is_null($credential_key) ? $credentials :\r\n\t\t\t\t\t\t\t(isset($credentials[$credential_key]) ? $credentials[$credential_key] : false));\r\n\t\t}", "private function isCorrectCredentials ()\n {\n\n try {\n $this->httpClient->request (\"GET\", \"http://livescore-api.com/api-client/users/pair.json?key=\" . $this->apiKey . \"&secret=\" . $this->apiSecret);\n } catch (ClientException $e) {\n $response = json_decode ((string) $e->getResponse ()->getBody (), true);\n\n throw new WrongAPICredentialsException($response['error'], $e->getResponse ()->getStatusCode ());\n }\n }", "public function checkAuth();", "public function checkAuth();", "public function getUserCredential()\n {\n return $this->userCredentials;\n }", "function acapi_get_creds() {\n $user = acapi_get_option('email');\n $pass = acapi_get_option('key');\n if (empty($user) || empty($pass)) {\n return drush_set_error('ACAPI_CREDS_MISSING', dt('Email and api key required; specify --email/--key or run drush ac-api-login'));\n }\n return \"$user:$pass\";\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 firstParty() {\r\n return $this->personal_access_client || $this->password_client;\r\n }", "public function testCorrectCredentialsLogin()\n {\n $this->browse( function( Browser $browser ){\n $browser->visit( '/admin' );\n $browser->type( 'email', '[email protected]' );\n $browser->type( 'password', 'password' );\n $browser->click( '.button.is-primary' );\n $browser->waitFor( 'header' );\n $browser->assertSee( 'Dashboard' );\n });\n }", "private function login()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !$this->isAdmin()) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n exit;\n }\n }", "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 authenticate() {}", "public function isLoaded()\n {\n return $this->password && $this->username;\n }", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "public function login()\n\t{\n\n\t\tif ( ( $this->get_access_key() === null || $this->get_access_secret() === null ) )\n\t\t{\n echo 'case 1';\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token_info = $oauth->getRequestToken( $this->request_token_url, $this->get_callback() );\n\n if ($request_token_info)\n {\n\n $this->set_request_tokens( $request_token_info );\n }\n\n // Now we have the temp credentials, let's get the real ones.\n\n // Now let's get the OAuth token\n\t\t\t\\Response::redirect( $this->get_auth_url() );\n return;\n\t\t}\n\n\t\treturn $this->check_login();\n\t}", "function login($username, $data) {\n if ($username != 'admin' || $data != 'secret') {\n return false;\n }\n return parent::login($username, $data);\n }", "private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function 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 }", "function authGet() { }", "public function authenticate()\n {\n \t$reports = $this->getEntityManager()->getRepository('Application\\Entity\\Report');\n \t$report = $reports->findOneBy(array(\n \t\t'password' => md5($this->password),\n \t\t'campaign' => $this->id,\n \t));\n \t\n \tif($report){\n \t\treturn new Result(Result::SUCCESS, 53);\n \t} else {\n \t\treturn new Result(Result::FAILURE_CREDENTIAL_INVALID, 53);\n \t}\n }", "protected function _login()\n\t{\n\t\t// Is user previously authenticated?\n\t\tif ($this->auth->logged_in())\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t//Get username and password\n\t\telseif (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))\n\t\t{\n\t\t\t$username = filter_var($_SERVER['PHP_AUTH_USER'], FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH | FILTER_FLAG_ENCODE_LOW);\n\t\t\t$password = filter_var($_SERVER['PHP_AUTH_PW'], FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH | FILTER_FLAG_ENCODE_LOW);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ($this->auth->login($username, $password))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t\t// Return access denied\n\t\t\t$this->rest_error(401);\n\t\t}\n\n\t\t// Fail with a 401 if we admin=1\n\t\t// Bit of a hack but I haven't got a better way to handle it\n\t\tif (!empty($_GET['admin'])) $this->rest_error(401);\n\t\t\n\t\t// No auth details passed - return FALSE (not logged in)\n\t\treturn FALSE;\n\t}", "protected function _authByUserPassword($userPassword = '') {}", "public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }", "public function user(){\r\n if (!$this->isLogged()){\r\n return false;\r\n }\r\n return $_SESSION['dbauth'];\r\n }", "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }" ]
[ "0.68260324", "0.6811275", "0.6784165", "0.66838235", "0.6622387", "0.65956503", "0.6461491", "0.63168913", "0.6240046", "0.62174886", "0.61289656", "0.60792303", "0.6066517", "0.60614973", "0.6054333", "0.60475665", "0.60272527", "0.60136276", "0.60086256", "0.5993867", "0.5981867", "0.59726566", "0.5967963", "0.59639466", "0.5939955", "0.59335953", "0.593245", "0.59314764", "0.5922166", "0.59100956", "0.5905574", "0.5902437", "0.5900616", "0.5865349", "0.58587575", "0.585794", "0.584776", "0.5841881", "0.58317924", "0.58316153", "0.58264035", "0.5823843", "0.5819536", "0.5785753", "0.57801616", "0.57747775", "0.5766422", "0.57637435", "0.5758203", "0.57532805", "0.57463706", "0.5734029", "0.57332", "0.57321733", "0.5729908", "0.57223713", "0.57104397", "0.570658", "0.5696985", "0.56922156", "0.56804013", "0.56713367", "0.56587356", "0.564705", "0.56451344", "0.56450397", "0.5625369", "0.5625326", "0.56175536", "0.56171334", "0.56085354", "0.56032693", "0.55903673", "0.55873966", "0.5583102", "0.5580703", "0.5580593", "0.5579699", "0.5579699", "0.5578936", "0.5575106", "0.5574101", "0.5574047", "0.5562709", "0.5561317", "0.5546266", "0.5541576", "0.5527459", "0.55251235", "0.55169487", "0.5515942", "0.5512958", "0.55067444", "0.55036193", "0.5503531", "0.5501626", "0.5498572", "0.54928607", "0.5492832", "0.5491509", "0.5487993" ]
0.0
-1
Fetch object by id from a POST parameter.
public function fromPost($className, $parameterName = null, $default = null) { if (!$className) { throw new \InvalidArgumentException('Argument "classname" is required'); } $parameterName = $parameterName ?: $this->classNameToParamName($className); $value = $this->paramPlugin->fromPost($parameterName); return $this->paramValueToObject($className, $value, $default); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieve(int $id);", "public function fetch($id);", "public function fetch($id);", "abstract public function retrieve($id);", "public function retrieveById($id);", "function get(string $id);", "public function get(string $id);", "public function get( $id );", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get( $id ){}", "public function getById(string $id);", "public function getById( $id );", "abstract public function get($id);", "abstract public function get($id);", "abstract public function get($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function retrieve($entityName, $id);", "public abstract function get($id);", "abstract protected function getObject($id);", "public function findEntity($id);", "public static function find($id);", "abstract public function getById($id);", "abstract public function getById($id);", "public function retrieve($id)\n {\n return Field::find($id);\n }", "public function getById(int $id);", "public static function getPostById($id) {\n\t\t$em = dbconnection::getInstance()->getEntityManager() ;\n\n\t\t$postRepository = $em->getRepository('post');\n\t\t$post = $postRepository->findOneById(array('id' => $id));\n\n\t\treturn $post; \n\t}", "public function fetchSingleById($id);", "public function fetchSingleById($id);", "public static function fetchById($id) {\n return static::fetchByKey(self::ID_KEY, $id);\n }", "function get_one_post(){\n global $db;\n $req = $db->query(\"SELECT * FROM articles WHERE articles.id ='{$_GET['id']}'\");\n $result = $req->fetchObject();\n return $result;\n}", "public function GetById($id);", "public function GetById($id);", "public function fetch($id)\n {\n return parent::fetch($id);\n }", "public abstract function getById($id);", "public function getById() {}", "abstract protected function _doFetch($id);", "public function findAction($id);", "public static function findById($id);", "public function getById(ObjectId $anId);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }" ]
[ "0.68102175", "0.675621", "0.675621", "0.6724093", "0.667974", "0.656311", "0.65278196", "0.6494114", "0.64223164", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6392696", "0.6358464", "0.6349945", "0.6336208", "0.63311976", "0.63311976", "0.63311976", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6279018", "0.6263745", "0.6247411", "0.62341297", "0.6209051", "0.6184741", "0.6177988", "0.6177988", "0.6156972", "0.61546683", "0.61454445", "0.6144411", "0.6144411", "0.6143885", "0.614073", "0.6139956", "0.6139956", "0.6108461", "0.609532", "0.6093127", "0.608885", "0.60886663", "0.60783637", "0.6042125", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.60298353", "0.6026751", "0.6026751", "0.6026751", "0.6026751", "0.6012501" ]
0.0
-1
Fetch object by id from a query parameter.
public function fromQuery($className, $parameterName = null, $default = null) { if (!$className) { throw new \InvalidArgumentException('Argument "classname" is required'); } $parameterName = $parameterName ?: $this->classNameToParamName($className); $value = $this->paramPlugin->fromQuery($parameterName); return $this->paramValueToObject($className, $value, $default); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetch($id);", "public function fetch($id);", "public function get(string $id);", "abstract public function get($id);", "abstract public function get($id);", "abstract public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "function get(string $id);", "public function get( $id );", "abstract public function retrieve($id);", "public function retrieve(int $id);", "public function retrieveById($id);", "public abstract function get($id);", "public function getById(string $id);", "public function getById( $id );", "public function get( $id ){}", "abstract public function getById($id);", "abstract public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public abstract function getById($id);", "public function getById(int $id);", "public function GetById($id);", "public function GetById($id);", "public function fetch( $query_id=null );", "public function fetchSingleById($id);", "public function fetchSingleById($id);", "public static function find($id);", "public static function fetchById($id) {\n return static::fetchByKey(self::ID_KEY, $id);\n }", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function getById() {}", "public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }", "public function whereId(string $id): object;", "public static function findById($id);", "public function getById($id){\n return $this->_query->getById(\"id\", $id);\n }", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function get($id) {\n\t}", "public function findEntity($id);", "function get_by_id($id)\n {\n $this->db2->where($this->id, $id);\n return $this->db2->get($this->table)->row();\n }", "public function fetchById($id)\r\n {\r\n return $this->findByPk($id);\r\n }", "public function get($id)\n {\n }", "public function get($id)\n {\n }", "public function get($id){\n }", "abstract protected function _doFetch($id);", "public function fetch($id)\n {\n return parent::fetch($id);\n }", "public function fetchById($id,$options=array()) {\n\t\treturn $this->fetch(array('id' => $id));\n\t}", "abstract public function find($id);" ]
[ "0.74019414", "0.74019414", "0.7263795", "0.72583133", "0.72583133", "0.72583133", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238666", "0.7238032", "0.7230009", "0.7220467", "0.71861655", "0.71688354", "0.7127362", "0.71190226", "0.7085332", "0.70843214", "0.70635957", "0.70635957", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.70305383", "0.69641936", "0.69233555", "0.6904622", "0.6904622", "0.6874329", "0.68738186", "0.68738186", "0.6858892", "0.6785521", "0.6762738", "0.67443985", "0.67211777", "0.67106485", "0.66814333", "0.66536367", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.6642308", "0.66395557", "0.6627125", "0.66201663", "0.66152185", "0.6595553", "0.6595553", "0.65829784", "0.65819174", "0.65747625", "0.6549441", "0.65489423" ]
0.0
-1
Fetch object by id from a route parameter.
public function fromRoute($className = null, $parameterName = null, $default = null) { $parameterName = $parameterName ?: $this->classNameToParamName($className); $value = $this->paramPlugin->fromRoute($parameterName); return $this->paramValueToObject($className, $value, $default); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get(string $id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get(string $id);", "public function get( $id );", "abstract public function get($id);", "abstract public function get($id);", "abstract public function get($id);", "public function retrieveById($id);", "public function retrieve(int $id);", "public function get( $id ){}", "abstract public function retrieve($id);", "public abstract function get($id);", "public function getById(string $id);", "public function getById( $id );", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function fetch($id);", "public function fetch($id);", "public function GetById($id);", "public function GetById($id);", "public function findAction($id);", "public function get($id){\n }", "public function getById(int $id);", "public function get($id)\n {\n }", "public function get($id)\n {\n }", "abstract public function getById($id);", "abstract public function getById($id);", "public function find(int $id = null) {\n $this->method = \"GET\";\n if(null == $id) {\n $this->path = $this->objectName;\n } else {\n $this->path = $this->objectName . '/' . $id;\n $this->currentId = $id;\n }\n $output = $this->get();\n return $output;\n }", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public static function find($id);", "public function get($id) {\n\t}", "public abstract function getById($id);", "public static function getById($id = null)\n\t{\n\t\treturn Route::where('id', $id)->first();\n\t}", "public function getById(Request $request) {\n $id = $request->input('id');\n if (is_numeric($id)) {\n return Route::find($id);\n } else {\n // @TODO: Foutafhandeling\n }\n }", "public function getById() {}", "public function getById($id)\n {\n }", "public function getById($id)\n {\n }", "public static function findById($id);", "public function find( $id );", "public function getOne($id) {\n\n }", "public function findById ($id);", "function find($id);", "public function loadById($id);", "public function loadById($id);", "public function findEntity($id);", "abstract public function find($id);" ]
[ "0.7399329", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.73938626", "0.7388202", "0.73636746", "0.72686344", "0.72686344", "0.72686344", "0.7236691", "0.72128105", "0.72037786", "0.71831423", "0.71725684", "0.71224684", "0.70902574", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.70789576", "0.7058277", "0.7048603", "0.7048603", "0.7001933", "0.7001933", "0.6977653", "0.6958563", "0.69279236", "0.69273525", "0.69273525", "0.6908539", "0.6908539", "0.6907937", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68988055", "0.68966204", "0.68865716", "0.6855157", "0.68203616", "0.6812467", "0.67824334", "0.6708504", "0.6708504", "0.66931856", "0.66835994", "0.66743237", "0.6640576", "0.663725", "0.6626167", "0.6626167", "0.6616179", "0.66157484" ]
0.0
-1
Test dispatch and notifier supports event
public function testDispatchWithNotifierSupportEvent() { $event = new EventTested(); $this->eventDispatcher->expects($this->once()) ->method('dispatch') ->with('foo', $event) ->will($this->returnValue($event)); $this->notifier->expects($this->once()) ->method('supportsObject') ->with($event, 'foo') ->will($this->returnValue(true)); $this->notifier->expects($this->once()) ->method('notify') ->with($event, 'foo'); $this->notifierProxy->dispatch('foo', $event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "public function testDispatchEvents()\n {\n $this->uut->dispatch($this->buildRequest('/default'));\n\n $this->assertArrayHasKey(OnPreDispatch::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostRoute::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostDispatch::class, self::$lastEvents);\n }", "public function testEventCallBackPatch()\n {\n }", "public function testFireEventWithInternalFiredEvent()\n {\n $eventManager = new EventManager;\n $event = 'foor.bar';\n $eventManager->listen(EventManager::FIRED, function ($newEvent) use ($event) {\n $this->assertEquals($newEvent, $event);\n });\n $eventManager->fire($event);\n }", "public function testDispatchWithNotifierNotSupportEvent()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('foo', $event)\n ->will($this->returnValue($event));\n\n $this->notifier->expects($this->once())\n ->method('supportsObject')\n ->with($event, 'foo')\n ->will($this->returnValue(false));\n\n $this->notifier->expects($this->never())\n ->method('notify');\n\n $this->notifierProxy->dispatch('foo', $event);\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "public function testGetEvents()\n {\n }", "public function testEventCallBackCreate()\n {\n }", "public function testGetEvent()\n {\n }", "public function dispatchEvent($event);", "public function testEventCallBackGet()\n {\n }", "public function testGetEventDispatcher()\n {\n $redis = $this->factory->getRedis();\n $dispatcher = new EventDispatcher();\n $factory = new Factory($redis, $dispatcher);\n\n $this->assertTrue($factory->getEventDispatcher() instanceof EventDispatcherInterface);\n }", "public function getEventDispatch();", "public function testDispatchWithEventNameIsDisabledForNotify()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('disable_event', $event);\n\n $this->notifier->expects($this->never())\n ->method('supportsObject')\n ->with($event, 'foo');\n\n $this->notifier->expects($this->never())\n ->method('notify');\n\n $this->notifierProxy->dispatch('disable_event', $event);\n }", "public function testEventCallBackGetItem()\n {\n }", "public function doSomeAction(TestEvent $event) {\n drupal_set_message(\"The Example Event has been subscribed, which has bee dispatched on submit of the form with \" . $event->getReferenceID() . \" as Reference\");\n }", "public function testGetEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetEventDispatcher()\n {\n $transport = new Transport();\n $this->assertInstanceOf(EventDispatcher::class, $transport->getEventDispatcher());\n }", "public function testFireEventWithClass()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', 'Underlay\\Tests\\Events\\Test@call', function (\n $receivedSecret\n )\n use (\n $secret\n ) {\n $this->assertEquals($secret, $receivedSecret);\n });\n $eventManager->fire('secret', $secret);\n }", "public function testOrgApacheSlingEventImplEventingThreadPool()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.event.impl.EventingThreadPool';\n\n $crawler = $client->request('POST', $path);\n }", "public function test_dispatching_closure()\n {\n $function = function () {\n return true;\n };\n $result = $this->dispatcher->dispatch($function);\n $this->assertTrue($result);\n }", "public function onEvent();", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "public function testGetWebhookEvents()\n {\n }", "public function event(): EventDispatcherInterface;", "public function testTriggerEventCallsCallbackWithArguments()\n\t{\n\t\t$mock = $this->getMock('Mock_Callback', array('call_me'));\n\n\t\t$mock->expects($this->once())\n\t\t\t\t->method('call_me')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\n\n\t\t$mock2 = $this->getMock('Mock_Callback', array('maybe'));\n\n\t\t$mock2->expects($this->once())\n\t\t\t\t->method('maybe')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\t\t$dispatcher = new Dispatcher();\n\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock, 'call_me'));\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock2, 'maybe'));\n\n\t\t$dispatcher->trigger_event('random.pre_forge', Dispatcher::event(array('random' => 42)));\n\t}", "public function testEventCallBackGetMacros()\n {\n }", "public function testEventReturnsAValidInstanceOfDispatcherEvent()\n\t{\n\t\t$args = array('my' => 'arguments');\n\t\t$event = Dispatcher::event($args, TRUE);\n\n\t\t$this->assertType('Dispatcher_Event', $event);\n\t}", "public function testEventWithClosure()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', function ($newSecret) use ($secret) {\n $this->assertEquals($newSecret, $secret);\n });\n $eventManager->fire('secret', $secret);\n }", "public function testEventCallBackDelete()\n {\n }", "public function testComAdobeCqWcmLaunchesImplLaunchesEventHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.wcm.launches.impl.LaunchesEventHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function testGetStaticEventDispatcher()\n {\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $getStaticEventDispatcherMethod = $refTransport->getMethod('getEventDispatcher');\n $getStaticEventDispatcherMethod->setAccessible(true);\n $returnEventDispatcher = $getStaticEventDispatcherMethod->invoke($transport);\n $this->assertInstanceOf(EventDispatcher::class, $returnEventDispatcher);\n }", "public function testReceiveNotification()\n {\n Config::set('xchainqueue.jobClass', 'MockXchainHandlerJob');\n\n $xchain_queue_helper = app('XchainQueueHelper')->mockWebhookReceiver();\n $request = $xchain_queue_helper->buildReceiveRequest();\n\n // receive the request\n $response = $xchain_queue_helper->receiveRequest($request);\n\n // check the events\n $called_events = MockXchainHandlerJob::getCalledEvents();\n PHPUnit::assertCount(1, $called_events);\n }", "public function dispatch($event, $options);", "public function dispatch($event, ...$listenerArguments);", "public function DoEvent($nEvent) {}", "public function testFireEventWithInternalOnException()\n {\n $eventManager = new EventManager;\n $eventManager->listen(EventManager::ON_EXCEPTION, function ($ex) {\n $this->assertTrue($ex instanceof \\Exception);\n });\n $eventManager->listen('thrown', function () {\n throw new \\Exception('');\n });\n $eventManager->fire('thrown');\n }", "public function invokeEvent(Event $event);", "public function dispatch();", "public function dispatch();", "public function handleEvent(PhutilEvent $event) {\n // occurs, this method will be invoked. You should respond to the event.\n\n // In this case, we just echo a message out so the event test script will\n // do something visible.\n\n $console = PhutilConsole::getConsole();\n $console->writeOut(\n \"%s\\n\",\n pht(\n '%s got test event at %d',\n __CLASS__,\n $event->getValue('time')));\n }", "public function send_events()\n {\n }", "abstract function HookEvents();", "public function testOrgApacheFelixEventadminImplEventAdmin()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.felix.eventadmin.impl.EventAdmin';\n\n $crawler = $client->request('POST', $path);\n }", "public function test_event_notification_with_failed_notification()\n {\n $this->event_notification_helper('failed_event_method', false);\n }", "public function testGetSubscribedEvents()\n {\n $listener = new UploaderListener($this->adapter, $this->driver, $this->storage, $this->injector);\n $events = $listener->getSubscribedEvents();\n\n $this->assertTrue(in_array('prePersist', $events));\n $this->assertTrue(in_array('preUpdate', $events));\n $this->assertTrue(in_array('postLoad', $events));\n $this->assertTrue(in_array('postRemove', $events));\n }", "public function setEventDispatch(\\Montage\\Event\\Dispatch $dispatch);", "public function testGetChallengeEvent()\n {\n }", "public function testGetChallengeEvents()\n {\n }", "public function testExecuteTaskAction()\n {\n }", "public function test_dispatching_invokable_class()\n {\n $command = new InvokableCommand();\n $result = $this->dispatcher->dispatch($command);\n $this->assertTrue($result);\n }", "public function _do($EventName, IEvent $Event);", "public static function events();", "public function test_form_submit_onevents()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", false)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasErrors('onEvents');\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n\n $hintsTest =[];\n $hint = \"You selected all 3 options: 'on Push', 'on Pull Request', and 'Manual Trigger'.\";\n $hint = $hint . \" I suggest you to select 'Manual Trigger' OR 'on push / on pull request'.\";\n $hintsTest[] = $hint;\n $hintsTest[] =\"I selected automatically a 'Manual Trigger' for you.\";\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', $hintsTest);\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', []);\n }", "public function testEventCanBeSubscribedToAndCanBePublished()\n\t{\n\t\tConfig::set('history::bus.driver', 'memory');\n\n\t\t$expected = false;\n\n\t\tBus::subscribe('TestEvent', function($event) use (&$expected)\n\t\t{\n\t\t\t$expected = $event->data == 'Hello World!';\n\t\t});\n\n\t\tBus::publish(new TestEvent);\n\n\t\t$this->assertTrue($expected);\n\t}", "public function testEventito(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->eventito();\r\n\t\t$this->call('GET', 'eventos');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function dispatch(): void {}", "public function dispatch($event, $payload = [], $halt = false);", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function fireEvent($eventName) {}", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function testEventCallBackGetInboundReferences()\n {\n }", "public function submitEvent();", "public function testEventDispatchWithBuffering() {\n\t\t$this->_useMock();\n\n\t\t$this->Js->TestJsEngine->bufferedMethods = array('event', 'sortables');\n\t\t$this->Js->TestJsEngine->expects($this->exactly(3))\n\t\t\t->method('event')\n\t\t\t->will($this->returnValue('This is an event call'));\n\n\t\t$this->Js->event('click', 'foo');\n\t\t$result = $this->Js->getBuffer();\n\t\t$this->assertEquals(1, count($result));\n\t\t$this->assertEquals('This is an event call', $result[0]);\n\n\t\t$result = $this->Js->event('click', 'foo', array('buffer' => false));\n\t\t$buffer = $this->Js->getBuffer();\n\t\t$this->assertTrue(empty($buffer));\n\t\t$this->assertEquals('This is an event call', $result);\n\n\t\t$result = $this->Js->event('click', 'foo', false);\n\t\t$buffer = $this->Js->getBuffer();\n\t\t$this->assertTrue(empty($buffer));\n\t\t$this->assertEquals('This is an event call', $result);\n\t}", "static public function dispatchEvent(slEvent &$event) {\n if (!self::hasListeners($event->getName())) return false;\n\n $event->setState(slEventState::FIRED);\n foreach(self::$listeners[$event->getName()] as $listener) {\n if (is_array($listener)) {\n call_user_func($listener, $event);\n } else {\n $method = 'on'.slInflector::camelCase($event->getName());\n if (method_exists($listener,$method)) {\n $listener->$method($event);\n }\n }\n if ($event->isStopped()) return false;\n\n }\n $event->setState(slEventState::FINISHED);\n return true;\n }", "public function triggerEvent($eventId);", "public function beforeDispatch(DispatchEvent $event);", "function sendEvent( $event )\n {\n Event_Manager::notify( $event );\n }", "protected function setUp()\n {\n parent::setUp();\n $this->object = new Event('test', $this, ['invoker' => $this]);\n }", "abstract public function getEventName();", "public static function getSubscribedEvents()\n {\n echo 'Test';\n }", "public function test_background_updates()\n {\n }", "public function test_ouwiki_core_calendar_provide_event_action() {\n // Create the activity.\n $course = $this->getDataGenerator()->create_course();\n $ouwiki = $this->getDataGenerator()->create_module('ouwiki', ['course' => $course->id]);\n\n // Create a calendar event.\n $event = $this->create_action_event($course->id, $ouwiki->id,\n \\core_completion\\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED);\n\n // Create an action factory.\n $factory = new \\core_calendar\\action_factory();\n\n // Decorate action event.\n $actionevent = mod_ouwiki_core_calendar_provide_event_action($event, $factory);\n\n // Confirm the event was decorated.\n $this->assertInstanceOf('\\core_calendar\\local\\event\\value_objects\\action', $actionevent);\n $this->assertEquals(get_string('view'), $actionevent->get_name());\n $this->assertInstanceOf('moodle_url', $actionevent->get_url());\n $this->assertEquals(1, $actionevent->get_item_count());\n $this->assertTrue($actionevent->is_actionable());\n }", "public function testMain()\n {\n $thread = new MockThread(new \\stdClass());\n $thread->run();\n $this->assertTrue($thread->hasExcecuted());\n }", "public function dispatch($eventName, Event $event = null);", "public function dispatch($eventName, Event $event = null);", "private function dispatch($data)\n {\n foreach ($this->eventListeners as $eventListener)\n $eventListener->handle($data);\n }", "function testSecondEventObserver($data) {\n return $data;\n}", "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "public function test_addSubscriber() {\n\n }", "public function testDSTIdNotifyPost()\n {\n }", "public function testWithEntity()\n {\n $event = ['1', '2', '3'];\n\n $this->mockCallback->expects($this->once())\n ->method('callback')\n ->with($event);\n\n\n $this->listener->withEntity($event);\n }", "public function testDeleteEvent()\n {\n }", "abstract function fire($action, $args);", "public function testComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListener()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.commons.emailreply.impl.CommentEmailEventListener';\n\n $crawler = $client->request('POST', $path);\n }", "public function testQueryEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDispatcher()\n {\n $this->assertInstanceOf(Dispatcher::class, (new Command())->testDispatcher(), 'A call to dispatcher() should return an instance of a dispatcher.');\n }", "public function triggerEvent(TFW_Event $event){\n if(method_exists($this, $event->getAction()))\n call_user_func_array(array($this, $event->getAction()), $event->getArgs());\n }", "public function dispatchEvent($name, Event $event = null);", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "public function testOnKernelRequestHasAction()\n {\n $proxyServiceMock = $this->getMockBuilder(\"Cnerta\\BehindAProxyBundle\\Services\\ProxyService\")\n ->disableOriginalConstructor()\n ->getMock();\n $proxyServiceMock->expects($this->once())\n ->method(\"loadDefaultStreamContext\");\n\n $getResponseEventMock = $this->getMockBuilder(\"Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent\")\n ->disableOriginalConstructor()\n ->getMock();\n $getResponseEventMock->expects($this->once())\n ->method(\"getRequestType\")\n ->will($this->returnValue(HttpKernelInterface::MASTER_REQUEST));\n\n $proxyListner = new ProxyListener($proxyServiceMock);\n\n $proxyListner->onKernelRequest($getResponseEventMock);\n }", "public function testNotify() {\n $sText = md5(time());\n $this->assertInstanceOf('\\notifyy\\AbstractAdapter', $this->_object->notify(\n \\notifyy\\Notifyable::SUCCESS,\n $sText\n ));\n\n $this->expectOutputRegex(sprintf('/%s/', $sText));\n }", "abstract protected function _dispatch(Manager $manager);", "public function runNotifications():void;", "public function testAddListenerWithPriority()\n {\n // Arrange\n $callstack = [];\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$callstack) {\n $callstack[] = 1;\n }, 1);\n\n $communicator->addListener(function () use (&$callstack) {\n $callstack[] = 2;\n }, 2);\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertEquals([\n 2,\n 1\n ], $callstack);\n }", "public function dispatch()\r\n {\r\n foreach($this->broadcast as $event => $data) {\r\n $this->execute($event);\r\n }\r\n }", "public function testComAdobeCqSocialActivitystreamsListenerImplEventListenerHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.activitystreams.listener.impl.EventListenerHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function testSettingEventDispatcher()\n {\n $mockEventDispatcher= new MockEventDispatcher();\n $transport = new Transport();\n $returnObject = $transport->setEventDispatcher($mockEventDispatcher);\n $this->assertInstanceOf(Transport::class, $returnObject);\n \n $refTransport = new \\ReflectionObject($transport);\n $eventDispatcher = $refTransport->getProperty('eventDispatcher');\n $eventDispatcher->setAccessible(true);\n $this->assertSame($mockEventDispatcher, $eventDispatcher->getValue($transport));\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testClicks()\n\t{\n\t\t$this->call('POST', '/api/posts/click');\n\t}" ]
[ "0.7251876", "0.6926086", "0.68950593", "0.68823737", "0.6845733", "0.67082274", "0.65592337", "0.6544384", "0.65202934", "0.64910245", "0.6483528", "0.6480512", "0.64468634", "0.6420582", "0.6403316", "0.6342289", "0.6320253", "0.621622", "0.617445", "0.6100438", "0.6085242", "0.6084543", "0.60653037", "0.60567397", "0.605644", "0.602644", "0.59754825", "0.59193623", "0.5917199", "0.58968276", "0.58863276", "0.58856213", "0.5882612", "0.5869935", "0.583665", "0.58355504", "0.58330023", "0.5784894", "0.57818025", "0.57818025", "0.57781905", "0.57760054", "0.577544", "0.5761313", "0.5751335", "0.5744158", "0.5744098", "0.57363975", "0.57268435", "0.5726812", "0.5686847", "0.5672078", "0.5670319", "0.5664558", "0.5646627", "0.564374", "0.56435114", "0.56311977", "0.5622151", "0.5614676", "0.5606182", "0.5603973", "0.5587293", "0.55845755", "0.558216", "0.5581793", "0.55627984", "0.5554029", "0.55430037", "0.5536813", "0.5525223", "0.55155987", "0.5506381", "0.54984176", "0.5486389", "0.5486389", "0.5477801", "0.5465992", "0.54595846", "0.54594713", "0.5456844", "0.5455453", "0.54443014", "0.5440623", "0.5435237", "0.5429662", "0.542945", "0.5421728", "0.54211855", "0.5418119", "0.5387998", "0.5380146", "0.53720856", "0.5370058", "0.5369348", "0.5367348", "0.53639305", "0.53494376", "0.5348669", "0.5345511" ]
0.7587493
0
Test dispatch and notifier not supports event
public function testDispatchWithNotifierNotSupportEvent() { $event = new EventTested(); $this->eventDispatcher->expects($this->once()) ->method('dispatch') ->with('foo', $event) ->will($this->returnValue($event)); $this->notifier->expects($this->once()) ->method('supportsObject') ->with($event, 'foo') ->will($this->returnValue(false)); $this->notifier->expects($this->never()) ->method('notify'); $this->notifierProxy->dispatch('foo', $event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDispatchWithNotifierSupportEvent()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('foo', $event)\n ->will($this->returnValue($event));\n\n $this->notifier->expects($this->once())\n ->method('supportsObject')\n ->with($event, 'foo')\n ->will($this->returnValue(true));\n\n $this->notifier->expects($this->once())\n ->method('notify')\n ->with($event, 'foo');\n\n $this->notifierProxy->dispatch('foo', $event);\n }", "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "public function testEventCallBackPatch()\n {\n }", "public function testDispatchEvents()\n {\n $this->uut->dispatch($this->buildRequest('/default'));\n\n $this->assertArrayHasKey(OnPreDispatch::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostRoute::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostDispatch::class, self::$lastEvents);\n }", "public function testDispatchWithEventNameIsDisabledForNotify()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('disable_event', $event);\n\n $this->notifier->expects($this->never())\n ->method('supportsObject')\n ->with($event, 'foo');\n\n $this->notifier->expects($this->never())\n ->method('notify');\n\n $this->notifierProxy->dispatch('disable_event', $event);\n }", "public function testFireEventWithInternalFiredEvent()\n {\n $eventManager = new EventManager;\n $event = 'foor.bar';\n $eventManager->listen(EventManager::FIRED, function ($newEvent) use ($event) {\n $this->assertEquals($newEvent, $event);\n });\n $eventManager->fire($event);\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "public function testGetEvents()\n {\n }", "public function testGetEventDispatcher()\n {\n $redis = $this->factory->getRedis();\n $dispatcher = new EventDispatcher();\n $factory = new Factory($redis, $dispatcher);\n\n $this->assertTrue($factory->getEventDispatcher() instanceof EventDispatcherInterface);\n }", "public function testEventCallBackCreate()\n {\n }", "public function testGetEvent()\n {\n }", "public function testGetEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testEventCallBackGet()\n {\n }", "public function testEventCallBackGetItem()\n {\n }", "public function dispatchEvent($event);", "public function testGetEventDispatcher()\n {\n $transport = new Transport();\n $this->assertInstanceOf(EventDispatcher::class, $transport->getEventDispatcher());\n }", "public function testOrgApacheSlingEventImplEventingThreadPool()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.event.impl.EventingThreadPool';\n\n $crawler = $client->request('POST', $path);\n }", "public function getEventDispatch();", "public function doSomeAction(TestEvent $event) {\n drupal_set_message(\"The Example Event has been subscribed, which has bee dispatched on submit of the form with \" . $event->getReferenceID() . \" as Reference\");\n }", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "public function testFireEventWithClass()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', 'Underlay\\Tests\\Events\\Test@call', function (\n $receivedSecret\n )\n use (\n $secret\n ) {\n $this->assertEquals($secret, $receivedSecret);\n });\n $eventManager->fire('secret', $secret);\n }", "public function testGetWebhookEvents()\n {\n }", "public function test_event_notification_with_failed_notification()\n {\n $this->event_notification_helper('failed_event_method', false);\n }", "public function testFireEventWithInternalOnException()\n {\n $eventManager = new EventManager;\n $eventManager->listen(EventManager::ON_EXCEPTION, function ($ex) {\n $this->assertTrue($ex instanceof \\Exception);\n });\n $eventManager->listen('thrown', function () {\n throw new \\Exception('');\n });\n $eventManager->fire('thrown');\n }", "public function testEventReturnsAValidInstanceOfDispatcherEvent()\n\t{\n\t\t$args = array('my' => 'arguments');\n\t\t$event = Dispatcher::event($args, TRUE);\n\n\t\t$this->assertType('Dispatcher_Event', $event);\n\t}", "public function testGetStaticEventDispatcher()\n {\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $getStaticEventDispatcherMethod = $refTransport->getMethod('getEventDispatcher');\n $getStaticEventDispatcherMethod->setAccessible(true);\n $returnEventDispatcher = $getStaticEventDispatcherMethod->invoke($transport);\n $this->assertInstanceOf(EventDispatcher::class, $returnEventDispatcher);\n }", "public function testEventCallBackDelete()\n {\n }", "public function testEventCallBackGetMacros()\n {\n }", "public function event(): EventDispatcherInterface;", "public function testComAdobeCqWcmLaunchesImplLaunchesEventHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.wcm.launches.impl.LaunchesEventHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function testReceiveNotification()\n {\n Config::set('xchainqueue.jobClass', 'MockXchainHandlerJob');\n\n $xchain_queue_helper = app('XchainQueueHelper')->mockWebhookReceiver();\n $request = $xchain_queue_helper->buildReceiveRequest();\n\n // receive the request\n $response = $xchain_queue_helper->receiveRequest($request);\n\n // check the events\n $called_events = MockXchainHandlerJob::getCalledEvents();\n PHPUnit::assertCount(1, $called_events);\n }", "public function testOrgApacheFelixEventadminImplEventAdmin()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.felix.eventadmin.impl.EventAdmin';\n\n $crawler = $client->request('POST', $path);\n }", "public function onEvent();", "public function test_dispatching_closure()\n {\n $function = function () {\n return true;\n };\n $result = $this->dispatcher->dispatch($function);\n $this->assertTrue($result);\n }", "public function testTriggerEventCallsCallbackWithArguments()\n\t{\n\t\t$mock = $this->getMock('Mock_Callback', array('call_me'));\n\n\t\t$mock->expects($this->once())\n\t\t\t\t->method('call_me')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\n\n\t\t$mock2 = $this->getMock('Mock_Callback', array('maybe'));\n\n\t\t$mock2->expects($this->once())\n\t\t\t\t->method('maybe')\n\t\t\t\t// Have a look in PHPUnit_Framework_Assert for more\n\t\t\t\t->with($this->equalTo('random.pre_forge'), $this->isInstanceOf('Dispatcher_Event'));\n\n\t\t$dispatcher = new Dispatcher();\n\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock, 'call_me'));\n\t\t$dispatcher->register_listener('random.pre_forge', array($mock2, 'maybe'));\n\n\t\t$dispatcher->trigger_event('random.pre_forge', Dispatcher::event(array('random' => 42)));\n\t}", "public function testEventWithClosure()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', function ($newSecret) use ($secret) {\n $this->assertEquals($newSecret, $secret);\n });\n $eventManager->fire('secret', $secret);\n }", "public function testGetChallengeEvent()\n {\n }", "public function testGetSubscribedEvents()\n {\n $listener = new UploaderListener($this->adapter, $this->driver, $this->storage, $this->injector);\n $events = $listener->getSubscribedEvents();\n\n $this->assertTrue(in_array('prePersist', $events));\n $this->assertTrue(in_array('preUpdate', $events));\n $this->assertTrue(in_array('postLoad', $events));\n $this->assertTrue(in_array('postRemove', $events));\n }", "public function testGetChallengeEvents()\n {\n }", "abstract function HookEvents();", "public function test_dispatching_invokable_class()\n {\n $command = new InvokableCommand();\n $result = $this->dispatcher->dispatch($command);\n $this->assertTrue($result);\n }", "public function testExecuteTaskAction()\n {\n }", "public function DoEvent($nEvent) {}", "public function send_events()\n {\n }", "public function dispatch($event, $options);", "public function dispatch($event, ...$listenerArguments);", "public function test_form_submit_onevents()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", false)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasErrors('onEvents');\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n\n $hintsTest =[];\n $hint = \"You selected all 3 options: 'on Push', 'on Pull Request', and 'Manual Trigger'.\";\n $hint = $hint . \" I suggest you to select 'Manual Trigger' OR 'on push / on pull request'.\";\n $hintsTest[] = $hint;\n $hintsTest[] =\"I selected automatically a 'Manual Trigger' for you.\";\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', $hintsTest);\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', []);\n }", "public function shouldntRaiseAnEvent()\n {\n }", "public function testEventDispatchWithBuffering() {\n\t\t$this->_useMock();\n\n\t\t$this->Js->TestJsEngine->bufferedMethods = array('event', 'sortables');\n\t\t$this->Js->TestJsEngine->expects($this->exactly(3))\n\t\t\t->method('event')\n\t\t\t->will($this->returnValue('This is an event call'));\n\n\t\t$this->Js->event('click', 'foo');\n\t\t$result = $this->Js->getBuffer();\n\t\t$this->assertEquals(1, count($result));\n\t\t$this->assertEquals('This is an event call', $result[0]);\n\n\t\t$result = $this->Js->event('click', 'foo', array('buffer' => false));\n\t\t$buffer = $this->Js->getBuffer();\n\t\t$this->assertTrue(empty($buffer));\n\t\t$this->assertEquals('This is an event call', $result);\n\n\t\t$result = $this->Js->event('click', 'foo', false);\n\t\t$buffer = $this->Js->getBuffer();\n\t\t$this->assertTrue(empty($buffer));\n\t\t$this->assertEquals('This is an event call', $result);\n\t}", "public function setEventDispatch(\\Montage\\Event\\Dispatch $dispatch);", "public function handleEvent(PhutilEvent $event) {\n // occurs, this method will be invoked. You should respond to the event.\n\n // In this case, we just echo a message out so the event test script will\n // do something visible.\n\n $console = PhutilConsole::getConsole();\n $console->writeOut(\n \"%s\\n\",\n pht(\n '%s got test event at %d',\n __CLASS__,\n $event->getValue('time')));\n }", "public function testEventCanBeSubscribedToAndCanBePublished()\n\t{\n\t\tConfig::set('history::bus.driver', 'memory');\n\n\t\t$expected = false;\n\n\t\tBus::subscribe('TestEvent', function($event) use (&$expected)\n\t\t{\n\t\t\t$expected = $event->data == 'Hello World!';\n\t\t});\n\n\t\tBus::publish(new TestEvent);\n\n\t\t$this->assertTrue($expected);\n\t}", "public function testEventCallBackGetInboundReferences()\n {\n }", "public function test_background_updates()\n {\n }", "public function testDeleteEvent()\n {\n }", "public static function events();", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function dispatch($event, $payload = [], $halt = false);", "public function invokeEvent(Event $event);", "public function testEventito(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->eventito();\r\n\t\t$this->call('GET', 'eventos');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function testComAdobeCqSocialCommonsEmailreplyImplCommentEmailEventListener()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.commons.emailreply.impl.CommentEmailEventListener';\n\n $crawler = $client->request('POST', $path);\n }", "public function testDSTIdNotifyPost()\n {\n }", "public function test_event_notification_with_unexisting_method()\n {\n $this->event_notification_helper('unexisting_method', true);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->object = new Event('test', $this, ['invoker' => $this]);\n }", "public function testNotify() {\n $sText = md5(time());\n $this->assertInstanceOf('\\notifyy\\AbstractAdapter', $this->_object->notify(\n \\notifyy\\Notifyable::SUCCESS,\n $sText\n ));\n\n $this->expectOutputRegex(sprintf('/%s/', $sText));\n }", "public function beforeDispatch(DispatchEvent $event);", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "public static function getSubscribedEvents()\n {\n echo 'Test';\n }", "abstract public function getEventName();", "public function testWebinarPollUpdate()\n {\n }", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function dispatch();", "public function dispatch();", "public function testDispatcher()\n {\n $this->assertInstanceOf(Dispatcher::class, (new Command())->testDispatcher(), 'A call to dispatcher() should return an instance of a dispatcher.');\n }", "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "public function testQueryEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testMain()\n {\n $thread = new MockThread(new \\stdClass());\n $thread->run();\n $this->assertTrue($thread->hasExcecuted());\n }", "public function dispatch(): void {}", "public function test_addSubscriber() {\n\n }", "public function testComDayCqWcmWebservicesupportImplReplicationEventListener()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.webservicesupport.impl.ReplicationEventListener';\n\n $crawler = $client->request('POST', $path);\n }", "function sendEvent( $event )\n {\n Event_Manager::notify( $event );\n }", "public function testOnKernelRequestHasAction()\n {\n $proxyServiceMock = $this->getMockBuilder(\"Cnerta\\BehindAProxyBundle\\Services\\ProxyService\")\n ->disableOriginalConstructor()\n ->getMock();\n $proxyServiceMock->expects($this->once())\n ->method(\"loadDefaultStreamContext\");\n\n $getResponseEventMock = $this->getMockBuilder(\"Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent\")\n ->disableOriginalConstructor()\n ->getMock();\n $getResponseEventMock->expects($this->once())\n ->method(\"getRequestType\")\n ->will($this->returnValue(HttpKernelInterface::MASTER_REQUEST));\n\n $proxyListner = new ProxyListener($proxyServiceMock);\n\n $proxyListner->onKernelRequest($getResponseEventMock);\n }", "public function testAddListenerWithPriority()\n {\n // Arrange\n $callstack = [];\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$callstack) {\n $callstack[] = 1;\n }, 1);\n\n $communicator->addListener(function () use (&$callstack) {\n $callstack[] = 2;\n }, 2);\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertEquals([\n 2,\n 1\n ], $callstack);\n }", "public function fireEvent($eventName) {}", "public function testUntil()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testUntil(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertTrue($event['halt'], 'The event should halt when dispatched from until().');\n }", "public function _do($EventName, IEvent $Event);", "public function testComAdobeCqSocialActivitystreamsListenerImplEventListenerHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.activitystreams.listener.impl.EventListenerHandler';\n\n $crawler = $client->request('POST', $path);\n }", "static public function dispatchEvent(slEvent &$event) {\n if (!self::hasListeners($event->getName())) return false;\n\n $event->setState(slEventState::FIRED);\n foreach(self::$listeners[$event->getName()] as $listener) {\n if (is_array($listener)) {\n call_user_func($listener, $event);\n } else {\n $method = 'on'.slInflector::camelCase($event->getName());\n if (method_exists($listener,$method)) {\n $listener->$method($event);\n }\n }\n if ($event->isStopped()) return false;\n\n }\n $event->setState(slEventState::FINISHED);\n return true;\n }", "public function triggerEvent($eventId);", "public function test_ouwiki_core_calendar_provide_event_action() {\n // Create the activity.\n $course = $this->getDataGenerator()->create_course();\n $ouwiki = $this->getDataGenerator()->create_module('ouwiki', ['course' => $course->id]);\n\n // Create a calendar event.\n $event = $this->create_action_event($course->id, $ouwiki->id,\n \\core_completion\\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED);\n\n // Create an action factory.\n $factory = new \\core_calendar\\action_factory();\n\n // Decorate action event.\n $actionevent = mod_ouwiki_core_calendar_provide_event_action($event, $factory);\n\n // Confirm the event was decorated.\n $this->assertInstanceOf('\\core_calendar\\local\\event\\value_objects\\action', $actionevent);\n $this->assertEquals(get_string('view'), $actionevent->get_name());\n $this->assertInstanceOf('moodle_url', $actionevent->get_url());\n $this->assertEquals(1, $actionevent->get_item_count());\n $this->assertTrue($actionevent->is_actionable());\n }", "public function testGetSubscribedEvents0()\n{\n\n $actual = $this->consoleHandler->getSubscribedEvents();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSettingEventDispatcher()\n {\n $mockEventDispatcher= new MockEventDispatcher();\n $transport = new Transport();\n $returnObject = $transport->setEventDispatcher($mockEventDispatcher);\n $this->assertInstanceOf(Transport::class, $returnObject);\n \n $refTransport = new \\ReflectionObject($transport);\n $eventDispatcher = $refTransport->getProperty('eventDispatcher');\n $eventDispatcher->setAccessible(true);\n $this->assertSame($mockEventDispatcher, $eventDispatcher->getValue($transport));\n }", "public function testGetSetEventDispatcher()\n {\n $mockEventDispatcher = new MockEventDispatcher();\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $clientProperty = $refTransport->getProperty('eventDispatcher');\n $clientProperty->setAccessible(true);\n $clientProperty->setValue($transport, $mockEventDispatcher);\n $this->assertSame($mockEventDispatcher, $transport->getEventDispatcher());\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testComAdobeCqCloudconfigCoreImplConfigurationReplicationEventHandle()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.cloudconfig.core.impl.ConfigurationReplicationEventHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function runNotifications():void;", "public function dispatchEvent($name, Event $event = null);", "private function mockDispatch(ObjectProphecy $prophecy, $event, $eventName): MethodProphecy\n {\n if (class_exists(LegacyEventDispatcherProxy::class)) {\n // New Symfony 4.3 EventDispatcher signature\n return $prophecy->dispatch($event, $eventName)->willReturn();\n }\n\n // Old EventDispatcher signature\n return $prophecy->dispatch($eventName, $event)->willReturn();\n }", "public function testInstanceOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->event);\n }", "function testSecondEventObserver($data) {\n return $data;\n}" ]
[ "0.77085", "0.7282865", "0.69786185", "0.68518674", "0.6836486", "0.68063074", "0.6661304", "0.65491754", "0.65007126", "0.6484004", "0.64833546", "0.64133465", "0.639523", "0.6303966", "0.6281974", "0.62275475", "0.62245667", "0.6221535", "0.6183446", "0.6105046", "0.61026925", "0.60995287", "0.60306466", "0.6008012", "0.5957979", "0.5948604", "0.59460914", "0.59410983", "0.5936825", "0.5923776", "0.5912245", "0.5857454", "0.5842885", "0.5842135", "0.5831879", "0.57892966", "0.5776682", "0.57728285", "0.57687485", "0.57686764", "0.5695648", "0.5674184", "0.5662431", "0.56523746", "0.56344336", "0.56325525", "0.56323916", "0.562843", "0.5621546", "0.56013596", "0.5586439", "0.55756235", "0.5566528", "0.55619574", "0.5558674", "0.5536287", "0.55319214", "0.55312496", "0.5527782", "0.55251646", "0.551891", "0.55128175", "0.55108535", "0.5508083", "0.5501894", "0.54952097", "0.54930747", "0.5476288", "0.54718834", "0.5469549", "0.54687625", "0.54646504", "0.54646504", "0.5460606", "0.54576266", "0.5454712", "0.5452581", "0.5438359", "0.5428499", "0.54232365", "0.5422899", "0.54228395", "0.5416541", "0.540663", "0.54064655", "0.54038477", "0.5393873", "0.53930575", "0.5384927", "0.53733176", "0.537326", "0.5372197", "0.53627133", "0.536258", "0.5359366", "0.5351507", "0.5345267", "0.53431004", "0.534003", "0.53349966" ]
0.7240296
2
Test dispatch and event name in disabled list
public function testDispatchWithEventNameIsDisabledForNotify() { $event = new EventTested(); $this->eventDispatcher->expects($this->once()) ->method('dispatch') ->with('disable_event', $event); $this->notifier->expects($this->never()) ->method('supportsObject') ->with($event, 'foo'); $this->notifier->expects($this->never()) ->method('notify'); $this->notifierProxy->dispatch('disable_event', $event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkDisableFunctions() {}", "final public function allowsEvents() {\n\t\treturn false;\n\t}", "protected function getDisableActions() {}", "function isEnabled($name);", "public function testDispatchEvents()\n {\n $this->uut->dispatch($this->buildRequest('/default'));\n\n $this->assertArrayHasKey(OnPreDispatch::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostRoute::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostDispatch::class, self::$lastEvents);\n }", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "public function testEventCallBackGetMacros()\n {\n }", "public function testGetEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function executeDisabled()\n {\n }", "public function getEventDispatch();", "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "public function shouldntRaiseAnEvent()\n {\n }", "public function testDispatchWithNotifierNotSupportEvent()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('foo', $event)\n ->will($this->returnValue($event));\n\n $this->notifier->expects($this->once())\n ->method('supportsObject')\n ->with($event, 'foo')\n ->will($this->returnValue(false));\n\n $this->notifier->expects($this->never())\n ->method('notify');\n\n $this->notifierProxy->dispatch('foo', $event);\n }", "public function testOrgApacheSlingEventImplEventingThreadPool()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.event.impl.EventingThreadPool';\n\n $crawler = $client->request('POST', $path);\n }", "private function _callEvent($eventName){\n\t\tif(self::$_disableEvents==false){\n\t\t\tif(method_exists($this, $eventName)){\n\t\t\t\tif($this->{$eventName}()===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(isset($this->{$eventName})){\n\t\t\t\t\t$method = $this->{$eventName};\n\t\t\t\t\tif($this->$method()===false){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function disable(int $events): bool {}", "function GetExcludedEvents();", "abstract public function getEventName();", "public function testGetEvents()\n {\n }", "public function testGetEvent()\n {\n }", "abstract function HookEvents();", "protected static function allowedEvents()\n\t{\n\t\treturn array(\n\t\t\t\t\t\t'onclick',\n\t\t\t\t\t\t'ondblclick',\n\t\t\t\t\t\t'onmousedown',\n\t\t\t\t\t\t'onmouseup',\n\t\t\t\t\t\t'onmouseover',\n\t\t\t\t\t\t'onmousemove',\n\t\t\t\t\t\t'onmouseout',\n\t\t\t\t\t\t'onkeypress',\n\t\t\t\t\t\t'onkeydown',\n\t\t\t\t\t\t'onkeyup'\n\t\t\t\t\t);\n\t}", "public function disabled();", "public function disabled();", "public function testDisabled() {\n Data::setOption('safe', 'MarkSafe() > value');\n\n $listener = new PatternLabListener();\n $listener->processSafeData();\n\n $safe = Data::getOption('safe');\n $this->assertSame('MarkSafe() > value', $safe);\n }", "public function isDisabledFunction($name) {\n static $disabledFunctions;\n if (!$disabledFunctions) {\n $disabledFunctions = ini_get('disable_functions');\n $delimiter = strpos($disabledFunctions, ',') !== false ? ',' : ' ';\n $disabledFunctions = explode($delimiter, $disabledFunctions);\n $disabledFunctions = array_map('trim', $disabledFunctions);\n }\n\n return in_array($name, $disabledFunctions);\n }", "public function testDisableTriggersWhenEnabledConfigNotChanged()\n {\n $this->setupPhp5();\n\n $fixtures = [\n 'update_klevuproductsync_for_cpip',\n 'update_klevuproductsync_for_lsa',\n 'update_klevuproductsync_for_cpp',\n ];\n\n /** @var RequestProxy $request */\n $request = $this->getRequest();\n $request->setParam('section', 'klevu_search');\n $request->setMethod('POST');\n $request->setPostValue([\n 'groups' => [\n 'developer' => [\n 'fields' => [\n 'trigger_options_info' => [\n 'value' => 0,\n ],\n ],\n ],\n ],\n ]);\n\n $this->dispatch($this->getAdminFrontName() . '/admin/system_config/save');\n $response = $this->getResponse();\n\n $this->assertTrue($response->isRedirect(), 'Response is redirect');\n\n $existingTriggerNames = $this->getExistingTriggerNames();\n foreach ($fixtures as $fixtureTriggerName) {\n $this->assertFalse(\n in_array($fixtureTriggerName, $existingTriggerNames, true),\n sprintf('Assert trigger \"%s\" exists', $fixtureTriggerName)\n );\n }\n }", "function qa_clicked($name)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn isset($_POST[$name]) || isset($_POST[$name . '_x']) || (qa_post_text('qa_click') == $name);\n}", "public function testGetInvalidEventName (): void {\n // grab an name that does not exist\n $event = Event::getEventByEventName($this->getPDO(), \"omgmynameisLuther\");\n $this->assertEmpty($event);\n }", "public function disable( $name );", "function perform_action($action_name, ...$args){\n global $_lms_action_arr;\n if(!empty($_lms_action_arr[$action_name])){\n $func_names = $_lms_action_arr[$action_name];\n print_r($func_names);\n foreach($func_names as $func){\n if(!empty($func)){\n //Handles the bug when a hook is not properly dequeued.\n call_user_func_array($func['name'], $args);\n }\n\n }\n }\n\n}", "protected function toggleDisableAction() {}", "public function support($name) {\n\t\t$this->enable_or_disable($name, true);\n\t}", "public function test_events_are_not_triggered_for_invalid_entities() {\n $client = m::mock('\\GuzzleHttp\\Client');\n $client->shouldReceive('createRequest')->never();\n $client->shouldReceive('send')->never();\n $course = $this->getDataGenerator()->create_course();\n $return = $this->_app['dragdrop_event']->handle_event('sentence', array(), NOGROUPS, m::mock('dragdrop_user'), m::mock('dragdrop_model_manager'), $client);\n $this->assertEmpty($return);\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "public function shouldDiscoverEvents(): bool\n {\n return false;\n }", "public function enable(int $events): bool {}", "public function testDisableTriggersWhenNotEnabledConfigChanged()\n {\n $this->setupPhp5();\n\n $fixtures = [\n 'update_klevuproductsync_for_cpip',\n 'update_klevuproductsync_for_lsa',\n 'update_klevuproductsync_for_cpp',\n ];\n $this->removeTriggers($fixtures);\n\n /** @var RequestProxy $request */\n $request = $this->getRequest();\n $request->setParam('section', 'klevu_search');\n $request->setMethod('POST');\n $request->setPostValue([\n 'groups' => [\n 'developer' => [\n 'fields' => [\n 'trigger_options_info' => [\n 'value' => 0,\n ],\n ],\n ],\n ],\n ]);\n\n $this->dispatch($this->getAdminFrontName() . '/admin/system_config/save');\n $response = $this->getResponse();\n\n $this->assertTrue($response->isRedirect(), 'Response is redirect');\n\n $existingTriggerNames = $this->getExistingTriggerNames();\n foreach ($fixtures as $fixtureTriggerName) {\n $this->assertFalse(\n in_array($fixtureTriggerName, $existingTriggerNames, true),\n sprintf('Assert fixture \"%s\" does not exist', $fixtureTriggerName)\n );\n }\n }", "public static function event_method()\n {\n return true;\n }", "public function testDisableTriggersWhenNotEnabledConfigNotChanged()\n {\n $this->setupPhp5();\n\n $fixtures = [\n 'update_klevuproductsync_for_cpip',\n 'update_klevuproductsync_for_lsa',\n 'update_klevuproductsync_for_cpp',\n ];\n $this->removeTriggers($fixtures);\n\n /** @var RequestProxy $request */\n $request = $this->getRequest();\n $request->setParam('section', 'klevu_search');\n $request->setMethod('POST');\n $request->setPostValue([\n 'groups' => [\n 'developer' => [\n 'fields' => [\n 'trigger_options_info' => [\n 'value' => 0,\n ],\n ],\n ],\n ],\n ]);\n\n $this->dispatch($this->getAdminFrontName() . '/admin/system_config/save');\n $response = $this->getResponse();\n\n $this->assertTrue($response->isRedirect(), 'Response is redirect');\n\n $existingTriggerNames = $this->getExistingTriggerNames();\n foreach ($fixtures as $fixtureTriggerName) {\n $this->assertFalse(\n in_array($fixtureTriggerName, $existingTriggerNames, true),\n sprintf('Assert fixture \"%s\" does not exist', $fixtureTriggerName)\n );\n }\n }", "public function canBeDisabledAndEnabled() {}", "public static function events();", "public function testDispatchWithNotifierSupportEvent()\n {\n $event = new EventTested();\n\n $this->eventDispatcher->expects($this->once())\n ->method('dispatch')\n ->with('foo', $event)\n ->will($this->returnValue($event));\n\n $this->notifier->expects($this->once())\n ->method('supportsObject')\n ->with($event, 'foo')\n ->will($this->returnValue(true));\n\n $this->notifier->expects($this->once())\n ->method('notify')\n ->with($event, 'foo');\n\n $this->notifierProxy->dispatch('foo', $event);\n }", "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "public function test_filters_automatic_updater_disabled()\n {\n }", "public function getEventNameAllowableValues()\n {\n return [\n self::EVENT_NAME_EMAIL_RECEIVED,\n self::EVENT_NAME_NEW_EMAIL,\n self::EVENT_NAME_NEW_CONTACT,\n self::EVENT_NAME_NEW_ATTACHMENT,\n self::EVENT_NAME_EMAIL_OPENED,\n self::EVENT_NAME_EMAIL_READ,\n self::EVENT_NAME_DELIVERY_STATUS,\n self::EVENT_NAME_BOUNCE,\n self::EVENT_NAME_BOUNCE_RECIPIENT,\n self::EVENT_NAME_NEW_SMS,\n ];\n }", "public function isDisabled($name)\n {\n return in_array($name, $this->except);\n }", "public function isDisabled() {}", "public function getTriggeringEvents();", "public function test_event_notification_with_unexisting_method()\n {\n $this->event_notification_helper('unexisting_method', true);\n }", "public function testDisableTriggersWhenEnabledConfigChanged()\n {\n $this->setupPhp5();\n\n $fixtures = [\n 'update_klevuproductsync_for_cpip',\n 'update_klevuproductsync_for_lsa',\n 'update_klevuproductsync_for_cpp',\n ];\n $this->createTriggers($fixtures);\n\n /** @var RequestProxy $request */\n $request = $this->getRequest();\n $request->setParam('section', 'klevu_search');\n $request->setMethod('POST');\n $request->setPostValue([\n 'groups' => [\n 'developer' => [\n 'fields' => [\n 'trigger_options_info' => [\n 'value' => 0,\n ],\n ],\n ],\n ],\n ]);\n\n $this->dispatch($this->getAdminFrontName() . '/admin/system_config/save');\n $response = $this->getResponse();\n\n $this->assertTrue($response->isRedirect(), 'Response is redirect');\n\n $existingTriggerNames = $this->getExistingTriggerNames();\n foreach ($fixtures as $fixtureTriggerName) {\n $this->assertFalse(\n in_array($fixtureTriggerName, $existingTriggerNames, true),\n sprintf('Assert fixture \"%s\" does not exist', $fixtureTriggerName)\n );\n }\n }", "public function event($name, $payload = null) {\n foreach($this->eventhandlers as $handler) {\n if($name == $handler[0]) {\n if($handler[2] === null) {\n $handler[2] = $this;\n }\n $tmp_string_php7lol = (string)$handler[1];\n $handler[2]->$tmp_string_php7lol($payload);\n }\n }\n foreach($this->until as $key => $until) {\n if(is_array($until)) {\n if(in_array($name, $until)) {\n $this->until_payload[$key][] = array($name, $payload);\n if(!isset($this->until_count[$key])) {\n $this->until_count[$key] = 0;\n }\n $this->until_count[$key] += 1;\n }\n }\n }\n }", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "function disable($target = 'core');", "private function registered_events () {\n\n\t\t$triggers = array();\n\n\t\tforeach( get_option( 'nce_triggers' ) as $trigger => $enabled ) {\n\n\t\t\tif( $enabled == \"1\" ) {\n\n\t\t\t\t$triggers[] = $trigger;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $triggers;\n\n\t}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function testEventCallBackPatch()\n {\n }", "function block_eventsengine_handler($event) {\n global $DB;\n // Need an array to track events because another observed event could be triggered, ...\n // Indirectly by this event handler, delaying/unsequencing the event order.\n static $previousevents = [];\n $encodedevent = @json_encode($event->get_data());\n if (in_array($encodedevent, $previousevents)) {\n if (debugging('', DEBUG_DEVELOPER)) {\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}):\".\n ' Aborting multiple trigger. (stored '.count($previousevents).')');\n }\n return true; // Prevent multiple plugins triggering same callback (this).\n }\n $previousevents[] = $encodedevent;\n $assigns = $DB->get_records('block_eventsengine_assign', ['event' => $event->eventname]);\n if (debugging('', DEBUG_DEVELOPER)) {\n ob_start();\n var_dump($previousevents);\n $tmp = ob_get_contents();\n ob_end_clean();\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): INFO: previousevents[] = {$tmp}\");\n }\n foreach ($assigns as $assign) {\n if ($assign->disabled) {\n continue;\n }\n $pluginengs = explode(':', $assign->engine, 2);\n $enginedisabled = $DB->get_field('block_eventsengine_events', 'disabled', ['engine' => $pluginengs[1],\n 'plugin' => $pluginengs[0]]);\n if (!empty($enginedisabled)) {\n continue;\n }\n $engine = block_eventsengine_get_engine_def($assign->engine, $event->eventname);\n if (empty($engine)) {\n continue;\n }\n $pluginacts = explode(':', $assign->action, 2);\n $actiondisabled = $DB->get_field('block_eventsengine_actions', 'disabled', ['action' => $pluginacts[1],\n 'plugin' => $pluginacts[0]]);\n if (!empty($actiondisabled)) {\n continue;\n }\n $actiondef = block_eventsengine_get_action_def($assign->action);\n if (empty($actiondef)) {\n continue;\n }\n try {\n $available = (empty($engine['available']) || $engine['available']()) && (empty($actiondef['available']) || $actiondef['available']());\n } catch (Exception $e) {\n $available = false;\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): assign id = {$assign->id}\".\n ' - Exception in available(): '.$e->getMessage());\n }\n if ($available) {\n try {\n $enginedata = !empty($assign->enginedata) ? (object)@unserialize($assign->enginedata) : null;\n if (($contextid = $engine['ready']($event, $enginedata))) {\n $actiondata = !empty($assign->actiondata) ? (object)@unserialize($assign->actiondata) : null;\n $actiondef['trigger']($contextid, $actiondata, $event);\n }\n } catch (Exception $e) {\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): assign id = {$assign->id} -\".\n ' Exception in engine::ready() or action::trigger(): '.$e->getMessage());\n }\n }\n }\n return true;\n}", "public function onDisable() {\n\t}", "public function isAppEventEnabled()\n {\n return true;\n }", "public function hasEventQueue(/*# string */ $eventName)/*# : bool */;", "function acf_is_doing($event = '', $context = '')\n{\n}", "public function is_disabled()\n {\n }", "public function hasEventHandler($name)\r\n\t{\r\n\t\t$name=strtolower($name);\r\n\t\treturn isset($this->_e[$name]) && $this->_e[$name]->getCount()>0;\r\n\t}", "public function is_enableable();", "public function test_event_notification_with_failed_notification()\n {\n $this->event_notification_helper('failed_event_method', false);\n }", "public function get_test_scheduled_events()\n {\n }", "public function testUnsupportedFeatures()\n {\n $notSupported = [\n 'getPublishedList' => function () { return $this->api->getPublishedList(); },\n 'create' => function () { return $this->api->create([]); },\n 'edit' => function () { return $this->api->edit('x', []); },\n 'delete' => function () { return $this->api->delete('x'); },\n ];\n foreach ($notSupported as $key => $closure) {\n $response = $closure();\n $this->assertTrue(!empty($response['errors']), 'Should contain Error element');\n $this->assertEquals($response['errors'][0]['code'], 500, 'Should contain code 500');\n $this->assertEquals($response['errors'][0]['message'], $key.' is not supported at this time.', 'Should be equal');\n }\n }", "public function disableFor($name)\n {\n $this->except = array_merge($this->except, (array) $name);\n }", "public function disableFor($name)\n {\n $this->except = array_merge($this->except, (array) $name);\n }", "public function testEventCallBackGetItem()\n {\n }", "public function test_form_submit_onevents()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", false)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasErrors('onEvents');\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", false)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertHasNoErrors('onEvents');\n\n $hintsTest =[];\n $hint = \"You selected all 3 options: 'on Push', 'on Pull Request', and 'Manual Trigger'.\";\n $hint = $hint . \" I suggest you to select 'Manual Trigger' OR 'on push / on pull request'.\";\n $hintsTest[] = $hint;\n $hintsTest[] =\"I selected automatically a 'Manual Trigger' for you.\";\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", true)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', $hintsTest);\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"Test\")\n ->set(\"manualTrigger\", false)\n ->set(\"onPush\", true)\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertSet('hints', []);\n }", "public static function disableEvents($disableEvents){\n\t\tself::$_disableEvents = $disableEvents;\n\t}", "function enable($target = 'core');", "function before_enable() { }", "function isEnabled();", "function isEnabled();", "public function test_do_action_no_params() {\n $hook = rand_str();\n yourls_add_action( $hook, array( $this, 'accept_multiple_params' ) );\n\n $this->expectOutputString( \"array (0 => '',)\" );\n yourls_do_action( $hook );\n }", "function isEnabled ();", "public function isDisabled()\n {\n }", "public function getEventHandlers($name)\n\t{\n\t\tif(strncasecmp($name,'on',2)===0&&method_exists($this,$name))\n\t\t{\n\t\t\t$name=strtolower($name);\n\t\t\tif(!isset($this->_e[$name]))\n\t\t\t\t$this->_e[$name]=new TPriorityList;\n\t\t\treturn $this->_e[$name];\n\t\t}\n\t\telse if(strncasecmp($name,'fx',2)===0)\n\t\t{\n\t\t\t$name=strtolower($name);\n\t\t\tif(!isset(self::$_ue[$name]))\n\t\t\t\tself::$_ue[$name]=new TPriorityList;\n\t\t\treturn self::$_ue[$name];\n\t\t}\n\t\telse if($this->_m!==null&&$this->_behaviorsenabled)\n\t\t{\n\t\t\tforeach($this->_m->toArray() as $behavior)\n\t\t\t{\n\t\t\t\tif((!($behavior instanceof IBehavior)||$behavior->getEnabled())&&$behavior->hasEvent($name))\n\t\t\t\t\treturn $behavior->getEventHandlers($name);\n\t\t\t}\n\t\t}\n\t\tthrow new TInvalidOperationException('component_event_undefined',get_class($this),$name);\n\t}", "public function hasActions();", "public function isDisabled(string $name): bool\n {\n return in_array($name, $this->except);\n }", "public static function __events () {\n \n }", "public function getOtherEvents();", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function testEventCallBackGet()\n {\n }", "public function enable( $name );", "public static function failed_event_method()\n {\n return false;\n }", "public function testCanRegisterActionWithUnknownAccessLevel() {\n\t\t_elgg_services()->logger->disable();\n\t\t$this->assertTrue($this->actions->register('test/output', \"$this->actionsDir/output.php\", 'pblc'));\n\t\t$logged = _elgg_services()->logger->enable();\n\n\t\t$this->assertEquals([\n\t\t\t[\n\t\t\t\t'message' => 'Unrecognized value \\'pblc\\' for $access in Elgg\\\\ActionsService::register',\n\t\t\t\t'level' => Logger::ERROR,\n\t\t\t]\n\t\t\t\t], $logged);\n\n\t\t$actions = $this->actions->getAllActions();\n\t\t$this->assertArrayHasKey('test/output', $actions);\n\t\t$this->assertEquals([\n\t\t\t'file' => \"$this->actionsDir/output.php\",\n\t\t\t'access' => 'admin',\n\t\t\t\t], $actions['test/output']);\n\t}", "public function beforeDispatch(DispatchEvent $event);", "public function shouldDiscoverEvents()\n {\n return true;\n }", "private static function EventList ()\n {\n return array (\n \"a\" => array (),\n \"button\" => array (\n \"onblur\", \"onclick\", \"ondblclick\",\n \"onfocus\", \"onmousedown\", \"onmousemove\",\n \"onmouseout\", \"onmouseover\", \"onmouseup\",\n \"onkeydown\", \"onkeypress\", \"onkeyup\",\n ),\n );\n }", "public function disableButtons()\n\t{\n\t}", "public function testGetWebhookEvents()\n {\n }", "public function canBeEnabled();" ]
[ "0.6124215", "0.6076351", "0.59966105", "0.58803976", "0.5877575", "0.58018386", "0.5771938", "0.5737068", "0.57081234", "0.56724346", "0.5671866", "0.56586415", "0.5642557", "0.5576867", "0.55707306", "0.5538965", "0.55288213", "0.5515749", "0.55136687", "0.5470841", "0.5456685", "0.5454481", "0.5434905", "0.5434905", "0.54205686", "0.54109895", "0.54046136", "0.5393512", "0.53658855", "0.534189", "0.5328141", "0.53255445", "0.5319322", "0.53046733", "0.52722025", "0.5258507", "0.5257194", "0.5249668", "0.5248561", "0.52462626", "0.52413857", "0.52405095", "0.5231555", "0.523003", "0.520178", "0.5198856", "0.5175717", "0.5174285", "0.51676613", "0.5163624", "0.51509863", "0.51456183", "0.513811", "0.513811", "0.513811", "0.5124036", "0.5120346", "0.51202345", "0.51168823", "0.51143396", "0.5100615", "0.5096398", "0.509543", "0.50947237", "0.50937104", "0.5091234", "0.50898427", "0.50871307", "0.5084339", "0.50809664", "0.5064531", "0.5060351", "0.5060351", "0.5057749", "0.505708", "0.50513905", "0.5038212", "0.50376874", "0.50362945", "0.50362945", "0.50261337", "0.5025971", "0.5017902", "0.5012753", "0.50119877", "0.50117016", "0.5001", "0.49963322", "0.4994444", "0.49925917", "0.49903935", "0.49889144", "0.4988835", "0.498658", "0.49793878", "0.497411", "0.49708897", "0.49645752", "0.49522036", "0.4950395" ]
0.6821323
0
Save a new exchange rate
public function post(Request $request) { // Validate the form using Lumen's validation $this->validate($request, [ 'source' => 'required|different:target|exists:currencies,symbol', 'target' => 'required|different:source|exists:currencies,symbol', 'rate' => 'required|numeric', ]); // Validate the currencies $source = Currency::where('symbol', strtoupper($request->get('source')))->firstOrFail(); $target = Currency::where('symbol', strtoupper($request->get('target')))->firstOrFail(); $precision = env('APP_RATE_PRECISION', 4); $new = ExchangeRate::create([ 'source_id' => $source->id, 'target_id' => $target->id, 'rate' => round($request->get('rate'), $precision) ]); // Create the reverse rate ExchangeRate::create([ 'source_id' => $target->id, 'target_id' => $source->id, 'rate' => round(1 / $new->rate, $precision) ]); return $new; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function saveExchangeRate($exchangeRates, $baseCurrency) {\n $objEntityManager = $this->getDoctrine()->getManager();\n foreach ($exchangeRates->rates as $key => $exchangeRate) {\n $objExchangeRate = new ExchangeRates();\n $objExchangeRate->setBaseCurrency($baseCurrency);\n $objExchangeRate->setCurrency($key);\n $objExchangeRate->setExchangeRate(number_format((float) $exchangeRate, 2, '.', ''));\n $objExchangeRate->setCreatedDatetime(new \\DateTime('@' . strtotime('now')));\n $objEntityManager->persist($objExchangeRate);\n }\n $objEntityManager->flush();\n }", "public function save(array $rate) {\n\n $sql = \"INSERT INTO rate (currency, rate) VALUES (:currency, :rate) ON DUPLICATE KEY UPDATE `rate` = :rate\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute($rate);\n\n return;\n }", "public function setExchangeRate($exchangeRate);", "function UpdateExchangeRatesDB() {\n $time_now = TIMESTAMP_NOW;\n $rates = GetExchangeRateAPI();\n\n foreach ($rates[\"rates\"] as $currency => $rate) {\n // If exists, update rates of each currency\n // Otherwise, add new entry and set base\n if (CheckIfCurrencyExists($currency)) {\n $query = \"UPDATE conversion_rates SET rate='$rate', updated_at='$time_now' WHERE currency='$currency';\";\n } else {\n $query = \"INSERT INTO conversion_rates (currency, rate, created_at, updated_at) VALUES ('$currency', '$rate', '$time_now', '$time_now')\";\n }\n $GLOBALS['conn']->query($query);\n\n // Set base currency flag\n $base_rate = $rates['base'];\n $query = \"UPDATE conversion_rates SET is_base=true WHERE currency='$base_rate'\";\n $GLOBALS['conn']->query($query);\n }\n }", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "public function saveAction(){\n\t\t$this->__checkAuth();\n\t\t$this->_helper->layout->setLayout(\"empty\");\n\t\t$db = Zend_Registry::get(\"main_db\");\n\t\t$data = array();\n\t\tZend_Loader::loadClass(\"CreateRiskFreeRate\", array(FORMS_PATH));\n\t\t$form = new CreateRiskFreeRate();\n\t\t$this->_helper->layout->setLayout(\"empty\");\n\t\tif ($form->isValid($_POST)){\n\t\t\t$data = $form->getValues($_POST);\n\t\t\tZend_Loader::loadClass(\"RiskFreeRate\", array(MODELS_PATH));\n\t\t\t$riskFreeRateTable = new RiskFreeRate();\n\t\t\t$foundRiskFreeRate = $riskFreeRateTable->fetchRow($riskFreeRateTable->select()->where(\"year = ?\", $data[\"year\"])->where(\"month = ?\", $data[\"month\"]));\n\t\t\tif ($foundRiskFreeRate){\n\t\t\t\t$riskFreeRateTable->update($data, $riskFreeRateTable->getAdapter()->quoteInto(\"id = ?\", $foundRiskFreeRate->id));\n\t\t\t}else{\n\t\t\t\t$riskFreeRateTable->insert($data);\n\t\t\t}\n\t\t}\n\t}", "function updateCurrency($currency) {\n $el = $this->findElByCode($currency[\"code\"]);\n $el->rate = $currency[\"rate\"];\n $el->timestamp = $currency[\"timestamp\"];\n $this->writeCurrenciesToFile();\n }", "private function _storeRateInSession($entity)\n {\n $this->session->write('CurrencyConverter.' . $entity->get('from_currency') . '-' . $entity->get('to_currency'), [\n 'rate' => $entity->get('rate'),\n 'modified' => $entity->get('modified')->i18nFormat('yyyy-MM-dd HH:mm:ss')\n ]);\n }", "private function getExchangeRates() {\n$values=array();\n$exchangeRateXML=simplexml_load_file($this->xml);\n\n // Increased the DECIMAL(precision, scale) in create.sql to handle weaker currencies, such as the VND\n foreach ($exchangeRateXML->conversion as $conversion) {\n $values[]='(\"' . (string)$conversion->currency . '\", ' . (float)$conversion->rate . ')';\n}\n\n// TO DO: Write ON DUPLICATE KEY UPDATE statement to prevent duplicating rows each time query is performed.\n$this->mysqli->query('INSERT INTO currencyrates (currencyType, currencyRate) VALUES ' . implode(',', $values));\n}", "public function save_currency() {\n\t\t// Validate nonce\n\t\tforminator_validate_ajax( \"forminator_save_popup_currency\" );\n\n\t\tupdate_option( \"forminator_currency\", sanitize_text_field( $_POST['currency'] ) );\n\t\twp_send_json_success();\n\t}", "public function getExchangeRate();", "public function setRate($rate) {\n $this->rate = $rate;\n }", "public function store(StoreRateRequest $request)\n {\n \n Rate::create($request->all());\n\n return response()->json('New rate was created successefully', Response::HTTP_CREATED);\n }", "public function setStoreToOrderRate($rate);", "public function setExchangeRate(string $exchangeRate)\n\t{\n\t\t$this->exchangeRate=$exchangeRate; \n\t\t$this->keyModified['exchange_rate'] = 1; \n\n\t}", "function getExchangeRate($currency);", "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "public function savedecimalrate(Request $request)\n {\n if (!$this->isAuthorized) {\n return prepareResult(true, [], [], \"User not authenticate\", $this->unauthorized);\n }\n\n $input = $request->json()->all();\n $validate = $this->validations($input, \"add\");\n if ($validate[\"error\"]) {\n return prepareResult(false, [], $validate['errors']->first(), \"Error while validating decimal rate\", $this->unprocessableEntity);\n }\n\n \\DB::beginTransaction();\n try {\n\t\t\t$Decimalrate = Decimalrate::first();\n\t\t\tif(!is_object($Decimalrate)){\n\t\t\t\t$Decimalrate = new Decimalrate;\n\t\t\t}\n $Decimalrate->decimal_rate = $request->decimal_rate;\n $Decimalrate->save();\n\n \\DB::commit();\n return prepareResult(true, $Decimalrate, [], \"Decimal rate saved successfully\", $this->created);\n } catch (\\Exception $exception) {\n \\DB::rollback();\n return prepareResult(false, [], $exception->getMessage(), \"Oops!!!, something went wrong, please try again.\", $this->internal_server_error);\n } catch (\\Throwable $exception) {\n \\DB::rollback();\n return prepareResult(false, [], $exception->getMessage(), \"Oops!!!, something went wrong, please try again.\", $this->internal_server_error);\n }\n }", "public function get_rates(){\n\n \n $endpoint = 'live';\n $access_key = '6b976c41ce198b8b5d28f7890bd447f9';\n // Initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Store the data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $exchangeRates = json_decode($json, true);\n \n #calculate the inverse rates \n\n #calculate ZAR -> USD Rate \n $zar_usd = 1 / $exchangeRates['quotes']['USDZAR'];\n # ZAR -> GBP\n $gbp_usd = (1 / $exchangeRates['quotes']['USDGBP']);\n $zar_gdp = $zar_usd / $gbp_usd;\n #ZAR->EUR\n $eur_usd = (1 / $exchangeRates['quotes']['USDEUR']);\n $zar_eur = $zar_usd / $eur_usd;\n #ZAR->KES\n $kes_usd = (1 / $exchangeRates['quotes']['USDKES']);\n $zar_kes = $zar_usd / $kes_usd;\n\n \n $updated_rates = array(\n array(\n 'er_id' => 1 , // ZAR -> GBP\n 'er_rate' => $zar_gdp \n ),\n array(\n 'er_id' => 2 , // ZAR -> EUR\n 'er_rate' => $zar_eur\n ),\n array(\n 'er_id' => 3 , // ZAR -> EUR\n 'er_rate' => $zar_kes\n ),\n array(\n 'er_id' => 4 , // ZAR -> EUR\n 'er_rate' => $zar_usd\n )\n );\n \n #batch update db\n $this->ExchangeRate->update_rates($updated_rates);\n\n echo \"Your exchange rates have been successfully updated\";\n\n // else do some exception handling here\n }", "public function store(Request $request)\n {\n //\n return AirlineRate::create([\n 'rate' => $request['rate'],\n 'date' => NOW(),\n 'day' => NOW(),\n 'user_id' => Auth::user()->id\n ]);\n }", "public function save($check_notify = false)\n {\n // set the currency for the forecast to always be the base currency\n // since the committed end point only sends the data as the base currency format\n if(empty($this->currency_id)) {\n // use user preferences for currency\n $currency = SugarCurrency::getBaseCurrency();\n $this->currency_id = $currency->id;\n } else {\n $currency = SugarCurrency::getCurrencyByID($this->currency_id);\n }\n $this->base_rate = $currency->conversion_rate;\n\n parent::save($check_notify);\n }", "public function store(Request $request)\n {\n request()->validate([\n 'value' => 'required|numeric',\n 'name' => 'required',\n 'date' => 'required',\n ],[\n\n 'value.required' => 'Rate is required',\n 'value.numeric' => ' Rate must be a number',\n\n\n\n ]);\n\n $tax = $request->all();\n $date=date_create($tax['date']);\n $format = date_format($date,\"Y-m-d\");\n $tax['date'] = strtotime($format);\n CurrencyExchange::create($tax);\n\n\n return redirect()->route('currency-exchange.index')\n ->with('success','Rate has been added successfully.');\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function setStoreToBaseRate($rate);", "public function setRate(?string $rate): void\n {\n $this->rate = $rate;\n }", "public function setRate(?string $rate): void\n {\n $this->rate = $rate;\n }", "function CreateTravelRate() {\r\n $conn = conn();\r\n $sql = \"INSERT INTO `travelrates`(`TravelCode`, `TravelAmount`, `Modified`, `ModifiedBy`) \r\n VALUES ('$this->TravCode','$this->TravRate',NOW(),'$this->ModifiedBy')\";\r\n if ($conn->exec($sql)) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n $conn = NULL;\r\n }", "public function store(Request $request)\n { \n $default_currency = Currency::default();\n $exchange_rate_id = $default_currency->id;\n $selected_currency = Currency::findOrFail($request->current_currency_id);\n $exchange_rate = CurrencyExchangeRate::currentRate($selected_currency->id);\n $calculation = ($selected_currency->calculation == 'multiplication') ? 'divide' : 'multiplication';\n $rate = 1;\n \n // Start transaction!\n DB::beginTransaction();\n\n try {\n // ...\n $quotation = new Quotation();\n $quotation->quotation_number = config('global.codes.quotation');\n $quotation->customer_id = $request->customer_id;\n $quotation->quotation_date = \\Carbon\\Carbon::now();\n $quotation->validity_date = $request->validity;\n $quotation->payment_term_id = $request->payment_term_id;\n $quotation->delivery_method_id = $request->delivery_method_id; \n $quotation->amount = $request->amount;\n $quotation->tax = $request->pay_tax;\n $quotation->discount = $request->discount;\n $quotation->discount_amount = $request->discount_amount;\n $quotation->grand_total = $request->grand_total;\n $quotation->rate = $rate;\n $quotation->currency_id = $default_currency->id;\n // ...\n // exchange money to default currency if the selected currency is not default currency\n if($default_currency->id != $selected_currency->id) { \n $rate = $exchange_rate->rate;\n $quotation->amount = $this->exchangeRate($calculation, $request->amount, $rate);\n $quotation->tax = $this->exchangeRate($calculation, $request->pay_tax, $rate);\n $quotation->discount_amount = $this->exchangeRate($calculation, $request->discount_amount, $rate);\n $quotation->grand_total = $this->exchangeRate($calculation, $request->grand_total, $rate);\n $quotation->rate = $rate;\n $quotation->is_default_currency = 0;\n $quotation->currency_id = $selected_currency->id;\n }\n\n $quotation->save();\n\n // retreive the id and combine with the quotation code\n $quotation->quotation_number = $quotation->quotation_number.$quotation->id;\n $quotation->save();\n // ...\n // create quotation details reference to quotation id above\n foreach ($request->product_id_array as $key => $value) {\n $detail = new QuotationDetail();\n $detail->quotation_id = $quotation->id;\n $detail->product_id = $request->product_id_array[$key];\n $detail->product_name = $request->product_name_array[$key];\n $detail->notes = $request->description_array[$key];\n $detail->variant_ids = $request->variant_ids[$key];\n $detail->qty = $request->qty_array[$key];\n $detail->unit_price = $request->price_array[$key];\n $detail->tax = $request->tax_array[$key];\n $detail->pay_tax = $request->pay_tax_array[$key];\n $detail->discount = $request->discount_array[$key];\n $detail->discount_amount = $request->discount_amount_array[$key];\n $detail->subtotal = $request->subtotal_array[$key];\n // ...\n // exchange money to default currency if the selected currency is not default currency\n if($default_currency->id != $selected_currency->id) { \n $detail->pay_tax = $this->exchangeRate($calculation, $request->pay_tax_array[$key], $rate);\n $detail->discount_amount = $this->exchangeRate($calculation, $request->discount_amount_array[$key], $rate);\n $detail->unit_price = $this->exchangeRate($calculation, $request->price_array[$key], $rate);\n $detail->subtotal = $this->exchangeRate($calculation, $request->subtotal_array[$key], $rate);\n } \n\n $detail->save();\n }\n\n } catch(\\Exception $e)\n {\n DB::rollback();\n throw $e;\n }\n\n DB::commit(); \n return response()->json([ 'quotation' => $quotation, 'status' => 'success']); \n }", "function store()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n $this->Name = $db->escapeString( $this->Name );\r\n $this->Sign = $db->escapeString( $this->Sign );\r\n\r\n if ( $this->Value == \"\" )\r\n {\r\n $this->Value = 1;\r\n }\r\n \r\n if ( !isset( $this->ID ) )\r\n {\r\n $timeStamp =& eZDateTime::timeStamp( true );\r\n $db->lock( \"eZTrade_AlternativeCurrency\" );\r\n $nextID = $db->nextID( \"eZTrade_AlternativeCurrency\", \"ID\" );\r\n \r\n $res[] = $db->query( \"INSERT INTO eZTrade_AlternativeCurrency\r\n ( ID,\r\n\t\t Name,\r\n\t\t Sign,\r\n\t\t Value,\r\n\t\t Created,\r\n\t\t PrefixSign )\r\n VALUES\r\n\t\t ( '$nextID',\r\n '$this->Name',\r\n\t\t '$this->Sign',\r\n\t\t '$this->Value',\r\n\t\t '$timeStamp',\r\n\t\t '$this->PrefixSign' )\" );\r\n $db->unlock();\r\n\t\t\t$this->ID = $nextID;\r\n }\r\n else\r\n {\r\n $res[] = $db->query( \"UPDATE eZTrade_AlternativeCurrency SET\r\n\t\t Name='$this->Name',\r\n\t\t Sign='$this->Sign',\r\n\t\t Value='$this->Value',\r\n\t\t Created=Created,\r\n\t\t PrefixSign='$this->PrefixSign'\r\n WHERE ID='$this->ID'\" );\r\n }\r\n\r\n eZDB::finish( $res, $db );\r\n return true;\r\n }", "public function setRates($rates)\n {\n $this->_rates = $rates;\n }", "public function getStoreToOrderRate();", "public function updateRates()\n {\n $client = new \\GuzzleHttp\\Client();\n\n foreach ($this->currencyRepository->all() as $currency) {\n if ($currency->code == config('app.currency')) {\n continue;\n }\n\n $result = $client->request('GET', $this->apiEndPoint . '?access_key='. $this->apiKey . '&base=' . config('app.currency') . '&symbols=' . $currency->code);\n\n $result = json_decode($result->getBody()->getContents(), true);\n\n if (\n isset($result['success'])\n && ! $result['success']\n ) {\n throw new \\Exception($result['error']['info'] ?? $result['error']['type'], 1);\n }\n\n if ($exchangeRate = $currency->exchange_rate) {\n $this->exchangeRateRepository->update([\n 'rate' => $result['rates'][$currency->code],\n ], $exchangeRate->id);\n } else {\n $this->exchangeRateRepository->create([\n 'rate' => $result['rates'][$currency->code],\n 'target_currency' => $currency->id,\n ]);\n }\n }\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function store()\n {\n if ($this->payableRate->fill(Input::all())->validate()) {\n if ($this->payableRate->addWithInput()) {\n return Redirect::route('accounting.payrates')->with('success', 'Billing Rate Added.');\n }\n }\n Session::flash('danger', 'There was an error adding the payable rate.');\n return Redirect::back()->withInput()->withErrors($this->billingRate->errors);\n }", "Function File_VoteDown_UploadInfo_Save($FileID){\n\t\t$database=DatabaseName();$StudentID=getuserid();\n\t\t$CurrentRate=File_Check_Userrate($FileID); \n\t\t\n\t\tif($CurrentRate=='no'){\t\t\t\n\t\t\t$query1=\"INSERT INTO `$database`.`filerating` (`FileID`, `StudentID`, `Rate`) VALUES ('$FileID', '$StudentID', '-1')\";\n\t\t\tmysql_query($query1);\n\t\t\t$Vote=File_VoteDown_UploadInfo_Get($FileID);$Vote++;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteDown` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\n\t\t\tmysql_query($query);\n\n\t\t}else if($CurrentRate==1 ){\n\t\t\n\t\t\t$query1=\"UPDATE `$database`.`filerating` SET `Rate` = '-1' WHERE `filerating`.`FileID` = $FileID AND `filerating`.`StudentID` = $StudentID\";\n\t\t\tmysql_query($query1);\n\n\t\t\t// Decrease Vote up by 1\n\t\t\t$Vote=File_VoteUp_UploadInfo_Get($FileID);$Vote--;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteUp` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\t\t\n\t\t\tmysql_query($query);\n\n\t\t\t// Increase Vote Down by 1\n\t\t\t$Vote=File_VoteDown_UploadInfo_Get($FileID);$Vote++;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteDown` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\n\t\t\tmysql_query($query);\n\t\t}\n\t}", "public function save_currency_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $currency_settings_val = $this->input->post(\"currency\");\n $config = '<?php ';\n foreach ($currency_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_currency_settings.php';\n file_put_contents($file, $config);\n $this->setErrorMessage('success', 'Currency settings updated successfully','admin_adminlogin_currency_setting_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_currency_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "function wcumcs_cron_currency_exchange_rate_update(){\r\n\t\r\n\tglobal $woocommerce_ultimate_multi_currency_suite;\r\n\t$action_data = array();\r\n\t$action_data['name'] = 'update_exchange_rates';\r\n\t$action_data['currency_data'] = array();\t\r\n\t\r\n\t$available_currencies_json = get_option('wcumcs_available_currencies');\r\n\t$available_currencies = json_decode($available_currencies_json, true);\r\n\t$requested_currencies_data = array();\r\n\t\r\n\tforeach ($available_currencies as $code => $currency_data){\r\n\t\t$requested_currencies_data[$code] = array();\r\n\t\t$exchange_api = get_option('wcumcs_exchange_api_' . $code);\r\n\t\t$requested_currencies_data[$code]['api'] = $exchange_api;\r\n\t}\r\n\t\r\n\t$action_data['currency_data'] = $requested_currencies_data;\r\n\t\r\n\t$woocommerce_ultimate_multi_currency_suite->callbacks->execute_action($action_data, true); // execute rates update\r\n\t\r\n\treturn true;\r\n\t\r\n}", "public function createMarketPrice(Request $request)\n {\n $market = CarbonPrice::where('active', 1)->first();\n\n // Check if the market prices have changed\n if(($market->credit_rate == $request->rate) && ($market->value == $request->price)){\n return response([\n 'state' => 'error',\n 'message'=>'You have updated the market prices with the same values.', \n 'data' => $market,\n ], 400); \n }\n\n // Update the status of the current price\n $market->update([\n 'active' => 0\n ]);\n // Create a new price\n $market = CarbonPrice::create([\n 'credit_rate' => $request->rate,\n 'value' => $request->price,\n ]);\n\n \t// Create a new carbon price instance\n \treturn response([\n \t\t'state' => 'success',\n 'message'=>'The market rate has been updated successfully.', \n 'data' => $market,\n \t], 200); \n }", "function createrate()\r\n {\r\n $this->set('suffix', 'shippingrates');\r\n $model = $this->getModel( $this->get('suffix') );\r\n \r\n $row = $model->getTable();\r\n $row->bind($_POST);\r\n if ( $row->save() ) \r\n {\r\n $model->clearCache();\r\n \r\n $dispatcher = JDispatcher::getInstance();\r\n $dispatcher->trigger( 'onAfterSave'.$this->get('suffix'), array( $row ) );\r\n } \r\n else \r\n {\r\n $this->messagetype = 'notice'; \r\n $this->message = JText::_('COM_TIENDA_SAVE_FAILED').\" - \".$row->getError();\r\n }\r\n \r\n $redirect = \"index.php?option=com_tienda&controller=shippingmethods&task=setrates&id={$row->shipping_method_id}&tmpl=component\";\r\n $redirect = JRoute::_( $redirect, false );\r\n \r\n $this->setRedirect( $redirect, $this->message, $this->messagetype );\r\n }", "Function UpdateRates()\n{\n\t$query = \"SELECT *,NOW()-(last_update) as dif from HB_lastupdate\";\n \t$res = mysql_query($query);\n\t\n\tif(!$res)\n\t{\n\t\treturn;\n\t}\n\t$ar = mysql_fetch_array($res);\n\t$mydif = (int)($ar[dif]/60) - 1440;\n\tprint \"+++++++++++++++++++++\";$mydif;\n\tif($mydif>0)\n\t{\n\t $fp = fopen(\"http://www.bankofcanada.ca/fmd/exchange.htm\",\"r\");\n\t $x=0;$g=0;\n\t while(!feof($fp))\n\t {\n\t $buf = fgets($fp, 4096);\n\t if(eregi(\"U.S. Dollar\",$buf)) $x=4;\n\t if(eregi(\"</PRE>\",$buf)) $x=0;\n\t if($x==4)\n\t {\n if(!eregi(\"US/CA\",$buf))\n {\n \t$ime = explode(\"/\",$buf);\n\t\tprint_r($ime);\n\t\tprint \"<BR>\";\n \t$s = explode(\" \",$ime[1]);\n \t$r = array_reverse ($s);\n\n \tif(eregi(\"Euro de\",$buf))\n \t{\n \t $ime[0]=\"European Monetary Union EURO\";\n \t $s = explode(\" \",$buf);\n \t $r = array_reverse ($s);\n \t}\n\n \tif($ime[0]<>\"\" and $r[0]<>\"\")\n \t{\n \t $g++;\n \t if(eregi(\"U.S. Dollar\",$buf)) {$koef = (float)$r[0];}\n \t $k = ((float)$r[0]/(float)$koef);\n \t $usd = 1/$k;\n \t $res = mysql_query(\"SELECT * FROM HB_rates WHERE sifra=\\\"$ime[0]\\\"\");\n \t $num = mysql_num_rows($res);\n \t if($num > 0)\n\t\t {\n \tmysql_query(\"UPDATE HB_rates SET rate='$usd' WHERE sifra=\\\"$ime[0]\\\"\");\n\t\t }\n\t\t else\n\t\t {\n \t//mysql_query(\"INSERT INTO HB_rates VAUES( \t\t\t\t\t\t NULL,\t\t\t\t\t\t '$usd', sifra=\\\"$ime[0]\\\"\");\n\t\t }\n \t}\n if(eregi(\"Venezuelan Bolivar\",$buf)) $x=0;\n }\n\t }\n\t }\n\t fclose($fp);\n\t mysql_query(\"UPDATE HB_lastupdate SET last_update=NOW();\");\n\t}\n}", "Function File_VoteUp_UploadInfo_Save($FileID){\n\t\t$CurrentRate=File_Check_Userrate($FileID);\n\t\t$database=DatabaseName();$StudentID=getuserid();\n\t\t \n\t\tif($CurrentRate=='no'){\t\t\t\n\t\t\t$query1=\"INSERT INTO `$database`.`filerating` (`FileID`, `StudentID`, `Rate`) VALUES ('$FileID', '$StudentID', '1')\";\n\t\t\tmysql_query($query1);\t\n\t\t\t$Vote=File_VoteUp_UploadInfo_Get($FileID);\n\t\t\t$Vote++;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteUp` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\t\t\n\t\t\tmysql_query($query);\n\t\t\t\n\t\t}else if($CurrentRate==-1 ){\n\t\t\t\n\t\t\t$query1=\"UPDATE `$database`.`filerating` SET `Rate` = '1' WHERE `filerating`.`FileID` = $FileID AND `filerating`.`StudentID` = $StudentID\";\n\t\t\tmysql_query($query1);\n\t\t\t\n\t\t\t$Vote=File_VoteDown_UploadInfo_Get($FileID);\n\t\t\t$Vote--;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteDown` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\t\t\n\t\t\tmysql_query($query);\n\t\t\t\n\t\t\t$Vote=File_VoteUp_UploadInfo_Get($FileID);\n\t\t\t$Vote++;\n\t\t\t$query=\"UPDATE `$database`.`uploadinfo` SET `VoteUp` = '$Vote' WHERE `uploadinfo`.`FileID` = $FileID\";\t\t\n\t\t\tmysql_query($query);\n\t\t}\n\t}", "public function getExchangeRate()\n {\n if (null !== $this->cache) {\n if ($exchangeRate = $this->cache->fetch($this->getCacheKey())) {\n\n return $exchangeRate;\n }\n }\n\n $exchangeRate = parent::getExchangeRate();\n\n if (null !== $this->cache) {\n $this->cache->save($this->getCacheKey(), $exchangeRate, 24 * 60 * 60);\n }\n\n return $exchangeRate;\n }", "public function store(Request $request)\n {\n $this->validateRate();\n $rate_data = request()->all();\n Salonrate::create($rate_data);\n return redirect(route('admin.salonrates.index'))->withSuccess('Успешно создано');;\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n $this->points -= 5;\n }", "public function setBaseToOrderRate($rate);", "private function local_rate($currency)\n {\n switch ($currency) {\n case \"gbp\":\n $this->exchange_rate = 1;\n break;\n case \"usd\":\n $this->exchange_rate = 1.3;\n break;\n case \"eur\":\n $this->exchange_rate = 1.1;\n break;\n }\n }", "public function exchangeRate()\n {\n return $this->belongsTo(ExchangeRate::class);\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n }", "private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }", "public function update(Request $request, $id)\n {\n // return response()->json([ 'data' => $request->all(), 'status' => 'success']); \n\n // return response()->json([ 'data' => $request->all(), 'status' => 'success']); \n\n $default_currency = Currency::default();\n $exchange_rate_id = $default_currency->id;\n $selected_currency = Currency::findOrFail($request->current_currency_id);\n $exchange_rate = CurrencyExchangeRate::currentRate($selected_currency->id);\n $calculation = ($selected_currency->calculation == 'multiplication') ? 'divide' : 'multiplication';\n $rate = 1;\n \n // Start transaction!\n DB::beginTransaction();\n\n try {\n // ...\n $quotation = Quotation::findOrFail($id);\n $quotation->customer_id = $request->customer_id;\n $quotation->validity_date = $request->validity;\n $quotation->payment_term_id = $request->payment_term_id;\n $quotation->delivery_method_id = $request->delivery_method_id; \n $quotation->amount = $request->amount;\n $quotation->tax = $request->pay_tax;\n $quotation->discount = $request->discount;\n $quotation->discount_amount = $request->discount_amount;\n $quotation->grand_total = $request->grand_total;\n $quotation->rate = $rate;\n $quotation->currency_id = $default_currency->id;\n // ...\n // exchange money to default currency if the selected currency is not default currency\n if($default_currency->id != $selected_currency->id) { \n $rate = $exchange_rate->rate;\n $quotation->amount = $this->exchangeRate($calculation, $request->amount, $rate);\n $quotation->tax = $this->exchangeRate($calculation, $request->pay_tax, $rate);\n $quotation->discount_amount = $this->exchangeRate($calculation, $request->discount_amount, $rate);\n $quotation->grand_total = $this->exchangeRate($calculation, $request->grand_total, $rate);\n $quotation->rate = $rate;\n $quotation->is_default_currency = 0;\n $quotation->currency_id = $selected_currency->id;\n }\n\n $quotation->save();\n\n // ...\n // create quotation details reference to quotation id above\n QuotationDetail::where('quotation_id', $quotation->id)->delete();\n foreach ($request->product_id_array as $key => $value) {\n $detail = new QuotationDetail();\n $detail->quotation_id = $quotation->id;\n $detail->product_id = $request->product_id_array[$key];\n $detail->product_name = $request->product_name_array[$key];\n $detail->notes = $request->description_array[$key];\n $detail->variant_ids = $request->variant_ids[$key];\n $detail->qty = $request->qty_array[$key];\n $detail->unit_price = $request->price_array[$key];\n $detail->tax = $request->tax_array[$key];\n $detail->pay_tax = $request->pay_tax_array[$key];\n $detail->discount = $request->discount_array[$key];\n $detail->discount_amount = $request->discount_amount_array[$key];\n $detail->subtotal = $request->subtotal_array[$key];\n // ...\n // exchange money to default currency if the selected currency is not default currency\n if($default_currency->id != $selected_currency->id) { \n $detail->pay_tax = $this->exchangeRate($calculation, $request->pay_tax_array[$key], $rate);\n $detail->discount_amount = $this->exchangeRate($calculation, $request->discount_amount_array[$key], $rate);\n $detail->unit_price = $this->exchangeRate($calculation, $request->price_array[$key], $rate);\n $detail->subtotal = $this->exchangeRate($calculation, $request->subtotal_array[$key], $rate);\n } \n\n $detail->save();\n }\n\n } catch(\\Exception $e)\n {\n DB::rollback();\n throw $e;\n }\n\n DB::commit(); \n return response()->json([ 'quotation' => $quotation, 'status' => 'success']); \n }", "private function store(array $parsedXmlData){ \n\t\t$storage = new App_Rates_Storage();\n\t\tforeach($parsedXmlData as $data){ \n\t\t\t$storage->save((array)$data);\n\t\t}\n\t\t\n\t\t\n\t\tif (IS_MEMCACHE){\n\t\t\tCache::getInstance()->set('rates',$parsedXmlData,false,self::CACHE_TTL);\n\t\t}\n\t}", "public function save()\n {\n $this->save_meta_value('_sim_service_price', $this->service_price);\n $this->save_meta_value('_sim_service_price_registered', $this->service_price_registered);\n $this->save_meta_value('_sim_service_hide_price', $this->service_hide_price);\n }", "function addAlterRate($design_no, $particulars,$particular_rate)\n\t\n\t{\n\t\t/*$stock_id\t\t\t =\tmysql_real_escape_string(trim($stock_id));*/\n\t\t$design_no\t \t\t =\ttrim($design_no);\n\t\t$particulars\t\t\t \t\t= mysql_real_escape_string(trim($particulars));\n\t\t$particular_rate\t\t\t =\tmysql_real_escape_string(trim($particular_rate));\n\t\t\n\t\t//satement to insert in stock table\n\t\t$insert\t\t= \"INSERT INTO alter_rate\n\t\t\t\t\t\t(design_no, particulars, particular_rate, added_on)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t('$design_no', '$particulars', '$particular_rate', \n\t\t\t\t\t\t\tnow())\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t//execute quary\n\t\t$query\t\t= mysql_query($insert);\n\t\t//echo $insert.mysql_error();exit;\n\t\t//get the product id\n\t\t$arate_id\t= mysql_insert_id();\n\t\t\n\t\t//return primary key\n\t\treturn $arate_id;\n\n\t}", "public function store(CreaterateRequest $request)\n { \n $input = $request->all();\n\n $rate = $this->rateRepository->create($input);\n\n Flash::success('Rate saved successfully.');\n\n return redirect(route('rates.index'));\n }", "public function store(Request $request)\n {\n\n //name code symbol exchange_rate\n $data = $this->validate($request,[\n 'name' => 'required|min:2|max:255|unique:currencies',\n 'code' => 'required|min:2|max:255|unique:currencies',\n 'symbol' => 'required|min:2|max:255',\n 'exchange_rate' => 'required|max:255'\n ]);\n// dd(auth()->user());\n auth()->user()->currencies()->create(['name'=>$request->name,'code'=>$request->code,'symbol'=>$request->symbol,'exchange_rate'=>$request->exchange_rate]);\n toastr()->success('Add Success New Currency');\n return back();\n\n }", "public function setExchangeRate($exchange_rate)\n {\n $this->exchange_rate = $exchange_rate;\n return $this;\n }", "public function updateRecord($code, $ratio, $rate, $reverserate) {\n\t\t$this->_db->q(\"\n\t\tUPDATE `currency` \n\t\tSET `ratio` = \" . $ratio . \", `rate` = \" . $rate . \", `reverserate` = \" . $reverserate . \"\n\t\tWHERE `code` = '\" . $code . \"'\n\t\tLIMIT 1\");\n\t}", "public function store(Request $request)\n {\n $request->validate([\n 'shipping_class' => 'required',\n 'min' => 'required|numeric|between:0,99999999999',\n 'max' => 'required|numeric|between:0,99999999999',\n 'rate' => 'required|numeric'\n ]);\n \n $rates=new ShippingTableRates;\n $rates->shipping_class=$request->input('shipping_class');\n $rates->min=$request->input('min');\n $rates->max=$request->input('max');\n $rates->rate=$request->input('rate');\n $rates->save();\n\n return redirect('admin/shipping-table-rates')->with('success', 'Rate added successfully');\n }", "public function offlineConvertTo(Currency|string $currency, string $rate): Money;", "protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }", "public function setRate(string $currency, float $rate)\n {\n $this->rates[$currency] = $rate;\n }", "public function getBaseToOrderRate();", "public function update()\n {\n if ($this->payableRate->fill(Input::all())->validate()) {\n if ($this->payableRate->updateWithInput()) {\n return Redirect::route('accounting.payrates')->with('success', 'Payable Rate Updated');\n }\n }\n Session::flash('danger', 'There was a problem updating the payable rate.');\n return Redirect::back()->withInput()->withErrors($this->payableRate->errors);\n }", "public function store(StoreMaterialRateRequest $request)\r\n {\r\n $materials_rate = $this->materials_rate->make(\r\n $request->only('name','rate')\r\n ); \r\n \r\n $this->materials_rate->save($materials_rate, $request->input());\r\n\r\n return $this->redirectResponse($request, __('alerts.backend.materials_rates.created'));\r\n }", "public function updated(Currency $currency)\n {\n //\n }", "public function addProductRate(Request $r)\n\t\t{\n\t\t\t$values = Request::json()->all();\n\t\t\t\n\t\t\n\t\t \n\t\t\t\n\t\t$add=\\DB::table('prod_assoc_rates')->insert(array(\n\t\t'Prod_ID' => $values['prod_ID'],\n 'MAssoc_ID' => $values['seg_ID'], \n 'Rate' => $values['Rate'], \n\t\t\t'CurrentDate' => $values['currentDate'], \n\t\t \n\t\t\t'ExpDate' => $values['expiryDate'], \n\t\t\t\n\t\t\t \n\t\t\t \n ));\n\t if(!empty($add))\n\t {$pid=$values['prod_ID'];\n\t\t\t$updateStatus=\\DB::table('products')\n\t\t\t->where('Prod_ID',$pid)\n\t\t\t->update(array('RateStatus' => '2'));\n\t\t \n\t \n\t }\n\t \n\t\t\t$resp=array($pid);\n\t\t\treturn $resp;\n\t\t\t\n\t\t}", "function downloadExchangeRates() {\r\n $currency_domain = substr($this->xml_file,0,strpos($this->xml_file,\"/\"));\r\n $currency_file = substr($this->xml_file,strpos($this->xml_file,\"/\"));\r\n $fp = @fsockopen($currency_domain, 80, $errno, $errstr, 10);\r\n if($fp) {\r\n \r\n $out = \"GET \".$currency_file.\" HTTP/1.1\\r\\n\";\r\n $out .= \"Host: \".$currency_domain.\"\\r\\n\";\r\n $out .= \"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5\\r\\n\";\r\n $out .= \"Connection: Close\\r\\n\\r\\n\";\r\n fwrite($fp, $out);\r\n while (!feof($fp)) {\r\n \r\n $buffer .= fgets($fp, 128);\r\n }\r\n fclose($fp);\r\n \r\n $pattern = \"{<Cube\\s*currency='(\\w*)'\\s*rate='([\\d\\.]*)'/>}is\";\r\n preg_match_all($pattern,$buffer,$xml_rates);\r\n array_shift($xml_rates);\r\n \r\n for($i=0;$i<count($xml_rates[0]);$i++) {\r\n \r\n $exchange_rate[$xml_rates[0][$i]] = $xml_rates[1][$i];\r\n }\r\n \r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n foreach($exchange_rate as $currency=>$rate) {\r\n \r\n if((is_numeric($rate)) && ($rate != 0)) {\r\n \r\n $sql = \"SELECT * FROM \".$this->mysql_table.\" WHERE currency='\".$currency.\"'\";\r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n if(mysql_num_rows($rs) > 0) {\r\n \r\n $sql = \"UPDATE \".$this->mysql_table.\" SET rate=\".$rate.\" WHERE currency='\".$currency.\"'\";\r\n } else {\r\n \r\n $sql = \"INSERT INTO \".$this->mysql_table.\" VALUES('\".$currency.\"',\".$rate.\")\";\r\n }\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n }\r\n \r\n }\r\n }\r\n }", "public function store(Request $request)\n {\n $price= new Price; \n $price->ar_item= $request->input('ar_item');\n $price->en_title= $request->input('en_title');\n $price->en_item= $request->input('number').' '.$request->input('duration');\n \n $price->normal_price= $request->input('normal_price');\n $price->norm_currency= $request->input('norm_currency');\n $price->paypal_norm_price= $request->input('paypal_norm_price');\n $price->paypal_norm_currency= $request->input('paypal_norm_currency');\n\n $price->premium_price= $request->input('premium_price');\n $price->prem_currency= $request->input('prem_currency');\n $price->paypal_prem_price= $request->input('paypal_prem_price');\n $price->paypal_prem_currency= $request->input('paypal_prem_currency');\n $price->save();\n\n return Redirect::back()->with('message', 'تم إضافة السعر بنجاح');\n }", "public function rateAction()\n {\n $html = '';\n $paymentMethod = $this->getRequest()->getParam('paymentMethod');\n $calcValue = $this->getRequest()->getParam('calcValue');\n $ratePayShopId = $this->getRequest()->getParam('ratePayshopId');\n $amount = $this->getRequest()->getParam('amount');\n $ratePayCurrency = $this->getRequest()->getParam('ratePayCurrency');\n $isAdmin = $this->getRequest()->getParam('isAdmin');\n $quoteId = $this->getRequest()->getParam('quoteId');\n $this->loadLayout();\n\n try {\n if (preg_match('/^[0-9]+(\\.[0-9][0-9][0-9])?(,[0-9]{1,2})?$/', $calcValue)) {\n $calcValue = str_replace(\".\", \"\", $calcValue);\n $calcValue = str_replace(\",\", \".\", $calcValue);\n $calcValue = floor($calcValue * 100); //MAGE-363: Use cent instead of floating currency\n\n $client = Mage::getSingleton('payone_core/mapper_apiRequest_payment_genericpayment');\n $ratePayConfigModel = Mage::getSingleton('payone_core/payment_method_ratepay');\n $getConfig = $this->getConfig($ratePayConfigModel, $isAdmin, $quoteId);\n $result = $client->ratePayCalculationRequest($amount, $ratePayShopId, $ratePayCurrency, $calcValue, null, $getConfig, 'calculation-by-rate');\n\n if ($result instanceof Payone_Api_Response_Genericpayment_Ok) {\n $responseData = $result->getPayData()->toAssocArray();\n $initialRateChoice = $this->getRequest()->getParam('calcValue');\n $message = $this->__('lang_calculation_rate_ok');\n\n // if the calculated installment value is different from the choice, we notify the user\n if ($initialRateChoice != $responseData['rate']) {\n // if value is lower than choice AND number of months is at maximum (36)\n // then the choice was too low\n // otherwise, it just got adapted to the closest available installment value\n if (\n $initialRateChoice < $responseData['rate']\n && $responseData['number-of-rates'] == 36\n ) {\n $message = $this->__('lang_calculation_rate_too_low');\n } else {\n $message = $this->__('lang_calculation_rate_not_available');\n }\n }\n $responseData['calculation-result-message'] = $message;\n\n /** @var Payone_Core_Block_Checkout_RatePayInstallmentplan $reviewBlock */\n $reviewBlock = $this->getLayout()->getBlock('payone_ratepay.checkout.installmentplan');\n $reviewBlock->setData($responseData);\n $reviewBlock->setIsAdmin($isAdmin);\n $html = $reviewBlock->toHtml();\n\n //if admin order, some fields are added to store,\n //otherwise, data are stores into session\n if (!$isAdmin) {\n //set payone Session Data\n $this->setSessionData($responseData, $paymentMethod);\n }\n } else {\n $this->unsetSessionData($paymentMethod);\n if($result instanceof Payone_Api_Response_Error) {\n $html = \"<div class='ratepay-result rateError'>\" . $this->__($result->getCustomermessage()) . \"</div>\";\n }\n }\n } else {\n $this->unsetSessionData($paymentMethod);\n $html = \"<div class='ratepay-result rateError'>\" . $this->__('lang_error') . \":<br/>\" . $this->__('lang_wrong_value') . \"</div>\";\n }\n } catch (Exception $e) {\n $this->unsetSessionData($paymentMethod);\n Mage::getSingleton('checkout/session')->addError(\n $this->__('Unable to initialize Rate Pay Installement.')\n );\n Mage::logException($e);\n }\n \n $this->getResponse()\n ->clearHeaders()\n ->setHeader('Content-Type', 'text/html', true)\n ->setBody($html);\n return;\n }", "public function importRates() {\n // This process can take a while\n @set_time_limit( 0 );\n @ignore_user_abort( true );\n\n $this->newRates = array();\n $this->freightTaxableRates = array();\n $rate = Mage::getModel('taxjar/rate');\n $filename = $this->getTempFileName();\n $rule = Mage::getModel('taxjar/rule');\n $shippingTaxable = Mage::getStoreConfig('taxjar/config/freight_taxable');\n $ratesJson = unserialize( file_get_contents( $filename ) );\n\n foreach( $ratesJson as $rateJson ) {\n $rateIdWithShippingId = $rate->create( $rateJson );\n\n if ( $rateIdWithShippingId[1] ) {\n $this->freightTaxableRates[] = $rateIdWithShippingId[1];\n }\n\n $this->newRates[] = $rateIdWithShippingId[0];\n }\n\n $this->setLastUpdateDate( date( 'm-d-Y' ) );\n $rule->create( 'Retail Customer-Taxable Goods-Rate 1', 2, 1, $this->newRates );\n\n if ( $shippingTaxable ) {\n $rule->create( 'Retail Customer-Shipping-Rate 1', 4, 2, $this->freightTaxableRates ); \n }\n\n @unlink( $filename );\n Mage::getSingleton('core/session')->addSuccess(\"TaxJar has added new rates to your database! Thanks for using TaxJar!\");\n }", "function saverates()\r\n {\r\n $error = false;\r\n $this->messagetype = '';\r\n $this->message = '';\r\n \r\n $model = $this->getModel('shippingrates');\r\n $row = $model->getTable();\r\n \r\n $cids = $this->input->request->get('cid', array(0), 'array');\r\n $geozones = $this->input->request->get('geozone', array(0), 'array');\r\n $prices = $this->input->request->get('price', array(0), 'array');\r\n $weight_starts = $this->input->request->get('weight_start', array(0), 'array');\r\n $weight_ends = $this->input->request->get('weight_end', array(0), 'array');\r\n $handlings = $this->input->request->get('handling', array(0), 'array');\r\n \r\n foreach (@$cids as $cid)\r\n {\r\n $row->load( $cid );\r\n $row->geozone_id = $geozones[$cid];\r\n $row->shipping_rate_price = $prices[$cid];\r\n $row->shipping_rate_weight_start = $weight_starts[$cid];\r\n $row->shipping_rate_weight_end = $weight_ends[$cid];\r\n $row->shipping_rate_handling = $handlings[$cid];\r\n\r\n if (!$row->save())\r\n {\r\n $this->message .= $row->getError();\r\n $this->messagetype = 'notice';\r\n $error = true;\r\n }\r\n }\r\n \r\n $model->clearCache();\r\n \r\n if ($error)\r\n {\r\n $this->message = JText::_('COM_TIENDA_ERROR') . \" - \" . $this->message;\r\n }\r\n else\r\n {\r\n $this->message = \"\";\r\n }\r\n\r\n $redirect = \"index.php?option=com_tienda&controller=shippingmethods&task=setrates&id={$row->shipping_method_id}&tmpl=component\";\r\n $redirect = JRoute::_( $redirect, false );\r\n \r\n $this->setRedirect( $redirect, $this->message, $this->messagetype );\r\n }", "public function save()\r\n {\r\n \r\n }", "public function getStoreToBaseRate();", "public function setRate($rate, $currencyCode = null){\n $this->rate = (string) $rate;\n $this->currencyCode = (string) $currencyCode;\n }", "function saveEstimateSignDetailsAction()\n\t{\n\t\tif($this->_request->isPost())\n\t\t{\n\t\t\t$signParams = $this->_request->getParams();\n\n\t\t\t$quote_id=$signParams['quote_id'];\n\n\t\t\tif($quote_id)\n\t\t\t{\n\t\t\t\t$quoteObj=new Ep_Quote_Quotes();\n\t\t\t\t$quoteDetails=$quoteObj->getQuoteDetails($quote_id);\n\n\t\t\t\t$status=$quoteDetails[0]['sales_review'];\n\t\t\t\tif($status=='not_done')\n\t\t\t\t\t$status='';\n\n\t\t\t\t\n\t\t\t\t$quote_update['estimate_sign_percentage']=$signParams['estimate_sign_percentage'];\n\t\t\t\t$quote_update['estimate_sign_date']=$signParams['estimate_sign_date'];\n\t\t\t\t$quote_update['estimate_sign_comments']=$signParams['estimate_sign_comments'];\n\n\n\t\t\t\t//echo \"<pre>\";print_r($_SERVER);exit;\t\t\t\t\n\t\t\t\t$quoteObj->updateQuote($quote_update,$quote_id);\n\n\t\t\t\t$this->_helper->FlashMessenger('Details updated successfully');\n\t\t\t}\t\n\n\n\t\t\t$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2&active=\".$status);\n\t\t}\n\t\t\n\t}", "public function save()\n {\n }", "private function updateCurrency() {\n Yii::import('application.modules.shop.models.*');\n Yii::log('updateCurrency()', 'info', 'console');\n $result = true;\n $currencyArray = ShopCurrency::model()->findAll();\n Yii::log('ShopCurrency', 'info', 'console');\n foreach ($currencyArray as $currency) {\n if ($currency->id != 1) { // skip UAH\n echo \"processing \" . $currency->iso . \": \";\n Yii::log('processing '.$currency->iso, 'info', 'console');\n $key = array_search($currency->iso, $this->_matches[2]); // find currency ID\n if ($key) {\n $currency->rate = (float) $this->_matches[5][$key] / (float) $this->_matches[3][$key];\n $result = $result && ($currency->save(false,false));\n if ($result)\n Yii::log('Refreshed', 'info', 'console');\n }\n else\n Yii::log('Currency not found', 'info', 'console');\n }\n }\n return $result;\n }", "public function updateTicker()\n {\n \n $val = $this->mtgox->getTicker();\n \n $arr = [\"value\"=>\"\", \"value_int\"=>\"\", \"display\"=>\"\", \"currency\"=>\"\"];\n \n $defs = [\n \"high\" => $arr,\n \"low\" => $arr,\n \"avg\" => $arr,\n \"vwap\" => $arr,\n \"vol\" => $arr,\n \"last_all\" => $arr,\n \"last_local\" => $arr,\n \"last_orig\" => $arr,\n \"last\" => $arr,\n \"buy\" => $arr,\n \"sell\" => $arr,\n ];\n \n $val = array_merge($defs, $val);\n \n $this->insert($val);\n \n $this->setPercentChange();\n \n $this->tickerPear();\n }", "public function store(Request $request)\n {\n date_default_timezone_set('Asia/Manila');\n \n return VehicleRate::create([\n 'MVID_Link' => $request['MVID_Link'],\n 'PlateNumber' => $request['PlateNumber'],\n 'EffectiveDate' => strtoupper($request['EffectiveDate']),\n 'PerHourRate' => $request['PerHourRate']\n \n /*\n 'PerTransactionRate' => number_format($request['PerTransactionRate'],2,\".\",\",\"),\n 'DailyRate' => number_format($request['DailyRate'],2,\".\",\",\")\n 'EffectiveDate' => strtoupper($request['EffectiveDate']),\n 'PerHourRate' => number_format($request['PerHourRate'],2,\".\",\",\"),\n 'PerAreaRate' => number_format($request['PerAreaRate'],2,\".\",\",\"),\n 'FixedMonthlyRate' => number_format($request['FixedMonthlyRate'],2,\".\",\",\"),\n 'PerBagRate' => number_format($request['PerBagRate'],2,\".\",\",\"),\n 'PerDestinationRate' => number_format($request['PerDestinationRate'],2,\".\",\",\"),\n 'Status' => strtoupper($request['Status'])*/\n\n \n ]);\n }", "abstract public function getExchangeRate($fromCurrency, $toCurrency);", "public function save()\n {\n // For V2.0\n }", "function editAlterRate($design_no, $suit_rate,$dupatta_rate, $ghagra_rate, $blause_rate, $total_rate)\n\t\n\t{\n\t\t/*$stock_id\t\t\t =\tmysql_real_escape_string(trim($stock_id));*/\n\t\t$design_no\t \t\t=\ttrim($design_no);\n\t\t$suit_rate\t\t\t \t\t= mysql_real_escape_string(trim($suit_rate));\n\t\t$dupatta_rate\t\t\t =\tmysql_real_escape_string(trim($dupatta_rate));\n\t\t$ghagra_rate\t\t =\tmysql_real_escape_string(trim($ghagra_rate));\n\t\t$blause_rate\t\t =\tmysql_real_escape_string(trim($blause_rate));\n\t\t$total_rate\t\t\t =\tmysql_real_escape_string(trim($total_rate));\n\t\t\n\t\t//update stock description\n\t\t$edit = \"UPDATE alter_rate\n\t\t\t\tSET\n\t\t\t\tdesign_no\t\t \t= '$design_no',\n\t\t\t\tsuit_rate\t\t\t= '$suit_rate',\n\t\t\t\tdupatta_rate\t\t= '$dupatta_rate',\n\t\t\t\tghagra_rate \t\t= '$ghagra_rate',\n\t\t\t\tblause_rate \t\t= '$blause_rate',\n\t\t\t\ttotal_rate\t\t = '$total_rate',\n\t\t\t\tmodified_on\t\t\t= now()\n\t\t\t\tWHERE\n\t\t\t\trate_id \t\t\t= '$rate_id'\n\t\t\t\t\";\n\t\t$query = mysql_query($edit);\n\t\t//echo $edit.mysql_error();exit;\n\t\t\n\t}", "public function save() {}", "public function save() {}", "public function save() {}", "public final function save() {\n }", "public function __construct(Money $rate)\n {\n $this->rate = $rate;\n }", "function createTable() {\r\n \r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n $sql = \"CREATE TABLE \".$this->mysql_table.\" ( currency char(3) NOT NULL default '', rate float NOT NULL default '0', PRIMARY KEY(currency) ) ENGINE=MyISAM\";\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n \r\n $sql = \"INSERT INTO \".$this->mysql_table.\" VALUES('EUR',1)\";\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n \r\n $this->downloadExchangeRates();\r\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();" ]
[ "0.6485968", "0.6445084", "0.6398197", "0.63192105", "0.6287837", "0.6222001", "0.6219934", "0.6163704", "0.61587644", "0.6156318", "0.6031435", "0.6002568", "0.6000224", "0.5994023", "0.5988532", "0.5982222", "0.5911185", "0.5910511", "0.58958864", "0.58545166", "0.5831257", "0.58133197", "0.58125216", "0.5810804", "0.57716304", "0.57590467", "0.57590467", "0.57467043", "0.57462764", "0.5744577", "0.57328564", "0.5707337", "0.5700481", "0.56994265", "0.56994265", "0.56994265", "0.5693728", "0.5651061", "0.5646507", "0.56056577", "0.5605314", "0.558334", "0.558154", "0.5577821", "0.55710036", "0.5512976", "0.5505986", "0.54837584", "0.54816437", "0.5472521", "0.5470801", "0.544891", "0.5447415", "0.54433435", "0.543223", "0.54304725", "0.5428635", "0.54258233", "0.5399534", "0.5390705", "0.53898716", "0.5376637", "0.53749585", "0.537072", "0.5347544", "0.53408015", "0.5326755", "0.531832", "0.5306256", "0.5305067", "0.53041565", "0.5300175", "0.5298058", "0.52952844", "0.52866274", "0.52809507", "0.5278704", "0.5277678", "0.5277133", "0.5268357", "0.52622974", "0.52563745", "0.5251187", "0.5224029", "0.52213573", "0.52213156", "0.52213156", "0.52211714", "0.5217085", "0.5215491", "0.5210712", "0.5209173", "0.5209173", "0.5209173", "0.5209173", "0.5209173", "0.5209173", "0.5209173", "0.5209173", "0.5209173" ]
0.55513453
45
Turn this item object into a generic array
public function transform(Blog $blog) { return [ 'id' => (int) $blog['id'], 'author' => $blog->author, 'title' => $blog['title'], 'content' => $blog['content'], 'status' => $blog['status'], 'subcategory' => $blog['subcategory'], 'comments' => $blog->comments, 'visibility_id' => $blog->visibility_id, 'coverImage' => $blog->blog_cover_image, 'created_date' => $blog->created_at, 'updated_date' => $blog->updated_at, 'scale' => $blog->scale, 'blog_image' => $blog->blog_image, 'trending' => $blog->trending ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertItemArray() {}", "public function toArray(): array {\n return $this->items;\n }", "public function toArray(): array\n {\n return (array) $this->items;\n }", "abstract protected function toArray();", "public function getItemsAsArray()\n {\n $map = function ($item) {\n return $item->toArray();\n };\n return array_map($map, $this['ITEMS']);\n }", "public function toArray(){\n return $this->items;\n }", "public function toArray()\n {\n $items = array();\n $results = $this->get()->items;\n \n if (!$results) {\n return array();\n }\n\n foreach($results as $key => $item) {\n $items[$key] = $this->isAok($item) ? $item->toArray() : $item;\n }\n\n return (array)$items;\n }", "public function toArray(): array\n {\n return $this->items;\n }", "public function toArray(): array\n {\n return $this->items;\n }", "public function toArray()\n {\n $itemArray = [];\n foreach ($this->storage as $item) {\n $itemArray[] = $item;\n }\n return [\n 'uid' => $this->getIdentifier(),\n 'title' => $this->getTitle(),\n 'description' => $this->getDescription(),\n 'table_name' => $this->getItemTableName(),\n 'items' => $itemArray\n ];\n }", "public function getItemsArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "public function asArray() {\n return $this->items;\n }", "public function toArray() {\n return $this->_items;\n }", "public function toArray(): array\n {\n return $this->items->toArray();\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray()\n {\n return [\n 'id' => $this->items->first()->getKey(), //eventually change ow this works\n 'ids' => $this->items->pluck('id'),\n 'grocery_list_id' => $this->items->first()->grocery_list_id,\n 'department' => $this->department(),\n 'department_id' => $this->departmentId(),\n 'quantity' => $this->quantity(),\n 'description' => $this->description(),\n 'implicitQty' => $this->hasImplicitQuantity(),\n ];\n }", "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return array_map(\n function ($value) {\n return $value instanceof Entity ? $value->toArray() : $value;\n\n }, $this->items\n );\n }", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function asArray()\n {\n return $this->items();\n }", "public function toArray()\n {\n return array_map(function ($value) {\n return method_exists($value, 'toArray') ? $value->toArray() : $value;\n }, $this->items);\n }", "public function toArray()\n {\n return $this->cast('array');\n }", "abstract public function to_array();", "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n return $data;\n }", "public function getAsArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function getItemArray()\n {\n return $this->itemArray;\n }", "public function toArray(): array\n {\n $output = $this->data;\n $output = $this->filterNotItems($output);\n $output = $this->filterOnlyItems($output);\n $output = $this->filterEmpty($output);\n $output = $this->executeConvertEmpty($output);\n $output = $this->filterTemplate($output);\n return $this->pluckItems($output);\n }", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function toArray(): array\n {\n return $this->getAllItems();\n }", "public function toArray()\n {\n return [\n 'id' => $this->getRowId(),\n 'data' => $this->item\n ];\n }", "public function toArray(): array\n {\n return $this->items->map(function ($item) {\n return $item->toArray();\n })->toArray();\n }", "public function toArray()\n {\n $_data = array();\n \n foreach ($this->_data as $key=>$val) {\n $_data[$key] = method_exists($val, 'toArray') ? $val->toArray() : $val;\n }\n \n return $_data;\n }" ]
[ "0.82164854", "0.7369612", "0.7275971", "0.7240289", "0.7219985", "0.7183764", "0.7144832", "0.71438384", "0.71438384", "0.7129873", "0.7113866", "0.7002954", "0.7002954", "0.7002954", "0.7002954", "0.7002954", "0.6983072", "0.6971123", "0.6953985", "0.69449085", "0.69449085", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943691", "0.6943647", "0.6943647", "0.6943647", "0.6943647", "0.6941658", "0.6940172", "0.69355255", "0.69355255", "0.69355255", "0.69354475", "0.691141", "0.691141", "0.68936765", "0.6876149", "0.68507385", "0.68481845", "0.68048584", "0.6804374", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.68013495", "0.6795853", "0.6777603", "0.6775837", "0.6775837", "0.6775837", "0.6775837", "0.6775837", "0.6775837", "0.67757875", "0.67720234", "0.676218", "0.6756702" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'description' => [ 'required', 'unique:colleges,description,'.$this->id, ], 'code' => [ 'required', 'max:10', 'unique:colleges,code,'.$this->id, ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
function correct this start task_1_correction
private function task_1_correction($task_name) { require_once public_path('task\\') . $task_name; $newValue_of_task = explode('.',$task_name); if(class_exists($newValue_of_task[0])){ $task = new $newValue_of_task[0]; if(session()->has('error_class')){ session()->forget('error_class'); } if(method_exists($newValue_of_task[0], 'check_name')){ $wrong = array(); $wrong[0] = ""; $wrong[1] = "al"; $wrong[2] = "asdryuimngyuioplkjhgd"; $wrong[3] = "bassem55"; $wrong[4] = "bassem reda"; $wrong[5] = "<script>anything</script>"; $correct = array(); $correct[0] = "abanoub"; $correct[1] = "ali"; $correct[2] = "bassem"; $notes = array(); $counter = 0; $degree = 0; for($i=0;$i<count($wrong);$i++) { if($task->check_name($wrong[$i]) === "wrong") { $degree++; } else if($task->check_name($wrong[$i]) === "correct") { $notes[$counter] = $wrong[$i]; $counter++; } } for($i=0;$i<count($correct);$i++) { if($task->check_name($correct[$i]) === "correct") { $degree++; } else if($task->check_name($correct[$i]) === "wrong") { $notes[$counter] = $wrong[$i]; $counter++; } } $arr = array(); $arr[0] = $degree;//degree $arr[1] = count($wrong) + count($correct);//total degree $arr[2] = $notes; return $arr; }else{ $this->checker2 = true; session()->put('error_function','error_function'); unlink(public_path('task\\') . $task_name); } }else{ $this->checker1 = true; session()->put('error_class','error_class'); unlink(public_path('task\\') . $task_name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function task_2_correction($task_name)\n {\n\n \n require_once public_path('task\\\\') . $task_name;\n $newValue_of_task = explode('.',$task_name);\n\n if(class_exists($newValue_of_task[0])){\n\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n\n if(method_exists($newValue_of_task[0], 'check_phonenumber')){\n if(session()->has('error_function')){\n session()->forget('error_function');\n }\n $task = new $newValue_of_task[0];\n $wrong = array();\n $wrong[0] = \"0120287465\";//10 \n $wrong[1] = \"012028736166\";//12\n $wrong[2] = \"012012\";//6\n $wrong[3] = \"01302873616\";//12 but start with 013\n $wrong[4] = \"01702873616\";//12 but start with 017\n $wrong[5] = \"012e45mu576\";//12 but contain characters\n $correct = array();\n $correct[0] = \"01201873616\";\n $correct[1] = \"01102764837\";\n $correct[2] = \"01098237673\";\n \n $degree = 0;\n $notes = array();\n $counter = 0;\n $degree = 0;\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_phonenumber($wrong[$i]) == \"wrong\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($wrong[$i]) == \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_phonenumber($correct[$i]) == \"correct\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($correct[$i]) == \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n }else{\n\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }//if class is exist or not\n \n }", "private function task_3_correction($task_name)\n{\nrequire_once public_path('task\\\\') . $task_name;\n$newValue_of_task = explode('.',$task_name);\n\n if(class_exists($newValue_of_task[0])){\n $task = new $newValue_of_task[0];\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n if(method_exists($newValue_of_task[0], 'check_email')){\n if(session()->has('error_function')){\n session()->forget('error_function');\n }\n $wrong = array();\n $wrong[0] = \"\";//empty\n $wrong[1] = \"bassem [email protected]\";//space\n $wrong[2] = \"[email protected]\";//not gmail or yahoo\n $wrong[3] = \"bassem#gmail.com\";//# not @\n $wrong[4] = \"[email protected]@gmail.com\";//@gmail.com written two times\n $wrong[5] = \"bassem@gmailcom\";\n $correct = array();\n $correct[0] = \"[email protected]\";\n $correct[1] = \"[email protected]\";\n $correct[2] = \"[email protected]\";\n $notes = array();\n $counter = 0;\n $degree = 0;\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_email($wrong[$i]) == \"wrong\")\n {\n $degree++;\n }\n else if($task->check_email($wrong[$i]) == \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_email($correct[$i]) == \"correct\")\n {\n $degree++;\n }\n else if($task->check_email($correct[$i]) == \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n }else{\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n}", "public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}", "public function handle()\n {\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = strtotime(date(\"Y-m-01\",time()-86400));\n $end_time = strtotime(date(\"Y-m-01\",$start_time+40*86400));\n $ret_info =[];\n for($i=1;$i<11;$i++){\n $ret_info[$i]=[\"subject\"=>$i];\n }\n $interview_info=$task->t_teacher_lecture_info->get_interview_info_by_subject($start_time,$end_time);\n $order_info = $task->t_teacher_lecture_info->get_research_teacher_test_lesson_info_subject($start_time,$end_time);\n // $order_info = $task->t_teacher_lecture_info->get_interview_lesson_order_info_subject($start_time,$end_time);\n $first_info = $task->t_lesson_info->get_interview_teacher_first_lesson_info_subject($start_time,$end_time);\n $tea_list = $task->t_lesson_info->get_all_first_lesson_teacher_list($start_time,$end_time);\n $record_list = $task->t_teacher_record_list->get_teacher_record_num_list_subject($start_time,$end_time);\n $tea_arr=[];$record_info = [];\n foreach($tea_list as $k=>$val){\n if($val[\"add_time\"]>0){\n $tea_arr[] = $k;\n @$record_info[$val[\"subject\"]][\"num\"]++;\n @$record_info[$val[\"subject\"]][\"record_time\"] +=$val[\"add_time\"] - $val[\"lesson_start\"];\n }\n }\n $lesson_info = $task->t_lesson_info->get_teacher_arr_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $first_lesson_info = $task->t_lesson_info->get_teacher_arr_first_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $other_record_info = $task->t_seller_and_ass_record_list->get_seller_and_ass_record_by_subject($start_time,$end_time);\n $test_person_num= $task->t_lesson_info->get_test_person_num_list_by_subject( $start_time,$end_time);\n $test_person_num_other= $task->t_lesson_info->get_test_person_num_list_subject_other( $start_time,$end_time);\n $kk_test_person_num= $task->t_lesson_info->get_kk_teacher_test_person_subject_list( $start_time,$end_time);\n $change_test_person_num= $task->t_lesson_info->get_change_teacher_test_person_subject_list( $start_time,$end_time);\n\n\n\n $arr=[\"subject_str\"=>\"平均\",\"subject\"=>20];\n $zh = [\"subject_str\"=>\"综合学科\",\"subject\"=>21];\n $wz = [\"subject_str\"=>\"文科\",\"subject\"=>22];\n $xxk = [\"subject_str\"=>\"小学科\",\"subject\"=>23];\n $slh=[];\n foreach($ret_info as $k=>&$item){\n $item[\"interview_num\"] = @$interview_info[$k][\"interview_num\"];\n @$arr[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n $item[\"interview_time\"] = @$interview_info[$k][\"interview_time\"];\n @$arr[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n $item[\"interview_lesson\"] = @$order_info[$k][\"person_num\"];\n @$arr[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n $item[\"interview_order\"] = @$order_info[$k][\"order_num\"];\n @$arr[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n $item[\"record_time\"] = @$record_info[$k][\"record_time\"];\n @$arr[\"record_time\"] += @$record_info[$k][\"record_time\"];\n $item[\"record_num\"] = @$record_info[$k][\"num\"];\n @$arr[\"record_num\"] += @$record_info[$k][\"num\"];\n $item[\"first_lesson\"] = @$first_info[$k][\"person_num\"];\n @$arr[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n $item[\"first_order\"] = @$first_info[$k][\"order_num\"];\n @$arr[\"first_order\"] += @$first_info[$k][\"order_num\"];\n $item[\"next_lesson\"] = @$lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n $item[\"next_order\"] = @$lesson_info[$k][\"order_num\"];\n @$arr[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n $item[\"next_lesson_first\"] = @$first_lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n $item[\"next_order_first\"] = @$first_lesson_info[$k][\"order_num\"];\n @$arr[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n $item[\"other_record_time\"] = @$other_record_info[$k][\"deal_time\"];\n @$arr[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n $item[\"other_record_num\"] = @$other_record_info[$k][\"num\"];\n @$arr[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n $item[\"lesson_num\"] = @$test_person_num[$k][\"lesson_num\"];\n $item[\"person_num\"] = @$test_person_num[$k][\"person_num\"];\n $item[\"have_order\"] = @$test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_other\"] = @$test_person_num_other[$k][\"lesson_num\"];\n $item[\"have_order_other\"] = @$test_person_num_other[$k][\"have_order\"];\n $item[\"lesson_num_kk\"] = @$kk_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_kk\"] = @$kk_test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_change\"] = @$change_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_change\"] = @$change_test_person_num[$k][\"have_order\"];\n $item[\"record_num_all\"] = @$record_list[$k][\"num\"];\n @$arr[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n if($k==1 || $k==3){\n @$wz[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$wz[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$wz[\"interview_time\"] += $item[\"interview_time\"];\n @$wz[\"interview_num\"] += $item[\"interview_num\"];\n @$wz[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$wz[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$wz[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$wz[\"record_num\"] += @$record_info[$k][\"num\"];\n @$wz[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$wz[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$wz[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$wz[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$wz[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$wz[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$wz[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$wz[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$wz[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$wz[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$wz[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$wz[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$wz[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$wz[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n }else if($k>3){\n @$zh[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$zh[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$zh[\"interview_time\"] += $item[\"interview_time\"];\n @$zh[\"interview_num\"] += $item[\"interview_num\"];\n @$zh[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$zh[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$zh[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$zh[\"record_num\"] += @$record_info[$k][\"num\"];\n @$zh[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$zh[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$zh[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$zh[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$zh[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$zh[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$zh[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$zh[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$zh[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$zh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$zh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$zh[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$zh[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$zh[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k >5){\n @$xxk[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$xxk[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$xxk[\"interview_time\"] += $item[\"interview_time\"];\n @$xxk[\"interview_num\"] += $item[\"interview_num\"];\n @$xxk[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$xxk[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$xxk[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$xxk[\"record_num\"] += @$record_info[$k][\"num\"];\n @$xxk[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$xxk[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$xxk[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$xxk[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$xxk[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$xxk[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$xxk[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$xxk[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$xxk[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$xxk[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$xxk[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$xxk[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k<4){\n @$slh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$slh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n }\n $item[\"subject_str\"] = E\\Esubject::get_desc($item[\"subject\"]);\n }\n $slh_per = !empty($slh[\"person_num\"])?round(@$slh[\"have_order\"]/$slh[\"person_num\"],4)*100:0;\n\n $test_person_num_all= $task->t_lesson_info->get_test_person_num_list_by_subject_grade( $start_time,$end_time);\n $test_person_num_other_all= $task->t_lesson_info->get_test_person_num_list_subject_grade_other( $start_time,$end_time);\n $kk_test_person_num_all= $task->t_lesson_info->get_kk_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $change_test_person_num_all= $task->t_lesson_info->get_change_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $arr[\"lesson_num\"] = $test_person_num_all[\"lesson_num\"];\n $arr[\"have_order\"] = @$test_person_num_all[\"have_order\"];\n $arr[\"lesson_per\"] = !empty($test_person_num_all[\"person_num\"])?round(@$test_person_num_all[\"have_order\"]/$test_person_num_all[\"person_num\"],4)*100:0;\n $arr[\"lesson_per_other\"] = !empty($test_person_num_other_all[\"lesson_num\"])?round($test_person_num_other_all[\"have_order\"]/$test_person_num_other_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_kk\"] = !empty($kk_test_person_num_all[\"lesson_num\"])?round($kk_test_person_num_all[\"have_order\"]/$kk_test_person_num_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_change\"] = !empty($change_test_person_num_all[\"lesson_num\"])?round($change_test_person_num_all[\"have_order\"]/$change_test_person_num_all[\"lesson_num\"],4)*100:0;\n\n array_unshift($ret_info,$xxk);\n array_unshift($ret_info,$zh);\n array_unshift($ret_info,$wz);\n array_unshift($ret_info,$arr);\n foreach($ret_info as &$vvv){\n $vvv[\"interview_time_avg\"] = !empty($vvv[\"interview_num\"])?round($vvv[\"interview_time\"]/$vvv[\"interview_num\"]/86400,2):0;\n $vvv[\"record_time_avg\"] = !empty($vvv[\"record_num\"])?round($vvv[\"record_time\"]/$vvv[\"record_num\"]/3600,2):0;\n $vvv[\"other_record_time_avg\"] = !empty($vvv[\"other_record_num\"])?round($vvv[\"other_record_time\"]/$vvv[\"other_record_num\"]/3600,2):0;\n $vvv[\"interview_per\"] = !empty($vvv[\"interview_lesson\"])?round(@$vvv[\"interview_order\"]/$vvv[\"interview_lesson\"],4)*100:0;\n $vvv[\"first_per\"] = !empty($vvv[\"first_lesson\"])?round(@$vvv[\"first_order\"]/$vvv[\"first_lesson\"],4)*100:0;\n $vvv[\"next_per\"] = !empty($vvv[\"next_lesson\"])?round(@$vvv[\"next_order\"]/$vvv[\"next_lesson\"],4)*100:0;\n $vvv[\"first_next_per\"] = !empty($vvv[\"next_lesson_first\"])?round(@$vvv[\"next_order_first\"]/$vvv[\"next_lesson_first\"],4)*100:0;\n $vvv[\"add_per\"] = round($vvv[\"next_per\"]-$vvv[\"first_next_per\"],2);\n if($vvv[\"subject_str\"] !=\"平均\"){ \n $vvv[\"lesson_per\"] = !empty($vvv[\"person_num\"])?round(@$vvv[\"have_order\"]/$vvv[\"person_num\"],4)*100:0;\n $vvv[\"lesson_per_other\"] = !empty($vvv[\"lesson_num_other\"])?round(@$vvv[\"have_order_other\"]/$vvv[\"lesson_num_other\"],4)*100:0;\n $vvv[\"lesson_per_kk\"] = !empty($vvv[\"lesson_num_kk\"])?round(@$vvv[\"have_order_kk\"]/$vvv[\"lesson_num_kk\"],4)*100:0;\n $vvv[\"lesson_per_change\"] = !empty($vvv[\"lesson_num_change\"])?round(@$vvv[\"have_order_change\"]/$vvv[\"lesson_num_change\"],4)*100:0;\n\n }else{\n $vvv[\"record_num_all\"] = $vvv[\"record_num_all\"]/3;\n }\n\n $vvv[\"lesson_num_per\"] = !empty($arr[\"lesson_num\"])?round(@$vvv[\"lesson_num\"]/$arr[\"lesson_num\"],4)*100:0;\n foreach($vvv as &$vvvv){\n if(empty($vvvv)){\n $vvvv=0;\n }\n } \n\n }\n\n $data=[];\n foreach($ret_info as $kk=>$gg){\n $data[$gg[\"subject\"]] = $gg;\n if($gg[\"subject\"]==2){\n $data[24] = $gg; \n }\n } \n\n $avg = [];\n $interview_time_standard=3;\n $record_time_standard=4;\n $other_record_time_standard=1;\n $add_per_standard=3;\n $research_num= $task->t_manager_info->get_adminid_num_by_account_role(4);\n $res= $ret_info; \n $person_arr = $list_arr=[];\n foreach($res as $kk=>&$vv){\n if(in_array($vv[\"subject\"],[4,5,6,7,8,9,10,21,23])){\n $interview_per_standard = 23;\n $first_per_standard = 20;\n $lesson_per_standard = 22;\n $lesson_per_other_standard = 75;\n $lesson_per_kk_standard = 75;\n $lesson_per_change_standard = 75;\n }else{\n $interview_per_standard = 18;\n $first_per_standard = 15;\n $lesson_per_standard = 17;\n $lesson_per_other_standard = 70;\n $lesson_per_kk_standard = 70;\n $lesson_per_change_standard = 70;\n }\n $vv[\"interview_per_range\"] = $vv[\"interview_per\"]- $interview_per_standard;\n $vv[\"first_per_range\"] = $vv[\"first_per\"]- $first_per_standard;\n $vv[\"lesson_per_range\"] = $vv[\"lesson_per\"]- $lesson_per_standard;\n $vv[\"lesson_per_other_range\"] = $vv[\"lesson_per_other\"]- $lesson_per_other_standard;\n $vv[\"lesson_per_kk_range\"] = $vv[\"lesson_per_kk\"]- $lesson_per_kk_standard;\n $vv[\"lesson_per_change_range\"] = $vv[\"lesson_per_change\"]- $lesson_per_change_standard;\n if(in_array($vv[\"subject\"],[1,2,3,4,5,23])){\n $person_arr[$kk] = $vv;\n }\n if(in_array($vv[\"subject\"],[2,21,22])){\n $list_arr[$kk]= $vv;\n }\n }\n\n foreach($res as $k=>$v){\n if($v[\"subject_str\"]==\"平均\"){\n $avg = $res[$k];\n unset($res[$k]);\n }\n }\n $record_num_standard = round($avg[\"lesson_num\"]/$research_num,1);\n $interview_time_person = $person_arr;\n foreach($interview_time_person as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_person[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_person,\"interview_time_avg\", 1);\n $interview_time_first_person = @$interview_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"interview_per_range\", 0);\n $interview_per_first_person = @$person_arr[0][\"subject\"];\n $record_time_person = $person_arr;\n foreach( $record_time_person as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_person,\"record_time_avg\", 1);\n $record_time_first_person = @$record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"record_num_all\", 0);\n $record_num_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"first_per_range\", 0);\n $first_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"add_per\", 0);\n $add_per_first_person = @$person_arr[0][\"subject\"];\n $other_record_time_person =$person_arr;\n foreach( $other_record_time_person as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_person,\"other_record_time_avg\", 1);\n $other_record_time_first_person = @$other_record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_range\", 0);\n $lesson_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_person = @$person_arr[0][\"subject\"];\n\n foreach($person_arr as $u){\n $person= $u[\"subject\"];\n if($person==$interview_time_first_person){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$person][\"interview_time_score\"] = 5;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$person][\"interview_time_score\"] = 3;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n\n }\n if($person==$interview_per_first_person){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$person][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"] = 5;\n }\n\n }\n if($person==$record_time_first_person){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$person][\"record_time_score\"] = 5;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$person][\"record_time_score\"] = 3;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n\n }\n\n if($person==$record_num_first_person){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$person][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"] = 1;\n }\n\n }\n\n if($person==$first_per_first_person){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$person][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"] = 1;\n }\n\n }\n if($person==$add_per_first_person){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$person][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"] = 1;\n }\n\n }\n\n if($person==$other_record_time_first_person){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$person][\"other_record_time_score\"] = 5;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$person][\"other_record_time_score\"] = 3;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n\n }\n if($person==$lesson_per_first_person){\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"] && $u[\"lesson_per_range\"]>=0){\n $data[$person][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"]=5;\n }\n }else{\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"] = 5;\n }\n\n }\n if($person==$lesson_per_other_first_person){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$person][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_kk_first_person){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$person][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_change_first_person){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$person][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$person][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$person][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$person][\"lesson_num_per_score\"]=1;\n }else{\n $data[$person][\"lesson_num_per_score\"]=0;\n }\n\n\n $data[$person][\"subject_str\"] = $u[\"subject_str\"];\n\n }\n\n $interview_time_list = $list_arr;\n foreach($interview_time_list as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_list[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_list,\"interview_time_avg\", 1);\n $interview_time_first_list = @$interview_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"interview_per_range\", 0);\n $interview_per_first_list = @$list_arr[0][\"subject\"];\n $record_time_list = $list_arr;\n foreach( $record_time_list as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_list,\"record_time_avg\", 1);\n $record_time_first_list = @$record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"record_num_all\", 0);\n $record_num_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"first_per_range\", 0);\n $first_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"add_per\", 0);\n $add_per_first_list = @$list_arr[0][\"subject\"];\n $other_record_time_list =$list_arr;\n foreach( $other_record_time_list as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_list,\"other_record_time_avg\", 1);\n $other_record_time_first_list = @$other_record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_range\", 0);\n $lesson_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_list = @$list_arr[0][\"subject\"];\n\n foreach($list_arr as $u){\n $list= $u[\"subject\"];\n if($list==2){\n $list=24;\n }\n if($list==$interview_time_first_list){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$list][\"interview_time_score\"] = 5;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$list][\"interview_time_score\"] = 3;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n\n }\n if($list==$interview_per_first_list){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$list][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"] = 5;\n }\n\n }\n if($list==$record_time_first_list){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$list][\"record_time_score\"] = 5;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$list][\"record_time_score\"] = 3;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n\n }\n\n if($list==$record_num_first_list){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$list][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"] = 1;\n }\n\n }\n\n if($list==$first_per_first_list){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$list][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"] = 1;\n }\n\n }\n if($list==$add_per_first_list){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$list][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"] = 1;\n }\n\n }\n\n if($list==$other_record_time_first_list){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$list][\"other_record_time_score\"] = 5;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$list][\"other_record_time_score\"] = 3;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n\n }\n if($list==$lesson_per_first_list){\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5) && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n }else{\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n\n }\n if($list==$lesson_per_other_first_list){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$list][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_kk_first_list){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$list][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >= $avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_change_first_list){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$list][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$list][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$list][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$list][\"lesson_num_per_score\"]=1;\n }else{\n $data[$list][\"lesson_num_per_score\"]=0;\n }\n\n\n\n }\n \n foreach($data as $o=>&$q){\n if(isset($q[\"interview_time_score\"])){ \n $q[\"total_score\"] = $q[\"interview_time_score\"]+$q[\"interview_per_score\"]+$q[\"record_time_score\"]+$q[\"record_num_score\"]+$q[\"first_per_score\"]+$q[\"add_per_score\"]+$q[\"other_record_time_score\"]+$q[\"lesson_per_score\"]+$q[\"lesson_per_other_score\"]+$q[\"lesson_per_kk_score\"]+$q[\"lesson_per_change_score\"]+$q[\"lesson_num_per_score\"];\n }\n $kid= $o;\n $check = $task->t_research_teacher_kpi_info->get_type_flag($kid,$start_time);\n if($check>0){\n $task->t_research_teacher_kpi_info->field_update_list_2($kid,$start_time,[\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"],\n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }else{\n $task->t_research_teacher_kpi_info->row_insert([\n \"kid\" =>$kid,\n \"month\" =>$start_time,\n \"type_flag\" =>2,\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"], \n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }\n\n }\n \n \n\n \n\n \n }", "public function step_1()\n {\n }", "public function startWorking(){\r\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $date_week = \\App\\Helper\\Utils::get_week_range(time(),1);\n $lstart = $date_week[\"sdate\"];\n $lend = $date_week[\"edate\"];\n $lstart_next = $date_week[\"sdate\"]+7*86400;\n $lend_next = $date_week[\"edate\"]+7*86400;\n\n $teacher_arr = $task->t_teacher_info->get_limit_lesson_num_change_list();\n // dd($teacher_arr);\n foreach($teacher_arr as $item){\n $teacherid = $item[\"teacherid\"];\n $week_num= $item[\"limit_week_lesson_num\"];\n $test_lesson_num = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart,$lend);\n $test_lesson_num_next = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart_next,$lend_next);\n //dd($test_lesson_num_next);\n if($test_lesson_num >= $week_num && $test_lesson_num_next >= $week_num){\n $task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优面试组\",\"周试听课排课数量满额通知\",\"Erick老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n $task->t_manager_info->send_wx_todo_msg_by_adminid (448,\"理优面试组\",\"周试听课排课数量满额通知\",\"rolon老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n\n \n }\n }\n \n \n \n\n }", "public function testUpdateTask()\n {\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-60*86400;\n $end_time = time();\n $teacher_test_per_list = $task->t_teacher_info->get_teacher_test_per_list($start_time,$end_time);\n foreach($teacher_test_per_list as &$item){\n $per = !empty($item[\"success_lesson\"])?round($item[\"order_number\"]/$item[\"success_lesson\"],2)*100:0;\n\n $task->t_teacher_info->field_update_list($item[\"teacherid\"],[\"test_transfor_per\"=>$per]);\n \n }\n\n //更新一月常规学生数\n $start_time = time()-30*86400;\n $ret= $task->t_teacher_info->tongji_teacher_stu_num_new($start_time,$end_time);\n foreach($ret as $v){\n $task->t_teacher_info->field_update_list($v[\"teacherid\"],[\n \"month_stu_num\" =>$v[\"stu_num\"] \n ]);\n\n }\n\n\n //更新两周试听课数\n $start_time = time()-14*86400;\n $list = $task->t_lesson_info_b2->get_test_lesson_num($start_time,$end_time);\n foreach($list as $val){\n $task->t_teacher_info->field_update_list($val[\"teacherid\"],[\n \"two_week_test_lesson_num\" =>$val[\"num\"] \n ]);\n }\n\n\n //每月1号至5号,更新沉睡老师信息\n $d = date(\"d\",time());\n if($d>=1 && $d <=5){\n $end_time = strtotime(date(\"Y-m-01\",time()));\n $start_time = strtotime(\"-3 month\",$end_time);\n $all_throuth_teacher = $task->t_teacher_info->get_all_train_through_teacher_list($start_time);\n $all_train_through_lesson_teacher= $task->t_teacher_info->get_all_train_through_lesson_teacher_list($start_time,$end_time);\n $no_lesson_tea_list=[];\n $lesson_tea_list=[];\n foreach($all_throuth_teacher as $k=>$v){\n if(!isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==0){\n $no_lesson_tea_list[$k]=$v[\"teacherid\"];\n }elseif(isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==1){\n $lesson_tea_list[$k]=$v[\"teacherid\"];\n }\n }\n\n foreach($no_lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>1 \n ]);\n }\n foreach($lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>0\n ]);\n }\n\n }\n\n \n\n //dd($teacher_test_per_list);\n\n \n }", "public static function handle_tasks()\n {\n\t $granularity = (int)get_site_preference('pseudocron_granularity',60);\n\t $last_check = get_site_preference('pseudocron_lastrun',0);\n\t if( (time() - $granularity * 60) >= $last_check )\n\t\t {\n\t\t\t // 1. Get Task objects.\n\t\t\t self::get_tasks();\n\t\n\t\t\t // 2. Evaluate Tasks\n\t\t\t self::execute();\n\t\n\t\t\t // 3. Cleanup to minimize memory usage\n\t\t\t self::cleanup();\n\n\t\t\t // 4. Say we've done a check\n\t\t\t set_site_preference('pseudocron_lastrun',time());\n\t\t }\n }", "public function additionalTasks(){\r\n\t\t$return = 0;\r\n\t\t//fetch activity feed list\r\n\t\t$post = $this->input->post(null, true);\r\n\t\t$parent_id = $post['pid'];\r\n\t\t$tasks_array = $post['ntsk'];\r\n\t\t$due_dates_array = $post['ddate'];\r\n\r\n\t\t$parent_task = new Task();\r\n\t // show newest first\r\n\t $parent_task->order_by('due_date', 'DESC');\r\n\r\n\t\t$parent_task->where(\"task_id\", $parent_id)->get();\r\n\t\t//var_dump($parent_task->task_id);\r\n\t\t$user_id = $this->flexi_auth->get_user_id();\r\n\r\n\t\t$user = $this->flexi_auth->get_user_by_id_query($user_id,'uacc_uid')->row_array();\r\n\r\n\t\tfor($i=0; $i<sizeof($tasks_array); $i++){\r\n\t\t\t$new_task = new Task();\r\n\r\n\t\t\t$now = gmdate('Y-m-d H:i:s');\r\n\t\t\t//endtime\r\n\t\t\t$due_date = $parent_task->due_date;\r\n\r\n\t\t\t$id = $this->uuid->v4();\r\n\t\t\t// Enter values into required fields\r\n\t\t\t$new_task->task_id = $id;\r\n\t\t\t$new_task->parent_id = $parent_id;\r\n\t\t\t//$taks->date_modified = $now;\r\n\r\n\t\t\t//due date is same as parent if not provided\r\n\t\t\tif($due_dates_array[$i] == \"\")\r\n\t\t\t\t$new_task->due_date = $due_date;\r\n\t\t\telse\r\n\t\t\t\t$new_task->due_date = gmdate('Y-m-d H:i:s', strtotime($due_dates_array[$i]));\r\n\r\n\t\t\t$new_task->created_by = $user['uacc_uid'];\r\n\t\t\t$new_task->assigned_user_id = $parent_task->assigned_user_id;\r\n\t\t\t$new_task->subject = trim($tasks_array[$i]);\r\n\t\t\t$new_task->company_id = $parent_task->company_id;\r\n\t\t\t$new_task->people_id = $parent_task->people_id;\r\n\t\t\t$new_task->priority_id = (int)$parent_task->priority_id;\r\n\t\t\t$new_task->status_id = (int)$parent_task->status_id;\r\n\t\t\t$new_task->description = $parent_task->description;\r\n\r\n\t\t\t// Save new user\r\n\t\t\tif( $new_task->save() ){\r\n\t\t\t}else{\r\n\t\t\t\t$return++;\r\n\t\t\t}\r\n\r\n\t\t\t//echo $task;\r\n\t\t}\r\n\t\techo $return;\r\n\r\n\t}", "function getTask() ;", "function auto_run()\n {\n \t//-----------------------------------------\n \t// INIT\n \t//-----------------------------------------\n \t\n \tif ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )\n \t{\n \t\t$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];\n \t}\n \t\n \t//-----------------------------------------\n \t// What shall we do?\n \t//-----------------------------------------\n \t\n \tswitch( $this->ipsclass->input['do'] )\n \t{\n \t\tcase 'get-template-names':\n \t\t\t$this->get_template_names();\n \t\t\tbreak;\n \t\tcase 'get-member-names':\n \t\t\t$this->get_member_names();\n \t\t\tbreak;\n \t\tcase 'get-dir-size':\n \t\t\t$this->get_dir_size();\n \t\t\tbreak;\n\t\t\tcase 'post-editorswitch':\n\t\t\t\t$this->post_editorswitch();\n\t\t\t\tbreak;\n\t\t\tcase 'captcha_test':\n\t\t\t\t$this->captcha_test();\n\t\t\t\tbreak;\n \t}\n }", "function movelidup($taskid){\n global $_TABLES;\n //check if there is a lid above this one..\n //also take into account if the lid above this one is the first task, this task must replace it as the first task..\n $templateid=DB_getItem( $_TABLES['nftemplatedata'], 'nf_templateID', \"id=\" . $taskid );\n $thisLid=DB_getItem( $_TABLES['nftemplatedata'], 'logicalid', \"id=\" . $taskid );\n $sql = \"SELECT id,logicalID FROM {$_TABLES['nftemplatedata']} WHERE nf_templateID='$templateid' AND logicalID < $thisLid \";\n $sql .= \"ORDER BY logicalID DESC LIMIT 1\";\n $query = DB_query($sql);\n\n //only perform work if we're not the first task already..\n if(DB_numRows($query) > 0){\n list ($previousID, $previousLID) = DB_fetchArray($query);\n\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set logicalID='$thisLid' WHERE id='$previousID'\";\n $result = DB_Query($sql);\n\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set logicalID='$previousLID' WHERE id='$taskid'\";\n $result = DB_Query($sql);\n\n if(DB_getItem($_TABLES['nftemplatedata'],'firstTask', \"id=\" . $previousID) == 1){\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set firstTask=1 WHERE id='$taskid'\";\n $result = DB_Query($sql);\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set firstTask=0 WHERE id='$previousID'\";\n $result = DB_Query($sql);\n }\n }\n}", "public function start_tran();", "public function testTask2(){\n\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "function tasks()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tasks'] == 1 ) ? 'Task' : 'Tasks';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$taskkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t{\n\t\t\t$taskkeys[] = \"'{$v['task_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'task_manager', \"task_key IN (\".implode( \",\", $taskkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_task( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tasks']} {$object} {$operation}....\" );\n\t}", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "private function _step():void\n\t{\n\t\t$task= array_shift( $this->_queue );\n\t\t\n\t\t$this->_runTask( $task );\n\t}", "public function testTask1(){\n\n }", "public function run()\n {\n $task_id = \\App\\Task::where('name','=','Pay the Electricity Bill')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.uswitch.com/gas-electricity/guides/assets/images/gas-electricity/guides/energy-guides/electricity-comparison.jpg',\n 'comment' =>'On May 20th I need to pay the electricity bill. I will pay it online\n to avoid problems',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Go to the Dentist')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.cfah.org/images/features/V5I3DentalCare.jpg',\n 'comment' =>'On May 29th I have an appointment with th dentist. I will get several\n cavities removed',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Finish P4')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'I have to finish Project 4 by May 4th. I will be a joy to complete it',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Buy mom a present')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'Moms birthday is coming up. I have to make sure I buy her\n a very nice present. Pereferable some jewelry',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Book a Flight for Cancun')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'https://aquaworld.com.mx/en/wp-content/uploads/sites/2/2015/09/healthy-trip-to-cancun.jpg',\n 'comment' =>'Due to our two year anniversary, I have to book a flight to Cancun\n for my girlfriend and I.',\n 'task_id' => $task_id,\n\n ]);\n }", "public function run()\n {\n $delta = true;\n $ci = 0;\n $ti = 0;\n for($i = 1; $i <= 20; $i++) {\n while($delta) {\n $ci = DB::table('users')->where(['role_id' => 3, 'id' => rand(3, 32) ])->value('id');\n if($ci != 0) {\n $ti = DB::table('users')->where(['role_id' => 2, 'id' => rand(3, 32) ])->value('id');\n if($ti != 0) {\n $delta = false;\n }\n }\n }\n DB::table('tasks')->insert([\n 'task_type_id' => rand(1, 5),\n 'technician_id' => $ti,\n 'client_id' => $ci,\n 'task_state_id' => rand(1, 4),\n 'description' => 'none',\n 'annotation' => 'none',\n 'code' => str_random(20),\n 'created_at' => date('Y-m-01').' '.'00:00:00',\n 'updated_at' => date('Y-m-01').' '.'00:00:00',\n ]);\n $ci = 0;\n $ti = 0;\n $delta = true;\n }\n }", "public function mainTask()\n\t{\n\t\t// Redirect to version panel of current version (TEMP)\n\t\tApp::redirect(\n\t\t\tRoute::url($this->_route . '&active=versions', false)\n\t\t);\n\t\treturn;\n\t}", "public function testCreateTask()\n {\n }", "public function run()\n {\n $task = new Task();\n $task->id = 1;\n $task->title = 'Cong viec 1';\n $task->content = 'tao project laravel';\n $task->created = '2018-09-27 04:57:57';\n $task->due_date = '2018-09-26';\n $task->image = 'anh';\n $task->save();\n }", "public function testUpdateTaskInstanceVariable()\n {\n }", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "public function run()\n {\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Ask for Help',\n 'description' => 'Ask someone to teach you a skill.',\n 'task_points' => 200,\n 'skill_level' => 1,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by WiFi',\n 'description' => 'Send a data file using a WiFi connection.',\n 'task_points' => 450,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Run',\n 'description' => 'Start a run.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect 2 Sensors',\n 'description' => 'Plug in 2 sensors. Confirm valid response from each one.',\n 'task_points' => 400,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect sensor',\n 'description' => 'Plug in 1 sensor. Confirm a valid response.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Free Teach',\n 'description' => 'Teach your partner a new skill. It does not need to be a wheel task.',\n 'task_points' => 800,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Rate',\n 'description' => 'Set experimental rate for run.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Autoscale',\n 'description' => 'Use autoscale function to adjust the y-axis during a run.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Read Lab Instruction',\n 'description' => 'Access a saved copy of any Vernier Labquest experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Select Region',\n 'description' => 'Select a region of data from a saved run.',\n 'task_points' => 500,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Graph',\n 'description' => 'View a Labquest graph.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Duration',\n 'description' => 'Set the time duration for experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by USB',\n 'description' => 'Export an experimental data file using USB cable to a commputer.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Label Run',\n 'description' => 'Add a descriptive name to a data run.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Strike Data',\n 'description' => 'Strike data from a saved run.',\n 'task_points' => 750,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => '3 in a Row',\n 'description' => 'Demonstrate a sequence of 3 different skills.',\n 'task_points' => 900,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Reboot',\n 'description' => 'Reboot the Labquest unit',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Linear Fit',\n 'description' => 'Perform a linear fit on a graph.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Create Local Network',\n 'description' => 'Setup a local Wifi network from Labquest unit, give it a name and confirm from another WiFi enabled device.',\n 'task_points' => 600,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect WiFi',\n 'description' => 'Connect Labquest unit to a WiFi network.',\n 'task_points' => 400,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Table',\n 'description' => 'View data in table view.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Overlay Runs',\n 'description' => 'Overlay 2 separate runs on one graph.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Save File',\n 'description' => 'Save file, must give it a descriptive name.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Download to LoggerPro',\n 'description' => 'Download data file to Labquest LoggerPro software on a computer.',\n 'task_points' => 400,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n }", "public function run()\n {\n \\App\\Task::create([\n 'title' => 'Lorem Ipsum',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n \\App\\Task::create([\n 'title' => 'Dolor Sit',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n }", "public function reviewTask ($task) {\n\n\t}", "public function run()\n {\n $task = new \\App\\Task();\n $task->id = 1;\n $task->sprint_id = 1;\n $task->nr= '1.1';\n $task->name = 'Testtask';\n $task->estimatedtime = '00:30:00';\n $task->save();\n }", "private function upgradeMismatchedTaskCount(): void\n {\n $new_options = [];\n $old_options = Option::getOptions();\n $legacy_tasks = $this->getLegacyOptions();\n foreach ($old_options as $option_key => $task) {\n $models = \\array_map(static function (UpgradeModel $model): string {\n return Option::getOptionKey($model);\n }, $this->models);\n if (!$models) {\n continue;\n }\n $key = \\array_search($option_key, $models, true);\n if ($key === false) {\n $legacy_tasks[$option_key] = $task;\n unset($old_options[$option_key]);\n continue;\n }\n $new_options[$option_key] = $task;\n }\n Option::updateOption($new_options);\n \\update_option(self::OPTION_NAME, $legacy_tasks, false);\n unset($new_options, $old_options, $legacy_tasks); // Memory cleanup\n \\wp_safe_redirect(\\remove_query_arg(self::NONCE_NAME));\n exit;\n }", "public function run()\n {\n $task = new Task();\n $task->name = 'Nguyễn Thiên';\n $task->age = 26;\n $task->phone = 0353377104;\n $task->address = 'Quảng Trị';\n $task->email = '[email protected]';\n $task->save();\n\n $task = new Task();\n $task->name = 'Vũ Văn Mạnh';\n $task->age = 20;\n $task->phone = 03134314314;\n $task->address = 'Hải Dương';\n $task->email = '[email protected]';\n $task->save();\n\n\n }", "function initYearlyRecurPattern($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\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 $taskYearlyPattern=$taskArray['yearly_pattern']; // everynoofmonths theweekofmonths\r\r\n $taskYearEveryMonth=$taskArray['yearly_everymonth'];\r\r\n $taskYearEveryMonthDate=$taskArray['yearly_everymonth_date'];\r\r\n $taskYearWeekNumber=$taskArray['yearly_weeknumber']; // first, last , third ect\r\r\n $taskYearWeekDayName=$taskArray['yearly_weekday']; //Friday\r\r\n $taskYearWeekMonthName=strtolower($taskArray['yearly_weekof_month']); // May, June etc\r\r\n\r\r\n $today=date(\"Y-m-d\"); \r\r\n $pastArray=array();\r\r\n \r\r\n // STEP : CHECK IF $taskStartDate < $today - then Calcute Task Past Occurrences Date and total count \r\r\n if($taskStartDate < $today){\r\r\n // STEP : SET TASK nth DAy of Month based on yearly pattern \r\r\n if($taskYearlyPattern==\"everynoofmonths\"){\r\r\n $nthDayOfMonthPattern=$taskYearEveryMonthDate.\" \".$taskYearEveryMonth; \r\r\n }else if($taskYearlyPattern==\"theweekofmonths\"){\r\r\n //$nthDayOfMonthPattern=$taskYearWeekNumber.\" \".$taskYearWeekDayName.\" \".$taskYearWeekMonthName; \r\r\n if($taskYearWeekNumber==\"first\"){$wknm=\"0\";}else if($taskYearWeekNumber==\"second\"){$wknm=\"1\";}else if($taskYearWeekNumber==\"third\"){$wknm=\"2\";}else if($taskYearWeekNumber==\"fourth\"){$wknm=\"3\";}else{ $wknm=\"5\"; }\r\r\n $nthDayOfMonthPattern=\"+\".$wknm.\" week \".$taskYearWeekDayName.\" \".$taskYearWeekMonthName;\r\r\n }\r\r\n // STEP: GET Years of $taskStartDateYear & $currDateYear\r\r\n $taskStartDateYear= date(\"Y\", strtotime($taskStartDate));\r\r\n $currDateYear= date(\"Y\", strtotime($today));\r\r\n \r\r\n if($taskStartDateYear==$currDateYear){ \r\r\n \r\r\n $year=$taskStartDateYear; \r\r\n if($taskYearWeekNumber==\"last\" && $taskYearlyPattern==\"theweekofmonths\"){\r\r\n if(strtolower($taskYearWeekMonthName)==\"december\"){\r\r\n $year=$taskStartDateYear+1;\r\r\n $month=\"january\";\r\r\n // echo \"New Month \".$month.\" \".$year; \r\r\n }else{\r\r\n $year=$taskStartDateYear; \r\r\n $result = $result =strtotime(\"1 \".$taskYearWeekMonthName.\" \".$taskStartDateYear); //$result = strtotime(\"{$taskStartDateYear}-{$taskYearWeekMonthName}-01\"); \r\r\n $month = date('F', strtotime('+1 month', $result)); \r\r\n }\r\r\n $nthDayOfMonthPattern=$taskYearWeekNumber.\" \".$taskYearWeekDayName.\" \".$month; \r\r\n }else if($taskYearlyPattern==\"everynoofmonths\"){\r\r\n // selected date will not come in some month then it will take last date of month \r\r\n $nthDayOfMonthPattern=$taskYearEveryMonthDate.\" \".$taskYearEveryMonth; \r\r\n $lastDayofMonth = date('t',strtotime(\"1 \".$taskYearEveryMonth.\" \".$year)); \r\r\n if($lastDayofMonth < $taskYearEveryMonthDate) {\r\r\n $nthDayOfMonthPattern=$lastDayofMonth.\" \".$taskYearEveryMonth; \r\r\n }\r\r\n }\r\r\n // $utNthDateOfMonth = strtotime( $nthDayOfMonthPattern.\" \".$year); \r\r\n \r\r\n // STEP: if stratYear and cuurYear are same, then task is same year so calculate exeDate\r\r\n $utNthDateOfMonth = strtotime( $nthDayOfMonthPattern.\" \".$year); \r\r\n $exeDate=date(\"Y-m-d\", $utNthDateOfMonth); \r\r\n // STEP : CHK if exe date or total occurences are exceeds edndate or end occurrences, if yes the task is completed.\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 } else{\r\r\n if($exeDate < $today) { \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 \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 $newArray['task_is_done']=$task_is_done;\r\r\n array_push($pastArray, $newArray); \r\r\n }else{\r\r\n $taskLastOccurenceDate=\"0000-00-00\"; \r\r\n } \r\r\n }\r\r\n \r\r\n \r\r\n \r\r\n }else if($taskStartDateYear < $currDateYear){ // echo \"<br/> pre year\";\r\r\n // STEP: if stratYear < cuurYear then task is start previous year so calculate exeDate \r\r\n $yearDiff= ($currDateYear - $taskStartDateYear);\r\r\n for($i =0; $i<= $yearDiff; $i++){\r\r\n $year=$taskStartDateYear+$i; /// echo \"<br/> year \".$year;\r\r\n if($taskYearWeekNumber==\"last\" && $taskYearlyPattern==\"theweekofmonths\"){\r\r\n if(strtolower($taskYearWeekMonthName)==\"december\"){\r\r\n $year=$year+1;\r\r\n $month=\"january\";\r\r\n // echo \"New Month \".$month.\" \".$year; \r\r\n }else{\r\r\n // $year=$taskStartDateYear; \r\r\n $result = $result =strtotime(\"1 \".$taskYearWeekMonthName.\" \".$year);// $result = strtotime(\"{$year}-{$taskYearWeekMonthName}-01\"); \r\r\n $month = date('F', strtotime('+1 month', $result)); \r\r\n }\r\r\n $nthDayOfMonthPattern=$taskYearWeekNumber.\" \".$taskYearWeekDayName.\" \".$month; \r\r\n }else if($taskYearlyPattern==\"everynoofmonths\"){\r\r\n // selected date will not come in some month then it will take last date of month \r\r\n $nthDayOfMonthPattern=$taskYearEveryMonthDate.\" \".$taskYearEveryMonth; \r\r\n $lastDayofMonth = date('t',strtotime(\"1 \".$taskYearEveryMonth.\" \".$year)); \r\r\n if($lastDayofMonth < $taskYearEveryMonthDate) {\r\r\n $nthDayOfMonthPattern=$lastDayofMonth.\" \".$taskYearEveryMonth; \r\r\n }\r\r\n } \r\r\n $utNthDateOfMonth = strtotime( $nthDayOfMonthPattern.\" \".$year); \r\r\n $exeDate=date(\"Y-m-d\", $utNthDateOfMonth); \r\r\n /* if($taskTaskEndAfterOccurrences!=0 && $taskTotalOccurenceCount >= $taskTaskEndAfterOccurrences){\r\r\n $task_is_done=1; break;\r\r\n }else if($taskTaskEndByDate!=\"0000-00-00\" && $exeDate > $taskTaskEndByDate){\r\r\n $task_is_done=1; break;\r\r\n }\r\r\n */\r\r\n \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) break;\r\r\n \r\r\n if($exeDate < $taskStartDate && $i==0 ) {\r\r\n $taskLastOccurenceDate=\"0000-00-00\"; \r\r\n }else if($exeDate < $today){ \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 }\r\r\n // echo \"<br/> for $i Exe date \".$taskLastOccurenceDate; \r\r\n \r\r\n } \r\r\n }\r\r\n \r\r\n }\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->calculateYearlyNextExecutionDate($taskLastOccurenceDate,$taskTotalOccurenceCount,$taskStartDate, $taskYearlyPattern, $taskYearEveryMonth,$taskYearEveryMonthDate,$taskYearWeekNumber,$taskYearWeekDayName, $taskYearWeekMonthName, $taskTaskEndAfterOccurrences, $taskTaskEndByDate);\r\r\n if($taskNextOccurenceDate==\"0000-00-00\"){\r\r\n $task_is_done=1;\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 \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 $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 return $pastArray;\r\r\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 moveliddown($taskid){\n global $_TABLES;\n //check if there is a lid above this one..\n //also take into account if the lid above this one is the first task, this task must replace it as the first task..\n $templateid=DB_getItem( $_TABLES['nftemplatedata'], 'nf_templateID', \"id=\" . $taskid );\n $thisLid=DB_getItem( $_TABLES['nftemplatedata'], 'logicalid', \"id=\" . $taskid );\n\n $sql = \"SELECT id,logicalID FROM {$_TABLES['nftemplatedata']} WHERE nf_templateID='$templateid' AND logicalID > $thisLid \";\n $sql .= \"ORDER BY logicalID ASC LIMIT 1\";\n $query = DB_query($sql);\n\n //only perform work if we're not the last task already..\n if(DB_numRows($query) > 0){\n list ($nextID, $nextLID) = DB_fetchArray($query);\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set logicalID='$thisLid' WHERE id='$nextID'\";\n $result = DB_Query($sql);\n\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set logicalID='$nextLID' WHERE id='$taskid'\";\n $result = DB_Query($sql);\n\n if(DB_getItem($_TABLES['nftemplatedata'],'firstTask', \"id=\" . $taskid) == 1){\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set firstTask=1 WHERE id='$nextID'\";\n $result = DB_Query($sql);\n $sql = \"UPDATE {$_TABLES['nftemplatedata']} set firstTask=0 where id='$taskid'\";\n $result = DB_Query($sql);\n }\n }\n}", "private static function update($fname) {\n\t\t$task_info = json_decode(file_get_contents(__base_path.'_data/tasks/'.$fname.'.data'),true);\n\t\t//Calcola in che momento cadrà il prossimo task\n\t\t$cur = getdate();\n\t\t$old = $cur['seconds'];\n\t\t$cur['seconds'] = self::process_date($task_info['s'],$cur['seconds']+1,60);\n\t\tif ($cur['seconds']<$old)\n\t\t\t$cur['minutes']++;\n\t\t$old = $cur['minutes'];\n\t\t$cur['minutes'] = self::process_date($task_info['m'],$cur['minutes'],60);\n\t\tif ($cur['minutes']<$old)\n\t\t\t$cur['hours']++;\n\t\t$old = $cur['hours'];\n\t\t$cur['hours'] = self::process_date($task_info['h'],$cur['hours'],24);\n\t\tif ($cur['hours']<$old)\n\t\t\t$cur['mday']++;\n\t\t$old = $cur['mday'];\n\t\t$cur['mday'] = self::process_date($task_info['d'],$cur['mday'],30);\n\t\tif ($cur['mday']<$old)\n\t\t\t$cur['mon']++;\n\t\t$old = $cur['mon'];\n\t\t$cur['mon'] = self::process_date($task_info['M'],$cur['mon'],12);\n\t\tif ($cur['mon']<$old)\n\t\t\t$cur['year']++;\n\t\tself::$tasks[$fname]['time'] = mktime($cur['hours'],$cur['minutes'],$cur['seconds'],$cur['mon'],$cur['mday']);\n\t\tfile_put_contents(__base_path.'_data/tasks/'.$fname.'.last', json_encode(self::$tasks[$fname]));\n\t}", "function make_task($string=''){\n\t\n\tif($string === ''){\n\t\t$string = 'Make Task';\n\t\t}\n\t$task_name = strtolower(trim(mysql_prep($_GET['job_title'])));\n\t$parent = '';\n\t$parent_type = 'jobs';\n\t$content = mysql_prep($_SESSION['current_url']);\n\t$path = $_SESSION['current_url'];\n\t$author = $_SESSION['username'];\n\t$editor = '';\n\t$created = date('c');\n\t$last_update ='';\n\t$status = 'started';\n\t$reward = $_SESSION['job_reward'];\n\t\n\techo '<form action='.$_SESSION['current_url'].' method=\"post\">\n\t<button type=\"submit\" name=\"make_project\" value=\"yes\">'.$string.'</button>\n\t</form>';\n\t\n\tif($_POST['make_task'] ==='yes') {\n\t\t\t$query = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"INSERT INTO `project_manager_task`(`id`, `task_name`, `parent`, `parent_type`, `content`, `author`, `project_manager`, `path`, `editor`, `created`, `last_updated`, `assigned_to`, `status`, `priority`, `reward`) \n\t\t\tVALUES ('','{$task_name}', '{$parent}', '{$parent_type}' '{$content}', '{$author}', '{$author}', '{$path}', '{$editor}','{$created}','{$last_updated}','{$author}','{$status}','{$priority}','{$reward}')\") \n\t\t\tor die (\"Error inserting task \". ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\t\t\tif($query){ \n\t\t\t\tactivity_record(\n\t\t\t\t\t$actor=$author,\n\t\t\t\t\t$action=' created the task ',\n\t\t\t\t\t$subject_name = $project_name,\n\t\t\t\t\t$actor_path = BASE_PATH.'user/?user='.$author,\n\t\t\t\t\t$subject_path= ADDONS_PATH.'project_manager/?action=show&task_name='.$project_name,\n\t\t\t\t\t$date = $created,\n\t\t\t\t\t$parent='jobs'\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\tstatus_message(\"success\", \"Task saved successfully!\"); \n\t\t\t}\n\t\t}\n\t\n\t}", "public function actionSendTaskAllAtOne()\n {\n foreach ( ( new TaskForDate( date(\"Y-m-d\") ) )->do()->result as $task ) {\n $result[] = [ \"CaseID\" => $task[\"case_id\"], \"TemplateID\" => 20 ];\n }\n\n foreach ( ( new CreateTask( json_encode($result) ) )->do()->result as $itm ) {\n Yii::$app->db->createCommand('UPDATE task SET todo_taken = now()::date WHERE id = '.$task[\"id\"])->execute();\n $this->l(\"'worker':'send_task','case_id':\".$task['case_id']);\n }\n\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-7*86400;\n $end_time = time();\n $start = date(\"Y-m-d H:i:s\",$start_time);\n $end = date(\"Y-m-d H:i:s\",$end_time);\n $res = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time);\n $video_succ = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time,1);\n $one = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,-1);\n $one_succ = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,1); \n $all=0;$suc=0;$all_time=0;$video_num=0; \n foreach($res as $k=>&$v){\n $all +=$v[\"all_count\"];\n $all_time +=$v[\"time_count\"];\n $video_num +=$v[\"all_count\"];\n $v[\"video_num\"] = $v[\"all_count\"];\n }\n foreach($video_succ as $item){\n $suc += $item[\"all_count\"];\n }\n foreach($one as $k=>&$vv){\n $all +=$vv[\"all_count\"];\n if(isset($res[$k])){\n $res[$k][\"all_count\"] += $vv[\"all_count\"];\n }else{\n $vv[\"video_num\"]=0;\n $vv[\"time_count\"]=0;\n $res[$k] = $vv;\n }\n }\n foreach($one_succ as $k=>&$vvv){\n $suc +=$vvv[\"all_count\"];\n if(isset($video_succ[$k])){\n $video_succ[$k][\"all_count\"] += $vvv[\"all_count\"];\n }else{\n $video_succ[$k] = $vvv;\n }\n\n }\n\n \n $ave_per = $all==0?0:(round($suc/$all,2)*100).\"%\";\n $ave_time = $all==0?0:round($all_time/$video_num/86400,1);\n $subject_info =\"\";\n foreach($res as $p){\n $subject = $p[\"subject\"];\n $subject_str = E\\Esubject::get_desc($subject);\n $pass_per = (round(@$video_succ[$subject][\"all_count\"]/$p[\"all_count\"],2)*100).\"%\";\n $sub_ave_time = !empty($p[\"video_num\"])?round($p[\"time_count\"]/$p[\"video_num\"]/86400,1):0;\n $subject_info .= $subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天;\";\n $tea_arr =$task->get_admin_group_subject_list($subject);\n //$tea_arr=[];\n $tea_arr[72]=\"Erick\";\n $tea_arr[448]=\"rolon\";\n $tea_arr[349]=\"Jack\";\n // $tea_arr=[\"349\"=>\"Jack\"];\n foreach($tea_arr as $k=>$ttt){\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($k,\"理优面试组\",\"新老师入职情况汇总\",$ttt.\"老师你好,\".$subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线\".$subject_str.\"教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&subject=\".$subject);\n }\n }\n\n \n $list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time);\n $video_succ_list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time,-1);\n $one_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,-1);\n $one_succ_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,1); \n foreach($list as &$i){\n $i[\"video_num\"] = $i[\"all_count\"];\n }\n foreach($one_account as $k=>&$s){\n if(isset($list[$k])){\n $list[$k][\"all_count\"] +=$s[\"all_count\"];\n }else{\n $s[\"video_num\"]=0;\n $s[\"time_count\"]=0;\n $list[$k]= $s;\n }\n }\n foreach($one_succ_account as $k=>&$t){\n if(isset($video_succ_list[$k])){\n $video_succ_list[$k][\"all_count\"] +=$s[\"all_count\"]; \n }else{\n $video_succ_list[$k]=$t;\n }\n }\n\n //$list=[\"349\"=>\"Jack\"];\n foreach($list as $k=>&$val){\n $pass_per_account = (round(@$video_succ_list[$k][\"all_count\"]/$val[\"all_count\"],2)*100).\"%\";\n $account_ave_time = !empty($val[\"video_num\"])?round($val[\"time_count\"]/$val[\"all_count\"]/86400,1):0;\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($val[\"uid\"],\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".@$video_succ_list[$k][\"all_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);\n /*$task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优监课组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n /* $task->t_manager_info->send_wx_todo_msg_by_adminid (349,\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n\n\n\n }\n }", "public function run()\n {\n Task::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 6; $i++) {\n $taskLetter = chr(65 + $i);\n Task::create([\n 'name' => \"משימה $taskLetter\",\n 'done' => $faker->boolean,\n ]);\n }\n }", "function calculateDailyNextExecutionDate($taskLastOccurenceDate,$taskTotalOccurenceCount,$taskStartDate, $taskDailyPattern, $taskDailyEveryNumofDays, $taskTaskEndAfterOccurrences, $taskTaskEndByDate){ \r\r\n $taskNextOccurenceDate=\"0000-00-00\"; \r\r\n $today=date(\"Y-m-d\"); \r\r\n $taskStartDate=date('Y-m-d', strtotime($taskStartDate)); \r\r\n if($taskDailyPattern==\"everyday\"){\r\r\n if($taskLastOccurenceDate!=\"0000-00-00\"){ //echo \"<br/> after #dasy \".$taskDailyEveryNumofDays;\r\r\n $taskNextExeChkDate= $taskLastOccurenceDate; \r\r\n $date = strtotime(date(\"Y-m-d\", strtotime($taskLastOccurenceDate)) . \" +\".$taskDailyEveryNumofDays.\" day\"); \r\r\n $taskNextOccurenceDate= date('Y-m-d', $date); \r\r\n //$taskNextOccurenceDate=date(\"Y-m-d\",strtotime($taskLastOccurenceDate)).\" +\".$taskDailyEveryNumofDays.\" day\"; \r\r\n // echo \"<br/> nxt chk date \".$taskNextOccurenceDate; \r\r\n if($taskNextOccurenceDate < $today) {\r\r\n $daysDiff= $this->datediff($taskNextOccurenceDate,$today,$format='d');\r\r\n $reminds= $daysDiff % $taskDailyEveryNumofDays;\r\r\n $taskNextOccurenceDate=date(\"Y-m-d\",strtotime(date(\"Y-m-d\",strtotime($today)).\" +\".$reminds.\" day\")); \r\r\n }\r\r\n }else{\r\r\n $taskNextOccurenceDate= $taskStartDate; \r\r\n \r\r\n }\r\r\n \r\r\n }else{\r\r\n if($taskLastOccurenceDate!=\"0000-00-00\"){ \r\r\n $tasklastDate= $taskLastOccurenceDate;\r\r\n }else{\r\r\n $tasklastDate= date(\"Y-m-d\",strtotime(date(\"Y-m-d\",strtotime($taskStartDate)).\" -1 day\")); \r\r\n }\r\r\n $lastExeDateWeekDayNum= date(\"N\",strtotime($tasklastDate)); \r\r\n if($lastExeDateWeekDayNum < 5 ){\r\r\n $taskNextOccurenceDate= date(\"Y-m-d\",strtotime(date(\"Y-m-d\",strtotime($tasklastDate)).\" +1 day\")); \r\r\n }else{\r\r\n $taskNextOccurenceDate= date(\"Y-m-d\",strtotime(date(\"Y-m-d\",strtotime($tasklastDate)).\" +\".(8 - $lastExeDateWeekDayNum).\" day\")); \r\r\n }\r\r\n }\r\r\n \r\r\n if($taskTaskEndAfterOccurrences!=0 && $taskTotalOccurenceCount >= $taskTaskEndAfterOccurrences){\r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n }else if($taskTaskEndByDate!=\"0000-00-00\" && $taskNextOccurenceDate > $taskTaskEndByDate){ \r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n }\r\r\n \r\r\n return $taskNextOccurenceDate;\r\r\n }", "public function step_2()\n {\n }", "public function run()\n {\n //\n DB::table('tasks')->insert([\n [\n 'id' => 1, 'text' => 'Project #1', 'start_date' => '2017-04-01 00:00:00',\n 'duration' => 5, 'progress' => 0.8, 'parent' => 0\n ],\n [\n 'id' => 2, 'text' => 'Task #1', 'start_date' => '2017-04-06 00:00:00',\n 'duration' => 4, 'progress' => 0.5, 'parent' => 1\n ],\n [\n 'id' => 3, 'text' => 'Task #2', 'start_date' => '2017-04-05 00:00:00',\n 'duration' => 6, 'progress' => 0.7, 'parent' => 1\n ],\n [\n 'id' => 4, 'text' => 'Task #3', 'start_date' => '2017-04-07 00:00:00',\n 'duration' => 2, 'progress' => 0, 'parent' => 1\n ],\n [\n 'id' => 5, 'text' => 'Task #1.1', 'start_date' => '2017-04-05 00:00:00',\n 'duration' => 5, 'progress' => 0.34, 'parent' => 2\n ],\n [\n 'id' => 6, 'text' => 'Task #1.2', 'start_date' => '2017-04-11 00:00:00',\n 'duration' => 4, 'progress' => 0.5, 'parent' => 2\n ],\n [\n 'id' => 7, 'text' => 'Task #2.1', 'start_date' => '2017-04-07 00:00:00',\n 'duration' => 5, 'progress' => 0.2, 'parent' => 3\n ],\n [\n 'id' => 8, 'text' => 'Task #2.2', 'start_date' => '2017-04-06 00:00:00',\n 'duration' => 4, 'progress' => 0.9, 'parent' => 3\n ]\n ]);\n }", "public function run()\n {\n DB::table('tasks')->insert([\n [\n 'codtask' => 'TS0001',\n 'description' => 'Registro de usuarios',\n 'role_id' => '1'\n ],\n [\n 'codtask' => 'TS0002',\n 'description' => 'Gestionar roles',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0003',\n 'description' => 'Gestionar roles de los usaurios',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0004',\n 'description' => 'Gestionar endpoints',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0005',\n 'description' => 'Gestionar endpoints sobre roles',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0006',\n 'description' => 'Consultar usuarios que no tengan endpoints',\n 'role_id' => '2'\n ],\n [\n 'codtask' => 'TS0007',\n 'description' => 'Gestionar su perfil',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0008',\n 'description' => 'Ver los endpoints a los que tenga permiso',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0009',\n 'description' => 'Utilizar los endpoints a los que tenga permiso',\n 'role_id' => '3'\n ],\n [\n 'codtask' => 'TS0010',\n 'description' => 'Cerrar sesion',\n 'role_id' => '3'\n ]\n ]);\n }", "public function preExecute(){\n\n\t\n\t}", "private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }", "public function execute()\n\t{\n\t\tChangeProject::getInstance()->executeTask('cd');\n\t\tChangeProject::getInstance()->executeTask('gdb');\n\t\tChangeProject::getInstance()->executeTask('ci18n', array('markergmaps'));\n\t\tChangeProject::getInstance()->executeTask('cb');\n\t\tChangeProject::getInstance()->executeTask('cec');\n\t\tChangeProject::getInstance()->executeTask('croles');\n\t\tChangeProject::getInstance()->executeTask('cperm');\n\t\tChangeProject::getInstance()->executeTask('import-data', array('markergmaps', 'init.xml'));\n\t}", "public function create_task()\n {\n $title = $this->input->post('title');\n $start_date = $this->input->post('start_date');\n $due_date = $this->input->post('due_date');\n $description = $this->input->post('description');\n $user_id = $this->session->userdata('USER_ID');\n \n // get inputs - task category\n // $task_cat_name = $this->input->post('name');\n $task_cat_name = \"Medical Aid\";\n $task_cat_description =$this->input->post('description');\n \n \n // get inputs - task status\n //$task_status_name = $this->input->post('name');\n $task_status_name = \"Open\";\n $task_status_description =$this->input->post('description');\n \n \n \n $this->db->trans_start();\n \n // new task\n $this->new_task_data($title,$start_date,$due_date,$description, $user_id);\n // new task category\n $this->create_task_category($task_cat_name, $task_cat_description);\n // new task status\n $this->create_task_status($task_status_name, $task_status_description);\n \n // get all tasks\n $this->fetch_all_tasks();\n \n // update task details\n //$this->update_task($id);\n \n // delete task\n // $this->delete_task();\n \n // Complete transaction\n $this->db->trans_complete();\n \n return $this->db->trans_status();\n }", "public function run()\n {\n factory(\\App\\Task::class, 50)->create()\n ->each(function ($task) {\n if (mt_rand(0, 3) == 1) {\n $task->parent_task_id = App\\Task::inRandomOrder()\n ->where('id', '!=', $task->id)->first()->id;\n\n $task->save();\n }\n });\n }", "function update_start()\n {\n }", "function install($upgrade_from=NULL,$upgrade_from_hack=NULL)\n\t{\n\t\tif ((is_null($upgrade_from)) || ($upgrade_from < 4))\n\t\t{\n\t\t\t$GLOBALS['SITE_DB']->create_table('customtasks',array(\n\t\t\t\t'id'=>'*AUTO',\n\t\t\t\t'tasktitle'=>'SHORT_TEXT',\n\t\t\t\t'datetimeadded'=>'TIME',\n\t\t\t\t'recurinterval'=>'INTEGER',\n\t\t\t\t'recurevery' =>'ID_TEXT',\n\t\t\t\t'taskisdone' =>'?TIME'\n\t\t\t));\n\n\t\t\trequire_lang('staff_checklist');\n\t\t\t$tasks=array(\n\t\t\t\tdo_lang('CHECKLIST_INITIAL_TASK_STRUCTURE'),\n\t\t\t\tdo_lang('CHECKLIST_INITIAL_TASK_FAVICON'),\n\t\t\t\tdo_lang('CHECKLIST_INITIAL_TASK_WEBCLIP'),\n\t\t\t\tdo_lang('CHECKLIST_INITIAL_TASK_THEME'),\n\t\t\t\tdo_lang('CHECKLIST_INITIAL_TASK_CONTENT'),\n\t\t\t\t'[page=\"adminzone:admin_themes:edit_image:logo/trimmed-logo:theme=default\"]'.do_lang('CHECKLIST_INITIAL_TASK_MAIL_LOGO').'[/page]',\n\t\t\t\t'[page=\"adminzone:admin_themes:_edit_templates:theme=default:f0file=MAIL.tpl\"]'.do_lang('CHECKLIST_INITIAL_TASK_MAIL').'[/page]',\n\t\t\t\t'[url=\"'.do_lang('CHECKLIST_INITIAL_TASK_P3P').'\"]http://www.p3pwiz.com/[/url]',\n\t\t\t\t'[url=\"'.do_lang('CHECKLIST_INITIAL_TASK_GOOGLE').'\"]http://www.google.com/addurl/[/url]',\n\t\t\t\t'[url=\"'.do_lang('CHECKLIST_INITIAL_TASK_BING').'\"]http://www.bing.com/webmaster/SubmitSitePage.aspx[/url]',\n//\t\t\t\t'[url=\"'.do_lang('CHECKLIST_INITIAL_TASK_YAHOO').'\"]http://publisher.yahoo.com/rss_guide/submit.php[/url]',\n\t\t\t\t'Facebook user? Like ocPortal on Facebook:[html]<iframe src=\"http://www.ocportal.com/facebook.html\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:430px; height:30px;\" allowTransparency=\"true\"></iframe>[/html]',\n\t\t\t\t'[url=\"Consider helping out with the ocPortal project\"]http://ocportal.com/site/helping_out.htm[/url]',\n\t\t\t);\n\t\t\tforeach ($tasks as $task)\n\t\t\t{\n\t\t\t\t$GLOBALS['SITE_DB']->query_insert('customtasks',array(\n\t\t\t\t\t'tasktitle'=>$task,\n\t\t\t\t\t'datetimeadded'=>time(),\n\t\t\t\t\t'recurinterval'=>0,\n\t\t\t\t\t'recurevery' =>'',\n\t\t\t\t\t'taskisdone' =>NULL,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "public function setTaskStarted()\n {\n // Create our file for this task.\n // Content doesn't matter, but let's write a timestamp. Maybe we'll want it later for performance\n // monitoring, timeouts, etc.\n file_put_contents($this->taskFilePath, time());\n }", "function jumpToFirstUnfinishedSetupStep()\n\t{\n\t\tif (!$this->setup->getClient()->status[\"db\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"db\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayDatabase();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"lang\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"lang\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayLanguages();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"contact\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"contact\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayContactData();\n\t\t}\n\t\telseif(!$this->setup->getClient()->status['proxy']['status'])\n\t\t{\n\t\t\t$this->cmd = \"proxy\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayProxy();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"nic\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"nic\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayNIC();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"finish\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"finish\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayFinishSetup();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function run()\n {\n DB::table('tasks')->insert([\n 'name' => str_random(10),\n 'completed' => 1,\n 'project_id' => 1,\n ]);\n }", "final function whatIsGood() {\n echo \"Running is good <br>\";\n }", "public function run()\n {\n Task::insert([\n [\n 'user_id'=>1,\n 'task'=>'Woke up at 6am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Take Breakfast at 7am',\n ],\n [\n 'user_id'=>1,\n 'task'=>'Meet With Mr.Client at 10am',\n ]\n ]);\n }", "public function execute()\n {\n $this->slectPrioritis();\n\n Bots::getInstance()->clearNext();\n $ants = Bots::getInstance()->getList();\n foreach ($ants as $ant){\n\n $log = !empty($ant->gol) ? implode(Tools::createCoordinate($ant->gol), ':') : 'НЕТУ';\n// Tools::logger(\"Ant:[\" . implode(Tools::createCoordinate($ant->currentCoord ), ':'). \"] = EDA:$log\");\n $coordinats = Tools::createCoordinate($ant->currentCoord);\n if (empty($ant->gol)){\n// Tools::logger(\"У этого нет цели \" . $ant->currentCoord . \" Ставим ему дефолт\");\n// $ant->gol = $ant->currentCoord;\n// $ant->gol = Tools::createNum(28, 19);\n// $ant->gol = Tools::createNum(10, 67);\n// $ant->gol = Tools::createNum(14, 19);\n }\n// $golCoord = Tools::createCoordinate($ant->gol);\n// $dir = $this->createDirection($coordinats, $golCoord);\n// $dir = Tools::createDirection($coordinats, $golCoord);\n $dirArray = Tools::createDirection($ant);\n// Tools::logger(\"GO TO ВЫБОР ИЗ : \" . implode(':',$dirArray));\n $dir = Bots::getInstance()->selectMove($ant, $dirArray);\n// Bots::getInstance()->addNext($ant, $dir);\n// Tools::logger(\"GO TO ВЫБРАЛ $dir\");\n// Tools::logger(\"GO TO Этот выбрал - > \" . print_r($coordinats,true));\n\n $nextCoordinat = Tools::nextStep($ant->coordinatColRow['col'], $ant->coordinatColRow['row'], $dir);\n $nextNum = Tools::createNum($nextCoordinat['row'], $nextCoordinat['col']);\n \n Steamer::issueOrder($coordinats['row'], $coordinats['col'], $dir);\n// break;\n }\n\n }", "public function run()\n {\n $tasks = [\n 0 =>[\n 'nome' => 'dormir',\n 'status' => '0'],\n 1 =>[\n 'nome' => 'bebet',\n 'status' => '0']\n ];\n DB::table('tasks')->insert($tasks);\n }", "public function processChangeInterventionMigrationLineForFunction(){\n $this->html = \"can't found script whith theses parameters ...\"; \n $this->ei_script = Doctrine_Core::getTable(\"EiScript\")->findOneByScriptId($this->script_id);\n if ($this->ei_script != null):\n /* Avant l'envoi de la reqûete au système central , on s'assure que la fonction ne possède pas de script pour le package/ticket concerné */\n $exist_script = Doctrine_Core::getTable(\"EiScript\")->findByFunctionIdAndFunctionRefAndTicketIdAndTicketRef($this->ei_script->getFunctionId(), $this->ei_script->getFunctionRef(), $this->ei_ticket->getTicketId(), $this->ei_ticket->getTicketRef());\n if (count($exist_script) == 0):\n $result = $this->ei_script->changeInterventionInMigrationLine($this->ei_ticket); //On invoque la méthode de la classe ei_script permettant de changer l'intervention\n \n $this->html = $result[\"message\"];\n $this->success = $result[\"success\"];\n else:\n $this->html = \"Warning! there is a function already link to this intervention ...\";\n endif;\n endif;\n }", "function runme()\n\t{\n\t\tif ( $this->ipsclass->input['un'] != 1 )\n\t\t{\n\t\t\t$mod_info = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'installed_mods',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"m_name='\".$this->xml_array['mod_info']['title']['VALUE'].\"'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t);\n\t\t\t\n\t\t\tif ( !$mod_info )\n\t\t\t{\n\t\t\t\t$mod = array();\n\t\t\t\t$mod['m_name'] = $this->xml_array['mod_info']['title']['VALUE'];\n\t\t\t\t$mod['m_version'] = $this->xml_array['mod_info']['version']['VALUE'];\n\t\t\t\t$mod['m_author'] = $this->xml_array['mod_info']['author']['VALUE'];\n\t\t\t\t$mod['m_started'] = 1;\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->force_data_type['m_version'] = 'string';\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->do_insert( 'installed_mods', $mod );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $mod_info['m_started'] != 1 )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'installed_mods', array( 'm_started' => 1 ), \"m_name='\".$this->xml_array['mod_info']['title']['VALUE'].\"'\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$step = ( $this->ipsclass->input['step'] ) ? $this->ipsclass->input['step'] : 0;\n\t\t$task = $this->steps[ $step ];\n\t\t$this->$task();\n\t}", "function insert_task($task)\r\n{\r\n\tglobal $db;\r\n\r\n\t$allowedfields = array('type','name','comments','priority','time','date','tid');\r\n\r\n\tforeach($task as $tk => $t)\r\n\t{\r\n\t\tif(!in_array($tk,$allowedfields))\r\n\t\t{\r\n\t\t\tunset($task[$tk]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Validate type\r\n\t$task['type'] = (int)$task['type'];\r\n\tif($task['type'] != 1 && $task['type'] != 2)\r\n\t{\r\n\t\t// Default to a task\r\n\t\t$task['type'] = 1;\r\n\t}\r\n\r\n\t// Validate name\r\n\t$task['name'] = trim($task['name']);\r\n\tif(empty($task['name']))\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"The name cannot be blank.\");\r\n\t} else {\r\n\t\t// Clean it out\r\n\t\t$task['name'] = htmlspecialchars_uni($db->escape_string($task['name']));\r\n\t}\r\n\r\n\t// Comments aren't required, we'll just clean it\r\n\t$task['comments'] = htmlspecialchars_uni($db->escape_string($task['comments']));\r\n\r\n\t// Priority\r\n\t$task['priority'] = (int)$task['priority'];\r\n\tif($task['priority'] != 1 && $task['priority'] != 2 && $task['priority'] != 3)\r\n\t{\r\n\t\t// Default to a medium\r\n\t\t$task['type'] = 2;\r\n\t}\r\n\r\n\t// Time\r\n\t$time = explode(':',$task['time']);\r\n\t$hour = (int)$time[0];\r\n\t$minute = (int)$time[1];\r\n\r\n\tif($hour > 23 || $hour < 0 || $minute > 59 || $minute < 0)\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"Invalid time!\");\r\n\t} else {\r\n\t\t$task['time'] = \"{$hour}:{$minute}\";\r\n\t}\r\n\r\n\t// Date\r\n\t$date = explode('-',$task['date']);\r\n\t$year = (int)$date[0];\r\n\t$month = (int)$date[1];\r\n\t$day = (int)$date[2];\r\n\r\n\tif(checkdate($month,$day,$year))\r\n\t{\r\n\t\t$task['date'] = \"{$year}-{$month}-{$day}\";\r\n\t} else {\r\n\r\n\t}\r\n\r\n\t// Are we in the past?\r\n\t$dv = \"{$month}/{$day}/{$year}\";\r\n\t$time = strtotime(\"{$dv} {$task['time']}\");\r\n\tif ($time < time())\r\n\t{\r\n\t\treturn array(\"error\" => true, \"message\" => \"You can't schedule something in the past!\");\t\r\n\t}\r\n\r\n\t// Edit or add?\r\n\tif(isset($task['tid']))\r\n\t{\r\n\t\t$task['tid'] = (int)$task['tid'];\r\n\t\t// Edit it is!\r\n\t\t// Check to make sure the task exists\r\n\r\n\t\t$texists = $db->simple_select('tasks','*',\"tid='{$task['tid']}'\");\r\n\t\tif($db->num_rows($texists) == 0)\r\n\t\t{\r\n\t\t\treturn array(\"error\" => true, \"message\" => \"Invalid task.\");\t\t\t\r\n\t\t}\r\n\r\n\t\t$db->update_query('tasks',$task,\"tid='{$task['tid']}'\");\r\n\r\n\t} else {\r\n\t\t// Add this new baby!\r\n\t\t$db->insert_query('tasks',$task);\r\n\t\treturn true;\r\n\t}\r\n}", "public function taskA()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task A\n Performance::finish();\n }", "public function solved(){\n }", "public function action_taskexecuter() {\n $tasks = Model_Admin_Task::query()->where('done', 0)\n ->order_by('whentodo', 'asc')\n ->get();\n \n $now = time();\n foreach ($tasks as $task) {\n \n // This with all after tasks are futur tasks\n if(intval($task->whentodo) > $now)\n break;\n \n switch ($task->type) {\n case \"newsletter\":\n \n // Title and content\n $params = Format::forge($task->parameters, 'json')->to_array();\n $title = $params['title'];\n $content = $params['content'];\n $smscontent = $params['smscontent'];\n \n // Collect all users\n $users = Model_13user::find('all');\n // Send mail to email users\n foreach ($users as $user) {\n if($user->notif == \"sms\") {\n // Wait for sms implementation\n }\n else {\n $data = array(\n 'title' => $title,\n 'content' => $content,\n 'pseudo' => $user->pseudo\n );\n // Send mail\n Controller_Base::sendHtmlMail(\n '[email protected]', \n 'Season13.com', \n $user->email, \n 'Newsletter Season13.com', \n 'mail/newsletter', \n $data\n );\n }\n }\n \n $task->hasdone();\n \n break;\n }\n }\n $data['admin_tasks'] = $tasks;\n \t$this->template->title = \"Tasks just done\";\n \t$this->template->content = View::forge('admin/task/index', $data);\n }", "public function run() : void\n {\n DB::table('user_task')->truncate();\n\n $users = DB::table('users')->get();\n $tasks = DB::table('task')->get();\n $usersCount = count($users);\n $tasksCount = count($tasks);\n\n for ($i = 0; $i < 350; $i++) {\n $userId = $users[random_int(0, $usersCount - 1)]->id;\n $taskId = $tasks[random_int(0, $tasksCount - 1)]->taskid;\n while (DB::table('user_task')->where('user_taskid', '=', $userId . $taskId)->first()) {\n $userId = $users[random_int(0, $usersCount - 1)]->id;\n $taskId = $tasks[random_int(0, $tasksCount - 1)]->taskid;\n }\n\n DB::table('user_task')->insert([\n 'user_taskid' => $userId . $taskId,\n 'userid' => $userId,\n 'taskid' => $taskId,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }\n }", "public function startup()\n {\n parent::startup();\n Configure::write( 'debug', 2 );\n Configure::write( 'Cache.disable', 1 );\n\n $task = Inflector::classify( $this->command );\n }", "public function run()\n {\n Task::create([\n 'name' => 'Task 1',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n\n Task::create([\n 'name' => 'Task 2',\n 'user_id' => '2',\n 'project_id' => '2',\n 'description' => 'you have to bla bla bla',\n 'status' => 'toDo'\n ]);\n }", "public function run()\n { \n factory(Task::class,5)->create();\n \n /*\n $date = \\Carbon\\Carbon::now()->toDateString();\n $types = array(\n array('keep' =>'detalle'\n ),\n array('keep' =>'detalle 2' \n ),\n array('keep' =>'detalle')\n );\n\n foreach($types as $type)\n {\n $task = new \\App\\Task();\n $task->keep = $type['keep'];\n $task->save();\n\n }\n */\n }", "function procNewTask() {\n global $session, $form;\n //Attempt\n $retval = $session->newtask($_POST['task_title'], $_POST['task_desc'], $_POST['task_priority'], $_POST['task_assign'], $_POST['project']);\n\n if ($retval == 0) {\n $_SESSION['task_success' . $_POST['project']] = true;\n header(\"Location: \" . $session->referrer);\n } else if ($retval == 1) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n } else if ($retval == 2) {\n $_SESSION['task_success' . $_POST['project']] = false;\n header(\"Location: \" . $session->referrer);\n }\n }", "public function testTask()\n\t{\n \n //Need also define the ssh keys and password in config.php\n \n //Insert first a task\n \n /*$arr_task=['name_task' => 'live', 'descripton_task' => 'Script for check if server is alive', 'arguments' => [], 'status' => 0, 'url_return' => '', 'server' => SERVER_REMOTE];\n \n $new_task=$m->task->insert($arr_task);\n \n $id=$m->task->insert_id();\n \n $this->assertNotFalse($new_task);\n \n $arr_task['IdTask']=$id;*/\n \n //Select task from db\n \n //Execute task\n \n $task=new Task(SERVER_REMOTE);\n \n $task->files=[['vendor/phangoapp/leviathan/tests/script/alive.sh', 0755]];\n \n $task->commands_to_execute=[['/bin/bash', 'vendor/phangoapp/leviathan/tests/script/alive.sh', ''], ['sudo', 'vendor/phangoapp/leviathan/tests/script/alive.sh', '']];\n \n $task->delete_files=['vendor/phangoapp/leviathan/tests/script/alive.sh'];\n \n $task->delete_directories=['vendor/phangoapp/leviathan/tests'];\n \n $task->name_task='Live';\n \n $task->description_task='Check if server is alive';\n \n $task->codename_task='live';\n \n $result=$task->exec();\n \n echo $task->txt_error;\n \n $this->assertTrue($result);\n \n \n \n }", "function initMonthlyRecurPattern($taskArray){\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 // 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 \r\r\n $taskMonthlyPattern=$taskArray['monthly_pattern']; \r\r\n $taskMonthDate=$taskArray['monthly_onof_day'];\r\r\n $taskMonthEveryNumofMonth=$taskArray['monthly_every_noof_months'];\r\r\n $taskMonthWeekNumber=strtolower($taskArray['monthly_weeknumber']);\r\r\n $taskMonthWeekDayName=$taskArray['monthly_weekday'];\r\r\n $taskMonthWeekEveryNumofMonth=$taskArray['monthly_weekof_noof_months']; \r\r\n $pastArray=array();\r\r\n \r\r\n if($taskStartDate < $today){\r\r\n $today=date(\"Y-m-d\");\r\r\n \r\r\n if($taskMonthlyPattern==\"dayofeverymonth\") {\r\r\n $nthDayOfMonthPattern=$taskMonthDate; \r\r\n $taskEveryNumOfMonth=$taskMonthEveryNumofMonth; \r\r\n }else if($taskMonthlyPattern==\"weekdayofeverymonth\"){\r\r\n //$nthDayOfMonthPattern=$taskMonthWeekNumber.\" \".$taskMonthWeekDayName; \r\r\n if($taskMonthWeekNumber==\"first\"){$wknm=\"0\";}else if($taskMonthWeekNumber==\"second\"){$wknm=\"1\";}else if($taskMonthWeekNumber==\"third\"){$wknm=\"2\";}else if($taskMonthWeekNumber==\"fourth\"){$wknm=\"3\";}else{ $wknm=\"5\"; }\r\r\n $nthDayOfMonthPattern= \"+\".$wknm.\" week \".$taskMonthWeekDayName; \r\r\n \r\r\n $taskEveryNumOfMonth=$taskMonthWeekEveryNumofMonth; \r\r\n }\r\r\n //echo \"<br/> Every \".$nthDayOfMonthPattern; \r\r\n $taskNextExeChkDate=$taskStartDate;\r\r\n $taskNxtDateYear= date(\"Y\", strtotime($taskNextExeChkDate));\r\r\n $taskNxtDateMon= date(\"F\", strtotime($taskNextExeChkDate));\r\r\n $month =$taskNxtDateMon;\r\r\n $year=$taskNxtDateYear;\r\r\n if($taskMonthWeekNumber==\"last\" && $taskMonthlyPattern==\"weekdayofeverymonth\"){\r\r\n if(strtolower($month)==\"december\" ){\r\r\n $year=$year+1;\r\r\n $month=\"january\";\r\r\n }else{\r\r\n $result = strtotime(\"01 \".$month.\" \".$year); \r\r\n $month = date('F', strtotime('+1 month', $result)); \r\r\n }\r\r\n // $nthDayOfMonthPattern=$taskMonthWeekNumber.\" \".$taskMonthWeekDayName;\r\r\n $nthDayOfMonthPattern=\"-1 week \".$taskMonthWeekDayName; \r\r\n }else if($taskMonthlyPattern==\"dayofeverymonth\"){\r\r\n // selected date will not come in some month then it will take last date of month \r\r\n $nthDayOfMonthPattern=$taskMonthDate; \r\r\n $lastDayofMonth = date('t',strtotime(\"1 \".$month.\" \".$year)); \r\r\n if($lastDayofMonth < $taskMonthDate) {\r\r\n $nthDayOfMonthPattern=$lastDayofMonth; \r\r\n }\r\r\n }\r\r\n $utNthDateOfMonth = strtotime( $nthDayOfMonthPattern.\" \".$month.\" \".$year); \r\r\n $taskExeDate=date(\"Y-m-d\", $utNthDateOfMonth); \r\r\n \r\r\n \r\r\n if($taskExeDate < $today){\r\r\n while($taskExeDate < $today){\r\r\n if($taskExeDate < $taskStartDate ){\r\r\n $taskExeDate=date(\"Y-m-d\", strtotime(date(\"Y-m-d\", strtotime($taskExeDate)).\" +1 month\" )); \r\r\n }\r\r\n $taskNxtDateYear= date(\"Y\", strtotime($taskExeDate));\r\r\n $taskNxtDateMon= date(\"F\", strtotime($taskExeDate));\r\r\n $month =$taskNxtDateMon;\r\r\n $year=$taskNxtDateYear;\r\r\n if($taskMonthWeekNumber==\"last\" && $taskMonthlyPattern==\"weekdayofeverymonth\"){\r\r\n if(strtolower($month)==\"december\"){\r\r\n $year=$year+1;\r\r\n $month=\"january\";\r\r\n }else{\r\r\n $result = strtotime(\"01 \".$month.\" \".$year); \r\r\n $month = date('F', strtotime('+1 month', $result)); \r\r\n }\r\r\n // $nthDayOfMonthPattern=$taskMonthWeekNumber.\" \".$taskMonthWeekDayName; \r\r\n $nthDayOfMonthPattern=\"-1 week \".$taskMonthWeekDayName; \r\r\n }else if($taskMonthlyPattern==\"dayofeverymonth\"){\r\r\n // selected date will not come in some month then it will take last date of month \r\r\n $nthDayOfMonthPattern=$taskMonthDate; \r\r\n $lastDayofMonth = date('t',strtotime(\"1 \".$month.\" \".$year)); \r\r\n if($lastDayofMonth < $taskMonthDate) {\r\r\n $nthDayOfMonthPattern=$lastDayofMonth; \r\r\n }\r\r\n }\r\r\n \r\r\n $utNthDateOfMonth = strtotime( $nthDayOfMonthPattern.\" \".$month.\" \".$year); \r\r\n $taskExeDate=date(\"Y-m-d\", $utNthDateOfMonth); \r\r\n if($taskExeDate < $today){ \r\r\n $taskTotalOccurenceCount++;\r\r\n $taskLastOccurenceDate= $taskExeDate; //echo \"<br/> Last \".$taskTotalOccurenceCount.\" Occurence : \".$taskLastOccurenceDate; \r\r\n\r\r\n $newArray=$taskArray;\r\r\n //$taskTotalOccurenceCount++;\r\r\n $newArray['task_last_execution_date']=$taskLastOccurenceDate; \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 $lastYear= date(\"Y\", strtotime($taskExeDate));\r\r\n $lastMon= date(\"F\", strtotime($taskExeDate));\r\r\n $lastStrTime=strtotime(\"01 \".$lastMon.\" \".$lastYear); \r\r\n $taskExeDate=date(\"Y-m-d\", strtotime(date(\"Y-m-d\", $lastStrTime).\" +\".$taskEveryNumOfMonth.\" month\" )); \r\r\n }else{\r\r\n break;\r\r\n }\r\r\n }\r\r\n }else{\r\r\n $taskTotalOccurenceCount=0;\r\r\n $taskLastOccurenceDate=\"0000-00-00\";\r\r\n // echo \"<br/> Last \".$taskTotalOccurenceCount.\" Occurence : \".$taskLastOccurenceDate; \r\r\n }\r\r\n }\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->calculateMonthlyNextExecutionDate($taskLastOccurenceDate,$taskTotalOccurenceCount,$taskStartDate, $taskMonthlyPattern, $taskMonthDate,$taskMonthEveryNumofMonth,$taskMonthWeekNumber,$taskMonthWeekDayName, $taskMonthWeekEveryNumofMonth, $taskTaskEndAfterOccurrences, $taskTaskEndByDate);\r\r\n if($taskNextOccurenceDate==\"0000-00-00\"){\r\r\n $task_is_done=1;\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 \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 return $pastArray;\r\r\n \r\r\n }", "public function onRsformFrontendSwitchTasks(): void\n\t{\n\t\t$plugin_task = $this->app->input->get('plugin_task');\n\n\t\tswitch ($plugin_task)\n\t\t{\n\t\t\tcase 'jdideal.notify':\n\t\t\t\t$this->rsfp_f_jdidealNotify();\n\t\t\t\tbreak;\n\t\t\tcase 'jdideal.return':\n\t\t\t\t$formId = $this->app->input->getInt('formId');\n\t\t\t\t$this->jdidealReturn($formId);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handleTeststep ($row, $tc_id, $ts_id, $seq)\n{\n $ts = [];\n if(!isset($row[9])|| $row[9] == null || $row[9] == \"\"){\n\t\t\t//If nothing to process then do nothing\n\t\t\t//return $ts_id;\n }else{\n $ts['description'] \t\t= $row[9];\n $ts['expected_result'] \t= $row[10];\n $ts['tp_id'] \t\t\t= session()->get('open_project');\n $ts['tc_id'] \t\t\t= $tc_id;\n $check \t\t\t\t\t= \\App\\TestStep::where($ts)->first();\n if($check == null)\n {\n $ts_id = $ts['ts_id'] = $tc_id.\"_\".$this->genrateRandomInt();\n $ts['status'] = 'not_executed';\n $ts['created_by'] = session()->get('email');\n $ts['seq_no'] = $seq;\n \\App\\TestStep::create($ts);\n $execution_content['scroll'] = 'No';\n $execution_content['resource_id'] = '';\n $execution_content['text'] = '';\n $execution_content['content_desc'] = '';\n $execution_content['class'] = '';\n $execution_content['index'] = '';\n $execution_content['sendkey'] = '';\n $execution_content['screenshot'] = 'No';\n $execution_content['checkpoint'] = '';\n $execution_content['wait'] = '';\n $execution_content['tc_id'] = $tc_id;\n $execution_content['tp_id'] = session()->get('open_project');\n $execution_content['ts_id'] = $ts_id;\n $execution_content['tl_id'] = 0;\n $execution_content['seq_no'] = $seq;\n $execution_content['e_id'] = $ts_id.\"_\".$this->genrateRandomInt();\n \\App\\Execution::create($execution_content);\n }\n else{\n $ts_id = $check->ts_id;\n }\n }\n return $ts_id;\n }", "public function work()\n {\n }", "public function run()\n {\n DB::table('hints')->insert(\n [\n // tour 1\n [\n 'hint' => 'In de buurt van het gebouw met die kleurtjes',\n 'event_id' => 1,\n 'cost' => 100\n ],\n [\n 'hint' => 'Sinds kort zijn de opleidingen verkort',\n 'event_id' => 2,\n 'cost' => 50\n ],\n [\n 'hint' => 'Yo, wat denk je nou zelf?',\n 'event_id' => 3,\n 'cost' => 150\n ],\n // tour 2\n [\n 'hint' => 'Sinds de 19e eeuw',\n 'event_id' => 4,\n 'cost' => 100\n ],\n [\n 'hint' => 'Minder dan 300',\n 'event_id' => 5,\n 'cost' => 50\n ],\n [\n 'hint' => 'Dordrecht kan je alleen binnenkomen door over water te gaan',\n 'event_id' => 6,\n 'cost' => 150\n ],\n // tour 3\n [\n 'hint' => 'Het zijn er heel veel',\n 'event_id' => 7,\n 'cost' => 100\n ],\n [\n 'hint' => 'Heel groen',\n 'event_id' => 8,\n 'cost' => 50\n ],\n [\n 'hint' => 'Natuurlijker kan niet!',\n 'event_id' => 9,\n 'cost' => 150\n ]\n ]\n );\n }", "private function setup() {\n sfContext::createInstance($this->configuration);\n\n $this->status = TaskStatus::getTaskStatus($this);\n\n $this->logger = new sfFileLogger(\n sfContext::getInstance()->getEventDispatcher(),\n array('file' => './log/tasks/'.get_class($this).'.log'));\n\n if(false === $this->status) {\n $this->log(\"Status row in Database does not exist\");\n $this->status = new TaskStatus();\n $this->status->task_name = get_class($this);\n $this->status->save();\n }\n\n $this->status->description = substr($this->briefDescription, 0, 120);\n\n $this->log(\"Task was executed via cronjob.\");\n }", "public function changeStartTime($task_id, $old_start_time, $new_start_time){\n $this->create();\n $data = array(\n 'task_id'=>$task_id,\n 'change_type_id'=>101,\n );\n \n if($old_start_time){\n $data['old_val'] = $old_start_time;\n }\n if($new_start_time){\n $data['new_val'] = $new_start_time;\n }\n\n if(CakeSession::read('Auth.User.id')){\n $data['user_id']= CakeSession::read('Auth.User.id');\n }\n if($this->save($data)){\n return true;\n }\n else{\n return false; \n }\n }", "public function run()\n {\n \t// Person against person\n \t// Person against self\n \t// Person against nature\n \t// Person against society\n \t// Person against the supernatural\n \t// Person against technology\n\n \t/*\n \t\tIn order to stop a :villainTraitList: :villainOccupation:,\n\t\t\t:mainCharacterName:, a :mainCharacterAge: year-old \n\t\t\t:mainCharacterOccupation: enlists the help of \n\t\t\t:mainCharacterPossessive: :numberOfSupportingCharacters:\n\t\t\tfriends to :resolutionAction: :resolutionNameWithArticle:.\n \t */\n\n $conflicts = [\n \t''\n ];\n }", "protected function executeTasks() {}", "public function start_task ($vars)\r\n\t{\r\n\t\tif ($this->get_initial_data($vars))\r\n\t\t{\r\n\t\t\tif ($vars[\"only_xml\"] == TRUE)\r\n\t\t\t{\r\n\t\t\t\t$feed = $this->get_xml_string($vars);\r\n\t\t\t\treturn $feed;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->task_process($vars);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//1- Log\r\n\t\t\t$this->get_pt_log_srv()->add_log(-1, \"\", \"\", $vars[\"task_type\"], \"Fail getting initial parameters at \" . date(\"m/d/Y G:i:s\"));\r\n\r\n\t\t\t//2- Return\r\n\t\t\treturn $this->checkout_failure_handler($_SESSION[\"NOTICE\"] . \"fail getting initial parameters\");\r\n\t\t}\r\n\t}", "public static function commandSetStatus(){\n\n self::$console->register('set:status')\n ->setDescription('Sets a Task as complete \"todo\", \"inprogress\", \"complete\"')\n ->setDefinition(array(\n new InputArgument('taskid', InputArgument::OPTIONAL, \"Task ID - if no id is specified, active task will be used\", 'nope'),\n new InputArgument('status', InputArgument::OPTIONAL, \"Status. : todo, inprogress, toverify, complete\", 0)\n ))\n ->setCode(function (InputInterface $input, OutputInterface $output) {\n\n\n $taskid = (int) $input->getArgument(\"taskid\");\n $set_status = $input->getArgument(\"status\");\n\n\n if ($taskid == 0) {\n //Try to get current active task because no task was specified\n $taskid = (int) Helper::getActiveTaskId($output);\n if (!$taskid) {\n $output->writeln(\"<error>No task ID was specified or could be found in the active task.</error>\");\n die();\n }\n }\n\n if ($set_status == 'nope') {\n $output->writeln(\"<error>You need to specify the status: todo, inprogress, toverify or complete</error>\");\n die();\n }\n\n $taskInfo = Task::GetTaskInfo($taskid);\n $project_id = $taskInfo->PROJECT_ID;\n\n //check if the task exists:\n $statuses = Task::GetTaskStatuses(array(\n \"projectid\" => $project_id,\n ));\n\n //print_r($statuses);\n Helper::checkError($output);\n\n $mapStatus = array(\n \"todo\" => \"To do\",\n \"inprogress\" => \"In Progress\",\n \"progress\" => \"In Progress\",\n \"completed\" => \"Completed\",\n \"done\" => \"Completed\",\n \"toverify\" => \"To Verify\",\n \"verify\" => \"To Verify\",\n );\n\n if(isset($mapStatus[$set_status])){\n $searchStatus = $mapStatus[$set_status];\n }else{\n $output->writeln(\"<error>Status {$set_status} seems to be invalid!</error>\");\n }\n //find the Completed Task:\n $status_id = 0;\n foreach($statuses as $status){\n if($status->TASK_STATUS_NAME == $searchStatus ){\n $status_id = $status->TASK_STATUS_ID;\n }\n }\n\n if($status_id == 0){\n $output->writeln(\"<info>No Status ID was found for project {$project_id}</info>\");\n die();\n }\n\n Task::SaveTask(array(\n \"taskid\" => $taskid,\n \"statusid\" => $status_id,\n \"notify\" => false\n ));\n\n //finally, set the active task:\n Helper::setSession(\"TASK_ID\", $taskid);\n\n $output->writeln(\"<info>Task status was set to '{$searchStatus}'.</info>\");\n\n });\n\n }", "public function register_start()\n {\n\n echo \"Started a New Action \";\n $project = readline(\"On what project are you working on? \");\n $this->project = $project;\n date_default_timezone_set('Europe/Berlin');\n //Array that keeps the localtime \n $arrayt = localtime();\n //calculates seconds rn for further use\n $timeRN = $arrayt[0] + ($arrayt[1] * 60) + ($arrayt[2] * 60 * 60); //in seconds\n\n $dateRN = date('Y-m-d');\n if (file_exists($this->save)) {\n $json_already = file_get_contents($this->save);\n }\n $json = json_decode($json_already);\n\n $array[] = array(\n\n 'Time' => $dateRN,\n 'Starttime' => $timeRN,\n 'Endtime' => \"\",\n 'Project' => $this->project,\n 'Worked' => \"\"\n\n );\n\n $json[] = $array;\n $json_decoded = json_encode($json);\n\n file_put_contents($this->save, $json_decoded);\n }", "protected function editTaskAction() {}", "function start();", "function start();", "public function task1()\n\t{\n\t\t$phones = DB::table('task1')->take(100)->get();\n\n\t\tforeach($phones as $phone){\n\t\t\tif(preg_match('/^\\+(.*)/', $phone->Phone, $matches)){\n\t\t\t\t$clear = '+' . preg_replace('/[^\\d]+/', '', $phone->Phone);\n\t\t\t}else{\n\t\t\t\t$clear = preg_replace('/[^\\d]+/', '', $phone->Phone);\n\t\t\t}\n\n\t\t\tif(preg_match('/^\\+/', $clear)){\n\t\t\t\t$phone->E = $clear;\n\t\t\t}elseif(preg_match('/^8(.*)/', $clear, $matches)){\n\t\t\t\t$phone->E = '+7' . $matches[1];\n\t\t\t}elseif(preg_match('/\\d{10,}/', $clear)){\n\t\t\t\t$phone->E = '+' . $clear;\n\t\t\t}else{\n\t\t\t\t$phone->E = 'unknown';\n\t\t\t}\n\t\t}\n\n\t\treturn view('task1', array('phones' => $phones));\n\t}", "function Display(){\n\t\t//trigger_error('CREATING TASK DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\t$this->m_eventDataArr = $this->GetEventData();\n\t\t\n\t\t// exec event actions here\n\t\tif(EVENT_ACTIONS_FLAG == 1) {\n\t\t\t//trigger_error('TEST: EVENTS!!!', E_USER_NOTICE);\n\t\t\t$this->ExecEventActions();\t\n\t\t} \n\t\t\n\t\t//trigger_error('ERRORS1: ' . $this->m_errCnt, E_USER_NOTICE);\n\t\t//trigger_error('GetEventData() DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\t$lTaskDefinition = $this->GetTaskDefinition((int)$this->m_eventDataArr['document_id'], (int)$this->m_JournalId);\n\t\t\n\t\t//trigger_error('GetTaskDefinition() DEBUG POINT', E_USER_NOTICE);\n\t\t//trigger_error('ERRORS2: ' . $this->m_errCnt, E_USER_NOTICE);\n\t\t\n\t\tif($this->m_errCnt){\n\t\t\treturn $this->m_errMsgs;\n\t\t}\n\t\t\n\t\tif(!$this->m_customFlag) {\n\t\t\t$this->CreateTask($lTaskDefinition);\n\t\t} else {\n\t\t\t$this->CreateCustomTask();\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t//trigger_error('CreateTask() DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\tif($this->m_errCnt){\n\t\t\treturn $this->m_errMsgs;\n\t\t}\n\t}", "protected function saveTask() {}", "public function run()\n {\n $dataStatus = TaskManagementConstant::ALL_STATUS;\n foreach ($dataStatus as $status) {\n $dataMainTask = [\n 'project_name' => 'SIS project',\n 'owner_id' => 2168978,\n 'created_by' => 2168978,\n 'short_description' => 'This project is good',\n 'type' => 'Main task',\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n\n $mainTask = MainTaskSQL::query()->create($dataMainTask);\n $taskStatus = TaskStatusSQL::query()->create(['name' => $status]);\n $dataSubTask = [\n 'task_name' => 'Create new content',\n 'type' => 'sub-task',\n 'deadline' => '2022/08/06',\n 'assignee_id' => 2168978,\n 'reviewer_id' => 2168978,\n 'created_by' => 2168978,\n 'description' => 'If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.',\n 'main_task_id' => $mainTask->id,\n \"task_status_id\" => $taskStatus->id,\n 'owner_id' => 2168978,\n 'owner_id_no_sql' => '6284b5c0d04110010102b047',\n ];\n $subTask = SubTaskSQL::query()->create($dataSubTask);\n $dataComment = [\n 'name' => \"John Asian\",\n 'avatar' => null,\n 'content' => \"If you want to be happy, do not dwell in the past, do not worry about the future, focus on living fully in the present.\",\n \"sub_task_id\" => $subTask->id,\n \"created_by\" => 2168978,\n ];\n TaskCommentSQl::query()->create($dataComment);\n }\n }", "public function preExecute() {\n }", "public function tab1(){\n $this->layout = new \\stdClass();\n $this->model->rewriteActionConfigField('hide_menubar', 1);\n\n $this->layout->header[] = $this->components->getFauxTopbar(array(\n 'mode' => 'route_back','btn_title'=>false,'title' => '{#add_proof#}','route_back' => 'Tasklist/Default/'));\n\n /* reject note */\n $reject_note = $this->getData('reject_note', 'string');\n\n if($reject_note){\n $box4[] = $this->getComponentText($reject_note, array('style' => 'ern_reject_note'));\n $this->layout->scroll[] = $this->components->getSummaryBox('{#latest_reject_note_from_your_adult#}',$box4);\n }\n\n /* box 1 -- cart */\n $box1[] = $this->components->getCartHeader($this->data);\n\n $cart = $this->getData('cart', 'array');\n\n foreach($cart as $product){\n $box1[] = $this->components->getProductListItem($product,array('no_controls' => true));\n }\n \n $data = $this->getData('task_data', 'array');\n\n if(isset($data['nickname'])){\n $nickname = $data['nickname'];\n } elseif(isset($data['username'])){\n $nickname = $data['username'];\n } else {\n $nickname = '{#unknown#}';\n }\n\n $tasks = $this->getData('tasks_info', 'array');\n $this->layout->header[] = $this->components->getLargeProgress($tasks);\n\n $this->layout->scroll[] = $this->components->getSummaryBox('{#towards#}',$box1);\n\n /* Note */\n $choreType[] = $this->components->getComponentText(\n '{#' . $tasks['category_name'] . '#}',\n array(),\n array('margin' => '5 15 5 15'\n )\n );\n\n $this->layout->scroll[] = $this->components->getSummaryBox('{#chore_type#}',$choreType);\n\n /* box 3 -- summary */\n $box3[] = $this->components->getTaskSummary($this->data);\n $this->layout->scroll[] = $this->components->getSummaryBox('{#how#}',$box3);\n\n $box5[] = $this->getComponentText($tasks['comments'],array('style' => 'mtask_summary_header_content'));\n $this->layout->scroll[] = $this->components->getSummaryBox('{#parent_comment_to_deal#}',$box5);\n\n\n /* image placeholder */\n $image = $this->model->getSavedVariable('proofimage') ? $this->model->getSavedVariable('proofimage') : 'invisible-divider.png';\n $this->layout->scroll[] = $this->getComponentImage($image, array(\n 'variable' => 'proofimage'\n ));\n\n /* add photo button */\n $this->layout->scroll[] = $this->getComponentText('{#add_a_photo#}', array('style' => 'steps_hint','uppercase' => true));\n $this->layout->scroll[] = $this->getComponentText('{#add_a_photo#}',array('style' => 'attach_image_btn',\n 'onclick' => $this->getOnclickImageUpload('proofimage',array('sync_upload' => 1,'max_dimensions' => '450'))));\n\n /* date */\n/* $this->layout->scroll[] = $this->components->getHintedCalendar(\n '{#date#}',\n 'proof_date',\n time(),\n array('header' => false)\n );*/\n\n /* submit to */\n //$this->layout->scroll[] = $this->getComponentText('{#submit_to#}', array('style' => 'steps_hint','uppercase' => true));\n// $this->layout->scroll[] = $this->getComponentText($nickname, array('style' => 'proof_field_static'));\n\n /* description */\n $this->layout->scroll[] = $this->components->getHintedField(\n '{#description#}',\n 'description',\n 'textarea'\n );\n\n $this->layout->scroll[] = $this->getComponentSpacer('30');\n\n\n\n\n $onclick = $this->components->getOnclickShowDiv('cancel_div',\n array('background' => 'blur','tap_to_close' => true),\n array('left' => '50','right' => '50','bottom' => $this->screen_height/2 - 200));\n $btns[] = $this->components->getComponentText('{#cancel#}',array('style' => 'mtask_cancel_btn','onclick' => $onclick,'uppercase' => true));\n\n $onclick_save = $this->components->getOnclickSubmit('mytasks/saveproof/'.$data['taskid']);\n $btns[] = $this->components->getComponentText('{#send#}',array('style' => 'mtask_send_btn_half','onclick' => $onclick_save,'uppercase' => true));\n\n\n\n $this->layout->footer[] = $this->getComponentRow($btns);\n return $this->layout;\n\n }", "public function taskComplete(){\n $taskId = $_POST[\"taskId\"];\n\n $this->individualGroupModel->changeTaskCompletion($taskId, true);\n\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function run()\n {\n \\CodeProject\\Entities\\ProjectTask::truncate();\n factory(\\CodeProject\\Entities\\ProjectTask::class, 10)->create();\n }", "public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}", "public function Insert_Task()\n {\n $project_name = $this->input->post('Project_Name');\n $project = $this->input->post('Project_Select');\n $vall = explode(\"_\", $project);\n $project_icode = $vall[0];\n $contract_type = $vall[1];\n if ($contract_type == '1') {\n $task_data = array(\n 'Task_Project_Icode' => $project_icode,\n 'Task_Client_Icode' => $this->input->post('Client_Name_icode'),\n 'Task_WO_Icode' => '0',\n 'Task_Resource_Icode' => $this->input->post('Resource_Select'),\n 'Task_Contract_Type' => $this->input->post('Contract_Type_icode'),\n 'Task_Project_Phase_Icode' => $this->input->post('Phase_Select'),\n 'Task_Start_Date' => $this->input->post('task_date_start'),\n 'Task_End_Date' => $this->input->post('task_date_end'),\n 'Task_Estimated_Hours' => $this->input->post('Task_E_Hour'),\n 'Task_Description' => $this->input->post('task_desc'),\n 'Task_Created_By' => $this->session->userdata['userid']);\n $insert_project = $this->technical_user_model->Insert_Task($task_data); /*Insert Task Details*/\n $data = array();\n } else {\n $task_data = array(\n 'Task_Project_Icode' => '0',\n 'Task_WO_Icode' => $project_icode,\n 'Task_Client_Icode ' => $this->input->post('Client_Name_icode'),\n 'Task_Resource_Icode' => $this->input->post('Resource_Select'),\n 'Task_Contract_Type' => $this->input->post('Contract_Type_icode'),\n 'Task_Project_Phase_Icode' => '0',\n 'Task_Start_Date' => $this->input->post('task_date_start'),\n 'Task_End_Date' => $this->input->post('task_date_end'),\n 'Task_Estimated_Hours' => $this->input->post('Task_E_Hour'),\n 'Task_Description' => $this->input->post('task_desc'),\n 'Task_Created_By' => $this->session->userdata['userid']);\n $insert_project = $this->technical_user_model->Insert_Task($task_data); /*Insert Task Details*/\n $data = array();\n }\n /*Insert Task Attachments.*/\n if ($insert_project != '0') {\n //print_r($project_name);\n mkdir('Repository/' . $project_name . '/Task Docs', 0777, TRUE);\n $config ['upload_path'] = './Repository/' . $project_name . '/Task Docs/';\n $config['allowed_types'] = 'gif|jpg|jpeg|png|pdf|doc|zip|xlsx';\n $this->load->library('upload', $config);\n // Cache the real $_FILES array, because the original\n // will be overwritten soon :)\n $files = $_FILES;\n $file_count = count($_FILES['user_files']['name']);\n\n //print_r($file_count);\n\n // Iterate over the $files array\n for ($i = 0; $i < $file_count; $i++) {\n // Overwrite the default $_FILES array with a single file's data\n // to make the $_FILES array consumable by the upload library\n $_FILES['user_files']['name'] = $files['user_files']['name'][$i];\n $_FILES['user_files']['type'] = $files['user_files']['type'][$i];\n $_FILES['user_files']['tmp_name'] = $files['user_files']['tmp_name'][$i];\n $_FILES['user_files']['error'] = $files['user_files']['error'][$i];\n $_FILES['user_files']['size'] = $files['user_files']['size'][$i];\n\n $this->upload->initialize($config);\n if (!$this->upload->do_upload('user_files')) {\n // Handle upload errors\n\n // If an error occurs jump to the next file\n break;\n } else {\n //$name = $this->upload->data();\n $name = $data['uploads'][$i] = $this->upload->data();\n //$data = array('file_name' =>$name['file_name']);\n $attachment = array('Attachment_Task_Icode' => $insert_project,\n 'Attachment_Path' => $name['file_name'],\n 'Attachment_Project_Icode' => $this->input->post('Project_Select'),\n 'Attachment_Created_By' => $this->session->userdata['userid']);\n\n $insert_attachment = $this->technical_user_model->Insert_Task_Attachment($attachment); /*Insert Task Attachments*/\n\n }\n }\n $this->session->set_flashdata('message', 'Task Created Successfully..');\n redirect('/User_Controller/Create_Task');\n }\n\n }", "function auto_run()\n\t{\n\t\t//-----------------------------------------\n\t\t// Load some more caches\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->init_load_cache( array( 'components', 'languages' ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the nav\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, '(FSY23) Universal Mod Installer' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Load the XML class\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( KERNEL_PATH.\"class_xml.php\" );\n\t\t$this->ipsclass->xml = new class_xml();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the settings\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->settings_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init ACP Help\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->acp_help_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get our installed mods\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->installed_mods_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the mod\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->mod_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// What are we doing?\n\t\t//-----------------------------------------\n\t\t\n\t\tswitch ( $this->ipsclass->input['code'] )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->view_settings();\n\t\t\t\tbreak;\n\t\t\tcase 'view':\n\t\t\t\t$this->view_mods();\n\t\t\t\tbreak;\n\t\t\tcase 'install':\n\t\t\t\t$this->pre_install();\n\t\t\t\tbreak;\n\t\t\tcase 'work':\n\t\t\t\t$this->runme();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->view_mods();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function createDIAUmpireQuantCommandFile ($task_infor, $all_task_file_path){\n//########################################################################\n \n $use_memery_size = '40G';\n if(defined(\"JAR_MAX_MEMORY\") and JAR_MAX_MEMORY){\n $use_memery_size = JAR_MAX_MEMORY;\n }\n $JAR_Command = get_jar_command($use_memery_size);\n //in analyst dir\n $mapDIA_CRATE_DATA_FILE = dirname(__FILE__).'/create_DIAUmpire_data_unique_pep.php';\n \n echo \"5. Create task command file\\n\";\n echo $task_infor['taskComFile'].\"\\n\";\n print \"-- all searched file locations.\\n\";\n $fp = fopen($task_infor['taskComFile'], \"w\");\n \n fwrite($fp, \"#!/bin/bash\\n\\n\");\n fwrite($fp, \"echo `hostname`\\n\");\n fwrite($fp, \"echo \\\"###1. cd to working dir\\\"\\n\");\n \n $command = \"cd '\".$task_infor['taskDir'].\"'\" ;\n fwrite($fp, \"$command \\n\"); \n $command = \"if [ ! -d ./Results ]\\nthen\\n\\tmkdir ./Results\\nfi\\n\";\n $command .= \"if [ ! -d ./Results ]\\nthen\\n\\techo \\\"Error: Cannot make Results folder\\\"\\n\\texit\\nfi\";\n fwrite($fp, \"$command\\n\"); \n \n if($task_infor['ParentQuantResultsDir']){\n $command = \"if [ ! -f \".$task_infor['ParentQuantResultsDir'].\"/FragSummary.xls ]\\nthen\\n\\techo 'Parent task folder has no FragSummary.xls'\\n\\texit\\nfi\";\n fwrite($fp, \"$command \\n\"); \n $command = \"cp '\". $task_infor['ParentQuantResultsDir'].\"/'*xls '\" . $task_infor['taskDir'].\"/'\" ;\n fwrite($fp, \"$command\\n\"); \n $command = \"FragSummary_FILE=\\\"FragSummary.xls\\\"\";\n fwrite($fp, \"$command \\n\");\n }else{\n fwrite($fp, \"echo \\\"###2. run ProteinProphet for all interact files\\\"\\n\"); \n $all_task_file_path_str = '';\n if($task_infor['tppSchEngine'] == 'iProphet'){\n //my ($tmp_path, $tmp_file_basename, $pep_file_from, $pep_file_to);\n foreach ($all_task_file_path as $theFilePath){\n print $theFilePath.\"\\n\";\n if(strpos($theFilePath, ':') === false) continue;\n list($tmp_path, $tmp_file_basename) = explode(':', $theFilePath);\n $pep_file_from = \"'\". $tmp_path . \"interact-\".$tmp_file_basename.\"_Q'\" . \"*\";\n $pep_file_to = dirname(dirname($tmp_path)). \"/\". $tmp_file_basename . \"/\";\n \n \n $command = \"cd '\".$pep_file_to.\"'\" ;\n fwrite($fp, \"$command \\n\"); \n $command = 'for theFile in `ls interact-* *_LCMSID.serFS *_LibID_* *_Q1.*FS *_Q2.*FS *_Q3.*FS *_masscaliRT.png`;do rm -f $theFile; done';\n \n fwrite($fp, \"$command\\n\"); \n $command = \"cp -f $pep_file_from '$pep_file_to'\";\n fwrite($fp, \"$command\\n\"); \n $all_task_file_path_str .= \"'\".$pep_file_to . \"interact-\".$tmp_file_basename.\"_Q'\" . \"* \";\n }\n $command = \"cd '\".$task_infor['taskDir'].\"'\" ;\n fwrite($fp, \"$command \\n\"); \n \n }else{\n \n foreach ($all_task_file_path as $theFilePath){\n print $theFilePath.\"\\n\";\n $all_task_file_path_str .= \"'\".$theFilePath . \"interact-'*.pep.xml \"; \n }\n }\n \n $command = escapeshellarg(TPP_BIN_PATH.'/ProteinProphet') . \" \". $all_task_file_path_str . escapeshellarg($task_infor['protFilePath']);\n if($task_infor['tppSchEngine'] == 'iProphet'){\n $command .= \" IPROPHET\";\n }\n $command .= \" 2>&1\";\n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n fwrite($fp, \"echo \\\"###3. run DIA_Umpire_Quant\\\"\\n\");\n \n $command = $JAR_Command . escapeshellarg(DIAUMPIRE_BIN_PATH . \"/DIA_Umpire_Quant.jar\") .\" \". escapeshellarg($task_infor['QuantParamFile']);\n \n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n \n $command = \"FragSummary_FILE=`ls -t FragSummary_*.xls | head -1` \\nif [ !-f \\\"\\$FragSummary_FILE\\\" ] \\nthen \\n\\techo 'Error: no DIA-Umpire-Quant result file created.' \\n\\texit \\nelse \\n\\techo 'DIA-Umpire-Quant result files were created.' \\nfi \\n\";\n fwrite($fp, \"$command \\n\");\n \n $command = \"for theFile in `ls *.xls diaumpire.quant_params`\\ndo\\n\\tcp -f \\$theFile Results/`echo \\$theFile|sed \\\"s/_[0-9]\\\\+//g\\\"`\\ndone\";\n fwrite($fp, \"$command \\n\"); \n \n }\n \n if($task_infor['SAINT_or_mapDIA'] == 'mapDIA' && $task_infor['SAINT_bait_name_str']){\n $mapDIA_input = \"mapDIA_input.txt\";\n $mapDIA_data = \"mapDIA_data.txt\";\n $mapDIA_path = dirname(dirname(MAP_DIA_BIN_PATH));\n $CRATE_DATA_FILE_in_mapDIA = $mapDIA_path.\"/create_DIAUmpire_data_unique_pep.php\";\n if(!_is_file($CRATE_DATA_FILE_in_mapDIA)){\n copy($mapDIA_CRATE_DATA_FILE, $CRATE_DATA_FILE_in_mapDIA);\n }\n $mapDIA_option = $task_infor['mapDIA_parameters'];\n $mapDIA_option = str_replace(\",\", \"\\n\",$task_infor['mapDIA_parameters']);\n $fp_mapDIA = fopen($task_infor['taskDir'].\"/\".$mapDIA_input, \"w\");\n fwrite($fp_mapDIA, \"### input file\\nFILE=\".$mapDIA_data.\"\\n\");\n fwrite($fp_mapDIA, $mapDIA_option); \n fclose($fp_mapDIA);\n \n \n \n fwrite($fp, \"echo \\\"###4. run mapDIA\\\"\\n\");\n $command = \"if [ ! -d ./Results/mapDIA ]\\nthen\\n\\tmkdir ./Results/mapDIA\\nfi\\n\";\n fwrite($fp, \"$command \\n\"); \n $command = \"php -f \".escapeshellarg($CRATE_DATA_FILE_in_mapDIA).\" \\$FragSummary_FILE \".escapeshellarg($task_infor['SAINT_bait_name_str']).\" $mapDIA_data\";\n if($task_infor['REMOVE_SHARED_PEPTIDE_GENE'] == 'true'){\n $command .= ' 1';\n }\n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\");\n $command = escapeshellarg(MAP_DIA_BIN_PATH.\"/mapDIA\") . \" \". $mapDIA_input; \n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n $command = \"if [ -f analysis_output.txt ]\\nthen\\n\\techo 'mapDIA result files created'\\n\\tcp -f protein_level.txt peptide_level.txt log2_data.txt fragment_selection.txt analysis_output.txt mapDIA*.txt ./Results/mapDIA/\\nelse\\n\\techo 'no mapDIA result files were created.'\\nfi\";\n \n fwrite($fp, \"$command \\n\"); \n \n \n }else if($task_infor['SAINT_or_mapDIA'] == 'SAINT' && $task_infor['SAINT_bait_name_str']){\n \n fwrite($fp, \"echo \\\"###4. run SAINT\\\"\\n\");\n $command = \"if ls SAINT_Interaction_MS1* > /dev/null 2>&1\\nthen\\n\\techo \\\"SAINT input files were created\\\"\\nelse\\n\\techo \\\"Error: no SAINT input files were created\\\"\\n\\texit\\nfi\";\n fwrite($fp, \"$command \\n\"); \n \n $command = \"for theFile in `ls SAINT_*.txt`\\ndo\\n\\tcp -f \\$theFile Results/`echo \\$theFile|sed \\\"s/_[0-9]\\+//g\\\"`\\ndone\";\n fwrite($fp, \"$command \\n\"); \n \n $tmp_saint_op = explode(',', $task_infor['SAINT_parameters']);\n $saint_para_hash = array();\n $saint_para_hash['saint_type'] = 'express';\n $saint_para_hash['nControl'] = '4';\n $saint_para_hash['nCompressBaits'] = '2';\n $saint_para_hash['nburn'] = '2000';\n $saint_para_hash['niter'] = '5000';\n $saint_para_hash['lowMode'] = '0';\n $saint_para_hash['minFold'] = '1'; \n $saint_para_hash['fthres'] = '0';\n $saint_para_hash['fgroup'] = '0';\n $saint_para_hash['var'] ='0';\n $saint_para_hash['normalize'] ='1';\n $saint_para_hash['has_iRefIndex_file'] = '';\n \n \n foreach ($tmp_saint_op as $thePare) {\n if(strpos($thePare, \":\") === false)continue;\n list($tmp_name, $value) = explode(':', $thePare);\n $saint_para_hash[$tmp_name] = $value;\n }\n \n $tmp_com = ''; \n \n \n if(_is_file(SAINT_SERVER_EXPRESS_PATH.\"/SAINTexpress-int\")){\n \n fwrite($fp, \"echo \\\"#4-1. run SAINT express\\\"\\n\");\n $command = escapeshellarg(SAINT_SERVER_EXPRESS_PATH.\"/SAINTexpress-int\");\n \n if($saint_para_hash['nControl']){\n $command .= \" -L\".$saint_para_hash['nControl'];\n }\n if($saint_para_hash['nCompressBaits']){\n $command .= \" -R\".$saint_para_hash['nCompressBaits'];\n }\n $tmp_com = $command . \" SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n if(_is_file(\"iRefIndex.dat\")){\n $tmp_com .= \" iRefIndex.dat\";\n }\n fwrite($fp, \"echo \\\"$tmp_com\\\"\\n$tmp_com \\n\"); \n $tmp_com = \"if [ -f list.txt ]\\nthen\\n\\tmv list.txt ./Results/list_MS1.txt\\nfi\";\n fwrite($fp, \"$tmp_com \\n\");\n \n $tmp_com = $command . \" SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n if(_is_file(\"iRefIndex.dat\")){\n $tmp_com .= \" iRefIndex.dat\";\n }\n fwrite($fp, \"echo \\\"$tmp_com\\\"\\n$tmp_com \\n\"); \n $tmp_com = \"if [ -f list.txt ]\\nthen\\n\\tmv list.txt ./Results/list_MS2.txt\\nfi\";\n fwrite($fp, \"$tmp_com \\n\"); \n \n \n fwrite($fp, \"echo \\\"#4-2. run SAINT\\\"\\n\");\n $command_reform_MS1 = escapeshellarg(SAINT_SERVER_PATH.\"/saint-reformat\"). \" SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n $command_reform_MS2 = escapeshellarg(SAINT_SERVER_PATH.\"/saint-reformat\"). \" SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n $other_options;\n if($saint_para_hash['nControl']){\n $command_reform_MS1 .= \" \" . $saint_para_hash['nControl'];\n $command_reform_MS2 .= \" \" . $saint_para_hash['nControl'];\n $command = escapeshellarg(SAINT_SERVER_PATH. \"/saint-int-ctrl\");\n $other_options = \" \". $saint_para_hash['lowMode']. \" \". $saint_para_hash['minFold'].\" \". $saint_para_hash['normalize'];\n }else{\n ###############?????????????????????????????\n $command = escapeshellarg(SAINT_SERVER_PATH. \"/saint-spc-noctrl\"); \n ###############????????????????????????????\n $other_options = \" \".$saint_para_hash['fthres'].\" \". $saint_para_hash['fgroup'].\" \". $saint_para_hash['var'].\" \". $saint_para_hash['normalize'];\n }\n \n fwrite($fp, \"echo \\\"$command_reform_MS1\\\" \\n$command_reform_MS1\\n\");\n $command = \"GSL_RNG_SEED=123 \". $command . \" interaction.new prey.new bait.new \". $saint_para_hash['nburn'] . \" \". $saint_para_hash['niter'] . $other_options;\n fwrite($fp, \"echo \\\"$command\\\" \\n$command \\n\"); \n $tmp_com = \"if [ -d RESULT ]\\nthen\\n\\techo 'SAINT MS1 result files were created'\\n\\tmv *.new ./RESULT\\n\\tmv RESULT Results/RESULT_MS1\\nelse\\n\\techo 'Error: No SAINT MS1 result files were created'\\n\\trm -f *.new\\nfi\\n\";\n $tmp_com .= \"rm -R LOG MAPPING MCMC\";\n fwrite($fp, \"$tmp_com\\n\");\n fwrite($fp, \"echo \\\"$command_reform_MS2\\\" \\n$command_reform_MS2\\n\");\n fwrite($fp, \"echo \\\"$command\\\" \\n$command \\n\"); \n $tmp_com = \"if [ -d RESULT ]\\nthen\\n\\techo 'SAINT MS2 result files were created'\\n\\tmv *.new ./RESULT\\n\\tmv RESULT Results/RESULT_MS2\\nelse\\n\\techo 'Error: No SAINT MS2 result files were created'\\n\\trm -f *.new\\nfi\";\n fwrite($fp, \"$tmp_com\\n\");\n \n /*\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-reformat SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt 3\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-reformat SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt 3\n #GSL_RNG_SEED=123 /mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-int-ctrl interaction.new prey.new bait.new 2000 5000 0 1 1\n #6 run SATINT Express\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINTexpress_v3.3__2014_Apr_23/bin/SAINTexpress-int -L3 -R2 SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINTexpress_v3.3__2014_Apr_23/bin/SAINTexpress-int -L3 -R2 SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\n */\n }else{\n fwrite($fp, \"#SAINT is requested. But SAINT cannot be run. Please check SAINT setting.\\n\");\n }\n }else{\n fwrite($fp, \"#SAINT is not requested.\\n\");\n }\n $command = \"cp -f task.log ./Results/\";\n fwrite($fp, \"$command \\n\"); \n fclose ($fp);\n \n \n \n \n \n system(\"chmod 775 \". $task_infor['taskComFile']);\n \n}", "abstract function start();" ]
[ "0.617361", "0.58540034", "0.56896424", "0.5686089", "0.5682584", "0.5664828", "0.5574911", "0.55473596", "0.5536141", "0.5534181", "0.55162424", "0.55063725", "0.54707783", "0.5469982", "0.5447325", "0.5436089", "0.54146636", "0.541194", "0.5386737", "0.5385267", "0.5381056", "0.53615665", "0.5324776", "0.5324478", "0.53090155", "0.5307909", "0.5293349", "0.5256212", "0.52534574", "0.52434635", "0.5235689", "0.5233164", "0.52032197", "0.5199555", "0.5194275", "0.517249", "0.51405364", "0.5133577", "0.5132562", "0.5130613", "0.51282334", "0.51126903", "0.5108285", "0.5098425", "0.5092898", "0.5090606", "0.50886124", "0.5082116", "0.50701976", "0.50591385", "0.50565517", "0.50555855", "0.50510037", "0.5049633", "0.5047379", "0.5044732", "0.502759", "0.5022235", "0.5014848", "0.5012901", "0.5005421", "0.49973512", "0.49886444", "0.49810544", "0.49784768", "0.49767193", "0.49752268", "0.49736872", "0.49722204", "0.4972071", "0.49712914", "0.49489513", "0.49481758", "0.49469465", "0.49449515", "0.49383157", "0.49371272", "0.49366766", "0.4933711", "0.4932478", "0.49279213", "0.4925286", "0.49245343", "0.49236622", "0.49173585", "0.49081755", "0.49081755", "0.49044546", "0.49026564", "0.48980203", "0.48948795", "0.48945346", "0.48932686", "0.4891004", "0.48907566", "0.48870137", "0.48845512", "0.48834178", "0.48826155", "0.48777196" ]
0.6471341
0
End task_1_correction Start task_2_correction
private function task_2_correction($task_name) { require_once public_path('task\\') . $task_name; $newValue_of_task = explode('.',$task_name); if(class_exists($newValue_of_task[0])){ if(session()->has('error_class')){ session()->forget('error_class'); } if(method_exists($newValue_of_task[0], 'check_phonenumber')){ if(session()->has('error_function')){ session()->forget('error_function'); } $task = new $newValue_of_task[0]; $wrong = array(); $wrong[0] = "0120287465";//10 $wrong[1] = "012028736166";//12 $wrong[2] = "012012";//6 $wrong[3] = "01302873616";//12 but start with 013 $wrong[4] = "01702873616";//12 but start with 017 $wrong[5] = "012e45mu576";//12 but contain characters $correct = array(); $correct[0] = "01201873616"; $correct[1] = "01102764837"; $correct[2] = "01098237673"; $degree = 0; $notes = array(); $counter = 0; $degree = 0; for($i=0;$i<count($wrong);$i++) { if($task->check_phonenumber($wrong[$i]) == "wrong") { $degree++; } else if($task->check_phonenumber($wrong[$i]) == "correct") { $notes[$counter] = $wrong[$i]; $counter++; } } for($i=0;$i<count($correct);$i++) { if($task->check_phonenumber($correct[$i]) == "correct") { $degree++; } else if($task->check_phonenumber($correct[$i]) == "wrong") { $notes[$counter] = $wrong[$i]; $counter++; } } $arr = array(); $arr[0] = $degree;//degree $arr[1] = count($wrong) + count($correct);//total degree $arr[2] = $notes; return $arr; }else{ $this->checker2 = true; session()->put('error_function','error_function'); unlink(public_path('task\\') . $task_name); } }else{ $this->checker1 = true; session()->put('error_class','error_class'); unlink(public_path('task\\') . $task_name); }//if class is exist or not }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function taskB()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task B\n Performance::finish();\n }", "public function testTask2(){\n\n }", "public function step_2()\n {\n }", "private function task_1_correction($task_name)\n {\n \n require_once public_path('task\\\\') . $task_name;\n $newValue_of_task = explode('.',$task_name);\n \n if(class_exists($newValue_of_task[0])){\n $task = new $newValue_of_task[0];\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n if(method_exists($newValue_of_task[0], 'check_name')){\n\n $wrong = array();\n $wrong[0] = \"\";\n $wrong[1] = \"al\";\n $wrong[2] = \"asdryuimngyuioplkjhgd\";\n $wrong[3] = \"bassem55\";\n $wrong[4] = \"bassem reda\";\n $wrong[5] = \"<script>anything</script>\";\n $correct = array();\n $correct[0] = \"abanoub\";\n $correct[1] = \"ali\";\n $correct[2] = \"bassem\";\n\n $notes = array();\n\n $counter = 0;\n\n $degree = 0;\n\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_name($wrong[$i]) === \"wrong\")\n {\n $degree++;\n }\n else if($task->check_name($wrong[$i]) === \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_name($correct[$i]) === \"correct\")\n {\n $degree++;\n }\n else if($task->check_name($correct[$i]) === \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n\n\n }else{\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n\n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n \n }", "public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}", "function doTaskA(){\n echo \"Step A Done<br>\";\n}", "public function testTask1(){\n\n }", "public function taskA()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task A\n Performance::finish();\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-60*86400;\n $end_time = time();\n $teacher_test_per_list = $task->t_teacher_info->get_teacher_test_per_list($start_time,$end_time);\n foreach($teacher_test_per_list as &$item){\n $per = !empty($item[\"success_lesson\"])?round($item[\"order_number\"]/$item[\"success_lesson\"],2)*100:0;\n\n $task->t_teacher_info->field_update_list($item[\"teacherid\"],[\"test_transfor_per\"=>$per]);\n \n }\n\n //更新一月常规学生数\n $start_time = time()-30*86400;\n $ret= $task->t_teacher_info->tongji_teacher_stu_num_new($start_time,$end_time);\n foreach($ret as $v){\n $task->t_teacher_info->field_update_list($v[\"teacherid\"],[\n \"month_stu_num\" =>$v[\"stu_num\"] \n ]);\n\n }\n\n\n //更新两周试听课数\n $start_time = time()-14*86400;\n $list = $task->t_lesson_info_b2->get_test_lesson_num($start_time,$end_time);\n foreach($list as $val){\n $task->t_teacher_info->field_update_list($val[\"teacherid\"],[\n \"two_week_test_lesson_num\" =>$val[\"num\"] \n ]);\n }\n\n\n //每月1号至5号,更新沉睡老师信息\n $d = date(\"d\",time());\n if($d>=1 && $d <=5){\n $end_time = strtotime(date(\"Y-m-01\",time()));\n $start_time = strtotime(\"-3 month\",$end_time);\n $all_throuth_teacher = $task->t_teacher_info->get_all_train_through_teacher_list($start_time);\n $all_train_through_lesson_teacher= $task->t_teacher_info->get_all_train_through_lesson_teacher_list($start_time,$end_time);\n $no_lesson_tea_list=[];\n $lesson_tea_list=[];\n foreach($all_throuth_teacher as $k=>$v){\n if(!isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==0){\n $no_lesson_tea_list[$k]=$v[\"teacherid\"];\n }elseif(isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==1){\n $lesson_tea_list[$k]=$v[\"teacherid\"];\n }\n }\n\n foreach($no_lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>1 \n ]);\n }\n foreach($lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>0\n ]);\n }\n\n }\n\n \n\n //dd($teacher_test_per_list);\n\n \n }", "function Step2_Workflow()\r\n {\r\n // So the winter workflow tests are separated.\r\n if( ($ok = $this->sedAdmin->oPS->DoTests( 'workflow-winter_' )) ) {\r\n $ok = $this->sedAdmin->oPS->DoTests( 'workflow_' );\r\n }\r\n $s = $this->sedAdmin->oPS->GetOutput(); // output from test 1 plus possibly test 2, because they are appended internally\r\n return( $this->stepperRet( $ok, $s ) );\r\n }", "public function handle()\n {\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = strtotime(date(\"Y-m-01\",time()-86400));\n $end_time = strtotime(date(\"Y-m-01\",$start_time+40*86400));\n $ret_info =[];\n for($i=1;$i<11;$i++){\n $ret_info[$i]=[\"subject\"=>$i];\n }\n $interview_info=$task->t_teacher_lecture_info->get_interview_info_by_subject($start_time,$end_time);\n $order_info = $task->t_teacher_lecture_info->get_research_teacher_test_lesson_info_subject($start_time,$end_time);\n // $order_info = $task->t_teacher_lecture_info->get_interview_lesson_order_info_subject($start_time,$end_time);\n $first_info = $task->t_lesson_info->get_interview_teacher_first_lesson_info_subject($start_time,$end_time);\n $tea_list = $task->t_lesson_info->get_all_first_lesson_teacher_list($start_time,$end_time);\n $record_list = $task->t_teacher_record_list->get_teacher_record_num_list_subject($start_time,$end_time);\n $tea_arr=[];$record_info = [];\n foreach($tea_list as $k=>$val){\n if($val[\"add_time\"]>0){\n $tea_arr[] = $k;\n @$record_info[$val[\"subject\"]][\"num\"]++;\n @$record_info[$val[\"subject\"]][\"record_time\"] +=$val[\"add_time\"] - $val[\"lesson_start\"];\n }\n }\n $lesson_info = $task->t_lesson_info->get_teacher_arr_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $first_lesson_info = $task->t_lesson_info->get_teacher_arr_first_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $other_record_info = $task->t_seller_and_ass_record_list->get_seller_and_ass_record_by_subject($start_time,$end_time);\n $test_person_num= $task->t_lesson_info->get_test_person_num_list_by_subject( $start_time,$end_time);\n $test_person_num_other= $task->t_lesson_info->get_test_person_num_list_subject_other( $start_time,$end_time);\n $kk_test_person_num= $task->t_lesson_info->get_kk_teacher_test_person_subject_list( $start_time,$end_time);\n $change_test_person_num= $task->t_lesson_info->get_change_teacher_test_person_subject_list( $start_time,$end_time);\n\n\n\n $arr=[\"subject_str\"=>\"平均\",\"subject\"=>20];\n $zh = [\"subject_str\"=>\"综合学科\",\"subject\"=>21];\n $wz = [\"subject_str\"=>\"文科\",\"subject\"=>22];\n $xxk = [\"subject_str\"=>\"小学科\",\"subject\"=>23];\n $slh=[];\n foreach($ret_info as $k=>&$item){\n $item[\"interview_num\"] = @$interview_info[$k][\"interview_num\"];\n @$arr[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n $item[\"interview_time\"] = @$interview_info[$k][\"interview_time\"];\n @$arr[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n $item[\"interview_lesson\"] = @$order_info[$k][\"person_num\"];\n @$arr[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n $item[\"interview_order\"] = @$order_info[$k][\"order_num\"];\n @$arr[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n $item[\"record_time\"] = @$record_info[$k][\"record_time\"];\n @$arr[\"record_time\"] += @$record_info[$k][\"record_time\"];\n $item[\"record_num\"] = @$record_info[$k][\"num\"];\n @$arr[\"record_num\"] += @$record_info[$k][\"num\"];\n $item[\"first_lesson\"] = @$first_info[$k][\"person_num\"];\n @$arr[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n $item[\"first_order\"] = @$first_info[$k][\"order_num\"];\n @$arr[\"first_order\"] += @$first_info[$k][\"order_num\"];\n $item[\"next_lesson\"] = @$lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n $item[\"next_order\"] = @$lesson_info[$k][\"order_num\"];\n @$arr[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n $item[\"next_lesson_first\"] = @$first_lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n $item[\"next_order_first\"] = @$first_lesson_info[$k][\"order_num\"];\n @$arr[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n $item[\"other_record_time\"] = @$other_record_info[$k][\"deal_time\"];\n @$arr[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n $item[\"other_record_num\"] = @$other_record_info[$k][\"num\"];\n @$arr[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n $item[\"lesson_num\"] = @$test_person_num[$k][\"lesson_num\"];\n $item[\"person_num\"] = @$test_person_num[$k][\"person_num\"];\n $item[\"have_order\"] = @$test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_other\"] = @$test_person_num_other[$k][\"lesson_num\"];\n $item[\"have_order_other\"] = @$test_person_num_other[$k][\"have_order\"];\n $item[\"lesson_num_kk\"] = @$kk_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_kk\"] = @$kk_test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_change\"] = @$change_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_change\"] = @$change_test_person_num[$k][\"have_order\"];\n $item[\"record_num_all\"] = @$record_list[$k][\"num\"];\n @$arr[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n if($k==1 || $k==3){\n @$wz[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$wz[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$wz[\"interview_time\"] += $item[\"interview_time\"];\n @$wz[\"interview_num\"] += $item[\"interview_num\"];\n @$wz[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$wz[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$wz[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$wz[\"record_num\"] += @$record_info[$k][\"num\"];\n @$wz[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$wz[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$wz[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$wz[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$wz[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$wz[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$wz[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$wz[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$wz[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$wz[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$wz[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$wz[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$wz[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$wz[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n }else if($k>3){\n @$zh[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$zh[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$zh[\"interview_time\"] += $item[\"interview_time\"];\n @$zh[\"interview_num\"] += $item[\"interview_num\"];\n @$zh[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$zh[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$zh[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$zh[\"record_num\"] += @$record_info[$k][\"num\"];\n @$zh[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$zh[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$zh[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$zh[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$zh[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$zh[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$zh[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$zh[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$zh[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$zh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$zh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$zh[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$zh[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$zh[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k >5){\n @$xxk[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$xxk[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$xxk[\"interview_time\"] += $item[\"interview_time\"];\n @$xxk[\"interview_num\"] += $item[\"interview_num\"];\n @$xxk[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$xxk[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$xxk[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$xxk[\"record_num\"] += @$record_info[$k][\"num\"];\n @$xxk[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$xxk[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$xxk[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$xxk[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$xxk[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$xxk[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$xxk[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$xxk[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$xxk[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$xxk[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$xxk[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$xxk[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k<4){\n @$slh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$slh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n }\n $item[\"subject_str\"] = E\\Esubject::get_desc($item[\"subject\"]);\n }\n $slh_per = !empty($slh[\"person_num\"])?round(@$slh[\"have_order\"]/$slh[\"person_num\"],4)*100:0;\n\n $test_person_num_all= $task->t_lesson_info->get_test_person_num_list_by_subject_grade( $start_time,$end_time);\n $test_person_num_other_all= $task->t_lesson_info->get_test_person_num_list_subject_grade_other( $start_time,$end_time);\n $kk_test_person_num_all= $task->t_lesson_info->get_kk_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $change_test_person_num_all= $task->t_lesson_info->get_change_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $arr[\"lesson_num\"] = $test_person_num_all[\"lesson_num\"];\n $arr[\"have_order\"] = @$test_person_num_all[\"have_order\"];\n $arr[\"lesson_per\"] = !empty($test_person_num_all[\"person_num\"])?round(@$test_person_num_all[\"have_order\"]/$test_person_num_all[\"person_num\"],4)*100:0;\n $arr[\"lesson_per_other\"] = !empty($test_person_num_other_all[\"lesson_num\"])?round($test_person_num_other_all[\"have_order\"]/$test_person_num_other_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_kk\"] = !empty($kk_test_person_num_all[\"lesson_num\"])?round($kk_test_person_num_all[\"have_order\"]/$kk_test_person_num_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_change\"] = !empty($change_test_person_num_all[\"lesson_num\"])?round($change_test_person_num_all[\"have_order\"]/$change_test_person_num_all[\"lesson_num\"],4)*100:0;\n\n array_unshift($ret_info,$xxk);\n array_unshift($ret_info,$zh);\n array_unshift($ret_info,$wz);\n array_unshift($ret_info,$arr);\n foreach($ret_info as &$vvv){\n $vvv[\"interview_time_avg\"] = !empty($vvv[\"interview_num\"])?round($vvv[\"interview_time\"]/$vvv[\"interview_num\"]/86400,2):0;\n $vvv[\"record_time_avg\"] = !empty($vvv[\"record_num\"])?round($vvv[\"record_time\"]/$vvv[\"record_num\"]/3600,2):0;\n $vvv[\"other_record_time_avg\"] = !empty($vvv[\"other_record_num\"])?round($vvv[\"other_record_time\"]/$vvv[\"other_record_num\"]/3600,2):0;\n $vvv[\"interview_per\"] = !empty($vvv[\"interview_lesson\"])?round(@$vvv[\"interview_order\"]/$vvv[\"interview_lesson\"],4)*100:0;\n $vvv[\"first_per\"] = !empty($vvv[\"first_lesson\"])?round(@$vvv[\"first_order\"]/$vvv[\"first_lesson\"],4)*100:0;\n $vvv[\"next_per\"] = !empty($vvv[\"next_lesson\"])?round(@$vvv[\"next_order\"]/$vvv[\"next_lesson\"],4)*100:0;\n $vvv[\"first_next_per\"] = !empty($vvv[\"next_lesson_first\"])?round(@$vvv[\"next_order_first\"]/$vvv[\"next_lesson_first\"],4)*100:0;\n $vvv[\"add_per\"] = round($vvv[\"next_per\"]-$vvv[\"first_next_per\"],2);\n if($vvv[\"subject_str\"] !=\"平均\"){ \n $vvv[\"lesson_per\"] = !empty($vvv[\"person_num\"])?round(@$vvv[\"have_order\"]/$vvv[\"person_num\"],4)*100:0;\n $vvv[\"lesson_per_other\"] = !empty($vvv[\"lesson_num_other\"])?round(@$vvv[\"have_order_other\"]/$vvv[\"lesson_num_other\"],4)*100:0;\n $vvv[\"lesson_per_kk\"] = !empty($vvv[\"lesson_num_kk\"])?round(@$vvv[\"have_order_kk\"]/$vvv[\"lesson_num_kk\"],4)*100:0;\n $vvv[\"lesson_per_change\"] = !empty($vvv[\"lesson_num_change\"])?round(@$vvv[\"have_order_change\"]/$vvv[\"lesson_num_change\"],4)*100:0;\n\n }else{\n $vvv[\"record_num_all\"] = $vvv[\"record_num_all\"]/3;\n }\n\n $vvv[\"lesson_num_per\"] = !empty($arr[\"lesson_num\"])?round(@$vvv[\"lesson_num\"]/$arr[\"lesson_num\"],4)*100:0;\n foreach($vvv as &$vvvv){\n if(empty($vvvv)){\n $vvvv=0;\n }\n } \n\n }\n\n $data=[];\n foreach($ret_info as $kk=>$gg){\n $data[$gg[\"subject\"]] = $gg;\n if($gg[\"subject\"]==2){\n $data[24] = $gg; \n }\n } \n\n $avg = [];\n $interview_time_standard=3;\n $record_time_standard=4;\n $other_record_time_standard=1;\n $add_per_standard=3;\n $research_num= $task->t_manager_info->get_adminid_num_by_account_role(4);\n $res= $ret_info; \n $person_arr = $list_arr=[];\n foreach($res as $kk=>&$vv){\n if(in_array($vv[\"subject\"],[4,5,6,7,8,9,10,21,23])){\n $interview_per_standard = 23;\n $first_per_standard = 20;\n $lesson_per_standard = 22;\n $lesson_per_other_standard = 75;\n $lesson_per_kk_standard = 75;\n $lesson_per_change_standard = 75;\n }else{\n $interview_per_standard = 18;\n $first_per_standard = 15;\n $lesson_per_standard = 17;\n $lesson_per_other_standard = 70;\n $lesson_per_kk_standard = 70;\n $lesson_per_change_standard = 70;\n }\n $vv[\"interview_per_range\"] = $vv[\"interview_per\"]- $interview_per_standard;\n $vv[\"first_per_range\"] = $vv[\"first_per\"]- $first_per_standard;\n $vv[\"lesson_per_range\"] = $vv[\"lesson_per\"]- $lesson_per_standard;\n $vv[\"lesson_per_other_range\"] = $vv[\"lesson_per_other\"]- $lesson_per_other_standard;\n $vv[\"lesson_per_kk_range\"] = $vv[\"lesson_per_kk\"]- $lesson_per_kk_standard;\n $vv[\"lesson_per_change_range\"] = $vv[\"lesson_per_change\"]- $lesson_per_change_standard;\n if(in_array($vv[\"subject\"],[1,2,3,4,5,23])){\n $person_arr[$kk] = $vv;\n }\n if(in_array($vv[\"subject\"],[2,21,22])){\n $list_arr[$kk]= $vv;\n }\n }\n\n foreach($res as $k=>$v){\n if($v[\"subject_str\"]==\"平均\"){\n $avg = $res[$k];\n unset($res[$k]);\n }\n }\n $record_num_standard = round($avg[\"lesson_num\"]/$research_num,1);\n $interview_time_person = $person_arr;\n foreach($interview_time_person as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_person[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_person,\"interview_time_avg\", 1);\n $interview_time_first_person = @$interview_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"interview_per_range\", 0);\n $interview_per_first_person = @$person_arr[0][\"subject\"];\n $record_time_person = $person_arr;\n foreach( $record_time_person as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_person,\"record_time_avg\", 1);\n $record_time_first_person = @$record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"record_num_all\", 0);\n $record_num_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"first_per_range\", 0);\n $first_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"add_per\", 0);\n $add_per_first_person = @$person_arr[0][\"subject\"];\n $other_record_time_person =$person_arr;\n foreach( $other_record_time_person as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_person,\"other_record_time_avg\", 1);\n $other_record_time_first_person = @$other_record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_range\", 0);\n $lesson_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_person = @$person_arr[0][\"subject\"];\n\n foreach($person_arr as $u){\n $person= $u[\"subject\"];\n if($person==$interview_time_first_person){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$person][\"interview_time_score\"] = 5;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$person][\"interview_time_score\"] = 3;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n\n }\n if($person==$interview_per_first_person){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$person][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"] = 5;\n }\n\n }\n if($person==$record_time_first_person){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$person][\"record_time_score\"] = 5;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$person][\"record_time_score\"] = 3;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n\n }\n\n if($person==$record_num_first_person){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$person][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"] = 1;\n }\n\n }\n\n if($person==$first_per_first_person){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$person][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"] = 1;\n }\n\n }\n if($person==$add_per_first_person){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$person][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"] = 1;\n }\n\n }\n\n if($person==$other_record_time_first_person){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$person][\"other_record_time_score\"] = 5;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$person][\"other_record_time_score\"] = 3;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n\n }\n if($person==$lesson_per_first_person){\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"] && $u[\"lesson_per_range\"]>=0){\n $data[$person][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"]=5;\n }\n }else{\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"] = 5;\n }\n\n }\n if($person==$lesson_per_other_first_person){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$person][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_kk_first_person){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$person][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_change_first_person){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$person][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$person][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$person][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$person][\"lesson_num_per_score\"]=1;\n }else{\n $data[$person][\"lesson_num_per_score\"]=0;\n }\n\n\n $data[$person][\"subject_str\"] = $u[\"subject_str\"];\n\n }\n\n $interview_time_list = $list_arr;\n foreach($interview_time_list as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_list[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_list,\"interview_time_avg\", 1);\n $interview_time_first_list = @$interview_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"interview_per_range\", 0);\n $interview_per_first_list = @$list_arr[0][\"subject\"];\n $record_time_list = $list_arr;\n foreach( $record_time_list as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_list,\"record_time_avg\", 1);\n $record_time_first_list = @$record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"record_num_all\", 0);\n $record_num_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"first_per_range\", 0);\n $first_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"add_per\", 0);\n $add_per_first_list = @$list_arr[0][\"subject\"];\n $other_record_time_list =$list_arr;\n foreach( $other_record_time_list as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_list,\"other_record_time_avg\", 1);\n $other_record_time_first_list = @$other_record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_range\", 0);\n $lesson_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_list = @$list_arr[0][\"subject\"];\n\n foreach($list_arr as $u){\n $list= $u[\"subject\"];\n if($list==2){\n $list=24;\n }\n if($list==$interview_time_first_list){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$list][\"interview_time_score\"] = 5;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$list][\"interview_time_score\"] = 3;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n\n }\n if($list==$interview_per_first_list){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$list][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"] = 5;\n }\n\n }\n if($list==$record_time_first_list){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$list][\"record_time_score\"] = 5;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$list][\"record_time_score\"] = 3;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n\n }\n\n if($list==$record_num_first_list){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$list][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"] = 1;\n }\n\n }\n\n if($list==$first_per_first_list){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$list][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"] = 1;\n }\n\n }\n if($list==$add_per_first_list){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$list][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"] = 1;\n }\n\n }\n\n if($list==$other_record_time_first_list){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$list][\"other_record_time_score\"] = 5;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$list][\"other_record_time_score\"] = 3;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n\n }\n if($list==$lesson_per_first_list){\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5) && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n }else{\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n\n }\n if($list==$lesson_per_other_first_list){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$list][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_kk_first_list){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$list][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >= $avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_change_first_list){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$list][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$list][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$list][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$list][\"lesson_num_per_score\"]=1;\n }else{\n $data[$list][\"lesson_num_per_score\"]=0;\n }\n\n\n\n }\n \n foreach($data as $o=>&$q){\n if(isset($q[\"interview_time_score\"])){ \n $q[\"total_score\"] = $q[\"interview_time_score\"]+$q[\"interview_per_score\"]+$q[\"record_time_score\"]+$q[\"record_num_score\"]+$q[\"first_per_score\"]+$q[\"add_per_score\"]+$q[\"other_record_time_score\"]+$q[\"lesson_per_score\"]+$q[\"lesson_per_other_score\"]+$q[\"lesson_per_kk_score\"]+$q[\"lesson_per_change_score\"]+$q[\"lesson_num_per_score\"];\n }\n $kid= $o;\n $check = $task->t_research_teacher_kpi_info->get_type_flag($kid,$start_time);\n if($check>0){\n $task->t_research_teacher_kpi_info->field_update_list_2($kid,$start_time,[\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"],\n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }else{\n $task->t_research_teacher_kpi_info->row_insert([\n \"kid\" =>$kid,\n \"month\" =>$start_time,\n \"type_flag\" =>2,\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"], \n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }\n\n }\n \n \n\n \n\n \n }", "public function testUpdateTask()\n {\n }", "private function task_3_correction($task_name)\n{\nrequire_once public_path('task\\\\') . $task_name;\n$newValue_of_task = explode('.',$task_name);\n\n if(class_exists($newValue_of_task[0])){\n $task = new $newValue_of_task[0];\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n if(method_exists($newValue_of_task[0], 'check_email')){\n if(session()->has('error_function')){\n session()->forget('error_function');\n }\n $wrong = array();\n $wrong[0] = \"\";//empty\n $wrong[1] = \"bassem [email protected]\";//space\n $wrong[2] = \"[email protected]\";//not gmail or yahoo\n $wrong[3] = \"bassem#gmail.com\";//# not @\n $wrong[4] = \"[email protected]@gmail.com\";//@gmail.com written two times\n $wrong[5] = \"bassem@gmailcom\";\n $correct = array();\n $correct[0] = \"[email protected]\";\n $correct[1] = \"[email protected]\";\n $correct[2] = \"[email protected]\";\n $notes = array();\n $counter = 0;\n $degree = 0;\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_email($wrong[$i]) == \"wrong\")\n {\n $degree++;\n }\n else if($task->check_email($wrong[$i]) == \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_email($correct[$i]) == \"correct\")\n {\n $degree++;\n }\n else if($task->check_email($correct[$i]) == \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n }else{\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n}", "function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }", "public function step_1()\n {\n }", "private function upgradeMismatchedTaskCount(): void\n {\n $new_options = [];\n $old_options = Option::getOptions();\n $legacy_tasks = $this->getLegacyOptions();\n foreach ($old_options as $option_key => $task) {\n $models = \\array_map(static function (UpgradeModel $model): string {\n return Option::getOptionKey($model);\n }, $this->models);\n if (!$models) {\n continue;\n }\n $key = \\array_search($option_key, $models, true);\n if ($key === false) {\n $legacy_tasks[$option_key] = $task;\n unset($old_options[$option_key]);\n continue;\n }\n $new_options[$option_key] = $task;\n }\n Option::updateOption($new_options);\n \\update_option(self::OPTION_NAME, $legacy_tasks, false);\n unset($new_options, $old_options, $legacy_tasks); // Memory cleanup\n \\wp_safe_redirect(\\remove_query_arg(self::NONCE_NAME));\n exit;\n }", "public function run()\n {\n $task_id = \\App\\Task::where('name','=','Pay the Electricity Bill')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.uswitch.com/gas-electricity/guides/assets/images/gas-electricity/guides/energy-guides/electricity-comparison.jpg',\n 'comment' =>'On May 20th I need to pay the electricity bill. I will pay it online\n to avoid problems',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Go to the Dentist')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.cfah.org/images/features/V5I3DentalCare.jpg',\n 'comment' =>'On May 29th I have an appointment with th dentist. I will get several\n cavities removed',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Finish P4')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'I have to finish Project 4 by May 4th. I will be a joy to complete it',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Buy mom a present')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'Moms birthday is coming up. I have to make sure I buy her\n a very nice present. Pereferable some jewelry',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Book a Flight for Cancun')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'https://aquaworld.com.mx/en/wp-content/uploads/sites/2/2015/09/healthy-trip-to-cancun.jpg',\n 'comment' =>'Due to our two year anniversary, I have to book a flight to Cancun\n for my girlfriend and I.',\n 'task_id' => $task_id,\n\n ]);\n }", "public function updateTasksForMismatchedNoJob()\n\t{\n\t\tif ($this->hasTaskCategory(Task::NOT_REPLIED)) return;\n\t\t$this->deleteMismatchedHasJobTasks();\n\t\t$this->createMismatchedNoJobTask();\n\t}", "public function pass_2()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_IF','T_FOR','T_FOREACH','T_ELSE','T_ELSEIF','T_WHILE','T_SWITCH');\n\t\t$tokens_of_interest_1 = array('T_ENDIF','T_ENDWHILE','T_ENDFOR','T_ENDSWITCH');\n\t\twhile($tp < $token_count) {\n\t\t\tif(in_array($token_name = $this->token_name($tokens[$tp]), $tokens_of_interest )){\n\t\t\t\tif($token_name == 'T_DO') {\n\n\t\t\t\t} else {\n\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\t\t\tif($this->token_name($tokens[$temp]) == '(') {\n\t\t\t\t\t\t\t$temp = $this->get_pair($tokens,$temp);\n\t\t\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$temp+1);\n\t\t\t\t\t\t} \t\n\t\t\t\t\t\tif($this->token_name($tokens[$temp]) == ':') {\n\t\t\t\t\t\t\t$this->add_tokens_to_be_replaced($temp,'{');\n\t\t\t\t\t\t\tif($token_name == 'T_ELSEIF' || $token_name == 'T_ELSE') {\n\t\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($tp,'}');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif(in_array($token_name,$tokens_of_interest_1)) {\n\t\t\t\t$this->add_tokens_to_be_replaced($tp,'}');\n\t\t\t\t$this->add_tokens_to_be_replaced($this->get_next_non_comment($tokens,$tp+1),' ');\n\t\t\t} elseif($token_name == 'T_CASE' || $token_name == 'T_DEFAULT') {\n\t\t\t\t//jump over the ternary operators to get the last colon\n\t\t\t\tif($this->search_token($tokens,$tp,'?',array(';'))) {\n\t\t\t\twhile($tmp = $this->search_token($tokens,$tp,'?',array(';'))) $tp = $tmp+1;\n\t\t\t\tif($tmp = $this->search_token($tokens,$tp,':',array(';'))) $tp = $tmp+1;\n\t\t\t\t}\n\t\t\t\tif($temp = $this->search_token($tokens,$tp,':',array(';'))) {\n\t\t\t\t\t$this->add_tokens_to_be_replaced($temp ,';');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tp++;\n\t\t}\n\t\t\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t}", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "public static function handle_tasks()\n {\n\t $granularity = (int)get_site_preference('pseudocron_granularity',60);\n\t $last_check = get_site_preference('pseudocron_lastrun',0);\n\t if( (time() - $granularity * 60) >= $last_check )\n\t\t {\n\t\t\t // 1. Get Task objects.\n\t\t\t self::get_tasks();\n\t\n\t\t\t // 2. Evaluate Tasks\n\t\t\t self::execute();\n\t\n\t\t\t // 3. Cleanup to minimize memory usage\n\t\t\t self::cleanup();\n\n\t\t\t // 4. Say we've done a check\n\t\t\t set_site_preference('pseudocron_lastrun',time());\n\t\t }\n }", "function turnitintooltwo_cron() {\n global $DB, $CFG, $tiitaskcall;\n\n // 2.7 onwards we would like to be called from task calls.\n if ( $CFG->version > 2014051200 && !$tiitaskcall ) {\n mtrace(get_string('crontaskmodeactive', 'turnitintooltwo'));\n return;\n }\n\n // Reset task call flag.\n if ($tiitaskcall) {\n $tiitaskcall = false;\n }\n\n // Update gradebook when a part has been deleted.\n // Get assignment that needs updating and check whether it exists.\n if ($assignment = $DB->get_record('turnitintooltwo', array(\"needs_updating\" => 1), '*', IGNORE_MULTIPLE)) {\n\n // Update the gradebook.\n $task = \"needsupdating\";\n turnitintooltwo_cron_update_gradbook($assignment, $task);\n }\n\n // Send grades to the gradebook for anonymous marking assignments when the post date has passed.\n // Get a list of assignments that need updating.\n if ($assignmentlist = $DB->get_records_sql(\"SELECT DISTINCT(t.id) FROM {turnitintooltwo} t\n LEFT JOIN {turnitintooltwo_parts} p ON (p.turnitintooltwoid = t.id)\n WHERE (p.turnitintooltwoid + p.dtpost IN\n (SELECT p2.turnitintooltwoid + MAX(p2.dtpost)\n FROM {turnitintooltwo_parts} p2\n GROUP BY p2.turnitintooltwoid))\n AND t.anon = 1 AND t.anongradebook = 0 AND p.dtpost < \".time())) {\n\n // Update each assignment.\n $task = \"anongradebook\";\n foreach ($assignmentlist as $assignment) {\n turnitintooltwo_cron_update_gradbook($assignment, $task);\n }\n }\n\n // Refresh the submissions for migrated assignment parts if there are none stored locally\n // as the 1st time this is done can be quite a long job if there are a lot of submissions.\n $migratedemptyparts = $DB->get_records_select('turnitintooltwo_parts', \" migrated = 1 AND \".\n \" (SELECT COUNT(id) FROM {turnitintooltwo_submissions} \".\n \" WHERE submission_part = {turnitintooltwo_parts}.id) = 0 \");\n\n if (count($migratedemptyparts) > 0) {\n $updatedassignments = array();\n foreach ($migratedemptyparts as $part) {\n if (!array_search($part->id, $updatedassignments)) {\n $cm = get_coursemodule_from_instance(\"turnitintooltwo\", $part->turnitintooltwoid);\n $turnitintooltwoassignment = new turnitintooltwo_assignment($part->turnitintooltwoid);\n $turnitintooltwoassignment->get_submission_ids_from_tii($part);\n $turnitintooltwoassignment->refresh_submissions($cm, $part);\n $updatedassignments[] = $part->id;\n\n turnitintooltwo_activitylog('Turnitintool submissions downloaded for assignment '.$part->id, 'REQUEST');\n }\n }\n echo 'Turnitintool submissions downloaded for assignments: '.implode(',', $updatedassignments).' ';\n }\n\n // Perform gradebook migrations for submissions that were not actioned during the migration tool.\n turnitintooltwo_cron_migrate_gradebook();\n}", "public function test_all() {\n $obj = new My_task;\n \n echo \"Start test_reverse() <br>\";\n $obj->test_reverse();\n echo \"<br><br>\";\n \n echo \"Start test_is_palindrome() <br>\";\n $obj->test_is_palindrome();\n echo \"<br><br>\";\n \n echo \"Start test_encryption() <br>\";\n $obj->test_encryption(); \n echo \"<br><br>\";\n }", "public function testUpdateTaskInstanceVariable()\n {\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $date_week = \\App\\Helper\\Utils::get_week_range(time(),1);\n $lstart = $date_week[\"sdate\"];\n $lend = $date_week[\"edate\"];\n $lstart_next = $date_week[\"sdate\"]+7*86400;\n $lend_next = $date_week[\"edate\"]+7*86400;\n\n $teacher_arr = $task->t_teacher_info->get_limit_lesson_num_change_list();\n // dd($teacher_arr);\n foreach($teacher_arr as $item){\n $teacherid = $item[\"teacherid\"];\n $week_num= $item[\"limit_week_lesson_num\"];\n $test_lesson_num = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart,$lend);\n $test_lesson_num_next = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart_next,$lend_next);\n //dd($test_lesson_num_next);\n if($test_lesson_num >= $week_num && $test_lesson_num_next >= $week_num){\n $task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优面试组\",\"周试听课排课数量满额通知\",\"Erick老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n $task->t_manager_info->send_wx_todo_msg_by_adminid (448,\"理优面试组\",\"周试听课排课数量满额通知\",\"rolon老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n\n \n }\n }\n \n \n \n\n }", "public function run()\n {\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Ask for Help',\n 'description' => 'Ask someone to teach you a skill.',\n 'task_points' => 200,\n 'skill_level' => 1,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by WiFi',\n 'description' => 'Send a data file using a WiFi connection.',\n 'task_points' => 450,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Run',\n 'description' => 'Start a run.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect 2 Sensors',\n 'description' => 'Plug in 2 sensors. Confirm valid response from each one.',\n 'task_points' => 400,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect sensor',\n 'description' => 'Plug in 1 sensor. Confirm a valid response.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Free Teach',\n 'description' => 'Teach your partner a new skill. It does not need to be a wheel task.',\n 'task_points' => 800,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Rate',\n 'description' => 'Set experimental rate for run.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Autoscale',\n 'description' => 'Use autoscale function to adjust the y-axis during a run.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Read Lab Instruction',\n 'description' => 'Access a saved copy of any Vernier Labquest experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Select Region',\n 'description' => 'Select a region of data from a saved run.',\n 'task_points' => 500,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Graph',\n 'description' => 'View a Labquest graph.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Duration',\n 'description' => 'Set the time duration for experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by USB',\n 'description' => 'Export an experimental data file using USB cable to a commputer.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Label Run',\n 'description' => 'Add a descriptive name to a data run.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Strike Data',\n 'description' => 'Strike data from a saved run.',\n 'task_points' => 750,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => '3 in a Row',\n 'description' => 'Demonstrate a sequence of 3 different skills.',\n 'task_points' => 900,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Reboot',\n 'description' => 'Reboot the Labquest unit',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Linear Fit',\n 'description' => 'Perform a linear fit on a graph.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Create Local Network',\n 'description' => 'Setup a local Wifi network from Labquest unit, give it a name and confirm from another WiFi enabled device.',\n 'task_points' => 600,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect WiFi',\n 'description' => 'Connect Labquest unit to a WiFi network.',\n 'task_points' => 400,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Table',\n 'description' => 'View data in table view.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Overlay Runs',\n 'description' => 'Overlay 2 separate runs on one graph.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Save File',\n 'description' => 'Save file, must give it a descriptive name.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Download to LoggerPro',\n 'description' => 'Download data file to Labquest LoggerPro software on a computer.',\n 'task_points' => 400,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n }", "public function taskComplete(){\n $taskId = $_POST[\"taskId\"];\n\n $this->individualGroupModel->changeTaskCompletion($taskId, true);\n\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function endFunctionFirst() {\n\t\t/*$this->getAllStudents();\n\t\t$this->archive_budgetinfo_details();\n\t\t$this->archive_student_balance();\n\t\t$this->archive_grade_details();\n\t\t$this->archive_transcript_grades();\n\t\t$this->insert_rank(); //to fix\n\t\t/*$query1 = $this->conn->query(\"UPDATE system_settings SET edit_class ='No', student_transfer ='No' where sy_status ='Current'\") or die(\"failed1\");\n\t\t$query2 = $this->conn->query(\"UPDATE faculty SET enroll_privilege ='No'\") or die(\"failed4\");\n\t\t$query3 = $this->conn->query(\"UPDATE budget_info SET acc_amount = '0'\");\n\t\t$query4 = $this->conn->query(\"DELETE FROM announcements where holiday ='No'\");\n\t\t$query5 = $this->conn->query(\"DELETE from promote_list where prom_sy = (SELECT YEAR(sy_start) from system_settings where sy_status = 'Ended' ORDER BY 1 desc LIMIT 1)\");*/\n\t\t/*$this->promote_students();*/\n\t\t/*$query7 = $this->conn->query(\"DELETE FROM grades\");\n\t\tif($query1){\n\t\t\t$this->Message('Success!', 'The school year has been ended!', 'success', 'treasurer-end-trial');\n\t\t} else{\n\t\t\t$this->Message('Error!', 'Cannot end school year', 'error', 'treasurer-end-trial');\n\t\t}*/\n\t\t\n\t}", "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 }", "private function _step():void\n\t{\n\t\t$task= array_shift( $this->_queue );\n\t\t\n\t\t$this->_runTask( $task );\n\t}", "public function testCompletesWithCorrectResultWhenOneSubTaskCompletes() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n $task = new \\Async\\Task\\AnyTask($tasks);\n \n $this->assertFalse($task->isComplete());\n \n // Fail a task and check that the task has not completed\n $tasks[0]->setException(new \\Exception(\"failure\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertFalse($task->isComplete());\n \n // Complete a task and check that the task completes successfully with\n // the correct result\n $tasks[1]->setResult(10);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals(10, $task->getResult());\n }", "public function testCreateTask()\n {\n }", "public function onRsformFrontendSwitchTasks(): void\n\t{\n\t\t$plugin_task = $this->app->input->get('plugin_task');\n\n\t\tswitch ($plugin_task)\n\t\t{\n\t\t\tcase 'jdideal.notify':\n\t\t\t\t$this->rsfp_f_jdidealNotify();\n\t\t\t\tbreak;\n\t\t\tcase 'jdideal.return':\n\t\t\t\t$formId = $this->app->input->getInt('formId');\n\t\t\t\t$this->jdidealReturn($formId);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function updateTasksForNotReplied()\n\t{\n\t\t$this->deleteMismatchedNoJobTasks();\n\t\t$this->deleteMismatchedHasJobTasks();\n\t\t$this->createNotRepliedTask();\n\t}", "public function testContinueContinues()\n {\n $tierApp = new TierApp(new Injector(), new NullCallback());\n \n $fn1 = function () {\n return false;\n };\n \n $called = false;\n \n $fn2 = function () use (&$called) {\n $called = true;\n return TierApp::PROCESS_END;\n };\n \n $tierApp->addExecutable(0, $fn1);\n $tierApp->addExecutable(1, $fn2);\n $tierApp->executeInternal();\n \n $this->assertTrue($called);\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-7*86400;\n $end_time = time();\n $start = date(\"Y-m-d H:i:s\",$start_time);\n $end = date(\"Y-m-d H:i:s\",$end_time);\n $res = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time);\n $video_succ = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time,1);\n $one = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,-1);\n $one_succ = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,1); \n $all=0;$suc=0;$all_time=0;$video_num=0; \n foreach($res as $k=>&$v){\n $all +=$v[\"all_count\"];\n $all_time +=$v[\"time_count\"];\n $video_num +=$v[\"all_count\"];\n $v[\"video_num\"] = $v[\"all_count\"];\n }\n foreach($video_succ as $item){\n $suc += $item[\"all_count\"];\n }\n foreach($one as $k=>&$vv){\n $all +=$vv[\"all_count\"];\n if(isset($res[$k])){\n $res[$k][\"all_count\"] += $vv[\"all_count\"];\n }else{\n $vv[\"video_num\"]=0;\n $vv[\"time_count\"]=0;\n $res[$k] = $vv;\n }\n }\n foreach($one_succ as $k=>&$vvv){\n $suc +=$vvv[\"all_count\"];\n if(isset($video_succ[$k])){\n $video_succ[$k][\"all_count\"] += $vvv[\"all_count\"];\n }else{\n $video_succ[$k] = $vvv;\n }\n\n }\n\n \n $ave_per = $all==0?0:(round($suc/$all,2)*100).\"%\";\n $ave_time = $all==0?0:round($all_time/$video_num/86400,1);\n $subject_info =\"\";\n foreach($res as $p){\n $subject = $p[\"subject\"];\n $subject_str = E\\Esubject::get_desc($subject);\n $pass_per = (round(@$video_succ[$subject][\"all_count\"]/$p[\"all_count\"],2)*100).\"%\";\n $sub_ave_time = !empty($p[\"video_num\"])?round($p[\"time_count\"]/$p[\"video_num\"]/86400,1):0;\n $subject_info .= $subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天;\";\n $tea_arr =$task->get_admin_group_subject_list($subject);\n //$tea_arr=[];\n $tea_arr[72]=\"Erick\";\n $tea_arr[448]=\"rolon\";\n $tea_arr[349]=\"Jack\";\n // $tea_arr=[\"349\"=>\"Jack\"];\n foreach($tea_arr as $k=>$ttt){\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($k,\"理优面试组\",\"新老师入职情况汇总\",$ttt.\"老师你好,\".$subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线\".$subject_str.\"教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&subject=\".$subject);\n }\n }\n\n \n $list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time);\n $video_succ_list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time,-1);\n $one_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,-1);\n $one_succ_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,1); \n foreach($list as &$i){\n $i[\"video_num\"] = $i[\"all_count\"];\n }\n foreach($one_account as $k=>&$s){\n if(isset($list[$k])){\n $list[$k][\"all_count\"] +=$s[\"all_count\"];\n }else{\n $s[\"video_num\"]=0;\n $s[\"time_count\"]=0;\n $list[$k]= $s;\n }\n }\n foreach($one_succ_account as $k=>&$t){\n if(isset($video_succ_list[$k])){\n $video_succ_list[$k][\"all_count\"] +=$s[\"all_count\"]; \n }else{\n $video_succ_list[$k]=$t;\n }\n }\n\n //$list=[\"349\"=>\"Jack\"];\n foreach($list as $k=>&$val){\n $pass_per_account = (round(@$video_succ_list[$k][\"all_count\"]/$val[\"all_count\"],2)*100).\"%\";\n $account_ave_time = !empty($val[\"video_num\"])?round($val[\"time_count\"]/$val[\"all_count\"]/86400,1):0;\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($val[\"uid\"],\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".@$video_succ_list[$k][\"all_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);\n /*$task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优监课组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n /* $task->t_manager_info->send_wx_todo_msg_by_adminid (349,\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n\n\n\n }\n }", "protected function executeTasks() {}", "public function handle()\n {\n $start_date = $this->argument('start');\n $end_date = $this->argument('end');\n if ($start_date == 1 && $end_date == 1) {\n echo \"Will crawler with today \\n\";\n $start_date = date('Y-m-d',strtotime(\"-1 days\"));\n $end_date = date('Y-m-d');\n }\n ini_set('max_execution_time', -1); //300 seconds = 5 minutes\n ini_set('memory_limit', '-1');\n\n $arr_date = $this->getArrayLoopFromStartDateEndDate($this->parseDate($start_date), $this->parseDate($end_date));\n\n // task 1\n\n echo \"BẮT ĐẦU => điện toán 123 \\n\";\n\n try {\n DB::beginTransaction();\n\n foreach ($arr_date as $item => $date) {\n $this->crawler($date);\n echo(\"Xong lấy kết quả điện toán 123 ngày \" . $date . \"\\n\");\n }\n echo \"XONG TỈNH => điện toán 123 \\n\";\n\n DB::commit();\n\n DB::commit();\n } catch (\\Exception $ex) {\n\n }\n echo \"......................................... \\n\";\n echo \"BẮT ĐẦU => thần tài \\n\";\n try {\n DB::beginTransaction();\n\n foreach ($arr_date as $item => $date) {\n $this->crawler_2($date);\n echo(\"Xong lấy kết quả thần tài ngày \" . $date . \"\\n\");\n }\n\n DB::commit();\n } catch (\\Exception $ex) {\n\n }\n\n\n echo \"......................................... \\n\";\n echo \"BẮT ĐẦU => 6X36 \\n\";\n try {\n DB::beginTransaction();\n\n foreach ($arr_date as $item => $date) {\n $this->crawler_3($date);\n echo(\"Xong lấy kết quả 6X36 ngày \" . $date . \"\\n\");\n }\n\n DB::commit();\n } catch (\\Exception $ex) {\n\n }\n\n echo \"Hoàn tất \\n\";\n exit();\n\n }", "public function testTask1Exception(){\n\n }", "public function updateTasksForMismatchedHasJob()\n\t{\n\t\tif ($this->hasTaskCategory(Task::NOT_REPLIED)) return;\n\t\t$this->deleteMismatchedNoJobTasks();\n\t\t$this->createMismatchedHasJobTask();\n\t}", "public function testActionUseCase2()\n {\n // person and target\n\n // workflow, rule and action\n $workflow = factory(WorkflowEloquent::class)->create([\n 'user_id' => $this->user->getKey(),\n ]);\n $action1 = factory(ActionEloquent::class)->create([\n 'action_type' => ActionEloquent::ACTION_TYPE_UPDATE,\n 'target_class' => 'persons',\n 'target_field' => 'is_primary',\n 'value' => 1,\n ]);\n $workflow->actions()->sync([$action1->getKey()]);\n $rule1 = factory(RuleEloquent::class)->create([\n 'name' => 'is preapprove person',\n 'workflow_id' => $workflow->getKey(),\n 'rule_type' => RuleEloquent::FIELD_TYPE_BOOLEAN,\n 'operator' => RuleEloquent::OPERATOR_EQUAL,\n 'field_name' => 'persons.is_pre_approved',\n 'value' => '1',\n 'runnable_once' => true,\n 'run_interval' => 0,\n ]);\n $rule2 = factory(RuleEloquent::class)->create([\n 'name' => 'lead type own',\n 'workflow_id' => $workflow->getKey(),\n 'rule_type' => RuleEloquent::FIELD_TYPE_NUMBER,\n 'operator' => RuleEloquent::OPERATOR_EQUAL,\n 'field_name' => 'person_contexts.lead_type_id',\n 'value' => $this->leadTypeId,\n ]);\n\n $action1->rules()->sync([ $rule1->getKey(), $rule2->getKey()]); //\n\n $object = factory(ObjectEloquent::class)->create([\n 'workflow_id' => $workflow->getKey(),\n 'object_class' => 'tags.id',\n 'object_type' => $this->tag->getKey(),\n ]);\n // check tag\n $this->seeInDatabase('taggables',[\n 'user_id' => $this->user->getKey(),\n 'tag_id' => $this->tag->getKey(),\n 'taggable_id' => $this->person->getKey(),\n 'taggable_type' => 'persons',\n ]);\n\n //// first time run ////\n $kernel = $this->app->make(Kernel::class);\n $status = $kernel->handle(\n $input = new ArrayInput(array(\n 'command' => 'workflow:action-run',\n 'workflow' => $workflow->getKey(),\n 'action' => $action1->getKey(),\n )),\n $output = new BufferedOutput\n );\n $this->assertEquals($status, 0);\n //$this->assertEquals(1, preg_match('/^Complete fire actions/m', $output->fetch()));\n\n // check logs\n $this->seeInDatabase('action_logs',[\n 'action_id' => $action1->getKey(),\n 'workflow_id' => $workflow->getKey(),\n 'status' => LogInterface::LOG_STATUS_SUCCESS,\n 'object_class' => $this->person->getLoggableType(),\n 'object_id' => $this->person->getKey(),\n ]);\n $this->seeInDatabase('action_log_rules',[\n 'rule_id' => $rule1->getKey()\n ]);\n $this->seeInDatabase('action_log_rules',[\n 'rule_id' => $rule2->getKey()\n ]);\n\n //// second run must failed ////\n $status = $kernel->handle(\n $input = new ArrayInput(array(\n 'command' => 'workflow:action-run',\n 'workflow' => $workflow->getKey(),\n 'action' => $action1->getKey(),\n )),\n $output = new BufferedOutput\n );\n //echo $output->fetch();\n $this->assertEquals($status, 0);\n\n // // check logs\n $this->seeInDatabase('action_logs',[\n 'action_id' => $action1->getKey(),\n 'workflow_id' => $workflow->getKey(),\n 'status' => LogInterface::LOG_STATUS_FAILED,\n 'object_class' => $this->person->getLoggableType(),\n 'object_id' => $this->person->getKey(),\n 'info' => 'Already run once!',\n ]);\n $this->seeInDatabase('action_log_rules',[\n 'rule_id' => $rule1->getKey()\n ]);\n $this->seeInDatabase('action_log_rules',[\n 'rule_id' => $rule2->getKey()\n ]);\n\n //cleanup.\n $this->cleanUpRecords(new PersonObserver, $this->person);\n }", "function check_if_python_end($details_obj){\n\t\tif (file_exists($details_obj->project->outputPython.'\\\\markers\\\\learner_phase_file')){\n\t\t\t$details_obj->project = update_project_list($details_obj->project,\"end_offline\",true);\n\t\t\tupdate_project_details($details_obj->project);\n\t\t\tmove_to_online_task($details_obj);\n\t\t}else {\n\t\t\t$err_f = $details_obj->project->outputPython.'\\\\markers\\\\error_file';\n\t\t\tif (file_exists($err_f)){\n\t\t\t\t$details_obj->project->problem = true;\n\t\t\t\tupdate_project_details($details_obj->project);\n\t\t\t}else {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t}\n\t}", "public function markExecution() {}", "private function part2()\n {\n $this->start();\n\n $lines = explode(\"\\n\", $this->getInput());\n\n $result = null;\n\n foreach ($lines as $io => $line) {\n $trying = true;\n $linesToTry = collect($lines)->filter(function($line, $ii) use ($io) {\n return $ii >= $io;\n })->toArray();\n\n $sum = 0;\n\n while ($trying) {\n foreach ($linesToTry as $itry => $try) {\n $sum += $try;\n\n if ($sum == $this->firstAnswer) {\n if (! $result) {\n $contiguous = collect($lines)->filter(function($line, $index) use ($io, $itry) {\n return $index >= $io && $index <= $itry;\n })->toArray();\n\n $result = min($contiguous) + max($contiguous);\n }\n\n $trying = false;\n break;\n }\n }\n\n $trying = false;\n }\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$result]],\n ],\n 'time' => $this->getTime(),\n ]);\n }", "public function testExecuteTaskAction()\n {\n }", "function hook_dms_client_report_tasks_alter(&$tasks) {\r\n // Alter any task, add a new one...\r\n}", "public function run()\n {\n \\App\\Task::create([\n 'title' => 'Lorem Ipsum',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n \\App\\Task::create([\n 'title' => 'Dolor Sit',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n }", "public function run()\n {\n $delta = true;\n $ci = 0;\n $ti = 0;\n for($i = 1; $i <= 20; $i++) {\n while($delta) {\n $ci = DB::table('users')->where(['role_id' => 3, 'id' => rand(3, 32) ])->value('id');\n if($ci != 0) {\n $ti = DB::table('users')->where(['role_id' => 2, 'id' => rand(3, 32) ])->value('id');\n if($ti != 0) {\n $delta = false;\n }\n }\n }\n DB::table('tasks')->insert([\n 'task_type_id' => rand(1, 5),\n 'technician_id' => $ti,\n 'client_id' => $ci,\n 'task_state_id' => rand(1, 4),\n 'description' => 'none',\n 'annotation' => 'none',\n 'code' => str_random(20),\n 'created_at' => date('Y-m-01').' '.'00:00:00',\n 'updated_at' => date('Y-m-01').' '.'00:00:00',\n ]);\n $ci = 0;\n $ti = 0;\n $delta = true;\n }\n }", "public function test2()\n {\n //Logger::getInstance()->on();\n \n //$timer = new Timer();\n //$timer->start();\n \n $c1 = Class1::get(1); \n $c2 = $c1->getClass2();\n $c3 = $c2->getClass3();\n $c3->setAttr31('Un texto distinto al anterior');\n \n $this->assert( $c1->save(), 'Test guardar 1 '. print_r($c1->getErrors(), true));\n \n //$timer->stop();\n //echo 'tiempo total 1: ' . $timer->getElapsedTime() . '<br/>';\n \n \n // Intento guardar de nuevo la misma instancia, no deberia guardar porque ya se guardo y esta limpia.\n // Observar que este save no hace consultas a la base, y por lo tanto, es mucho mas rapido evitando updates innecesarios.\n //$timer->reset();\n //$timer->start();\n \n $this->assert( $c1->save(), 'Test guardar 2 '. print_r($c1->getErrors(), true));\n \n //$timer->stop();\n //echo 'tiempo total 2: ' . $timer->getElapsedTime() . '<br/>';\n \n //Logger::getInstance()->off();\n \n // La nariz NO debe tener errores\n //$this->assert( count($cara->getNariz()->getErrors()) == 0, 'Test errores en nariz 2');\n }", "public function run()\n {\n \t// Person against person\n \t// Person against self\n \t// Person against nature\n \t// Person against society\n \t// Person against the supernatural\n \t// Person against technology\n\n \t/*\n \t\tIn order to stop a :villainTraitList: :villainOccupation:,\n\t\t\t:mainCharacterName:, a :mainCharacterAge: year-old \n\t\t\t:mainCharacterOccupation: enlists the help of \n\t\t\t:mainCharacterPossessive: :numberOfSupportingCharacters:\n\t\t\tfriends to :resolutionAction: :resolutionNameWithArticle:.\n \t */\n\n $conflicts = [\n \t''\n ];\n }", "protected function _detectCompletionAndEnd()\n {\n// detect if the output has completed, and if it does\n// delete the output file and stop the loop.\n if($this->_detectCompletionBoundaryInOutput() === true)\n {\n $this->deleteOutputFile();\n $this->stop();\n }\n else if($this->_detectFailureBoundaryInOutput() === true)\n {\n $this->_error_code = $this->_getErrorCodeInOutput();\n }\n }", "public function after_run(){}", "public static function executeStepHandler2()\n {\n // Invoke plugins\n \\Includes\\Decorator\\Utils\\PluginManager::invokeHook(static::HOOK_STEP_SECOND);\n }", "public function work(): void;", "public function handle()\n {\n (new Parallel(new TaskA,new TaskE))->execute();\n\n // Wait for the end of execution of both tasks\n (new TaskC)->execute();\n }", "public function execute(string $task): void\n {\n $this->perform($task, 'first');\n $this->perform($task, 'second');\n }", "public function testOtherSectionsCorrectAnswer() {\n\n $this->section->setFinished($this->user);\n\n $this->setFinished($this->section, 1);\n $this->setFinishedTo($this->section2, 0);\n $this->setCorrectnessTo($this->section2, 0, false);\n $this->setFinishedTo($this->section3, 0);\n $this->setCorrectnessTo($this->section3, 0, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[0]->section_id, $this->section->id);\n $this->assertEquals($practices[1]->section_id, $this->section->id);\n $this->assertEquals($practices[2]->section_id, $this->section->id);\n $this->assertEquals($practices[3]->section_id, $this->section2->id);\n $this->assertEquals($practices[4]->section_id, $this->section3->id);\n $this->assertTrue(!isset($practices[5]));\n\n // Add sleep to add correctness mark on the next second\n sleep(1);\n\n $this->setFinishedTo($this->section3, 1);\n $this->setCorrectnessTo($this->section3, 1, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[4]->subtype_id, $this->section3->practices[1]->subtype_id);\n\n sleep(1);\n\n $this->setCorrectnessTo($this->section3, 0, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[4]->subtype_id, $this->section3->practices[0]->subtype_id);\n }", "function updateCompletedTaskDescriptions() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating task descriptions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $project_objects_table WHERE type = 'Task' AND completed_on IS NOT NULL AND body != '' AND body IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('Task', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $project_objects_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('Task descriptions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to upgrade task descriptions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function pass_1()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_ELSE');\n\t\twhile($tp < $token_count) {\n\t\t\tif($this->token_name($tokens[$tp]) == 'T_ELSE' ){\n\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\tif($this->token_name($tokens[$temp]) == 'T_IF') {\n\t\t\t\t\t$this->add_tokens_to_be_replaced($tp ,'elseif');\n\t\t\t\t\t$this->add_tokens_to_be_replaced($temp ,'');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tp++;\n\t\t}\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t\t\n\t}", "public function proceed();", "public function finish()\n\t{\n\t\t/* @todo this needs to be a queue task */\n\t\tforeach( new \\IPS\\Patterns\\ActiveRecordIterator( \\IPS\\Db::i()->select( '*', 'forums_forums' ), 'IPS\\forums\\Forum' ) AS $forum )\n\t\t{\n\t\t\t$forum->setLastComment();\n\n\t\t\t$forum->queued_topics = \\IPS\\Db::i()->select( 'COUNT(*)', 'forums_topics', array( 'forum_id=? AND approved=0', $forum->id ) )->first();\n\t\t\t$forum->queued_posts = \\IPS\\Db::i()->select( 'COUNT(*)', 'forums_posts', array( 'forums_topics.forum_id=? AND forums_posts.queued=1', $forum->id ) )->join( 'forums_topics', 'forums_topics.tid=forums_posts.topic_id' )->first();\n\t\t\t$forum->save();\n\t\t}\n\t\t\n\t\t/* Content Rebuilds */\n\t\t\\IPS\\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'forums_posts', 'class' => 'IPS\\forums\\Topic\\Post' ), 2, array( 'app', 'link', 'class' ) );\n\t\t\\IPS\\Task::queue( 'convert', 'RebuildFirstPostIds', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );\n\t\t\\IPS\\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 4, array( 'app' ) );\n\t\t\n\t\treturn \"Search Index Rebuild, Content Rebuild, Content Recount, Member Recount, and Private Message Rebuild tasks started.\";\n\t}", "public function start_tran();", "public function reviewTask ($task) {\n\n\t}", "protected function stopTask() {}", "public function execute()\n\t{\n\t\tChangeProject::getInstance()->executeTask('cd');\n\t\tChangeProject::getInstance()->executeTask('gdb');\n\t\tChangeProject::getInstance()->executeTask('ci18n', array('markergmaps'));\n\t\tChangeProject::getInstance()->executeTask('cb');\n\t\tChangeProject::getInstance()->executeTask('cec');\n\t\tChangeProject::getInstance()->executeTask('croles');\n\t\tChangeProject::getInstance()->executeTask('cperm');\n\t\tChangeProject::getInstance()->executeTask('import-data', array('markergmaps', 'init.xml'));\n\t}", "public abstract function afterExec();", "public function testShiftTasksAll() {\n\t\t$milestone1_pre = $this->Milestone->findById(1);\n\t\t$milestone3_pre = $this->Milestone->findById(3);\n\n\t\t$this->assertEqual($milestone1_pre['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '1', 'points' => '0'),\n\t\t));\n\t\t$this->assertEqual($milestone3_pre['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '0', 'points' => '0'),\n\t\t));\n\t\t$this->Milestone->shiftTasks(1, 3, true, array('callbacks' => false));\n\n\t\t$milestone1_post = $this->Milestone->findById(1);\n\t\t$milestone3_post = $this->Milestone->findById(3);\n\t\t$this->assertEqual($milestone1_post['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '0', 'points' => '0'),\n\t\t));\n\t\t$this->assertEqual($milestone3_post['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '1', 'points' => '0'),\n\t\t));\n\t}", "public function testProcessWeirdCase2()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit1->setReversedConnection([\n 'tid' => 'id',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'id' => 'id',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '1'],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('test2');\n $unit2->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit2->setReversedConnection([\n 'tid' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'parent_id' => 'id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n false\n ]\n ));\n $unit2->setTmpFileName('customer_tmp.csv');\n $unit2->setParent($unit1);\n\n $action = $this->getAction([$unit1, $unit2]);\n $action->process($this->getResultMock());\n }", "private static function cleanup()\n {\n // we don't need the tasks in memory any more.\n self::$_tasks = '';\n }", "public function testJobListPreparationAndReleaseTaskStatus()\n {\n\n }", "public function testShiftTasksNothingToShift() {\n\t\t$milestone5_pre = $this->Milestone->findById(5);\n\t\t$milestone1_pre = $this->Milestone->findById(1);\n\n\t\t$this->assertEqual($milestone5_pre['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '0', 'points' => '0'),\n\t\t));\n\t\t$this->assertEqual($milestone1_pre['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '1', 'points' => '0'),\n\t\t));\n\n\t\t// Shift only the non-resolved/closed tasks and check all is well\n\t\t$this->Milestone->shiftTasks(5, 1, false, array('callbacks' => false));\n\n\t\t$milestone5_post = $this->Milestone->findById(5);\n\t\t$milestone1_post = $this->Milestone->findById(1);\n\t\t$this->assertEqual($milestone5_post['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '0', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '0', 'points' => '0'),\n\t\t));\n\t\t$this->assertEqual($milestone1_post['Tasks'], array(\n\t\t\t'open' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'in progress' => array('numTasks' => '2', 'points' => '0'),\n\t\t\t'resolved' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'closed' => array('numTasks' => '1', 'points' => '0'),\n\t\t\t'dropped' => array('numTasks' => '1', 'points' => '0'),\n\t\t));\n\t}", "public function handle()\n {\n $agencies = Agency::all();\n\n foreach ($agencies as $agency){\n $tasks_with_custom_reminder = tasks_with_custom_reminder($agency->id);\n $tasks_reminder = tasks_reminder($agency->id);\n\n $content = '<p>Hi {STAFF_NAME},</p>\n <p>Reminder The Task <strong>#{TASK_ID}</strong> &nbsp;has a deadline to you at <strong>{TIME}</strong> in <strong>{DEADLINE}</strong>.</p>\n <p>Please check the task and Update it.</p>\n <p><br><a href=\"{TASK_URL}\"><strong>View Task</strong></a><br><br>Regards<br>The {SITE_NAME} Team</p>';\n $subject = 'TASK DEADLINE';\n\n $merged = array_merge($tasks_with_custom_reminder, $tasks_reminder);\n\n foreach ($merged as $date_remind => $custom_reminder){\n\n\n if (date('Y-m-d') == $date_remind){\n\n foreach ($custom_reminder as $time_remind => $tasks){\n\n if (date('H:i').':00' == $time_remind){\n// if ($time_remind == $time_remind){\n foreach ($tasks as $task){\n\n $staffs = $task->staff;\n $company_name = $task->agency && $task->agency->company_name_en ? $task->agency->company_name_en : 'Broker';\n foreach ($staffs as $staff){\n\n $link = 'activity/tasks/'.$task->agency_id.'/show/'.$task->id;\n $message = str_replace(\"{STAFF_NAME}\",$staff->name_en,$content);\n $message = str_replace(\"{TASK_ID}\",$task->id,$message);\n $message = str_replace(\"{DEADLINE}\",$task->deadline,$message);\n $message = str_replace(\"{{TIME}}\",$task->time,$message);\n $message = str_replace(\"{TASK_URL}\",url($link),$message);\n $message = str_replace(\"{SITE_NAME}\",$company_name,$message);\n\n SendEmail::dispatch($staff->email, $message, $subject);\n\n event(new CronJobMailEvent($task ,$staff->id,'Send Email To Reminder Staff The Deadline',\n 'task_reminder'));\n// Mail::to($staff->email)->send(new EmailGeneral($message, $subject ));\n\n }\n Notification::send($staffs, new CronJobMailNotification($task,\n 'Send Email To Reminder Staff The Deadline','task_reminder'));\n\n }\n }\n }\n }\n }\n }\n return 0;\n }", "public function mainTask()\n\t{\n\t\t// Redirect to version panel of current version (TEMP)\n\t\tApp::redirect(\n\t\t\tRoute::url($this->_route . '&active=versions', false)\n\t\t);\n\t\treturn;\n\t}", "public function testTask()\n\t{\n \n //Need also define the ssh keys and password in config.php\n \n //Insert first a task\n \n /*$arr_task=['name_task' => 'live', 'descripton_task' => 'Script for check if server is alive', 'arguments' => [], 'status' => 0, 'url_return' => '', 'server' => SERVER_REMOTE];\n \n $new_task=$m->task->insert($arr_task);\n \n $id=$m->task->insert_id();\n \n $this->assertNotFalse($new_task);\n \n $arr_task['IdTask']=$id;*/\n \n //Select task from db\n \n //Execute task\n \n $task=new Task(SERVER_REMOTE);\n \n $task->files=[['vendor/phangoapp/leviathan/tests/script/alive.sh', 0755]];\n \n $task->commands_to_execute=[['/bin/bash', 'vendor/phangoapp/leviathan/tests/script/alive.sh', ''], ['sudo', 'vendor/phangoapp/leviathan/tests/script/alive.sh', '']];\n \n $task->delete_files=['vendor/phangoapp/leviathan/tests/script/alive.sh'];\n \n $task->delete_directories=['vendor/phangoapp/leviathan/tests'];\n \n $task->name_task='Live';\n \n $task->description_task='Check if server is alive';\n \n $task->codename_task='live';\n \n $result=$task->exec();\n \n echo $task->txt_error;\n \n $this->assertTrue($result);\n \n \n \n }", "function tasks()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tasks'] == 1 ) ? 'Task' : 'Tasks';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$taskkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t{\n\t\t\t$taskkeys[] = \"'{$v['task_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'task_manager', \"task_key IN (\".implode( \",\", $taskkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_task( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tasks']} {$object} {$operation}....\" );\n\t}", "public function incomplete()\n {\n $this->update(['completion_date' => null]);\n LogController::set(get_class($this).'@'.__FUNCTION__);\n // $this->recordActivity('incompleted_task');\n }", "private function part1()\n {\n $this->start();\n\n $lines = collect(explode(\"\\n\", $this->getInput()));\n\n $preamble = 25;\n\n foreach ($lines as $io => $line) {\n if ($io <= ($preamble - 1)) continue;\n\n $linesToCheck = $lines->filter(function($line, $ii) use ($preamble, $io) {\n return $ii >= ($io - $preamble) && $ii < $io;\n })->toArray();\n\n if (! $this->twoCanSum($line, $linesToCheck)) {\n $this->firstAnswer = $line;\n break;\n }\n\n if ($this->firstAnswer) break;\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 1: Answer'],\n 'data' => [[$this->firstAnswer]],\n ],\n 'time' => $this->getTime(),\n ]);\n }", "public function run()\n {\n $conf = new Confirmation();\n $conf->oferta_id = 1;\n $conf->user_id = 3;\n $conf->save();\n\n $conf = new Confirmation();\n $conf->oferta_id = 3;\n $conf->user_id = 4;\n $conf->save();\n \n $conf = new Confirmation();\n $conf->oferta_id = 4;\n $conf->user_id = 3;\n $conf->save();\n }", "function Step1_IntegrityHard() { return( $this->stepTest( 'integ_') ); }", "public function Save_Other_Task_Entry()\n {\n $type = $this->input->post('Task_Type', true);\n $count = sizeof($type);\n $project = $this->input->post('Project_Id', true);\n $contract = $this->input->post('Contract_Id', true);\n $phase = $this->input->post('Phase_Id', true);\n $leader = $this->input->post('Project_Leader', true);\n $category = $this->input->post('Task_Category', true);\n $description = $this->input->post('Task_Description', true);\n $task_date = $this->input->post('Task_Date', true);\n $Hours = $this->input->post('Logged_Hours', true);\n for ($i = 0; $i < $count; $i++) {\n if ($type[$i] == \"\") {\n } else {\n if ($contract[$i] == '1') {\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => $project[$i],\n 'Task_WO_Icode' => '0',\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => $contract[$i],\n 'Task_Project_Phase_Icode' => $phase[$i],\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n\n } else if ($contract[$i] > 1) {\n //print_r(\"work order\");\n //print_r($contract[$i]);\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => '0',\n 'Task_WO_Icode' => $project[$i],\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => $contract[$i],\n 'Task_Project_Phase_Icode' => $phase[$i],\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n\n } else {\n //print_r(\"non project\");\n //print_r($leader[$i]);\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => '0',\n 'Task_WO_Icode' => '0',\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => '0',\n 'Task_Project_Phase_Icode' => '0',\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n }\n }\n }\n echo 1;\n }", "public function checkAutoFinish()\n {\n $hFunction = new \\Hfunction();\n $modelCompany = new QcCompany();\n $currentDateCheck = $hFunction->carbonNow();\n # lay thong tin dang hoa dong\n $dataRequest = $this->getAllInfoActivity();\n if ($hFunction->checkCount($dataRequest)) {\n foreach ($dataRequest as $request) {\n $requestDate = $request->requestDate();\n $checkDate = $hFunction->datetimePlusDay($modelCompany->getDefaultTimeBeginToWorkOfDate($requestDate), 1);\n if ($currentDateCheck > $checkDate) {# qua ngay tang ca\n $this->confirmFinish($request->requestId());\n }\n }\n }\n\n }", "abstract function after();", "function turnitintooltwo_cron_migrate_gradebook() {\n global $DB;\n\n // Get a list of assignments with outstanding gradebook migrations.\n require_once(__DIR__.'/classes/v1migration/v1migration.php');\n $sql = \"migrate_gradebook = 1 GROUP BY turnitintooltwoid\";\n $assignments = $DB->get_records_select(\"turnitintooltwo_submissions\", $sql, NULL, 'turnitintooltwoid', \"turnitintooltwoid, count(turnitintooltwoid) AS numsubmissions\");\n\n $numsubmissions = 0;\n foreach ($assignments as $assignment) {\n // We will break out unless the number of submissions migrated + to be migrated is MIGRATION_SUBMISSIONS_CUTOFF or less.\n if (($numsubmissions + $assignment->numsubmissions) <= MIGRATION_SUBMISSIONS_CUTOFF ||\n (($numsubmissions == 0) && ($assignment->numsubmissions > MIGRATION_SUBMISSIONS_CUTOFF))) {\n\n $numsubmissions += $assignment->numsubmissions;\n\n // Get the course ID.\n $courseid = $DB->get_field('turnitintooltwo', 'course', array('id' => $assignment->turnitintooltwoid));\n\n // Get a TII assignment ID on this assignment so we can link back to V1.\n $sql = \"turnitintooltwoid = \" . $assignment->turnitintooltwoid . \" LIMIT 1\";\n $tiiid = $DB->get_field_select('turnitintooltwo_parts', 'tiiassignid', $sql);\n\n // Get a V1 part belonging to this assignment.\n $sql = \"tiiassignid = \" . $tiiid . \" LIMIT 1\";\n $turnitintoolid = $DB->get_field_select('turnitintool_parts', 'turnitintoolid', $sql);\n\n $gradeupdates = v1migration::migrate_gradebook($assignment->turnitintooltwoid, $turnitintoolid, $courseid, \"cron\");\n\n // If we have migrated, update the titles.\n if ($gradeupdates == \"migrated\") {\n // Get the V1 assignment.\n $v1assignment = $DB->get_record('turnitintool', array(\"id\" => $turnitintoolid));\n\n // Perform post-migration tasks.\n $v1migration = new v1migration($courseid, $v1assignment);\n $v1migration->post_migration($assignment->turnitintooltwoid);\n }\n } else {\n break;\n }\n }\n}", "function transfer_lead_exec_resigned($from_emp_id,$to_emp_id=null){\n\t$trans_fr_date=date('Y-m-d');\n\tif(empty($to_emp_id)) return;\n\t//$to_emp_id=($to_emp_id!=null?$to_emp_id:\"ger_reporting_empid \"); \n\t\n\t$query=\"update gft_lead_fexec_dtl t1,(SELECT g.*,$to_emp_id FROM \" .\n\t\t\t\"gft_lead_fexec_dtl g,gft_emp_master,gft_emp_reporting \" .\n\t\t\t\" where glf_emp_id=gem_emp_id and glf_status='A' \" .\n\t\t\t\" and ger_emp_id=gem_emp_id and ger_status='A' and glf_emp_id='$from_emp_id' ) t2 set t1.glf_to_date='$trans_fr_date',\" .\n\t\t\t\" t1.glf_status='I' where t2.glf_emp_id=t1.glf_emp_id and t1.glf_lead_code=t2.glf_lead_code \" .\n\t\t\t\" and t1.glf_to_date='0000-00-00' \";\n\t$result_up=execute_my_query($query,'',true,false);\n\t$query_ins=\"insert ignore into gft_lead_fexec_dtl (GLF_EMP_ID, \" .\n\t\t\t\"GLF_LEAD_CODE, GLF_FROM_DATE, GLF_TO_DATE, GLF_STATUS)\" .\n\t\t\t\"(SELECT $to_emp_id , GLF_LEAD_CODE,'$trans_fr_date',\" .\n\t\t\t\" '0000-00-00', 'A' FROM gft_lead_fexec_dtl g,gft_emp_master,gft_emp_reporting \" .\n\t\t\t\" where glf_emp_id=gem_emp_id and glf_status='I' and \" .\n\t\t\t\" ger_emp_id=gem_emp_id and ger_status='A' and glf_to_date='$trans_fr_date' \" .\n\t\t\t\" and glf_emp_id='$from_emp_id')\";\t\n\t$result_ins=execute_my_query($query_ins,'',true,false);\n\texecute_my_query(\" update gft_lead_hdr set glh_lfd_emp_id=$to_emp_id where glh_lfd_emp_id=$from_emp_id \",'',true,false);\n\texecute_my_query(\" update gft_lead_hdr set GLH_FIELD_INCHARGE=$to_emp_id where GLH_FIELD_INCHARGE=$from_emp_id \",'',true,false);\n\texecute_my_query(\" update gft_lead_hdr set GLH_L1_INCHARGE=$to_emp_id where GLH_L1_INCHARGE=$from_emp_id \" ,'',true,false);\n\tif($to_emp_id!=null){\n\t\texecute_my_query(\"update gft_track_lead_status set GTL_EMP_ID=$to_emp_id,GTL_ASSIGN_FROM=$from_emp_id \" .\n\t\t\t\t\" WHERE GTL_EMP_ID=$from_emp_id AND GTL_MONTH=month(now()) AND GTL_YEAR=year(now())\");\t\t\n\t}\n\texecute_my_query(\"update ignore gft_lead_monitors set GLM_EMP_ID=$to_emp_id where GLM_EMP_ID=$from_emp_id AND GLM_MONITOR_TYPE=1\"); \n\texecute_my_query(\"delete from gft_lead_monitors where GLM_EMP_ID=$from_emp_id AND GLM_MONITOR_TYPE=1\");\n}", "abstract protected function after();", "public function processChangeInterventionMigrationLineForScenario(){\n $this->html = \"can't found scenario version whith theses parameters ...\"; \n $this->ei_version = Doctrine_Core::getTable(\"EiVersion\")->findOneById($this->scenario_version_id);\n if ($this->ei_version != null):\n /* Avant l'envoi de la reqûete au système , on s'assure que le scenario ne possède pas de version pour le package/ticket concerné */\n $exist_scenario_version = Doctrine_Core::getTable(\"EiScenarioPackage\")->findByEiScenarioIdAndPackageIdAndPackageRef($this->ei_version->getEiScenarioId(),\n $this->ei_ticket->getTicketId(), $this->ei_ticket->getTicketRef());\n if (count($exist_scenario_version) == 0):\n //On crée la ligne permettant de lier la version de scénario à l'intervention\n $ei_scenario_package=Doctrine_Core::getTable(\"EiScenarioPackage\")->findOneByEiScenarioIdAndEiVersionId(\n $this->ei_version->getEiScenarioId(),$this->ei_version->getId() );\n \n $ei_scenario_package->setPackageId($this->ei_ticket->getTicketId());\n $ei_scenario_package->setPackageRef($this->ei_ticket->getTicketRef()); \n $ei_scenario_package->save();\n $this->html = \"Transaction maded successfully ...\";\n $this->success =true;\n else:\n $this->html = \"Warning! there is a scenario already link to this intervention ...\";\n endif;\n endif;\n }", "function needsExecution() ;", "function getTask() ;", "final function whatIsGood() {\n echo \"Running is good <br>\";\n }", "public function action_taskexecuter() {\n $tasks = Model_Admin_Task::query()->where('done', 0)\n ->order_by('whentodo', 'asc')\n ->get();\n \n $now = time();\n foreach ($tasks as $task) {\n \n // This with all after tasks are futur tasks\n if(intval($task->whentodo) > $now)\n break;\n \n switch ($task->type) {\n case \"newsletter\":\n \n // Title and content\n $params = Format::forge($task->parameters, 'json')->to_array();\n $title = $params['title'];\n $content = $params['content'];\n $smscontent = $params['smscontent'];\n \n // Collect all users\n $users = Model_13user::find('all');\n // Send mail to email users\n foreach ($users as $user) {\n if($user->notif == \"sms\") {\n // Wait for sms implementation\n }\n else {\n $data = array(\n 'title' => $title,\n 'content' => $content,\n 'pseudo' => $user->pseudo\n );\n // Send mail\n Controller_Base::sendHtmlMail(\n '[email protected]', \n 'Season13.com', \n $user->email, \n 'Newsletter Season13.com', \n 'mail/newsletter', \n $data\n );\n }\n }\n \n $task->hasdone();\n \n break;\n }\n }\n $data['admin_tasks'] = $tasks;\n \t$this->template->title = \"Tasks just done\";\n \t$this->template->content = View::forge('admin/task/index', $data);\n }", "public function doneAction()\n\t{\n\t\n\t}", "public function run()\n {\n $task = new Task();\n $task->name = 'Nguyễn Thiên';\n $task->age = 26;\n $task->phone = 0353377104;\n $task->address = 'Quảng Trị';\n $task->email = '[email protected]';\n $task->save();\n\n $task = new Task();\n $task->name = 'Vũ Văn Mạnh';\n $task->age = 20;\n $task->phone = 03134314314;\n $task->address = 'Hải Dương';\n $task->email = '[email protected]';\n $task->save();\n\n\n }", "public function run()\n {\n DB::table('tasks')->insert([\n 'user_id' => 1,\n 'description' => 'This is the first task for user 1.',\n 'status' => \"In Progress\",\n 'priority' => \"High\",\n 'due_at' => '2019-12-01',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => 2,\n 'description' => 'This is the first task for user 2.',\n 'status' => \"Not Started\",\n 'priority' => \"Medium\",\n 'due_at' => '2019-12-11',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => 1,\n 'description' => 'This is the second task for user 1.',\n 'status' => \"Not Started\",\n 'priority' => \"Low\",\n 'due_at' => '2020-02-01',\n 'created_at' => '2019-10-01 12:20:02',\n 'updated_at' => '2019-10-01 12:20:02'\n ]);\n\n }", "public function endTask($id, $end){\n\t\t$startTime = dibi::fetchSingle(\"select [start_times] from [times] where [id_times] = %i\", $id);\n\t\treturn dibi::query(\"update [times] set [end_times] = %i\", $end, \", [duration_times]=%i\", round((time() - $startTime)/60) ,\"where [id_times] = %i\", $id);\n\t}", "public static function commandSetStatus(){\n\n self::$console->register('set:status')\n ->setDescription('Sets a Task as complete \"todo\", \"inprogress\", \"complete\"')\n ->setDefinition(array(\n new InputArgument('taskid', InputArgument::OPTIONAL, \"Task ID - if no id is specified, active task will be used\", 'nope'),\n new InputArgument('status', InputArgument::OPTIONAL, \"Status. : todo, inprogress, toverify, complete\", 0)\n ))\n ->setCode(function (InputInterface $input, OutputInterface $output) {\n\n\n $taskid = (int) $input->getArgument(\"taskid\");\n $set_status = $input->getArgument(\"status\");\n\n\n if ($taskid == 0) {\n //Try to get current active task because no task was specified\n $taskid = (int) Helper::getActiveTaskId($output);\n if (!$taskid) {\n $output->writeln(\"<error>No task ID was specified or could be found in the active task.</error>\");\n die();\n }\n }\n\n if ($set_status == 'nope') {\n $output->writeln(\"<error>You need to specify the status: todo, inprogress, toverify or complete</error>\");\n die();\n }\n\n $taskInfo = Task::GetTaskInfo($taskid);\n $project_id = $taskInfo->PROJECT_ID;\n\n //check if the task exists:\n $statuses = Task::GetTaskStatuses(array(\n \"projectid\" => $project_id,\n ));\n\n //print_r($statuses);\n Helper::checkError($output);\n\n $mapStatus = array(\n \"todo\" => \"To do\",\n \"inprogress\" => \"In Progress\",\n \"progress\" => \"In Progress\",\n \"completed\" => \"Completed\",\n \"done\" => \"Completed\",\n \"toverify\" => \"To Verify\",\n \"verify\" => \"To Verify\",\n );\n\n if(isset($mapStatus[$set_status])){\n $searchStatus = $mapStatus[$set_status];\n }else{\n $output->writeln(\"<error>Status {$set_status} seems to be invalid!</error>\");\n }\n //find the Completed Task:\n $status_id = 0;\n foreach($statuses as $status){\n if($status->TASK_STATUS_NAME == $searchStatus ){\n $status_id = $status->TASK_STATUS_ID;\n }\n }\n\n if($status_id == 0){\n $output->writeln(\"<info>No Status ID was found for project {$project_id}</info>\");\n die();\n }\n\n Task::SaveTask(array(\n \"taskid\" => $taskid,\n \"statusid\" => $status_id,\n \"notify\" => false\n ));\n\n //finally, set the active task:\n Helper::setSession(\"TASK_ID\", $taskid);\n\n $output->writeln(\"<info>Task status was set to '{$searchStatus}'.</info>\");\n\n });\n\n }", "public function run()\n {\n $task = new \\App\\Task();\n $task->id = 1;\n $task->sprint_id = 1;\n $task->nr= '1.1';\n $task->name = 'Testtask';\n $task->estimatedtime = '00:30:00';\n $task->save();\n }", "public function testDeleteTaskInstanceVariable()\n {\n }", "static public function first ($this1, $other) {\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:19: characters 5-32\n\t\t$ret = new FutureTrigger();\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:20: characters 5-39\n\t\t$l1 = $this1->handle(Boot::getInstanceClosure($ret, 'trigger'));\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:21: characters 5-40\n\t\t$l2 = $other->handle(Boot::getInstanceClosure($ret, 'trigger'));\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:22: characters 5-30\n\t\t$ret1 = $ret;\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:23: lines 23-24\n\t\tif ($l1 !== null) {\n\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:24: characters 18-20\n\t\t\t$this2 = $l1;\n\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:24: characters 7-21\n\t\t\t$ret1->handle(function ($_) use (&$this2) {\n\t\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:24: characters 18-20\n\t\t\t\t$this2->cancel();\n\t\t\t});\n\t\t}\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:25: lines 25-26\n\t\tif ($l2 !== null) {\n\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:26: characters 18-20\n\t\t\t$this3 = $l2;\n\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:26: characters 7-21\n\t\t\t$ret1->handle(function ($_1) use (&$this3) {\n\t\t\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:26: characters 18-20\n\t\t\t\t$this3->cancel();\n\t\t\t});\n\t\t}\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:27: characters 5-15\n\t\treturn $ret1;\n\t}" ]
[ "0.5747008", "0.5722135", "0.5699618", "0.5631746", "0.557549", "0.5478545", "0.54723316", "0.5455139", "0.52931464", "0.5285361", "0.52625", "0.5217947", "0.52016664", "0.519787", "0.5156039", "0.5148465", "0.5140543", "0.514036", "0.5083986", "0.5061822", "0.5039475", "0.50319505", "0.5031827", "0.50272", "0.50267684", "0.50222695", "0.49995133", "0.49873", "0.4973202", "0.49625757", "0.49610597", "0.49095005", "0.4896364", "0.4891649", "0.4876866", "0.48715824", "0.4870809", "0.4861862", "0.4859122", "0.48588297", "0.48518658", "0.48449013", "0.48408672", "0.48296016", "0.48199955", "0.48138535", "0.48005185", "0.47974154", "0.4796145", "0.47959343", "0.47958648", "0.47905132", "0.4788076", "0.477806", "0.47751617", "0.47581595", "0.4757776", "0.4754815", "0.4752012", "0.4751425", "0.47474706", "0.47455558", "0.4744392", "0.4741648", "0.47400796", "0.47396052", "0.47395343", "0.47258922", "0.4719345", "0.47081804", "0.46890602", "0.4685891", "0.46624663", "0.46557575", "0.46502635", "0.46395558", "0.46373656", "0.46371683", "0.463208", "0.46219942", "0.46096444", "0.46052626", "0.4604054", "0.45990852", "0.45914456", "0.45898017", "0.45831963", "0.45826596", "0.45805734", "0.45782256", "0.45741037", "0.4561828", "0.45606515", "0.4553869", "0.45508054", "0.45498967", "0.45482883", "0.45460942", "0.4543437", "0.45366448" ]
0.5518794
5
End task_2_correction Start task_3_correction
private function task_3_correction($task_name) { require_once public_path('task\\') . $task_name; $newValue_of_task = explode('.',$task_name); if(class_exists($newValue_of_task[0])){ $task = new $newValue_of_task[0]; if(session()->has('error_class')){ session()->forget('error_class'); } if(method_exists($newValue_of_task[0], 'check_email')){ if(session()->has('error_function')){ session()->forget('error_function'); } $wrong = array(); $wrong[0] = "";//empty $wrong[1] = "bassem [email protected]";//space $wrong[2] = "[email protected]";//not gmail or yahoo $wrong[3] = "bassem#gmail.com";//# not @ $wrong[4] = "[email protected]@gmail.com";//@gmail.com written two times $wrong[5] = "bassem@gmailcom"; $correct = array(); $correct[0] = "[email protected]"; $correct[1] = "[email protected]"; $correct[2] = "[email protected]"; $notes = array(); $counter = 0; $degree = 0; for($i=0;$i<count($wrong);$i++) { if($task->check_email($wrong[$i]) == "wrong") { $degree++; } else if($task->check_email($wrong[$i]) == "correct") { $notes[$counter] = $wrong[$i]; $counter++; } } for($i=0;$i<count($correct);$i++) { if($task->check_email($correct[$i]) == "correct") { $degree++; } else if($task->check_email($correct[$i]) == "wrong") { $notes[$counter] = $wrong[$i]; $counter++; } } $arr = array(); $arr[0] = $degree;//degree $arr[1] = count($wrong) + count($correct);//total degree $arr[2] = $notes; return $arr; }else{ $this->checker2 = true; session()->put('error_function','error_function'); unlink(public_path('task\\') . $task_name); } }else{ $this->checker1 = true; session()->put('error_class','error_class'); unlink(public_path('task\\') . $task_name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function step_3()\n {\n }", "private function task_1_correction($task_name)\n {\n \n require_once public_path('task\\\\') . $task_name;\n $newValue_of_task = explode('.',$task_name);\n \n if(class_exists($newValue_of_task[0])){\n $task = new $newValue_of_task[0];\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n if(method_exists($newValue_of_task[0], 'check_name')){\n\n $wrong = array();\n $wrong[0] = \"\";\n $wrong[1] = \"al\";\n $wrong[2] = \"asdryuimngyuioplkjhgd\";\n $wrong[3] = \"bassem55\";\n $wrong[4] = \"bassem reda\";\n $wrong[5] = \"<script>anything</script>\";\n $correct = array();\n $correct[0] = \"abanoub\";\n $correct[1] = \"ali\";\n $correct[2] = \"bassem\";\n\n $notes = array();\n\n $counter = 0;\n\n $degree = 0;\n\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_name($wrong[$i]) === \"wrong\")\n {\n $degree++;\n }\n else if($task->check_name($wrong[$i]) === \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_name($correct[$i]) === \"correct\")\n {\n $degree++;\n }\n else if($task->check_name($correct[$i]) === \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n\n\n }else{\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n\n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n \n }", "private function task_2_correction($task_name)\n {\n\n \n require_once public_path('task\\\\') . $task_name;\n $newValue_of_task = explode('.',$task_name);\n\n if(class_exists($newValue_of_task[0])){\n\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n\n if(method_exists($newValue_of_task[0], 'check_phonenumber')){\n if(session()->has('error_function')){\n session()->forget('error_function');\n }\n $task = new $newValue_of_task[0];\n $wrong = array();\n $wrong[0] = \"0120287465\";//10 \n $wrong[1] = \"012028736166\";//12\n $wrong[2] = \"012012\";//6\n $wrong[3] = \"01302873616\";//12 but start with 013\n $wrong[4] = \"01702873616\";//12 but start with 017\n $wrong[5] = \"012e45mu576\";//12 but contain characters\n $correct = array();\n $correct[0] = \"01201873616\";\n $correct[1] = \"01102764837\";\n $correct[2] = \"01098237673\";\n \n $degree = 0;\n $notes = array();\n $counter = 0;\n $degree = 0;\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_phonenumber($wrong[$i]) == \"wrong\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($wrong[$i]) == \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_phonenumber($correct[$i]) == \"correct\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($correct[$i]) == \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n }else{\n\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }//if class is exist or not\n \n }", "private function step3()\n {\n if ($this->RV == null) {\n return;\n }\n\n if ($this->suffix($this->RV, \"i\") && $this->suffixPreceded($this->RV, \"i\", \"c\")) {\n $this->CT = $this->removeSuffix($this->CT, \"i\");\n }\n }", "public function step_2()\n {\n }", "public function testTask2(){\n\n }", "public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-60*86400;\n $end_time = time();\n $teacher_test_per_list = $task->t_teacher_info->get_teacher_test_per_list($start_time,$end_time);\n foreach($teacher_test_per_list as &$item){\n $per = !empty($item[\"success_lesson\"])?round($item[\"order_number\"]/$item[\"success_lesson\"],2)*100:0;\n\n $task->t_teacher_info->field_update_list($item[\"teacherid\"],[\"test_transfor_per\"=>$per]);\n \n }\n\n //更新一月常规学生数\n $start_time = time()-30*86400;\n $ret= $task->t_teacher_info->tongji_teacher_stu_num_new($start_time,$end_time);\n foreach($ret as $v){\n $task->t_teacher_info->field_update_list($v[\"teacherid\"],[\n \"month_stu_num\" =>$v[\"stu_num\"] \n ]);\n\n }\n\n\n //更新两周试听课数\n $start_time = time()-14*86400;\n $list = $task->t_lesson_info_b2->get_test_lesson_num($start_time,$end_time);\n foreach($list as $val){\n $task->t_teacher_info->field_update_list($val[\"teacherid\"],[\n \"two_week_test_lesson_num\" =>$val[\"num\"] \n ]);\n }\n\n\n //每月1号至5号,更新沉睡老师信息\n $d = date(\"d\",time());\n if($d>=1 && $d <=5){\n $end_time = strtotime(date(\"Y-m-01\",time()));\n $start_time = strtotime(\"-3 month\",$end_time);\n $all_throuth_teacher = $task->t_teacher_info->get_all_train_through_teacher_list($start_time);\n $all_train_through_lesson_teacher= $task->t_teacher_info->get_all_train_through_lesson_teacher_list($start_time,$end_time);\n $no_lesson_tea_list=[];\n $lesson_tea_list=[];\n foreach($all_throuth_teacher as $k=>$v){\n if(!isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==0){\n $no_lesson_tea_list[$k]=$v[\"teacherid\"];\n }elseif(isset($all_train_through_lesson_teacher[$k]) && $v[\"sleep_flag\"]==1){\n $lesson_tea_list[$k]=$v[\"teacherid\"];\n }\n }\n\n foreach($no_lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>1 \n ]);\n }\n foreach($lesson_tea_list as $k=>$v){\n $task->t_teacher_info->field_update_list($k,[\n \"sleep_flag\" =>0\n ]);\n }\n\n }\n\n \n\n //dd($teacher_test_per_list);\n\n \n }", "public function pass_3()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_IF','T_FOR','T_FOREACH','T_ELSE','T_ELSEIF','T_WHILE','T_DO');\n\t\twhile($tp < $token_count) {\n\t\t\t$ct = $tokens[$tp];\n\t\t\tif(in_array($this->token_name($ct), $tokens_of_interest )){\n\t\t\t\twhile(in_array($token_name = $this->token_name($ct), $tokens_of_interest )) {\n\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\t\t\tif($this->token_name($tokens[$temp]) == '(') {\n\t\t\t\t\t\t$temp = $this->get_pair($tokens,$temp);\n\t\t\t\t\t\t$next = $this->get_next_non_comment($tokens,$temp+1);\n\t\t\t\t\t} else \n\t\t\t\t\t\t$next = $temp;\n\t\t\t\t\t$ct = $tokens[$next];\n\t\t\t\t\tif(!in_array($this->token_name($tokens[$next]), array('{',':',';'))) {\n\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($next,'{');\n\t\t\t\t\t\tif($token_name == 'T_IF') \n\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($this->get_if_end($tokens,$tp)+1,'}');\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($this->get_statement_end($tokens,$next)+1,'}');\n\n\t\t\t\t\t}\n\t\t\t\t\t$tp = $next;\n\t\t\t\t}\n\t\t\t} \n\t\t\t$tp++;\n\t\t}\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t}", "public function handle()\n {\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = strtotime(date(\"Y-m-01\",time()-86400));\n $end_time = strtotime(date(\"Y-m-01\",$start_time+40*86400));\n $ret_info =[];\n for($i=1;$i<11;$i++){\n $ret_info[$i]=[\"subject\"=>$i];\n }\n $interview_info=$task->t_teacher_lecture_info->get_interview_info_by_subject($start_time,$end_time);\n $order_info = $task->t_teacher_lecture_info->get_research_teacher_test_lesson_info_subject($start_time,$end_time);\n // $order_info = $task->t_teacher_lecture_info->get_interview_lesson_order_info_subject($start_time,$end_time);\n $first_info = $task->t_lesson_info->get_interview_teacher_first_lesson_info_subject($start_time,$end_time);\n $tea_list = $task->t_lesson_info->get_all_first_lesson_teacher_list($start_time,$end_time);\n $record_list = $task->t_teacher_record_list->get_teacher_record_num_list_subject($start_time,$end_time);\n $tea_arr=[];$record_info = [];\n foreach($tea_list as $k=>$val){\n if($val[\"add_time\"]>0){\n $tea_arr[] = $k;\n @$record_info[$val[\"subject\"]][\"num\"]++;\n @$record_info[$val[\"subject\"]][\"record_time\"] +=$val[\"add_time\"] - $val[\"lesson_start\"];\n }\n }\n $lesson_info = $task->t_lesson_info->get_teacher_arr_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $first_lesson_info = $task->t_lesson_info->get_teacher_arr_first_lesson_order_info_subject($start_time,$end_time,$tea_arr);\n $other_record_info = $task->t_seller_and_ass_record_list->get_seller_and_ass_record_by_subject($start_time,$end_time);\n $test_person_num= $task->t_lesson_info->get_test_person_num_list_by_subject( $start_time,$end_time);\n $test_person_num_other= $task->t_lesson_info->get_test_person_num_list_subject_other( $start_time,$end_time);\n $kk_test_person_num= $task->t_lesson_info->get_kk_teacher_test_person_subject_list( $start_time,$end_time);\n $change_test_person_num= $task->t_lesson_info->get_change_teacher_test_person_subject_list( $start_time,$end_time);\n\n\n\n $arr=[\"subject_str\"=>\"平均\",\"subject\"=>20];\n $zh = [\"subject_str\"=>\"综合学科\",\"subject\"=>21];\n $wz = [\"subject_str\"=>\"文科\",\"subject\"=>22];\n $xxk = [\"subject_str\"=>\"小学科\",\"subject\"=>23];\n $slh=[];\n foreach($ret_info as $k=>&$item){\n $item[\"interview_num\"] = @$interview_info[$k][\"interview_num\"];\n @$arr[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n $item[\"interview_time\"] = @$interview_info[$k][\"interview_time\"];\n @$arr[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n $item[\"interview_lesson\"] = @$order_info[$k][\"person_num\"];\n @$arr[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n $item[\"interview_order\"] = @$order_info[$k][\"order_num\"];\n @$arr[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n $item[\"record_time\"] = @$record_info[$k][\"record_time\"];\n @$arr[\"record_time\"] += @$record_info[$k][\"record_time\"];\n $item[\"record_num\"] = @$record_info[$k][\"num\"];\n @$arr[\"record_num\"] += @$record_info[$k][\"num\"];\n $item[\"first_lesson\"] = @$first_info[$k][\"person_num\"];\n @$arr[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n $item[\"first_order\"] = @$first_info[$k][\"order_num\"];\n @$arr[\"first_order\"] += @$first_info[$k][\"order_num\"];\n $item[\"next_lesson\"] = @$lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n $item[\"next_order\"] = @$lesson_info[$k][\"order_num\"];\n @$arr[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n $item[\"next_lesson_first\"] = @$first_lesson_info[$k][\"person_num\"];\n @$arr[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n $item[\"next_order_first\"] = @$first_lesson_info[$k][\"order_num\"];\n @$arr[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n $item[\"other_record_time\"] = @$other_record_info[$k][\"deal_time\"];\n @$arr[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n $item[\"other_record_num\"] = @$other_record_info[$k][\"num\"];\n @$arr[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n $item[\"lesson_num\"] = @$test_person_num[$k][\"lesson_num\"];\n $item[\"person_num\"] = @$test_person_num[$k][\"person_num\"];\n $item[\"have_order\"] = @$test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_other\"] = @$test_person_num_other[$k][\"lesson_num\"];\n $item[\"have_order_other\"] = @$test_person_num_other[$k][\"have_order\"];\n $item[\"lesson_num_kk\"] = @$kk_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_kk\"] = @$kk_test_person_num[$k][\"have_order\"];\n $item[\"lesson_num_change\"] = @$change_test_person_num[$k][\"lesson_num\"];\n $item[\"have_order_change\"] = @$change_test_person_num[$k][\"have_order\"];\n $item[\"record_num_all\"] = @$record_list[$k][\"num\"];\n @$arr[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n if($k==1 || $k==3){\n @$wz[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$wz[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$wz[\"interview_time\"] += $item[\"interview_time\"];\n @$wz[\"interview_num\"] += $item[\"interview_num\"];\n @$wz[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$wz[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$wz[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$wz[\"record_num\"] += @$record_info[$k][\"num\"];\n @$wz[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$wz[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$wz[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$wz[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$wz[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$wz[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$wz[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$wz[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$wz[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$wz[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$wz[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$wz[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$wz[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$wz[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$wz[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$wz[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n\n }else if($k>3){\n @$zh[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$zh[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$zh[\"interview_time\"] += $item[\"interview_time\"];\n @$zh[\"interview_num\"] += $item[\"interview_num\"];\n @$zh[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$zh[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$zh[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$zh[\"record_num\"] += @$record_info[$k][\"num\"];\n @$zh[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$zh[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$zh[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$zh[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$zh[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$zh[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$zh[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$zh[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$zh[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$zh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$zh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$zh[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$zh[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$zh[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$zh[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$zh[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k >5){\n @$xxk[\"interview_num\"] += @$interview_info[$k][\"interview_num\"];\n @$xxk[\"interview_time\"] += @$interview_info[$k][\"interview_time\"];\n @$xxk[\"interview_time\"] += $item[\"interview_time\"];\n @$xxk[\"interview_num\"] += $item[\"interview_num\"];\n @$xxk[\"interview_lesson\"] += @$order_info[$k][\"person_num\"];\n @$xxk[\"interview_order\"] += @$order_info[$k][\"order_num\"];\n @$xxk[\"record_time\"] += @$record_info[$k][\"record_time\"];\n @$xxk[\"record_num\"] += @$record_info[$k][\"num\"];\n @$xxk[\"first_lesson\"] += @$first_info[$k][\"person_num\"];\n @$xxk[\"first_order\"] += @$first_info[$k][\"order_num\"];\n @$xxk[\"next_lesson\"] += @$lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order\"] += @$lesson_info[$k][\"order_num\"];\n @$xxk[\"next_lesson_first\"] += @$first_lesson_info[$k][\"person_num\"];\n @$xxk[\"next_order_first\"] += @$first_lesson_info[$k][\"order_num\"];\n @$xxk[\"other_record_time\"] += @$other_record_info[$k][\"deal_time\"];\n @$xxk[\"other_record_num\"] += @$other_record_info[$k][\"num\"];\n @$xxk[\"lesson_num\"] += @$test_person_num[$k][\"lesson_num\"];\n @$xxk[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$xxk[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_other\"] += @$test_person_num_other[$k][\"lesson_num\"];\n @$xxk[\"have_order_other\"] += @$test_person_num_other[$k][\"have_order\"];\n @$xxk[\"lesson_num_kk\"] += @$kk_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_kk\"] += @$kk_test_person_num[$k][\"have_order\"];\n @$xxk[\"lesson_num_change\"] += @$change_test_person_num[$k][\"lesson_num\"];\n @$xxk[\"have_order_change\"] += @$change_test_person_num[$k][\"have_order\"];\n @$xxk[\"record_num_all\"] += @$record_list[$k][\"num\"];\n\n }\n if($k<4){\n @$slh[\"person_num\"] += @$test_person_num[$k][\"person_num\"];\n @$slh[\"have_order\"] += @$test_person_num[$k][\"have_order\"];\n }\n $item[\"subject_str\"] = E\\Esubject::get_desc($item[\"subject\"]);\n }\n $slh_per = !empty($slh[\"person_num\"])?round(@$slh[\"have_order\"]/$slh[\"person_num\"],4)*100:0;\n\n $test_person_num_all= $task->t_lesson_info->get_test_person_num_list_by_subject_grade( $start_time,$end_time);\n $test_person_num_other_all= $task->t_lesson_info->get_test_person_num_list_subject_grade_other( $start_time,$end_time);\n $kk_test_person_num_all= $task->t_lesson_info->get_kk_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $change_test_person_num_all= $task->t_lesson_info->get_change_teacher_test_person_subject_grade_list( $start_time,$end_time);\n $arr[\"lesson_num\"] = $test_person_num_all[\"lesson_num\"];\n $arr[\"have_order\"] = @$test_person_num_all[\"have_order\"];\n $arr[\"lesson_per\"] = !empty($test_person_num_all[\"person_num\"])?round(@$test_person_num_all[\"have_order\"]/$test_person_num_all[\"person_num\"],4)*100:0;\n $arr[\"lesson_per_other\"] = !empty($test_person_num_other_all[\"lesson_num\"])?round($test_person_num_other_all[\"have_order\"]/$test_person_num_other_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_kk\"] = !empty($kk_test_person_num_all[\"lesson_num\"])?round($kk_test_person_num_all[\"have_order\"]/$kk_test_person_num_all[\"lesson_num\"],4)*100:0;\n $arr[\"lesson_per_change\"] = !empty($change_test_person_num_all[\"lesson_num\"])?round($change_test_person_num_all[\"have_order\"]/$change_test_person_num_all[\"lesson_num\"],4)*100:0;\n\n array_unshift($ret_info,$xxk);\n array_unshift($ret_info,$zh);\n array_unshift($ret_info,$wz);\n array_unshift($ret_info,$arr);\n foreach($ret_info as &$vvv){\n $vvv[\"interview_time_avg\"] = !empty($vvv[\"interview_num\"])?round($vvv[\"interview_time\"]/$vvv[\"interview_num\"]/86400,2):0;\n $vvv[\"record_time_avg\"] = !empty($vvv[\"record_num\"])?round($vvv[\"record_time\"]/$vvv[\"record_num\"]/3600,2):0;\n $vvv[\"other_record_time_avg\"] = !empty($vvv[\"other_record_num\"])?round($vvv[\"other_record_time\"]/$vvv[\"other_record_num\"]/3600,2):0;\n $vvv[\"interview_per\"] = !empty($vvv[\"interview_lesson\"])?round(@$vvv[\"interview_order\"]/$vvv[\"interview_lesson\"],4)*100:0;\n $vvv[\"first_per\"] = !empty($vvv[\"first_lesson\"])?round(@$vvv[\"first_order\"]/$vvv[\"first_lesson\"],4)*100:0;\n $vvv[\"next_per\"] = !empty($vvv[\"next_lesson\"])?round(@$vvv[\"next_order\"]/$vvv[\"next_lesson\"],4)*100:0;\n $vvv[\"first_next_per\"] = !empty($vvv[\"next_lesson_first\"])?round(@$vvv[\"next_order_first\"]/$vvv[\"next_lesson_first\"],4)*100:0;\n $vvv[\"add_per\"] = round($vvv[\"next_per\"]-$vvv[\"first_next_per\"],2);\n if($vvv[\"subject_str\"] !=\"平均\"){ \n $vvv[\"lesson_per\"] = !empty($vvv[\"person_num\"])?round(@$vvv[\"have_order\"]/$vvv[\"person_num\"],4)*100:0;\n $vvv[\"lesson_per_other\"] = !empty($vvv[\"lesson_num_other\"])?round(@$vvv[\"have_order_other\"]/$vvv[\"lesson_num_other\"],4)*100:0;\n $vvv[\"lesson_per_kk\"] = !empty($vvv[\"lesson_num_kk\"])?round(@$vvv[\"have_order_kk\"]/$vvv[\"lesson_num_kk\"],4)*100:0;\n $vvv[\"lesson_per_change\"] = !empty($vvv[\"lesson_num_change\"])?round(@$vvv[\"have_order_change\"]/$vvv[\"lesson_num_change\"],4)*100:0;\n\n }else{\n $vvv[\"record_num_all\"] = $vvv[\"record_num_all\"]/3;\n }\n\n $vvv[\"lesson_num_per\"] = !empty($arr[\"lesson_num\"])?round(@$vvv[\"lesson_num\"]/$arr[\"lesson_num\"],4)*100:0;\n foreach($vvv as &$vvvv){\n if(empty($vvvv)){\n $vvvv=0;\n }\n } \n\n }\n\n $data=[];\n foreach($ret_info as $kk=>$gg){\n $data[$gg[\"subject\"]] = $gg;\n if($gg[\"subject\"]==2){\n $data[24] = $gg; \n }\n } \n\n $avg = [];\n $interview_time_standard=3;\n $record_time_standard=4;\n $other_record_time_standard=1;\n $add_per_standard=3;\n $research_num= $task->t_manager_info->get_adminid_num_by_account_role(4);\n $res= $ret_info; \n $person_arr = $list_arr=[];\n foreach($res as $kk=>&$vv){\n if(in_array($vv[\"subject\"],[4,5,6,7,8,9,10,21,23])){\n $interview_per_standard = 23;\n $first_per_standard = 20;\n $lesson_per_standard = 22;\n $lesson_per_other_standard = 75;\n $lesson_per_kk_standard = 75;\n $lesson_per_change_standard = 75;\n }else{\n $interview_per_standard = 18;\n $first_per_standard = 15;\n $lesson_per_standard = 17;\n $lesson_per_other_standard = 70;\n $lesson_per_kk_standard = 70;\n $lesson_per_change_standard = 70;\n }\n $vv[\"interview_per_range\"] = $vv[\"interview_per\"]- $interview_per_standard;\n $vv[\"first_per_range\"] = $vv[\"first_per\"]- $first_per_standard;\n $vv[\"lesson_per_range\"] = $vv[\"lesson_per\"]- $lesson_per_standard;\n $vv[\"lesson_per_other_range\"] = $vv[\"lesson_per_other\"]- $lesson_per_other_standard;\n $vv[\"lesson_per_kk_range\"] = $vv[\"lesson_per_kk\"]- $lesson_per_kk_standard;\n $vv[\"lesson_per_change_range\"] = $vv[\"lesson_per_change\"]- $lesson_per_change_standard;\n if(in_array($vv[\"subject\"],[1,2,3,4,5,23])){\n $person_arr[$kk] = $vv;\n }\n if(in_array($vv[\"subject\"],[2,21,22])){\n $list_arr[$kk]= $vv;\n }\n }\n\n foreach($res as $k=>$v){\n if($v[\"subject_str\"]==\"平均\"){\n $avg = $res[$k];\n unset($res[$k]);\n }\n }\n $record_num_standard = round($avg[\"lesson_num\"]/$research_num,1);\n $interview_time_person = $person_arr;\n foreach($interview_time_person as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_person[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_person,\"interview_time_avg\", 1);\n $interview_time_first_person = @$interview_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"interview_per_range\", 0);\n $interview_per_first_person = @$person_arr[0][\"subject\"];\n $record_time_person = $person_arr;\n foreach( $record_time_person as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_person,\"record_time_avg\", 1);\n $record_time_first_person = @$record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"record_num_all\", 0);\n $record_num_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"first_per_range\", 0);\n $first_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"add_per\", 0);\n $add_per_first_person = @$person_arr[0][\"subject\"];\n $other_record_time_person =$person_arr;\n foreach( $other_record_time_person as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_person[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_person,\"other_record_time_avg\", 1);\n $other_record_time_first_person = @$other_record_time_person[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_range\", 0);\n $lesson_per_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($person_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_person = @$person_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $person_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_person = @$person_arr[0][\"subject\"];\n\n foreach($person_arr as $u){\n $person= $u[\"subject\"];\n if($person==$interview_time_first_person){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$person][\"interview_time_score\"] = 5;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$person][\"interview_time_score\"] = 3;\n }else{\n $data[$person][\"interview_time_score\"] = 1;\n }\n\n }\n if($person==$interview_per_first_person){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$person][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$person][\"interview_per_score\"] = 10;\n }else{\n $data[$person][\"interview_per_score\"] = 5;\n }\n\n }\n if($person==$record_time_first_person){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$person][\"record_time_score\"] = 5;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$person][\"record_time_score\"] = 3;\n }else{\n $data[$person][\"record_time_score\"] = 1;\n }\n\n }\n\n if($person==$record_num_first_person){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$person][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$person][\"record_num_score\"] = 3;\n }else{\n $data[$person][\"record_num_score\"] = 1;\n }\n\n }\n\n if($person==$first_per_first_person){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$person][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$person][\"first_per_score\"] = 3;\n }else{\n $data[$person][\"first_per_score\"] = 1;\n }\n\n }\n if($person==$add_per_first_person){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$person][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$person][\"add_per_score\"] = 3;\n }else{\n $data[$person][\"add_per_score\"] = 1;\n }\n\n }\n\n if($person==$other_record_time_first_person){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$person][\"other_record_time_score\"] = 5;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$person][\"other_record_time_score\"] = 3;\n }else{\n $data[$person][\"other_record_time_score\"] = 1;\n }\n\n }\n if($person==$lesson_per_first_person){\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"] && $u[\"lesson_per_range\"]>=0){\n $data[$person][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"]=5;\n }\n }else{\n if($u[\"lesson_per\"] >=$avg[\"lesson_per\"]){\n $data[$person][\"lesson_per_score\"] = 10;\n }else{\n $data[$person][\"lesson_per_score\"] = 5;\n }\n\n }\n if($person==$lesson_per_other_first_person){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$person][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$person][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_kk_first_person){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$person][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$person][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($person==$lesson_per_change_first_person){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$person][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$person][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$person][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$person][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$person][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$person][\"lesson_num_per_score\"]=1;\n }else{\n $data[$person][\"lesson_num_per_score\"]=0;\n }\n\n\n $data[$person][\"subject_str\"] = $u[\"subject_str\"];\n\n }\n\n $interview_time_list = $list_arr;\n foreach($interview_time_list as $k=>$v){\n if($v[\"interview_time_avg\"]==0){\n unset($interview_time_list[$k]);\n }\n }\n\n \\App\\Helper\\Utils::order_list( $interview_time_list,\"interview_time_avg\", 1);\n $interview_time_first_list = @$interview_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"interview_per_range\", 0);\n $interview_per_first_list = @$list_arr[0][\"subject\"];\n $record_time_list = $list_arr;\n foreach( $record_time_list as $k=>$v){\n if($v[\"record_time_avg\"]==0){\n unset( $record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $record_time_list,\"record_time_avg\", 1);\n $record_time_first_list = @$record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"record_num_all\", 0);\n $record_num_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"first_per_range\", 0);\n $first_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"add_per\", 0);\n $add_per_first_list = @$list_arr[0][\"subject\"];\n $other_record_time_list =$list_arr;\n foreach( $other_record_time_list as $k=>$v){\n if($v[\"other_record_time_avg\"]==0){\n unset( $other_record_time_list[$k]);\n }\n }\n \\App\\Helper\\Utils::order_list( $other_record_time_list,\"other_record_time_avg\", 1);\n $other_record_time_first_list = @$other_record_time_list[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_num_per\", 0);\n $lesson_num_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_range\", 0);\n $lesson_per_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_other_range\", 0);\n $lesson_per_other_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list($list_arr,\"lesson_per_kk_range\", 0);\n $lesson_per_kk_first_list = @$list_arr[0][\"subject\"];\n \\App\\Helper\\Utils::order_list( $list_arr,\"lesson_per_change_range\", 0);\n $lesson_per_change_first_list = @$list_arr[0][\"subject\"];\n\n foreach($list_arr as $u){\n $list= $u[\"subject\"];\n if($list==2){\n $list=24;\n }\n if($list==$interview_time_first_list){\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard){\n $data[$list][\"interview_time_score\"] = 5;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n }else{\n if($u[\"interview_time_avg\"] <=$avg[\"interview_time_avg\"] && $u[\"interview_time_avg\"]<=$interview_time_standard && $u[\"interview_time_avg\"] !=0){\n $data[$list][\"interview_time_score\"] = 3;\n }else{\n $data[$list][\"interview_time_score\"] = 1;\n }\n\n }\n if($list==$interview_per_first_list){\n if($u[\"interview_per\"] >=$avg[\"interview_per\"] && $u[\"interview_per_range\"]>=0){\n $data[$list][\"interview_per_score\"] = 15;\n }else if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"]=5;\n }\n }else{\n if($u[\"interview_per\"] >=$avg[\"interview_per\"]){\n $data[$list][\"interview_per_score\"] = 10;\n }else{\n $data[$list][\"interview_per_score\"] = 5;\n }\n\n }\n if($list==$record_time_first_list){\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard){\n $data[$list][\"record_time_score\"] = 5;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n }else{\n if($u[\"record_time_avg\"] <=$avg[\"record_time_avg\"] && $u[\"record_time_avg\"]<=$record_time_standard && $u[\"record_time_avg\"] !=0){\n $data[$list][\"record_time_score\"] = 3;\n }else{\n $data[$list][\"record_time_score\"] = 1;\n }\n\n }\n\n if($list==$record_num_first_list){\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] && $u[\"record_num_all\"]>=$record_num_standard){\n $data[$list][\"record_num_score\"] = 5;\n }else if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"]=1;\n }\n }else{\n if($u[\"record_num_all\"] >=$avg[\"record_num_all\"] ){\n $data[$list][\"record_num_score\"] = 3;\n }else{\n $data[$list][\"record_num_score\"] = 1;\n }\n\n }\n\n if($list==$first_per_first_list){\n if($u[\"first_per\"] >=$avg[\"first_per\"] && $u[\"first_per_range\"]>=0){\n $data[$list][\"first_per_score\"] = 5;\n }else if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"]=1;\n }\n }else{\n if($u[\"first_per\"] >=$avg[\"first_per\"]){\n $data[$list][\"first_per_score\"] = 3;\n }else{\n $data[$list][\"first_per_score\"] = 1;\n }\n\n }\n if($list==$add_per_first_list){\n if($u[\"add_per\"] >=$avg[\"add_per\"] && $u[\"add_per\"]>=$add_per_standard){\n $data[$list][\"add_per_score\"] = 5;\n }else if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"]=1;\n }\n }else{\n if($u[\"add_per\"] >=$avg[\"add_per\"] ){\n $data[$list][\"add_per_score\"] = 3;\n }else{\n $data[$list][\"add_per_score\"] = 1;\n }\n\n }\n\n if($list==$other_record_time_first_list){\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard){\n $data[$list][\"other_record_time_score\"] = 5;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n }else{\n if($u[\"other_record_time_avg\"] <=$avg[\"other_record_time_avg\"] && $u[\"other_record_time_avg\"]<=$other_record_time_standard && $u[\"other_record_time_avg\"] !=0){\n $data[$list][\"other_record_time_score\"] = 3;\n }else{\n $data[$list][\"other_record_time_score\"] = 1;\n }\n\n }\n if($list==$lesson_per_first_list){\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5) && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per && $u[\"lesson_per_range\"]>=0){\n $data[$list][\"lesson_per_score\"] = 15;\n }else if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n }else{\n if($list==21){\n if($u[\"lesson_per\"] >=($slh_per+5)){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n \n }else{\n if($u[\"lesson_per\"] >=$slh_per){\n $data[$list][\"lesson_per_score\"] = 10;\n }else{\n $data[$list][\"lesson_per_score\"]=5;\n }\n }\n\n }\n if($list==$lesson_per_other_first_list){\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"] && $u[\"lesson_per_other_range\"]>=0){\n $data[$list][\"lesson_per_other_score\"] = 5;\n }else if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_other\"] >=$avg[\"lesson_per_other\"]){\n $data[$list][\"lesson_per_other_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_other_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_kk_first_list){\n if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"] && $u[\"lesson_per_kk_range\"]>=0){\n $data[$list][\"lesson_per_kk_score\"] = 5;\n }else if($u[\"lesson_per_kk\"] >=$avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_kk\"] >= $avg[\"lesson_per_kk\"]){\n $data[$list][\"lesson_per_kk_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_kk_score\"] = 1;\n }\n\n }\n\n if($list==$lesson_per_change_first_list){\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"] && $u[\"lesson_per_change_range\"]>=0){\n $data[$list][\"lesson_per_change_score\"] = 5;\n }else if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"]=1;\n }\n }else{\n if($u[\"lesson_per_change\"] >=$avg[\"lesson_per_change\"]){\n $data[$list][\"lesson_per_change_score\"] = 3;\n }else{\n $data[$list][\"lesson_per_change_score\"] = 1;\n }\n\n }\n \n if($u[\"lesson_num_per\"]>=30){\n $data[$list][\"lesson_num_per_score\"]=5;\n }else if($u[\"lesson_num_per\"]>=20){\n $data[$list][\"lesson_num_per_score\"]=3;\n }else if($u[\"lesson_num_per\"]>=10){\n $data[$list][\"lesson_num_per_score\"]=1;\n }else{\n $data[$list][\"lesson_num_per_score\"]=0;\n }\n\n\n\n }\n \n foreach($data as $o=>&$q){\n if(isset($q[\"interview_time_score\"])){ \n $q[\"total_score\"] = $q[\"interview_time_score\"]+$q[\"interview_per_score\"]+$q[\"record_time_score\"]+$q[\"record_num_score\"]+$q[\"first_per_score\"]+$q[\"add_per_score\"]+$q[\"other_record_time_score\"]+$q[\"lesson_per_score\"]+$q[\"lesson_per_other_score\"]+$q[\"lesson_per_kk_score\"]+$q[\"lesson_per_change_score\"]+$q[\"lesson_num_per_score\"];\n }\n $kid= $o;\n $check = $task->t_research_teacher_kpi_info->get_type_flag($kid,$start_time);\n if($check>0){\n $task->t_research_teacher_kpi_info->field_update_list_2($kid,$start_time,[\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"],\n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }else{\n $task->t_research_teacher_kpi_info->row_insert([\n \"kid\" =>$kid,\n \"month\" =>$start_time,\n \"type_flag\" =>2,\n \"name\" =>$q[\"subject_str\"],\n \"interview_time\" =>$q[\"interview_time_avg\"],\n \"interview_lesson\" =>$q[\"interview_lesson\"],\n \"interview_order\" =>$q[\"interview_order\"],\n \"interview_per\" =>$q[\"interview_per\"],\n \"record_time\" =>$q[\"record_time_avg\"],\n \"record_num\" =>$q[\"record_num_all\"],\n \"first_lesson\" =>$q[\"first_lesson\"],\n \"first_order\" =>$q[\"first_order\"],\n \"first_per\" =>$q[\"first_per\"],\n \"first_next_per\" =>$q[\"first_next_per\"],\n \"next_per\" =>$q[\"next_per\"],\n \"add_per\" =>$q[\"add_per\"],\n \"other_record_time\" =>$q[\"other_record_time_avg\"],\n \"lesson_num\" =>$q[\"lesson_num\"],\n \"lesson_num_per\" =>$q[\"lesson_num_per\"],\n \"lesson_per\" =>$q[\"lesson_per\"],\n \"lesson_per_other\" =>$q[\"lesson_per_other\"],\n \"lesson_per_kk\" =>$q[\"lesson_per_kk\"],\n \"lesson_per_change\" =>$q[\"lesson_per_change\"],\n \"interview_time_score\" =>@$q[\"interview_time_score\"],\n \"interview_per_score\" =>@$q[\"interview_per_score\"],\n \"record_time_score\" =>@$q[\"record_time_score\"],\n \"record_num_score\" =>@$q[\"record_num_score\"],\n \"first_per_score\" =>@$q[\"first_per_score\"],\n \"add_per_score\" =>@$q[\"add_per_score\"],\n \"other_record_time_score\"=>@$q[\"other_record_time_score\"],\n \"lesson_num_per_score\" =>@$q[\"lesson_num_per_score\"],\n \"lesson_per_score\" =>@$q[\"lesson_per_score\"],\n \"lesson_per_other_score\" =>@$q[\"lesson_per_other_score\"],\n \"lesson_per_kk_score\" =>@$q[\"lesson_per_kk_score\"],\n \"lesson_per_change_score\"=>@$q[\"lesson_per_change_score\"], \n \"total_score\" =>@$q[\"total_score\"]\n ]);\n }\n\n }\n \n \n\n \n\n \n }", "public function step_1()\n {\n }", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "public function testUpdateTask()\n {\n }", "public function testTask1(){\n\n }", "function doTaskA(){\n echo \"Step A Done<br>\";\n}", "public function task3()\n {\n function solution($N) {\n $count = strlen($N);\n\n if ($count > 1) {\n $number = '1';\n for ($i = 1; $i < $count; $i++) {\n $number .= '0';\n }\n\n return intval($number);\n }\n\n return 0;\n }\n\n $N = 125123;\n// $N = 10;\n// $N = 2;\n\n dd($N, solution($N));\n }", "private function upgradeMismatchedTaskCount(): void\n {\n $new_options = [];\n $old_options = Option::getOptions();\n $legacy_tasks = $this->getLegacyOptions();\n foreach ($old_options as $option_key => $task) {\n $models = \\array_map(static function (UpgradeModel $model): string {\n return Option::getOptionKey($model);\n }, $this->models);\n if (!$models) {\n continue;\n }\n $key = \\array_search($option_key, $models, true);\n if ($key === false) {\n $legacy_tasks[$option_key] = $task;\n unset($old_options[$option_key]);\n continue;\n }\n $new_options[$option_key] = $task;\n }\n Option::updateOption($new_options);\n \\update_option(self::OPTION_NAME, $legacy_tasks, false);\n unset($new_options, $old_options, $legacy_tasks); // Memory cleanup\n \\wp_safe_redirect(\\remove_query_arg(self::NONCE_NAME));\n exit;\n }", "public function testUpdateTaskInstanceVariable()\n {\n }", "private function _step():void\n\t{\n\t\t$task= array_shift( $this->_queue );\n\t\t\n\t\t$this->_runTask( $task );\n\t}", "public function execute()\n\t{\n\t\tChangeProject::getInstance()->executeTask('cd');\n\t\tChangeProject::getInstance()->executeTask('gdb');\n\t\tChangeProject::getInstance()->executeTask('ci18n', array('markergmaps'));\n\t\tChangeProject::getInstance()->executeTask('cb');\n\t\tChangeProject::getInstance()->executeTask('cec');\n\t\tChangeProject::getInstance()->executeTask('croles');\n\t\tChangeProject::getInstance()->executeTask('cperm');\n\t\tChangeProject::getInstance()->executeTask('import-data', array('markergmaps', 'init.xml'));\n\t}", "function check_if_python_end($details_obj){\n\t\tif (file_exists($details_obj->project->outputPython.'\\\\markers\\\\learner_phase_file')){\n\t\t\t$details_obj->project = update_project_list($details_obj->project,\"end_offline\",true);\n\t\t\tupdate_project_details($details_obj->project);\n\t\t\tmove_to_online_task($details_obj);\n\t\t}else {\n\t\t\t$err_f = $details_obj->project->outputPython.'\\\\markers\\\\error_file';\n\t\t\tif (file_exists($err_f)){\n\t\t\t\t$details_obj->project->problem = true;\n\t\t\t\tupdate_project_details($details_obj->project);\n\t\t\t}else {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t}\n\t}", "public function after_run(){}", "function main_autoFix($resultArray)\t{\n\t\tforeach($resultArray['deleteMe'] as $uid)\t{\n\t\t\techo 'Deleting \"tt_content:'.$uid.'\": ';\n\t\t\tif ($bypass = $this->cli_noExecutionCheck('tt_content:'.$uid))\t{\n\t\t\t\techo $bypass;\n\t\t\t} else {\n\n\t\t\t\t\t// Execute CMD array:\n\t\t\t\t$tce = t3lib_div::makeInstance('t3lib_TCEmain');\n\t\t\t\t$tce->stripslashes_values = FALSE;\n\t\t\t\t$tce->start(array(),array());\n\t\t\t\t$tce->deleteAction('tt_content', $uid);\n\n\t\t\t\t\t// Return errors if any:\n\t\t\t\tif (count($tce->errorLog))\t{\n\t\t\t\t\techo '\tERROR from \"TCEmain\":'.chr(10).'TCEmain:'.implode(chr(10).'TCEmain:',$tce->errorLog);\n\t\t\t\t} else echo 'DONE';\n\t\t\t}\n\t\t\techo chr(10);\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 test_all() {\n $obj = new My_task;\n \n echo \"Start test_reverse() <br>\";\n $obj->test_reverse();\n echo \"<br><br>\";\n \n echo \"Start test_is_palindrome() <br>\";\n $obj->test_is_palindrome();\n echo \"<br><br>\";\n \n echo \"Start test_encryption() <br>\";\n $obj->test_encryption(); \n echo \"<br><br>\";\n }", "public function pass_2()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_IF','T_FOR','T_FOREACH','T_ELSE','T_ELSEIF','T_WHILE','T_SWITCH');\n\t\t$tokens_of_interest_1 = array('T_ENDIF','T_ENDWHILE','T_ENDFOR','T_ENDSWITCH');\n\t\twhile($tp < $token_count) {\n\t\t\tif(in_array($token_name = $this->token_name($tokens[$tp]), $tokens_of_interest )){\n\t\t\t\tif($token_name == 'T_DO') {\n\n\t\t\t\t} else {\n\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\t\t\tif($this->token_name($tokens[$temp]) == '(') {\n\t\t\t\t\t\t\t$temp = $this->get_pair($tokens,$temp);\n\t\t\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$temp+1);\n\t\t\t\t\t\t} \t\n\t\t\t\t\t\tif($this->token_name($tokens[$temp]) == ':') {\n\t\t\t\t\t\t\t$this->add_tokens_to_be_replaced($temp,'{');\n\t\t\t\t\t\t\tif($token_name == 'T_ELSEIF' || $token_name == 'T_ELSE') {\n\t\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($tp,'}');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif(in_array($token_name,$tokens_of_interest_1)) {\n\t\t\t\t$this->add_tokens_to_be_replaced($tp,'}');\n\t\t\t\t$this->add_tokens_to_be_replaced($this->get_next_non_comment($tokens,$tp+1),' ');\n\t\t\t} elseif($token_name == 'T_CASE' || $token_name == 'T_DEFAULT') {\n\t\t\t\t//jump over the ternary operators to get the last colon\n\t\t\t\tif($this->search_token($tokens,$tp,'?',array(';'))) {\n\t\t\t\twhile($tmp = $this->search_token($tokens,$tp,'?',array(';'))) $tp = $tmp+1;\n\t\t\t\tif($tmp = $this->search_token($tokens,$tp,':',array(';'))) $tp = $tmp+1;\n\t\t\t\t}\n\t\t\t\tif($temp = $this->search_token($tokens,$tp,':',array(';'))) {\n\t\t\t\t\t$this->add_tokens_to_be_replaced($temp ,';');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tp++;\n\t\t}\n\t\t\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t}", "public function run()\n {\n $task_id = \\App\\Task::where('name','=','Pay the Electricity Bill')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.uswitch.com/gas-electricity/guides/assets/images/gas-electricity/guides/energy-guides/electricity-comparison.jpg',\n 'comment' =>'On May 20th I need to pay the electricity bill. I will pay it online\n to avoid problems',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Go to the Dentist')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.cfah.org/images/features/V5I3DentalCare.jpg',\n 'comment' =>'On May 29th I have an appointment with th dentist. I will get several\n cavities removed',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Finish P4')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'I have to finish Project 4 by May 4th. I will be a joy to complete it',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Buy mom a present')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'http://www.sovereigngrace.net/Art/Complete280.png',\n 'comment' =>'Moms birthday is coming up. I have to make sure I buy her\n a very nice present. Pereferable some jewelry',\n 'task_id' => $task_id,\n\n ]);\n\n $task_id = \\App\\Task::where('name','=','Book a Flight for Cancun')->pluck('id')->first();\n DB::table ('details')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'url_to_picture' => 'https://aquaworld.com.mx/en/wp-content/uploads/sites/2/2015/09/healthy-trip-to-cancun.jpg',\n 'comment' =>'Due to our two year anniversary, I have to book a flight to Cancun\n for my girlfriend and I.',\n 'task_id' => $task_id,\n\n ]);\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $date_week = \\App\\Helper\\Utils::get_week_range(time(),1);\n $lstart = $date_week[\"sdate\"];\n $lend = $date_week[\"edate\"];\n $lstart_next = $date_week[\"sdate\"]+7*86400;\n $lend_next = $date_week[\"edate\"]+7*86400;\n\n $teacher_arr = $task->t_teacher_info->get_limit_lesson_num_change_list();\n // dd($teacher_arr);\n foreach($teacher_arr as $item){\n $teacherid = $item[\"teacherid\"];\n $week_num= $item[\"limit_week_lesson_num\"];\n $test_lesson_num = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart,$lend);\n $test_lesson_num_next = $task->t_lesson_info->get_limit_type_teacher_lesson_num($teacherid,$lstart_next,$lend_next);\n //dd($test_lesson_num_next);\n if($test_lesson_num >= $week_num && $test_lesson_num_next >= $week_num){\n $task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优面试组\",\"周试听课排课数量满额通知\",\"Erick老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n $task->t_manager_info->send_wx_todo_msg_by_adminid (448,\"理优面试组\",\"周试听课排课数量满额通知\",\"rolon老师你好,\".$item[\"realname\"].\"老师一周试听课限制排\".$week_num.\"节,本周以及下周排课已满,请确认!\",\"\");\n\n \n }\n }\n \n \n \n\n }", "final function whatIsGood() {\n echo \"Running is good <br>\";\n }", "function myPear_update33(){\n\n // Create a second column for the variables value\n if (!myPear_db()->columnExists('var_value2','zzz_variables')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_variables` ADD `var_value2` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `var_value`\",True); \n }\n\n if (cnf_CLI) return;\n\n //\n // Clean or just remove the ghost taskManager records\n //\n $taskManager_args = array('class',\n\t\t\t 'function',\n\t\t\t 'args',\n\t\t\t );\n if (!cnf_dev){\n // remove\n myPear_db()->qquery(\"DELETE FROM zzz_variables WHERE var_name REGEXP 'taskManager_'\",True);\n }else{\n // clean \n ini_set(\"memory_limit\", \"-1\");\n set_time_limit(0);\n \n $limit = 999;\n $offset= 0;\n $dejavu = array();\n while(True){\n // b_debug::xxx(\"========================================================== $offset\");\n $q = myPear_db()->qquery(\"SELECT * FROM `zzz_variables` WHERE var_name REGEXP 'taskManager_task' AND var_value2 IS NULL LIMIT $limit OFFSET $offset\",True);\n // $offset += $limit;\n if (!myPear_db()->num_rows($q)) break;\n $todrop = array();\n while($r = myPear_db()->next_record($q)){\n\t$var_value = b_fmt::safe_decode($r['var_value']);\n\t$var_value2= b_fmt::safe_decode($r['var_value2']);\n\tif (empty($var_value2)) $var_value2 = array();\n\tforeach(array_diff(array_keys($var_value),$taskManager_args) as $k){\n\t $var_value2[$k] = $var_value[$k];\n\t unset($var_value[$k]);\n\t}\n\tksort($var_value);\n\tksort($var_value2);\n\tb_debug::xxx(array_keys($var_value2));\n\tif (empty($dejavu[serialize($var_value)])){\n\t $dejavu[serialize($var_value)] = $r['var_name'];\n\t myPear_db()->qquery(sprintf(\"UPDATE zzz_variables SET %s,%s WHERE %s='%s'\",\n\t\t\t\t myPear_db()->quote(serialize($var_value), 1,'var_value'),\n\t\t\t\t myPear_db()->quote(serialize($var_value2),1,'var_value2'),\n\t\t\t\t 'var_name',$r['var_name']),\n\t\t\t True);\n\t}else{\n\t $todrop[] = $r['var_name'];\n\t}\n }\n foreach($todrop as $var_name) myPear_db()->qquery(\"DELETE FROM zzz_variables WHERE var_name = '$var_name'\",True);\n }\n }\n}", "public static function handle_tasks()\n {\n\t $granularity = (int)get_site_preference('pseudocron_granularity',60);\n\t $last_check = get_site_preference('pseudocron_lastrun',0);\n\t if( (time() - $granularity * 60) >= $last_check )\n\t\t {\n\t\t\t // 1. Get Task objects.\n\t\t\t self::get_tasks();\n\t\n\t\t\t // 2. Evaluate Tasks\n\t\t\t self::execute();\n\t\n\t\t\t // 3. Cleanup to minimize memory usage\n\t\t\t self::cleanup();\n\n\t\t\t // 4. Say we've done a check\n\t\t\t set_site_preference('pseudocron_lastrun',time());\n\t\t }\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 function taskA()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task A\n Performance::finish();\n }", "public function taskB()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task B\n Performance::finish();\n }", "private static function cleanup()\n {\n // we don't need the tasks in memory any more.\n self::$_tasks = '';\n }", "public function handle()\n {\n //\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n $start_time = time()-7*86400;\n $end_time = time();\n $start = date(\"Y-m-d H:i:s\",$start_time);\n $end = date(\"Y-m-d H:i:s\",$end_time);\n $res = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time);\n $video_succ = $task->t_teacher_lecture_info->get_lecture_info_by_subject_new($start_time,$end_time,1);\n $one = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,-1);\n $one_succ = $task->t_teacher_record_list->get_all_interview_count_by_subject($start_time,$end_time,1); \n $all=0;$suc=0;$all_time=0;$video_num=0; \n foreach($res as $k=>&$v){\n $all +=$v[\"all_count\"];\n $all_time +=$v[\"time_count\"];\n $video_num +=$v[\"all_count\"];\n $v[\"video_num\"] = $v[\"all_count\"];\n }\n foreach($video_succ as $item){\n $suc += $item[\"all_count\"];\n }\n foreach($one as $k=>&$vv){\n $all +=$vv[\"all_count\"];\n if(isset($res[$k])){\n $res[$k][\"all_count\"] += $vv[\"all_count\"];\n }else{\n $vv[\"video_num\"]=0;\n $vv[\"time_count\"]=0;\n $res[$k] = $vv;\n }\n }\n foreach($one_succ as $k=>&$vvv){\n $suc +=$vvv[\"all_count\"];\n if(isset($video_succ[$k])){\n $video_succ[$k][\"all_count\"] += $vvv[\"all_count\"];\n }else{\n $video_succ[$k] = $vvv;\n }\n\n }\n\n \n $ave_per = $all==0?0:(round($suc/$all,2)*100).\"%\";\n $ave_time = $all==0?0:round($all_time/$video_num/86400,1);\n $subject_info =\"\";\n foreach($res as $p){\n $subject = $p[\"subject\"];\n $subject_str = E\\Esubject::get_desc($subject);\n $pass_per = (round(@$video_succ[$subject][\"all_count\"]/$p[\"all_count\"],2)*100).\"%\";\n $sub_ave_time = !empty($p[\"video_num\"])?round($p[\"time_count\"]/$p[\"video_num\"]/86400,1):0;\n $subject_info .= $subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天;\";\n $tea_arr =$task->get_admin_group_subject_list($subject);\n //$tea_arr=[];\n $tea_arr[72]=\"Erick\";\n $tea_arr[448]=\"rolon\";\n $tea_arr[349]=\"Jack\";\n // $tea_arr=[\"349\"=>\"Jack\"];\n foreach($tea_arr as $k=>$ttt){\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($k,\"理优面试组\",\"新老师入职情况汇总\",$ttt.\"老师你好,\".$subject_str.\"组面试\".$p[\"all_count\"].\"位,入职\".@$video_succ[$subject][\"all_count\"].\"位,通过率\".$pass_per.\",平均审核时长\".$sub_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线\".$subject_str.\"教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&subject=\".$subject);\n }\n }\n\n \n $list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time);\n $video_succ_list = $task->t_teacher_lecture_info->get_lecture_info_by_subject_account($start_time,$end_time,-1);\n $one_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,-1);\n $one_succ_account = $task->t_teacher_record_list->get_all_interview_count_by_subject_account($start_time,$end_time,1); \n foreach($list as &$i){\n $i[\"video_num\"] = $i[\"all_count\"];\n }\n foreach($one_account as $k=>&$s){\n if(isset($list[$k])){\n $list[$k][\"all_count\"] +=$s[\"all_count\"];\n }else{\n $s[\"video_num\"]=0;\n $s[\"time_count\"]=0;\n $list[$k]= $s;\n }\n }\n foreach($one_succ_account as $k=>&$t){\n if(isset($video_succ_list[$k])){\n $video_succ_list[$k][\"all_count\"] +=$s[\"all_count\"]; \n }else{\n $video_succ_list[$k]=$t;\n }\n }\n\n //$list=[\"349\"=>\"Jack\"];\n foreach($list as $k=>&$val){\n $pass_per_account = (round(@$video_succ_list[$k][\"all_count\"]/$val[\"all_count\"],2)*100).\"%\";\n $account_ave_time = !empty($val[\"video_num\"])?round($val[\"time_count\"]/$val[\"all_count\"]/86400,1):0;\n $task->t_manager_info->send_wx_todo_msg_by_adminid ($val[\"uid\"],\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".@$video_succ_list[$k][\"all_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);\n /*$task->t_manager_info->send_wx_todo_msg_by_adminid (72,\"理优监课组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n /* $task->t_manager_info->send_wx_todo_msg_by_adminid (349,\"理优面试组\",\"新老师入职情况汇总\",$val[\"account\"].\"老师你好,你上周共面试\".$val[\"all_count\"].\"位老师,入职\".$val[\"suc_count\"].\"位,通过率\".$pass_per_account.\",平均审核时长\".$account_ave_time.\"天,所有学科平均面试通过率为\".$ave_per.\",所有学科平均审核时长\".$ave_time.\"天\n 请赶紧对新入职老师组织入职培训和学科培训,期待通过培训打造强大稳定的在线教学Team\",\"http://admin.leo1v1.com/tongji_ss/teacher_interview_info_tongji?order_by_str=pass_per%20asc&date_type=null&opt_date_type=0&start_time=\".$start.\"&end_time=\".$end.\"&teacher_account=\".$val[\"teacherid\"]);*/\n\n\n\n }\n }", "public function run()\n {\n $delta = true;\n $ci = 0;\n $ti = 0;\n for($i = 1; $i <= 20; $i++) {\n while($delta) {\n $ci = DB::table('users')->where(['role_id' => 3, 'id' => rand(3, 32) ])->value('id');\n if($ci != 0) {\n $ti = DB::table('users')->where(['role_id' => 2, 'id' => rand(3, 32) ])->value('id');\n if($ti != 0) {\n $delta = false;\n }\n }\n }\n DB::table('tasks')->insert([\n 'task_type_id' => rand(1, 5),\n 'technician_id' => $ti,\n 'client_id' => $ci,\n 'task_state_id' => rand(1, 4),\n 'description' => 'none',\n 'annotation' => 'none',\n 'code' => str_random(20),\n 'created_at' => date('Y-m-01').' '.'00:00:00',\n 'updated_at' => date('Y-m-01').' '.'00:00:00',\n ]);\n $ci = 0;\n $ti = 0;\n $delta = true;\n }\n }", "public function testOtherSectionsCorrectAnswer() {\n\n $this->section->setFinished($this->user);\n\n $this->setFinished($this->section, 1);\n $this->setFinishedTo($this->section2, 0);\n $this->setCorrectnessTo($this->section2, 0, false);\n $this->setFinishedTo($this->section3, 0);\n $this->setCorrectnessTo($this->section3, 0, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[0]->section_id, $this->section->id);\n $this->assertEquals($practices[1]->section_id, $this->section->id);\n $this->assertEquals($practices[2]->section_id, $this->section->id);\n $this->assertEquals($practices[3]->section_id, $this->section2->id);\n $this->assertEquals($practices[4]->section_id, $this->section3->id);\n $this->assertTrue(!isset($practices[5]));\n\n // Add sleep to add correctness mark on the next second\n sleep(1);\n\n $this->setFinishedTo($this->section3, 1);\n $this->setCorrectnessTo($this->section3, 1, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[4]->subtype_id, $this->section3->practices[1]->subtype_id);\n\n sleep(1);\n\n $this->setCorrectnessTo($this->section3, 0, true);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[4]->subtype_id, $this->section3->practices[0]->subtype_id);\n }", "public function run()\n {\n \t// Person against person\n \t// Person against self\n \t// Person against nature\n \t// Person against society\n \t// Person against the supernatural\n \t// Person against technology\n\n \t/*\n \t\tIn order to stop a :villainTraitList: :villainOccupation:,\n\t\t\t:mainCharacterName:, a :mainCharacterAge: year-old \n\t\t\t:mainCharacterOccupation: enlists the help of \n\t\t\t:mainCharacterPossessive: :numberOfSupportingCharacters:\n\t\t\tfriends to :resolutionAction: :resolutionNameWithArticle:.\n \t */\n\n $conflicts = [\n \t''\n ];\n }", "public function start_tran();", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "public function testCreateTask()\n {\n }", "public function doneAction()\n\t{\n\t\n\t}", "public function reviewTask ($task) {\n\n\t}", "public abstract function afterExec();", "public function endFunctionFirst() {\n\t\t/*$this->getAllStudents();\n\t\t$this->archive_budgetinfo_details();\n\t\t$this->archive_student_balance();\n\t\t$this->archive_grade_details();\n\t\t$this->archive_transcript_grades();\n\t\t$this->insert_rank(); //to fix\n\t\t/*$query1 = $this->conn->query(\"UPDATE system_settings SET edit_class ='No', student_transfer ='No' where sy_status ='Current'\") or die(\"failed1\");\n\t\t$query2 = $this->conn->query(\"UPDATE faculty SET enroll_privilege ='No'\") or die(\"failed4\");\n\t\t$query3 = $this->conn->query(\"UPDATE budget_info SET acc_amount = '0'\");\n\t\t$query4 = $this->conn->query(\"DELETE FROM announcements where holiday ='No'\");\n\t\t$query5 = $this->conn->query(\"DELETE from promote_list where prom_sy = (SELECT YEAR(sy_start) from system_settings where sy_status = 'Ended' ORDER BY 1 desc LIMIT 1)\");*/\n\t\t/*$this->promote_students();*/\n\t\t/*$query7 = $this->conn->query(\"DELETE FROM grades\");\n\t\tif($query1){\n\t\t\t$this->Message('Success!', 'The school year has been ended!', 'success', 'treasurer-end-trial');\n\t\t} else{\n\t\t\t$this->Message('Error!', 'Cannot end school year', 'error', 'treasurer-end-trial');\n\t\t}*/\n\t\t\n\t}", "public function finish()\n\t{\n\t\t/* @todo this needs to be a queue task */\n\t\tforeach( new \\IPS\\Patterns\\ActiveRecordIterator( \\IPS\\Db::i()->select( '*', 'forums_forums' ), 'IPS\\forums\\Forum' ) AS $forum )\n\t\t{\n\t\t\t$forum->setLastComment();\n\n\t\t\t$forum->queued_topics = \\IPS\\Db::i()->select( 'COUNT(*)', 'forums_topics', array( 'forum_id=? AND approved=0', $forum->id ) )->first();\n\t\t\t$forum->queued_posts = \\IPS\\Db::i()->select( 'COUNT(*)', 'forums_posts', array( 'forums_topics.forum_id=? AND forums_posts.queued=1', $forum->id ) )->join( 'forums_topics', 'forums_topics.tid=forums_posts.topic_id' )->first();\n\t\t\t$forum->save();\n\t\t}\n\t\t\n\t\t/* Content Rebuilds */\n\t\t\\IPS\\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'forums_posts', 'class' => 'IPS\\forums\\Topic\\Post' ), 2, array( 'app', 'link', 'class' ) );\n\t\t\\IPS\\Task::queue( 'convert', 'RebuildFirstPostIds', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );\n\t\t\\IPS\\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 4, array( 'app' ) );\n\t\t\n\t\treturn \"Search Index Rebuild, Content Rebuild, Content Recount, Member Recount, and Private Message Rebuild tasks started.\";\n\t}", "function Step2_Workflow()\r\n {\r\n // So the winter workflow tests are separated.\r\n if( ($ok = $this->sedAdmin->oPS->DoTests( 'workflow-winter_' )) ) {\r\n $ok = $this->sedAdmin->oPS->DoTests( 'workflow_' );\r\n }\r\n $s = $this->sedAdmin->oPS->GetOutput(); // output from test 1 plus possibly test 2, because they are appended internally\r\n return( $this->stepperRet( $ok, $s ) );\r\n }", "public function markExecution() {}", "public function testExecuteTaskAction()\n {\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "public function testTask1Exception(){\n\n }", "public function updateTasksForMismatchedNoJob()\n\t{\n\t\tif ($this->hasTaskCategory(Task::NOT_REPLIED)) return;\n\t\t$this->deleteMismatchedHasJobTasks();\n\t\t$this->createMismatchedNoJobTask();\n\t}", "function finish(){\r\n\t}", "final function what_is_good() {\n\t\t\techo \"Running is Good </br>\";\n\t\t}", "public function testJobListPreparationAndReleaseTaskStatus()\n {\n\n }", "public function proceed();", "public function work(): void;", "public function run()\n {\n DB::table('hints')->insert(\n [\n // tour 1\n [\n 'hint' => 'In de buurt van het gebouw met die kleurtjes',\n 'event_id' => 1,\n 'cost' => 100\n ],\n [\n 'hint' => 'Sinds kort zijn de opleidingen verkort',\n 'event_id' => 2,\n 'cost' => 50\n ],\n [\n 'hint' => 'Yo, wat denk je nou zelf?',\n 'event_id' => 3,\n 'cost' => 150\n ],\n // tour 2\n [\n 'hint' => 'Sinds de 19e eeuw',\n 'event_id' => 4,\n 'cost' => 100\n ],\n [\n 'hint' => 'Minder dan 300',\n 'event_id' => 5,\n 'cost' => 50\n ],\n [\n 'hint' => 'Dordrecht kan je alleen binnenkomen door over water te gaan',\n 'event_id' => 6,\n 'cost' => 150\n ],\n // tour 3\n [\n 'hint' => 'Het zijn er heel veel',\n 'event_id' => 7,\n 'cost' => 100\n ],\n [\n 'hint' => 'Heel groen',\n 'event_id' => 8,\n 'cost' => 50\n ],\n [\n 'hint' => 'Natuurlijker kan niet!',\n 'event_id' => 9,\n 'cost' => 150\n ]\n ]\n );\n }", "abstract protected function after();", "function Step1_IntegrityHard() { return( $this->stepTest( 'integ_') ); }", "public function run()\n {\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Ask for Help',\n 'description' => 'Ask someone to teach you a skill.',\n 'task_points' => 200,\n 'skill_level' => 1,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by WiFi',\n 'description' => 'Send a data file using a WiFi connection.',\n 'task_points' => 450,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Run',\n 'description' => 'Start a run.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect 2 Sensors',\n 'description' => 'Plug in 2 sensors. Confirm valid response from each one.',\n 'task_points' => 400,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect sensor',\n 'description' => 'Plug in 1 sensor. Confirm a valid response.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Free Teach',\n 'description' => 'Teach your partner a new skill. It does not need to be a wheel task.',\n 'task_points' => 800,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Rate',\n 'description' => 'Set experimental rate for run.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Autoscale',\n 'description' => 'Use autoscale function to adjust the y-axis during a run.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Read Lab Instruction',\n 'description' => 'Access a saved copy of any Vernier Labquest experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Select Region',\n 'description' => 'Select a region of data from a saved run.',\n 'task_points' => 500,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Graph',\n 'description' => 'View a Labquest graph.',\n 'task_points' => 100,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Set Duration',\n 'description' => 'Set the time duration for experiment.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Export by USB',\n 'description' => 'Export an experimental data file using USB cable to a commputer.',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Label Run',\n 'description' => 'Add a descriptive name to a data run.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Strike Data',\n 'description' => 'Strike data from a saved run.',\n 'task_points' => 750,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => '3 in a Row',\n 'description' => 'Demonstrate a sequence of 3 different skills.',\n 'task_points' => 900,\n 'skill_level' => 4,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Reboot',\n 'description' => 'Reboot the Labquest unit',\n 'task_points' => 300,\n 'skill_level' => 3,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Linear Fit',\n 'description' => 'Perform a linear fit on a graph.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:00',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Create Local Network',\n 'description' => 'Setup a local Wifi network from Labquest unit, give it a name and confirm from another WiFi enabled device.',\n 'task_points' => 600,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Connect WiFi',\n 'description' => 'Connect Labquest unit to a WiFi network.',\n 'task_points' => 400,\n 'skill_level' => 3,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'View Table',\n 'description' => 'View data in table view.',\n 'task_points' => 150,\n 'skill_level' => 1,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Overlay Runs',\n 'description' => 'Overlay 2 separate runs on one graph.',\n 'task_points' => 200,\n 'skill_level' => 2,\n 'allotted_time' => '00:01:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Save File',\n 'description' => 'Save file, must give it a descriptive name.',\n 'task_points' => 250,\n 'skill_level' => 2,\n 'allotted_time' => '00:02:30',\n ]);\n\n DB::table('tasks')->insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'task' => 'Download to LoggerPro',\n 'description' => 'Download data file to Labquest LoggerPro software on a computer.',\n 'task_points' => 400,\n 'skill_level' => 4,\n 'allotted_time' => '00:03:30',\n ]);\n }", "abstract function after();", "public function taskComplete(){\n $taskId = $_POST[\"taskId\"];\n\n $this->individualGroupModel->changeTaskCompletion($taskId, true);\n\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function testDeleteTaskInstanceVariable()\n {\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function after_run() {}", "public function afterBatch();", "protected function executeSpecificStep() {}", "private function salutation(): void\n {\n $this->io->title(sprintf(\"CodeGen - A Universal Code Generator\\nby Niels Braczek (C)2004-%s. All rights reserved.\", date('Y')));\n\n $this->io->writeln([\n \"Project: {$this->project}\",\n \"Template: {$this->template}\",\n \"Output: {$this->output}\",\n ], OutputInterface::VERBOSITY_DEBUG);\n }", "private function step3()\n {\n // leg eleg ig eig lig elig els lov elov slov hetslov\n if ( ($position = $this->searchIfInR1(array(\n 'hetslov', 'eleg', 'elov', 'slov', 'elig', 'eig', 'lig', 'els', 'lov', 'leg', 'ig'\n ))) !== false) {\n $this->word = UTF8::substr($this->word, 0, $position);\n }\n }", "function hook_dms_client_report_tasks_alter(&$tasks) {\r\n // Alter any task, add a new one...\r\n}", "function jumpToFirstUnfinishedSetupStep()\n\t{\n\t\tif (!$this->setup->getClient()->status[\"db\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"db\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayDatabase();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"lang\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"lang\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayLanguages();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"contact\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"contact\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayContactData();\n\t\t}\n\t\telseif(!$this->setup->getClient()->status['proxy']['status'])\n\t\t{\n\t\t\t$this->cmd = \"proxy\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayProxy();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"nic\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"nic\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayNIC();\n\t\t}\n\t\telseif (!$this->setup->getClient()->status[\"finish\"][\"status\"])\n\t\t{\n\t\t\t$this->cmd = \"finish\";\n\t\t\tilUtil::sendInfo($this->lng->txt(\"finish_initial_setup_first\"),true);\n\t\t\t$this->displayFinishSetup();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function updateCompletedTaskDescriptions() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating task descriptions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $project_objects_table WHERE type = 'Task' AND completed_on IS NOT NULL AND body != '' AND body IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('Task', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $project_objects_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('Task descriptions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to upgrade task descriptions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function run()\n {\n \\App\\Task::create([\n 'title' => 'Lorem Ipsum',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n \\App\\Task::create([\n 'title' => 'Dolor Sit',\n 'description' => 'Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.Ship-wide stars, to the habitat technically shields up. It is a delighted mystery, sir. Ferengis resist from minds like interstellar emitters.',\n 'end' => \\Carbon\\Carbon::now()->addDays(2),\n 'app_user_id' => 1\n ]);\n }", "public function proceed()\n {\n }", "public function run()\n {\n $task = new \\App\\Task();\n $task->id = 1;\n $task->sprint_id = 1;\n $task->nr= '1.1';\n $task->name = 'Testtask';\n $task->estimatedtime = '00:30:00';\n $task->save();\n }", "function tasks()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tasks'] == 1 ) ? 'Task' : 'Tasks';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$taskkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t{\n\t\t\t$taskkeys[] = \"'{$v['task_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'task_manager', \"task_key IN (\".implode( \",\", $taskkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_task( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tasks']} {$object} {$operation}....\" );\n\t}", "protected function _detectCompletionAndEnd()\n {\n// detect if the output has completed, and if it does\n// delete the output file and stop the loop.\n if($this->_detectCompletionBoundaryInOutput() === true)\n {\n $this->deleteOutputFile();\n $this->stop();\n }\n else if($this->_detectFailureBoundaryInOutput() === true)\n {\n $this->_error_code = $this->_getErrorCodeInOutput();\n }\n }", "public function mainTask()\n\t{\n\t\t// Redirect to version panel of current version (TEMP)\n\t\tApp::redirect(\n\t\t\tRoute::url($this->_route . '&active=versions', false)\n\t\t);\n\t\treturn;\n\t}", "public function processChangeInterventionMigrationLineForScenario(){\n $this->html = \"can't found scenario version whith theses parameters ...\"; \n $this->ei_version = Doctrine_Core::getTable(\"EiVersion\")->findOneById($this->scenario_version_id);\n if ($this->ei_version != null):\n /* Avant l'envoi de la reqûete au système , on s'assure que le scenario ne possède pas de version pour le package/ticket concerné */\n $exist_scenario_version = Doctrine_Core::getTable(\"EiScenarioPackage\")->findByEiScenarioIdAndPackageIdAndPackageRef($this->ei_version->getEiScenarioId(),\n $this->ei_ticket->getTicketId(), $this->ei_ticket->getTicketRef());\n if (count($exist_scenario_version) == 0):\n //On crée la ligne permettant de lier la version de scénario à l'intervention\n $ei_scenario_package=Doctrine_Core::getTable(\"EiScenarioPackage\")->findOneByEiScenarioIdAndEiVersionId(\n $this->ei_version->getEiScenarioId(),$this->ei_version->getId() );\n \n $ei_scenario_package->setPackageId($this->ei_ticket->getTicketId());\n $ei_scenario_package->setPackageRef($this->ei_ticket->getTicketRef()); \n $ei_scenario_package->save();\n $this->html = \"Transaction maded successfully ...\";\n $this->success =true;\n else:\n $this->html = \"Warning! there is a scenario already link to this intervention ...\";\n endif;\n endif;\n }", "public function pass_1()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_ELSE');\n\t\twhile($tp < $token_count) {\n\t\t\tif($this->token_name($tokens[$tp]) == 'T_ELSE' ){\n\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\tif($this->token_name($tokens[$temp]) == 'T_IF') {\n\t\t\t\t\t$this->add_tokens_to_be_replaced($tp ,'elseif');\n\t\t\t\t\t$this->add_tokens_to_be_replaced($temp ,'');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tp++;\n\t\t}\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t\t\n\t}", "public function checkAutoFinish()\n {\n $hFunction = new \\Hfunction();\n $modelCompany = new QcCompany();\n $currentDateCheck = $hFunction->carbonNow();\n # lay thong tin dang hoa dong\n $dataRequest = $this->getAllInfoActivity();\n if ($hFunction->checkCount($dataRequest)) {\n foreach ($dataRequest as $request) {\n $requestDate = $request->requestDate();\n $checkDate = $hFunction->datetimePlusDay($modelCompany->getDefaultTimeBeginToWorkOfDate($requestDate), 1);\n if ($currentDateCheck > $checkDate) {# qua ngay tang ca\n $this->confirmFinish($request->requestId());\n }\n }\n }\n\n }", "function fix() ;", "public function run()\n {\n Task::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 6; $i++) {\n $taskLetter = chr(65 + $i);\n Task::create([\n 'name' => \"משימה $taskLetter\",\n 'done' => $faker->boolean,\n ]);\n }\n }", "protected function executeTasks() {}", "function needsExecution() ;", "function work()\n {\n }", "function createDIAUmpireQuantCommandFile ($task_infor, $all_task_file_path){\n//########################################################################\n \n $use_memery_size = '40G';\n if(defined(\"JAR_MAX_MEMORY\") and JAR_MAX_MEMORY){\n $use_memery_size = JAR_MAX_MEMORY;\n }\n $JAR_Command = get_jar_command($use_memery_size);\n //in analyst dir\n $mapDIA_CRATE_DATA_FILE = dirname(__FILE__).'/create_DIAUmpire_data_unique_pep.php';\n \n echo \"5. Create task command file\\n\";\n echo $task_infor['taskComFile'].\"\\n\";\n print \"-- all searched file locations.\\n\";\n $fp = fopen($task_infor['taskComFile'], \"w\");\n \n fwrite($fp, \"#!/bin/bash\\n\\n\");\n fwrite($fp, \"echo `hostname`\\n\");\n fwrite($fp, \"echo \\\"###1. cd to working dir\\\"\\n\");\n \n $command = \"cd '\".$task_infor['taskDir'].\"'\" ;\n fwrite($fp, \"$command \\n\"); \n $command = \"if [ ! -d ./Results ]\\nthen\\n\\tmkdir ./Results\\nfi\\n\";\n $command .= \"if [ ! -d ./Results ]\\nthen\\n\\techo \\\"Error: Cannot make Results folder\\\"\\n\\texit\\nfi\";\n fwrite($fp, \"$command\\n\"); \n \n if($task_infor['ParentQuantResultsDir']){\n $command = \"if [ ! -f \".$task_infor['ParentQuantResultsDir'].\"/FragSummary.xls ]\\nthen\\n\\techo 'Parent task folder has no FragSummary.xls'\\n\\texit\\nfi\";\n fwrite($fp, \"$command \\n\"); \n $command = \"cp '\". $task_infor['ParentQuantResultsDir'].\"/'*xls '\" . $task_infor['taskDir'].\"/'\" ;\n fwrite($fp, \"$command\\n\"); \n $command = \"FragSummary_FILE=\\\"FragSummary.xls\\\"\";\n fwrite($fp, \"$command \\n\");\n }else{\n fwrite($fp, \"echo \\\"###2. run ProteinProphet for all interact files\\\"\\n\"); \n $all_task_file_path_str = '';\n if($task_infor['tppSchEngine'] == 'iProphet'){\n //my ($tmp_path, $tmp_file_basename, $pep_file_from, $pep_file_to);\n foreach ($all_task_file_path as $theFilePath){\n print $theFilePath.\"\\n\";\n if(strpos($theFilePath, ':') === false) continue;\n list($tmp_path, $tmp_file_basename) = explode(':', $theFilePath);\n $pep_file_from = \"'\". $tmp_path . \"interact-\".$tmp_file_basename.\"_Q'\" . \"*\";\n $pep_file_to = dirname(dirname($tmp_path)). \"/\". $tmp_file_basename . \"/\";\n \n \n $command = \"cd '\".$pep_file_to.\"'\" ;\n fwrite($fp, \"$command \\n\"); \n $command = 'for theFile in `ls interact-* *_LCMSID.serFS *_LibID_* *_Q1.*FS *_Q2.*FS *_Q3.*FS *_masscaliRT.png`;do rm -f $theFile; done';\n \n fwrite($fp, \"$command\\n\"); \n $command = \"cp -f $pep_file_from '$pep_file_to'\";\n fwrite($fp, \"$command\\n\"); \n $all_task_file_path_str .= \"'\".$pep_file_to . \"interact-\".$tmp_file_basename.\"_Q'\" . \"* \";\n }\n $command = \"cd '\".$task_infor['taskDir'].\"'\" ;\n fwrite($fp, \"$command \\n\"); \n \n }else{\n \n foreach ($all_task_file_path as $theFilePath){\n print $theFilePath.\"\\n\";\n $all_task_file_path_str .= \"'\".$theFilePath . \"interact-'*.pep.xml \"; \n }\n }\n \n $command = escapeshellarg(TPP_BIN_PATH.'/ProteinProphet') . \" \". $all_task_file_path_str . escapeshellarg($task_infor['protFilePath']);\n if($task_infor['tppSchEngine'] == 'iProphet'){\n $command .= \" IPROPHET\";\n }\n $command .= \" 2>&1\";\n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n fwrite($fp, \"echo \\\"###3. run DIA_Umpire_Quant\\\"\\n\");\n \n $command = $JAR_Command . escapeshellarg(DIAUMPIRE_BIN_PATH . \"/DIA_Umpire_Quant.jar\") .\" \". escapeshellarg($task_infor['QuantParamFile']);\n \n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n \n $command = \"FragSummary_FILE=`ls -t FragSummary_*.xls | head -1` \\nif [ !-f \\\"\\$FragSummary_FILE\\\" ] \\nthen \\n\\techo 'Error: no DIA-Umpire-Quant result file created.' \\n\\texit \\nelse \\n\\techo 'DIA-Umpire-Quant result files were created.' \\nfi \\n\";\n fwrite($fp, \"$command \\n\");\n \n $command = \"for theFile in `ls *.xls diaumpire.quant_params`\\ndo\\n\\tcp -f \\$theFile Results/`echo \\$theFile|sed \\\"s/_[0-9]\\\\+//g\\\"`\\ndone\";\n fwrite($fp, \"$command \\n\"); \n \n }\n \n if($task_infor['SAINT_or_mapDIA'] == 'mapDIA' && $task_infor['SAINT_bait_name_str']){\n $mapDIA_input = \"mapDIA_input.txt\";\n $mapDIA_data = \"mapDIA_data.txt\";\n $mapDIA_path = dirname(dirname(MAP_DIA_BIN_PATH));\n $CRATE_DATA_FILE_in_mapDIA = $mapDIA_path.\"/create_DIAUmpire_data_unique_pep.php\";\n if(!_is_file($CRATE_DATA_FILE_in_mapDIA)){\n copy($mapDIA_CRATE_DATA_FILE, $CRATE_DATA_FILE_in_mapDIA);\n }\n $mapDIA_option = $task_infor['mapDIA_parameters'];\n $mapDIA_option = str_replace(\",\", \"\\n\",$task_infor['mapDIA_parameters']);\n $fp_mapDIA = fopen($task_infor['taskDir'].\"/\".$mapDIA_input, \"w\");\n fwrite($fp_mapDIA, \"### input file\\nFILE=\".$mapDIA_data.\"\\n\");\n fwrite($fp_mapDIA, $mapDIA_option); \n fclose($fp_mapDIA);\n \n \n \n fwrite($fp, \"echo \\\"###4. run mapDIA\\\"\\n\");\n $command = \"if [ ! -d ./Results/mapDIA ]\\nthen\\n\\tmkdir ./Results/mapDIA\\nfi\\n\";\n fwrite($fp, \"$command \\n\"); \n $command = \"php -f \".escapeshellarg($CRATE_DATA_FILE_in_mapDIA).\" \\$FragSummary_FILE \".escapeshellarg($task_infor['SAINT_bait_name_str']).\" $mapDIA_data\";\n if($task_infor['REMOVE_SHARED_PEPTIDE_GENE'] == 'true'){\n $command .= ' 1';\n }\n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\");\n $command = escapeshellarg(MAP_DIA_BIN_PATH.\"/mapDIA\") . \" \". $mapDIA_input; \n fwrite($fp, \"echo \\\"$command\\\"\\n$command \\n\"); \n $command = \"if [ -f analysis_output.txt ]\\nthen\\n\\techo 'mapDIA result files created'\\n\\tcp -f protein_level.txt peptide_level.txt log2_data.txt fragment_selection.txt analysis_output.txt mapDIA*.txt ./Results/mapDIA/\\nelse\\n\\techo 'no mapDIA result files were created.'\\nfi\";\n \n fwrite($fp, \"$command \\n\"); \n \n \n }else if($task_infor['SAINT_or_mapDIA'] == 'SAINT' && $task_infor['SAINT_bait_name_str']){\n \n fwrite($fp, \"echo \\\"###4. run SAINT\\\"\\n\");\n $command = \"if ls SAINT_Interaction_MS1* > /dev/null 2>&1\\nthen\\n\\techo \\\"SAINT input files were created\\\"\\nelse\\n\\techo \\\"Error: no SAINT input files were created\\\"\\n\\texit\\nfi\";\n fwrite($fp, \"$command \\n\"); \n \n $command = \"for theFile in `ls SAINT_*.txt`\\ndo\\n\\tcp -f \\$theFile Results/`echo \\$theFile|sed \\\"s/_[0-9]\\+//g\\\"`\\ndone\";\n fwrite($fp, \"$command \\n\"); \n \n $tmp_saint_op = explode(',', $task_infor['SAINT_parameters']);\n $saint_para_hash = array();\n $saint_para_hash['saint_type'] = 'express';\n $saint_para_hash['nControl'] = '4';\n $saint_para_hash['nCompressBaits'] = '2';\n $saint_para_hash['nburn'] = '2000';\n $saint_para_hash['niter'] = '5000';\n $saint_para_hash['lowMode'] = '0';\n $saint_para_hash['minFold'] = '1'; \n $saint_para_hash['fthres'] = '0';\n $saint_para_hash['fgroup'] = '0';\n $saint_para_hash['var'] ='0';\n $saint_para_hash['normalize'] ='1';\n $saint_para_hash['has_iRefIndex_file'] = '';\n \n \n foreach ($tmp_saint_op as $thePare) {\n if(strpos($thePare, \":\") === false)continue;\n list($tmp_name, $value) = explode(':', $thePare);\n $saint_para_hash[$tmp_name] = $value;\n }\n \n $tmp_com = ''; \n \n \n if(_is_file(SAINT_SERVER_EXPRESS_PATH.\"/SAINTexpress-int\")){\n \n fwrite($fp, \"echo \\\"#4-1. run SAINT express\\\"\\n\");\n $command = escapeshellarg(SAINT_SERVER_EXPRESS_PATH.\"/SAINTexpress-int\");\n \n if($saint_para_hash['nControl']){\n $command .= \" -L\".$saint_para_hash['nControl'];\n }\n if($saint_para_hash['nCompressBaits']){\n $command .= \" -R\".$saint_para_hash['nCompressBaits'];\n }\n $tmp_com = $command . \" SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n if(_is_file(\"iRefIndex.dat\")){\n $tmp_com .= \" iRefIndex.dat\";\n }\n fwrite($fp, \"echo \\\"$tmp_com\\\"\\n$tmp_com \\n\"); \n $tmp_com = \"if [ -f list.txt ]\\nthen\\n\\tmv list.txt ./Results/list_MS1.txt\\nfi\";\n fwrite($fp, \"$tmp_com \\n\");\n \n $tmp_com = $command . \" SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n if(_is_file(\"iRefIndex.dat\")){\n $tmp_com .= \" iRefIndex.dat\";\n }\n fwrite($fp, \"echo \\\"$tmp_com\\\"\\n$tmp_com \\n\"); \n $tmp_com = \"if [ -f list.txt ]\\nthen\\n\\tmv list.txt ./Results/list_MS2.txt\\nfi\";\n fwrite($fp, \"$tmp_com \\n\"); \n \n \n fwrite($fp, \"echo \\\"#4-2. run SAINT\\\"\\n\");\n $command_reform_MS1 = escapeshellarg(SAINT_SERVER_PATH.\"/saint-reformat\"). \" SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n $command_reform_MS2 = escapeshellarg(SAINT_SERVER_PATH.\"/saint-reformat\"). \" SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\";\n $other_options;\n if($saint_para_hash['nControl']){\n $command_reform_MS1 .= \" \" . $saint_para_hash['nControl'];\n $command_reform_MS2 .= \" \" . $saint_para_hash['nControl'];\n $command = escapeshellarg(SAINT_SERVER_PATH. \"/saint-int-ctrl\");\n $other_options = \" \". $saint_para_hash['lowMode']. \" \". $saint_para_hash['minFold'].\" \". $saint_para_hash['normalize'];\n }else{\n ###############?????????????????????????????\n $command = escapeshellarg(SAINT_SERVER_PATH. \"/saint-spc-noctrl\"); \n ###############????????????????????????????\n $other_options = \" \".$saint_para_hash['fthres'].\" \". $saint_para_hash['fgroup'].\" \". $saint_para_hash['var'].\" \". $saint_para_hash['normalize'];\n }\n \n fwrite($fp, \"echo \\\"$command_reform_MS1\\\" \\n$command_reform_MS1\\n\");\n $command = \"GSL_RNG_SEED=123 \". $command . \" interaction.new prey.new bait.new \". $saint_para_hash['nburn'] . \" \". $saint_para_hash['niter'] . $other_options;\n fwrite($fp, \"echo \\\"$command\\\" \\n$command \\n\"); \n $tmp_com = \"if [ -d RESULT ]\\nthen\\n\\techo 'SAINT MS1 result files were created'\\n\\tmv *.new ./RESULT\\n\\tmv RESULT Results/RESULT_MS1\\nelse\\n\\techo 'Error: No SAINT MS1 result files were created'\\n\\trm -f *.new\\nfi\\n\";\n $tmp_com .= \"rm -R LOG MAPPING MCMC\";\n fwrite($fp, \"$tmp_com\\n\");\n fwrite($fp, \"echo \\\"$command_reform_MS2\\\" \\n$command_reform_MS2\\n\");\n fwrite($fp, \"echo \\\"$command\\\" \\n$command \\n\"); \n $tmp_com = \"if [ -d RESULT ]\\nthen\\n\\techo 'SAINT MS2 result files were created'\\n\\tmv *.new ./RESULT\\n\\tmv RESULT Results/RESULT_MS2\\nelse\\n\\techo 'Error: No SAINT MS2 result files were created'\\n\\trm -f *.new\\nfi\";\n fwrite($fp, \"$tmp_com\\n\");\n \n /*\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-reformat SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt 3\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-reformat SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt 3\n #GSL_RNG_SEED=123 /mnt/thegpm/Prohits_SAINT/saint_code/SAINT_v2.3.4/bin/saint-int-ctrl interaction.new prey.new bait.new 2000 5000 0 1 1\n #6 run SATINT Express\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINTexpress_v3.3__2014_Apr_23/bin/SAINTexpress-int -L3 -R2 SAINT_Interaction_MS1_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\n #/mnt/thegpm/Prohits_SAINT/saint_code/SAINTexpress_v3.3__2014_Apr_23/bin/SAINTexpress-int -L3 -R2 SAINT_Interaction_MS2_*.txt SAINT_Prey_*.txt SAINT_Bait_*.txt\n */\n }else{\n fwrite($fp, \"#SAINT is requested. But SAINT cannot be run. Please check SAINT setting.\\n\");\n }\n }else{\n fwrite($fp, \"#SAINT is not requested.\\n\");\n }\n $command = \"cp -f task.log ./Results/\";\n fwrite($fp, \"$command \\n\"); \n fclose ($fp);\n \n \n \n \n \n system(\"chmod 775 \". $task_infor['taskComFile']);\n \n}", "function turnitintooltwo_cron() {\n global $DB, $CFG, $tiitaskcall;\n\n // 2.7 onwards we would like to be called from task calls.\n if ( $CFG->version > 2014051200 && !$tiitaskcall ) {\n mtrace(get_string('crontaskmodeactive', 'turnitintooltwo'));\n return;\n }\n\n // Reset task call flag.\n if ($tiitaskcall) {\n $tiitaskcall = false;\n }\n\n // Update gradebook when a part has been deleted.\n // Get assignment that needs updating and check whether it exists.\n if ($assignment = $DB->get_record('turnitintooltwo', array(\"needs_updating\" => 1), '*', IGNORE_MULTIPLE)) {\n\n // Update the gradebook.\n $task = \"needsupdating\";\n turnitintooltwo_cron_update_gradbook($assignment, $task);\n }\n\n // Send grades to the gradebook for anonymous marking assignments when the post date has passed.\n // Get a list of assignments that need updating.\n if ($assignmentlist = $DB->get_records_sql(\"SELECT DISTINCT(t.id) FROM {turnitintooltwo} t\n LEFT JOIN {turnitintooltwo_parts} p ON (p.turnitintooltwoid = t.id)\n WHERE (p.turnitintooltwoid + p.dtpost IN\n (SELECT p2.turnitintooltwoid + MAX(p2.dtpost)\n FROM {turnitintooltwo_parts} p2\n GROUP BY p2.turnitintooltwoid))\n AND t.anon = 1 AND t.anongradebook = 0 AND p.dtpost < \".time())) {\n\n // Update each assignment.\n $task = \"anongradebook\";\n foreach ($assignmentlist as $assignment) {\n turnitintooltwo_cron_update_gradbook($assignment, $task);\n }\n }\n\n // Refresh the submissions for migrated assignment parts if there are none stored locally\n // as the 1st time this is done can be quite a long job if there are a lot of submissions.\n $migratedemptyparts = $DB->get_records_select('turnitintooltwo_parts', \" migrated = 1 AND \".\n \" (SELECT COUNT(id) FROM {turnitintooltwo_submissions} \".\n \" WHERE submission_part = {turnitintooltwo_parts}.id) = 0 \");\n\n if (count($migratedemptyparts) > 0) {\n $updatedassignments = array();\n foreach ($migratedemptyparts as $part) {\n if (!array_search($part->id, $updatedassignments)) {\n $cm = get_coursemodule_from_instance(\"turnitintooltwo\", $part->turnitintooltwoid);\n $turnitintooltwoassignment = new turnitintooltwo_assignment($part->turnitintooltwoid);\n $turnitintooltwoassignment->get_submission_ids_from_tii($part);\n $turnitintooltwoassignment->refresh_submissions($cm, $part);\n $updatedassignments[] = $part->id;\n\n turnitintooltwo_activitylog('Turnitintool submissions downloaded for assignment '.$part->id, 'REQUEST');\n }\n }\n echo 'Turnitintool submissions downloaded for assignments: '.implode(',', $updatedassignments).' ';\n }\n\n // Perform gradebook migrations for submissions that were not actioned during the migration tool.\n turnitintooltwo_cron_migrate_gradebook();\n}", "public function incomplete()\n {\n $this->update(['completion_date' => null]);\n LogController::set(get_class($this).'@'.__FUNCTION__);\n // $this->recordActivity('incompleted_task');\n }", "public function test_cleanup_task() {\n global $DB;\n $this->set_log_store();\n $this->setup_datas();\n $this->set_resources();\n $this->assertEquals(2, $DB->count_records('logstore_lastupdated_log'));\n // Artifically modify last date.\n $record = $DB->get_record('logstore_lastupdated_log', array('cmid' => $this->cmresource1->id));\n $record->lasttimeupdated -= 3600 * 24 * 30;\n $DB->update_record('logstore_lastupdated_log', $record);\n // Remove all logs before \"today\".\n set_config('loglifetime', 1, 'logstore_last_updated_course_module');\n $this->expectOutputString(\" Deleted old log records from last_viewed_course_module log store.\\n\");\n $clean = new \\logstore_last_updated_course_module\\task\\cleanup_task();\n $clean->execute();\n $this->assertEquals(1, $DB->count_records('logstore_lastupdated_log'));\n }", "public function step21()\n\t{\n\t\t// emails but in a paused state (0) to avoid excessive emails\n\t\t$this->executeUpgradeQuery(\"\n\t\t\tUPDATE xf_user AS u\n\t\t\tINNER JOIN xf_user_option AS uo ON\n\t\t\t\t(u.user_id = uo.user_id)\n\t\t\tSET u.last_summary_email_date = 0\n\t\t\tWHERE uo.receive_admin_email = 1\n\t\t\");\n\t}", "public function Save_Other_Task_Entry()\n {\n $type = $this->input->post('Task_Type', true);\n $count = sizeof($type);\n $project = $this->input->post('Project_Id', true);\n $contract = $this->input->post('Contract_Id', true);\n $phase = $this->input->post('Phase_Id', true);\n $leader = $this->input->post('Project_Leader', true);\n $category = $this->input->post('Task_Category', true);\n $description = $this->input->post('Task_Description', true);\n $task_date = $this->input->post('Task_Date', true);\n $Hours = $this->input->post('Logged_Hours', true);\n for ($i = 0; $i < $count; $i++) {\n if ($type[$i] == \"\") {\n } else {\n if ($contract[$i] == '1') {\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => $project[$i],\n 'Task_WO_Icode' => '0',\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => $contract[$i],\n 'Task_Project_Phase_Icode' => $phase[$i],\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n\n } else if ($contract[$i] > 1) {\n //print_r(\"work order\");\n //print_r($contract[$i]);\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => '0',\n 'Task_WO_Icode' => $project[$i],\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => $contract[$i],\n 'Task_Project_Phase_Icode' => $phase[$i],\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n\n } else {\n //print_r(\"non project\");\n //print_r($leader[$i]);\n $resource_contact = array('Type_Of_Task' => 'Un_Assigned',\n 'Task_Type' => $type[$i],\n 'Task_Category_Icode' => $category[$i],\n 'Task_Project_Icode' => '0',\n 'Task_WO_Icode' => '0',\n 'Task_Client_Icode' => '0',\n 'Task_Resource_Icode' => $this->session->userdata['userid'],\n 'Task_Contract_Type' => '0',\n 'Task_Project_Phase_Icode' => '0',\n 'Task_Start_Date' => $task_date[$i],\n 'Task_End_Date' => $task_date[$i],\n 'Task_Estimated_Hours' => $Hours[$i],\n 'Task_Description' => $description[$i],\n 'Task_Created_By' => $leader[$i]);\n $insert_Req = $this->technical_user_model->Insert_Task($resource_contact);\n }\n }\n }\n echo 1;\n }", "private function part2()\n {\n $this->start();\n\n $lines = explode(\"\\n\", $this->getInput());\n\n $result = null;\n\n foreach ($lines as $io => $line) {\n $trying = true;\n $linesToTry = collect($lines)->filter(function($line, $ii) use ($io) {\n return $ii >= $io;\n })->toArray();\n\n $sum = 0;\n\n while ($trying) {\n foreach ($linesToTry as $itry => $try) {\n $sum += $try;\n\n if ($sum == $this->firstAnswer) {\n if (! $result) {\n $contiguous = collect($lines)->filter(function($line, $index) use ($io, $itry) {\n return $index >= $io && $index <= $itry;\n })->toArray();\n\n $result = min($contiguous) + max($contiguous);\n }\n\n $trying = false;\n break;\n }\n }\n\n $trying = false;\n }\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$result]],\n ],\n 'time' => $this->getTime(),\n ]);\n }", "public function Upgrade143to150()\n {\n $this->_batch->addTask('Db_AddPatches', 42);\n $this->_batch->addTask('Db_AddPatches', 43);\n\n $this->_batch->addTask('Db_CreateNewTables');\n\n $this->_batch->addTask('Echo', $this->_('Syncing surveys for all sources'));\n\n //Now sync the db sources to allow limesurvey source to add a field to the tokentable\n $model = new \\MUtil_Model_TableModel('gems__sources');\n $data = $model->load(false);\n\n foreach ($data as $row) {\n $this->_batch->addTask('Tracker_SourceSyncSurveys', $row['gso_id_source']);\n }\n\n return true;\n }", "public function performChecks(){\n\t\t\n\t}", "public function updateTasksForNotReplied()\n\t{\n\t\t$this->deleteMismatchedNoJobTasks();\n\t\t$this->deleteMismatchedHasJobTasks();\n\t\t$this->createNotRepliedTask();\n\t}" ]
[ "0.6004627", "0.58566993", "0.5725865", "0.56256425", "0.55530465", "0.54087365", "0.53765833", "0.5326187", "0.530182", "0.5287233", "0.52449656", "0.5239364", "0.52220654", "0.52174973", "0.5172016", "0.51604825", "0.5148938", "0.5145727", "0.5087899", "0.5075644", "0.5067842", "0.502679", "0.50011456", "0.4985108", "0.497516", "0.4965374", "0.49575096", "0.49570584", "0.4952263", "0.4949464", "0.4944221", "0.49354443", "0.4933411", "0.49182886", "0.49112746", "0.49087265", "0.4890144", "0.48806038", "0.48764908", "0.48756382", "0.48585472", "0.48578274", "0.4855107", "0.4850848", "0.4844558", "0.48429668", "0.48400226", "0.48373172", "0.4837314", "0.4834821", "0.4826328", "0.48241165", "0.4823162", "0.4819915", "0.48156673", "0.48118827", "0.4797972", "0.47918093", "0.47908142", "0.4788901", "0.4784733", "0.47807607", "0.4779747", "0.47760427", "0.477199", "0.47682917", "0.47682917", "0.47682917", "0.47669157", "0.475754", "0.47538894", "0.4741117", "0.4737163", "0.47349015", "0.4728325", "0.47187725", "0.47175702", "0.4716295", "0.47025874", "0.47013372", "0.469547", "0.46944702", "0.4693334", "0.46903607", "0.46881646", "0.46826202", "0.4681695", "0.4680891", "0.46737006", "0.4669487", "0.46592495", "0.46550837", "0.46542", "0.46500075", "0.464645", "0.46446475", "0.46435556", "0.4639438", "0.46275085", "0.46272948" ]
0.56053764
4
Register any application services.
public function register() { $this->app->bind(GiaoHangNhanhGateway::class, function($app) { $token = config('services.giaohangnhanh.token'); $shopId = config('services.giaohangnhanh.shop_id'); $fromDistrictId = config('services.giaohangnhanh.from_district_id'); $headers = [ 'Content-Type' => 'application/json', 'token' => $token, 'ShopId' => $shopId ]; return new GiaoHangNhanh($token, $headers, $shopId, $fromDistrictId, 1); // Duong bo }); $this->app->bind('Address', function($app) { return new Address; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Find out the stocks associated with this genotype (allele)
function mainlab_get_allele_associated_stocks ($genotype_id, $project = 0, $stock_uniquename = 0, $species = 0) { $ssql = "SELECT DISTINCT S.stock_id, S.uniquename, CP.nid AS project_nid, P.name AS project FROM {nd_experiment_genotype} NDG INNER JOIN {nd_experiment_stock} NDS ON NDG.nd_experiment_id = NDS.nd_experiment_id INNER JOIN {stock} EXP ON EXP.stock_id = NDS.stock_id INNER JOIN {stock_relationship} SR ON SR.subject_id = EXP.stock_id INNER JOIN {stock} S ON S.stock_id = SR.object_id INNER JOIN {nd_experiment_project} NEP ON NEP.nd_experiment_id = NDG.nd_experiment_id LEFT JOIN {project} P ON P.project_id = NEP.project_id LEFT JOIN public.chado_project CP ON P.project_id = CP.project_id LEFT JOIN (SELECT * FROM {stockprop} WHERE type_id = (SELECT cvterm_id FROM {cvterm} WHERE name = 'permission' AND cv_id = (SELECT cv_id FROM {cv} WHERE name ='MAIN'))) SP ON S.stock_id = SP.stock_id LEFT JOIN (SELECT * FROM {projectprop} PP WHERE type_id = (SELECT cvterm_id FROM {cvterm} WHERE name = 'project_type' AND cv_id = (SELECT cv_id FROM {cv} WHERE name = 'MAIN'))) PTYPE ON PTYPE.project_id = P.project_id LEFT JOIN (SELECT * FROM {projectprop} PP WHERE type_id = (SELECT cvterm_id FROM {cvterm} WHERE name = 'sub_type' AND cv_id = (SELECT cv_id FROM {cv} WHERE name = 'MAIN'))) SUBTYPE ON SUBTYPE.project_id = P.project_id LEFT JOIN (SELECT * FROM {projectprop} PP WHERE type_id = (SELECT cvterm_id FROM {cvterm} WHERE name = 'permission' AND cv_id = (SELECT cv_id FROM {cv} WHERE name = 'MAIN'))) PERM ON PERM.project_id = P.project_id WHERE SR.type_id = (SELECT cvterm_id FROM {cvterm} WHERE name = 'sample_of' AND cv_id = (SELECT cv_id FROM {cv} WHERE name = 'MAIN')) AND PTYPE.value = 'genotyping' AND SUBTYPE.value = 'SSR' AND PERM.value = 'public' AND genotype_id = :genotype_id"; if ($project) {$ssql .= " AND P.name = '$project'";} if ($stock_uniquename) {$ssql .= " AND S.uniquename = '$stock_uniquename'";} if ($species) {$ssql .= " AND (SELECT genus || ' ' || species FROM {organism} WHERE organism_id =S.organism_id) = '$species'";} $sresult = chado_query($ssql, array(':genotype_id' => $genotype_id)); $stocks = array(); $scounter = 0; while ($stock = $sresult->fetchObject()) { // Find out the stock nid if there is one if (db_table_exists('chado_stock')) { $nsql = "SELECT nid FROM {chado_stock} WHERE stock_id = :stock_id"; $nid = db_query($nsql, array(':stock_id' => $stock->stock_id))->fetchField(); $stock->nid = $nid; } $stocks [$scounter] = $stock; $scounter ++; } return $stocks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStock();", "public function getVariantStocks()\n {\n return $this->getProductStocks()\n ->joinWith('stock');\n }", "public function read_stocks() {\n return $this->yahooStock->getQuotes();\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->stock;\n }", "public function getStock()\n {\n return $this->Stock;\n }", "function get_espacio_stocks_ubicacion($stock)\n\t{\n\t\t$u = new Espacio_stock();\n\t\t$sql=\"select c.*, s.nombre from espacios_stock as c left join stock as s on s.id=c.stock_id where c.stock_id='$stock' and s.estatus_general_id='1' order by nombre limit 1 \";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function getStock()\n {\n $article = oxNew('oxArticle');\n $article->load($this->testArticleId);\n return $article->oxarticles__oxstock->value;\n }", "public function stocks()\n {\n return $this->hasMany(InventoryStock::class, 'location_id', 'id');\n }", "public static function get_all_accessory_in_stock()\n {\n return Accessories::where('status',1)->where('rental',1)->where('in_stock',0)->get(); \n }", "public function stocks()\n {\n return $this->hasMany('App\\Models\\Stock');\n }", "function getStockItemModel() {\n\t\t\treturn $this->getCatalogInventoryHelper( )->getStockItem( $this->getStockId( ) );\n\t\t}", "public function getIdstock()\r\n {\r\n return $this->idstock;\r\n }", "public function all() {\n $stmt = $this->pdo->query('SELECT id, symbol, company '\n . 'FROM stocks '\n . 'ORDER BY symbol');\n $stocks = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $stocks[] = [\n 'id' => $row['id'],\n 'symbol' => $row['symbol'],\n 'company' => $row['company']\n ];\n }\n return $stocks;\n }", "public function getQuantite_stock()\r\n {\r\n return $this->quantite_stock;\r\n }", "public function getStockGoods()\n {\n $reportStock = new ReportStock();\n return Collection::times(10)->map(function ($value) use ($reportStock) {\n $stock = $reportStock->getStockGoods(new Request([\n 'stock_date' => $date = Carbon::now()->subWeeks($value - 1)\n ]));\n\n return collect([\n 'date' => $date->toDateString(),\n 'stocks' => $stock->count()\n ]);\n });\n }", "public function stocks(): HasMany\n {\n return $this->hasMany('Ronmrcdo\\Inventory\\Models\\InventoryStock');\n }", "public function get_single_stock() {\n\n\t\t$inventory = $this->get_inventory();\n\n\t\treturn ! empty( $inventory ) ? current( $inventory ) : null;\n\t}", "public function get_branchwise_product_stock_correction() {\n $branchwise_product_store_list = $this->Branchwise_product_store_Model->get_branchwise_product_store();\n if (!empty($branchwise_product_store_list)) {\n $arr = array();\n foreach ($branchwise_product_store_list as $branchwise_product_store) {\n $branchwise_product_store_from_previous_date_by_product_id_branch_id = $this->Branchwise_product_store_Model->get_branchwise_product_store_from_previous_date_by_product_id_branch_id($branchwise_product_store->product_store_date, $branchwise_product_store->product_id, $branchwise_product_store->branch_id);\n $open_stock = !empty($branchwise_product_store_from_previous_date_by_product_id_branch_id) ? $branchwise_product_store_from_previous_date_by_product_id_branch_id->closing_stock : 0;\n $closing_stock = (int) ($open_stock + $branchwise_product_store->receive_stock - $branchwise_product_store->transfer_stock - $branchwise_product_store->sale_from_stock - $branchwise_product_store->damage_stock);\n $branchwise_product_store_data = array(\n 'id' => $branchwise_product_store->id,\n 'product_store_date' => $branchwise_product_store->product_store_date,\n 'product_id' => $branchwise_product_store->product_id,\n 'branch_id' => $branchwise_product_store->branch_id,\n 'open_stock' => $open_stock,\n 'receive_stock' => $branchwise_product_store->receive_stock,\n 'transfer_stock' => $branchwise_product_store->transfer_stock,\n 'sale_from_stock' => $branchwise_product_store->sale_from_stock,\n 'damage_stock' => $branchwise_product_store->damage_stock,\n 'closing_stock' => $closing_stock,\n );\n array_push($arr, $branchwise_product_store_data);\n //$this->db->where('id', $branchwise_product_store_data['id']);\n //$this->Branchwise_product_store_Model->db->update('branchwise_product_store', $branchwise_product_store_data);\n }\n echo 'branchwise product store';\n echo '<br>';\n echo '<pre>';\n print_r($arr);\n echo '</pre>';\n die();\n }\n }", "public function ListarProductosStockMinimo()\n{\n\tself::SetNames();\n\t$sql = \" select * from productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria WHERE productos.existencia <= productos.stockminimo\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function stockCount()\n {\n return $this->variations->sum(function ($variation) {\n return $variation->stockCount();\n });\n }", "private function getStockListContents(): array\n {\n $list = $this->stocklistID;\n $this->db->select('i.eve_iditem as id, i.name as name, i.volume as vol');\n $this->db->from('itemlist il');\n $this->db->join('itemcontents ic', 'ic.itemlist_iditemlist = il.iditemlist');\n $this->db->join('item i', 'i.eve_iditem = ic.item_eve_iditem');\n $this->db->where('il.iditemlist', $list);\n $query = $this->db->get();\n $result = $query->result();\n\n return $result;\n }", "public function getStockInfo() {\n //Fetch the product model \n $product = $this->getProduct();\n\n //Get the quantity from the product model \n $stock = $this->stockRegistry->getStockItem($product->getId());\n\n //Retun stock quantity here \n return $stock->getQty();\n }", "public function getOneOfStock()\n {\n if ($this->stock[0]) {\n $dominoTile = $this->stock[0];\n unset($this->stock[0]);\n $newStock = array_values($this->stock);\n $this->stock = $newStock;\n\n return $dominoTile;\n } else {\n return null;\n }\n }", "public function stock_history(){\n\t\treturn $stock_info = $this->db->select('*')\n\t\t ->from('store')\n\t\t ->where('isactive',1)\n\t\t ->get()\n\t\t ->result();\n\t}", "public function stockInOut()\n {\n return $this->hasMany('App\\Models\\Stock\\InOutModel', 'stock_id', 'id');\n }", "public function ListarIngredientesStockMinimo()\n{\n\tself::SetNames();\n\t$sql = \" select * from ingredientes WHERE CAST(cantingrediente AS DECIMAL(10,5)) <= CAST(stockminimoingrediente AS DECIMAL(10,5))\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function load_stocks() {\n\t\t\t$res = $this->Restaurant_model->loading_stocks();\n\t\t\techo $res;\n\t\t}", "public function getStock(): int\n {\n return $this->stock;\n }", "function get_espacio_stocks()\n\t{\n\t\t// Create a temporary user object\n\t\t$e = new Espacio_stock();\n\t\t//Buscar en la base de datos\n\t\t$e->where('estatus_general_id','1');\n\t\t$e->get();\n\t\tif($e->c_rows>0){\n\t return $e;\n\t\t} else {\n\t return FALSE;\n\t\t}\n\t}", "protected function modify_store_data($stock)\n {\n\n $data = [];\n\n $data['stock_incoming'] = $stock->filter(function ($item) {\n return $item->type == 'incoming';\n });\n\n $data['stock_expense'] = $stock->filter(function ($item) {\n return $item->type == 'expense';\n });\n\n return $data;\n }", "function get_espacio_stocks_almacen($empresa_id)\n\t{\n\t\t$u = new Espacio_stock();\n\t\t$sql=\"select c.*, s.nombre from espacios_stock as c left join stock as s on s.id=c.stock_id left join espacios_fisicos as ef on ef.id=c.espacio_fisico_id where ef.empresas_id='$empresa_id' and s.estatus_general_id='1' and ef.estatus_general_id='1' order by nombre\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0)\n\t\t\treturn $u;\n\t\telse\n\t\t\treturn FALSE;\n\n\t}", "public function getInStockStockItems()\n {\n if ($this->getLastCheckQty() != $this->getQty()) {\n $stockItems = array();\n foreach ($this->getStockItems() as $stockItem) {\n $result = $this->checkQty($stockItem);\n if (!$result->getHasError()) {\n $stockItem->setItemBackorders($result->getItemBackorders());\n $stockItems[$stockItem->getStockId()] = $stockItem;\n }\n }\n $this->_inStockStockItems = $stockItems;\n $this->setLastCheckQty($this->getQty());\n }\n return $this->_inStockStockItems;\n }", "public function getStock($debug = false)\n {\n return $this->call(self::ENDPOINT_STOCKBASE_STOCK, $debug);\n }", "protected function getStockItemsCollection()\n {\n return $this->getWarehouseHelper()\n ->getCatalogInventoryHelper()\n ->getStockItemCollection($this->getProductId(), true);\n }", "public function stock()\n {\n return $this->belongsTo('App\\Inventory\\Models\\InventoryStock', 'stock_id', 'id');\n }", "public function getStockLocations($productId)\n {\n\tif($this->_stockLocations !== null) {\n\t return $this->_stockLocations;\n\t}\n\t\n\t$return = array();\n\t$warehouses = Mage::getModel('temando/warehouse')->getCollection();\n\t\n\tforeach($warehouses->getItems() as $warehouse) {\n\t if($warehouse->hasProduct($productId)) {\n\t\t$warehouse->setElementId('qty_to_ship_'.$productId);\n\t\t$return[] = $warehouse;\n\t }\n\t}\n\t\n\treturn $return;\n }", "public function getAllPossibleArticulations()\n {\n // Get the SEs filtered by Permissible Articulations for that appropriate Bone type\n $sb = $this->skeletalbone()->first();\n $sb_articluations = $sb->articulations;\n $articluations_list = null;\n if ($sb_articluations->count()) {\n $query = SkeletalElement::whereIn(\"sb_id\", $sb_articluations->pluck('id'))\n ->where(\"side\", \"!=\", $this->getOppositeSide()) // not opposite side\n ->where(\"id\", \"!=\", $this->id); // not the same se (for bones that can articulate to themselves such as unseriated cervical vertebra)\n $articluations_list = $query->latest()->get();\n }\n return $articluations_list;\n }", "public function newstock()\n {\n for ($i=0; $i<=6; $i++) {\n for ($j=0; $j<=$i; $j++) {\n $stock[] = [$i,$j];\n }\n }\n $this->stock = $stock;\n }", "public function getALL()\n {\n // Sentencia SQL\n $sql = \"SELECT categorias.nombre AS 'NombreDeLaCategoria', productos.* FROM productos INNER JOIN categorias ON categorias.id = productos.categoria_id ORDER BY stock ASC\";\n $productos = $this->conexion->query($sql);\n\n // Retorno el resultado a \"productosControlles.php\" al metodo \"gestion()\"\n return $productos;\n }", "public function getStockInformation($symbol, $date)\n {\n $this->updateStockClosingPriceForSymbols([ $symbol ]);\n\n $stock = $this->findOrCreateStock($symbol);\n $price = $this->getSymbolPriceForDate($symbol, $date);\n\n return [ $stock, $price ];\n }", "public function loadStockData(){\n if (JeproshopTools::isLoadedObject($this, 'product_id')){\n // By default, the product quantity correspond to the available quantity to sell in the current shop\n $this->quantity = JeproshopStockAvailableModelStockAvailable::getQuantityAvailableByProduct($this->product_id, 0);\n $this->out_of_stock = JeproshopStockAvailableModelStockAvailable::outOfStock($this->product_id);\n $this->depends_on_stock = JeproshopStockAvailableModelStockAvailable::dependsOnStock($this->product_id);\n if (JeproshopContext::getContext()->shop->getShopContext() == JeproshopShopModelShop::CONTEXT_GROUP && JeproshopContext::getContext()->shop->getContextShopGroup()->share_stock == 1){\n $this->advanced_stock_management = $this->useAdvancedStockManagement();\n }\n }\n }", "public function ingredientSuppliers(){\n return $this->hasMany(SupplierStock::class);\n }", "private function getProducts(): array\n {\n return $this->_type === 'price'\n ? $this->_priceProducts\n : $this->_stockProducts;\n }", "public function getInStockStockIds()\n {\n $stockIds = array();\n foreach ($this->getInStockStockItems() as $stockItem) {\n $stockId = $stockItem->getStockId();\n $stockIds[$stockId] = $stockId;\n }\n return $stockIds;\n }", "private function selectProductLowStock(){\n\t\t$data = $this->connection->createCommand('select id, sku, name, minimum_quantity, quantity from product where minimum_quantity is not null and quantity <= minimum_quantity and product_type_id = 2 and tenant_id = '. $this->tenant)->queryAll();\n\t\tforeach($data as $key => $value){\t\n\t\t\t$sqlBalance = 'select * from stock_balance where product_id = '. $value['id'];\n\t\t\t$sqlBalance = $this->connection->createCommand($sqlBalance)->queryOne();\n\t\t\tif(!empty($sqlBalance['warehouse_id'])){\n\t\t\t\t$sqlBalance['warehouse_id'] = $this->connection->createCommand('select id,name from warehouse where id = '. $sqlBalance['warehouse_id'])->queryOne();\n\t\t\t\t$data[$key]['balance'] = $sqlBalance;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function getProductStock()\n {\n /** @var \\Magento\\CatalogInventory\\Model\\Stock\\ItemArray $stockItem */\n $stockItem = $this->stockRegistry->getStockItem(\n $this->getCurrentProduct()->getId(),\n $this->getCurrentProduct()->getStore()->getWebsiteId()\n );\n if ($stockItem->getManageStock() == 0) {\n return 1;\n }\n\n $qty = round($stockItem->getQty());\n if ($qty < 1) {\n if ($stockItem->getBackorders() == 1) {\n return 1;\n }\n\n if ($stockItem->getIsInStock()) {\n return '';\n }\n }\n return $qty;\n }", "public function stock()\n {\n return $this->belongsTo(Stock::class);\n }", "public function getStockroom()\n {\n $this->load->model('stockroom/exchange');\n $response = $this->model_stockroom_exchange->getStockroom();\n if ($response) {\n foreach ($response as $stockroom) {\n $this->model_stockroom_exchange->parseStockroomResponse($stockroom);\n }\n }\n $flag = true;\n while ($flag) {\n $response = $this->model_stockroom_exchange->getAmount();\n if ($response) {\n foreach ($response as $product) {\n $this->model_stockroom_exchange->parseAmountResponse($product);\n }\n } else {\n $flag = false;\n }\n }\n if ($this->request->server['REQUEST_METHOD'] == 'GET') {\n $this->response->redirect(\n $this->url->link(\n 'stockroom/stockroom',\n 'user_token=' . $this->session->data['user_token'],\n true\n )\n );\n }\n }", "public function stockOut()\n {\n return $this->hasMany('App\\Models\\Stock\\InOutModel', 'stock_id', 'id');\n }", "private function stockData($id)\n {\n // ->join('products as b','b.product_id','=','a.product_id')\n // ->join('product_types as c','c.product_type_id','=', 'b.product_type_id')\n // ->join('prices as d','d.stock_id', '=', 'a.stock_id')\n // ->join('units as e','e.unit_id','=','d.unit_id')\n // ->join('srp as f','f.product_id','=','b.product_id')\n // ->where('a.stock_id','=', $id)\n // ->first();\n \n // return $products;\n }", "public function getStockOpnames()\n {\n // dd($this->request);\n $cek = $this->request->query('cek');\n \n $where = '';\n if($cek){\n $where = 'category_id = '. $cek .'';\n }\n $this->loadModel('Products');\n $this->loadModel('Stocks');\n\n $InStocks = $this->Stocks->find();\n $OutStocks = $this->Stocks->find();\n $priceStocks = $this->Stocks->find();\n\n if ($this->request->is('ajax')) {\n $data = $this->Products->find('all', [\n 'conditions' => [\n $where\n ],\n 'contain' =>[\n 'SubCategories'\n ]\n ])->select([\n 'id' => 'Products.id',\n 'code' => 'Products.code',\n 'name' => 'Products.name',\n 'product_saldo' => '(IFNULL((' .\n $InStocks->select(\n [\n 'SUM' => $InStocks->func()->sum('qty')\n ]\n )->where([\n 'type = \"IN\"',\n 'product_id = Products.id'\n ])\n . '), 0)) - (IFNULL((' .\n $OutStocks->select(\n [\n 'SUM' => $OutStocks->func()->sum('qty')\n ]\n )->where([\n 'type = \"OUT\"',\n 'product_id = Products.id'\n ])\n . '), 0))',\n 'price' => $priceStocks->select([\n 'price'\n ])->where([\n 'type = \"IN\"',\n 'product_id = Products.id',\n ])->order(['date' => 'DESC'])->limit(1)\n ]);\n\n $results = [];\n $a = 0;\n\n foreach ($data as $key => $val) {\n $results[$a]['id'] = $val->id;\n $results[$a]['name'] = '[' . $val->code . '] ' . $val->name;\n $results[$a]['product_saldo'] = $val->product_saldo;\n $results[$a]['price'] = $val->price;\n $a++;\n }\n\n $this->set(compact('results'));\n $this->set('_serialize', ['results']);\n }\n }", "public function searchStock($value)\n\t{\n\t\treturn $this->stock->where('name','LIKE','%'.$value.'%')->get();\n\t}", "public function stock(Request $request)\n { \n // Get Stock Order\n if($request->get('order')){\n $order = $request->get('order');\n } else {\n $order = 'ASC';\n }\n\n // Gey Search Keys\n $bycode = $request->get('code');\n $byname = $request->get('name');\n \n if($bycode && $byname) {\n $products = Producto::where('codigo', '=', \"$bycode\")->where('nombre', 'LIKE', \"%$byname%\")->orderBy('stock1', \"$order\")->paginate(20);\n \n } elseif($bycode) {\n $products = Producto::where('codigo', '=', \"$bycode\")->orderBy('stock1', \"$order\")->paginate(20);\n \n } elseif($byname) {\n $products = Producto::where('nombre', 'LIKE', \"%$byname%\")->orderBy('stock1', \"$order\")->paginate(20);\n \n } else {\n $products = Producto::orderBy('stock1', $order)->paginate(20);\n }\n\n return view('vadmin.productos.stock')\n ->with('products', $products);\n \n\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 getStockContainer()\n {\n $reportStock = new ReportStock();\n return Collection::times(10)->map(function ($value) use ($reportStock) {\n $stock = $reportStock->getStockContainers(new Request([\n 'stock_date' => $date = Carbon::now()->subWeeks($value - 1)\n ]));\n\n $groupStock = $stock->groupBy('container_size')\n ->select('container_size')\n ->selectRaw('COUNT(container_size) AS total')\n ->get()\n ->mapWithKeys(function ($item) {\n return [$item->container_size => $item->total];\n });\n\n if (!$groupStock->has('20')) $groupStock[20] = 0;\n if (!$groupStock->has('40')) $groupStock[40] = 0;\n if (!$groupStock->has('45')) $groupStock[45] = 0;\n\n return collect([\n 'date' => $date->toDateString(),\n 'stocks' => $groupStock\n ]);\n });\n }", "public function stockHold()\n {\n return $this->hasMany('App\\Models\\Stock\\HoldModel', 'stock_id', 'id');\n }", "function _get_product_stock_bystkid($stock_id = 0)\r\n {\r\n return @$this->db->query(\"select available_qty as t from t_stock_info where stock_id = ? and available_qty >= 0 \",$stock_id)->row()->t;\r\n }", "public function allGoods()\n {\n $query = [];\n $unwind = [\n '$unwind' => '$awards',\n ];\n array_push($query, $unwind);\n $groupBy = [\n '$group' => [\n '_id' => '$awards.items.classification.description',\n 'count' => ['$sum' => 1],\n ],\n ];\n array_push($query, $groupBy);\n $result = OcdsRelease::raw(\n function ($collection) use ($query) {\n return $collection->aggregate($query);\n }\n );\n\n return ($result);\n\n }", "public function run()\n {\n $linenstock = [\n \t[\n 'id' => '1',\n 'items' => 'Sheets (Dbl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '2',\n 'items' => 'Sheets (Sgl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '3',\n 'items' => 'Pillow case',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '4',\n 'items' => 'Bath towels',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '5',\n 'items' => 'Hand towels',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '6',\n 'items' => 'Face towels',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '7',\n 'items' => 'Bath mat',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '8',\n 'items' => 'Blankets (Dbl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '9',\n 'items' => 'Blankets (Sgl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '10',\n 'items' => 'Bed cover (Dbl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ],\n [\n 'id' => '11',\n 'items' => 'Bed cover(Sgl)',\n 'stock' => '',\n 'new' => '',\n 'total1' => '',\n 'less' => '',\n 'total2' => '',\n 'actual' => '',\n 'discrepancies' => '',\n ] \n ];\n Linenstock::insert($linenstock);\n }", "private function getStoreOpenings( $store ) {\n\t\t$result = null; \n\t\tforeach ( $this->data as $id => $location ) {\n\t\t\tif( $store === $id ) {\n\t\t\t\tforeach ( $location as $key => $value ) {\n\t\t\t\t\tif( $key === 'geöffnet' ) {\n\t\t\t\t\t\tforeach ( $value as $day => $openingHours ) {\n\t\t\t\t\t\t\t$result[ $day ] = $openingHours;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function hasStock() {\n \t$this->load_articles();\n \tforeach ( $this->articles as $articleObj ) {\n \t\tif ( $articleObj->getStock() > 0 ) {\n \t\t\treturn true;\n \t\t} \n \t}\n \treturn false;\n }", "public function getSalesTransactions($stock){\n\n $this->db->select('*');\n $this->db->from('transactions t');\n $this->db->where('t.Stock', $stock);\n $query = $this->db->get();\n\n $item = [\n \"DateTime\" => \"N/A\",\n \"Player\" => \"N/A\",\n \"Stock\" => \"N/A\",\n \"Trans\" => \"N/A\",\n \"Quantity\" => \"N/A\"\n ];\n\n $resultset = array();\n\n array_push($resultset, $item);\n\n if($query->num_rows() != 0)\n {\n $resultset = $query->result_array();\n }\n\n return $resultset;\n }", "function getProductStockDetail($productCode) {\n\tif(!$productCode || $productCode == '') return array();\n\t$query = 'SELECT ii.Sucursal, ii.Existencia, s.Nombre, s.Direccion, s.Telefonos, s.eCommerceSincroniza\n\t\tFROM [|PREFIX|]intelisis_inv ii\n\t\tLEFT OUTER JOIN [|PREFIX|]intelisis_Sucursal s ON (ii.Sucursal=s.Sucursal)\n\t\tWHERE ii.SKU = \"'.$productCode.'\"';\n\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\n\t$return = array();\n\t\n\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)){\n\t\t// ToDo: El check $row['Existencia'] == 0 hacerlo opcional (\"Mostrar existencias en cero\")\n\t\tif($row['eCommerceSincroniza'] == 0 || $row['Existencia'] == 0) continue;\n\t\t$sucursal = ($row['Nombre'] != '') ? $row['Nombre'] : $row['Sucursal'];\n\t\t$existencia = $row['Existencia'];\n\t\t$contacto = (trim($row['Direccion']) == '' && trim($row['Telefonos']) == '') ? 'No se encontraron los detalles de contacto de esta Sucursal' : $row['Direccion'] . \"<br/>tel:\" .$row['Telefonos'];\n\t\t\n\t\t$return[$row['Sucursal']] = array(\n\t\t\t'Nombre' => $sucursal,\n\t\t\t'Existencia' => $existencia,\n\t\t\t'Contacto' => $contacto,\n\t\t);\n\t}\n\t\n\treturn $return;\n}", "public function getIsInStock($variation_id, array $locations);", "public function getStockByBatch($lot_no){\n\t \t$this->db->select('sum( `inw_qty` ) - sum( `outw_qty` ) AS instock');\n\t\t$this->db->from('product_stock');\n\t\t$this->db->where(\"lot_no\",$lot_no);\t\t\n\t\t$query_prod_stock = $this->db->get();\n\t\t//echo $this->db->last_query();die;\n\t\tif($query_prod_stock->num_rows()>0){\n\t\t\treturn $query_prod_stock->result_array();\n\t\t}else{\n\t\t\treturn array();\n\t\t}\n\t }", "public function getAdjustStock() {\n return Mage::getModel('inventoryplus/adjuststock')->load($this->getRequest()->getParam('id'));\n }", "public function updateStock(array $stock) {\n\t\t$saved = true;\n\t\tforeach ($stock as $k => $v) {\n\t\t\tif (!empty($v[$this->ShopBranchStockLog->alias])) {\n\t\t\t\t$v = $v[$this->ShopBranchStockLog->alias];\n\t\t\t}\n\t\t\t$saved = $saved && $this->updateAll(\n\t\t\t\tarray($this->alias . '.stock' => $this->find('totalProductStock', $v) + $v['change']),\n\t\t\t\tarray(\n\t\t\t\t\t$this->alias . '.shop_branch_id' => $v['shop_branch_id'],\n\t\t\t\t\t$this->alias . '.shop_product_variant_id' => $v['shop_product_variant_id'],\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn $saved;\n\t}", "public function show(Stock $stock)\n {\n return $stock;\n }", "function getMovementsStock($name) {\n $res = $this->some('code', $name);\n $newRes = array();\n \n $index = count($res) - 1;\n \n //stores queried data into array\n while($index > 0) {\n $tmpRes = array();\n array_push($tmpRes, $res{$index}->datetime, $res{$index}->action, $res{$index}->amount);\n array_push($newRes, $tmpRes);\n $index--;\n }\n return $newRes;\n }", "public function getAllStandsOfAllEvents()\n {\n try {\n $allStands = Stand::with('event', 'company')\n ->get()\n ->toArray();\n return $allStands;\n\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n }", "public function api_search_stock($name)\n {\n $stock_list = $this->wr->searchStock($name);\n return response()->json($stock_list,200);\n }", "public function getVariants()\n {\n return $this->variants;\n }", "public function getWarehouses($item){\n $warehouses = array();\n $sql = \"select stocks.warehouseCode,name,number from stocks join warehouse WHERE isbn='\".$item['isbn'].\"' and stocks.warehouseCode=warehouse.warehouseCode\";\n $ps = $this->pdo->prepare($sql);\n $ps->execute();\n $ps->setFetchMode(PDO::FETCH_ASSOC);\n while ($row = $ps->fetch()) {\n $warehouses[] = $row;\n }\n return $warehouses;\n }", "function get_stocked($obj, $id){\n\t$result_array = $obj->Query_reader->get_row_as_array('get_stocked',array('id' => $id));\n\treturn $result_array['total'];\n}", "public function getThresholdProducts(){\n\t\t\n\t\t$this->db->select('(SUM(inw_qty) - SUM(outw_qty)) AS prod_stock, P.product_name, P.pid, P.min_qty');\n\t\t$this->db->from('product_stock AS PS');\n\t\t$this->db->join(\"product AS P\", \"P.pid = PS.pid\");\n\t\t$this->db->group_by('PS.pid');\n\t\t$this->db->having('prod_stock < P.`min_qty`');\n\t\t$query_products_outof_stock = $this->db->get();\n\t\t//echo $this->db->last_query();die;\n\t\tif($query_products_outof_stock->num_rows()>0)\n\t\t{\n\t\t\treturn $query_products_outof_stock->result_array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t}", "function _set_stock_info(&$data)\n\t{\n\t\tforeach ($this->cart->contents() as $item)\n\t\t{\n\t\t\t$prod_id = $item['id'];\n\t\t\t$product = $this->database->GetProductById($prod_id);\n\n\t\t\t//Check stock and set stock info\n\t\t\t$data['products'][$item['rowid'].'stock_state'] = $this->_set_stock_state($product, $item);\n\n\t\t\t$data['products'][$prod_id] = $product;\n\t\t}\n\t}", "public function items()\n {\n return $this->hasMany('App\\Models\\Misc\\Equipment\\EquipmentStocktakeItem', 'stocktake_id');\n }", "public static function getLowStock() {\n $dataUnit = ArrayHelper::map(Unit::find()->where(['<>','status','inactive'])->all(), 'id', 'unit');\n /* custom sql query */\n $sqlQuery = \" \n SELECT \n s.id,\n s.part_id,\n p.part_no,\n p.restock,\n p.manufacturer\n FROM \n stock s,\n part p\n WHERE \n s.part_id = p.id AND\n s.status = 'active'\n GROUP by\n s.part_id\n \";\n\n $stockQuery = Yii::$app->db->createCommand($sqlQuery)->queryAll();\n // d($stockQuery);exit;\n /* custom sql query for grand total only */\n foreach ( $stockQuery as $key => $sQ){\n $partId = $sQ['part_id'];\n $sqlQueryTotal = \" \n SELECT \n sum(quantity) sumsQ,\n unit_id\n FROM \n stock s\n WHERE\n s.status = 'active' AND \n s.part_id = $partId\n \";\n\n $stockQtyTotal = Yii::$app->db->createCommand($sqlQueryTotal)->queryOne();\n if ( number_format($stockQtyTotal['sumsQ'], 3, '.', '') >= $stockQuery[$key]['restock'] ) {\n unset($stockQuery[$key]);\n } else {\n $stockQuery[$key]['sumsQ'] = number_format($stockQtyTotal['sumsQ'], 3, '.', '');\n $stockQuery[$key]['unit_id'] = $dataUnit[$stockQtyTotal['unit_id']];\n }\n }\n\n\n /* get result data here */\n $data['dataProvider'] = [\n 'key'=>'id',\n 'pagination' => [\n 'pageSize' => 20,\n ],\n 'allModels' => $stockQuery,\n 'sort' => [\n 'attributes' => ['part_id'],\n ],\n ];\n $data['stockQuery'] = $stockQuery;\n\n\n\n return $data;\n }", "public function getShelf() {\n $fields = array(\"shelf\" => array(\n 'shelfHeader' => 'header',\n 'shelfMusic',\n 'shelfClassification' => \"searchCode\",\n )\n );\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), $fields);\n\n return (is_array($result)) ? reset($result) : $result;\n }", "function fetchAllItemCurrentStock()\r{\r $link = parent::connectToDB();\r\t$query=\"select stock.item_id,item.name_brand,category.name,sum(stock.current_stock) from item,category,stock where stock.item_id=item.item_id and item.category_id=category.category_id group by stock.item_id\";\r\t$result8 = mysqli_query($link, $query);\rif($result8)\r{\rreturn $result8;\r}\relse\r{\rreturn false;\r}\r}", "public function populate_stocks($products) {\n\n foreach($products as &$p) {\n $this->db->select('s.id, s.name, st.stock');\n $this->db->from('stores AS s');\n $this->db->join('stocks AS st', 's.id = st.store_id', 'left');\n $this->db->where('st.products_id', $p->id);\n $p->stocks = $this->db->get()->result();\n }\n\n return $products;\n }", "public function obtener_stock($cod,$sede)\n\t\t{ \n\t\t\t$this->load->database();\n\t\t\t$sql = 'select * from stock where id_insumo='.$cod.' and id_sede='.$sede;\n\t\t\t$consulta=$this->db->query($sql);\n\t\t\t$codigo=$consulta->row();\n\t\t\treturn $codigo->stock_real;\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "function ViewStockAdjustmentTransaction()\n {\n $sql=\"select * from INVT_T_STOCK_ADJ_HEAD \";\n return $this->db->query($sql, $return_object = TRUE)->result_array();\n }", "public function addStock($stock)\n {\n $this->stocks[] = $stock;\n }", "public function AddStockProduitsEntreprise()\n\t{\n\t\t$produits_entreprise = Entreprise::where(['id' => 1])->first()->liste_produits;\n\t\tforeach ($produits_entreprise as $i => $produit)\n\t\t{\n\t\t\t$produits_entreprise[$i]['stocks'] = [\n\t\t\t\t0 => [\n\t\t\t\t\t\"id\" => 0,\n\t\t\t\t\t\"model\" => \"Piece\",\n\t\t\t\t\t\"couleur\" => [\n\t\t\t\t\t\t'nom' => \"Aucune\",\n\t\t\t\t\t\t'code_hexa' => \"\"\n\t\t\t\t\t],\n\t\t\t\t\t\"prix\" => 5,\n\t\t\t\t\t\"activer\" => true,\n\t\t\t\t\t\"longueur\" => 1,\n\t\t\t\t\t\"largeur\" => 2,\n\t\t\t\t\t\"hauteur\" => 3,\n\t\t\t\t\t\"volume\" => 6,\n\t\t\t\t\t\"poids\" => 5,\n\t\t\t\t\t\"stock\" => 20,\n\t\t\t\t\t\"afficher\" => true\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\t\tEntreprise::where(['id' => 1])->update(['liste_produits' => json_encode($produits_entreprise)]);\n\t}", "public function allProduct($flower) {\n $result = $this->connection->query(\n \"SELECT p.ID id, p.name name, p.price price, p.availability availability,\n p.description description, COUNT(pu.ID) quantity\n FROM product p LEFT JOIN purchase pu ON (p.ID=pu.id_product)\n WHERE p.id_flower=$flower\n GROUP BY p.ID, p.name, p.price, p.availability, p.description;\"\n );\n return $result->fetchAll(PDO::FETCH_OBJ);\n }", "public function setStock($stock);", "public function byStock0($id1,$id2){\n //el id2 es la sucursal seleccionada, con ello veremos si existe dicho\n //articulo en esa sucursal\n //escuchando occult nine op :D si se puede, esta funcion es para ambas pq al fin al cabo ambos em piden el stock del otro la cual sera el relativo :D\n\n //primero veremos si estamos en almacen, para ver si existe o no\n $idsucursal=Auth::user()->id_s;\n\n if($id2==3)\n {\n //los articulos siempre existen aqui, desde mi sucursal\n $consulta=Articulo::where('idarticulo','=',$id1)->get();\n foreach($consulta as $con){\n $sustock=$con->stock;\n }\n\n $referencial=DB::table('notificacion_traslado as nt')\n ->join('detalle_traslado as dt','dt.idnotificacion_tras','=','nt.idnotificacion_traslado')\n ->select(DB::raw('SUM(dt.cantidad) as suma'),'dt.idarticulo')\n ->where('nt.idemisor','=',$id2)\n ->where('nt.estado','=','En espera')\n ->groupBy('dt.idarticulo')\n ->having('dt.idarticulo','=',$id1)\n ->get();\n\n if(count($referencial)>1){\n foreach($referencial as $ref){\n $mostrar=$referencial->suma;\n }\n $referencia=$sustock-$mostrar;\n }else{\n $mostrar=0;\n $referencia=$sustock-$mostrar;\n }\n\n $consulta2=Traslado::where('idsucursal','=',$idsucursal)->where('idarticulo','=',$id1)->get();\n\n foreach($consulta2 as $con2){\n $mistock=$con2->stock;\n }\n\n\n\n\n\n }else{\n //verificando si existe, reduciendo codigo, recordando que el stock es sacado desde la condicional Articulo si el emisor es almacen, else desde traslado\n $consulta=Traslado::where('idsucursal','=',$id2)->where('idarticulo','=',$id1)->get();\n foreach($consulta as $con){\n $sustock=$con->stock;\n }\n\n //verificando :v\n if(isset($sustock)==false){\n $referencia='mensaje';\n $mistock='no';\n }else{ //porq el articulo a pedir existe\n $referencial=DB::table('notificacion_traslado as nt')\n ->join('detalle_traslado as dt','dt.idnotificacion_tras','=','nt.idnotificacion_traslado')\n ->select(DB::raw('SUM(dt.cantidad) as suma'),'dt.idarticulo')\n ->where('nt.idemisor','=',$id2)\n ->where('nt.estado','=','En espera')\n ->groupBy('dt.idarticulo')\n ->having('dt.idarticulo','=',$id1)\n ->get();\n\n if(count($referencial)>1){\n $mostrar=0;\n $referencia=$sustock;\n //para dar mi stock tengo q saber donde estoy pz\n //**********************************************\n foreach($referencial as $ref){\n $mostrar=$referencial->suma;\n }\n $referencia=$sustock-$mostrar;\n //***********************************************\n if($idsucursal==3){\n //estoy en almacen ok :D\n $consulta2=Articulo::where('idarticulo','=',$id1)->get();\n\n foreach($consulta2 as $con2){\n $mistock=$con2->stock;\n }\n\n }else{ //no estaba en almacen\n\n $consulta2=Traslado::where('idsucursal','=',$idsucursal)->where('idarticulo','=',$id1)->get();\n\n foreach($consulta2 as $con2){\n $mistock=$con2->stock;\n }\n\n }//fin para mandar mi stock\n\n\n }else{ //else de si referencial es mayor que 1\n //************************************************\n $mostrar=0;\n $referencia=$sustock-$mostrar;\n //************************************************\n if($idsucursal==3){\n //estoy en almacen ok :D\n $consulta2=Articulo::where('idarticulo','=',$id1)->get();\n\n foreach($consulta2 as $con2){\n $mistock=$con2->stock;\n }\n\n }else{ //no estaba en almacen\n\n $consulta2=Traslado::where('idsucursal','=',$idsucursal)->where('idarticulo','=',$id1)->get();\n\n foreach($consulta2 as $con2){\n $mistock=$con2->stock;\n }\n\n }//fin para mandar mi stock\n\n\n }\n }\n\n } //fin para calcular todo, al fin :v\n\n\n return([$mistock,$referencia]);\n }", "public function reservarStock(){\n $registrosCarro = $this->obtenerItemsCarro();\n\n //Tengo que crear movimientos por reserva segun el stock disponible y prioridad de las bodegas\n foreach ($registrosCarro as $item) {\n // Obtengo stocks segun orden\n $stocks = ProductosStock::getStockProductos($item->producto_id,$item->categoria_id);\n //Itero y muevo a almacen online\n $cantidad = $item->cantidad;\n foreach ($stocks as $stock) {\n $cantidad = $stock->moverAOnline($cantidad,$this->id_pedido);\n if ($cantidad <= 0)\n break;\n }\n }\n }", "public function purchasedBooks()\n { \n return $this->orders();\n }", "function fetchFromStock($id_stockdluo)\r\n\t{\r\n\t\t$sql = \"SELECT\";\r\n\t\t$sql.= \" pb.batch,\";\r\n\t\t$sql.= \" pl.sellby,\";\r\n\t\t$sql.= \" pl.eatby,\";\r\n\t\t$sql.= \" ps.fk_entrepot\";\r\n\r\n\t\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"product_batch as pb\";\r\n\t\t$sql.= \" JOIN \".MAIN_DB_PREFIX.\"product_stock as ps on pb.fk_product_stock=ps.rowid\";\r\n\t\t$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.\"product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product\";\r\n\t\t$sql.= \" WHERE pb.rowid = \".(int) $id_stockdluo;\r\n\r\n\t\tdol_syslog(get_class($this).\"::fetch\", LOG_DEBUG);\r\n\t\t$resql=$this->db->query($sql);\r\n\t\tif ($resql)\r\n\t\t{\r\n\t\t\tif ($this->db->num_rows($resql))\r\n\t\t\t{\r\n\t\t\t\t$obj = $this->db->fetch_object($resql);\r\n\r\n\t\t\t\t$this->sellby = $this->db->jdate($obj->sellby);\r\n\t\t\t\t$this->eatby = $this->db->jdate($obj->eatby);\r\n\t\t\t\t$this->batch = $obj->batch;\r\n\t\t\t\t$this->entrepot_id= $obj->fk_entrepot;\r\n\t\t\t\t$this->fk_origin_stock=(int) $id_stockdluo;\r\n\t\t\t}\r\n\t\t\t$this->db->free($resql);\r\n\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->error=\"Error \".$this->db->lasterror();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public function getOpenings()\r\n {\r\n }", "public static function GetActualProduct($core, $seance)\n {\n //Appel de la procédure stocké qui va gérer tout cela\n $request = \"set @Vente1 = '';\n set @TimeEnd1 = '';\n set @Vente2 = '';\n set @TimeEnd2 = '';\n set @Vente3 = '';\n set @TimeEnd3 = '';\n set @NextVente1 = '';\n set @NextVente2 = '';\n set @NextVente3 = '';\n CALL GetActualProduct('\".$seance->IdEntite.\"', @Vente1,@TimeEnd1,@Vente2,@TimeEnd2,@Vente3,@TimeEnd3, @NextVente1,@NextVente2,@NextVente3);\";\n \n $core->Db->ExecuteMulti($request);\n \n //Recuperation des info dans la variable de sortie de la procédure\n $request =\"SELECT @Vente1, @TimeEnd1, @Vente2, @TimeEnd2, @Vente3,@TimeEnd3, @NextVente1,@NextVente2,@NextVente3;\";\n \n $result = $core->Db->GetLine($request);\n $ventes = array();\n \n //Produits en cours\n for($i=1; $i <= 3; $i++)\n {\n $vente = new EeCommerceVente($core);\n $vente->GetById($result[\"@Vente$i\"]);\n $ventes[] = $vente;\n }\n \n //Produits suivants\n for($i=1; $i <= 3; $i++)\n {\n $vente = new EeCommerceVente($core);\n $vente->GetById($result[\"@NextVente$i\"]);\n $ventes[] = $vente;\n }\n \n return $ventes;\n }", "public function get_stock($stock_id_pri = null) {\n if($stock_id_pri != null){\n $this->db->where('stock_id_pri', $stock_id_pri); \n }\n $this->db->where('shop_id_pri', $this->session->userdata('shop_id_pri'));\n $this->db->order_by('stock_id_pri');\n return $this->db->get('stock');\n }" ]
[ "0.65531206", "0.63600194", "0.6261578", "0.6231055", "0.6231055", "0.62242687", "0.62242687", "0.62242687", "0.62242687", "0.62242687", "0.61554205", "0.60537744", "0.60195446", "0.5988002", "0.59194744", "0.58896285", "0.5798436", "0.5758166", "0.57405263", "0.57309055", "0.5673512", "0.55819476", "0.5576354", "0.5535283", "0.55095565", "0.5483348", "0.5475444", "0.5455976", "0.5454411", "0.54475015", "0.540221", "0.5394844", "0.5389954", "0.537714", "0.53164244", "0.5300213", "0.52958375", "0.52836", "0.5280298", "0.5229735", "0.5228053", "0.52262723", "0.52238184", "0.5204235", "0.52034354", "0.519473", "0.51894295", "0.5185978", "0.51527005", "0.5145129", "0.5137333", "0.50933444", "0.50829166", "0.5077521", "0.50736034", "0.50622106", "0.50618833", "0.50537163", "0.5042235", "0.5039114", "0.5023411", "0.50159144", "0.5012987", "0.501261", "0.499741", "0.4989484", "0.49729937", "0.4971833", "0.49710256", "0.49628845", "0.4957856", "0.49552602", "0.49551117", "0.4947362", "0.49466896", "0.494029", "0.49392083", "0.4938172", "0.4937532", "0.49312556", "0.49272162", "0.49248886", "0.4923226", "0.49113065", "0.490887", "0.49030712", "0.4902935", "0.4901868", "0.48978952", "0.48947877", "0.48944855", "0.48899466", "0.4886163", "0.4885944", "0.48838034", "0.48836187", "0.48812994", "0.48795015", "0.48723632", "0.4870831" ]
0.6559824
0
Display a listing of the resource.
public function index() { $categories = category::all(); return view('page.category.index', ['categories' => $categories]); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &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) { $categoryCheck = category::where('categoryname', $request->categoryname)->first(); if ($categoryCheck == null) { category::create(['categoryname' => $request->categoryname]); $request->session()->flash('success', 'Add category success fully'); return redirect()->action('CategoryController@index'); } else { $request->session()->flash('danger', 'category has already exit'); return redirect()->action('CategoryController@index'); } // }
{ "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(category $category) { return "show"; // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(category $category) { return "category"; // }
{ "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, category $category) { $categoryCheck = category::where('categoryname', $request->categoryname)->first(); if ($categoryCheck == null) { category::where('id', $category->id) ->update(['categoryname' => $request->categoryname]); $request->session()->flash('info', 'Update category Success fully'); return redirect()->action('CategoryController@index'); } else { if ($categoryCheck->id == $category->id) { category::where('id', $category->id) ->update(['categoryname' => $request->categoryname]); $request->session()->flash('info', 'Update category Success fully'); return redirect()->action('CategoryController@index'); } $request->session()->flash('danger', 'category has already exit'); return redirect()->action('CategoryController@index'); } }
{ "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(category $category) { $deletecategory = category::where('id', $category->id); $deletecategory->delete(); session()->flash('success', 'Delete category Success fully'); return redirect()->action('CategoryController@index'); }
{ "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
Display a listing of the resource.
public function index() { $location=Ho_details::all(); return view('admin.master.ho_details.view',compact('location')); }
{ "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() { $state=State::all(); //$location_type=LocationType::all(); return view('admin.master.ho_details.add',compact('state')); }
{ "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) { $validator = Validator::make($request->all(), [ 'gst_number' => 'required', 'address_line_1' => 'required', 'name' => 'required', 'state_id' => 'required', 'postal_code' => 'required', 'name' => 'required|unique:ho_details,name,NULL,id,deleted_at,NULL,gst_number,'.$request->gst_number, ])->validate(); $location = new Ho_details(); $location->name = $request->name; $location->gst_number = $request->gst_number; $location->address_line_1 = $request->address_line_1; $location->address_line_2 = $request->address_line_2; $location->land_mark = $request->land_mark; $location->country_id = 1; $location->state_id = $request->state_id; $location->district_id = $request->district_id; $location->city_id = $request->city_id; $location->postal_code = $request->postal_code; $location->country_id = 1; /* Only India's States */ $location->created_by = 0; $location->updated_by = 0; if ($location->save()) { return Redirect::back()->with('success', 'Successfully created'); } else { return Redirect::back()->with('failure', 'Something Went Wrong..!'); } }
{ "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(Location $location,$id) { $location=Ho_details::find($id); return view('admin.master.ho_details.show',compact('location')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Location $location,$id) { $state=State::all(); $location=Ho_details::find($id); return view('admin.master.ho_details.edit',compact('state','location')); }
{ "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, Location $location,$id) { $location = Ho_details::find($id); $validator = Validator::make($request->all(), [ 'gst_number' => 'required', 'address_line_1' => 'required', 'name' => 'required', 'state_id' => 'required', 'postal_code' => 'required', 'name' => 'required|unique:ho_details,name,'.$id.',id,deleted_at,NULL,gst_number,'.$request->gst_number, ])->validate(); $location->name = $request->name; $location->gst_number = $request->gst_number; $location->address_line_1 = $request->address_line_1; $location->address_line_2 = $request->address_line_2; $location->land_mark = $request->land_mark; $location->state_id = $request->state_id; $location->district_id = $request->district_id; $location->city_id = $request->city_id; $location->postal_code = $request->postal_code; $location->created_by = 0; $location->updated_by = 0; if ($location->save()) { return Redirect::back()->with('success', 'Successfully Updated'); } else { return Redirect::back()->with('failure', 'Something Went Wrong..!'); } }
{ "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(Location $location,$id) { $location = Ho_details::find($id); if ($location->delete()) { return Redirect::back()->with('success', 'Deleted successfully'); } else { return Redirect::back()->with('failure', 'Something Went Wrong..!'); } }
{ "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
Display a listing of the BText.
public function index(Request $request) { $this->bTextRepository->pushCriteria(new RequestCriteria($request)); $bTexts = $this->bTextRepository->all(); return view('b_texts.index') ->with('bTexts', $bTexts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderListContent() {}", "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 listing();", "function listContent()\n {\n }", "function listing() {\r\n\r\n }", "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "public function ListTable()\n {\n echo $this->ListTableText();\n }", "function index() {\n\t\t$this->show_list();\n\t}", "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "function index() {\n \n $this->view->set('textData', $this->model->textData());\n\t\t$this->view->render('index/index');\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function actionLst()\n {\n return $this->render('lst',\n [\n 'name'=>'王聪',\n 'age'=>18,\n ]);\n }", "public function run() {\n\t\tif(empty($this->links))\n\t\t\treturn;\n\n\t\techo CHtml::openTag($this->tagName,$this->htmlOptions).\"\\n\";\n\t\t$links=array();\n\t\tif($this->homeLink===null)\n\t\t\t$links[]='<li>'.CHtml::link(Yii::t('zii','Home'),Yii::app()->homeUrl).'</li>';\n\t\telse if($this->homeLink!==false)\n\t\t\t$links[]='<li>'.$this->homeLink.'</li>';\n\t\tforeach($this->links as $label=>$url)\n\t\t{\n\t\t\tif(is_string($label) || is_array($url))\n\t\t\t\t$links[]='<li>'.CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url).'</li>';\n\t\t\telse\n\t\t\t\t$links[]='<li class=\"current\">'.($this->encodeLabel ? CHtml::encode($url) : $url).'</li>';\n\t\t}\n\t\techo implode($this->separator,$links);\n\t\techo CHtml::closeTag($this->tagName);\n\t}", "abstract protected function displayContent();", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "abstract protected function displayList($list);", "public function lists()\n\t{\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getList('desc');\n\t\t$this->loadView('views/ticket', array('info'=> $info), true);\n\t}", "function print_list() {\r\n if (!empty($this->data)) {\r\n $ol = '<ol>';\r\n foreach ($this->data as $result) {\r\n \r\n // Add proxy prefixto URL if necessary\r\n if ($this->proxy_required) {\r\n $url = PROXY_PREFIX . $result['url'];\r\n }\r\n else {\r\n $url = $result['url'];\r\n }\r\n \r\n // Add list item\r\n $ol .= '<li>';\r\n if (!empty($result['image'])) {\r\n $ol .= '<img src=\"' . $result['image'] . '\" alt=\"' . $result['text'] . '\" />';\r\n }\r\n $ol .= '<a href=\"' . $url . '\" target=\"_blank\">' . $result['text'] . '</a>';\r\n if (!empty($result['type'])) {\r\n $ol .= ' (<span class=\"nowrap\">' . $result['type'] . '</span>)';\r\n }\r\n $ol .= '<span class=\"subtext\">' . $result['subtext'] . '</span>';\r\n $ol .= '</li>';\r\n }\r\n $ol .= '</ol>';\r\n return $ol;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function run(){\n echo CHtml::closeTag($this->listTag);\n echo CHtml::closeTag($this->containerTag);\n }", "public function getTextTutorials()\n {\n $posts = TextPost::paginate(10);\n return view('text.list', ['posts' => $posts]);\n }", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function index()\n {\n $bans = Ban::join('adkats_records_main', 'adkats_bans.latest_record_id', '=', 'adkats_records_main.record_id')\n ->join('tbl_server', 'adkats_records_main.server_id', '=', 'tbl_server.ServerID')\n ->join('tbl_games', 'tbl_server.GameID', '=', 'tbl_games.GameID')\n ->orderBy('ban_startTime', 'desc')->paginate(200);\n\n View::share('title', 'Ban Listing');\n\n $this->layout->content = View::make('admin.adkats.bans.banlist')->with('bans', $bans);\n }", "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 indexAction()\n {\n // Deal with the action and return a response.\n // return __METHOD__ . \", \\$db is {$this->db}\";\n $title = \"Movie database | oophp\";\n\n $text = file_get_contents(__DIR__ . \"./text/bbcode.txt\");\n $txtFilter = new MyTextFilter();\n $html = $txtFilter->parse($text, [\"bbcode\"]);\n\n $data = [\n \"text\" => $text,\n \"html\" => $html\n ];\n\n $this->app->page->add(\"mytextfilter/index\", $data);\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function getTextItems()\n {\n $parameters = func_get_args();\n\n //set parameter values\n if (count($parameters) == 1) {\n $pageNumber = $parameters[0];\n } else if (count($parameters) == 2) {\n $pageNumber = $parameters[0];\n $fragmentNumber = $parameters[1];\n }\n\n\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName();\n if (isset($parameters[0])) {\n $strURI .= '/pages/' . $pageNumber;\n if (isset($parameters[1])) {\n $strURI .= '/fragments/' . $fragmentNumber;\n }\n }\n $strURI .= '/TextItems';\n $signedURI = Utils::sign($strURI);\n\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n\n $json = json_decode($responseStream);\n\n return $json->TextItems->List;\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function showList() {\n\t \treturn 0;\n\t }", "public function listDisplayElements();", "public function actionHTUselisting()\n {\n \t ob_start();\n \t Yii::app()->theme='back';\n \t $rec=HtuseHome::model()->findAll();\n \t $this->render('htuselisting',array('list'=>$rec));\n }", "function displayListScreen($TABLES,$DBSELECT,&$conf)\t{\n\t\tif ($this->conf['performanceaudit']) $this->perfArray['fe_adminLib.inc displaylist start:']=$this->metafeeditlib->displaytime().\" Seconds\";\n\t\t// Initialisation\n\t\t$conf['cmdmode']='list';\n\t\t$content='';\n\t\t$DEBUG='';\n\t\t\n\t\t$distinct=$conf['general.']['useDistinct']?\" distinct \":\"\";\n\t\t$dispDir= $conf['list.']['displayDirection']?$conf['list.']['displayDirection']:'Right'; //-- this should be handled in template choice...\n\t\t// Gestion des templates selon exporttype (can't this be done in Pi1 ?)\n\t\t$exporttype=$this->piVars['exporttype'];\n\t\t//Print parameters\n\t\t$print=$this->piVars['print'];\n\t\t$printerName=$this->piVars['printername'];\n\t\t$printServerName=$this->piVars['printservername'];\n\t\tif (($exporttype == 'PDF') && ($conf['list.']['nbCols'])){$exporttype = \"PDFTAB\";}\n\t\t\n\t\t//$this->markerArray['###BACK_URL###'] = \"\";\n\t\t// return navigation ... should this be not handled in template ... hmm ...\n\t\t/*if (!$conf['no_action']) {\n\t\t\t$this->backURL=$this->metafeeditlib->makeBackURLTypoLink($conf,$this->backURL);\n\t\t\tif (!strpos($this->backURL,'?')) $this->backURL.='?';\n\t\t\t$this->markerArray['###BACK_URL###'] = $this->backURL;\n\t\t}*/\n\t\t\n\t\t//@TODO replaced by specific pagebrowser \n\t\tif ($conf['list.']['pageSize']) $this->internal['results_at_a_time'] = $conf['list.']['pageSize']; // Number of results to show in a listing.\n\t\tif ($conf['list.']['pageSize']&& $conf['list.']['nbCols']) $this->internal['results_at_a_time'] = $conf['list.']['pageSize']*$conf['list.']['nbCols'];\n\t\tif ($conf['list.']['maxPages']) $this->internal['maxPages'] = $conf['list.']['maxPages']; // The maximum number of \"pages\" in the browse-box: \"Page 1\", 'Page 2', etc.\n\t\t$this->internal['currentTable'] = $this->theTable;\n\t\t//End init...\n\t\t//We get advanced search combo data if necessary.\n\t\t$this->metafeeditlib->getAdvancedSearchComboMarkerArray($conf,$this->markerArray);\n\t\t//We get templates\n\t\t$tpl=$this->prepareListTemplates($conf,$this->markerArray,$exporttype);\n\t\t//error_log(__METHOD__.':tPL '.$exporttype.'-'.print_r($tpl,true));\n\t\t//@region \n\t\t//@todo put this in a function\n\t\t//$searchfieldsSet=$this->checkSearchCriteriae($conf,$this->markerArray);\n\t\t$searchfieldsSet=true;\n\t\tif ($conf['list.']['forceSearch']) {\n\t\t\t$searchfieldsSet=false;\n\t\t\t$as=$conf['inputvar.']['advancedSearch'];\n\t\t\tif (is_array($as) && count($as)) {\n\t\t\t\tforeach($as as $searchField=>$searchFieldConf) {\n\t\t\t\t\tif (is_array($searchFieldConf)) {\n\t\t\t\t\t\tif ($this->metafeeditlib->is_extent($searchFieldConf['val']) || $this->metafeeditlib->is_extent($searchFieldConf['valsup'])) {\n\t\t\t\t\t\t\t$searchfieldsSet=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($this->metafeeditlib->is_extent($searchFieldConf)) {\n\t\t\t\t\t\t$searchfieldsSet=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Alphabetical Search\n\t\t\tif ($conf['inputvar.']['sortLetter']) $searchfieldsSet=true;\n\t\t\tif (!$searchfieldsSet) $this->markerArray['###EVAL_ERROR###'].=$this->metafeeditlib->makeErrorMarker($conf,$this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_LIST_NOSEARCHCRITERAE###'),$this->markerArray));\n\t\t}\n\t\tif ($searchfieldsSet) {\n\t\t\t// We build the SQL Query\n\t\t\t$sql=$this->metafeeditlib->getListSQL($TABLES,$DBSELECT,$conf,$this->markerArray,$DEBUG);\n\t\t\t//error_log(__METHOD__.\":\".print_r($sql,true));\n\t\t\t//@TODO : we get sort variable and sort direction from GET/POST Vars (should this not be done in Pi1 ?)...hmm ...\n\t\t\t$Arr=explode(',',$conf['list.']['show_fields']);\n\t\t\tif ($conf['list.']['sortFields']){\n\t\t\t\tforeach($Arr as $fieldName) {\n\t\t\t\t\t$this->markerArray['###SORT_CLASS_'.$fieldName.'###']=($fieldName==$this->internal['orderBy'])?($this->internal['descFlag']?'mfedt_sortdesc':'mfedt_sortasc'):'NOSORT';\n\t\t\t\t\t$this->markerArray['%23%23%23SORT_DIR_'.$fieldName.'%23%23%23']=($fieldName==$this->internal['orderBy'])?($this->internal['descFlag']?'0':'1&'.$this->prefixId.'[resetorderby]['.$conf['pluginId'].']=1'):'1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// End sort calculations\n\t\t\t// Page calculations\n\t\t\t// We handle pagination here and should just do a count here ...\n\t\t\t\n\t\t\t$cols=$conf['list.']['nbCols'];\n\t\t\t$ps=$conf['list.']['pageSize'];\n\t\n\t\t\t// default page size is 100\n\t \n\t\t\tif (!$ps) $ps=100;\n\t\t\t$ncols=1;\n\t\t\t$nbdispcols=0;\n\t\t\tif ($cols) $ncols=$cols;\n\t\n\t\t\t$nbe=$ncols; // number of elements per column (Down)/row (RIGHT) \n\t\t\t$nbep=$ps*$ncols; //Number of elements per page\n\t\t\tif ($conf['list.']['jumpPageOnGroupBy']) $nbe=$nbep;\n\t\t\tif ($dispDir=='Down') {\n\t\t\t\t$nbdispcols=$ncols;\n\t\t\t\t$ncols=$cols=1;\n\t\t\t\t$nbe=$ps;\n\t\t\t}\n\t\t\t//-- end page calculations\t\t\n\t\t\t// This counts the number of lines ...\n\t\n\t\t\t//TODO add distinct or not through flexform ...\n\t\t\tif ($conf['list.']['whereStringFunction']) {\n\t\t\t\teval($conf['list.']['whereStringFunction']);\n\t\t\t}\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']);\n\t\t\tif (!$res) {\n\t\t \t\tdie(__METHOD__.\":Sql error : \".$GLOBALS['TYPO3_DB']->sql_error().', sql : '.$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']));\n\t\t\t}\n\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList row count ',$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']),$DEBUG);\n\t\t\t$num=$GLOBALS['TYPO3_DB']->sql_num_rows($res);\t// If there are menu-items ...\n\t\t\t$this->markerArray['###METAFEEDITNBROWS###']='<span class=\"nbrows\">'.$this->metafeeditlib->getLL(\"nbrows\",$this->conf).$num.'</span>';\n\t\t\t$NBSup=0; // Number of empty elements for page breaks and group by breaks;\n\t\t\t$pageidx=0;\n\t\t\t$pi=1; //page number we start at 1\n\t\t\t$pagedelta=array(); // array of page deltas for page browser\n\t\t\t$paged=0; // current page delta due to page and groupby breaks\n\t\t\t$oldpage=0; // pagechangeflag\n\t\t\t$pageid=1; // page number for grouby nb elts\n\t\t\t$mode=0;\n\t\t\t$NbGroupBys=0;\n\t\n\t\t\t// CALENDAR_SETUP\n\t\t\tif ($conf['list.']['calendarSearch']){\t\t\t\n\t\t\t\t$cal=t3lib_div::makeInstance('tx_metafeedit_calendar');\n\t\t\t\t$cal->init($conf,$sql,$this->metafeeditlib,$this->cObj);\n\t\t\t\t$this->markerArray['###CALENDAR_SEARCH###']=$cal->main('', $conf,$sql);\n\t\t\t}\n\t\t\t\n\t\t\t// Group by calculations\n\t\t\t$fNA=t3lib_div::trimexplode(',',$conf['list.']['groupByFieldBreaks']);\n\t\t\t//$groupBy Array initialisation\n\t\t\t$groupBy=array();\n\t\t\tforeach($fNA as $fN) {\n\t\t\t\t$groupBy[$fN]=null;\n\t\t\t}\n\t\t\tif ($sql['groupBy']) {\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('mod(count(*),'.$nbe.') as moduloelts, count(*) as nbelts, ceiling(count(*)/'.$nbep.') as pages'.$sql['gbFields'].$sql['calcFieldsSql'].($sql['groupBy']?','.$conf['table'].'.*':''), $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql']);\n\t\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList group by row count ',$GLOBALS['TYPO3_DB']->SELECTquery('mod(count(*),'.$nbe.') as moduloelts, count(*) as nbelts, ceiling(count(*)/'.$nbep.') as pages'.$sql['gbFields'].$sql['calcFieldsSql'].($sql['groupBy']?','.$conf['table'].'.*':''), $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql']),$DEBUG);\n\t\t\t\t\n\t\t\t\t$GBTA=array();\n\t\t\t\twhile($GbRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\t\t\t\t\t$gbLabel=$GbRow[$GBFieldLabel];\n\t\t\t\t\t$GBTA[$gbLabel]['mod']=$GbRow['moduloelts'];\n\t\t\t\t\t$GBTA[$gbLabel]['pages']=$GbRow['pages'];\n\t\t\t\t\t$GBTA[$gbLabel]['nbelts']=$GbRow['nbelts'];\n\t\t\t\t\t$GBTA[$gbLabel]['nbsup']=$NBSup;\n\t\n\t\t\t\t\tfor ($i = $pi; $i <= ($GbRow['pages']+$pi); $i++) {\n\t\t\t\t\t\t$pagedelta[$i]=$NBSup;\n\t\t\t\t\t}\n\t\n\t\n\t\t\t\t\t//$nbsupd=(($NBSup%$nbe)+($nbe-($NBSup%$nbe));\n\t\t\t\t\t$nbsupd=(($NBSup%$nbe)+($nbe-($NBSup%$nbe)));\n\t\t\n\t\t\t\t\t$nbbefelts=($pageid-1)*$nbep+$nbpelts;\n\t\t\t\t\t$nballelts=$nbbefelts +$GbRow['nbelts'];\n\t\n\t\t\t\t\t$paged=floor($NBSup/$nbep); //Number of empty elements...\n\t\t\t\t\t$firstpage=floor($nbbefelts/$nbep)+1;\n\t\t\t\t\t$lastpage=ceil($nballelts/$nbep);\n\t\n\t\t\t\t\tfor ($i = 1; $i < $firstpage; $i++) {\n\t\t\t\t\t\t$pageGrpElts[$gbLabel][$i]=0;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfor ($i = $firstpage; $i < $lastpage; $i++) {\n\t\t\t\t\t\t$pageGrpElts[$gbLabel][$i]=$nbep;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t$pageGrpElts[$gbLabel][$lastpage]=$GbRow['moduloelts']+($nbe-$GbRow['moduloelts']);\n\t\t\t\t\t$pageGrpElts[$gbLabel][$firstpage]=(($GbRow['nbelts']>$nbep)?$nbep:$GbRow['nbelts'])-$NBSup-$mode;\n\t\n\t\t\t\t\tif($GBTA[$gbLabel]['mod']) $NBSup=$NBSup+($nbe-$GBTA[$gbLabel]['mod']);\n\t\t\t\t\t// wrong !!\n\t\t\t\t\t$pi+=$GbRow['pages'];\n\t\t\t\t\t$pageid=$lastpage;\n\t\t\t\t\tif ($oldpage<$firstpage) { \n\t\t\t\t\t\t$oldpage=$lastpage;\n\t\t\t\t\t\t$nbpelts=0;\n\t\t\t\t\t}\n\t\t\t\t\t$nbpelts+=$nbsupd;\n\t\n\t\t\t\t\t$NbGroupBys++;\n\t\t\t\t\t$mode=$GbRow['moduloelts'];\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showFirstLast'])) $this->internal['showFirstLast']=$conf['list.']['showFirstLast'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['pagefloat'])) $this->internal['pagefloat']=$conf['list.']['pagefloat'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showRange'])) $this->internal['showRange']=$conf['list.']['showRange'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['dontLinkActivePage'])) $this->internal['dontLinkActivePage']=$conf['list.']['dontLinkActivePage'];\n\t\t\t$this->markerArray['###METAFEEDITNBPAGES###']='';\n\t\t\tif ($conf['list.']['pagination']) {\n\t\t\t\t$this->internal['res_count']=$num+$NBSup;\n\t\n\t\t\t\t$pointer = $conf['inputvar.']['pointer'];\n\t\t\t\t$pointer = intval($pointer);\n\t\t\t\tif ($pointer>(($num+$NBSup)/$conf['list.']['pageSize'])) $pointer=0;\n\t\t\t\t$nbpages=ceil(($num+$NBSup)/$conf['list.']['pageSize']);\n\t\t\t\t$this->markerArray['###METAFEEDITNBPAGES###']='<span class=\"nbpages\">'.$this->metafeeditlib->pageSelector($nbpages,$conf).$this->metafeeditlib->getLL(\"nbpages\",$this->conf).$nbpages.'</span>';\n\t\n\t\t\t\t// HACK to set navigation pointer for page browser;\n\t\t\t\t$this->piVars['pointer']=$pointer;\n\t\t\t\t$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);\n\t\t\t\t$LIMIT = ' LIMIT '.($pointer*$results_at_a_time - $pagedelta[$pointer+1]).','.$results_at_a_time;\n\t\t\t\tif ($conf['list.']['no_detail']) {\n\t\t\t\t\t$LIMIT='';\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// List SQL REQUEST with limitations, pagination, etc ...\n\t\t\t\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql'].($exporttype?'':$LIMIT));\n\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList rows',$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql'].($exporttype?'':$LIMIT)),$DEBUG);\n\t\t\t// process variables\n\t\n\t\t\t$out='';\t\n\t\t\t$lcols='';\n\t\t\t$col=''; \n\t\t\t$row='';\n\t\t\t$rows='';\n\t\t\t$i=0; // col count\n\t\t\t$lc=0; // line count\n\t\t\t$nblines=0; // line count\n\t\t\t$gc=0; //groupby count\n\t\t\t$g_mod=0; // modulo for vertical display..\n\t\t\t$nbrowscol=0;\n\t\t\t$nbenreg=$num+$NbGroupBys;\n\t\t\t\n\t\t\tif ($conf['list.']['groupBySize'] && $dispDir!='Down') die(\"PLUGIN META FEEDIT : Group By Size is only handled when Display Direction is Down\");\n\t\t\tif (!$conf['list.']['groupBySize'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Group By Size must be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['groupBySize'] && $dispDir!='Down') die(\"PLUGIN META FEEDIT : Group By Size must not be set when Display Direction is not Down\");\n\t\t\tif ($conf['list.']['pageSize'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Page size must not be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['pagination'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Pagination must not be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['groupBySize']) $nbenreg=$num+($NbGroupBys*$conf['list.']['groupBySize']);\n\t\t\t\n\t\t\t$nblines=$ps;\n\t\n\t\t\tif ($dispDir=='Down'){\n\t\t\t\tif ($conf['list.']['pagination']) {\n\t\t\t\t\t$nbrowscol=$ps;\n\t\t\t\t\t$nbenreg=$nbdispcols*$ps;\n\t\t\t\t\t$nblines=$nbenreg;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$nbrowscol=ceil($nbenreg/$nbdispcols);\n\t\t\t\t}\n\t\t\t\t$width=floor(100/$nbdispcols);\n\t\t\t} else {\n\t\t\t\t$nbrowscol=$nbe;\n\t\t\t\t//$nbrowscol=2;\n\t\t\t}\n\t\t\t// we iterate on list items here\n\t\t\t$mediafile='';\n\t\t\t$mediaplayer='';\n\t\t\t$nbrows=0;\n\t\t\t\n\t\t\t// MODIF CBY\n\t\t\t// List alternate templates\n\t\t\t$nbAltRow=$conf['list.']['nbAltRows'];\n\t\t\t$nar=1;\n\t\n\t\t\t$templateExport='';\n\t\t\t\n\t\t\t// List Item Loop \n\t\t\t$x=0;\n\t\t\twhile(($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) && ($exporttype || $lc<$nblines)) {\n\t\t\t\tif (t3lib_extmgm::isLoaded('ard_mcm')) {\n\t\t\t\t\t$this->langHandler->localizeRow($menuRow,$this->theTable);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//we add php calculated fields here ...\n\t\t\t\t$this->metafeeditlib->addPhpCalcFields($menuRow,$conf);\n\t\t\t\t$nbrows++;\n\t\t\t\t//TODO : $this->displayListItem($menuRow,$lc,$nbrows,$conf);\n\t\n\t\t\t\t// to display mediaplayer first file\n\t\t\t\tif ($lc==0 && $conf['list.']['mediaPlayer'] && !$mediaru) {\n\t\t\t\t\tforeach($menuRow as $key=>$val) {\n\t\t\t\t\t\tif ($conf['TCAN'][$this->theTable]['columns'][$key]['config']['type']=='group' && $conf['TCAN'][$this->theTable]['columns'][$key]['config']['internal_type'] == 'file') {\n\t\t\t\t\t\t\t$mediafiles = t3lib_div::trimexplode(',', $val);\n\t\t\t\t\t\t\t$mediafile=$conf['TCAN'][$this->theTable]['columns'][$key]['config']['uploadfolder'].'/'.$mediafiles[0];\n\t\t\t\t\t\t\t$mediaru=$menuRow['uid'];\n\t\t\t\t\t\t\t$mediaplayer = $this->metafeeditlib->getMediaPlayer($mediafile, $conf);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if ($this->performanceaudit) t3lib_div::devLog($conf['inputvar.']['cmd'].\" display Item List start :\".$this->metafeeditlib->displaytime(), $this->extKey );\n\t\n\t\t\t\t// We get foreign table data if necessary (should be in the the sql query ...)\n\t\t\t\t//@todo we shouldn't need this anymore\n\t\t\t\t///$this->foreignTableSetup($conf,$menuRow,$this->markerArray);\n\t\n\t\t\t\t// to be removed as soon as i find an alternative\n\t\n\t\t\t\t$this->markerArray['###OPENROW###']=\"\";\n\t\t\t\t$this->markerArray['###CLOSEROW###']=\"\";\n\t\t\t\t\n\t\t\t\t// List Item Data processing\n\t\t\t\t\n\t\t\t\t$menuRow=$this->userProcess('evalFunc',$menuRow);\n\t\t\t\t\n\t\t\t\t// group by field handling \n\t\t\t\t$pagejump=0;\n\t\t\t\t//error_log(__METHOD__.\": -\".print_r($tpl,true));\n\t\t\t\t$groupByFields=$this->groupByHeader($conf,$tpl['GBFCode'].$tpl['GBCode'],$menuRow,$groupBy,$lastgroupBy,$evalGroupBy,$GrpByField,$lc,$gc,$i,$pagejump,$sql,false,$DEBUG,$nbrows);\n\t\t\t\tif ($pagejump) break;\n\t\t\t\t// New cols \n\t\n\t\t\t\t// here for compatibility reasons .... to be removed\n\t\n\t\t\t\tif ($cols && $i==0) {\n\t\t\t\t\t$this->markerArray['###OPENROW###']='<tr '.$conf['caller']->pi_classParam('list-row-'.$nar).'>';\n\t\t\t\t}\n\t\n\t\t\t\t$i++;\n\t\n\t\t\t\t// here for compatibility reasons .... to be removed\n\t\n\t\t\t\tif ($cols && $i>=$cols && $dispDir=='Right') {\n\t\t\t\t\t$i=0;\n\t\t\t\t\t$lc++;\n\t\t\t\t\t$this->markerArray['###CLOSEROW###']=\"</tr>\";\n\t\t\t\t}\n\t\n\t\t\t\t// List Item Data processing\n\t\t\t\t$conf['recUid']=$menuRow[$conf['uidField']];\n\t\t\t\t\n\t\t\t\t// Call to user item marker function\n\t\t\t\t\n\t\t\t\tif ($conf['userFunc_afterItemMark']) t3lib_div::callUserFunction($conf['list.']['userFunc_afterItemMark'],$conf,$this);\n\t\n\t\t\t\t//$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $menuRow, '', TRUE, 'FIELD_', $conf['general.']['xhtml']);\n\t\t\t\t\n\t\t\t\t$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $menuRow, '', TRUE, 'FIELD_', FALSE);\n\t\t\t\t$markerArray = $this->metafeeditlib->setCObjects($conf,$this->markerArray,$tpl['itemElCode'],$menuRow,$markerArray,'ITEM_');\n\t\t\t\t//error_log(__METHOD__.\" Mem x $x ma: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\t\t\n\t\t\t\t// MODIF CBY\n\t\t\t\t// alternate template marker ...\n\t\t\t\t$markerArray['###LIST-ROW-ALT###']=$nar;\n\t\t\t\t$nar++;\n\t\t\t\tif ($nar>$nbAltRow)$nar=1;\n\t\n\t\t\t\t$item=$this->cObj->substituteMarkerArray($tpl['itemElCode'], $markerArray);\n\t\t\t\t// List item stdWrap\n\t\t\t\tif (is_array($conf['list.']['item_stdWrap.'][$this->theTable.'.'])) {\n\t\t\t\t\t$this->cObj->start($menuRow,$this->theTable);\n\t\t\t\t\t$item=$this->cObj->stdWrap($item,$conf['list.']['item_stdWrap.'][$this->theTable.'.']);\n\t\t\t\t}\n\t\t\t\tif (!$conf['list.']['no_detail']) {\n\t\t\t\t\t$item=$this->cObj->substituteSubpart($tpl['itemCode'], '###ITEM-EL###', $item);\n\t\t\t\t\t$item=$this->cObj->substituteMarker($item, '###ACTIONS-LIST-ELEMENT###', $this->metafeeditlib->getListItemActions($conf,$this,$markerArray));\n\t\t\t\t}\n\t\t\t\t$item= $this->cObj->substituteMarkerArray($groupByFields.$item, $markerArray);\n\t\t\t\t// Col or row display \n\t\t\t\tif ($dispDir=='Down') {\n\t\t\t\t\tif (!$conf['list.']['no_detail']) $lc++; //MMMM\n\t\t\t\t\t$col.=$item;\n\t\t\t\t\t// If Display direction is Down (cols first) \n\t\t\t\t\tif ($lc%$nbrowscol<$g_mod) {\n\t\t\t\t\t\t$col=$this->cObj->substituteSubpart($tpl['itemColCode'], '###ITEM###', $col);\n\t\t\t\t\t\t$lcols.= $this->cObj->substituteMarkerArray($col, $markerArray);\n\t\t\t\t\t\t$col='';\n\t\t\t\t\t}\n\t\t\t\t\tif ($nbrowscol) $g_mod=$lc%$nbrowscol;\n\t\t\t\t} else {\n\t\t\t\t\t// Display Right (rows first)\n\t\t\t\t\t$row.=$item;\n\t\t\t\t\tif ($lc>$g_mod) {\n\t\t\t\t\t\t$row=$this->cObj->substituteSubpart($tpl['itemRowCode'], '###ITEM###', $row);\n\t\t\t\t\t\t$rows.= $this->cObj->substituteMarkerArray($row, $markerArray);\n\t\t\t\t\t\t$row='';\n\t\n\t\t\t\t\t}\n\t\t\t\t\tif ($nbrowscol) {\n\t\t\t\t\t\t\t$g_mod=$lc;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$tpl['itemRowCode']) $out.=$item;\n\t\t\t\t}\n\t\t\t\t//if ($conf['performanceaudit']) t3lib_div::devLog($conf['inputvar.']['cmd'].\" display Item List end :\".$this->metafeeditlib->displaytime(), $this->extKey );\n\t\t\t\t// End of list item iteration\n\t\t\t\t$x++;\n\t\t\t}\n\t\t\t\n\t\t\t//(__METHOD__.\" Mem x $x after moop: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\tif ($markerArray==null) $markerArray= array(); //TODO : this should not be here\n\t\t\tif ($dispDir=='Down' && $col) {\n\t\t\t\t$col=$this->cObj->substituteSubpart($tpl['itemColCode'], '###ITEM###', $col);\n\t\t\t\t$lcols.= $this->cObj->substituteMarkerArray($col, $markerArray);\n\t\t\t\t$col='';\n\t\t\t} else {\t\n\t\t\t\t$row=$this->cObj->substituteSubpart($tpl['itemRowCode'], '###ITEM###', $row);\n\t\t\t\t$rows.= $this->cObj->substituteMarkerArray($row, $markerArray);\n\t\t\t\t$row='';\n\t\t\t}\n\t\t\n\t\t\tif (!$nbrows) $rows='';\n\t\t\t\n\t\t\t// List post processing\n\t\t\t\n\t\t\t// Add last group by totals :\n\t\t\t\n\t\t\t$groupByFields=$this->groupByHeader($conf,$tpl['GBFCode'].$tpl['GBCode'],$menuRow,$groupBy,$lastgroupBy,$evalGroupBy,$GrpByField,$lc,$gc,$i,$pagejump,$sql,true,$DEBUG,$nbrows);\n\t\t\t$out.=$groupByFields;\n\t\t\t//error_log(__METHOD__.\" Mem x $x gbh2: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\t$wraparray=array();\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['disabledLinkWrap'])) $wraparray['disabledLinkWrap']=$conf['list.']['disabledLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['inactiveLinkWrap'])) $wraparray['inactiveLinkWrap']=$conf['list.']['inactiveLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['activeLinkWrap'])) $wraparray['activeLinkWrap']=$conf['list.']['activeLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['browseLinksWrap'])) $wraparray['browseLinksWrap']=$conf['list.']['browseLinksWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showResultsWrap'])) $wraparray['showResultsWrap']=$conf['list.']['showResultsWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showResultsNumbersWrap'])) $wraparray['showResultsNumbersWrap']=$conf['list.']['showResultsNumbersWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['browseBoxWrap'])) $wraparray['browseBoxWrap']=$conf['list.']['browseBoxWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['prevLinkWrap'])) $wraparray['prevLinkWrap']=$conf['list.']['prevLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['nextLinkWrap'])) $wraparray['nextLinkWrap']=$conf['list.']['nextLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['firstLinkWrap'])) $wraparray['firstLinkWrap']=$conf['list.']['firstLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['lastLinkWrap'])) $wraparray['lastLinkWrap']=$conf['list.']['lastLinkWrap'];\n\t\t\t$src=$this->metafeeditlib->is_extent($conf['list.']['showResultCount'])?$conf['list.']['showResultCount']:1;\n\t\t\t$this->markerArray['###PAGENAV###'] =$conf['list.']['pagination']?$this->pi_list_browseresults($src,'',$wraparray):'';\n\t\t\t\n\t\t\t// should create media player function here ...\n\t\t\t$this->markerArray['###MEDIAPLAYER###']=$this->markerArray['###MEDIA_ACTION_BLOG###']='';\n\t\t\tif ($conf['list.']['mediaPlayer']) {\n\t\t\t\t$this->markerArray['###MEDIAPLAYER###'] = $this->piVars['mediaplayer'] ? $this->metafeeditlib->showMediaPlayer($this->piVars['mediaplayer'],$this->piVars['mediafile'],$conf):($mediaplayer?$this->metafeeditlib->showMediaPlayer($mediaplayer,$mediafile,$conf):'');\n\t\t\t\t// media player data\n\t\t\t\t$mediauid=$this->piVars['mediaplayer'] ? $this->piVars['mediaru'] : $mediaru;\n\t\t\t\tif \t($mediauid) {\n\t\t\t\t\t$this->markerArray['###MEDIA_ACTION_BLOG###']=$this->metafeeditlib->getBlogActions($conf,$this,$mediauid );\n\t\t\t\t\t$mediarec = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable,$mediauid);\n\t\t\t\t\tif (is_array($mediarec)) {\n\t\t\t\t\t\t//on start pour pouvoir stdwrapper\n\t\t\t\t\t\t$this->cObj->start($mediarec,$this->theTable);\n\t\t\t\t\t\tforeach($mediarec as $key=>$val) {\n\t\t\t\t\t\t\t$this->markerArray['###MEDIAPLAYER_'.$key.'###']=$val;\n\t\t\t\t\t\t\t$this->markerArray['###MEDIAPLAYER_EVAL_'.$key.'###']=$this->cObj->stdWrap($val,$conf['list.']['mediaplayerWrap.'][$key.'.']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//we wrap the whole mediaplayer here.\n\t\t\t\t\t$this->markerArray['###EVAL_MEDIAPLAYER###']=$this->cObj->stdWrap(trim($this->markerArray['###MEDIAPLAYER###']),$conf['list.']['mediaplayerWrap.']['mediaplayer.']);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($dispDir=='Down') {\n\t\t\t\t$lcols=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM-COL###', $lcols);\n\t\t\t\t$lcols= $this->cObj->substituteMarkerArray($lcols, $markerArray);\n\t\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###ALLITEMS###', $lcols);\n\t\t\t} else {\n\t\t\t\tif ($rows) {\n\t\t\t\t\t$rows=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM-ROW###', $rows);\n\t\t\t\t\t$rows=$this->cObj->substituteMarkerArray($rows, $markerArray);\n\t\t\t\t}\n\t\t\t\tif ($out) {\n\t\t\t\t\t$out=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM###', $out);\n\t\t\t\t} else {\n\t\t\t\t\t$out=$rows;\n\t\t\t\t}\n\t\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###ALLITEMS###', $out);\n\t\t\t}\n\t\t\tif (!$this->markerArray['###MEDIAPLAYER###']) $content=$this->cObj->substituteSubpart($content,'###MEDIAPLAYERTAG###','');\n\t\t\t// We handle List Actions here\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-LIB###',$this->metafeeditlib->getListItemActionsLib($conf));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-TOP###',$this->metafeeditlib->getListTopActions($conf,$this));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-BOTTOM###',$this->metafeeditlib->getListBottomActions($conf,$this));\n\t\t\t\n\t\t\tif (!$num) $this->markerArray['###EVAL_ERROR###'].=$this->metafeeditlib->makeErrorMarker($conf,$this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_EDITMENU_NOITEMS###'),$this->markerArray));\n\t\t} else {\n\t\t\t//echo \"displayListScreen 2 $DEBUG\";\n\t\t\t$this->metafeeditlib->getAdvancedSearchWhere($conf,$sql,$this->markerArray);\n\t\t\t//echo $tpl['templateCode'];\n\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###TEMPLATE_LIST_TABLEDATA###', '');\n\t\t\t// We handle List Actions here\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-LIB###',$this->metafeeditlib->getListItemActionsLib($conf));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-TOP###',$this->metafeeditlib->getListTopActions($conf,$this));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-BOTTOM###',$this->metafeeditlib->getListBottomActions($conf,$this));\n\t\t\t\n\t\t}\n\t\t//echo \"displayListScreen 3 $DEBUG\";\n\t\t//error_log(__METHOD__.\" Mem x $x bf sub: \".$this->metafeeditlib->getMemoryUsage());\n\t\t// Call to user marker function\n\t\tif ($conf['list.']['userFunc_afterMark']) $this->userProcess_alt($conf['list.']['userFunc_afterMark'],$conf['list.']['userFunc_afterMark.'],array($conf['list.']['whereString']));\n\t\t//t3lib_div::callUserFunction($conf['metafeedit.']['userFunc_afterInitConf'],$conf,$this);\n\t\tif ($conf['userFunc_afterMark']) t3lib_div::callUserFunction($conf['metafeedit.']['userFunc_afterMark'],$conf,$this);\n\t\t$content=$this->cObj->stdWrap(trim($this->cObj->substituteMarkerArray($content, $this->markerArray)),$conf['list.']['formWrap.'][$this->theTable.'.']);\n\t\t//error_log(__METHOD__.\" Mem x $x af sub: \".$this->metafeeditlib->getMemoryUsage());\n\t\t//if (!$num) $content .= $this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_EDITMENU_NOITEMS###'),$this->markerArray);\n\t\t//echo \"displayListScreen 3.5 $DEBUG\";\n\t\t$this->getListSums($conf,$sql,$content,$tpl,$DEBUG);\n\t\t//echo __METHOD__.\":displayListScreen 4 ($DEBUG):\".$this->isDebug($conf);\n\t\t\n\t\tif (!$DEBUG && !$this->isDebug($conf)) {\n\t\t\tswitch ($exporttype)\n\t\t\t{\n\t\t\t\tcase \"CSV\": \n\t\t\t\t\t$this->metafeeditexport->getCSV($content,$this,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDF\": \n\t\t\t\t\t$this->metafeeditexport->getPDF($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDFTAB\": \n\t\t\t\t\t$this->metafeeditexport->getPDFTAB($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDFDET\": \n\t\t\t\t\t$this->metafeeditexport->getPDFDET($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"XLS\":\n\t\t\t\tcase \"EXCEL\": \n\t\t\t\t\t$this->metafeeditexport->getEXCEL($content,$this,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($this->piVars['exportfile']) {\n\t\t\t\t$retput=file_put_contents($this->piVars['exportfile'].'.dbg', $DEBUG);\n\t\t\t\tif ($retput===false) {\n\t\t\t\t\tthrow new Exception(__METHOD__.\":Could not create\". $this->piVars['exportfile'].'.dbg');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($this->conf['performanceaudit']) $this->perfArray['fe_adminLib.inc displaylist end:']=$this->metafeeditlib->displaytime().\" Seconds\";\n\t\treturn $content.$DEBUG;\n\t}", "public function printText() {\n\t\tfor ($i = 0; $i < count($this->textToPrint); $i++) {\n\t\t echo $this->textToPrint[$i].\"\\n\";\n\t\t}\n\t}", "public function index(){\r\n $this->display(index);\r\n }", "public function show()\n\t{\n\t\techo $this->tags();\n\t}", "public function translation_feedback_list_display() {\n\t\t$view = $this->feedback_list_view_factory->create();\n\t\techo $view->render_page();\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function display()\n {\n $current = $this->head;\n while ($current != null) \n {\n echo $current->data->name.\" \";\n echo $current->data->share.\" \";\n echo $current->data->price;\n echo \"\\n\";\n $current = $current->next;\n }\n }", "public function actionList() {\n $this->_getList();\n }", "private function displayList()\r\n\t{\r\n\t\t//Fetch the list\r\n\t\t$this->model->getDepartmentList();\r\n\t\t$num = $this->model->numberOfDepartments;\r\n\t\tfor ($i = 0; $i < $num; $i++)\r\n\t\t{ \r\n\t\t\t$this->dList .=\r\n '<tr>\r\n <td><a href=\"ServiceHRM.php?action=ManageDepartment&deptID='.$this->model->result[$i]['id'].'\">'.$this->model->result[$i]['id'].' - '.$this->model->result[$i]['name'].'</a></td>\r\n </tr>';\r\n\t\t}\r\n\t}", "public function listb()\n\t{\n\t\t$id_usuario_session = $this->session->userdata(\"id\");\n\t\t$data = [\n\t\t 'monedas_mercado_busco' => $this->Mercadom_model->listb($id_usuario_session)\n\t\t];\n\n\t\t$this->layout->view(\"list_busqueda\",$data);\n\n\t}", "public function actionIndex()\n {\n // $searchModel = new BookmakerSearch();\n // $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // return $this->render('index', [\n // 'searchModel' => $searchModel,\n // 'dataProvider' => $dataProvider,\n // ]);\n $model = (new Query)->select('*')->from('bk_desc')->all();\n return $this->render('index', ['model' => $model, 'work' => file_get_contents(Yii::getAlias('@app').'/bk.work')]);\n }", "public function displayListAction() {\n $params = t3lib_div::_GET('libconnect');\n $cObject = t3lib_div::makeInstance('tslib_cObj');\n\n //get PageID\n $Pid = intval($GLOBALS['TSFE']->id);\n \n //include CSS\n $this->decideIncludeCSS();\n\n if ((!empty($params['subject'])) || (!empty($params['notation']))) {//choosed subject after start point\n $config['detailPid'] = $this->settings['flexform']['detailPid'];\n\n $options['index'] = $params['index'];\n $options['sc'] = $params['sc'];\n $options['lc'] = $params['lc'];\n $options['notation'] = $params['notation'];\n $options['colors'] = $params['colors'];\n\n //it´s for there is not NULL in the request or there will be a problem\n if(!isset($params['subject'])){\n $params['subject'] = \"\";\n }\n $liste = $this->ezbRepository->loadList(\n $params['subject'], \n $options,\n $config\n );\n\n $listURL = $cObject->getTypolink_URL( $Pid );\n\n $formParameter = array(\n 'libconnect[subject]' => $params['subject'],\n 'libconnect[index]' => $params['index'],\n 'libconnect[sc]' => $params['sc'],\n 'libconnect[lc]' => $params['lc'],\n 'libconnect[notation]' => $params['notation']\n );\n\n //variables for template\n $this->view->assign('journals', $liste);\n $this->view->assign('listUrl', $listURL);\n $this->view->assign('colors', $params['colors']);\n $this->view->assign('formParameter', $formParameter);\n\n } else if (!empty($params['search'])) {//search results\n $config['detailPid'] = $this->settings['flexform']['detailPid'];\n\n $journals = array();\n \n if(empty($params['search']['selected_colors'])){\n $params['search']['selected_colors'] = array(\n 1 => 1,\n 2 => 2,\n 4 => 4,\n 6 => 6\n );\n }\n \n $journals = $this->ezbRepository->loadSearch($params['search'], $journals['colors'], $config); \n\n if(!empty($params['search']['selected_colors'])){\n //damit selected_colors nicht in verstekten Formularfeldern auftauchen\n unset($params['search']['selected_colors']);\n }\n\n //change view\n $controllerContext = $this->buildControllerContext();\n $controllerContext->getRequest()->setControllerActionName('displaySearch');\n $this->view->setControllerContext($controllerContext);\n\n //variables for template\n $this->view->assign('journals', $journals);\n $this->view->assign('listUrl', $listURL);\n $this->view->assign('colors', $params['colors']);\n $this->view->assign('formParameter', $params['search']);\n } else {//start point\n $liste = $this->ezbRepository->loadOverview();\n\n //change view\n $controllerContext = $this->buildControllerContext();\n $controllerContext->getRequest()->setControllerActionName('displayOverview');\n $this->view->setControllerContext($controllerContext);\n\n //variables for template\n $this->view->assign('list', $liste);\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 display ()\n {\n echo $this->as_text ();\n }", "function moduleContent()\t{\n\t\t$this->content .= $this->makeList();\n\t}", "function listChaptersBackend() {\r\n \r\n $chapterManager = new \\Alaska2\\Model\\ChapterManager();\r\n $chapters = $chapterManager->getChapters();\r\n\r\n include 'view/backend/listChaptersViewBackend.php';\r\n }", "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'qbd',\n 'datatable' => new QBDDatatable(),\n 'title' => mtrans('qbd', 'qbd_list'),\n ]);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function avaliation_texts()\n {\n $avaliation_texts = new Avaliation_Text();\n $avaliation_texts->select(\"*\")->select_func(\"DATE_FORMAT\", array(\"@create_date\", '[,]', '%d/%m/%Y'), 'create_date')\n ->order_by('avaliation')\n ->get();\n\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => '#',\n 'Textos de avaliação' => site_url('admin/curadoria/avaliation_texts')\n );\n\n $toview['avaliation_texts'] = $avaliation_texts;\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/avaliation_texts', $toview);\n }", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function index()\n {\n $this->booklist();\n }", "public function actionList()\n {\n $this->adminOnly();\n\n $pages = $this->findAll();\n return $this->render('@custom_pages/views/common/list', [\n 'pages' => $pages,\n 'label' => Yii::createObject($this->getPageClassName())->getLabel(),\n 'subNav' => \\humhub\\modules\\custom_pages\\widgets\\ContainerPageMenu::widget()\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Description::find(),\n 'pagination' => [\n 'pageSize' => 500,\n ],\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "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 }", "function displayClientList()\n\t{\n\t\t$_SESSION[\"ClientId\"] = \"\";\n\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientlist.html\", \"setup\");\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_list\"));\n\t\tilUtil::sendInfo();\n\n\t\t// common\n\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt(\"list_clients\"));\n\t\t$this->tpl->setVariable(\"TXT_LISTSTATUS\",($this->setup->ini->readVariable(\"clients\",\"list\")) ? $this->lng->txt(\"display_clientlist\") : $this->lng->txt(\"hide_clientlist\"));\n\t\t$this->tpl->setVariable(\"TXT_TOGGLELIST\",($this->setup->ini->readVariable(\"clients\",\"list\")) ? $this->lng->txt(\"disable\") : $this->lng->txt(\"enable\"));\n\n\t\tinclude_once(\"./setup/classes/class.ilClientListTableGUI.php\");\n\t\t$tab = new ilClientListTableGUI($this->setup);\n\t\t$this->tpl->setVariable(\"CLIENT_LIST\", $tab->getHTML());\n\n\t\t// create new client button\n\t\t$this->btn_next_on = true;\n\t\t$this->btn_next_lng = $this->lng->txt(\"create_new_client\").\"...\";\n\t\t$this->btn_next_cmd = \"newclient\";\n\t}", "public function index()\n {\n //\n $subtexts=SubText::orderBy('created_at','ASC')->get();\n return view('back.subtext.index',compact('subtexts'));\n }", "public function index()\n\t{\n\t\t$this->template->build('addressbook/contact_listing');\t\n\t}", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "public function listView()\r\n {\r\n $data['page'] = lang('jobs');\r\n $data['menu'] = 'jobs';\r\n $pagedata['companies'] = objToArr($this->AdminCompanyModel->getAll());\r\n $pagedata['departments'] = objToArr($this->AdminDepartmentModel->getAll());\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/jobs/list', $pagedata);\r\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 show(Listt $listt)\n {\n //\n }", "public function actionIndex() : string\n {\n return $this->render('index', [\n 'items' => Item::find()->asArray()->all(),\n ]);\n }", "public function actionList()\n {\n $this->pageTitle = Yii::t('badgerModule.Site','All badges');\n\n $badges = Badge::model()->findAll();\n\n $this->render('list',array(\n 'badges' => $badges,\n ));\n }", "public function displayContentOverview() {}", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }", "function index()\r\n {\r\n $blog = new BlogPost($this->db);\r\n $this->f3->set('posts',$blog->all());\r\n $this->f3->set('page_head','Post List'); \r\n $this->f3->set('view','blogger/list.htm');\r\n }", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "function all( $args )\n { \n // set the appropriate view\n\t\t$subview = array('browse_result');\n $this->view->add('subviews',$subview);\n \n \n /* ====================== \n * Get the listings model \n */\n $model = $this->app->model('listings');\n \n // get from settings, 10 as default\n $limit = $this->settings->get('per_page');\n $limit = ( $limit != null ) ? $limit : 10;\n \n // find if user has decided on some number already\n if( isset( $_SESSION['listings_per_page'] )){\n $limit = (int)$_SESSION['listings_per_page'];\n \n }\n \n // get the page number\n $page = 0;\n // convert to integer\n if( $args['page'] != null && is_numeric($args['page']) ){\n $page = ((int) $args['page'])-1;\n }\n \n \n // get result\n $result = $model->limit($limit)->page($page)->get_all();\n \n \n $count = $model->count_all();\n // set up counts\n $paginate = array(\n 'page_count' => ((int)ceil($count/$limit)),\n 'this_page' => $page+1\n );\n \n // add page count\n $this->view->add('paginate',$paginate);\n \n // add teh page action to the view\n $this->view->add('page_action',\n $this->app->form_path('browse/all') );\n \n // add the result to the view\n $this->view->add('listing_results', $result);\n }", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "function lists()\n {\n $data[\"data\"] = $this->RapatModel->get();\n $this->load->view('rapat/lists', $data);\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}", "protected function renderListNavigation()\n {\n $totalPages = ceil($this->totalItems / $this->iLimit);\n\n $content = '';\n\n // Show page selector if not all records fit into one page\n if ($totalPages > 1) {\n $first = $previous = $next = $last = '';\n $listURL = $this->listURL('', $this->table);\n\n // 1 = first page\n $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;\n\n // Compile first, previous, next, last and refresh buttons\n if ($currentPage > 1) {\n $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:first');\n\n $first = '<a href=\"' . $listURL . '&pointer=0\"><img' . IconFactory::skinImg('control_first.gif')\n . 'alt=\"' . $labelFirst . '\" title=\"' . $labelFirst . '\" /></a>';\n } else {\n $first = '<img' . IconFactory::skinImg('control_first_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage - 1) > 0) {\n $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:previous');\n\n $previous = '<a href=\"' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_previous.gif')\n . 'alt=\"' . $labelPrevious . '\" title=\"' . $labelPrevious . '\" /></a>';\n } else {\n $previous = '<img' . IconFactory::skinImg('control_previous_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage + 1) <= $totalPages) {\n $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:next');\n\n $next = '<a href=\"' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_next.gif')\n . 'alt=\"' . $labelNext . '\" title=\"' . $labelNext . '\" /></a>';\n } else {\n $next = '<img' . IconFactory::skinImg('control_next_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if ($currentPage != $totalPages) {\n $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:last');\n\n $last = '<a href=\"' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_last.gif')\n . 'alt=\"' . $labelLast . '\" title=\"' . $labelLast . '\" /></a>';\n } else {\n $last = '<img' . IconFactory::skinImg('control_last_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n $pageIndicator = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:pageIndicator'),\n $currentPage, $totalPages);\n\n if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {\n $lastElementNumber = $this->firstElementNumber + $this->iLimit;\n } else {\n $lastElementNumber = $this->totalItems;\n }\n $rangeIndicator = '<span class=\"pageIndicator\">'\n . sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:rangeIndicator'),\n $this->firstElementNumber + 1, $lastElementNumber, $this->totalItems)\n . '</span>';\n\n $content .= '<div class=\"ttnewsadmin-pagination\">'\n . $first . $previous\n . '&nbsp;'\n . $rangeIndicator . '&nbsp;('\n . $pageIndicator . ')&nbsp;'\n . $next . $last\n . '</div>';\n } // end of if pages > 1\n\n $data = Array();\n $titleColumn = $this->fieldArray[0];\n $data[$titleColumn] = $content;\n\n return ($this->addElement(1, '', $data));\n }", "private function printSelectionPage() {\n\t\techo '<ul data-role=\"listview\" data-inset=\"true\">';\n\t\t$dir = new DirectoryIterator ( $this::filesPath );\n\t\tforeach ( $dir as $fileinfo ) {\n\t\t\tif (! $fileinfo->isDot ()) {\n\t\t\t\t$fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME );\n\t\t\t\t$fileFullPath = $fileinfo->getPath () . '/' . $fileinfo;\n\t\t\t\t$lection = fgets ( fopen ( $fileFullPath, 'r' ) );\n\t\t\t\tif (strcmp ( \"-stat\", substr ( $fileName, - 5 ) ) != 0) {\n\t\t\t\t\techo '<li>\n\t\t\t\t\t\t<a class=\"ui-btn ui-btn-icon-right ui-icon-carat-r\" data-form=\"ui-btn-up-a\" href=\"?q=lesson&l=', $fileName, '\">', $lection, '</a>\n\t\t\t\t\t\t</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo '</ul>';\n\t}", "function doDisplay()\n {\n $criteria = new lmbSQLCriteria('is_branch = 1');//lmbSQLFieldCriteria('is_branch', 1);\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n }", "public function showText($text) {}", "public function carList() {\n $car_list[] = Link::fromTextAndUrl($this->t('BMW'), Url::fromRoute('frontendapi.cars.car', ['car' => 'bmw']));\n $car_list[] = Link::fromTextAndUrl($this->t('Lada'), Url::fromRoute('frontendapi.cars.car', ['car' => 'lada']));\n\n $output['car_list'] = [\n '#theme' => 'item_list',\n '#items' => $car_list,\n '#title' => t('Car list'),\n ];\n\n return $output;\n }", "function listDescriptions() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\tglobal $id;\n\n\t\t$this->getDescription();\n\n\t\t$languages = $this->languageClass->getItems();\n\n\t\t$table = $HTML->table();\n\t\t$table->setTableId(\"descriptions\");\n\t\t$table->setHeader(0, $this->translate(\"Language\"), \"sortby\");\n\t\t$table->setHeader(1, $this->translate(\"Title\"));\n\t\t$table->setHeader(2, $this->translate(\"Search\"), \"max search\");\n\t\t$column_1 = false;\n\t\t$column_2 = false;\n\t\t$column_3 = false;\n\t\t$ids = false;\n\t\t$status = false;\n\t\t$count = isset($this->item[\"title\"]) ? (\" (\" . count($this->item[\"title\"][0]) .\")\") : \"\";\n\t\tforeach($languages[\"id\"] as $language_key => $language_id) {\n\t\t\tif($this->item[\"description_language_id\"][0] && array_search($language_id, $this->item[\"description_language_id\"][0]) !== false) {\n\t\t\t\t$column_1[] = $this->languageClass->getItemName($language_id);\n\t\t\t\t$column_2[] = $this->item[\"title\"][0][array_search($language_id, $this->item[\"description_language_id\"][0])];\n\t\t\t\t$column_3[] = $this->item[\"description_short\"][0][array_search($language_id, $this->item[\"description_language_id\"][0])];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$column_1[] = $this->languageClass->getItemName($language_id);\n\t\t\t\t$column_2[] = \"-\";\n\t\t\t\t$column_3[] = \"-\";\n\t\t\t}\n\t\t\t$ids[] = $language_id; \n\t\t\t$status[] = \"description_edit\";\n\t\t}\n\n\t\t$table->setRowStatus($status);\n\t\t$table->setRowId($ids);\n\t\t$table->setColumnValues($column_1, $column_2, $column_3);\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:description\">';\n\t\t$_ .= '<div class=\"c init:expandable id:descriptions\">';\n\t\t$_ .= $HTML->head($this->translate(\"Descriptions\") . $count, \"2\");\n\t\t$_ .= '<fieldset>';\n\n\t\t$_ .= $HTML->inputHidden(\"id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"item_id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"page_status\", \"description_edit\");\n\n\t\t$_ .= $table->build();\n\t\t$_ .= '</fieldset>';\n\t\t$_ .= '</div>';\n\t\t$_ .= '</div>';\n\t\treturn $_;\n\t}", "public function display()\n\t{\n\t\t$url = $this->get_page_url( array( 'tab' => 'list' ) );\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\"><< Return to Section List</a>\n\t\t<?php\n\t\t\n\t\tif( !isset($_GET['key']) && !is_numeric($_GET['key']) )\n\t\t{\n\t\t\techo 'The section key is not specified.';\n\t\t\treturn;\n\t\t}\n\n\t\t$this->section = $this->model->get_section_by_key( $_GET['key'] );\n\n\t\tif( $this->section === NULL )\n\t\t{\n\t\t\techo 'The section key is not valid.';\n\t\t\treturn;\n\t\t}\n\n\t\t$this->section = $this->model->filter_section( $this->section );\n\t\t\n\t\t$this->print_settings();\n\t}", "public static function index()\r\n\t{\r\n\t\t$title = 'Book List';\r\n\t\t$model = new Books();\r\n\t\t$books = $model->all();\r\n\t\t/*\r\n\t\t// compact do this (down):\r\n\t\t$data['title'] = 'Book List';\r\n\t\t$data['books'] = [];\r\n\t\t*/\r\n\t\tView::show('/books/index', compact('title','books'));\r\n\t}", "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 newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "function listcontent_open() {\n $this->doc .= '<div class=\"li\">';\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 run()\n\t{\n\t\techo \"</ul>\";\n\t}", "public function view()\n {\n $pages = explode(' ', $this->list);\n\n if ($this->current_page < 1 || $this->current_page > $this->total_pages) {\n $this->current_page = 1;\n }\n $output = null;\n\n $output .= '<ul class=\"pagination\">';\n $output .= $this->beginning();\n $output .= $this->middle($pages);\n $output .= $this->ending();\n $output .= '</ul>';\n \n return $output;\n }", "public function showContents() {\n\t\techo $this -> getContents();\n\t\texit ;\n\t}", "public function index()\n {\n $this->template .= 'index';\n $this->vars['newsPaginator'] = $this->newsRep->getNewsForTableWithPaginate();\n return $this->renderOutput();\n }", "protected function render() {\n\t\t$args = $this->get_settings_for_display();\n\t\t$args['url'] = $args['url']['url'];\n\t\t$args['disabled'] = $args['disabled'] == 'yes' ? true : false;\n\t\t$args['top_border'] = $args['top_border'] == 'yes' ? true : false;\n\n\t\techo list_item_shortcode($args);\n\t}", "public function index()\n\t{\n\t\t$this->data['bmjc_list'] = $this->bmjc_mdl->getbmjclist(); \n\t\t$this->load->view('bmjc_list',$this->data);\n\t}", "function index() {\r\n \t\r\n // The default action is the showall action\r\n $this->browse();\r\n }", "public function actionFaqListing()\n {\n ob_start();\n Yii::app()->theme='back';\n $model=new Faq;\n $rec=Faq::model()->findAll();\n $this->render('faqlisting',array('model'=>$model,'list'=>$rec));\n\n }", "public function index()\n {\n $data = [];\n\n $data['texts'] = Text::get();\n\n return view('admin.texts.index', $data);\n }" ]
[ "0.6876131", "0.6868345", "0.6807685", "0.6665387", "0.65461314", "0.639859", "0.63736576", "0.6299446", "0.62643903", "0.626056", "0.6227146", "0.6212653", "0.6177368", "0.61589545", "0.61426634", "0.61038685", "0.60984755", "0.60861754", "0.6075717", "0.60469574", "0.60360485", "0.6034165", "0.59780014", "0.59600973", "0.59573257", "0.59346175", "0.5912083", "0.5903323", "0.58824956", "0.58545935", "0.585103", "0.58506596", "0.58480763", "0.58438003", "0.58338803", "0.58332974", "0.5832568", "0.58237344", "0.58229923", "0.5816838", "0.58096534", "0.5796304", "0.57802504", "0.57712716", "0.5770844", "0.5766926", "0.5755538", "0.57375413", "0.57254446", "0.5725078", "0.57137537", "0.5712741", "0.5708832", "0.5706766", "0.5693346", "0.5687543", "0.5686878", "0.5682786", "0.5676472", "0.56655264", "0.56655264", "0.56655264", "0.56636494", "0.56626827", "0.56608146", "0.5659143", "0.5656854", "0.56554526", "0.56528276", "0.5651682", "0.5647355", "0.56449574", "0.5635603", "0.5635024", "0.56291336", "0.5627551", "0.562244", "0.56202865", "0.5616146", "0.5616108", "0.561261", "0.5611767", "0.560435", "0.55999386", "0.55924183", "0.5587385", "0.5583249", "0.5581311", "0.5572912", "0.55722684", "0.5571755", "0.5570049", "0.5569872", "0.5569419", "0.55614495", "0.5554225", "0.5553849", "0.55516696", "0.5551061", "0.5547966", "0.5544379" ]
0.0
-1
Show the form for creating a new BText.
public function create($id = '') { return view('b_texts.create')->with('block_id', $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public function create()\n {\n return view('backend.texts.create');\n }", "protected function Form_Create() {\n\t\t\t// Define the Label\n\t\t\t$this->lblMessage = new QLabel($this);\n\t\t\t$this->lblMessage->Text = 'Click the button to change my message.';\n\n\t\t\t// Define the Button\n\t\t\t$this->btnButton = new QButton($this);\n\t\t\t$this->btnButton->Text = 'Click Me!';\n\n\t\t\t// Add a Click event handler to the button\n\t\t\t$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));\n\t\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "protected function formCreate() {\n\t\t\t// Define the Simple Message Dialog Box\n\t\t\t$this->dlgSimpleMessage = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgSimpleMessage->Title = \"Hello World!\";\n\t\t\t$this->dlgSimpleMessage->Text = '<p><em>Hello, world!</em></p><p>This is a standard, no-frills dialog box.</p><p>Notice how the contents of the dialog '.\n\t\t\t\t'box can scroll, and notice how everything else in the application is grayed out.</p><p>Because we set <strong>MatteClickable</strong> to <strong>true</strong> ' .\n\t\t\t\t'(by default), you can click anywhere outside of this dialog box to \"close\" it.</p><p>Additional text here is just to help show the scrolling ' .\n\t\t\t\t'capability built-in to the panel/dialog box via the \"Overflow\" property of the control.</p>';\n\t\t\t$this->dlgSimpleMessage->AutoOpen = false;\n\n\t\t\t// Make sure this Dialog Box is \"hidden\"\n\t\t\t// Like any other \\QCubed\\Control\\Panel or QControl, this can be toggled using the \"Display\" or the \"Visible\" property\n\t\t\t$this->dlgSimpleMessage->Display = false;\n\n\t\t\t// The First \"Display Simple Message\" button will utilize an AJAX call to Show the Dialog Box\n\t\t\t$this->btnDisplaySimpleMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessage->Text = t('Display Simple Message \\QCubed\\Project\\Jqui\\Dialog');\n\t\t\t$this->btnDisplaySimpleMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnDisplaySimpleMessage_Click'));\n\n\t\t\t// The Second \"Display Simple Message\" button will utilize Client Side-only JavaScripts to Show the Dialog Box\n\t\t\t// (No postback/postajax is used)\n\t\t\t$this->btnDisplaySimpleMessageJsOnly = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->Text = 'Display Simple Message \\QCubed\\Project\\Jqui\\Dialog (ClientSide Only)';\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgSimpleMessage));\n\n\t\t\t$this->pnlAnswer = new \\QCubed\\Control\\Panel($this);\n\t\t\t$this->pnlAnswer->Text = 'Hmmm';\n\t\t\t\n\t\t\t$this->btnDisplayYesNo = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplayYesNo->Text = t('Do you love me?');\n\t\t\t$this->btnDisplayYesNo->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('showYesNoClick'));\n\t\t\t\n\t\t\t\n\t\t\t// Define the CalculatorWidget example. passing in the Method Callback for whenever the Calculator is Closed\n\t\t\t// This is example uses \\QCubed\\Project\\Jqui\\Button's instead of the JQuery UI buttons\n\t\t\t$this->dlgCalculatorWidget = new CalculatorWidget($this);\n\t\t\t$this->dlgCalculatorWidget->setCloseCallback('btnCalculator_Close');\n\t\t\t$this->dlgCalculatorWidget->Title = \"Calculator Widget\";\n\t\t\t$this->dlgCalculatorWidget->AutoOpen = false;\n\t\t\t$this->dlgCalculatorWidget->Resizable = false;\n\t\t\t$this->dlgCalculatorWidget->Modal = false;\n\n\t\t\t// Setup the Value Textbox and Button for this example\n\t\t\t$this->txtValue = new \\QCubed\\Project\\Control\\TextBox($this);\n\n\t\t\t$this->btnCalculator = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnCalculator->Text = 'Show Calculator Widget';\n\t\t\t$this->btnCalculator->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnCalculator_Click'));\n\n\t\t\t// Validate on JQuery UI buttons\n\t\t\t$this->dlgValidation = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgValidation->AddButton ('OK', 'ok', true, true); // specify that this button causes validation and is the default button\n\t\t\t$this->dlgValidation->AddButton ('Cancel', 'cancel');\n\n\t\t\t// This next button demonstrates a confirmation button that is styled to the left side of the dialog box.\n\t\t\t// This is a QCubed addition to the jquery ui functionality\n\t\t\t$this->dlgValidation->AddButton ('Confirm', 'confirm', true, false, 'Are you sure?', array('class'=>'ui-button-left'));\n\t\t\t$this->dlgValidation->Width = 400; // Need extra room for buttons\n\n\t\t\t$this->dlgValidation->AddAction (new \\QCubed\\Event\\DialogButton(), new \\QCubed\\Action\\Ajax('dlgValidate_Click'));\n\t\t\t$this->dlgValidation->Title = 'Enter a number';\n\n\t\t\t// Set up a field to be auto rendered, so no template is needed\n\t\t\t$this->dlgValidation->AutoRenderChildren = true;\n\t\t\t$this->txtFloat = new \\QCubed\\Control\\FloatTextBox($this->dlgValidation);\n\t\t\t$this->txtFloat->Placeholder = 'Float only';\n\t\t\t$this->txtFloat->PreferredRenderMethod = 'RenderWithError'; // Tell the panel to use this method when rendering\n\n\t\t\t$this->btnValidation = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnValidation->Text = 'Show Validation Example';\n\t\t\t$this->btnValidation->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgValidation));\n\n\t\t\t/*** Alert examples ***/\n\n\t\t\t$this->btnErrorMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnErrorMessage->Text = 'Show Error';\n\t\t\t$this->btnErrorMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnErrorMessage_Click'));\n\n\t\t\t$this->btnInfoMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnInfoMessage->Text = 'Get Info';\n\t\t\t$this->btnInfoMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnGetInfo_Click'));\n\t\t}", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function create()\n {\n $data = [];\n return view('admin.texts.create', $data);\n\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create()\n {\n // If the user is logged in...\n // load the create form (app/views/texts/create.blade.php)\n if (Auth::check()) {\n return View::make('texts.create')\n ->with('entity', 'text')\n ->with('title', 'Text create');\n } else {\n // User is not logged in\n Session::flash('message', 'Please log in');\n return Redirect::to('/');\n }\n }", "public function create()\n\t{\n\t\treturn view('translation.form');\n\t}", "public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}", "function create_new() {\n if($this->table_title != '' ) {\n $this->title = 'New ' . $this->table_title .\n $this->makeForm();\n }\n }", "public function create()\n {\n $title = \"Thêm Mới Banner\";\n return view('backend.banner.form', compact('title'));\n }", "public function createForm();", "public function createForm();", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\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 }", "public function actionCreate()\n {\n $model = new EnglishKb();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "abstract public function createForm();", "abstract public function createForm();", "public function create()\n {\n\n return view('Admin.Focus.create');\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 return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }", "public function create()\n\t{\n\t\treturn View::make('trading.barang.create')->with('page','Barang')->with('modul','Create');\n\t}", "public function create ()\n {\n return view('forms.create');\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "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\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function CreateForm();", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $title = 'Khởi tạo chi nhánh';\n\n return view(PAGE_VIEW_FORM, compact('title'));\n }", "public function createForm()\n {\n }", "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('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n\t{\n\t\t//load a form to make an artobj\n\t\treturn View::make('artobjs.create');\n\t}", "public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }", "public function create()\n {\n return \"Formulário para cadastrar um novo cliente.\";\n }", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "public function create()\n\t{\n\t\treturn view('editor')->with('action', 'save');\n\t}", "public function create()\n\t{\n\t\treturn View::make('brews.create');\n\t}", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\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 $this->form->render('mconsole::places.form');\n }", "public function create()\n {\n return view('belts.create');\n }", "public function create()\n {\n return view('tiny::form', [\n 'action_method' => 'create',\n 'form_action' => $this->currentRouteUrlDir().'/store',\n 'title' => 'Tiny URL Server',\n 'prompt' => 'Add New URL',\n 'message' => Session::get('message')\n ]);\n }", "public function create()\n\t{\n\t\treturn view('bbc.create');\n\t}", "public function create()\n {\n return view('label.create');\n }", "public function create()\n {\n return view ('Ce.create');\n }", "public function create_avaliation_text()\n {\n\n # The form was submitted?\n if( $this->input->post() )\n {\n $avaliation_text = new Avaliation_Text();\n $avaliation_text->avaliation = $this->input->post('avaliation');\n $avaliation_text->text = $this->input->post('text');\n\n # The data was saved?\n if( $avaliation_text->save() )\n {\n $this->session->set_flashdata('success', 'Salvo com sucesso');\n redirect(\"admin/curadoria/edit_avaliation_text/{$avaliation_text->id}\");\n }else{\n $this->session->set_flashdata('error', $avaliation_text->error->transaction);\n redirect(site_url('admin/curadoria/create_avaliation_text'));\n }\n }else{\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => '#',\n 'Textos de avaliação' => site_url('admin/curadoria/avaliation_texts'),\n 'Editar' => '#'\n );\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/create_avaliation_text');\n }\n }", "public function create()\n {\n return view(\"backend.cms.form\");\n }", "public function create()\n {\n return view('biologicos.create');\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //\n return view('admin.barang.input');\n }", "public function create()\n {\n $this->layout->content = View::make('newStoryForm');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n return view('thangmls.create');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n //\n return $this->render('create');\n\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function create()\n {\n return view(\"{$this->viewPath}.create\", [\n 'title' => trans('main.add') . ' ' . trans('main.classes'),\n ]);\n }", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "public function create()\n {\n return view('admin.pages.forms.create', $this->data);\n }", "public function create()\n\t{\n\t\treturn View::make('unitkerjas.create')->withTitle('Tambah Unit Kerja');\n\t}", "public function create()\n {\n //\n $titles=Title::get();\n return view('back.subtext.create',compact('titles'));\n\n }", "public function actionCreate()\n {\n $model = new TfLunas();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_tf_lunas]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n $this->title = __('admin.create_personal_information');\n\n //Page content definition\n $this->content = $this->getViewContent('personal_info.personal_info_form',\n [\n 'title' => $this->title\n ]\n );\n\n return $this->renderCurrentView();\n }", "public function create()\n {\n return view('admin.berthing.create');\n }", "public function create()\n {\n return view('cli.informacion.create');\n }", "public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }", "public function create()\n {\n return view('barangs.create');\n \n }", "public function create()\n {\n return view('obat.obatAdd');\n }", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n //return view('marca.create');\n return 'Mostrando Formulario para crear Fabricantes';\n }", "public function create()\n {\n return view(\"tender.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 return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('admin.pages.forms.pengirim');\n }", "public function create()\n\t{\n\t\treturn View::make('admin.typenew.create');\n\t}", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n {\n $mode_action = 'create';\n $name = ['Barangay', 'Create'];\n $mode = [route('barangays.index'), route('barangays.create')];\n\n $this->audit_trail_logs('','','Creating new record','');\n\n return view('pages.barangays.form', [ \n 'mode' => $mode_action,\n 'breadcrumbs' => $this->breadcrumbs($name, $mode),\n 'title' => 'Barangay'\n ]);\n }", "public function form()\n {\n $this->text('code', '基金代码');\n }", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "public function create()\n\t{\n\t\treturn View::make('can_bos.create');\n\t}", "public function create()\n {\n $view = new View('verein_create');\n $view->title = 'Verein erfassen';\n $view->heading = 'Verein erfassen';\n $view->display();\n }" ]
[ "0.69649106", "0.6947938", "0.6843854", "0.6773878", "0.6688774", "0.6587767", "0.65580046", "0.6536644", "0.6532218", "0.651691", "0.64974207", "0.64923656", "0.6491102", "0.647722", "0.64708614", "0.64708614", "0.64651275", "0.64651275", "0.64651275", "0.64651275", "0.64542603", "0.6438702", "0.64279366", "0.6426109", "0.64203167", "0.64203167", "0.6417268", "0.64150685", "0.64145523", "0.64145523", "0.63812625", "0.63774896", "0.63624996", "0.6362399", "0.63478756", "0.63323486", "0.6322793", "0.6317644", "0.63102585", "0.63058573", "0.63058573", "0.63038164", "0.6301962", "0.629377", "0.6286652", "0.62817085", "0.6273721", "0.6266241", "0.6259443", "0.62563384", "0.6255281", "0.62521005", "0.62334937", "0.6232926", "0.62264365", "0.6224363", "0.6219702", "0.62191427", "0.6217022", "0.6214645", "0.62139547", "0.62126446", "0.62100226", "0.6208935", "0.620309", "0.62020874", "0.61999404", "0.61995596", "0.6199078", "0.6197853", "0.6191639", "0.61846733", "0.61710185", "0.61680865", "0.6165947", "0.6164266", "0.6152644", "0.61512256", "0.61484", "0.61469877", "0.6144014", "0.61402005", "0.61388916", "0.61372054", "0.6136888", "0.6135313", "0.613335", "0.6131779", "0.61306477", "0.6130434", "0.6130434", "0.6128431", "0.61279786", "0.6126841", "0.6122482", "0.61216843", "0.61150485", "0.6114688", "0.6114499", "0.6112932" ]
0.62675154
47
Store a newly created BText in storage.
public function store(CreateBTextRequest $request, $id = '') { $input = $request->all(); $bText = $this->bTextRepository->create($input); Flash::success('B Text saved successfully.'); return redirect('/blocks/show_texts/'.$id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n {\n // If the user is logged in...\n if (Auth::check()) {\n // validate\n // read more on validation at http://laravel.com/docs/validation\n $rules = array(\n 'title' => 'required',\n );\n $validator = Validator::make(Input::all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n return Redirect::to('texts/create')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // store\n $text = new Text;\n $text->title = Input::get('title');\n $text->author = Input::get('author');\n $text->year = Input::get('year');\n $text->description = Input::get('description');\n $text->content = Input::get('content');\n $text->publication = Input::get('publication');\n $text->publication_date = Input::get('publication_date');\n\n $text->save();\n\n // redirect\n Session::flash('message', 'Successfully created text');\n return Redirect::to('texts');\n }\n } else {\n // User is not logged in\n Session::flash('message', 'Please log in');\n return Redirect::to('/');\n }\n }", "public function store(StoreText $request)\n {\n $text = new Text();\n $text->title = $request->input('title');\n $text->slug = $request->input('slug');\n\n $text->save();\n\n return redirect()->route('admin_texts_edit', ['slug' => $text->slug]);\n }", "public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }", "public function saveTextToEntity($entity_type_id, $entity_id, $field_name, $speech);", "public function store($name, $content);", "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\t//\n\t}", "private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function store()\r\r\n\t{\r\r\n\t\t//\r\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}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.6215897", "0.6140597", "0.5994075", "0.5851112", "0.58351237", "0.5800299", "0.5800299", "0.5800299", "0.5793487", "0.57908916", "0.57633173", "0.5744871", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598", "0.5741598" ]
0.6857694
0
Display the specified BText.
public function show($id) { $bText = $this->bTextRepository->findWithoutFail($id); if (empty($bText)) { Flash::error('B Text not found'); return redirect(route('bTexts.index')); } return view('b_texts.show')->with('bText', $bText); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showText($text) {}", "protected function _showText($text) {}", "public function raw_display($text) {\n\t\tif(self::$display_stopped) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->buffering_on()) {\n\t\t\tself::$core_display->buffer .= \"$text\";\n\t\t} else {\n\t\t\techo($text);\n\t\t}\n\t}", "public function display ()\n {\n echo $this->as_text ();\n }", "public static function renderText();", "public function renderText($text = null){\n\t\tif ($text != null){ echo $text; }\n\t\t$this->text_only = true;\n\t}", "public function printText() {\n\t\tfor ($i = 0; $i < count($this->textToPrint); $i++) {\n\t\t echo $this->textToPrint[$i].\"\\n\";\n\t\t}\n\t}", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function output_text( $text = '' ){\n\t\t echo $text;\n\t }", "public abstract function display();", "abstract function display();", "abstract function display();", "public static function printText($text)\n {\n $text = self::removeDivs($text);\n echo '<p class=\"text-content\">' . $text .'<p>';\n }", "public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}", "function textOut($x, $y, $text)\r\n {\r\n $this->forceFont();\r\n echo \"$this->_canvas.drawString(\\\"$text\\\", $x, $y);\\n\";\r\n }", "function display($text) {\n\n\tglobal $messages;\n\n\tif (CMS_CLI) {\n\t\t// just output the message\n\t\techo $text,\"\\n\";\n\t} else {\n\t\t// replace leading spaces by &nbsp; to keep indentations\n\t\t$t = ltrim($text);\n\t\t$l = strlen($text) - strlen($t);\n\t\t$messages[] = str_repeat(\"&nbsp;\", $l).$t;\n\t}\n}", "abstract protected function displayContent();", "public function setText($value)\n\t{\n\t\t$this->setViewState('Text',$value,'');\n\t}", "protected function render_text() {\n $settings = $this->get_settings_for_display();\n\n $this->add_render_attribute( [\n 'content-wrapper' => [\n 'class' => 'elementor-button-content-wrapper',\n ],\n 'icon-align' => [\n 'class' => [\n 'elementor-button-icon',\n 'elementor-align-icon-' . $settings['icon_align'],\n ],\n ],\n 'text' => [\n 'class' => 'elementor-button-text',\n ],\n ] );\n\n $this->add_inline_editing_attributes( 'text', 'none' );\n ?>\n <span <?php echo $this->get_render_attribute_string( 'content-wrapper' ); ?>>\n <?php if ( ! empty( $settings['icon'] ) ) : ?>\n <span <?php echo $this->get_render_attribute_string( 'icon-align' ); ?>>\n <i class=\"<?php echo esc_attr( $settings['icon'] ); ?>\" aria-hidden=\"true\"></i>\n </span>\n <?php endif; ?>\n <span <?php echo $this->get_render_attribute_string( 'text' ); ?>><?php echo $settings['text']; ?></span>\n </span>\n <?php\n }", "public function render_text($text,$scale=null) \r\n { \r\n $bitmap=$this->text_bitmap($text); \r\n $size=$this->text_size($text); \r\n if ($scale!==null) \r\n $bitmap=$this->scale_bitmap($bitmap,$size[0],$size[1],$scale,$scale); \r\n else \r\n $scale=1; \r\n $this->display_bitmap($size[0]*$scale,$size[1]*$scale,$bitmap); \r\n }", "public function display() {\n echo $this->render();\n }", "public function show(Kibb $kibb)\n {\n //\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "static function show_text($text) {\n\n // Echo Some Text\n echo ' & here is the static method! '.$text;\n\n // Show Documentation Link\n echo ' - '.MOD_CONSTANT.' see your <a href=\"/guide/modulename\">Module Documentation</a>';\n\n }", "function renderText($text, $render_layout = true, $die = true) {\r\n $this->setAutoRender(false); // Turn off auto render because we will render whole thing now...\r\n \r\n if($render_layout) {\r\n $this->renderLayout($this->getLayoutPath(), $text);\r\n } else {\r\n print $text;\r\n } // if\r\n \r\n if($die) {\r\n die();\r\n } // if\r\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "function show_text ($display, $value)\n{\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD ALIGN=RIGHT NOWRAP><B>$display:</B></TD><TD ALIGN=LEFT>$value</TD>\\n\";\n echo \" </tr>\\n\";\n}", "function &displayTarea( &$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1, $gpc = false ) {\n $text = &$this->stripSlashesGPC( $text );\n if ( $html != 1 ) {\n // html not allowed\n $text = htmlSpecialChars( $text, ENT_QUOTES );\n }\n $text = $this->codePreConv( $text, $xcode ); // Ryuji_edit(2003-11-18)\n $text = $this->makeClickable( $text );\n if ( $smiley != 0 ) {\n $text = &$this->smiley( $text );\n }\n if ( $xcode != 0 ) {\n $text = &$this->zariliaCodeDecode( $text, $image );\n }\n if ( $br != 0 ) {\n $text = &$this->nl2Br( $text );\n }\n $text = $this->codeConv( $text, $xcode, $image ); // Ryuji_edit(2003-11-18)\n return $text;\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function output($text)\n {\n echo $text;\n }", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function display( $message )\n {\n if( true === $this->display )\n {\n // Convert for webbrowser?\n if( isset( $_SERVER[\"HTTP_HOST\"] ) )\n {\n $message = nl2br( $message );\n }\n \n // Display\n echo $message;\n }\n }", "public function display(){}", "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "function setDisplay( )\n\t{\n\t\tglobal $bgColor, $fontColor, $fontFam, $fontSize, $headerColor;\n\t\techo \"<script type=\\\"text/javascript\\\">\\n\";\n\t\techo \"\\tdocument.body.style.background = \\\"$bgColor\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"ficTitle\\\").style.color = \\\"$headerColor\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"content\\\").style.background = \\\"$bgColor\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"content\\\").style.color = \\\"$fontColor\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"content\\\").style.fontFamily = \\\"$fontFam\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"content\\\").style.fontSize = \\\"$fontSize\\\";\\n\";\n\t\techo \"\\tdocument.getElementById(\\\"content\\\").style.textTransform = \\\"none\\\";\\n\";\n\t\techo \"</script>\\n \\n\";\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "function DisplayContent($content)\n\t{\n\t\t//This should be straight forward, since the content will pretty much determine how it is displayed\n\t\t$content->Show();\n\t}", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}", "public function setText($text)\n {\n $this->_text = $text;\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display($bPrint = false)\n {\n $aData = $this->get();\n $sHeightTxt = t('%0% ′ %1% ″ – %2% cm', $aData['ft'], $aData['in'], $aData['cm']);\n\n if (!$bPrint) {\n return $sHeightTxt;\n }\n\n echo $sHeightTxt;\n }", "public function displayAction() {\r\n\r\n //GET THE TEXT STRING\r\n $text = $this->_getParam('text_string');\r\n\r\n //GET PAGE ID\r\n $page_id = $this->_getParam('page_id');\r\n\r\n $writesTable = Engine_Api::_()->getDbtable('writes', 'sitepage')->setWriteContent($page_id, $text);\r\n exit();\r\n }", "protected abstract function output($text);", "public function setText($text) {\n\t\t$this->text = htmlentities($text);\n\t}", "public function println($text) {\n $this->check_bounds();\n ncurses_mvaddstr($this->offset++, 0, $text);\n }", "function _adRenderText(&$aBanner, $zoneId=0, $source='', $ct0='', $withText=false, $logClick=true, $logView=true, $useAlt=false, $richMedia=false, $loc='', $referer='', $context=array())\n{\n // This is a wrapper to the \"parent\" bannerTypeHtml function\n $aConf = $GLOBALS['_MAX']['CONF'];\n if (!function_exists('Plugin_BannerTypeText_delivery_adRender')) {\n @include LIB_PATH . '/Extension/bannerTypeText/bannerTypeTextDelivery.php';\n }\n return Plugin_BannerTypeText_delivery_adRender($aBanner, $zoneId, $source, $ct0, $withText, $logClick, $logView, $useAlt, $loc, $referer);\n}", "public function setText($text) {\n $this->TEXT = $text;\n }", "public function setText($text)\n {\n $this->_text = (string)$text;\n }", "public function display() {}", "public function display() {}", "abstract public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, $align, ezcGraphRotation $rotation = null );", "public function display() {\n\t}", "abstract protected function doDisplay(array $context, array $blocks = array());", "function showPlainText(&$plaintext) {\n\n\t\t//yet to be implemented\n\t\treturn true;\n\t}", "function show($text=null, $separator=null)\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['recordCount']) )\n\t\t{\n\t\t\t$t = '';\n\t\t\tif(is_array($this->show))\n\t\t\t{\n\t\t\t\t$t = $text.$separator;\n\t\t\t\tforeach($this->show as $value)\n\t\t\t\t{\n\t\t\t\t\t$link = preg_replace('/show=(.*?)&/','show='.$value.'&',$this->link);\n\t\t\t\t\tif($this->_pageDetails['limit'] == $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$t .= '<em>'.$value.'</em>'.$separator;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$t .= $this->Ajax->linkToRemote($value, array(\"fallback\"=>$this->action.\"#\",\"url\" => $link.$this->_pageDetails['page'],\"update\" => \"ajax_update\",\"method\"=>\"get\")).$separator;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$t .= $this->Html->link($value,$link.$this->_pageDetails['page']).$separator;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "function display_header_text()\n {\n }", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}", "public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}", "function text($breed, $text)\n {\n if ((isset($this->breeds[$breed]) == true) && ($this->breeds[$breed] == true)) {\n fwrite($this->fh, date(\"Y-m-d H:i:s\") . \" [ \" . $breed . \" ] [\" . $this->instance_name . \"] \" . $text . \"\\r\\n\");\n }\n }", "public function display( $html )\n\t{\n\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser/bbcode.php', 'class_text_parser_bbcode' );\n\t\t$bbcodeParser = new $classToLoad();\n\t\t\n\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser/html.php', 'class_text_parser_html' );\n\t\t$htmlParser = new $classToLoad();\n\t\t\n\t\tif ( $this->isBBCode( $html ) )\n\t\t{\n\t\t\t$html = $bbcodeParser->BBCodeToHtml( $html );\n\t\t}\n\n\t\t/* Remove disabled tags */\n\t\tif ( ! self::$Perms['parseHtml'] )\n\t\t{\n\t\t\t$html = $this->removeDisabledTags( $html );\n\t\t}\n\n\t\t/* Parse display tags */\n\t\t$html = $bbcodeParser->toDisplay( $html );\n\t\t\n\t\t/* Finish off HTML display */\n\t\t$html = $htmlParser->toDisplay( $html );\n\t\t\n\t\t/* Emoticons */\n\t\tif ( self::$Perms['parseEmoticons'] )\n\t\t{\n\t\t\t$html = $this->parseEmoticons( $html );\n\t\t}\n\t\t\n\t\t/* Badwords */\n\t\tif ( ! self::$Perms['skipBadWords'] )\n\t\t{\n\t\t\t$html = $this->parseBadWords( $html );\n\t\t}\n\t\n\t\tif ( self::$Perms['parseHtml'] )\n\t\t{\n\t\t\tif ( IPS_APP_COMPONENT != 'forums' && IPS_APP_COMPONENT != 'members' )\n\t\t\t{\n\t\t\t\t/* Allow apps that don't save HTML state HTML editing */\n\t\t\t\t$html = str_replace( \"&#39;\" , \"'\", $html );\n\t\t\t\t$html = str_replace( \"&#33;\" , \"!\", $html );\n\t\t\t\t$html = str_replace( \"&#036;\", \"$\", $html );\n\t\t\t\t$html = str_replace( \"&#124;\", \"|\", $html );\n\t\t\t\t$html = str_replace( \"&amp;\" , \"&\", $html );\n\t\t\t\t$html = str_replace( \"&gt;\"\t , \">\", $html );\n\t\t\t\t$html = str_replace( \"&lt;\"\t , \"<\", $html );\n\t\t\t\t$html = str_replace( \"&#60;\" , \"<\", $html );\n\t\t\t\t$html = str_replace( \"&#62;\" , \">\", $html );\n\t\t\t\t$html = str_replace( \"&quot;\", '\"', $html );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Fixes an issue with legacy posts */\n\t\t\t\t$html = str_replace( '&quot;', '\"', $html );\n\t\t\t\t$html = str_replace( '&lt;', '<', $html );\n\t\t\t\t$html = str_replace( '&gt;', '>', $html );\n\t\t\t}\n\t\t\t\n\t\t\t/* Legacy posts and object/embed */\n\t\t\tpreg_match_all( '#(codebase|src|href|pluginspage|data|value)=\"<a href=[\"\\']([^\"\\']+?)[\"\\']([^>]+?)?>(.+?)</a>#is', $html, $urlMatches );\n\t\t\t\n\t\t\t/* Finish up URLs and such */\n\t\t\tfor( $i = 0 ; $i < count( $urlMatches[0] ) ; $i++ )\n\t\t\t{\n\t\t\t\t$raw = $urlMatches[0][ $i ];\n\t\t\t\t$attr = $urlMatches[1][ $i ];\n\t\t\t\t$url = $urlMatches[2][ $i ];\n\t\t\t\t$text = $urlMatches[4][ $i ];\n\t\t\t\t\n\t\t\t\t$html = str_replace( $raw, $attr . '=\"' . $url . '\"', $html );\n\t\t\t}\n\t\t\t\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?<param#is', \"<param\", $html );\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?<embed#is', \"<embed\", $html );\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?</object>#is', \"</object>\", $html );\n\t\t\t\n\t\t\t/* Ugh... */\n\t\t\t$html = $this->HtmlAllowedPreContents( $html, 'pre', array( '<', '>' ) );\n\t\t}\n\t\t\n\t\t/* SEO stuffs */\n\t\t$html = $this->_seoAcronymExpansion( $html );\n\t\t\n\t\t/* Little secret codes */\n\t\t$html = str_ireplace( \"(c)\" , \"&copy;\", $html );\n\t\t$html = str_ireplace( \"(tm)\", \"&#153;\", $html );\n\t\t$html = str_ireplace( \"(r)\" , \"&reg;\" , $html );\n\t\n\t\treturn $html;\n\t}", "public function display($message);", "function nirvana_pptext_output( $title, $text, $id, $title_id, $text_id ) {\n\tif (!empty($title) || !empty($text)) { ?>\n\t\t<div id=\"<?php echo $id ?>\"><?php\n\t\t\tif (!empty($title)) { ?><div id=\"front-text<?php echo $title_id ?>\" class=\"ppbox\"> <h2><?php echo do_shortcode($title) ?> </h2></div><?php }\n\t\t\tif (!empty($text)) { ?><div id=\"front-text<?php echo $text_id ?>\" class=\"ppbox\"> <?php echo force_balance_tags( do_shortcode($text) ) ?> </div><?php } ?>\n\t\t</div><!--pp-text--><?php }\n}", "function text( $name, $args = array() ){\n\tget_text( $name, $args, 'echo' );\n}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function executeTextWidget2($widgetNuber){\n $widgetNo = $this->widgetNumber ;\n $websiteId = $this->context->get('WebsiteId');\n $themeOptions = Doctrine_Core::getTable('ThemeOptions')->getThemeOptions($websiteId);\n \n if(array_key_exists(\"TextWidgetsLinkType_\".$widgetNo,$themeOptions) && array_key_exists(\"TextWidgetsLinkId_\".$widgetNo, $themeOptions))\n\t\t\t$this->textWidgetLink = $this->textWidgetLinkTo($themeOptions, \"TextWidgetsLinkType_\".$widgetNo,\"TextWidgetsLinkId_\".$widgetNo);\n else\n\t\t\t$this->textWidgetLink = \"\";\n\n $this->widgetTitle = $themeOptions['TextWidgetsTitle_'.$widgetNo] ;\n $this->widgetContent = $themeOptions['TextWidgets_'.$widgetNo] ;\n $this->widgetNo = $widgetNo;\n }", "function htmlblock($text) {\n $this->html($text, 'pre');\n }", "public function broadcastText (string $text) {\n $this->broadcast(Frame::OP_TEXT, $text);\n }", "abstract function display($value);", "protected function _drawText()\n {\n $x = $this->_width*0.05;\n $y = $this->_height*0.96;\n\n $text_color=ImageColorAllocate($this->_image, 0x00, 0x00, 0x00);\n\n $fontsize = $this->scale*7;\n $kerning = $fontsize*1;\n\n for($i=0;$i<strlen($this->number);$i++)\n {\n imagettftext($this->_image, $fontsize, 0, $x, $y, $text_color, $this->font, $this->number[$i]);\n if($i==0 || $i==6)\n $x += $kerning*0.5;\n $x += $kerning;\n }\n }", "public function setText(string $text): void {\n\t\t$this->text = $text;\n\t}", "public function executeTextWidget1($widgetNuber){\n $widgetNo = $this->widgetNumber ;\n $websiteId = $this->context->get('WebsiteId');\n $themeOptions = Doctrine_Core::getTable('ThemeOptions')->getThemeOptions($websiteId);\n\n if(array_key_exists(\"TextWidgetsLinkType_\".$widgetNo,$themeOptions) && array_key_exists(\"TextWidgetsLinkId_\".$widgetNo, $themeOptions))\n\t\t\t$this->textWidgetLink = $this->textWidgetLinkTo($themeOptions, \"TextWidgetsLinkType_\".$widgetNo,\"TextWidgetsLinkId_\".$widgetNo);\n else\n\t\t\t$this->textWidgetLink = \"\";\n\n $this->widgetTitle = $themeOptions['TextWidgetsTitle_'.$widgetNo] ;\n $this->widgetContent = $themeOptions['TextWidgets_'.$widgetNo] ;\n }", "public function setText($text) {\n\t\t$this->data[\"text\"] = $text;\n\t}", "public function text()\n\t{\n\t\techo \"Hello there! I'm just an <code>echo</code> statement in a method...\";\n\t}", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public static function text() {}", "function setText($text)\r\n {\r\n $this->text = nl2br($text);\r\n $this->wordCount = str_word_count($text);\r\n }", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "function &previewTarea( &$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1 ) {\n return $this->displayTarea( $text, $html, $smiley, $xcode, $image, $br );\n }", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\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 bold($text) {\n return $this->begin() . $this->formats['bold'] . $text . $this->end();\n }", "function printbr ($text = '', $descr = '') \r\n{\r\n\tprintNicely($descr . ' ' . $text);\r\n}", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "function display_text($file) {\n\tglobal $lines;\n\tob_start();\n\tshow_source($file);\n\t$filecontents = ob_get_contents();\n\tob_end_clean();\n\t$filecontents = str_replace('<code>', '', $filecontents);\n\t$filecontents = str_replace('</code>', '', $filecontents);\n\t$filecontents = str_replace(\"\\n\", '', $filecontents);\n\t$filecontents = explode('<br />', $filecontents);\n\t$lines = count($filecontents);\n\t$iLen = strlen($lines);\n\tfor($i = 0; $i < $lines; $i++) {\n\t\t$sGap = ($iLen - strlen($i+1));\n\t\t$filecontents[$i] = '<span style=\"color: #999999\">'.str_repeat(' ', $sGap).($i+1).' </span>'.$filecontents[$i].\"<br />\\n\";\n\t}\n\t$filecontents = implode('', $filecontents);\n\treturn \"\\n$filecontents\\n\";\n}", "public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}", "function generate_text_for_html_display($text)\n{\n\t//Replace new\n\t$text = str_replace(\"\\n\", \"<br />\\n\", $text);\n\n\t//BBCode replacement array\n\t$bbcode = array(\n\t\t\"/\\[b\\](.*?)\\[\\/b\\]/is\" => '<span style=\"font-weight:bold;\">$1</span>',\n\t\t\"/\\[u\\](.*?)\\[\\/u\\]/is\" => '<span style=\"text-decoration:underline;\">$1</span>',\n\t\t\"/\\[color\\=(.*?)\\](.*?)\\[\\/color\\]/is\" => '<span style=\"color:$1;\">$2</span>',\n\t\t\"/\\[code\\](.*?)\\[\\/code\\]/is\" => '<pre style=\"padding-left:20px;\">$1</pre>',\n\t);\n\n\t//Replace BBCode\n\t$text = preg_replace(array_keys($bbcode), array_values($bbcode), $text);\n\t$text = preg_replace_callback('#\\[url(=(.*))?\\](.*)\\[/url\\]#iU', function ($ary) { return(validate_url($ary[2], $ary[3])); }, $text);\n\n\treturn $text;\n}", "public function setText($text)\n\t{\n\t\tif (is_string($text)) {\n\t\t\t$this->setValue('text', $text);\n\t\t}\n\t}", "function SimpleText($text, $style=\"\") {\n\t\tif (false) {\n\t\t\t/*\n\t\t\t * FIXME: this is fundamentally broken, because\n\t\t\t * it creates a new CCE connection for every\n\t\t\t * SimpleText object created\n\t\t\t */\n\t\t\tinclude(\"uifc/Stylist.php\");\n\t\t\tinclude(\"ServerScriptHelper.php\");\n\t\t\t$crackaddict = new ServerScriptHelper();\n\t\t\t$stylist = $crackaddict->getStylist();\n\t\t\t$this->style = $stylist->getStyle(\"SimpleText\"); // try this\n\t\t\t\n\t\t\tif($this->style->getPropertyNumber()) { \n\t\t\t\t$this->style = $stylist->getStyle(\"Page\"); // default\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\t$this->style = $style;\n\t\t}\t\t\n\t\t$this->text = $text;\n\t}", "public function executeTextWidget4($widgetNuber){\n $widgetNo = $this->widgetNumber ;\n $websiteId = $this->context->get('WebsiteId');\n $themeOptions = Doctrine_Core::getTable('ThemeOptions')->getThemeOptions($websiteId);\n\n if(array_key_exists(\"TextWidgetsLinkType_\".$widgetNo,$themeOptions) && array_key_exists(\"TextWidgetsLinkId_\".$widgetNo, $themeOptions))\n\t\t\t$this->textWidgetLink = $this->textWidgetLinkTo($themeOptions, \"TextWidgetsLinkType_\".$widgetNo,\"TextWidgetsLinkId_\".$widgetNo);\n\t\telse\n\t\t\t$this->textWidgetLink = \"\";\n\n $this->widgetTitle = $themeOptions['TextWidgetsTitle_'.$widgetNo] ;\n $this->widgetContent = $themeOptions['TextWidgets_'.$widgetNo] ;\n }", "abstract protected function displayString(): string;" ]
[ "0.73928577", "0.7351276", "0.68721545", "0.6620478", "0.6540805", "0.6307055", "0.612524", "0.6093456", "0.606125", "0.59836864", "0.5909928", "0.5909928", "0.5891977", "0.58734703", "0.58204454", "0.5820397", "0.58120465", "0.57981044", "0.5777029", "0.57465625", "0.570843", "0.5693507", "0.56708676", "0.566368", "0.5620838", "0.56074953", "0.5585274", "0.55842876", "0.5568664", "0.5568664", "0.55680406", "0.55680406", "0.55513954", "0.5548366", "0.55323654", "0.55289024", "0.54637647", "0.5457804", "0.54440755", "0.5420526", "0.5419982", "0.5419982", "0.5419982", "0.54140604", "0.5380794", "0.53660506", "0.5359165", "0.53575", "0.5354942", "0.53504837", "0.53360456", "0.5334406", "0.5331497", "0.53161913", "0.53123075", "0.53123075", "0.53110087", "0.5309413", "0.5299633", "0.5295378", "0.5293882", "0.52849776", "0.5275873", "0.52755755", "0.5267616", "0.52517337", "0.52252394", "0.52248394", "0.52246255", "0.5224028", "0.5221898", "0.52129334", "0.5199363", "0.5194463", "0.5187401", "0.51859033", "0.51752585", "0.5174948", "0.5159044", "0.5155652", "0.5155652", "0.5155652", "0.51503307", "0.5147387", "0.5143384", "0.5141218", "0.51405656", "0.51405656", "0.513287", "0.5131587", "0.5128104", "0.51274276", "0.5115551", "0.5114534", "0.51084983", "0.51038843", "0.5101264", "0.5099836", "0.5095942", "0.50905466" ]
0.5370711
45
Show the form for editing the specified BText.
public function edit($id, $block_id) { $bText = $this->bTextRepository->findWithoutFail($id); if (empty($bText)) { Flash::error('B Text not found'); return redirect(route('bTexts.index')); } return view('b_texts.edit')->with(['bText' => $bText, 'block_id' => $block_id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit(Kibb $kibb)\n {\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 showEdit()\n {\n\n }", "function editFormBookmark()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\tif (!$this->tree->isInTree($_GET[\"obj_id\"]))\n\t\t{\n\t\t\t$this->ctrl->setParameter($this, 'bmf_id', '');\n\t\t\t$this->ctrl->setParameter($this, 'obj_id', '');\n\t\t\t$this->ctrl->redirect($this);\n\t\t}\n\t\t$form = $this->initFormBookmark('updateBookmark');\n\t\t$bookmark = new ilBookmark($_GET[\"obj_id\"]);\n\t\t$form->setValuesByArray\n\t\t(\n\t\t\tarray\n\t\t\t(\n\t\t\t\t\"title\" => $bookmark->getTitle(),\n\t\t\t\t\"target\" => $bookmark->getTarget(),\n\t\t\t\t\"description\" => $bookmark->getDescription(),\n\t\t\t\t\"obj_id\" => $_GET[\"obj_id\"],\n\t\t\t)\n\t\t);\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function setModifyMode() {\n $this->getElement('submit')->setLabel('Edit Test');\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() {\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(CaretakerForm $caretakerForm)\n {\n //\n }", "public function edit($id)\n {\n // If the user is logged in...\n if (Auth::check()) {\n // get the text\n $text = Text::find($id);\n\n // show the edit form and pass the text\n return View::make('texts.edit')\n ->with('text', $text)\n ->with('entity', 'text')\n ->with('title', 'Text edit');\n } else {\n // User is not logged in\n Session::flash('message', 'Please log in');\n return Redirect::to('/');\n }\n }", "public function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'player' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\t \t \n\t\tparent::display();\n\t}", "public function getEditForm();", "abstract protected function renderEdit();", "public function isEditFormShown() {}", "function edit()\n\t{\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Make sure you are logged in\n\t\tif (!$user->authorise('com_weblink.weblink.edit')) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\tJRequest::setVar('view', 'weblink');\n\t\tJRequest::setVar('layout', 'form');\n\n\t\t$model = &$this->getModel('weblink');\n\t\t$model->checkout();\n\n\t\tparent::display();\n\t}", "function show_edit()\n\t{\n\t\treturn '';\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "public function showEditForm( $formCallback = null ) {\n\t\tif ( $this->isConflict ) {\n\t\t\t$this->addCSS();\n\t\t\t$this->addJS();\n\t\t\t$this->editFormTextTop = '<div class=\"mw-twocolconflict-form\">';\n\t\t\t$this->editFormTextBottom = '</div>';\n\t\t\t$this->editFormTextBeforeContent = $this->addEditFormBeforeContent();\n\t\t\t$this->editFormTextAfterContent = $this->addEditFormAfterContent();\n\t\t}\n\n\t\tparent::showEditForm( $formCallback );\n\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n {\n return \"Ini Halaman Edit\";\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function ShowForm()\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$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}", "public function edit() {\n\t\t\t\n\t\t}", "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 edit($id)\n {\n return view('text/update');\n }", "public function edit($text){\n global $db;\n $this->_text = $text;\n $update = $db->prepare('UPDATE posts SET text =? WHERE id =?');\n $update->execute([$this->_text, $this->_id]);\n }", "protected function actionEdit() {\r\n\r\n //try 1: get the object type and names based on the current object\r\n $objInstance = class_objectfactory::getInstance()->getObject($this->getSystemid());\r\n if($objInstance != null) {\r\n $strObjectTypeName = uniSubstr($this->getActionNameForClass(\"edit\", $objInstance), 4);\r\n if($strObjectTypeName != \"\") {\r\n $strType = get_class($objInstance);\r\n $this->setCurObjectClassName($strType);\r\n $this->setStrCurObjectTypeName($strObjectTypeName);\r\n }\r\n }\r\n\r\n //try 2: regular, oldschool resolving based on the current action-params\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n\r\n $objEdit = new $strType($this->getSystemid());\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"edit\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\".$this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error editing current object type not known \", class_exception::$level_ERROR);\r\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function edit($id){\n $row = WhSequencer::find($id);\n return view('system.sequencer_form',[\n 'mode' => 'edit',\n 'doctype' => WhDocType::all(),\n 'row' => $row,\n ]);\n }", "protected function _showText($text) {}", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editForm($id)\n {\n $record = HistoryDb::findOrFail($id);\n $this->edit_id = $id;\n $this->title = $record->title;\n $this->description = $record->description;\n $this->event_date = $record->event_date;\n $this->mode = 'edit';\n $this->submit_text = \"Update\";\n\n // Util::showAlert($this,'Test content...!');\n\n }", "public function edit(Tbbm $tbbm)\n {\n\n return view('tbbm.edit', compact('tbbm'));\n }", "public function edit() {\n }", "public function edit($id)\n {\n //Update view\n $subtext = SubText::findOrFail($id);\n $titles=Title::all();\n return view('back.subtext.update',compact('subtext','titles'));\n }", "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 edit($model, $form);", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit()\n {\n \n \n }", "function &show_edit($item, $usehtmleditor = false) {\n }", "public function Edit($id=null) {\n $content = new CMContent($id);\n $form = new CFormContent($content);\n $status = $form->Check();\n if($status === false) {\n $this->AddMessage('notice', 'The form could not be processed.');\n $this->RedirectToController('edit', $id);\n } else if($status === true) {\n $this->RedirectToController('edit', $content['id']);\n }\n \n $title = isset($id) ? 'Edit' : 'Create';\n $this->views->SetTitle(\"$title content: \".htmlEnt($content['title']))\n ->AddInclude(__DIR__ . '/edit.tpl.php', array(\n 'user'=>$this->user, \n 'content'=>$content, \n 'form'=>$form,\n ));\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit()\n {\n \n }", "protected function editView_form(){\n $output_path = './resources/views/'. $this->solveName($this->commandObj->argument('model_B'), config('CrudDscaffold.app_name_rules.app_route')). '/';\n $output_filename = '_form.blade.php';\n\n //replace word\n $pattern = '#(.*)<label for=\"'.\n $this->solveName($this->commandObj->argument('model_A'), config('CrudDscaffold.app_name_rules.name_name')).'_id-field\">(.*)_id</label>(.*){!! Form::text\\(\"'.\n $this->solveName($this->commandObj->argument('model_A'), config('CrudDscaffold.app_name_rules.name_name')).'_id\", null,(.*)#s';\n $replacement = '\\1<label for=\"'.\n $this->solveName($this->commandObj->argument('model_A'), config('CrudDscaffold.app_name_rules.name_name')).'_id-field\">\\2_'. $this->relation_display_column. '</label>\\3{!! Form::select(\"'.\n $this->solveName($this->commandObj->argument('model_A'), config('CrudDscaffold.app_name_rules.name_name')).'_id\", $list[\"'.\n $this->solveName($this->commandObj->argument('model_A'), config('CrudDscaffold.app_name_rules.app_model_class')).'\"], null,\\4';\n\n //output(use OutputTrait)\n $this->outputReplace( $output_path, $output_filename, $pattern, $replacement, $debug = $this->debug );\n }", "function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}", "public function edit()\n {\n return view('commonmodule::edit');\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(Dotb $dotb)\n {\n //\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "public function edit(Btc $btc)\n {\n //\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id,$text)\n {\n //\n return \"编辑该id:\".$id.' 修改字段:'.$text;\n }", "protected function displayAboutForm($result, $Abt) /////////////////////////////////////////This function is going to display edit form\r\n {\r\n if (is_array($result)) {\r\n extract($result);\t\r\n \r\n\t\t}\r\n\t\r\n\t\t$html = '<div class=\"col3\">'.$result['msg'].'</div>'.\"\\n\";\r\n\t\t$html .= '<div class=\"clear\"></div>'.\"\\n\";\r\n $html .= '<form id=\"edit_form\" method=\"post\" action=\"'.htmlentities($_SERVER['REQUEST_URI']).'\" >'.\"\\n\";\r\n $html .= '\t<label for=\"PSum\" class=\"col1\">Content: </label>'.\"\\n\";\r\n $html .= '\t<textarea rows=\"10\" cols=\"40\" name=\"PageContents\" id=\"PSum\" class=\"col2\" >'.htmlentities(stripslashes($Abt['PageContents']),ENT_QUOTES).'</textarea> '.\"\\n\";\t\t\t\r\n $html .= '\t<div class=\"clear\"></div>'.\"\\n\";\r\n\t\t\r\n $html .= '\t<input type=\"hidden\" name=\"CType\" value=\"'.$Abt['ContentType'].'\" />'.\"\\n\";\r\n\t\t$html .= '\t<input type=\"hidden\" name=\"CSection\" value=\"'.$Abt['ContentSection'].'\" />'.\"\\n\";\r\n $html .= '\t<input type=\"submit\" name=\"Update\" value=\"Update\" class=\"submitButton\" />'.\"\\n\";//</div>\r\n $html .= '\t<div class=\"clear\"></div>'.\"\\n\";\r\n $html .= '</form>'.\"\\n\"; /////////// end of div editform\r\n\r\n return $html;\r\n }", "function showForm($ID, $options = []) {\n\n $this->initForm($ID, $options);\n $this->showFormHeader($options);\n\n $canedit = $this->canEdit($ID);\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td>\" . __('Name') . \"</td>\";\n echo \"<td>\";\n Html::autocompletionTextField($this, \"name\");\n echo \"</td>\";\n echo \"<td>\" . __('Publisher').\"</td><td>\";\n Manufacturer::dropdown(['value' => $this->fields[\"manufacturers_id\"]]);\n echo \"</td></tr>\\n\";\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td>\" . __('Location') . \"</td><td>\";\n Location::dropdown(['value' => $this->fields[\"locations_id\"],\n 'entity' => $this->fields[\"entities_id\"]]);\n echo \"</td>\";\n echo \"<td>\" . __('Category') . \"</td><td>\";\n SoftwareCategory::dropdown(['value' => $this->fields[\"softwarecategories_id\"]]);\n echo \"</td></tr>\\n\";\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td>\" . __('Technician in charge of the software') . \"</td><td>\";\n User::dropdown(['name' => 'users_id_tech',\n 'value' => $this->fields[\"users_id_tech\"],\n 'right' => 'own_ticket',\n 'entity' => $this->fields[\"entities_id\"]]);\n echo \"</td>\";\n echo \"<td>\" . __('Associable to a ticket') . \"</td><td>\";\n Dropdown::showYesNo('is_helpdesk_visible', $this->fields['is_helpdesk_visible']);\n echo \"</td></tr>\\n\";\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td>\".__('Group in charge of the software').\"</td>\";\n echo \"<td>\";\n Group::dropdown([\n 'name' => 'groups_id_tech',\n 'value' => $this->fields['groups_id_tech'],\n 'entity' => $this->fields['entities_id'],\n 'condition' => ['is_assign' => 1]\n ]);\n echo \"</td>\";\n echo \"<td rowspan='4' class='middle'>\".__('Comments') . \"</td>\";\n echo \"<td class='center middle' rowspan='4'>\";\n echo \"<textarea cols='45' rows='8' name='comment' >\".$this->fields[\"comment\"].\"</textarea>\";\n echo \"</td></tr>\\n\";\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td >\" . __('User') . \"</td>\";\n echo \"<td >\";\n User::dropdown(['value' => $this->fields[\"users_id\"],\n 'entity' => $this->fields[\"entities_id\"],\n 'right' => 'all']);\n echo \"</td></tr>\\n\";\n\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td>\" . __('Group') . \"</td><td>\";\n Group::dropdown([\n 'value' => $this->fields[\"groups_id\"],\n 'entity' => $this->fields[\"entities_id\"],\n 'condition' => ['is_itemgroup' => 1]\n ]);\n echo \"</td></tr>\\n\";\n\n // UPDATE\n echo \"<tr class='tab_bg_1'>\";\n //TRANS: a noun, (ex : this software is an upgrade of..)\n echo \"<td>\" . __('Upgrade') . \"</td><td>\";\n Dropdown::showYesNo(\"is_update\", $this->fields['is_update']);\n echo \"&nbsp;\" . __('from') . \"&nbsp;\";\n Software::dropdown(['value' => $this->fields[\"softwares_id\"]]);\n echo \"</td></tr>\\n\";\n\n $this->showFormButtons($options);\n\n return true;\n }", "public function showText($text) {}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function ShowContentEditForm(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $templateProps=DataProvider::Get('Plugins\\DForms\\Templates','GetItemProperties',['template_id'=>$template]);\n $templatePages=DataProvider::Get('Plugins\\DForms\\Templates','GetItemPages',['template_id'=>$template],['sort'=>['pindex'=>'asc']]);\n if(!$templateProps instanceof IEntity || !$templatePages instanceof DataSet) {\n throw new AppException('Invalid DynamicForms template properties/pages!');\n }\n $fieldsTypes=DataProvider::Get('Plugins\\DForms\\Controls','GetItems',['for_state'=>1]);\n $target=$params->safeGet('target','','is_string');\n $view=new AppView(get_defined_vars(),$this,NULL);\n $view->AddFileContent($this->GetViewFile('ContentEditForm'));\n $view->Render();\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit(form $form)\n {\n //\n }", "function showContent()\n {\n if ($this->oprofile) {\n $this->showPreviewForm();\n } else {\n $this->showInputForm();\n }\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edit(Bacheo $bacheo)\n {\n //\n }", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function edit(Tivy $tivy)\n {\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()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "public function onEditField()\n {\n $name = post('code');\n $selection = FieldManager::findField($name);\n return $this->makePartial('update_field_form', ['selection' => $selection]);\n }", "public function edit(Barang_Keluar $barang_Keluar)\n {\n //\n }", "public function edit($id, $id_)\n {\n $res = $this->biogMainRepository->textById($id_);\n return view('biogmains.texts.edit', ['id' => $id, 'row' => $res['row'], 'res' => $res,\n 'page_title' => 'Basicinformation', 'page_description' => '基本信息表 著述',\n 'page_url' => '/basicinformation/'.$id.'/texts',\n 'archer' => \"<li><a href='#'>Texts</a></li>\",\n ]);\n }", "function showForm() {\n \tglobal $pluginpath;\n \t\n \tif ($this->idt == \"\") {\n \t //user is creating new template\n \t\t$title = MF_NEW_TEMPLATE;\n \t\t$this->action = 'createtempl';\n\t\t$btnText = MF_CREATE_TEMPLATE_BUTTON; \n \t} else {\n \t //user is editing old template\n \t\t$title = \tMF_CHANGE_TEMPLATE;\n \t\t$this->action = 'changetempl';\n\t\t$btnText = MF_CHANGE_FORUM_BUTTON;\n \t}\n \t\n\t$this->doHtmlSpecChars();\n\t\t\n\tinclude \"admin/tempForm.php\";\n \t\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 edit(Bajas $bajas)\n {\n //\n }", "public function edit($id)\n {\n // Mengarahkan ke halaman form edit\n $data = DB::table('buku')\n ->where('id', '=', $id)->get();\n return view('buku.form_edit', compact('data'));\n }", "function displayEditScreen()\t{\t \n\t\t// We handle here Edit mode or Preview Mode\n\t\t// Edit Mode : User can edit fields\n\t\t// Preview Mode : user can only see fields\t\n\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('displayEditScreen'=>'on'));\n\t\t$exporttype=$this->piVars['exporttype'];\n\t\t$print=$this->piVars['print'];\n\t\t$printerName=$this->piVars['printername'];\n\t\t$printServerName=$this->piVars['printservename'];\n\t\tif ($exporttype == 'PDF') $exporttype = \"PDFDET\";\n\t\t$this->conf['cmdmode']='edit';\t\n\t\t// We handle here Edit mode or Preview Mode\n\t \t// Edit Mode : User can edit fields\n\t \t// Preview Mode : user can only see fields\t \n\t \t//$this->markerArray['###BACK_URL###'] = \"\";\n\t \t\n\t\t//We handle backurl...\n\t\t/*if ($this->conf['edit.']['backPagePid'] && !$this->conf['no_action']) {\n\t\t\t$this->backURL=$this->pi_getPageLink($this->conf['edit.']['backPagePid']);\n\t\t\tif (!strpos($this->backURL,'?')) $this->backURL.='?';\n\t\t\t$this->markerArray['###BACK_URL###'] = $this->backURL;\n\t\t}*/\n\t\t// If editing is enabled\n\t\tif ($this->conf['edit'] || $this->preview || $this->conf['list'] )\t{\t\n\t\t\t// hack for lists in second plugin ... to be checked.., Will not work if we want to edit in second plugin ...\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('Edit or preview'=>'on'));\n\t\t\t$uid=$this->dataArr[$this->conf['uidField']]?$this->dataArr[$this->conf['uidField']]:$this->recUid;\n \t\t\tif ($this->conf['list.']['rUJoinField']=='uid' && $uid){\n \t\t\t\t\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('UIDFIELD'=>$this->conf['uidField'].' : '.$this->recUid));\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('dataArr'=>$this->dataArr[$this->conf['uidField']]));\n\t\t\t\t$origArr = $this->metafeeditlib->getRawRecord($this->theTable,$uid,$this->conf);\n\t\t\t\tif (!$origArr) die(__METHOD__.\":Detail mode and no id given for $this->theTable,$uid\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('editMode'=>'on'));\n\n\t\t\t// here we handle foreign tables not the best way , we should work on join tables especially if we handle lists...\n\t\t\t\n\t\t\tif ($this->conf['foreignTables'] && is_array($origArr)) {\n\t\t\t\t\n\t\t\t\t//MM not implemented\n\t\t\t\t//Not MM\n\t\t\t\t\n\t\t\t\t$FTRels=t3lib_div::trimexplode(',',$this->conf['foreignTables']);\n\t\t\t\tforeach($FTRels as $FTRel) {\n\t\t\t\t\t$FTable=$GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['foreign_table'];\n\t\t\t\t\t$FTUid=$origArr[$FTRel];\n\t\t\t\t\t// what if multiple ???\n\t\t\t\t\t// what if editmenu list ???\n\t\t\t\t\tif ($FTUid) {\n\t\t\t\t\t\t //on recup l'id de l'enregistrement a associer\n\t\t\t\t\t\tif ($GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['MM']) { //si on est dans une MM faut d'abord recup les id de la table MM\n\t\t\t\t\t\t\t$MMT = $GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['MM'];\n\t\t\t\t\t\t\t$LTUid=$origArr[\"uid\"];\n\t\t\t\t\t\t\t$MMTreq = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('*',$this->theTable,$MMT,$FTable,'AND '.$this->theTable.'.uid='.$origArr['uid']);\n\t\t\t\t\t\t\t$resu=$GLOBALS['TYPO3_DB']->sql_num_rows($MMTreq);\n\t\t\t\t\t\t\tif ($resu>=1) {\n\t\t\t\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMTreq)) {\n\t\t\t\t\t\t\t\t\tforeach($row as $key =>$val) $origArr[$FTRel.'.'.$key]=$val;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// originally there only these 2 lines in this condition (if ($FTUid) )\n\t\t\t\t\t\t\t$FTorigArr = $GLOBALS['TSFE']->sys_page->getRawRecord($FTable, $FTUid);\n\t\t\t\t\t\t\tif (is_array($FTorigArr)) foreach($FTorigArr as $key =>$val) $origArr[$FTRel.'.'.$key]=$val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$FTCA=$GLOBALS['TCA'][$FTable]['columns'];\n\t\t\t\t\t\t//krumo ($FTCA);\n\t\t\t\t\t\tif (is_array($FCTA)) foreach($FTCA as $key=>$val) {\n\t\t\t\t\t\t\tif (in_array(substr($FTCA,0,11),array('--div--;Tab','--fsb--;FSB','--fse--;FSE'))) continue;\n\t\t\t\t\t\t\t$this->markerArray['###FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###FIELD_EVAL_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$FTRel.'_'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$FTRel.'_'.$key.'###']='';\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//<CBY> We go to detail mode directly if editUnique is true and there is only one elment to edit.\n\t\t\t$DBSELECT=$this->metafeeditlib->DBmayFEUserEditSelectMM($this->theTable,$GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$mmTable,$this->conf).$GLOBALS['TSFE']->sys_page->deleteClause($this->theTable);\n\n\t\t\t$TABLES=$mmTable?$this->theTable.','.$mmTable:$this->theTable;\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>$origArr));\n\t\t\tif (!is_array($origArr)&&$this->conf['editUnique']) {\n\t\t\t\t$lockPid = ($this->conf['edit.']['menuLockPid'] && $this->conf['pid'])? ' AND pid='.intval($this->thePid) : '';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $TABLES, '1 '.$lockPid.$DBSELECT);\n\t\t\t\tif ($this->conf['debug']) \techo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDITUNIQUE TEST'=>$GLOBALS['TYPO3_DB']->SELECTquery('*', $TABLES, '1 '.$lockPid.$DBSELECT)));\n\t\t\t\t$resu=$GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\t\tif ($resu>=1)\t{\n \t\t\t\t\twhile($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $menuRow[$this->conf['uidField']]);\n\t\t\t\t\t\t$this->recUid=$menuRow[$this->conf['uidField']];\n\t\t\t\t\t\t$this->conf['recUid']=$this->recUid;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t\t// <CBY>\n\t\t\t$this->markerArray['###REC_UID###']=$this->recUid;\n\t\t\t//if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))\t{\t// Must be logged in OR be authenticated by the aC code in order to edit\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\n\t\t\t\t// Must be logged in OR be authenticated by the aC code in order to edit\n\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>\"No login\"));\n\t\t\t\n\t\t\t\t// We come from ??\n\t\t\t\tif (is_array($origArr) && !($this->conf['inputvar.']['BACK'] && $this->conf['inputvar.']['cameFromBlog']))\t{\n\t\t\t\t\tif ($this->conf['blogData']) $this->preview=1; \n\t\t\t\t\t// we check if edit or preview mode is allowed ...\n\t\t\t\t\tif (!$this->conf['edit'] && !$this->preview )\t{\t// If editing is enabled\n\t\t\t\t\t\t$content.='meta_feedit : feadminlib.inc, Edit-option is not set and Preview-option is not set in TypoScript';\n\t\t\t\t\t\treturn $content;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($this->conf['disableEdit'] && !$this->preview )\t{\t// If editing is enabled\n\t\t\t\t\t\t$content.='meta_feedit : feadminlib.inc, Edit-option disabled and Preview-option is not set in TypoScript';\n\t\t\t\t\t\treturn $content;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t\n\t\t\t\t\t\t// Display the form, if access granted.\n\t\t\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>\"User may edit\"));\n\t\t\t\t\t\tif \t($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t\t$origArr = $this->userProcess('evalFunc',$origArr);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->markerArray = $this->setfixed($this->markerArray, $this->conf['setfixed.'], $origArr);\n\t\t\t\t\t\t$content=$this->displayEditForm($origArr,$this->conf,$exporttype,$print,$printerName,$printServerName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Else display error, that you could not edit that particular record...\t\n\t\t\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_NO_PERMISSIONS###');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If the recUid did not select a record, we display a menu of records. (eg. if no recUid)\n\t\t\t\t\t// we check if list mode is allowed ...\n\t\t\t\t\tif (!$this->conf['list'])\t{\t// If editing is enabled\n\t\t\t\t\t\t\t$content.='List-option is not set in TypoScript';\n\t\t\t\t\t\t return $content;\n\t\t\t\t\t}\n\t\t\t\t\t//$content=($this->conf['general.']['listMode']==2)?$this->metafeeditgrid->displayGridScreen($TABLES,$DBSELECT,$this->conf):$this->displayListScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\tswitch($this->conf['general.']['listMode']) {\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t$content=$this->metafeeditgrid->displayGridScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t//$content=$this->metafecalendar->displayCalendarScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\t$cal=t3lib_div::makeInstance('tx_metafeedit_calendar');\n\t\t\t\t\t\t $cal->initObj($this->metafeeditlib,$this->cObj);\n\t\t\t\t\t\t\t$content=$cal->displayCalendarScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t$content=$this->displayListScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Finally this is if there is no login user. This must tell that you must login. Perhaps link to a page with create-user or login information.\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_AUTH###');\n\t\t\t}\n\t\t} else {\n\t\t\t$content.='Display Edit Screen : Edit-option , Preview-option or List-option is not set in TypoScript';\n\t\t}\n\t\treturn $content;\n\t}", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n { }", "public function edit(StokBarang $stokBarang)\n {\n //\n }", "function edit()\r\n\t{\r\n\t\tJRequest::setVar('view', 'transactions');\r\n\t\tJRequest::setVar('layout', 'edit');\r\n\t\tparent::display();\r\n\t}", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit()\n {\n //\n }" ]
[ "0.7350388", "0.6917361", "0.64566207", "0.6325472", "0.6306054", "0.6265109", "0.6194443", "0.6190279", "0.61731315", "0.6153242", "0.6145709", "0.6144594", "0.6124497", "0.61168873", "0.6102363", "0.6097743", "0.60226005", "0.5996404", "0.5995575", "0.599051", "0.5984346", "0.59646714", "0.59561235", "0.5933129", "0.5932374", "0.5928585", "0.5912538", "0.59052265", "0.5901507", "0.58940715", "0.5815784", "0.5815041", "0.5805685", "0.57895434", "0.5773517", "0.5771393", "0.5766771", "0.5753053", "0.57529044", "0.574711", "0.57418823", "0.57325345", "0.5729713", "0.57290983", "0.5728917", "0.5715896", "0.5709368", "0.57023174", "0.56999505", "0.569801", "0.5689503", "0.5688868", "0.5688109", "0.56789696", "0.5674164", "0.56696516", "0.56696516", "0.56696516", "0.5663381", "0.5662192", "0.5654281", "0.5653261", "0.56498396", "0.5646526", "0.5643091", "0.5641081", "0.5635169", "0.5633665", "0.5633665", "0.5629554", "0.5628909", "0.5628909", "0.5628909", "0.56284475", "0.5621303", "0.56141907", "0.5612298", "0.56012934", "0.56005037", "0.5591902", "0.558948", "0.558948", "0.5578587", "0.55710834", "0.55698454", "0.55682415", "0.55662453", "0.556462", "0.5563913", "0.5563104", "0.55609685", "0.554878", "0.5547851", "0.5546317", "0.5544232", "0.5527655", "0.5526874", "0.55226964", "0.551294", "0.5510665" ]
0.5820614
30
Update the specified BText in storage.
public function update($id, UpdateBTextRequest $request, $block_id) { $bText = $this->bTextRepository->findWithoutFail($id); if (empty($bText)) { Flash::error('B Text not found'); return redirect('/blocks/show_texts/'.$block_id); } $bText = $this->bTextRepository->update($request->all(), $id); Flash::success('B Text updated successfully.'); return redirect('/blocks/show_texts/'.$block_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateText($text, $additionalData = array()) {\n $additionalSql = '';\n foreach ($additionalData as $key => $value) {\n $additionalSql .= ',' . $key . \"='\" . escapeString($value) . \"'\";\n }\n\n if (CHAPTER_IN_FILE) {\n $this->file = CHAPTER_FILE_PATH . \"/\" . $this->authorID . \"/\" . $this->chapterID . \"_cache.txt\";\n if (file_exists($this->file)) {\n file_put_contents($this->file, $text);\n }\n } else {\n $updateText = \"text_cache = '\" . escapeString($text) . \"',\";\n }\n // save chapter in database\n $sql = \"UPDATE \tsls\" . SLS_N . \"_chapter\n\t\t\tSET\t\" . $updateText . \"\n updateTime = date(),\n\t\t\t\t\" . $additionalSql . \"\n\t\t\tWHERE \tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n\n\n\n\n // update chapter cache\n require_once(WCF_DIR . 'lib/data/message/bbcode/MessageParser.class.php');\n MessageParser::getInstance()->setOutputType('text/html');\n $sql = \"UPDATE\twbb\" . SLS_N . \"_chapter_cache\n\t\t\tSET\tmessageCache = '\" . escapeString(MessageParser::getInstance()->parse($message, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, false)) . \"'\n\t\t\tWHERE\tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n }", "public function update($text, $title, $content)\n {\n $text->setTitle($title);\n $text->setContent($content);\n $this->getEntityManager()->flush();\n }", "function updateText($p_text_id, $p_text) {\n $con = open_connection();\n mysqli_query($con, \"UPDATE text SET text = '\". $p_text .\"' WHERE text_id = '\". $p_text_id .\"'\");\n mysqli_close($con);\n }", "public function edit($text){\n global $db;\n $this->_text = $text;\n $update = $db->prepare('UPDATE posts SET text =? WHERE id =?');\n $update->execute([$this->_text, $this->_id]);\n }", "public function updateText($id, $text)\n {\n if ($id) {\n $textRevisionRep = $this->_em->getRepository('opensixtBikiniTranslateBundle:TextRevision');\n\n if ($this->_textRevisionControl == 'off') {\n // if text_revision_control is 'off', than update table with new data\n $objTextRevision = $textRevisionRep->find($id);\n if (!empty($objTextRevision)) {\n $objTextRevision->setTarget($text);\n $this->_em->persist($objTextRevision);\n $this->_em->flush();\n }\n\n } else {\n /* if text_revision_control is 'on', than insert a new record into\n TextRevision table, and update a pointer field in Text */\n $objTextRevision = new TextRevision();\n $objTextRevision->setTextId($id);\n $objTextRevision->setTarget($text);\n\n $this->_em->persist($objTextRevision);\n $this->_em->flush();\n $newTextId = $objTextRevision->getId();\n\n if ($newTextId) {\n // TODO: use ORM\n $this->createQueryBuilder('t')\n ->update()\n ->set(self::FIELD_REVISION_ID, '?1')\n ->where(self::FIELD_ID . ' = ?2')\n ->setParameter(1, $newTextId)\n ->setParameter(2, $id)\n ->getQuery()\n ->execute();\n }\n }\n }\n }", "public function setText(string $text): void {\n\t\t$this->text = $text;\n\t}", "public function setText($text) {\n\t\t$this->data[\"text\"] = $text;\n\t}", "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "public function update($gunBbl);", "public function setText(string $text): void\n {\n $this->text = $text;\n }", "public function setText(string $text): void\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->_text = (string)$text;\n }", "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "public function setText(string $text) : void\n {\n $this->text = $text;\n }", "public function setText(string $text) : void\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->_text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function update($content);", "public function setText($text)\n\t{\n\t\tif (is_string($text)) {\n\t\t\t$this->setValue('text', $text);\n\t\t}\n\t}", "public function update(string $cipherTextBlock): void;", "public function commentUpdate() {\n\t\t$id = $_POST['id'];\n\t\t$text = $_POST['text'];\n\t\t$c = Comment::find($id);\n\t\t$c->text = $text;\n\t\t$c->save();\n\t}", "public function update(StoreText $request, $slug)\n {\n $text = Text::where('slug', $slug)->first();\n\n $text->title = $request->input('title');\n $text->slug = $request->input('slug');\n $text->text = $request->input('text');\n// $text->is_publish = $request->input('is_publish');\n $text->save();\n\n return redirect()->route('admin_texts_edit', ['slug' => $text->slug]);\n }", "public function update($input = array()) {\n\n $data = a::update($this->content()->toArray(), $input);\n\n if(!data::write($this->textfile(), $data, 'kd')) {\n throw new Exception('The page could not be updated');\n }\n\n $this->kirby->cache()->flush();\n $this->reset();\n $this->touch();\n return true;\n\n }", "public function update(){\r\n $query = DB::connection()->prepare('\r\n UPDATE Wine\r\n SET name=:name, \r\n region=:region, \r\n winetext=:winetext,\r\n type=:type\r\n WHERE id=:id');\r\n $query->execute(array(\r\n 'id' => $this->id,\r\n 'name' => $this->name, \r\n 'region' => $this->region, \r\n 'winetext' => $this->winetext, \r\n 'type' => $this->type));\r\n }", "public static function updateText($id, $text){\n\t\t\t$conn = Db::getInstance();\n\t\t\t\n\t\t\t$text = trim($text);\n\t\t\t\n\t\t\tif (!$text) {\n\t\t\t\tstatic::setError('пустой текст');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$st = $conn->prepare(\"UPDATE `\" . static::db_table . \"` SET `text` = ? WHERE `id` = ?\");\n\t\t\t$st->execute([$text, $id]);\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public function setText($text) {\n $this->TEXT = $text;\n }", "public function setText($text)\n {\n $this->text = $this->message['text'] = $text;\n }", "public function update($mambot);", "public function updateText($id, $text)\n {\n $post = $this->findById($id);\n\n if ($post->user_id != \\Auth::user()->id) {\n if (!\\Auth::user()->isAdmin()) return false;\n }\n\n if ($post) {\n if ($post->text != $text) {\n $post->edited = 1;\n }\n $post->text = sanitizeText($text);\n\n $post->save();\n\n $this->event->fire('post.edit', [$post]);\n\n return $post;\n }\n\n return false;\n }", "function update_text_speach($data=array(), $id_content='', $user_id=''){\n\t\ttry\n\t\t{\n\t\t\t$this->db->where('id', $id_content);\n\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t$result\t= $this->db->update('text_speech',$data);\n\t\t\tif($result){\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}catch(ErrorInsertWapp $e){\n\t\t\tlog_message('debug','Error tratando de actualizar informaci�n del texto speach');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function updateToDb()\n {\n try {\n $sql = 'UPDATE bplace\n SET title=:title, width=:width, height=:height, change_time=:change_time\n WHERE id=:id';\n $this->_db->query($sql, array('title' => $this->_title, 'width' => $this->_width, 'height' => $this->_height, 'change_time' => $this->_changeTime, 'id' => $this->_id));\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "function updateFontSize($p_text_id, $p_font_size) {\n $con = open_connection();\n mysqli_query($con, \"UPDATE text SET font_size = '\". $p_font_size .\"' WHERE text_id = '\". $p_text_id .\"'\");\n mysqli_close($con);\n }", "public function update(Request $request, WebText $webText)\n {\n //\n if ($this->validateText()->fails()) {\n return redirect(url()->previous())\n ->with(['isActive' => $request->parentText])\n ->withErrors($this->validateText())\n ->withInput();\n }\n\n $webText->update([\n 'text' => $request->text,\n 'parentText' => $request->parentText\n ]);\n return redirect(\"/AEE_Dashboard/who_we_are\")->with('message', \"The information was edited successfully\")->with(['isActive' => $webText->parentText]);\n }", "public function setText(?AccessPackageLocalizedContent $value): void {\n $this->getBackingStore()->set('text', $value);\n }", "function updateHomepageText($field_name, $new_text, &$ref_status_text = '')\n{\n\treturn insertOrUpdateLeagueGreetingText($field_name, $new_text, $ref_status_text);\n}", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "public function update($title, $text, $options, $additionalData = array()) {\n $updateText = '';\n\n // save subject\n if ($title != $this->title) {\n $updatetitle = \"title = '\" . escapeString($title) . \"',\";\n }\n\n // save text\n if (CHAPTER_IN_FILE) {\n $file = CHAPTER_FILE_PATH . \"/\" . $this->authorID . \"/\" . $this->chapterID . \"_cache.txt\";\n file_put_contents($file, escapeString($text));\n } else {\n $updateText = \"text_cache = '\" . escapeString($text) . \"',\";\n }\n\n\n // update chapter cache\n //ToDo überprüfen, ob das gebraucht wird.\n /* require_once(WCF_DIR . 'lib/data/message/bbcode/MessageParser.class.php');\n $parser = MessageParser::getInstance();\n $parser->setOutputType('text/html');\n $sql = \"UPDATE\tsls\" . SLS_N . \"_chapter_cache\n SET\ttextCache = '\" . escapeString($parser->parse($text, $options['enableSmilies'], $options['enableHtml'], $options['enableBBCodes'], false)) . \"'\n WHERE\tchapterID = \" . $this->chapterID;\n WCF::getDB()->registerShutdownUpdate($sql);\n */\n $additionalSql = '';\n foreach ($additionalData as $key => $value) {\n $additionalSql .= ',' . $key . \"='\" . escapeString($value) . \"'\";\n }\n\n // save chapter in database\n $sql = \"UPDATE \tsls\" . SLS_N . \"_chapter\n\t\t\tSET\t$updateTitle\n\t\t\t\t$updateText\n updateTime = date(),\n\t\t\t\tenableSmilies = \" . $options['enableSmilies'] . \",\n\t\t\t\tenableHtml = \" . $options['enableHtml'] . \",\n\t\t\t\tenableBBCodes = \" . $options['enableBBCodes'] . \",\n\t\t\t\t\" . $additionalSql . \"\n\t\t\tWHERE \tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n }", "public static function updateStockHistory($partId,$refNo,$qty,$text){\n $stockHistory = new StockHistory();\n $stockHistory->part_id = $partId;\n $stockHistory->type = $text;\n $stockHistory->qty = $qty;\n $stockHistory->reference_no = $refNo;\n $stockHistory->related_user = Yii::$app->user->identity->id;\n $stockHistory->datetime = date(\"Y-m-d H:i:s\");\n $stockHistory->save();\n\n }", "public function setText($text) {\n\t\t$this->text = htmlentities($text);\n\t}", "function updateText($firstChar) {\n\t $id = $_GET['id'];\n\t $text = $_GET['text'];\n\t \n\t // Validate\n\t $pos = strpos($id, $firstChar);\n\t if ($pos === false || $pos != 0) {\n\t \theader('HTTP/1.0 400 Bad request');\n\t \techo 'bad id';\n\t \texit(400);\n\t }\n\t \n\t // Build the file path\n\t $file = TEXTPATH.$id.'.txt';\n\t\n\t // Write to file\n\t $fid = fopen($file, 'w');\n\t $bytes = fwrite($fid, $text, 2048);\t// max 2048\n\t if ($bytes >= 0) {\n\t \techo 'OK';\n\t } else {\n\t \theader('HTTP/1.0 500 Write failure');\n\t \techo 'error in write';\n\t \texit(500);\n\t }\n\t fclose($fid);\n }", "function setTextContent(&$content) {\n\t\t$this->lobSub->lobText =& $content;\n\t\t$this->repoObj->lobSubType = 'text';\n\t\t$this->repoObj->lobBytes = strlen($content);\n\t\t$this->lobSub->lobBinary = null;\n\t}", "function update() {\n $db = new PDO('mysql:host=127.0.0.1;dbname=Project_DB', 'root');\n $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\n $text = $_POST['text'];\n\n $query = $db->prepare(\"UPDATE `Content` SET `text_content` = :text WHERE `id` = :id;\");\n $query->bindParam(':text', $text);\n $query->bindParam(':id', $_POST['id']);\n $query->execute();\n return $query;\n}", "public function update($data) {}", "public function update($data) {}", "public function updateToDB()\n {\n try {\n $sql = 'UPDATE news\n SET link_id=:link_id, title=:title, date_public=:date_public, date_create=:date_create,\n short_text=:short_text, full_text=:full_text\n WHERE id=:id';\n $this->_db->query($sql, array('link_id' => $this->_link->getId(), 'title' => $this->_title, 'date_create' => $this->_dateCreate,\n 'date_public' => $this->_datePublic, 'short_text' => $this->_shortText, 'full_text' => $this->_fullText, 'id' => $this->_id));\n\n $fileName = $this->_file->download('file');\n if ($fileName !== false) {\n $this->_file->createPreview(40, 40);\n $this->_db->query('UPDATE news SET file=:file WHERE id=:id', array('file' => $fileName, 'id' => $this->_id));\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "function updateContent($content_id, $content_text) {\r\n $return = xtc_db_query(\"UPDATE content_manager SET content_text='\".$content_text.\"' WHERE content_id=\".$content_id.\" LIMIT 1\");\r\n return $return;\r\n }", "public function setText($t) {\n\t\t$this->text=(string)$t;\n\t\tself::save();\n\t\treturn $this;\n\t}", "public function update($arr) {\n\t\tglobal $query, $wtcDB, $lang;\n\n\t\t$update = $wtcDB->massUpdate($arr);\n\n\t\t// Execute!\n\t\tnew Query($query['lang_words']['update'], Array(1 => $update, 2 => $this->wordid), 'query', false);\n\t\t\n\t\tLanguage::cache();\n\t}", "function dbModifyTwitt($db, $id, $login, $text)\r\n {\r\n try\r\n {\r\n $request = 'update twitts set text=:text where id=:id and login=:login ';\r\n $statement = $db->prepare($request);\r\n $statement->bindParam(':id', $id, PDO::PARAM_INT);\r\n $statement->bindParam(':login', $login, PDO::PARAM_STR, 20);\r\n $statement->bindParam(':text', $text, PDO::PARAM_STR, 80);\r\n $statement->execute();\r\n }\r\n catch (PDOException $exception)\r\n {\r\n error_log('Request error: '.$exception->getMessage());\r\n return false;\r\n }\r\n return true;\r\n }", "public function setTextContent($text)\n {\n $this->textContent = $text;\n }", "function updateTextLayer($p_id, $p_lay) {\n\t$con = open_connection();\n\tmysqli_query($con,\"UPDATE text SET layer = '\". $p_lay .\"' WHERE text_id = '\". $p_id .\"'\");\n\tmysqli_close($con);\n}", "public function save() : int\n\t{\n\n\t\t$table_name = $this->model->getTableName();\n\n\t\t$sql_string = \"UPDATE {$table_name} SET text=:text WHERE id=:id\";\n\n\t\t$sql= $this->db->prepare($sql_string);\n\n\t\t$sql->execute([\n\t\t\t'text' => $this->text,\n\t\t\t'id' => $this->id\n\t\t]);\n\n\t\treturn $sql->rowCount();\n\n\t}", "public function testUpdate(): void { }", "public function update()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n if (!isset($_GET['id'])) {\n call('pages', 'error');\n return;\n }\n // we use the given id to get the correct product\n show_view('views/admin/bodyparts/update.php',['bodyPart' => BodyPart::find($_GET['id'])]);\n } else { //case when we are writing the bodypart to the database\n $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_SPECIAL_CHARS);\n $part = filter_input(INPUT_POST, 'part', FILTER_SANITIZE_SPECIAL_CHARS);\n BodyPart::update($id, $part);\n redirect('body_parts', 'readAll');\n }\n\n }", "public function update($contenido);", "private function _replaceElementTexts()\n {\n $item = $this->_record;\n // If this option is set, it will loop through the $elementTexts provided,\n // find each one and manually update it (provided it exists).\n // The rest of the element texts will get added as per usual.\n foreach ($this->_elementTexts as $elementSetName => $textArray) {\n foreach ($textArray as $elementName => $elementTextSet) {\n $etRecordSet = $item->getElementTexts($elementSetName, $elementName);\n foreach ($elementTextSet as $elementTextIndex => $textAttr) {\n // If we have an existing ElementText record, use that\n // instead of adding a new one.\n if (array_key_exists($elementTextIndex, $etRecordSet)) {\n $etRecord = $etRecordSet[$elementTextIndex];\n $etRecord->text = $textAttr['text'];\n $etRecord->html = $textAttr['html'];\n $etRecord->save();\n } else {\n // Otherwise we should just append the new text to the\n // pre-existing ones.\n $elementRecord = $item->getElement($elementSetName, $elementName);\n $item->addTextForElement($elementRecord, $textAttr['text'], $textAttr['html']);\n }\n }\n }\n }\n }", "public function update($id)\n {\n // If the user is logged in...\n if (Auth::check()) {\n // validate\n // read more on validation at http://laravel.com/docs/validation\n $rules = array(\n 'title' => 'required'\n );\n $validator = Validator::make(Input::all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n return Redirect::to('texts/' . $id . '/edit')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // store\n $text = Text::find($id);\n $text->title = Input::get('title');\n $text->author = Input::get('author');\n $text->year = Input::get('year');\n $text->description = Input::get('description');\n $text->content = Input::get('content');\n $text->publication = Input::get('publication');\n $text->publication_date = Input::get('publication_date');\n $text->save();\n\n // redirect\n Session::flash('message', 'Successfully updated text');\n return Redirect::to('texts');\n }\n } else {\n // User is not logged in\n Session::flash('message', 'Please log in');\n return Redirect::to('/');\n }\n }", "public function updTextBlocks($upd_title, $upd_description, $upd_id){\n\n global $mysqli;\n if (!$sql = $mysqli->real_query(\"UPDATE text_blocks SET title = '\".$upd_title.\"', description = '\".$upd_description.\"' WHERE id = '\".$upd_id.\"' \"))\n\n {\n echo \"CALL failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n return $sql;\n }", "public function AfterUpdateRecord()\n\t{\n\t\tforeach($this->arrTranslations as $key => $val){\n\t\t\t$sql = 'UPDATE '.TABLE_BANNERS_DESCRIPTION.'\n\t\t\t\t\tSET image_text = \\''.encode_text(prepare_input($val['image_text'])).'\\'\n\t\t\t\t\tWHERE banner_id = '.$this->curRecordId.' AND language_id = \\''.encode_text($key).'\\'';\n\t\t\tdatabase_void_query($sql);\n\t\t}\n\t}", "public function db_update() {}", "public function update(Request $request, Configuration $configuration)\n {\n $this->authorize('update', $configuration);\n\n $configuration->text = $request->text;\n $configuration->save();\n }", "public function update(Request $request, Kibb $kibb)\n {\n //\n }", "private function _replaceElementTexts()\n {\n $collection = $this->_record;\n // If this option is set, it will loop through the $elementTexts provided,\n // find each one and manually update it (provided it exists).\n // The rest of the element texts will get added as per usual.\n foreach ($this->_elementTexts as $elementSetName => $textArray) {\n foreach ($textArray as $elementName => $elementTextSet) {\n $etRecordSet = $collection->getElementTexts($elementSetName, $elementName);\n foreach ($elementTextSet as $elementTextIndex => $textAttr) {\n // If we have an existing ElementText record, use that\n // instead of adding a new one.\n if (array_key_exists($elementTextIndex, $etRecordSet)) {\n $etRecord = $etRecordSet[$elementTextIndex];\n $etRecord->text = $textAttr['text'];\n $etRecord->html = $textAttr['html'];\n $etRecord->save();\n } else {\n // Otherwise we should just append the new text to the\n // pre-existing ones.\n $elementRecord = $collection->getElement($elementSetName, $elementName);\n $collection->addTextForElement($elementRecord, $textAttr['text'], $textAttr['html']);\n }\n }\n }\n }\n }", "function setText($text)\r\n {\r\n $this->text = nl2br($text);\r\n $this->wordCount = str_word_count($text);\r\n }", "public function update(StoreWord $request, $id)\n {\n //\n $word = Word::find($id);\n\n $word->text = $request->input('text');\n $word->impression = $request->input('impression');\n $word->action = $request->input('action');\n\n $word->save();\n\n \\Session::flash('flash_message', '更新しました');\n return redirect('words/index');\n }", "public function update(string $key, $newData);", "public function setText($text) {\n $this->text = $text;\n $this->updateData();\n return $this;\n }", "public function update()\n\t{\n\t\t$mytable = WikiRevision::$table;\n\t\t$buf = \"UPDATE $mytable SET \";\n\t\tfor ($i = 0; $i < count(WikiRevision::$fields); $i++) {\n\t\t\t$buf .= WikiRevision::$fields[$i] . \" = '\" . DBConnection::get()->handle()->real_escape_string($this->data[$fields[$i]]) . \"'\" . ($i == count(WikiRevision::$fields) - 1)?(', '):(' ');\n\t\t}\n\t\t$buf .= \"WHERE rev_id = \" . $data['rev_id'];\n\t\tDBConnection::get()->handle()->query($buf);\n\t}", "abstract public function updateData();", "public function commitUpdate();", "public function update() {\n\t\tglobal $db,$dbprefix;\n\n\t\t$query = \"UPDATE \" . $dbprefix . \"kegs SET\";\n\t\tif ($this->status != -99) $query .= \" status=\" . $this->status . \", beer=\" . $this->beer . \", location=\" . $this->location; // full update\n\t\telse $query .= \" warning=\" . $this->warning; // just an info update\n\t\t$query .= \" WHERE id=\" . $this->id . \" AND size=\" . $this->size;\n\n\t\tif (!$db->query($query)) {\n\t\t\techo \"<p>Error updating info for keg \" . $this->id . \"-\" . $this->size . \": #\" . $db->errno . \": \" . $db->error . \"</p>\\r\";\n\t\t\techo \"<p>\" . $query . \"</p>\\r\";\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn $this->log();\n\t\t}\n\t}", "public function update()\r\n {\r\n \r\n }", "public function update($path);", "protected function update() {}", "public function updateMLContent( &$dbObject , $language);", "public function update();", "public function update();", "public function update();", "public function update();", "public function update()\n {\n }", "abstract public function update();", "abstract public function update();", "public abstract function update();", "public function update(Request $request, Fontend $fontend)\n {\n //\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function setString($text)\n {\n $this->text = (string) $text;\n }", "public function update( string $key, $value );", "public function update($id, UpdatetextsRequest $request)\n {\n $data = $request->except('_token');\n // $data = $request->validated();\n //dd($data);\n\n $texts = $this->textsRepository->findWithoutFail($id);\n\n if (empty($texts)) {\n Flash::error('Texts not found');\n\n return redirect(route('backend.texts.index'));\n }\n\n //dd($request->all());\n if ($request->hasFile('img'))\n {\n $file = $request->img;\n $filename = date('y-m-d-H-i-s') . uniqid() . '.' . $file->getClientOriginalExtension();\n $file->move( public_path('/images/textsblocks/'), $filename );\n $data['img'] = $filename;\n //dd($data['img']);\n }\n\n $texts = $this->textsRepository->update($data, $id);\n //dd($texts);\n\n Flash::success('Texts updated successfully.');\n\n return redirect(route('backend.texts.index'));\n }", "function update_bibtex(&$post) {\n \n if ($post->post_type == __WP_PLUGIN__) {\n \n // get the bibtex file associated with the post\n $bibtex = array_pop(get_post_meta($post->ID,'bibtex'));\n\n // updating the post\n // we need one refresh to get this into account\n $database = zetDB($this->resolve($bibtex));\n // slugs are case-insensitives\n $bibdb = $database->bibdb;\n $entry = NULL;\n if (isset($bibdb[$post->post_name])) {\n $entry = $bibdb[$post->post_name];\n } else {\n foreach ($bibdb as $k=>$v) {\n if (strtolower(preg_replace('/[:+]/','',$k)) == $post->post_name) {\n $entry = $v;\n }\n } \n }\n \n if ($entry) { $this->add_or_update_publication_entry($entry,$bibtex,$post->ID); }\n } // end if ($post->post_type == __WP_PLUGIN__)\n }", "function updateFontStyle($p_text_id, $p_font_style) {\n $con = open_connection();\n mysqli_query($con, \"UPDATE text SET font_style = '\". $p_font_style .\"' WHERE text_id = '\". $p_text_id .\"'\");\n mysqli_close($con);\n }", "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 update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function modifyTextContainer($oldName, $newName, $content, $language);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }" ]
[ "0.6398287", "0.63336074", "0.6281504", "0.6093129", "0.5967151", "0.5888563", "0.58335865", "0.58010066", "0.5774895", "0.5770646", "0.5770646", "0.57649565", "0.5740013", "0.57216424", "0.57216424", "0.5717348", "0.57007104", "0.57007104", "0.57007104", "0.5699877", "0.567622", "0.5672755", "0.5664218", "0.56567574", "0.5633402", "0.56197953", "0.5560555", "0.5539375", "0.5534205", "0.5521786", "0.55167645", "0.544946", "0.54413515", "0.5436109", "0.5426308", "0.54195935", "0.5410066", "0.5391595", "0.5365943", "0.53555703", "0.53510517", "0.5349329", "0.5334801", "0.53304935", "0.5289875", "0.5289875", "0.5285108", "0.5274595", "0.52370715", "0.5233876", "0.52325857", "0.5231532", "0.5226722", "0.5210583", "0.51982033", "0.5191738", "0.5185542", "0.5150188", "0.51447064", "0.5125224", "0.5115744", "0.5112788", "0.5110681", "0.51098704", "0.5105049", "0.50920844", "0.5084186", "0.50732005", "0.50645447", "0.5062304", "0.5058875", "0.5039249", "0.50257194", "0.5021608", "0.49913445", "0.4991035", "0.49840125", "0.4982484", "0.4982484", "0.4982484", "0.4982484", "0.49778292", "0.49761146", "0.49761146", "0.49714878", "0.49697334", "0.4967718", "0.49625874", "0.496043", "0.4953567", "0.4953122", "0.49524724", "0.49507365", "0.49507365", "0.49507365", "0.49507365", "0.4943306", "0.49429697", "0.49321997", "0.4919183" ]
0.6241406
3
Remove the specified BText from storage.
public function destroy($id, $block_id) { $bText = $this->bTextRepository->findWithoutFail($id); if (empty($bText)) { Flash::error('B Text not found'); return redirect(route('bTexts.index')); } $this->bTextRepository->delete($id); Flash::success('B Text deleted successfully.'); return redirect('/blocks/show_texts/'.$block_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(\\Core\\Model\\Content\\Text $text)\n {\n if(!$text->getShared())\n {\n $this->getEntityManager()->remove($text);\n }\n }", "public function remove_avaliation_text($avaliation_text_id)\n {\n $avaliation_text = new Avaliation_Text($avaliation_text_id);\n if(!$avaliation_text->exists()){\n $this->session->set_flashdata('error', 'Texto de avaliação não encontrado');\n redirect(site_url('admin/curadoria/avaliation_texts'));\n }\n $avaliation_text->delete();\n $this->session->set_flashdata('success', 'Removido com sucesso.');\n redirect(site_url('admin/curadoria/avaliation_texts'));\n }", "public function purge($text);", "public function deleteTextContainer($name);", "public function destroy(Text $text)\n {\n $text->delete();\n return redirect()->route('admin_texts_index');\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function setRemoveFromTitle($text) {\n $this->removeText = $text;\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function perform( $data = FALSE )\n { \n $this->deleteText( $data['id_text'] );\n }", "public function remove() {}", "public function remove() {}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function remove(string $name);", "public function remove($value)\n {\n $value = (string) $value;\n if (($key = array_search($value, $this->items)) !== false) {\n unset($this->items[$key]);\n }\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "public function onRemove();", "public function destroy(WebText $webText)\n {\n //\n $webText->delete();\n return redirect(\"/AEE_Dashboard/who_we_are\")->with('message', \"The text(s) was deleted successfully\")->with(['isActive' => $webText->parentText]);\n }", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function testRemove() {\n $index = Phish_Index::load();\n $index->store('TestA', 'testa.php');\n $index->store('TestB', 'testb.php');\n $index->remove('TestA');\n $this->assertNotEmpty($index->classes());\n }", "public function remove($path);", "public function remove($name);", "public function remove($name);", "public function remove($name);", "public function remove($name);", "public function remove($name);", "public function remove($name);", "abstract public function removeItem($name);", "public function remove() {\n }", "protected function clearStorage(): void\n {\n $this->filename = '__PdfPrintText__';\n Storage::disk('local')->exists(\"test/$this->filename.pdf\") ? Storage::disk('local')->delete(\"test/$this->filename.pdf\") : null;\n Storage::disk('local')->exists(\"$this->filename.pdf\") ? Storage::disk('local')->delete(\"$this->filename.pdf\") : null;\n }", "public function remove($value);", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "public function destroy(Kibb $kibb)\n {\n //\n }", "public function removeFieldStorageDefinition(FieldStorageDefinitionInterface $field_storage_definition);", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "private function removePartsWithoutBinary()\n {\n $this->display( \"Removing old part records which are not linked to a binary: \" );\n \n // Build the sql\n $sql = \"DELETE FROM parts\n WHERE binaryID = 0\";\n if( is_numeric( $this->settings['limit'] ) && 0 < $this->settings['limit'] )\n {\n $sql .= sprintf( ' AND dateadded < \"%s\" - INTERVAL %s HOUR', $this->settings['now'], $this->settings['limit'] );\n }\n $result = $this->db->queryDirect( $sql );\n \n $this->display( ( $result ? \"Done\" : \"Error\" ) . PHP_EOL );\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 static function Remove($name);", "public function destroy(TextBlock $block)\n {\n $deleted = $this->user->removeTextBlock($block);\n\n return response()->json($deleted);\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 del($path){\n\t\treturn $this->remove($path);\n\t}", "public function delete(string $name)\n {\n\t\t$fileHandler = $this->getFileHandler('r');\n\t\t$tmpHandler = fopen('storage.tmp', 'w');\n\t\t$deleted = false;\n\t\twhile(!feof($fileHandler)){\n\t\t\t$line = fgets($fileHandler);\n\t\t\t$arry = explode('|', $line);\n\t\t\tif(strtolower($arry[0])==strtolower($name)){\n\t\t\t\t$deleted = true;\t\n\t\t\t\tcontinue; //For DELETE operation\n\t\t\t}\n\t\t\tfwrite($tmpHandler, $line);\n\t\t}\n\t\tfclose($tmpHandler);\n\t\t$this->closeFile($fileHandler);\n\n\t\tif($deleted==true){\n\t\t\trename('storage.tmp', 'storage.txt');\n\t\t}else{\n\t\t\tunlink('storage.tmp');\n\t\t}\n\t\treturn null;\n\t}", "public function delete_tag($tag);", "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 delete($strKey)\n\t{\n\t\t$this->blnIsModified = true;\n\t\tunset($this->arrData[$strKey]);\n\t}", "public function remove()\n {\n }", "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 testRemoveElementFromBag()\n {\n $this->populateBag();\n $this->assertEquals(3, $this->bag->count());\n $this->bag->remove('var2');\n $this->assertEquals(2, $this->bag->count());\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 }", "function remove($name) {\n if (isset($this->data[$name])) {\n unset($this->data[$name]);\n }\n }", "public function remove(LabelTemplate $labelTemplate);", "function erase() {\n //delete * from database\n }", "public function remove(PersistentImageInterface $image): void\n\t{\n\t}", "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "public function removeNamedItem($name) { }", "public function testRemoveField()\n\t{\n\t\t$this->instance->removeField('content');\n\n\t\t$this->instance->bind($this->getTestData());\n\n\t\t$this->assertNull($this->instance->content);\n\t}", "public function del_by_text_id($playlist_text_rela)\n\t{\n\t\t$query_str = \"update \";\n\t\t$query_str .= \"\tt_playlist_text_rela \";\n\t\t$query_str .= \"set \";\n\t\t$query_str .= \"\tdel_flag = 1, \";\n\t\t$query_str .= \"\tupdate_user = :update_user, \";\n\t\t$query_str .= \"\tupdate_dt = :update_dt \";\n\t\t$query_str .= \"where \";\n\t\t$query_str .= \"\ttext_id = :text_id and \";\n//\t\t$query_str .= \"\tclient_id = :client_id and \";\n\t\t$query_str .= \"\tdel_flag = 0 \";\n\t\t\n\t\t$arr_bind_param = array();\n\t\t$arr_bind_param[\":update_user\"] = $playlist_text_rela->update_user;\n\t\t$arr_bind_param[\":update_dt\"] = $playlist_text_rela->update_dt;\n\t\t$arr_bind_param[\":text_id\"] = $playlist_text_rela->text_id;\n//\t\t$arr_bind_param[\":client_id\"] = $playlist_text_rela->client_id;\n\t\t\n\t\t$query = DB::query(Database::UPDATE, $query_str);\n\t\t$query->parameters($arr_bind_param);\n\t\n\t\treturn $query->execute($this->db);\n\t}", "function delete_text_speach($id_content='', $user_id=''){\n\t\ttry\n\t\t{\n\n\t\t\t$data = array(\n\t\t\t 'state' => 0\n\t\t\t );\n\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t$this->db->where('id',$id_content);\n\t\t\t$result\t=\t$this->db->update('text_speech',$data);\n\t\t\treturn $result;\n\n\t\t\t/*$this->db->where('id_content', $id_content);\n\t\t\t$this->db->where('tipo', 'text');\n\t\t\tif($this->db->delete('content_wapp')){\n\t\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t\t$this->db->where('id', $id_content);\n\t\t\t\tif($this->db->delete('text_speech')){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}else{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}*/\n\t\t}catch(ErrorInsertBatchFields $e){\n\t\t\tlog_message('debug','Error tratando de eliminar campos din�micos');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function delete_storage_unit($path)\n {\n $storage_unit_name = self::parse_xml_file($path);\n \n $this->add_message(\n self::TYPE_NORMAL, \n Translation::getInstance()->getTranslation('StorageUnitRemoval', null, 'Chamilo\\Core\\Install') . ': <em>' .\n $storage_unit_name . '</em>');\n \n $data_manager = static::context() . '\\DataManager';\n \n if (! $data_manager::drop_storage_unit($storage_unit_name))\n {\n return $this->failed(\n Translation::getInstance()->getTranslation('StorageUnitRemovalFailed', null, 'Chamilo\\Core\\Install') .\n ': <em>' . $storage_unit_name . '</em>');\n }\n else\n {\n return true;\n }\n }", "public function delete($GUN_BBL_CODE);", "public function remove(string $path) : void\n {\n if (!$this->exists($path)) {\n throw new \\RuntimeException(sprintf('The provided child path %s does not exist on path %s (component %s).', $path, $this->get_path(), $this->get_component() ));\n }\n unset($this->children[$path]);\n }", "function remove($k){\r\n\t\tunset($this->data[$k]);\r\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 remove($name)\n {\n unset($this->bag[$name]);\n }", "public function set_deltext($param)\n\t{\n\t\t$this->deltext = (string)$param;\n\t\treturn $this;\n\t}", "public function removeFromIndex()\n\t{\n\t\t$params = $this->getBasicEsParams();\n\t\t// By default all writes to index will be synchronous\n\t\t$params['custom'] = ['refresh' => true];\n\n\t\ttry {\n\t\t\t$result = $this->getElasticSearchClient()->delete($params);\n\t\t}\n\t\tcatch (Missing404Exception $e) {\n\t\t\t// That will mean the document was not found in index\n\t\t}\n\n\t\tDB::table($this->getTable())\n\t\t\t->where($this->getKeyName(), '=', $this->getKeyForSaveQuery())\n\t\t\t->update(['indexed_at' => null]);\n\n\t\treturn isset($result) ? $result : null;\n\t}", "function drush_behat_op_delete_term(\\stdClass $term) {\n $term = $term instanceof TermInterface ? $term : Term::load($term->tid);\n if ($term instanceof TermInterface) {\n $term->delete();\n }\n}", "public function remove($item);", "public function remove(&$simbio, $str_args) {\n if (!User::isUserLogin()) {\n return false;\n }\n if (isset($_POST['record'])) {\n // master file type\n $this->dbTable = $str_args?$str_args:self::$tables[0];\n // auto generate fields from database\n $this->autoGenerateFields($simbio);\n // get primary key\n $_primary_key = 'id';\n foreach ($this->dbFields as $_fld => $_fld_info) {\n if (isset($_fld_info['isPrimary'])) {\n $_primary_key = $_fld;\n break;\n }\n }\n // convert scalar var to array var\n if (!is_array($_POST['record'])) {\n $_POST['record'][0] = $_POST['record'];\n }\n foreach ($_POST['record'] as $_rec_ID) {\n $_rec_ID = (integer)$_rec_ID;\n $simbio->dbDelete(\"`$_primary_key`='$_rec_ID'\", $this->dbTable);\n }\n }\n $this->index($simbio, $str_args);\n }", "public function remove(string $key);", "public function remove()\n\t{\n\t\t$database\t= new database();\n\t\tif ( isset($this->_properties['planning_gallery_id']) && $this->_properties['planning_gallery_id'] > 0) \n\t\t{\n\t\t\t$sql = \"DELETE FROM planning_gallery WHERE planning_gallery_id = '\" . $this->planning_gallery_id . \"'\";\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif($result \t= $database->query($sql)) \n\t\t\t\t{\n\t\t\t\t\tif ($database->affected_rows > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->message = cnst12;\t// Data successfully removed!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tthrow new Exception(cnst13);\t// Selected record is not found!\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->message\t= \"Exception: \".$e->getMessage();\n\t\t\t\t$this->warning\t= true;\n\t\t\t}\n\t\t}\n\t}", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "public function remove($object);", "public function remove($object);", "public function remove($name, $removeObjects = true) {}", "public function remove($object): void;", "public function remove($document)\n {\n $this->unitOfWork->remove($document);\n }", "function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\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 removeReference($reference);", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public static function delete() {\n\t\tself::$_db->delete()->from('baskets')->where(array('slug' => self::$_slug))->go();\n\t\tSession::destroy('dime_basket');\n\t}", "public function deleteUnused()\n\t{\n\t\t/*$file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n\t\t if ($file) {\n\t\t $table = Engine_Api::_()->getDbtable('albumSongs', 'mp3music');\n\t\t $select = $table->select()\n\t\t ->where('file_id = ?', $file->getIdentity())\n\t\t ->limit(1);\n\t\t $count = count( $table->fetchAll($select) );\n\t\t if ($count >= 0)\n\t\t $file->delete();\n\t\t }\n\t\t $this->delete();*/\n\t\t$table = Engine_Api::_() -> getDbtable('albumSongs', 'mp3music');\n\t\t$data = array('is_delete' => 1, );\n\t\t$where = $table -> getAdapter() -> quoteInto('song_id = ?', $this -> song_id);\n\t\t$table -> update($data, $where);\n\t}", "private static function deleteStorageTitle(array $block): void\n\t{\n\t\t$entity = Highload\\HighloadBlockLangTable::getEntity();\n\t\tif (in_array('LID', $entity->getPrimaryArray(), true))\n\t\t{\n\t\t\tforeach (array_keys($block['TITLES']) as $languageId)\n\t\t\t{\n\t\t\t\tHighload\\HighloadBlockLangTable::delete([\n\t\t\t\t\t'ID' => $block['ID'],\n\t\t\t\t\t'LID' => $languageId,\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tHighload\\HighloadBlockLangTable::delete([\n\t\t\t\t'ID' => $block['ID'],\n\t\t\t]);\n\t\t}\n\t\tunset($entity);\n\t}", "public function delete()\n {\n $sql = \"DELETE FROM \" . TB_USAGE . \" WHERE mix_id = {$this->db->sqltext($this->mix_id)}\";\n $this->db->exec($sql);\n\n //\tremove everything from cache\n $cache = VOCApp::getInstance()->getCache();\n if ($cache) {\n $cache->flush();\n }\n }", "public function removeObjectReallyRemovesTheObjectFromStorage() {\n\t\t$originalObject = new \\F3\\FLOW3\\Fixture\\DummyClass();\n\t\t$this->objectRegistry->putObject('DummyObject', $originalObject);\n\t\t$this->objectRegistry->removeObject('DummyObject');\n\t\t$this->assertFalse($this->objectRegistry->objectExists('DummyObject'), 'removeObject() did not really remove the object.');\n\t}", "public static function remove($name, $script)\n {\n return self::$driver->remove($name, $script);\n }", "function remove($name, $db) {\n try {\n $rowsAffected = $db->exec(\"\n DELETE FROM Pokedex WHERE name = '$name'\");\n } catch (PDOException $pdoex) {\n print(json_encode(['exception' => $pdoex]));\n }\n }", "public function remove($data, array $context = [])\n {\n $data->setArchivage(true);\n $this->em->remove($data);\n $this->em->persist($data);\n //$this->em->remove($data);\n $this->em->flush();\n }", "public function Delete($value){\n $this->RetrieveData();\n foreach($this->movieList as $key =>$movie){\n if($movie->getNombre() == $value){\n unset($this->movieList[$key]);\n break;\n }\n }\n $this->SaveData();\n }", "public function remove(string $name): void;", "public function remove()\n {\n\n }", "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "function _cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)\n\t{\n\t\t// get current stored mobs\n\t\tinclude_once(\"./Services/MediaObjects/classes/class.ilObjMediaObject.php\");\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject($a_usage_type,\n\t\t\t$a_usage_id);\n\t\twhile (eregi(\"data\\/\".CLIENT_ID.\"\\/mobs\\/mm_([0-9]+)\", $a_text, $found))\n\t\t{\n\t\t\t$a_text = str_replace($found[0], \"\", $a_text);\n\t\t\tif (!in_array($found[1], $mobs))\n\t\t\t{\n\t\t\t\t// save usage if missing\n\t\t\t\tilObjMediaObject::_saveUsage($found[1], $a_usage_type,\n\t\t\t\t\t$a_usage_id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// if already saved everything ok -> take mob out of mobs array\n\t\t\t\tunset($mobs[$found[1]]);\n\t\t\t}\n\t\t}\n\t\t// remaining usages are not in text anymore -> delete them\n\t\t// and media objects (note: delete method of ilObjMediaObject\n\t\t// checks whether object is used in another context; if yes,\n\t\t// the object is not deleted!)\n\t\tforeach($mobs as $mob)\n\t\t{\n\t\t\tilObjMediaObject::_removeUsage($mob, $a_usage_type,\n\t\t\t\t$a_usage_id);\n\t\t\t$mob_obj =& new ilObjMediaObject($mob);\n\t\t\t$mob_obj->delete();\n\t\t}\n\t}" ]
[ "0.6657056", "0.6336554", "0.62061745", "0.6147514", "0.6000653", "0.59989655", "0.57107997", "0.56854826", "0.56854826", "0.56854826", "0.56854826", "0.55370003", "0.54540837", "0.5453029", "0.53865063", "0.53865063", "0.53865063", "0.518496", "0.51825666", "0.5157386", "0.5127936", "0.5120758", "0.5119705", "0.5117862", "0.5100452", "0.50971854", "0.50971854", "0.50971854", "0.50971854", "0.50971854", "0.50971854", "0.5094963", "0.5075396", "0.5071075", "0.50705373", "0.50703466", "0.5038877", "0.50240666", "0.5020232", "0.50157464", "0.49572557", "0.49358764", "0.49343148", "0.49330473", "0.49207523", "0.48722762", "0.4859088", "0.4854344", "0.4854163", "0.48535636", "0.48496768", "0.48484388", "0.48398378", "0.48342252", "0.48338842", "0.48336306", "0.48253247", "0.48247936", "0.4821354", "0.48153368", "0.48150194", "0.4810769", "0.48008466", "0.4798002", "0.4795489", "0.4790305", "0.47748846", "0.4772524", "0.47688133", "0.4766706", "0.47607714", "0.4752649", "0.4747244", "0.47443685", "0.47438592", "0.4743799", "0.47405037", "0.4739867", "0.4739867", "0.47344536", "0.4733456", "0.4731525", "0.4729343", "0.4725602", "0.4723545", "0.4716437", "0.4716437", "0.47159973", "0.47148907", "0.4714229", "0.4705565", "0.4703321", "0.4700501", "0.4700264", "0.46973357", "0.46859017", "0.4685125", "0.4683923", "0.46832442", "0.46810886" ]
0.48260924
56
get all customer attribute used for onetepcheckout by postion
public function getBillingFields() { $attributes = $this->getCollection() ->addFieldToFilter( 'is_used_for_onestepcheckout', array( 'neq' => '', ) ) ->addFieldToFilter( 'is_billing', array( 'eq' => 1, ) ); $attributes->setOrder('position', Varien_Data_Collection::SORT_ORDER_ASC); return $attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributesProperty()\n {\n return Attribute::whereAttributeType(Customer::class)->get();\n }", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function getCustomerConfig();", "public function get_customer_meta_fields()\n {\n\n $show_fields = apply_filters('wc_pos_customer_meta_fields', array(\n 'outlet_filds' => array(\n 'title' => __('Point of Sale', 'wc_point_of_sale'),\n 'fields' => array(\n 'outlet' => array(\n 'label' => __('Outlet', 'wc_point_of_sale'),\n 'type' => 'select',\n 'name' => 'outlet[]',\n 'multiple' => true,\n 'options' => WC_POS()->outlet()->get_data_names(),\n 'description' => __('Ensure the user is logged out before changing the outlet.', 'wc_point_of_sale')\n ),\n 'discount' => array(\n 'label' => __('Discount', 'wc_point_of_sale'),\n 'type' => 'select',\n 'options' => array(\n 'enable' => 'Enable',\n 'disable' => 'Disable'\n ),\n 'description' => ''\n ),\n )\n ),\n ));\n\n if ( get_option( 'wc_pos_enable_user_card', 'no' ) == 'yes' ) {\n $show_fields['outlet_filds']['fields']['user_card_number'] = array(\n 'label' => __( 'Card Number', 'wc_point_of_sale' ),\n 'type' => 'input',\n 'description' => 'Enter the number of the card to associate this customer with.'\n );\n $show_fields['outlet_filds']['fields']['user_card_number_print'] = array(\n 'label' => __( 'Print Customer Card', 'wc_point_of_sale' ),\n 'type' => 'button',\n 'description' => ''\n );\n $show_fields['outlet_filds']['fields']['user_card_number_scan'] = array(\n 'label' => __( 'Load Card', 'wc_point_of_sale' ),\n 'type' => 'button',\n 'description' => ''\n );\n }\n $show_fields['outlet_filds']['fields']['disable_pos_payment'] = array(\n 'label' => __( 'Tendering', 'wc_point_of_sale' ),\n 'desc' => 'Disable tendering ability when using the register in assigned outlets.',\n 'type' => 'checkbox',\n 'description' => ''\n );\n $show_fields['outlet_filds']['fields']['approve_refunds'] = array(\n 'label' => __( 'Refunds', 'wc_point_of_sale' ),\n 'desc' => 'Enable refund ability when using the register in assigned outlets.',\n 'type' => 'checkbox',\n 'description' => ''\n );\n return $show_fields;\n }", "public function getCustomer();", "public function getCustomers()\n {\n if (array_key_exists(\"customers\", $this->_propDict)) {\n return $this->_propDict[\"customers\"];\n } else {\n return null;\n }\n }", "function ywccp_get_all_custom_fields(){\r\n\t\t\r\n\t\t$fields = array();\r\n\t\t// get billing\r\n\t\t$fields['billing'] = ywccp_get_custom_fields('billing');\r\n\t\t// get shipping\r\n\t\t$fields['shipping'] = ywccp_get_custom_fields('shipping');\r\n\t\t// get additional\r\n\t\t$fields['additional'] = ywccp_get_custom_fields('additional');\r\n\t\t\r\n\t\treturn $fields;\r\n\t}", "public function getAttributes()\n {\n if ($this->attributes === null) {\n $this->attributes = [];\n $customAttributesMetadata = $this->addressMetadata->getCustomAttributesMetadata(\n \\Magento\\Customer\\Api\\Data\\AddressInterface::class\n );\n if (is_array($customAttributesMetadata)) {\n /** @var $attribute \\Magento\\Framework\\Api\\MetadataObjectInterface */\n foreach ($customAttributesMetadata as $attribute) {\n $this->attributes[$attribute->getAttributeCode()] = $attribute;\n }\n }\n $customAttributesMetadata = $this->addressMetadata->getCustomAttributesMetadata(\n \\Magento\\Customer\\Api\\Data\\CustomerInterface::class\n );\n if (is_array($customAttributesMetadata)) {\n /** @var $attribute \\Magento\\Framework\\Api\\MetadataObjectInterface */\n foreach ($customAttributesMetadata as $attribute) {\n $this->attributes[$attribute->getAttributeCode()] = $attribute;\n }\n }\n }\n return $this->attributes;\n }", "function getSpecificCustomers() {\n\t\treturn $this->_specificCustomers;\n\t}", "public function get_all_eco_attributes()\n {\n \t$attribute = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter('eco_attribute')->getFirstItem();\n\n\t\t$options = Mage::getModel('eav/entity_attribute_source_table')->setAttribute($attribute)->getAllOptions(false) ;\n\t\t\n\t\treturn $options;\n \t}", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function items($customerId)\r\n {\r\n $customer = Mage::getModel('customer/customer')\r\n ->load($customerId);\r\n /* @var $customer Mage_Customer_Model_Customer */\r\n\r\n if (!$customer->getId()) {\r\n $this->_fault('customer_not_exists');\r\n }\r\n\r\n $result = array();\r\n foreach ($customer->getAddresses() as $address) {\r\n $data = $address->toArray();\r\n $row = array();\r\n\r\n foreach ($this->_mapAttributes as $attributeAlias => $attributeCode) {\r\n $row[$attributeAlias] = isset($data[$attributeCode]) ? $data[$attributeCode] : null ;\r\n }\r\n\r\n foreach ($this->getAllowedAttributes($address) as $attributeCode => $attribute) {\r\n if (isset($data[$attributeCode])) {\r\n $row[$attributeCode] = $data[$attributeCode];\r\n }else{\r\n $row[$attributeCode] = \"\";\r\n }\r\n if($attributeCode == \"country_id\"){\r\n $countryModel = Mage::getModel('directory/country')->loadByCode($data[$attributeCode]);\r\n $countryName = $countryModel->getName();\r\n $row['country_name'] = __($countryName);\r\n }\r\n }\r\n $row['is_default_billing'] = $customer->getDefaultBilling() == $address->getId();\r\n $row['is_default_shipping'] = $customer->getDefaultShipping() == $address->getId();\r\n\r\n $result[] = $row;\r\n\r\n }\r\n\r\n return $result;\r\n }", "function get_eco_attributes($product_id)\n\t{\n\t\t\t$product = $this->product_model->reset()->load($product_id);\n\t\t\t$attribute_name = 'ecoattribute';\n\t\n\t\t\t$eco_attributes = $product->getAttributeText($attribute_name);\n\t\t\tif(count($eco_attributes) == 1) $eco_attributes = array($eco_attributes); //put in array if there's ONE eco attribute filled\n\t\t\treturn $eco_attributes;\n\t}", "public function getCustomerTaxvat();", "public function getBillingData(): array\n {\n return [\n 'billing.street1' => 'Wilaya center, Avenue Ali Yaeta, étage 3, n 31, Tétouan',\n 'billing.city' => 'TETOUAN',\n 'billing.state' => 'TETOUAN',\n 'billing.country' => 'MA',\n 'billing.postcode' => '35000',\n ];\n }", "public function getCustpo()\n {\n return $this->custpo;\n }", "protected function getCustomerDetails()\n {\n $details = [];\n\n if ($email = $this->getCustomerEmail()) {\n $details['email'] = $email;\n }\n\n if ($id = $this->getCustomerId()) {\n $details['id'] = $id;\n }\n\n return $details;\n }", "public function getCustas() {\n return $this->aCustas;\n }", "public function getCustomer()\n {\n return $this->data->customer;\n }", "function getSpecificCustomersFromRequest() {\n\t\t$_customers = array();\n\n\t\tif (isset($_REQUEST['specificCustomersEditControl'])){\n\t\t\t$i = 0;\n\t\t\twhile (true){\n\t\t\t\tif(isset($_REQUEST[$_REQUEST['specificCustomersEditControl'] . '_variant0_' . $_REQUEST['specificCustomersEditControl'] . '_item' . $i])){\n\t\t\t\t\t$_customers[] = $_REQUEST[$_REQUEST['specificCustomersEditControl'] . '_variant0_' . $_REQUEST['specificCustomersEditControl'] . '_item' . $i];\n\t\t\t\t\t$i++;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn weConvertToIds($_customers, CUSTOMER_TABLE);\n\t}", "function get_customer_list()\n {\n $this->company_db->select(\"c.*\");\n $this->company_db->from('tbl_customer c');\n // $this->company_db->where('c.void', 'No');\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 }", "public function getCustomerData(){\n\n\t\t$customerDataSQL = \"select * FROM\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT *,\n\t\t\t\t\t\t\t(SELECT COUNT(gds_order_id) FROM gds_orders AS gord WHERE gord.cust_le_id=l.legal_entity_id) AS 'TotalOrder'\n\t\t\t\t\t\t\tFROM legal_entities AS l\n\t\t\t\t\t\t\tWHERE legal_entity_type_id LIKE '30%' AND is_posted=0\n\t\t\t\t\t\t) AS innertbl WHERE TotalOrder>0\";\n\n\t\t$customerData = DB::select(DB::raw($customerDataSQL));\n\n\t\t/*$customerData = DB::table('legal_entities_live')\n\t\t\t\t\t->where(\"legal_entity_type_id\",\"like\",\"30%\")\n\t\t\t\t\t->where('is_posted', '=', '0')\n\t\t\t\t\t->get();*/\n\t\t\t\t\t\n\t\treturn $customerData;\n\n\t}", "function get_all_customer()\n {\n $this->db->order_by('customer_id', 'desc');\n return $this->db->get('customer')->result_array();\n }", "public function getCustomersProperty()\n {\n return Customer::search($this->search)->paginate(50);\n }", "public function getCustomers()\n {\n return $this->hasMany(Customer::className(), ['currency_id' => 'currency_id']);\n }", "public function listAllCustomers();", "public function getCustomerDob();", "public function addCustomerData()\n {\n $customer = Mage::getModel('customer/customer');\n // alias => attribute_code\n $attributes = array(\n 'customer_lastname' => 'lastname',\n 'customer_middlename' => 'middlename',\n 'customer_firstname' => 'firstname',\n 'customer_email' => 'email'\n );\n\n foreach ($attributes as $alias => $attributeCode) {\n $attribute = $customer->getAttribute($attributeCode);\n /* @var $attribute Mage_Eav_Model_Entity_Attribute_Abstract */\n\n if ($attribute->getBackendType() == 'static') {\n $tableAlias = 'customer_' . $attribute->getAttributeCode();\n\n $this->getSelect()->joinLeft(\n array($tableAlias => $attribute->getBackend()->getTable()),\n sprintf('%s.entity_id=main_table.customer_id', $tableAlias),\n array($alias => $attribute->getAttributeCode())\n );\n\n $this->_fields[$alias] = sprintf('%s.%s', $tableAlias, $attribute->getAttributeCode());\n }\n else {\n $tableAlias = 'customer_' . $attribute->getAttributeCode();\n\n $joinConds = array(\n sprintf('%s.entity_id=main_table.customer_id', $tableAlias),\n $this->getConnection()->quoteInto($tableAlias . '.attribute_id=?', $attribute->getAttributeId())\n );\n\n $this->getSelect()->joinLeft(\n array($tableAlias => $attribute->getBackend()->getTable()),\n join(' AND ', $joinConds),\n array($alias => 'value')\n );\n\n $this->_fields[$alias] = sprintf('%s.value', $tableAlias);\n }\n }\n\n $this->setFlag('has_customer_data', true);\n return $this;\n }", "public function attributes()\n {\n return [\n 'name' => 'name of customer',\n ];\n }", "static function getAllCustomerWithOrders(){\r\n\t\tglobal $DB;\r\n\t\t$retval = Array();\r\n\t\t\r\n\t\t$sql = \"SELECT DISTINCT personalization_orders.customerid FROM personalization_orders WHERE `status` >= 1 AND orderdate > 0\";\r\n\r\n\t\tif($DB->num_rows($sql)){\r\n\t\t\tforeach($DB->select($sql) as $r){ \r\n\t\t\t\t$retval[] = new BusinessContact($r[\"customerid\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "private function getAddressCustomAttributes()\n {\n $attributes = $this->attributeMetadataDataProvider->loadAttributesCollection(\n 'customer_address',\n 'customer_register_address'\n );\n $addressCustomAttributes = [];\n foreach ($attributes as $attribute) {\n if (!$attribute->getIsUserDefined()) {\n continue;\n }\n $addressCustomAttributes[$attribute->getAttributeCode()] = $this->attributeMapper->map($attribute);\n }\n\n return $addressCustomAttributes;\n }", "function GetCustomerPilotFeatures($customerId)\n{ \n $GLOBALS['proxy'] = $GLOBALS['customerProxy']; \n\n $request = new GetCustomerPilotFeaturesRequest();\n $request->CustomerId = $customerId;\n\n return $GLOBALS['proxy']->GetService()->GetCustomerPilotFeatures($request)->FeaturePilotFlags;\n}", "public static function getAllAttributes()\n {\n $contact = new Contact();\n $adapter = new ContactWebFormModelAttributesAdapter($contact);\n $attributes = $adapter->getAttributes();\n $placeAbleAttributes = array();\n foreach ($attributes as $attributeName => $attributeData)\n {\n if (!$attributeData['isReadOnly'] && $attributeName != 'googleWebTrackingId')\n {\n $placeAbleAttributes[$attributeName] = $attributeData;\n }\n }\n $placeAbleAttributes = ArrayUtil::subValueSort($placeAbleAttributes, 'attributeLabel', 'asort');\n return $placeAbleAttributes;\n }", "public function getCustomerData() {\n $custData = DB::table('customers')->select('id', 'comp_name')->get();\n $cData = '';\n $cData .=\"<option value='\" . '' . \"' selected='selected' > Select Customer</option>\";\n foreach ($custData as $key => $value) {\n $cData .=\"<option value='\" . $value->id . \"'>\" . $value->comp_name . \"</option>\";\n }\n return $cData;\n }", "public function getShippingInvoiced();", "public function getcustomerDetails_get() {\n $result = $this->QuotationForEnquiry_model->getcustomerDetails();\n return $this->response($result);\n }", "public function getBilling();", "public static function listData()\n\t{\n\t\t\n\t\t$customers = RestController::getAdminData('customers');\n\t\treturn CHtml::listData($customers, 'id', 'customerName');\n\t}", "function __getCustomerDetail(){\n \t\t\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\t\t\n\t\t$customer_id = $this->session->userdata['pos_customer_id']; //get customer id from session\n\t\t\n\t\t$saldo_status = $this->payments_model->getSaldostatus($customer_id);\n\t\t$this->data['visible']['saldo_status'] = $saldo_status;\n\t\t\n\t\t\n\t\t//get results\n\t\t$this->data['reg_fields'][] = 'customer';\n\t\t$this->data['fields']['customer'] = $this->customer_model->getCustomerinfo($customer_id);\n\t\t$this->data['debug'][] = $this->customer_model->debug_data;\n\t\t\n\t\t$this->data['lists']['customer_name'] = $this->data['fields']['customer']['firstname'];\n\t\tif(count($this->data['fields']['customer'])> 0){\n\t\t\t$this->data['visible']['wi_customer_profile'] = 1;\n\t\t}\n\t\telse{\n\t\t\t$this->data['visible']['wi_profile_none'] = 0;\n\t\t}\n\t\t\n\t\t$customer=$this->session->userdata['customer']['id'];\n\t\t$data = $this->payments_model->getAccountBalance($customer);\n\t\t$pendingsaldo = $data['pending'];\n\t\t$paidsaldo = $data['paid'];\n\t\t\t\n\t\tif(intval($pendingsaldo) > 0)\n\t\t{\t\n\t\t\t$amount= formatcurrency($paidsaldo).' ('.formatcurrency($pendingsaldo).')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$amount= formatcurrency($paidsaldo);\n\t\t}\n\t\t$this->data['lists']['saldo']=$amount;\n\n\t\tif($paidsaldo < 0)\n\t\t{\n\t\t\t$this->data['lists']['saldocolor']='style=\"color:red;\"';\n\t\t}\n\t\t\n\t\t\n\t\t//get utlevering count for a customer\n\t\t$this->data['reg_blocks'][] = 'orders';\n\t\t$this->data['blocks']['orders'] = $this->orders_model->getCustomerOrderhistory($customer_id,'utlevering');\n\t\t$this->data['debug'][] = $this->orders_model->debug_data;\n\t\t\n\t\t$this->data['vars']['order_count'] = count($this->data['blocks']['orders']);\n\t\t\n\t\t\n\t }", "public function coupons()\n {\n return $this->morphMany(Checkout::couponModel(), 'customer');\n }", "function getAdditionalAttributes() ;", "public function getCustomer()\n {\n return $this->customer;\n }", "public function getCustomer()\n {\n return $this->customer;\n }", "public function getCustomer()\n {\n return $this->customer;\n }", "public function getAttributes(){ }", "public function getCustomers()\n {\n return $this->hasMany(User::className(), ['id' => 'customer_id'])->viaTable('favorite_contractor', ['contractor_id' => 'id']);\n }", "function ciniki_poma_customerAccountGet($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'),\n 'order_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Order'),\n 'sections'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'name'=>'Return Orders'),\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', 'poma', 'private', 'checkAccess');\n $rc = ciniki_poma_checkAccess($ciniki, $args['tnid'], 'ciniki.poma.customerAccountGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load poma maps\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'maps');\n $rc = ciniki_poma_maps($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $maps = $rc['maps'];\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki, 'php');\n\n $rsp = array('stat'=>'ok', 'customer_details'=>array(), 'orders'=>array());\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'hooks', 'customerDetails');\n\n //\n // Get the customer details\n //\n if( isset($args['sections']) && in_array('details', $args['sections']) ) {\n $rc = ciniki_customers_hooks_customerDetails($ciniki, $args['tnid'], array('customer_id'=>$args['customer_id']));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['details']) ) {\n $rsp['customer_details'] = $rc['details'];\n }\n if( isset($rc['customer']['member_status_text']) && $rc['customer']['member_status_text'] != '' ) {\n if( isset($rc['customer']['member_lastpaid']) && $rc['customer']['member_lastpaid'] != '' ) {\n $rsp['customer_details'][] = array('detail'=>array(\n 'label'=>'Membership',\n 'value'=>$rc['customer']['member_status_text'] . ' <span class=\"subdue\">[' . $rc['customer']['member_lastpaid'] . ']</span>',\n ));\n } else {\n $rsp['customer_details'][] = array('detail'=>array(\n 'label'=>'Membership',\n 'value'=>$rc['customer']['member_status_text'],\n ));\n }\n }\n\n //\n // Get the current account balance\n //\n $strsql = \"SELECT ciniki_poma_customer_ledgers.id, \"\n . \"ciniki_poma_customer_ledgers.description, \"\n . \"ciniki_poma_customer_ledgers.transaction_date, \"\n . \"ciniki_poma_customer_ledgers.transaction_type, \"\n . \"ciniki_poma_customer_ledgers.customer_amount, \"\n . \"ciniki_poma_customer_ledgers.balance \"\n . \"FROM ciniki_poma_customer_ledgers \"\n . \"WHERE customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY transaction_date DESC \"\n . \"LIMIT 15 \"\n . \"\";\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.poma', array(\n array('container'=>'entries', 'fname'=>'id', \n 'fields'=>array('id', 'description', 'transaction_date', 'transaction_type', 'customer_amount', 'balance'),\n 'utctotz'=>array('transaction_date'=>array('timezone'=>$intl_timezone, 'format'=>$date_format)),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $rsp['recent_ledger'] = array();\n if( isset($rc['entries']) ) {\n foreach($rc['entries'] as $entry) {\n if( !isset($balance) ) {\n $balance = $entry['balance'];\n }\n if( $entry['transaction_type'] == 10 ) {\n $entry['amount'] = '$' . number_format($entry['customer_amount'], 2);\n } elseif( $entry['transaction_type'] == 30 ) {\n $entry['amount'] = '-$' . number_format($entry['customer_amount'], 2);\n } elseif( $entry['transaction_type'] == 60 ) {\n $entry['amount'] = '$' . number_format($entry['customer_amount'], 2);\n }\n $entry['balance_text'] = ($entry['balance'] < 0 ? '-':'') . '$' . number_format(abs($entry['balance']), 2);\n// array_unshift($rsp['recent_ledger'], $entry);\n }\n if( isset($balance) ) {\n $rsp['customer_details'][] = array('detail'=>array(\n 'label'=>'Account',\n 'value'=>($balance < 0 ? '-' : '') . '$' . number_format(abs($balance), 2),\n ));\n // if( $balance < 0 && $balance != $rsp['order']['balance_amount'] ) {\n // $rsp['order']['default_payment_amount'] = abs($balance);\n // }\n // if( $balance < 0 ) {\n // $rsp['checkout_account'] = array(\n // array('label'=>'Account Balance Owing', 'status'=>'red', 'value'=>'$' . number_format(abs($balance), 2)),\n // );\n // }\n }\n }\n }\n\n //\n // Get the orders\n //\n if( isset($args['sections']) && in_array('orders', $args['sections']) ) {\n $strsql = \"SELECT orders.id, \"\n . \"orders.customer_id, \"\n . \"orders.order_number, \"\n . \"orders.order_date, \"\n . \"orders.status, \"\n . \"orders.status AS status_text, \"\n . \"orders.payment_status, \"\n . \"orders.payment_status AS payment_status_text, \"\n . \"orders.billing_name, \"\n . \"orders.total_amount \"\n . \"FROM ciniki_poma_orders AS orders \"\n . \"WHERE orders.customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND orders.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY orders.order_date DESC \"\n . \"\";\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.poma', array(\n array('container'=>'orders', 'fname'=>'id', 'fields'=>array('id', 'customer_id', 'order_number', 'order_date', \n 'status', 'status_text', 'payment_status', 'payment_status_text', 'billing_name', 'total_amount'),\n 'utctotz'=>array('order_date'=>array('timezone'=>'UTC', 'format'=>$date_format)),\n 'maps'=>array('status_text'=>$maps['order']['status'],\n 'payment_status_text'=>$maps['order']['payment_status']),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['orders']) ) {\n $rsp['orders'] = $rc['orders'];\n foreach($rsp['orders'] as $oid => $order) {\n $rsp['orders'][$oid]['total_amount_display'] = '$' . number_format($order['total_amount'], 2);\n }\n }\n }\n\n //\n // Get the records for the account\n //\n if( isset($args['sections']) && in_array('records', $args['sections']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'accountRecords');\n $rc = ciniki_poma_accountRecords($ciniki, $args['tnid'], array('customer_id'=>$args['customer_id']));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $rsp['records'] = isset($rc['records']) ? $rc['records'] : array();\n }\n\n //\n // Get the order\n //\n $rsp['order_messages'] = array();\n if( isset($args['order_id']) && $args['order_id'] > 0 ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'orderLoad');\n $rc = ciniki_poma_orderLoad($ciniki, $args['tnid'], $args['order_id']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['order']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.28', 'msg'=>'Unable to find order'));\n }\n $rsp['order'] = $rc['order'];\n// $rsp['order']['default_payment_amount'] = $rc['order']['balance_amount'];\n\n //\n // Build the nplists\n //\n// foreach($rsp['order']['items'] as $item) {\n// $rsp['nplists']['orderitems'][] = $item['id'];\n// }\n //\n // Check if there are any messages for this order\n //\n if( isset($ciniki['tenant']['modules']['ciniki.mail']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'objectMessages');\n $rc = ciniki_mail_hooks_objectMessages($ciniki, $args['tnid'], array('object'=>'ciniki.poma.order', 'object_id'=>$args['order_id']));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $rsp['order_messages'] = isset($rc['messages']) ? $rc['messages'] : array();\n } \n }\n\n return $rsp;\n}", "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 getCustomers() {\n $customerList = array();\n $i = 0;\n $sql = \"SELECT email, passwd, customer_name, address, city, state, country, zip, phone From signup_app.customers\";\n $customers = $this->db->query($sql);\n //$customer = $customers->fetch();\n if ($customers->num_rows > 0) {\n while ($customer = $customers->fetch_assoc()) {\n $customerList[$i++] = new Customer(\n $customer['email'], $customer['passwd'], $customer['customer_name'], $customer['address']\n , $customer['city'], $customer['state'], $customer['country'], $customer['zip'], $customer['phone']\n );\n }\n return $customerList;\n }\n }", "public function getCustomer() {\n return $this->customer;\n }", "public function getTaxInvoiced();", "public function customer(){\n\t\treturn Customers::find($this->customers_id);\n\t}", "public function getAttributes() {}", "public function getAttributes() {}", "public function getFormFields() {\r\r\n\r\r\n $billing = $this->getOrder()->getBillingAddress();\r\r\n $shipping = $this->getOrder()->getShippingAddress();\r\r\n $addr_entity_id = $shipping->getCustomerAddressId();\r\r\n $shippingaddress = Mage::getModel('sales/order_address');\r\r\n $shippingaddress->load($addr_entity_id);\r\r\n $shipaddgetdat = $shippingaddress->getData();\r\r\n\r\r\n\r\r\n\r\r\n $biladdr_entity_id = $billing->getCustomerAddressId();\r\r\n ;\r\r\n $billingaddress = Mage::getModel('sales/order_address');\r\r\n $billingaddress->load($biladdr_entity_id);\r\r\n $billaddgetdat = $billingaddress->getData();\r\r\n\r\r\n $coFields = array();\r\r\n $items = $this->getQuote()->getAllItems();\r\r\n\r\r\n if ($items) {\r\r\n $i = 1;\r\r\n foreach ($items as $item) {\r\r\n if ($item->getParentItem()) {\r\r\n continue;\r\r\n }\r\r\n $coFields['c_prod_' . $i] = $this->cleanString($item->getSku());\r\r\n $coFields['c_name_' . $i] = $this->cleanString($item->getName());\r\r\n $coFields['c_description_' . $i] = $this->cleanString($item->getDescription());\r\r\n $coFields['c_price_' . $i] = number_format($item->getPrice(), 2, '.', '');\r\r\n $i++;\r\r\n }\r\r\n }\r\r\n\r\r\n $request = '';\r\r\n foreach ($coFields as $k => $v) {\r\r\n $request .= '<' . $k . '>' . $v . '</' . $k . '>';\r\r\n }\r\r\n\r\r\n\r\r\n $key = Mage::getStoreConfig('payment/payucheckout_shared/key');\r\r\n $salt = Mage::getStoreConfig('payment/payucheckout_shared/salt');\r\r\n $debug_mode = Mage::getStoreConfig('payment/payucheckout_shared/debug_mode');\r\r\n\r\r\n $orderid = $this->getOrder()->getRealOrderId();\r\r\n $orderInfo = $this->getOrder();\r\r\n $order = Mage::getModel('sales/order')->loadByIncrementId($orderid);\r\r\n// get order total value\r\r\n $orderValue = number_format($order->getGrandTotal(), 2, '.', $thousands_sep = '');\r\r\n// get order item collection\r\r\n $orderItems = $order->getItemsCollection();\r\r\n $productInfo = array();\r\r\n $productInfo2 = array();\r\r\n \r\r\n \r\r\n foreach ($orderItems as $item) {\r\r\n \r\r\n $item->getName();\r\r\n $product_id = $item->product_id;\r\r\n $product_sku = $item->sku;\r\r\n $product_name = $item->getName();\r\r\n $_product = Mage::getModel('catalog/product')->load($product_id);\r\r\n $cats = $_product->getCategoryIds();\r\r\n $category_id = $cats[0]; // just grab the first id\r\r\n $category = Mage::getModel('catalog/category')->load($category_id);\r\r\n $category_name = $category->getName();\r\r\n\r\r\n $productInfo['name'] = $this->cleanString($item->getName());\r\r\n $productInfo['description'] = $this->cleanString(substr($_product->getDescription(),0,100));\r\r\n $productInfo['value'] = $orderValue;\r\r\n $productInfo['isRequired'] = true;\r\r\n $productInfo['settlementEvent'] = \"EmailConfirmation\";\r\r\n $productInfo2[] = $productInfo;\r\r\n }\r\r\n $productIndoFilterData['paymentParts'] = $productInfo2;\r\r\n $jsonProductInfo = json_encode($productIndoFilterData);\r\r\n\r\r\n $txnid = $orderid;\r\r\n\r\r\n $coFields['key'] = $key;\r\r\n $coFields['txnid'] = $txnid;\r\r\n $coFields['udf2'] = $txnid;\r\r\n $coFields['amount'] = number_format($this->getOrder()->getBaseGrandTotal(), 0, '', '');\r\r\n $coFields['productinfo'] = $jsonProductInfo;\r\r\n $coFields['address'] = $billaddgetdat['street'];\r\r\n $coFields['firstname'] = $billing->getFirstname();\r\r\n $coFields['Lastname'] = $billing->getLastname();\r\r\n $coFields['City'] = $billing->getCity();\r\r\n $coFields['State'] = $billing->getRegion();\r\r\n $coFields['Country'] = $billing->getCountry();\r\r\n $coFields['Zipcode'] = $billing->getPostcode();\r\r\n $coFields['email'] = $this->getOrder()->getCustomerEmail();\r\r\n $coFields['phone'] = $billing->getTelephone();\r\r\n\r\r\n $coFields['ship_name'] = $shipping->getFirstname() . \" \" . $shipping->getLastname();\r\r\n $coFields['ship_address'] = $shipaddgetdat['street'];\r\r\n $coFields['ship_zipcode'] = $shipping->getPostcode();\r\r\n $coFields['ship_city'] = $shipping->getCity();\r\r\n $coFields['ship_state'] = $shipping->getRegion();\r\r\n $coFields['ship_country'] = $shipping->getCountry();\r\r\n $coFields['ship_phone'] = $shipping->getTelephone();\r\r\n $coFields['website'] = Mage::getBaseUrl();\r\r\n $coFields['surl'] = Mage::getBaseUrl() . 'payucheckout/shared/success/';\r\r\n $coFields['furl'] = Mage::getBaseUrl() . 'payucheckout/shared/failure/';\r\r\n $coFields['curl'] = Mage::getBaseUrl() . 'payucheckout/shared/canceled/id/' . $this->getOrder()->getRealOrderId();\r\r\n $coFields['Pg'] = $billing->getpg();\r\r\n $coFields['bankcode'] = $billing->getbankcode();\r\r\n $coFields['ccnum'] = $billing->getccnum();\r\r\n $coFields['ccvv'] = $billing->getccvv();\r\r\n $coFields['ccexpmon'] = $billing->getccexpmon();\r\r\n $coFields['ccexpyr'] = $billing->getccexpyr();\r\r\n $coFields['ccname'] = $billing->getccname();\r\r\n $coFields['service_provider'] = 'payu_paisa';\r\r\n\r\r\n $debugId = '';\r\r\n \r\r\n\r\r\n if ($debug_mode == 1) {\r\r\n\r\r\n $requestInfo = $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '||||||||||' . $salt;\r\r\n $debug = Mage::getModel('payucheckout/api_debug')\r\r\n ->setRequestBody($requestInfo)\r\r\n ->save();\r\r\n\r\r\n $debugId = $debug->getId();\r\r\n\r\r\n $coFields['udf1'] = $debugId;\r\r\n $coFields['Hash'] = hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '|' . $coFields['udf2'] . '|||||||||' . $salt);\r\r\n } else {\r\r\n $coFields['Hash'] = strtolower(hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '||' . $coFields['udf2'] . '|||||||||' . $salt));\r\r\n }\r\r\n return $coFields;\r\r\n }", "public function getCustomers()\n {\n\t\t$customers = $this->ShopifyClient->call('GET','/admin/customers.json',$this->config);\t\t\n\t\t$arra = array();\n\t\tif(!empty($customers['customers']))\n\t\t{\n\t\t\t$keyArr = array('id','email','accepts_marketing','first_name','last_name','orders_count','state','total_spent','last_order_id','note',\n\t\t\t\t\t\t\t'verified_email','multipass_identifier','tax_exempt','tags','last_order_name','addresses');\n\t\t\t$shopifyKeyArr = array('id','email','accepts_marketing','first_name','last_name','orders_count','state','total_spent','last_order_id','note',\n\t\t\t\t\t\t\t'verified_email','multipass_identifier','tax_exempt','tags','last_order_name','addresses');\n\t\t\t\n\t\t\tforeach($customers as $key=>$var) {\n\t\t\t\tforeach($var as $k=>$val) {\n\t\t\t\t\tif(!empty($val['default_address'])){\n\t\t\t\t\t\tarray_push($keyArr, 'default_address');\n\t\t\t\t\t\tarray_push($shopifyKeyArr, 'default_address');\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t$arra['data'][] = $this->createProductArray($val,$shopifyKeyArr,$keyArr);\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$status_code = 200;\n\t\t\t$message = 'success';\t\n\t}else\n\t{\n\t\t$status_code = 404;\n\t\t$message = 'Customers not found';\n\t\t$arra['data'] = array();\n\t\t$arra['data_count'] = 0;\n\t}\t\n\t\t$customers = $this->getJsonDataFormat($arra,$status_code,$message);\t\n\t\treturn $customers;\n }", "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 function get_attributes()\n {\n }", "public function get_attributes()\n {\n }", "private function getCustomersArray(): void {\n\n $mdlCustomer = new \\App\\Models\\Customer();\n $rows = $mdlCustomer->getAll();\n\n $this->customers = array_column($rows, 'id');\n }", "public function getCustomAttributes() {}", "public function testCustomerPaymentMethodGetCustomerPaymentMethodsBycustomerId()\n {\n }", "public function transactionFormGetAttributes ();", "public function getCustomAttributes(): array;", "function getCustomerNo() {\n return $this->customerNo;\n }", "public function getMetaFieldsProperty()\n {\n return collect(config('getcandy-hub.customers.searchable_meta'));\n }", "protected function _getCustomer()\n {\n return Mage::registry('current_customer');\n }", "public function getCreditos()\n {\n return $this->creditos;\n }", "public function attributes()\n {\n return [\n 'cost.office_id' => 'sucursal',\n ];\n }", "public function getAtributosP() {\r\n\t\t\t$atributos = array();\r\n\t\t\t$atributos[0] = \"nombreUnidad\";\r\n\t\t\t$atributos[1] = \"telefono\";\r\n\t\t\treturn $atributos;\r\n\t\t}", "public function getCustomerVars(Mage_Customer_Model_Customer $customer)\n {\n try {\n $vars = array(\n 'magento_id' => $customer->getId(),\n 'name' => $customer->getName(),\n 'suffix' => $customer->getSuffix() ? $customer->getSuffix() : '',\n 'prefix' => $customer->getPrefix() ? $customer->getPrefix() : '',\n 'firstName' => $customer->getFirstname(),\n 'middleName' => $customer->getMiddlename() ? $customer->getMiddlename() : '',\n 'lastName' => $customer->getLastname(),\n 'website' => Mage::app()->getStore()->getWebsite()->getName(),\n 'store' => Mage::app()->getStore()->getName(),\n 'customerGroup' => Mage::getModel('customer/group')->load($customer->getGroupId())->getCustomerGroupCode(),\n 'created_date' => date(\"Y-m-d\", $customer->getCreatedAtTimestamp()),\n 'created_time' => $customer->getCreatedAtTimestamp(),\n );\n\n if ($primaryBillingAddress = $customer->getPrimaryBillingAddress()){\n $vars[\"defaultBillingAddress\"] = $this->getAddressVars($primaryBillingAddress);\n $vars = $vars + $this->getAddressVars($primaryBillingAddress, \"defaultBillingAddress_\");\n }\n\n if ($primaryShippingAddress = $customer->getPrimaryShippingAddress()){\n $vars[\"defaultShippingAddress\"] = $this->getAddressVars($primaryShippingAddress);\n $vars = $vars + $this->getAddressVars($primaryShippingAddress, \"defaultShippingAddress_\");\n }\n\n return $vars;\n } catch(Exception $e) {\n Mage::logException($e);\n }\n }", "public function getObjetcustomer()\n{\nreturn $this->objetcustomer;\n}", "public function getAttributes()\n {\n }", "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_icontact_prospect_attributes');\n }", "public function getAll(): array\n {\n $customerData = $this->_doctrine->getRepository(CustomerData::class)->findAll();\n\n return $customerData;\n }", "function getCostPersonalTagCompany(){\n\treturn campo('config_system','id','1','cost_company_personal_tag');\n}", "function getCostPersonalTagCompany(){\n\treturn campo('config_system','id','1','cost_company_personal_tag');\n}", "public function attributes()\n {\n return [\n //'uid' => '用户id',\n 'payChannel' => '支付类型',\n 'money' => '商品金额',\n 'number' => '商品数量',\n 'goodsTitle' => '商品标题',\n 'goodsDesc' => '商品内容',\n 'deviceInfo' => '设备信息',\n 'description' => '来源类型',\n ];\n }", "public function unknownCustomer() {\r\n\t\t$data = array();\r\n\t\t\t$data['name'] = 'Unknown';\r\n\t\t\t$data['link'] = '';\r\n\t\t\t$data['first_name'] = 'Unknown';\r\n\t\t\t$data['customer_type'] = 0;\r\n\t\t\t$data['last_name'] = 'Unknown';\r\n\t\t\t$data['spouse_first'] = 'Unknown';\r\n\t\t\t$data['spouse_last'] = 'Unknown';\r\n\t\t\t$data['phone'] = 'Unknown';\r\n\t\t\t$data['home_phone'] = 'Unknown';\r\n\t\t\t$data['work_phone'] = 'Unknown';\r\n\t\t\t$data['address'] = 'Unknown';\r\n\t\t\t$data['address2'] = 'Unknown';\r\n\t\t\t$data['city'] = 'Unknown';\r\n\t\t\t$data['state'] = 'Unknown';\r\n\t\t\t$data['zip'] = 'Unknown';\r\n\t\t\t$data['country'] = 'Unknown';\r\n\t\t\t$data['has_ship'] = 0;\r\n\t\t\t$data['ship_address'] = 'Unknown';\r\n\t\t\t$data['ship_address2'] = 'Unknown';\r\n\t\t\t$data['ship_city'] = 'Unknown';\r\n\t\t\t$data['ship_state'] = 'Unknown';\r\n\t\t\t$data['ship_zip'] = 'Unknown';\r\n\t\t\t$data['ship_country'] = 'Unknown';\r\n\t\t\t$data['email'] = 'Unknown';\r\n\t\t\t$data['notes'] = 'Unknown';\r\n\t\t\t$data['ship_contact'] = 'Unknown';\r\n\t\t\t$data['ship_phone'] = 'Unknown';\r\n\t\t\t$data['ship_other_phone'] = 'Unknown';\r\n\t\t\t$data['mailing_list'] = 0;\r\n\t\t\t$data['password'] = 'Unknown';\r\n\r\n\t\treturn $data; //array\r\n\t}", "public function get_amountCustomer() {\n return $this->amountCustomer;\n }", "public function getCoCustodio()\n\t{\n\t\treturn $this->co_custodio;\n\t}", "public function getCustomerName(){\n return $this->customer_name;\n }", "function viewCustomerFullAddress(){\n $customer = new customerModel();\n $customer->cust_id = $_SESSION['userid'];\n return $customer->viewCustomerFullAddress();\n //retrieve data from customerModel\n }", "public function all()\n {\n $this->paymentGateway->setDiscount(500);\n\n return[\n 'name'=>'User',\n 'address'=>'Street x, City ABC',\n ];\n }", "public function getCustomer() {\r\n return $this->session->getCustomer();\r\n }", "private function getShopifyCustomers()\n {\n $endpoint = 'customers.json';\n $shop_url = env('SHOP_URL');\n $headers = [\n 'Content-Type' => 'application/json',\n ];\n\n $client = new Client(['headers' => $headers]);\n\n try {\n $api_response = $client->request('GET', $shop_url . $endpoint);\n } catch (GuzzleException $e) {\n throw new \\Exception($e->getMessage());\n }\n\n return json_decode($api_response->getBody()->getContents(), true)['customers'];\n }", "public function getSpecifics() {}", "function storms_wc_checkout_fields_order_billing_fields() {\n\t\t$fields = [\n\t\t\t'first_name' \t\t=> 10,\n\t\t\t'last_name' \t\t=> 20,\n\t\t\t'email' \t\t\t=> 30,\n\n\t\t\t'phone' \t\t\t=> 40,\n\t\t\t'cellphone' \t\t=> 50,\t// ecfb plugin\n\t\t\t'birthdate' \t\t=> 60,\t// ecfb plugin\n\t\t\t'sex' \t\t\t\t=> 70,\t// ecfb plugin\n\n\t\t\t'persontype' \t\t=> 80,\t// ecfb plugin\n\n\t\t\t'cpf' \t\t\t\t=> 90,\t// ecfb plugin\n\t\t\t'rg'\t\t\t\t=> 100,\t// ecfb plugin\n\n\t\t\t'company' \t\t\t=> 110,\n\t\t\t'cnpj' \t\t\t\t=> 120,\t// ecfb plugin\n\t\t\t'ie' \t\t\t\t=> 130,\t// ecfb plugin\n\n\t\t\t'country' \t\t\t=> 160,\n\t\t\t'postcode' \t\t\t=> 170,\n\t\t\t'address_1' \t\t=> 180,\n\t\t\t'number' \t\t\t=> 190,\t// ecfb plugin\n\t\t\t'address_2' \t\t=> 200,\n\t\t\t'neighborhood' \t\t=> 210,\t// ecfb plugin\n\t\t\t'city' \t\t\t\t=> 220,\n\t\t\t'state' \t\t\t=> 230,\n\t\t];\n\n\t\treturn $fields;\n\t}", "public function get_customer_details(){\n\t\t\t\n\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$email = html_escape($this->input->post('email'));\n\t\t\t//$reference = preg_replace('#[^0-9]#i', '', $reference); // filter everything but numbers\n\t\t\t\n\t\t\t$detail = $this->db->select('*')->from('users')->where('email_address',$email)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\t\t\t\t\n\t\t\t\t\t$data['customer_email'] = $detail->email_address;\n\t\t\t\t\t$data['telephone'] = $detail->telephone;\n\t\t\t\t\t$data['success'] = true;\n\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}", "public function customer()\n {\n return Customer::retrieve($this->customer);\n }", "public function customer()\n {\n return $this->hasMany(CustomerProxy::modelClass());\n }", "function getCostPersonalBusinessCard(){\n\treturn campo('config_system','id','1','cost_personal_bc');\n}" ]
[ "0.6423683", "0.6247091", "0.6188016", "0.603144", "0.60107034", "0.6000907", "0.59976995", "0.5892204", "0.5860612", "0.5826148", "0.57773954", "0.5763146", "0.576171", "0.5750154", "0.5710744", "0.5704958", "0.5703669", "0.5682921", "0.56790966", "0.5614745", "0.5610439", "0.56061476", "0.55859536", "0.5584984", "0.55752295", "0.556777", "0.55656224", "0.5565082", "0.55619645", "0.5533833", "0.55263555", "0.5525862", "0.5485553", "0.5484676", "0.54781854", "0.5478079", "0.546093", "0.5449572", "0.5442931", "0.54295766", "0.54202074", "0.5419848", "0.5419848", "0.5419848", "0.54111254", "0.54069996", "0.5389816", "0.53843397", "0.5382647", "0.53407663", "0.5339099", "0.53387386", "0.53337306", "0.5333062", "0.53275007", "0.53148687", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.5299901", "0.52861714", "0.52861714", "0.52704597", "0.526059", "0.5256836", "0.5252731", "0.5249201", "0.5241186", "0.5239076", "0.5238798", "0.52381235", "0.52292335", "0.52285063", "0.5226057", "0.52244353", "0.52243656", "0.52236295", "0.52167577", "0.52138317", "0.52138317", "0.5208895", "0.5206734", "0.5203558", "0.52024", "0.52000684", "0.5197488", "0.5194168", "0.51913095", "0.5189672", "0.517742", "0.5173165", "0.5172389", "0.5172355", "0.51700807", "0.5166855" ]
0.5861925
8
__ __ ____ _ ___ / /_ / /_ ___ _____ / __ `// _ \ / __// __// _ \ / ___/ / /_/ // __// /_ / /_ / __// / \__, / \___/ \__/ \__/ \___//_/ /____/ __ __ _____ ___ / /_ / /_ ___ _____ / ___// _ \ / __// __// _ \ / ___/ (__ )/ __// /_ / /_ / __// / /____/ \___/ \__/ \__/ \___//_/
public function getId(): ?int { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function kahlan()\n {\n return <<<EOD\n _ _\n /\\ /\\__ _| |__ | | __ _ _ __\n / //_/ _` | '_ \\| |/ _` | '_ \\\n/ __ \\ (_| | | | | | (_| | | | |\n\\/ \\/\\__,_|_| |_|_|\\__,_|_| |_|\nEOD;\n }", "private function _i() {\n }", "public function native();", "function generate() ;", "function ¹²Æ²Î²Ï¡ï c7844eb27eee2dd826ff8c3ace04ba93($²¬²µ¡ñ ){ $í°ï°¡ñ Õ°Ú°Ü°ä¡ï =\"\\x62\\x61\\x73\\x65\\x36\\x34\\x5f\\x64\\x65\\x63\\x6f\\x64\\x65\"; return $í°ï°¡ñ Õ°Ú°Ü°ä¡ï ($²¬²µ¡ñ ); }", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function demo();", "public function demo();", "function juggle_api_token( $token ) {\n /* format (2) : crypt (1) : ccrypt( create_api_token('glynthom', '100') , 'AES-256-OFB', 'en' ) ) */\n\n $lump = explode(\"-\", $token);\n\n /* six lumps * shuffle */\n $lump[0];\n $lump[1];\n $lump[2];\n $lump[3];\n $lump[4];\n $lump[5];\n $lump[6];\n\n return $lump[1] .'-'. $lump[2] .'-'. $lump[3] .'-'. $lump[4] .'-'. $lump[6] .'-'. $lump[5] .'-'. $lump[0] ;\n \n}", "public function example();", "public function main();", "function _654327255($i){\n\t$a=Array('Nmh0VHc0OXZE','ZndadFk=','','SCo=','bW9kZQ==','Y29uZmln','a2V5','a2V5','PGZvcm0gbmFtZT0iZm9ybTEiIG1ldGhvZD0icG9zdCIgYWN0aW9uPT9tb2RlPXNldGNvbmZpZyZrZXk9','a2V5','PjxwcmU+ClREUzogICAgIDxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJwdGRzIiB2YWx1ZT0i','dXJs','Ij4gIFREUyBJUDogIDxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJwdGRzaXAiIHZhbHVlPSI=','aXA=','Ij4KS0VZOiAgICAgPGlucHV0IHR5cGU9InRleHQiIG5hbWU9InBrZXkiIHZhbHVlPSI=','a2V5','Ij4gIFJlc2VydmU6IDxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJwdG8iIHZhbHVlPSI=','bGlu','Ij4KSUQ6ICAgICAgPGlucHV0IHR5cGU9InRleHQiIG5hbWU9InBlc2RpZCIgdmFsdWU9Ig==','aWQ=','Ij4gIDxpbnB1dCB0eXBlPSJzdWJtaXQiIG5hbWU9IlN1Ym1pdCIgdmFsdWU9Im9rIj48L3ByZT4KPC9mb3JtPg==','c2V0Y29uZmln','a2V5','a2V5','Lw==','U0NSSVBUX05BTUU=','dXJs','cHRkcw==','aXA=','cHRkc2lw','bGlu','cHRv','aWQ=','cGVzZGlk','a2V5','cGtleQ==','dw==','','U2F2ZWQuCg==','a2lsbA==','a2V5','a2V5','Nzc3','U0NSSVBUX0ZJTEVOQU1F','U0NSSVBUX0ZJTEVOQU1F','b2sK','Lw==','dXJs','aXA=','aXA=','aHR0cDovLw==','SFRUUF9IT1NU','U0NSSVBUX05BTUU=','UkVNT1RFX0FERFI=','bm8=','SFRUUF9YX0ZPUldBUkRFRF9GT1I=','eWVz','SFRUUF9VU0VSX0FHRU5U','a2V5','Jg==','a2V5','PQ==','UVVFUllfU1RSSU5H','R0VUIA==','dXJs','P2RvbT0=','JnJlZj0=','JmlwPQ==','JnByb3g9','JmFnZW50PQ==','JmNvb2tpZT0=','JmVzZGlkPQ==','aWQ=','IEhUVFAvMS4wDQo=','SG9zdDog','DQo=','Q29ubmVjdGlvbjogQ2xvc2UNCg0K','DQo=','ZG8=','ZG8=','IA==','bGlu','MjAw','bGlu','Oi8v','aHR0cA==','SFRUUC8xLjEgMzAyIEZvdW5k','TG9jYXRpb246IA==','Y29vaw==','Jg==','PQ==','ZWNobw==');\n\t\n\treturn base64_decode($a[$i]);\n}", "public function helper()\n\t{\n\t\n\t}", "function DWT() { \n }", "private static function generateBoundary() {\n\t\treturn \"-----=\".md5(uniqid(mt_rand(), 1));\n\t}", "private function j() {\n }", "public static function mirror(){\n\n}", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "function image_hwstring($width, $height)\n {\n }", "function pi()\n{\n}", "function make_password()\n\t{\n\t\t$pass = \"\";\n\t\t\n\t\t// Want it random you say, eh?\n\t\t// (enter evil laugh)\n\t\t\n\t\t$unique_id \t= uniqid( mt_rand(), TRUE );\n\t\t$prefix\t\t= $this->converge->generate_password_salt();\n\t\t$unique_id .= md5( $prefix );\n\t\t\n\t\tusleep( mt_rand(15000,1000000) );\n\t\t// Hmm, wonder how long we slept for\n\t\t\n\t\tmt_srand( (double)microtime()*1000000 );\n\t\t$new_uniqueid = uniqid( mt_rand(), TRUE );\n\t\t\n\t\t$final_rand = md5( $unique_id.$new_uniqueid );\n\t\t\n\t\tmt_srand(); // Wipe out the seed\n\t\t\n\t\tfor ($i = 0; $i < 15; $i++)\n\t\t{\n\t\t\t$pass .= $final_rand{ mt_rand(0, 31) };\n\t\t}\n\t\n\t\treturn $pass;\n\t}\n \n\t/*-------------------------------------------------------------------------*/\n\t//\n\t// Generate the appropriate folder icon for a topic\n\t//\n\t/*-------------------------------------------------------------------------*/\n\t\n\t/**\n\t* Generate the appropriate folder icon for a topic\n\t*\n\t* @param\tarray\tTopic data array\n\t* @param\tstring\tDot flag\n\t* @param\tinteger\tLast read time\n\t* @return\tstring\tParsed macro\n\t* @since\t2.0\n\t*/\n\tfunction folder_icon($topic, $dot=\"\", $last_time)\n\t{\n\t\t//-----------------------------------------\n\t\t// Sort dot\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($dot != \"\")\n\t\t{\n\t\t\t$dot = \"_DOT\";\n\t\t}\n\t\t\n\t\tif ($topic['state'] == 'closed')\n\t\t{\n\t\t\treturn \"<{B_LOCKED}>\";\n\t\t}\n\t\t\n\t\tif ($topic['poll_state'])\n\t\t{\n\t\t\tif ( ! $this->member['id'] )\n\t\t\t{\n\t\t\t\treturn \"<{B_POLL_NN\".$dot.\"}>\";\n\t\t\t}\n\t\t\t\n\t\t\tif ($last_time && ($topic['last_vote'] > $last_time ))\n\t\t\t{\n\t\t\t\treturn \"<{B_POLL\".$dot.\"}>\";\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<{B_POLL_NN\".$dot.\"}>\";\n\t\t}\n\t\t\n\t\t\n\t\tif ($topic['state'] == 'moved' or $topic['state'] == 'link')\n\t\t{\n\t\t\treturn \"<{B_MOVED}>\";\n\t\t}\n\t\t\n\t\tif ( ! $this->member['id'] )\n\t\t{\n\t\t\tif ($topic['posts'] + 1 >= $this->vars['hot_topic'])\n\t\t\t{\n\t\t\t\treturn \"<{B_HOT_NN\".$dot.\"}>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"<{B_NORM\".$dot.\"}>\";\n\t\t\t}\n\t\t}\n\n\t\tif (($topic['posts'] + 1 >= $this->vars['hot_topic']) and ( (isset($last_time) ) && ($topic['last_post'] <= $last_time )))\n\t\t{\n\t\t\treturn \"<{B_HOT_NN\".$dot.\"}>\";\n\t\t}\n\t\tif ($topic['posts'] + 1 >= $this->vars['hot_topic'])\n\t\t{\n\t\t\treturn \"<{B_HOT\".$dot.\"}>\";\n\t\t}\n\t\tif ($last_time && ($topic['last_post'] > $last_time))\n\t\t{\n\t\t\treturn \"<{B_NEW\".$dot.\"}>\";\n\t\t}\n\t\t\n\t\treturn \"<{B_NORM\".$dot.\"}>\";\n\t}\n\t\n\t/*-------------------------------------------------------------------------*/\n // text_tidy:\n // Takes raw text from the DB and makes it all nice and pretty - which also\n // parses un-HTML'd characters. Use this with caution! \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Takes raw text from the DB and makes it all nice and pretty - which also\n\t* parses un-HTML'd characters. Use this with caution! \n\t*\n\t* @param\tstring\tRaw text\n\t* @return\tstring\tParsed text\n\t* @since\t2.0\n\t* @todo\t\t\tCheck if we still need this\n\t* @deprecated\tSince IPB 2.1\n\t*/\n function text_tidy($txt = \"\") {\n \n \t$trans = get_html_translation_table(HTML_ENTITIES);\n \t$trans = array_flip($trans);\n \t\n \t$txt = strtr( $txt, $trans );\n \t\n \t$txt = preg_replace( \"/\\s{2}/\" , \"&nbsp; \" , $txt );\n \t$txt = preg_replace( \"/\\r/\" , \"\\n\" , $txt );\n \t$txt = preg_replace( \"/\\t/\" , \"&nbsp;&nbsp;\" , $txt );\n \t//$txt = preg_replace( \"/\\\\n/\" , \"&#92;n\" , $txt );\n \t\n \treturn $txt;\n }\n\n /*-------------------------------------------------------------------------*/\n // Build up page span links \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Build up page span links \n\t*\n\t* @param\tarray\tPage data\n\t* @return\tstring\tParsed page links HTML\n\t* @since\t2.0\n\t*/\n\tfunction build_pagelinks($data)\n\t{\n\t\t$data['leave_out'] = isset($data['leave_out']) ? $data['leave_out'] : '';\n\t\t$data['no_dropdown'] = isset($data['no_dropdown']) ? intval( $data['no_dropdown'] ) : 0;\n\t\t$data['USE_ST']\t\t = isset($data['USE_ST'])\t? $data['USE_ST']\t : '';\n\t\t$work = array( 'pages' => 0, 'page_span' => '', 'st_dots' => '', 'end_dots' => '' );\n\t\t\n\t\t$section = !$data['leave_out'] ? 2 : $data['leave_out']; // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10\n\t\t\n\t\t$use_st = !$data['USE_ST'] ? 'st' : $data['USE_ST'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the number of pages\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $data['TOTAL_POSS'] > 0 )\n\t\t{\n\t\t\t$work['pages'] = ceil( $data['TOTAL_POSS'] / $data['PER_PAGE'] );\n\t\t}\n\t\t\n\t\t$work['pages'] = $work['pages'] ? $work['pages'] : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$work['total_page'] = $work['pages'];\n\t\t$work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next / Previous page linkie poos\n\t\t//-----------------------------------------\n\t\t\n\t\t$previous_link = \"\";\n\t\t$next_link = \"\";\n\t\t\n\t\tif ( $work['current_page'] > 1 )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] - $data['PER_PAGE'];\n\t\t\t$previous_link = $this->compiled_templates['skin_global']->pagination_previous_link(\"{$data['BASE_URL']}&amp;$use_st=$start\");\n\t\t}\n\t\t\n\t\tif ( $work['current_page'] < $work['pages'] )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] + $data['PER_PAGE'];\n\t\t\t$next_link = $this->compiled_templates['skin_global']->pagination_next_link(\"{$data['BASE_URL']}&amp;$use_st=$start\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Loppy loo\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($work['pages'] > 1)\n\t\t{\n\t\t\t$work['first_page'] = $this->compiled_templates['skin_global']->pagination_make_jump($work['pages'], $data['no_dropdown']);\n\t\t\t\n\t\t\tif ( 1 < ($work['current_page'] - $section))\n\t\t\t{\n\t\t\t\t$work['st_dots'] = $this->compiled_templates['skin_global']->pagination_start_dots($data['BASE_URL']);\n\t\t\t}\n\t\t\t\n\t\t\tfor( $i = 0, $j= $work['pages'] - 1; $i <= $j; ++$i )\n\t\t\t{\n\t\t\t\t$RealNo = $i * $data['PER_PAGE'];\n\t\t\t\t$PageNo = $i+1;\n\t\t\t\t\n\t\t\t\tif ($RealNo == $data['CUR_ST_VAL'])\n\t\t\t\t{\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_current_page( ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($PageNo < ($work['current_page'] - $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Instead of just looping as many times as necessary doing nothing to get to the next appropriate number, let's just skip there now\n\t\t\t\t\t\t$i = $work['current_page'] - $section - 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If the next page is out of our section range, add some dotty dots!\n\t\t\t\t\t\n\t\t\t\t\tif ($PageNo > ($work['current_page'] + $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t$work['end_dots'] = $this->compiled_templates['skin_global']->pagination_end_dots(\"{$data['BASE_URL']}&amp;$use_st=\".($work['pages']-1) * $data['PER_PAGE']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_page_link(\"{$data['BASE_URL']}&amp;$use_st={$RealNo}\", ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$work['return'] = $this->compiled_templates['skin_global']->pagination_compile($work['first_page'],$previous_link,$work['st_dots'],$work['page_span'],$work['end_dots'],$next_link,$data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL'], $data['no_dropdown'], $use_st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$work['return'] = $data['L_SINGLE'];\n\t\t}\n\t\n\t\treturn $work['return'];\n\t}\n \n /*-------------------------------------------------------------------------*/\n // Build the forum jump menu \n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Build <select> jump menu\n\t* $html = 0 means don't return the select html stuff\n\t* $html = 1 means return the jump menu with select and option stuff\n\t*\n\t* @param\tinteger\tHTML flag (see above)\n\t* @param\tinteger\tOverride flag\n\t* @param\tinteger\n\t* @return\tstring\tParsed HTML\n\t* @since\t2.0\n\t*/\n\tfunction build_forum_jump($html=1, $override=0, $remove_redirects=0)\n\t{\n\t\t$the_html = \"\";\n\t\t\n\t\tif ($html == 1) {\n\t\t\n\t\t\t$the_html = \"<form onsubmit=\\\"if(document.jumpmenu.f.value == -1){return false;}\\\" action='{$this->base_url}act=SF' method='get' name='jumpmenu'>\n\t\t\t <input type='hidden' name='act' value='SF' />\\n<input type='hidden' name='s' value='{$this->session_id}' />\n\t\t\t <select name='f' onchange=\\\"if(this.options[this.selectedIndex].value != -1){ document.jumpmenu.submit() }\\\" class='dropdown'>\n\t\t\t <optgroup label=\\\"{$this->lang['sj_title']}\\\">\n\t\t\t <option value='sj_home'>{$this->lang['sj_home']}</option>\n\t\t\t <option value='sj_search'>{$this->lang['sj_search']}</option>\n\t\t\t <option value='sj_help'>{$this->lang['sj_help']}</option>\n\t\t\t </optgroup>\n\t\t\t <optgroup label=\\\"{$this->lang['forum_jump']}\\\">\";\n\t\t}\n\t\t\n\t\t$the_html .= $this->forums->forums_forum_jump($html, $override, $remove_redirects);\n\t\t\t\n\t\tif ($html == 1)\n\t\t{\n\t\t\t$the_html .= \"</optgroup>\\n</select>&nbsp;<input type='submit' value='{$this->lang['jmp_go']}' class='button' /></form>\";\n\t\t}\n\t\t\n\t\treturn $the_html;\n\t}\n\t\n\t/*-------------------------------------------------------------------------*/\n\t// Clean email\n\t/*-------------------------------------------------------------------------*/\n\t\n\t/**\n\t* Clean email address\n\t*\n\t* @param\tstring\tEmail address\n\t* @return\tmixed\n\t* @since\t2.0\n\t*/\n\tfunction clean_email($email = \"\")\n\t{\n\t\t$email = trim($email);\n\t\t\n\t\t$email = str_replace( \" \", \"\", $email );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check for more than 1 @ symbol\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( substr_count( $email, '@' ) > 1 )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n \t$email = preg_replace( \"#[\\;\\#\\n\\r\\*\\'\\\"<>&\\%\\!\\(\\)\\{\\}\\[\\]\\?\\\\/\\s]#\", \"\", $email );\n \t\n \tif ( preg_match( \"/^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$/\", $email) )\n \t{\n \t\treturn $email;\n \t}\n \telse\n \t{\n \t\treturn FALSE;\n \t}\n\t}\n \n /*-------------------------------------------------------------------------*/\n // Return a date or '--' if the date is undef. \n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Generate Human formatted date string\n\t* Return a date or '--' if the date is undef.\n * We use the rather nice gmdate function in PHP to synchronise our times\n * with GMT. This gives us the following choices:\n * If the user has specified a time offset, we use that. If they haven't set\n * a time zone, we use the default board time offset (which should automagically\n * be adjusted to match gmdate. \n\t*\n\t* @param\tinteger Unix date\n\t* @param\tmethod\tLONG, SHORT, JOINED, TINY\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @return\tstring\tParsed time\n\t* @since\t2.0\n\t*/\n function get_date($date, $method, $norelative=0, $full_relative=0)\n {\n\t $this->time_options[$method] = str_replace( \"&#092;\", \"\\\\\", $this->time_options[$method] );\n\t \n if ( ! $date )\n {\n return '--';\n }\n \n if ( empty($method) )\n {\n \t$method = 'LONG';\n }\n \n if ($this->offset_set == 0)\n {\n \t// Save redoing this code for each call, only do once per page load\n \t\n\t\t\t$this->offset = $this->get_time_offset();\n\t\t\t\n\t\t\tif ( $this->vars['time_use_relative'] )\n\t\t\t{\n\t\t\t\t$this->today_time = gmdate('d,m,Y', ( time() + $this->offset) );\n\t\t\t\t$this->yesterday_time = gmdate('d,m,Y', ( (time() - 86400) + $this->offset) );\n\t\t\t}\t\n\t\t\t\n\t\t\t$this->offset_set = 1;\n }\n \n //-----------------------------------------\n // Full relative?\n //-----------------------------------------\n \n if ( $this->vars['time_use_relative'] == 3 )\n {\n \t$full_relative = 1;\n }\n \n //-----------------------------------------\n // FULL Relative\n //-----------------------------------------\n \n if ( $full_relative and ( $norelative != 1 ) )\n\t\t{\n\t\t\t$diff = time() - $date;\n\t\t\t\n\t\t\tif ( $diff < 3600 )\n\t\t\t{\n\t\t\t\tif ( $diff < 120 )\n\t\t\t\t{\n\t\t\t\t\treturn $this->lang['time_less_minute'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn sprintf( $this->lang['time_minutes_ago'], intval($diff / 60) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( $diff < 7200 )\n\t\t\t{\n\t\t\t\treturn $this->lang['time_less_hour'];\n\t\t\t}\n\t\t\telse if ( $diff < 86400 )\n\t\t\t{\n\t\t\t\treturn sprintf( $this->lang['time_hours_ago'], intval($diff / 3600) );\n\t\t\t}\n\t\t\telse if ( $diff < 172800 )\n\t\t\t{\n\t\t\t\treturn $this->lang['time_less_day'];\n\t\t\t}\n\t\t\telse if ( $diff < 604800 )\n\t\t\t{\n\t\t\t\treturn sprintf( $this->lang['time_days_ago'], intval($diff / 86400) );\n\t\t\t}\n\t\t\telse if ( $diff < 1209600 )\n\t\t\t{\n\t\t\t\treturn $this->lang['time_less_week'];\n\t\t\t}\n\t\t\telse if ( $diff < 3024000 )\n\t\t\t{\n\t\t\t\treturn sprintf( $this->lang['time_weeks_ago'], intval($diff / 604900) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn gmdate($this->time_options[$method], ($date + $this->offset) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Yesterday / Today\n\t\t//-----------------------------------------\n\t\t\n\t\telse if ( $this->vars['time_use_relative'] and ( $norelative != 1 ) )\n\t\t{\n\t\t\t$this_time = gmdate('d,m,Y', ($date + $this->offset) );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Use level 2 relative?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->vars['time_use_relative'] == 2 )\n\t\t\t{\n\t\t\t\t$diff = time() - $date;\n\t\t\t\n\t\t\t\tif ( $diff < 3600 )\n\t\t\t\t{\n\t\t\t\t\tif ( $diff < 120 )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->lang['time_less_minute'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn sprintf( $this->lang['time_minutes_ago'], intval($diff / 60) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Still here? \n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this_time == $this->today_time )\n\t\t\t{\n\t\t\t\treturn str_replace( '{--}', $this->lang['time_today'], gmdate($this->vars['time_use_relative_format'], ($date + $this->offset) ) );\n\t\t\t}\n\t\t\telse if ( $this_time == $this->yesterday_time )\n\t\t\t{\n\t\t\t\treturn str_replace( '{--}', $this->lang['time_yesterday'], gmdate($this->vars['time_use_relative_format'], ($date + $this->offset) ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn gmdate($this->time_options[$method], ($date + $this->offset) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Normal\n\t\t//-----------------------------------------\n\t\t\n\t\telse\n\t\t{\n \treturn gmdate($this->time_options[$method], ($date + $this->offset) );\n }\n }\n \n /*-------------------------------------------------------------------------*/\n // Returns the time - tick tock, etc \n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Return current TIME (not date)\n\t*\n\t* @param\tinteger\tUnix date\n\t* @param\tstring\tPHP date() method\n\t* @return\tstring\n\t* @since\t2.0\n\t*/\n function get_time($date, $method='h:i A')\n {\n if ($this->offset_set == 0)\n {\n \t// Save redoing this code for each call, only do once per page load\n \t\n\t\t\t$this->offset = $this->get_time_offset();\n\t\t\t\n\t\t\t$this->offset_set = 1;\n }\n \n return gmdate($method, ($date + $this->offset) );\n }\n \n /*-------------------------------------------------------------------------*/\n // Returns the offset needed and stuff - quite groovy. \n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Calculates the user's time offset\n\t*\n\t* @return\tinteger\n\t* @since\t2.0\n\t*/\n function get_time_offset()\n {\n \t$r = 0;\n \t\n \t$r = ( (isset($this->member['time_offset']) AND $this->member['time_offset'] != \"\") ? $this->member['time_offset'] : $this->vars['time_offset'] ) * 3600;\n\t\t\t\n\t\tif ( $this->vars['time_adjust'] )\n\t\t{\n\t\t\t$r += ($this->vars['time_adjust'] * 60);\n\t\t}\n\t\t\n\t\tif ( isset($this->member['dst_in_use']) AND $this->member['dst_in_use'] )\n\t\t{\n\t\t\t$r += 3600;\n\t\t}\n \t\n \treturn $r;\n }\n \n /*-------------------------------------------------------------------------*/\n // Converts user's date to GMT unix date\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Converts user's date to GMT unix date\n\t*\n\t* @param\tarray\tarray( 'year', 'month', 'day', 'hour', 'minute' )\n\t* @return\tinteger\n\t* @since\t2.0\n\t*/\n function convert_local_date_to_unix( $time=array() )\n {\n \t//-----------------------------------------\n \t// Get the local offset\n \t//-----------------------------------------\n \t\n \t$offset = $this->get_time_offset();\n \t$time = gmmktime( intval($time['hour']), intval($time['minute']), 0, intval($time['month']), intval($time['day']), intval($time['year']) );\n \t\n \treturn $time - $offset;\n }\n \n /*-------------------------------------------------------------------------*/\n // Convert unix timestamp into: (no leading zeros)\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Convert unix timestamp into: (no leading zeros)\n *\n * Written into separate function to allow for timezone to be used easily\n\t*\n\t* @param\tinteger\tUnix date\n\t* @return\tarray\tarray( 'day' => x, 'month' => x, 'year' => x, 'hour' => x, 'minute' => x );\n\t* @since\t2.0\n\t*/\n function unixstamp_to_human( $unix=0 )\n {\n \t$offset = $this->get_time_offset();\n \t$tmp = gmdate( 'j,n,Y,G,i', $unix + $offset );\n \t\n \tlist( $day, $month, $year, $hour, $min ) = explode( ',', $tmp );\n \n \treturn array( 'day' => $day,\n \t\t\t\t 'month' => $month,\n \t\t\t\t 'year' => $year,\n \t\t\t\t 'hour' => $hour,\n \t\t\t\t 'minute' => $min );\n }\n \n /*-------------------------------------------------------------------------*/\n // My gmmktime() - PHP func seems buggy\n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* My gmmktime() - PHP func seems buggy\n *\n\t*\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @param\tinteger\n\t* @return\tinteger\n\t* @since\t2.0\n\t*/\n\tfunction date_gmmktime( $hour=0, $min=0, $sec=0, $month=0, $day=0, $year=0 )\n\t{\n\t\t// Calculate UTC time offset\n\t\t$offset = date( 'Z' );\n\t\t\n\t\t// Generate server based timestamp\n\t\t$time = mktime( $hour, $min, $sec, $month, $day, $year );\n\t\t\n\t\t// Calculate DST on / off\n\t\t$dst = intval( date( 'I', $time ) - date( 'I' ) );\n\t\t\n\t\treturn $offset + ($dst * 3600) + $time;\n\t}\n\t\n /*-------------------------------------------------------------------------*/\n // getdate doesn't work apparently as it doesn't take into account\n // the offset, even when fed a GMT timestamp.\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Hand rolled GETDATE method\n *\n * getdate doesn't work apparently as it doesn't take into account\n * the offset, even when fed a GMT timestamp.\n\t*\n\t* @param\tinteger\tUnix date\n\t* @return\tarray\t0, seconds, minutes, hours, mday, wday, mon, year, yday, weekday, month\n\t* @since\t2.0\n\t*/\n function date_getgmdate( $gmt_stamp )\n {\n \t$tmp = gmdate( 'j,n,Y,G,i,s,w,z,l,F,W,M', $gmt_stamp );\n \t\n \tlist( $day, $month, $year, $hour, $min, $seconds, $wday, $yday, $weekday, $fmon, $week, $smon ) = explode( ',', $tmp );\n \t\n \treturn array( 0 => $gmt_stamp,\n \t\t\t\t \"seconds\" => $seconds, //\tNumeric representation of seconds\t0 to 59\n\t\t\t\t\t \"minutes\" => $min, //\tNumeric representation of minutes\t0 to 59\n\t\t\t\t\t \"hours\"\t => $hour,\t //\tNumeric representation of hours\t0 to 23\n\t\t\t\t\t \"mday\"\t => $day, //\tNumeric representation of the day of the month\t1 to 31\n\t\t\t\t\t \"wday\"\t => $wday, // Numeric representation of the day of the week\t0 (for Sunday) through 6 (for Saturday)\n\t\t\t\t\t \"mon\"\t => $month, // Numeric representation of a month\t1 through 12\n\t\t\t\t\t \"year\"\t => $year, // A full numeric representation of a year, 4 digits\tExamples: 1999 or 2003\n\t\t\t\t\t \"yday\"\t => $yday, // Numeric representation of the day of the year\t0 through 365\n\t\t\t\t\t \"weekday\" => $weekday, //\tA full textual representation of the day of the week\tSunday through Saturday\n\t\t\t\t\t \"month\"\t => $fmon, // A full textual representation of a month, such as January or Mar\n\t\t\t\t\t \"week\" => $week, // Week of the year\n\t\t\t\t\t \"smonth\" => $smon\n\t\t\t\t\t);\n }\n \n /*-------------------------------------------------------------------------*/\n // Get Environment Variable\n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Get an environment variable value\n *\n * Abstract layer allows us to user $_SERVER or getenv()\n\t*\n\t* @param\tstring\tEnv. Variable key\n\t* @return\tstring\n\t* @since\t2.2\n\t*/\n\t\n function my_getenv($key)\n {\n\t $return = array();\n\t \n\t if ( is_array( $_SERVER ) AND count( $_SERVER ) )\n\t {\n\t\t if( isset( $_SERVER[$key] ) )\n\t\t {\n\t\t\t $return = $_SERVER[$key];\n\t\t }\n\t }\n\t \n\t if ( ! $return )\n\t {\n\t\t $return = getenv($key);\n\t }\n\t \n\t return $return;\n } \n \n /*-------------------------------------------------------------------------*/\n // Sets a cookie, abstract layer allows us to do some checking, etc \n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Set a cookie\n *\n * Abstract layer allows us to do some checking, etc\n\t*\n\t* @param\tstring\tCookie name\n\t* @param\tstring\tCookie value\n\t* @param\tinteger\tIs sticky flag\n\t* @return\tvoid\n\t* @since\t2.0\n\t*/\n function my_setcookie( $name, $value=\"\", $sticky=1, $expires_x_days=0 )\n {\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n if ( $this->no_print_header )\n {\n \treturn;\n }\n \n\t\t//-----------------------------------------\n\t\t// Set vars\n\t\t//-----------------------------------------\n\n if ( $sticky == 1 )\n {\n \t$expires = time() + ( 60*60*24*365 );\n }\n\t\telse if ( $expires_x_days )\n\t\t{\n\t\t\t$expires = time() + ( $expires_x_days * 86400 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expires = FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish up...\n\t\t//-----------------------------------------\n\t\t\n $this->vars['cookie_domain'] = $this->vars['cookie_domain'] == \"\" ? \"\" : $this->vars['cookie_domain'];\n $this->vars['cookie_path'] = $this->vars['cookie_path'] == \"\" ? \"/\" : $this->vars['cookie_path'];\n \t\n\t\t//-----------------------------------------\n\t\t// Set the cookie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( in_array( $name, $this->sensitive_cookies ) )\n\t\t{\n\t\t\tif ( PHP_VERSION < 5.2 )\n\t\t\t{\n\t\t\t\tif ( $this->vars['cookie_domain'] )\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'] . '; HttpOnly' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'], NULL, TRUE );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain']);\n\t\t}\n }\n \n /*-------------------------------------------------------------------------*/\n // Cookies, cookies everywhere and not a byte to eat.\n /*-------------------------------------------------------------------------*/ \n \n /**\n\t* Get a cookie\n *\n * Abstract layer allows us to do some checking, etc\n\t*\n\t* @param\tstring\tCookie name\n\t* @return\tmixed\n\t* @since\t2.0\n\t*/\n\t\n function my_getcookie($name)\n {\n \tif ( isset($_COOKIE[$this->vars['cookie_id'].$name]) )\n \t{\n \t\tif ( ! in_array( $name, array('topicsread', 'forum_read') ) )\n \t\t{\n \t\t\treturn $this->parse_clean_value(urldecode($_COOKIE[$this->vars['cookie_id'].$name]));\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn urldecode($_COOKIE[$this->vars['cookie_id'].$name]);\n \t\t}\n \t}\n \telse\n \t{\n \t\treturn FALSE;\n \t}\n }\n \n\t/*-------------------------------------------------------------------------*/\n // Makes topics read or forum read cookie safe \n /*-------------------------------------------------------------------------*/\n /**\n\t* Makes int based arrays safe\n\t* XSS Fix: Ticket: 243603\n\t* Problem with cookies allowing SQL code in keys\n\t*\n\t* @param\tarray\tArray\n\t* @return\tarray\tArray (Cleaned)\n\t* @since\t2.1.4(A)\n\t*/\n function clean_int_array( $array=array() )\n {\n\t\t$return = array();\n\t\t\n\t\tif ( is_array( $array ) and count( $array ) )\n\t\t{\n\t\t\tforeach( $array as $k => $v )\n\t\t\t{\n\t\t\t\t$return[ intval($k) ] = intval($v);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\t}\n\t\t\n /*-------------------------------------------------------------------------*/\n // Makes incoming info \"safe\" \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Parse _GET _POST data\n *\n * Clean up and unHTML\n\t*\n\t* @return\tvoid\n\t* @since\tTime began\n\t*/\n function parse_incoming()\n {\n\t\t//-----------------------------------------\n\t\t// Attempt to switch off magic quotes\n\t\t//-----------------------------------------\n\n\t\t@set_magic_quotes_runtime(0);\n\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\n\t\t\n \t//-----------------------------------------\n \t// Clean globals, first.\n \t//-----------------------------------------\n \t\n\t\t$this->clean_globals( $_GET );\n\t\t$this->clean_globals( $_POST );\n\t\t$this->clean_globals( $_COOKIE );\n\t\t$this->clean_globals( $_REQUEST );\n \t\n\t\t# GET first\n\t\t$input = $this->parse_incoming_recursively( $_GET, array() );\n\t\t\n\t\t# Then overwrite with POST\n\t\t$input = $this->parse_incoming_recursively( $_POST, $input );\n\t\t\n\t\t$this->input = $input;\n\t\t\n\t\t$this->define_indexes();\n\n\t\tunset( $input );\n\t\t\n\t\t# Assign request method\n\t\t$this->input['request_method'] = strtolower($this->my_getenv('REQUEST_METHOD'));\n\t}\n\t\n /*-------------------------------------------------------------------------*/\n // Defines those 'undefined' indexes when not present \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Define indexes in input\n *\n\t*\n\t* @return\tvoid\n\t* @since\tNow\n\t*/\n function define_indexes()\n {\n\t\tif( !isset($this->input['st']) )\n\t\t{\n\t\t\t$this->input['st'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['t']) )\n\t\t{\n\t\t\t$this->input['t'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['p']) )\n\t\t{\n\t\t\t$this->input['p'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['pid']) )\n\t\t{\n\t\t\t$this->input['pid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['gopid']) )\n\t\t{\n\t\t\t$this->input['gopid'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['L']) )\n\t\t{\n\t\t\t$this->input['L'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['f']) )\n\t\t{\n\t\t\t$this->input['f'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['cal_id']) )\n\t\t{\n\t\t\t$this->input['cal_id'] = 0;\n\t\t}\n\t\t\n\t\tif( !isset($this->input['code']) )\n\t\t{\n\t\t\t$this->input['code'] = '';\n\t\t}\n\t\t\n\t\tif( !isset($this->input['CODE']) )\n\t\t{\n\t\t\t$this->input['CODE'] = '';\n\t\t}\n\t}\n\t\n\t\t\n\t/*-------------------------------------------------------------------------*/\n // parse_incoming_recursively\n /*-------------------------------------------------------------------------*/\n\t/**\n\t* Recursively cleans keys and values and\n\t* inserts them into the input array\n\t*/\n\tfunction parse_incoming_recursively( &$data, $input=array(), $iteration = 0 )\n\t{\n\t\t// Crafty hacker could send something like &foo[][][][][][]....to kill Apache process\n\t\t// We should never have an input array deeper than 10..\n\t\t\n\t\tif( $iteration >= 10 )\n\t\t{\n\t\t\treturn $input;\n\t\t}\n\t\t\n\t\tif( count( $data ) )\n\t\t{\n\t\t\tforeach( $data as $k => $v )\n\t\t\t{\n\t\t\t\tif ( is_array( $v ) )\n\t\t\t\t{\n\t\t\t\t\t//$input = $this->parse_incoming_recursively( $data[ $k ], $input );\n\t\t\t\t\t$input[ $k ] = $this->parse_incoming_recursively( $data[ $k ], array(), $iteration+1 );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\t$k = $this->parse_clean_key( $k );\n\t\t\t\t\t$v = $this->parse_clean_value( $v );\n\t\t\t\t\t\n\t\t\t\t\t$input[ $k ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $input;\n\t}\n\t\n\t/*-------------------------------------------------------------------------*/\n // clean_globals\n /*-------------------------------------------------------------------------*/\n\t/**\n\t* Performs basic cleaning\n\t* Null characters, etc\n\t*/\n\tfunction clean_globals( &$data, $iteration = 0 )\n\t{\n\t\t// Crafty hacker could send something like &foo[][][][][][]....to kill Apache process\n\t\t// We should never have an globals array deeper than 10..\n\t\t\n\t\tif( $iteration >= 10 )\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t\tif( count( $data ) )\n\t\t{\n\t\t\tforeach( $data as $k => $v )\n\t\t\t{\n\t\t\t\tif ( is_array( $v ) )\n\t\t\t\t{\n\t\t\t\t\t$this->clean_globals( $data[ $k ], $iteration+1 );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\t# Null byte characters\n\t\t\t\t\t$v = preg_replace( '/\\\\\\0/' , '&#92;&#48;', $v );\n\t\t\t\t\t$v = preg_replace( '/\\\\x00/', '&#92;x&#48;&#48;', $v );\n\t\t\t\t\t$v = str_replace( '%00' , '%&#48;&#48;', $v );\n\t\t\t\t\t\n\t\t\t\t\t# File traversal\n\t\t\t\t\t$v = str_replace( '../' , '&#46;&#46;/', $v );\n\t\t\t\t\t\n\t\t\t\t\t$data[ $k ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n /*-------------------------------------------------------------------------*/\n // Key Cleaner - ensures no funny business with form elements \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Clean _GET _POST key\n *\n\t* @param\tstring\tKey name\n\t* @return\tstring\tCleaned key name\n\t* @since\t2.1\n\t*/\n function parse_clean_key($key)\n {\n \tif ($key == \"\")\n \t{\n \t\treturn \"\";\n \t}\n \t\n \t$key = htmlspecialchars(urldecode($key));\n \t$key = str_replace( \"..\" , \"\" , $key );\n \t$key = preg_replace( \"/\\_\\_(.+?)\\_\\_/\" , \"\" , $key );\n \t$key = preg_replace( \"/^([\\w\\.\\-\\_]+)$/\", \"$1\", $key );\n \t\n \treturn $key;\n }\n \n /*-------------------------------------------------------------------------*/\n // Clean evil tags\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Clean possible javascipt codes\n *\n\t* @param\tstring\tInput\n\t* @return\tstring\tCleaned Input\n\t* @since\t2.0\n\t*/\n function clean_evil_tags( $t )\n {\n \t$t = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $t );\n\t\t$t = preg_replace( \"/alert/i\" , \"&#097;lert\" , $t );\n\t\t$t = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $t );\n\t\t$t = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $t );\n\t\t$t = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $t );\n\t\t$t = preg_replace( \"/onload/i\" , \"&#111;nload\" , $t );\n\t\t$t = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $t );\n\t\t$t = preg_replace( \"/<body/i\" , \"&lt;body\" , $t );\n\t\t$t = preg_replace( \"/<html/i\" , \"&lt;html\" , $t );\n\t\t$t = preg_replace( \"/document\\./i\" , \"&#100;ocument.\" , $t );\n\t\t\n\t\treturn $t;\n }\n \n /*-------------------------------------------------------------------------*/\n // Clean value\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* UnHTML and stripslashes _GET _POST value\n *\n\t* @param\tstring\tInput\n\t* @return\tstring\tCleaned Input\n\t* @since\t2.1\n\t*/\n function parse_clean_value($val)\n {\n \tif ( $val == \"\" )\n \t{\n \t\treturn \"\";\n \t}\n \n \t$val = str_replace( \"&#032;\", \" \", $this->txt_stripslashes($val) );\n \t\n \tif ( isset($this->vars['strip_space_chr']) AND $this->vars['strip_space_chr'] )\n \t{\n \t\t$val = str_replace( chr(0xCA), \"\", $val ); //Remove sneaky spaces\n \t}\n \t\n \t// As cool as this entity is...\n \t\n \t$val = str_replace( \"&#8238;\"\t\t, ''\t\t\t , $val );\n \t\n \t$val = str_replace( \"&\"\t\t\t\t, \"&amp;\" , $val );\n \t$val = str_replace( \"<!--\"\t\t\t, \"&#60;&#33;--\" , $val );\n \t$val = str_replace( \"-->\"\t\t\t, \"--&#62;\" , $val );\n \t$val = preg_replace( \"/<script/i\"\t, \"&#60;script\" , $val );\n \t$val = str_replace( \">\"\t\t\t\t, \"&gt;\" , $val );\n \t$val = str_replace( \"<\"\t\t\t\t, \"&lt;\" , $val );\n \t$val = str_replace( '\"'\t\t\t\t, \"&quot;\" , $val );\n \t$val = str_replace( \"\\n\"\t\t\t, \"<br />\" , $val ); // Convert literal newlines\n \t$val = str_replace( \"$\"\t\t\t\t, \"&#036;\" , $val );\n \t$val = str_replace( \"\\r\"\t\t\t, \"\" , $val ); // Remove literal carriage returns\n \t$val = str_replace( \"!\"\t\t\t\t, \"&#33;\" , $val );\n \t$val = str_replace( \"'\"\t\t\t\t, \"&#39;\" , $val ); // IMPORTANT: It helps to increase sql query safety.\n \t\n \t// Ensure unicode chars are OK\n \t\n \tif ( $this->allow_unicode )\n\t\t{\n\t\t\t$val = preg_replace(\"/&amp;#([0-9]+);/s\", \"&#\\\\1;\", $val );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Try and fix up HTML entities with missing ;\n\t\t\t//-----------------------------------------\n\n\t\t\t$val = preg_replace( \"/&#(\\d+?)([^\\d;])/i\", \"&#\\\\1;\\\\2\", $val );\n\t\t}\n \t\n \treturn $val;\n }\n \n /**\n\t* Remove board macros\n *\n\t* @param\tstring\tInput\n\t* @return\tstring\tCleaned Input\n\t* @since\t2.0\n\t*/\n function remove_tags($text=\"\")\n {\n \t// Removes < BOARD TAGS > from posted forms\n \t\n \t$text = preg_replace( \"/(<|&lt;)% (MEMBER BAR|BOARD FOOTER|BOARD HEADER|CSS|JAVASCRIPT|TITLE|BOARD|STATS|GENERATOR|COPYRIGHT|NAVIGATION) %(>|&gt;)/i\", \"&#60;% \\\\2 %&#62;\", $text );\n \t\n \t//$text = str_replace( \"<%\", \"&#60;%\", $text );\n \t\n \treturn $text;\n }\n \n /**\n\t* Useless stupid function that serves no purpose other than\n\t* to create a nice gap between useful functions\n *\n\t* @param\tinteger\n\t* @return\tinteger\n\t* @since\t2.0\n\t* @deprecated\n\t*/\n function is_number($number=\"\")\n {\n \tif ($number == \"\") return -1;\n \t\n \tif ( preg_match( \"/^([0-9]+)$/\", $number ) )\n \t{\n \t\treturn $number;\n \t}\n \telse\n \t{\n \t\treturn \"\";\n \t}\n }\n \n /*-------------------------------------------------------------------------*/\n // MEMBER FUNCTIONS \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Set up defaults for a guest user\n *\n\t* @param\tstring\tGuest name\n\t* @return\tarray\n\t* @since\t2.0\n\t* @todo\t\tMove this into class_session?\n\t*/\n function set_up_guest($name='Guest')\n {\n \treturn array( 'name' \t\t \t=> $name,\n \t\t\t\t 'members_display_name' \t=> $name,\n \t\t\t\t '_members_display_name' \t=> $name,\n \t\t\t\t 'id' \t\t \t=> 0,\n \t\t\t\t 'password' \t\t \t=> '',\n \t\t\t\t 'email' \t\t \t=> '',\n \t\t\t\t 'title' \t\t \t=> '',\n \t\t\t\t 'mgroup' \t\t \t=> $this->vars['guest_group'],\n \t\t\t\t 'view_sigs' \t\t \t=> $this->vars['guests_sig'],\n \t\t\t\t 'view_img' \t\t \t=> $this->vars['guests_img'],\n \t\t\t\t 'view_avs' \t\t \t=> $this->vars['guests_ava'],\n \t\t\t\t 'member_forum_markers' \t=> array(),\n \t\t\t\t 'avatar'\t\t\t\t \t=> '',\n \t\t\t\t 'member_posts'\t\t \t=> '',\n \t\t\t\t 'member_group'\t\t \t=> $this->cache['group_cache'][$this->vars['guest_group']]['g_title'],\n \t\t\t\t 'member_rank_img'\t \t \t=> '',\n \t\t\t\t 'member_joined'\t\t \t=> '',\n \t\t\t\t 'member_location'\t\t \t=> '',\n \t\t\t\t 'member_number'\t\t \t=> '',\n \t\t\t\t 'members_auto_dst'\t \t=> 0,\n \t\t\t\t 'has_blog'\t\t\t \t=> 0,\n \t\t\t\t 'has_gallery'\t\t\t \t=> 0,\n \t\t\t\t 'is_mod'\t\t\t\t \t=> 0,\n \t\t\t\t 'last_visit'\t\t\t \t=> 0,\n \t\t\t\t 'login_anonymous'\t\t \t=> '',\n \t\t\t\t 'mgroup_others'\t\t \t=> '',\n \t\t\t\t 'org_perm_id'\t\t\t \t=> '',\n \t\t\t\t '_cache'\t\t\t\t \t=> array( 'qr_open' => 0 ),\n \t\t\t\t 'auto_track'\t\t\t \t=> 0,\n \t\t\t\t 'ignored_users'\t\t \t=> NULL,\n \t\t\t\t 'members_editor_choice' \t=> 'std',\n\t\t\t\t\t '_cache' \t=> array( 'friends' => array() )\n \t\t\t\t);\n }\n \n /*-------------------------------------------------------------------------*/\n // GET USER AVATAR \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Returns user's avatar\n *\n\t* @param\tstring\tMember's avatar string\n\t* @param\tinteger\tCurrent viewer wants to view avatars\n\t* @param\tstring\tAvatar dimensions (nxn)\n\t* @param\tstring\tAvatar type (upload, url)\n\t* @return\tstring\tHTML\n\t* @since\t2.0\n\t*/\n function get_avatar($member_avatar=\"\", $member_view_avatars=0, $avatar_dims=\"x\", $avatar_type='', $no_cache=0 )\n {\n \t//-----------------------------------------\n \t// No avatar?\n \t//-----------------------------------------\n \t\n \tif ( ! $member_avatar or $member_view_avatars == 0 or ! $this->vars['avatars_on'] or ( strpos( $member_avatar, \"noavatar\" ) AND !strpos( $member_avatar, '.' ) ) )\n \t{\n \t\treturn \"\";\n \t}\n \t\n \tif ( substr( $member_avatar, -4 ) == \".swf\" and $this->vars['allow_flash'] != 1 )\n \t{\n \t\treturn \"\";\n \t}\n \t\n \t//-----------------------------------------\n \t// Defaults...\n \t//-----------------------------------------\n \t\n \t$davatar_dims = explode( \"x\", strtolower($this->vars['avatar_dims']) );\n\t\t$default_a_dims = explode( \"x\", strtolower($this->vars['avatar_def']) );\n \t$this_dims = explode( \"x\", strtolower($avatar_dims) );\n\t\t\n\t\tif (!isset($this_dims[0])) $this_dims[0] = $davatar_dims[0];\n\t\tif (!isset($this_dims[1])) $this_dims[1] = $davatar_dims[1];\n\t\tif (!$this_dims[0]) $this_dims[0] = $davatar_dims[0];\n\t\tif (!$this_dims[1]) $this_dims[1] = $davatar_dims[1];\n\t\t\n \t//-----------------------------------------\n \t// LEGACY: Determine type\n \t//-----------------------------------------\n\t\t\n\t\tif ( ! $avatar_type )\n\t\t{\n\t\t\tif ( preg_match( \"/^http:\\/\\//\", $member_avatar ) )\n\t\t\t{\n\t\t\t\t$avatar_type = 'url';\n\t\t\t}\n\t\t\telse if ( strstr( $member_avatar, \"upload:\" ) or ( strstr( $member_avatar, 'av-' ) ) )\n\t\t\t{\n\t\t\t\t$avatar_type = 'upload';\n\t\t\t\t$member_avatar = str_replace( 'upload:', '', $member_avatar );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$avatar_type = 'local';\n\t\t\t}\n\t \t}\n\t\n\t\t//-----------------------------------------\n\t\t// No cache?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $no_cache )\n\t\t{\n\t\t\t$member_avatar .= '?_time=' . time();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// No avatar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $member_avatar == 'noavatar' )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// URL avatar?\n\t\t//-----------------------------------------\n\t\t\n\t\telse if ( $avatar_type == 'url' )\n\t\t{\n\t\t\tif ( substr( $member_avatar, -4 ) == \".swf\" )\n\t\t\t{\n\t\t\t\treturn \"<object classid=\\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\\" width='{$this_dims[0]}' height='{$this_dims[1]}'>\n\t\t\t\t\t\t<param name='movie' value='{$member_avatar}'><param name='play' value='true'>\n\t\t\t\t\t\t<param name='loop' value='true'><param name='quality' value='high'>\n\t\t\t\t\t\t<param name='wmode' value='transparent'> \n\t\t\t\t\t\t<embed src='{$member_avatar}' width='{$this_dims[0]}' height='{$this_dims[1]}' play='true' loop='true' quality='high' wmode='transparent'></embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"<img src='{$member_avatar}' border='0' width='{$this_dims[0]}' height='{$this_dims[1]}' alt='' />\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Not a URL? Is it an uploaded avatar?\n\t\t//-----------------------------------------\n\t\t\t\n\t\telse if ( ($this->vars['avup_size_max'] > 1) and ( $avatar_type == 'upload' ) )\n\t\t{\n\t\t\t$member_avatar = str_replace( 'upload:', '', $member_avatar );\n\t\t\t\n\t\t\tif ( substr( $member_avatar, -4 ) == \".swf\" )\n\t\t\t{\n\t\t\t\treturn \"<object classid=\\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\\" width='{$this_dims[0]}' height='{$this_dims[1]}'>\n\t\t\t\t\t\t<param name='movie' value='{$this->vars['upload_url']}/$member_avatar'><param name='play' value='true'>\n\t\t\t\t\t\t<param name='loop' value='true'><param name='quality' value='high'>\n\t\t\t\t\t\t<param name='wmode' value='transparent'> \n\t\t\t\t\t <embed src='{$this->vars['upload_url']}/$member_avatar' width='{$this_dims[0]}' height='{$this_dims[1]}' play='true' loop='true' quality='high' wmode='transparent'></embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"<img src='{$this->vars['upload_url']}/$member_avatar' border='0' width='{$this_dims[0]}' height='{$this_dims[1]}' alt='' />\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// No, it's not a URL or an upload, must\n\t\t// be a normal avatar then\n\t\t//-----------------------------------------\n\t\t\n\t\telse if ($member_avatar != \"\")\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Do we have an avatar still ?\n\t\t \t//-----------------------------------------\n\t\t \t\n\t\t\treturn \"<img src='{$this->vars['AVATARS_URL']}/{$member_avatar}' border='0' alt='' />\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// No, ok - return blank\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\treturn \"\";\n\t\t}\n }\n\n\t/*-------------------------------------------------------------------------*/\n \t// Set up member data\n \t/*-------------------------------------------------------------------------*/\n \t\n \t/**\n \t* Sets the personal data\n \t*\n \t* @return\tvoid\n \t* @since\tIPB 2.2.0.2006-7-31\n \t*/\n \tfunction member_set_information( $member, $noids=0, $use_parsed=1 )\n \t{\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! is_array( $member ) or ! count( $member ) )\n\t\t{\n\t\t\treturn $member;\n\t\t}\n\t\t\n\t\tif ( $use_parsed )\n\t\t{\n\t\t\tif ( array_key_exists( $member['id'], $this->parsed_members ) )\n\t\t\t{\n\t\t\t\treturn $this->parsed_members[ $member['id'] ];\n\t\t\t}\n\t\t}\n\t\n\t\t//-----------------------------------------\n\t\t// Check URL\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->vars['img_url'] = ( ! $this->vars['img_url'] ) ? $this->vars['board_url'] . '/style_images/' . $this->skin['_imagedir'] : $this->vars['img_url'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Main photo\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $member['pp_main_photo'] OR !$this->member['g_mem_info'] )\n\t\t{\n\t\t\t$member['pp_main_photo'] = $this->vars['img_url'].'/folder_profile_portal/pp-blank-large.png';;\n\t\t\t$member['pp_main_width'] = 150;\n\t\t\t$member['pp_main_height'] = 150;\n\t\t\t$member['_has_photo'] = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$member['pp_main_photo'] = $this->vars['upload_url'] . '/' . $member['pp_main_photo'];\n\t\t\t$member['_has_photo'] = 1;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Thumbie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $member['pp_thumb_photo'] OR $member['pp_thumb_photo'] == 'profile/' )\n\t\t{\n\t\t\tif( $member['_has_photo'] )\n\t\t\t{\n\t\t\t\t$member['pp_thumb_photo'] = $member['pp_main_photo'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member['pp_thumb_photo'] = $this->vars['img_url'].'/folder_profile_portal/pp-blank-thumb.png';\n\t\t\t}\n\t\t\t\n\t\t\t$member['pp_thumb_width'] = 50;\n\t\t\t$member['pp_thumb_height'] = 50;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$member['pp_thumb_photo'] = $this->vars['upload_url'] . '/' . $member['pp_thumb_photo'];\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Mini\n\t\t//-----------------------------------------\n\t\t\n\t\t$_data = $this->scale_image( array( 'max_height' => 25, 'max_width' => 25, 'cur_width' => $member['pp_thumb_width'], 'cur_height' => $member['pp_thumb_height'] ) );\n\t\t\n\t\t$member['pp_mini_photo'] = $member['pp_thumb_photo'];\n\t\t$member['pp_mini_width'] = $_data['img_width'];\n\t\t$member['pp_mini_height'] = $_data['img_height'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Gender...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( IPB_THIS_SCRIPT != 'admin' )\n\t\t{\n\t\t\t$member['_pp_gender_image'] = $noids ? $this->compiled_templates['skin_global']->personal_portal_gender_image( $member, 1 ) : $this->compiled_templates['skin_global']->personal_portal_gender_image( $member );\n\t\t}\n\t\t\n\t\t$member['_pp_gender_text'] = $member['pp_gender'] == 'male' ? $this->lang['js_gender_male'] : ( $member['pp_gender'] == 'female' ? $this->lang['js_gender_female'] : $this->lang['js_gender_mystery'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Online?\n\t\t//-----------------------------------------\n\t\t\n\t\t$time_limit = time() - $this->vars['au_cutoff'] * 60;\n\t\n\t\t$member['_online'] = 0;\n\t\n\t\tlist( $be_anon, $loggedin ) = explode( '&', $member['login_anonymous'] );\n\t\t\n\t\tif ( ( $member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit ) AND $be_anon != 1 AND $loggedin == 1 )\n\t\t{\n\t\t\t$member['_online'] = 1;\n\t\t}\n\n\t\tif ( IPB_THIS_SCRIPT != 'admin' )\n\t\t{\n\t\t\t$member['_pp_online_image'] = $this->compiled_templates['skin_global']->personal_portal_online_image( $member );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Last Active\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['_last_active'] = $this->get_date( $member['last_activity'], 'SHORT' );\n\t\t\n\t\tif( $member['login_anonymous']{0} == '1' )\n\t\t{\n\t\t\t// Member last logged in anonymous\n\t\t\t\n\t\t\tif( $this->member['mgroup'] != $this->vars['admin_group'] OR $this->vars['disable_admin_anon'] )\n\t\t\t{\n\t\t\t\t$member['_last_active'] = $this->lang['private'];\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t// Rating\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['_pp_rating_real'] = intval( $member['pp_rating_real'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Long display names\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['members_display_name_short'] = $this->txt_truncate( $member['members_display_name'], 16 );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Other stuff not worthy of individual comments\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['members_profile_views'] = isset($member['members_profile_views']) ? $member['members_profile_views'] : 0;\n\t\t\n\t\t$member['_pp_profile_views'] = $this->do_number_format( $member['members_profile_views'] );\n\t\t\n\t\t$member['icq_number']\t\t = $member['icq_number'] > 0 ? $member['icq_number'] : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Bye.\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->parsed_members[ $member['id'] ] = $member;\n\t\t\n\t\treturn $member;\n\t}\n \t\n \t/*-------------------------------------------------------------------------*/\n \t// Quick, INIT? a.k.a Just enough information to perform\n \t// (Sorry, listening to stereophonics still)\n \t/*-------------------------------------------------------------------------*/\n \t\n \t/**\n\t* Very quick init, if index.php has been passed on hasn't been loaded\n *\n\t* @return\tvoid\n\t* @since\t2.0\n\t*/\n \tfunction quick_init()\n \t{\n \t\t$this->load_skin();\n \t \n\t //-----------------------------------------\n\t // Grab session cookie\n\t //-----------------------------------------\n\t\t\t \n\t $this->session_id = $this->sess->session_id ? $this->sess->session_id : $this->my_getcookie('session_id');\n\t \n\t //-----------------------------------------\n\t // Organize default info\n\t //-----------------------------------------\n\t \n\t $this->base_url \t= $this->vars['board_url'].'/index.'.$this->vars['php_ext'].'?s='.$this->session_id;\n\t $this->js_base_url \t= $this->vars['board_url'].'/index.'.$this->vars['php_ext'].'?s='.$this->session_id;\n\t $this->skin_rid \t= $this->skin['set_id'];\n\t $this->skin_id \t= 's'.$this->skin['set_id'];\n\t \n\t if ($this->vars['default_language'] == \"\")\n\t {\n\t\t $this->vars['default_language'] = 'en';\n\t }\n\t \n\t $this->lang_id = $this->member['language'] ? $this->member['language'] : $this->vars['default_language'];\n\t \n\t if ( ($this->lang_id != $this->vars['default_language']) and (! is_dir( CACHE_PATH.\"cache/lang_cache/\".$this->lang_id ) ) )\n\t {\n\t\t $this->lang_id = $this->vars['default_language'];\n\t }\n\t \n\t //-----------------------------------------\n\t // Get words & skin\n\t //-----------------------------------------\n\t \n\t $this->load_language(\"lang_global\");\n\t \n\t $this->vars['img_url'] = 'style_images/' . $this->skin['_imagedir'];\n\t \n\t if ( ! $this->compiled_templates['skin_global'] )\n\t {\n\t\t $this->load_template('skin_global');\n\t }\n \t}\n \n /*-------------------------------------------------------------------------*/\n // ERROR FUNCTIONS \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Show error message\n *\n * @param\tarray\t'LEVEL', 'INIT', 'MSG', 'EXTRA'\n\t* @return\tvoid\n\t* @since\t2.0\n\t*/\n function Error($error)\n {\n \t$override = 0;\n \t\n \t//-----------------------------------------\n \t// Showing XML / AJAX functions?\n \t//-----------------------------------------\n \t\n \tif ( $this->input['act'] == 'xmlout' )\n \t{\n \t\t@header( \"Content-type: text/plain\" );\n\t\t\tprint 'error';\n\t\t\texit();\n\t\t}\n \t\n \t//-----------------------------------------\n \t// Initialize if not done so yet\n \t//-----------------------------------------\n \t\n \tif ( isset($error['INIT']) AND $error['INIT'] == 1)\n \t{\n \t\t$this->quick_init();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session_id = $this->my_session;\n\t\t}\n\t\t\n\t\tif ( !isset($this->compiled_templates['skin_global']) OR !is_object( $this->compiled_templates['skin_global'] ) )\n\t\t{\n\t\t\t$this->load_template('skin_global');\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get error words\n\t\t//-----------------------------------------\n\t\t\n \t$this->load_language('lang_error');\n \t\n \tlist($em_1, $em_2) = explode( '@', $this->vars['email_in'] );\n \t\n \t$msg = $this->lang[ $error['MSG'] ];\n \t\n \t//-----------------------------------------\n \t// Extra info?\n \t//-----------------------------------------\n \t\n \tif ( isset($error['EXTRA']) AND $error['EXTRA'] )\n \t{\n \t\t$msg = str_replace( '<#EXTRA#>', $error['EXTRA'], $msg );\n \t}\n \t\n \t//-----------------------------------------\n \t// Show error\n \t//-----------------------------------------\n \t\n \t$html = $this->compiled_templates['skin_global']->Error( $msg, $em_1, $em_2, 1);\n \t\n \t//-----------------------------------------\n \t// If we're a guest, show the log in box..\n \t//-----------------------------------------\n \t\n \tif ($this->member['id'] == \"\" and $error['MSG'] != 'server_too_busy' and $error['MSG'] != 'account_susp')\n \t{\n \t\t$safe_string = $this->base_url . str_replace( '&amp;', '&', $this->parse_clean_value($this->my_getenv('QUERY_STRING')) );\n \t\t\n \t\t$html = str_replace( \"<!--IBF.LOG_IN_TABLE-->\", $this->compiled_templates['skin_global']->error_log_in( str_replace( '&', '&amp;', $safe_string ) ), $html);\n \t\t$override = 1;\n \t}\n \t\n \t//-----------------------------------------\n \t// Do we have any post data to keepy?\n \t//-----------------------------------------\n \t\n \tif ( $this->input['act'] == 'Post' OR $this->input['act'] == 'Msg' OR $this->input['act'] == 'calendar' )\n \t{\n \t\tif ( $_POST['Post'] )\n \t\t{\n \t\t\t$post_thing = $this->compiled_templates['skin_global']->error_post_textarea($this->txt_htmlspecialchars($this->txt_stripslashes($_POST['Post'])) );\n \t\t\t\n \t\t\t$html = str_replace( \"<!--IBF.POST_TEXTAREA-->\", $post_thing, $html );\n \t\t}\n \t}\n \t\n \t//-----------------------------------------\n \t// Update session\n \t//-----------------------------------------\n \t\n \t$this->DB->do_shutdown_update( 'sessions', array( 'in_error' => 1 ), \"id='{$this->my_session}'\" );\n \t\n \t//-----------------------------------------\n \t// Print\n \t//-----------------------------------------\n \t\n \t$print = new display();\n \t$print->ipsclass =& $this;\n \t\n \t$print->add_output($html);\n \t\t\n \t$print->do_output( array( 'OVERRIDE' => $override, 'TITLE' => $this->lang['error_title'] ) );\n }\n \n /*-------------------------------------------------------------------------*/\n // Show Board Offline\n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Show board offline message\n *\n\t* @return\tvoid\n\t* @since\t2.0\n\t*/\n function board_offline()\n {\n \t$this->quick_init();\n \t\n \t//-----------------------------------------\n \t// Get offline message (not cached)\n \t//-----------------------------------------\n \t\n \t$row = $this->DB->simple_exec_query( array( 'select' => '*', 'from' => 'conf_settings', 'where' => \"conf_key='offline_msg'\" ) );\n \t\n \t$this->load_language(\"lang_error\");\n \t\n \t$msg = preg_replace( \"/\\n/\", \"<br />\", stripslashes( $row['conf_value'] ) );\n \t\n \t$html = $this->compiled_templates['skin_global']->board_offline( $msg );\n \t\n \t$print = new display();\n \t$print->ipsclass =& $this;\n \t$print->add_output($html);\n \t\t\n \t$print->do_output( array(\n\t\t\t\t\t\t\t\t 'OVERRIDE' => 1,\n\t\t\t\t\t\t\t\t 'TITLE' => $this->lang['offline_title'],\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t );\n }\n \t\t\t\t\t\t\t\t\n /*-------------------------------------------------------------------------*/\n // Variable chooser \n /*-------------------------------------------------------------------------*/\n \n /**\n\t* Choose a variable (silly function)\n *\n * @param\tarray Mixed variables\n\t* @return\tmixed\n\t* @since\t2.0\n\t*/\n function select_var($array)\n {\n \tif ( !is_array($array) ) return -1;\n \t\n \tksort($array);\n \t\n \t$chosen = -1; // Ensure that we return zero if nothing else is available\n \t\n \tforeach ($array as $v)\n \t{\n \t\tif ( isset($v) )\n \t\t{\n \t\t\t$chosen = $v;\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \treturn $chosen;\n }\n \n\t/*-------------------------------------------------------------------------*/\n\t// Array filter: Clean read topics\n\t/*-------------------------------------------------------------------------*/\n \n /**\n\t* Array sort Used to remove out of date topic marking entries\n *\n * @param\tmixed\n\t* @return\tmixed\n\t* @since\t2.0\n\t*/\n function array_filter_clean_read_topics ( $var )\n\t{\n\t\tglobal $ipsclass;\n\t\t\n\t\treturn $var > $ipsclass->vars['db_topic_read_cutoff'];\n\t}\n \n\t/*-------------------------------------------------------------------------*/\n\t// Memory debug, make flag\n\t/*-------------------------------------------------------------------------*/\n\t\n\tfunction memory_debug_make_flag()\n\t{\n\t\tif ( IPS_MEMORY_DEBUG_MODE AND function_exists( 'memory_get_usage' ) )\n\t\t{\n\t\t\treturn memory_get_usage();\n\t\t}\n\t}\n\t\n\t/*-------------------------------------------------------------------------*/\n\t// Memory debug, make flag\n\t/*-------------------------------------------------------------------------*/\n\t\n\tfunction memory_debug_add( $comment, $init_usage=0 )\n\t{\n\t\tif ( IPS_MEMORY_DEBUG_MODE AND function_exists( 'memory_get_usage' ) )\n\t\t{\n\t\t\t$_END = memory_get_usage();\n\t\t\t$_USED = $_END - $init_usage;\n\t\t\t$this->_memory_debug[] = array( $comment, $_USED );\n\t\t}\n\t}\n\t\n /*-------------------------------------------------------------------------*/\n // LEGACY MODE STUFF\n /*-------------------------------------------------------------------------*/\n \n \n\t/*-------------------------------------------------------------------------*/\n\t// Require, parse and return an array containing the language stuff \n\t/*-------------------------------------------------------------------------*/ \n\t\n\t/**\n\t* LEGACY MODE: load_words\n *\n * @param\tarray\tCurrent language array\n * @param\tstring\tFile name\n * @param\tstring\tCache directory\n\t* @return\tmixed\n\t* @deprecated\tSince 2.1\n\t* @since\t1.0\n\t*/\n\t\n\tfunction load_words($current_lang_array, $area, $lang_type)\n\t{\n\t\trequire ROOT_PATH.\"cache/lang_cache/\".$lang_type.\"/\".$area.\".php\";\n\t\t\n\t\tforeach ($lang as $k => $v)\n\t\t{\n\t\t\t$current_lang_array[$k] = stripslashes($v);\n\t\t}\n\t\t\n\t\tunset($lang);\n\t\t\n\t\treturn $current_lang_array;\n\t}\n\t\n\t/*-------------------------------------------------------------------------*/\n\t// Redirect: parse_clean_value \n\t/*-------------------------------------------------------------------------*/\n\t\n\t/**\n\t* LEGACY MODE: clean_value (alias of parse_clean_value)\n *\n * @param\tstring\n\t* @return\tstring\n\t* @deprecated\tSince 2.1\n\t* @since\t1.0\n\t* @see\t\tparse_clean_value\n\t*/\n\tfunction clean_value( $t )\n\t{\n\t\treturn $this->parse_clean_value( $t );\n\t}\n\t\n\t\n\tfunction parse_member( $member=array(), $custom_fields=1, $skin_file='skin_topic' )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$group_name = $this->make_name_formatted( $this->cache['group_cache'][ $member['mgroup'] ]['g_title'], $member['mgroup'] );\n\t\t$pips = 0;\n\t\t$member['member_rank_img'] = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Avatar\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['avatar'] = $this->get_avatar( $member['avatar_location'], $this->member['view_avs'], $member['avatar_size'], $member['avatar_type'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Ranks\n\t\t//-----------------------------------------\n\n\t\tforeach($this->cache['ranks'] as $k => $v)\n\t\t{\n\t\t\tif ($member['posts'] >= $v['POSTS'])\n\t\t\t{\n\t\t\t\tif( $member['title'] === '' OR is_null($member['title']) )\n\t\t\t\t{\n\t\t\t\t\t$member['title'] = $this->cache['ranks'][ $k ]['TITLE'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$pips = $v['PIPS'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Group image\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->cache['group_cache'][ $member['mgroup'] ]['g_icon'] )\n\t\t{\n\t\t\t$member['member_rank_img'] = $this->compiled_templates[ $skin_file ]->member_rank_img($this->cache['group_cache'][ $member['mgroup'] ]['g_icon']);\n\t\t}\n\t\telse if ( $pips )\n\t\t{\n\t\t\tif ( is_numeric( $pips ) )\n\t\t\t{\n\t\t\t\tfor ($i = 1; $i <= $pips; ++$i)\n\t\t\t\t{\n\t\t\t\t\t$member['member_rank_img'] .= \"<{A_STAR}>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member['member_rank_img'] = $this->compiled_templates[ $skin_file ]->member_rank_img( 'style_images/<#IMG_DIR#>/folder_team_icons/'.$pips );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$member['member_joined'] = $this->compiled_templates[ $skin_file ]->member_joined( $this->get_date( $member['joined'], 'JOINED' ) );\n\t\t$member['member_group'] = $this->compiled_templates[ $skin_file ]->member_group( $group_name );\n\t\t$member['member_posts'] = $this->compiled_templates[ $skin_file ]->member_posts( $this->do_number_format( intval( $member['posts'] ) ) );\n\t\t$member['member_number'] = $this->compiled_templates[ $skin_file ]->member_number( $this->do_number_format($member['id']) );\n\t\t$member['profile_icon'] = $this->compiled_templates[ $skin_file ]->member_icon_profile( $member['id'] );\n\t\t$member['message_icon'] = $this->compiled_templates[ $skin_file ]->member_icon_msg( $member['id'] );\n\t\t$member['member_location'] = $member['location'] ? $this->compiled_templates[ $skin_file ]->member_location( $member['location'] ) : '';\n\t\t$member['email_icon'] = ! $member['hide_email'] ? $this->compiled_templates[ $skin_file ]->member_icon_email( $member['id'] ) : '';\n\t\t$member['addresscard'] = $member['id'] ? $this->compiled_templates[ $skin_file ]->member_icon_vcard( $member['id'] ) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Warny porny?\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['warn_percent']\t= NULL;\n\t\t$member['warn_img']\t\t= NULL;\n\t\t$member['warn_text']\t= NULL;\n\t\t$member['warn_add']\t\t= NULL;\n\t\t$member['warn_minus']\t= NULL;\n\t\t\n\t\tif ( $this->vars['warn_on'] and ( ! strstr( ','.$this->vars['warn_protected'].',', ','.$member['mgroup'].',' ) ) )\n\t\t{\n\t\t\tif ( ( isset($this->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn'])\n\t\t\t\tAND $this->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn'] )\n\t\t\t\tOR ( $this->member['g_is_supmod'] == 1 )\n\t\t\t\tOR ( $this->vars['warn_show_own'] and ( $this->member['id'] == $member['id'] ) ) \n\t\t\t )\n\t\t\t{\n\t\t\t\t// Work out which image to show.\n\t\t\t\t\n\t\t\t\tif ( ! $this->vars['warn_show_rating'] )\n\t\t\t\t{\n\t\t\t\t\tif ( $member['warn_level'] <= $this->vars['warn_min'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$member['warn_img'] = '<{WARN_0}>';\n\t\t\t\t\t\t$member['warn_percent'] = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( $member['warn_level'] >= $this->vars['warn_max'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$member['warn_img'] = '<{WARN_5}>';\n\t\t\t\t\t\t$member['warn_percent'] = 100;\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\n\t\t\t\t\t\t$member['warn_percent'] = $member['warn_level'] ? sprintf( \"%.0f\", ( ($member['warn_level'] / $this->vars['warn_max']) * 100) ) : 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $member['warn_percent'] > 100 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_percent'] = 100;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $member['warn_percent'] >= 81 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_5}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $member['warn_percent'] >= 61 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_4}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $member['warn_percent'] >= 41 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_3}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $member['warn_percent'] >= 21 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_2}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $member['warn_percent'] >= 1 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_1}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['warn_img'] = '<{WARN_0}>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( $member['warn_percent'] < 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$member['warn_percent'] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$member['warn_text'] = $this->compiled_templates[ $skin_file ]->warn_level_warn($member['id'], $member['warn_percent'] );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Ratings mode..\n\t\t\t\t\t\n\t\t\t\t\t$member['warn_text'] = $this->lang['tt_rating'];\n\t\t\t\t\t$member['warn_img'] = $this->compiled_templates[ $skin_file ]->warn_level_rating($member['id'], $member['warn_level'], $this->vars['warn_min'], $this->vars['warn_max']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ( ( isset($this->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn']) AND $this->member['_moderator'][ $this->topic['forum_id'] ]['allow_warn'] ) or $this->member['g_is_supmod'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$member['warn_add'] = \"<a href='{$this->base_url}act=warn&amp;type=add&amp;mid={$member['id']}&amp;t={$this->topic['tid']}&amp;st=\".intval($this->input['st']).\"' title='{$this->lang['tt_warn_add']}'><{WARN_ADD}></a>\";\n\t\t\t\t\t$member['warn_minus'] = \"<a href='{$this->base_url}act=warn&amp;type=minus&amp;mid={$member['id']}&amp;t={$this->topic['tid']}&amp;st=\".intval($this->input['st']).\"' title='{$this->lang['tt_warn_minus']}'><{WARN_MINUS}></a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Profile fields stuff\n\t\t//-----------------------------------------\n\t\t\n\t\t$member['custom_fields'] = \"\";\n\t\t\n\t\tif ( $this->vars['custom_profile_topic'] == 1 AND $custom_fields == 1 )\n\t\t{\n\t\t\tif( !is_object( $this->custom_fields ) )\n\t\t\t{\n\t\t\t\trequire_once( ROOT_PATH.'sources/classes/class_custom_fields.php' );\n\t\t\t\t$this->custom_fields = new custom_fields( $this->DB );\n\t\t\t\t\n\t\t\t\t$this->custom_fields->member_id = $this->member['id'];\n\t\t\t\t$this->custom_fields->cache_data = $this->cache['profilefields'];\n\t\t\t\t$this->custom_fields->admin = intval($this->member['g_access_cp']);\n\t\t\t\t$this->custom_fields->supmod = intval($this->member['g_is_supmod']);\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->custom_fields )\n\t\t\t{\n\t\t\t\t$this->custom_fields->member_data = $member;\n\t\t \t$this->custom_fields->admin = intval($this->member['g_access_cp']);\n\t\t \t$this->custom_fields->supmod = intval($this->member['g_is_supmod']);\n\t\t \t$this->custom_fields->member_id\t = $this->member['id'];\n\t\t\t\t$this->custom_fields->init_data();\n\t\t\t\t$this->custom_fields->parse_to_view( 1 );\n\t\t\t\t\n\t\t\t\tif ( count( $this->custom_fields->out_fields ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->custom_fields->out_fields as $i => $data )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $data )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member['custom_fields'] .= \"\\n\".$this->custom_fields->method_format_field_for_topic_view( $i );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Photo and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$member = $this->member_set_information( $member );\n\t\t\n\t\treturn $member;\n\t}\t\n\t\n\t\n \n \n}", "public function test0() {\r\n// \techo (4418388-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595); echo \"<br>\";\r\n// \techo (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595) + 300344;\r\n\r\n// create a blank image\r\n$image = imagecreate(5000, 5300);\r\n\r\n// fill the background color\r\n$bg = imagecolorallocate($image, 255, 255, 255);\r\n\r\n// choose a color for the polygon\r\n$col_poly = imagecolorallocate($image, 0, 0, 0);\r\n\r\n// draw the polygon\r\nimagepolygon($image,\r\n array (\r\n 50, 1491,\r\n 2729, 5276,\r\n 4113, 3335,\r\n 4310, 89\r\n ),\r\n 4,\r\n $col_poly);\r\n\r\nimagepolygon($image,\r\n array (\r\n 2958, 3854,\r\n 2960, 3854,\r\n 2960, 3856,\r\n 2958, 3856\r\n ),\r\n 4,\r\n $col_poly);\r\n//$text_color = imagecolorallocate($image, 233, 14, 91);\r\n//imagestring($image, 1, 1380, 439, \"1380, 439\", $text_color);\r\n//imagestring($image, 1, 426, 918, \"426, 918\", $text_color);\r\n//imagestring($image, 1, 1028, 2258, \"1028, 2258\", $text_color);\r\n//imagestring($image, 1, 4028, 1570, \"4028, 1570\", $text_color);\r\n//imagestring($image, 1, 796, 1414, \"796, 1414\", $text_color);\r\nheader(\"Content-type: image/png\");\r\nimagepng($image);\r\n\r\n\r\n }", "public static function main(){\n\t\t\t\n\t\t}", "function abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn() {\n echo 'abc';\n}", "function roots_no_generator() { return ''; }", "public function main()\r\n {\r\n \r\n }", "public function generate()\n{\n\n//generate a unique id//\n\n$unique=uniqid();\n\n$mesadig=crypt($unique,rand());\n//encrypt with the salt//\n\n//FILETER FOR THE /\n\n$mesadig=str_replace('/', 'ssd', $mesadig);\n\nreturn $mesadig;\n\n}", "public function library()\n\t{\n\t\n\t}", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "public function testPreprocessingGetPageAngle()\n {\n }", "public function hapus_toko(){\n\t}", "function Generate()\n \t{\n \t\t\n \t}", "function initialize() ;", "public function core();", "function render() ;", "function helloWorld() {\n echo \"Hello world!\";\n }", "function generate_unique_id() {\n\t/*\n\tGenerates random binary ID. \n\tReturns the ID.\n\t*/\n\t$onetwo = [\"&zwj;\", \"&zwnj;\"];\n\t$uniqueid = '';\n\tfor ($i = 0; $i < 8; $i++) {\n\t\t$uniqueid .= $onetwo[rand(0, 1)];\n\t}\n\n\treturn $uniqueid;\n}", "function __construct() ;", "function test16() {\n\n}", "function createSun() {\n global $funcVersion; $funcVersion = 1;\n $n = 3;\n $r='';\n $e=2*$n+1; //edge length\n for($i=0;$i<$e*$e;$i++) {\n $h = floor($e/2); // half point of square\n $x = floor($i%$e); // current x coordinate\n $y = floor($i/$e); // current y coordinate\n\n if ($y==$h&&$x==$h) {\n // center of square\n $r.='O';\n }\n else if ($y==$h) {\n // horizontal line\n $r.='-';\n }\n else if ($x==$h) {\n // vertical line\n $r.='|';\n }\n else if (($y-$h)==($x-$h)) {\n // diagonal line from top-left to bottom right\n $r.='\\\\';\n }\n else if (($y-$h)==($h-$x)) {\n // diagonal line from bottom-left to top-right\n $r.='/';\n }\n else {\n // empty space\n $r.=' ';\n }\n if ($x==$e-1) {\n // add new line for the end of the row\n $r.=\"\\n\";\n }\n }\n //echo \"<pre>\"; echo $r; echo \"</pre>\";\n}", "function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}", "public static function flip_iamge(){\n\n}", "public function GetAbsolute ();", "function generate_fingerprint() \n\t{\n\t\t//We don't use the ip-adress, because it is subject to change in most cases\n// \t\tforeach(array('ACCEPT_CHARSET', 'ACCEPT_ENCODING', 'ACCEPT_LANGUAGE', 'USER_AGENT') as $name) {\n// \t\t\t$key[] = empty($_SERVER['HTTP_'. $name]) ? NULL : $_SERVER['HTTP_'. $name];\n// \t\t}\n// \t\t//Create an MD5 has and return it\n// \t\treturn md5(implode(\"\\0\", $key));\n\t\t$secure_word = 'a39ccdef11305d5999dbccddcf4';\n\t\treturn md5($secure_word.$_SERVER['HTTP_USER_AGENT']);\t\t\n\t}", "function debug_paths()\n{\n\techo 'WEB_PATH :'.api_get_path(WEB_PATH).'<br />';\n\techo 'SYS_PATH :'.api_get_path(SYS_PATH).'<br />';\n\techo 'REL_PATH :'.api_get_path(REL_PATH).'<br />';\n\techo 'WEB_COURSE_PATH :'.api_get_path(WEB_COURSE_PATH).'<br />';\n\techo 'SYS_COURSE_PATH :'.api_get_path(SYS_COURSE_PATH).'<br />';\n\techo 'REL_COURSE_PATH :'.api_get_path(REL_COURSE_PATH).'<br />';\n\techo 'REL_CLARO_PATH :'.api_get_path(REL_CODE_PATH).'<br />';\n\techo 'WEB_CODE_PATH :'.api_get_path(WEB_CODE_PATH).'<br />';\n\techo 'SYS_CODE_PATH :'.api_get_path(SYS_CODE_PATH).'<br />';\n\techo 'SYS_LANG_PATH :'.api_get_path(SYS_LANG_PATH).'<br />';\n\techo 'WEB_IMG_PATH :'.api_get_path(WEB_IMG_PATH).'<br />';\n\techo 'GARBAGE_PATH :'.api_get_path(GARBAGE_PATH).'<br />';\n\techo 'PLUGIN_PATH :'.api_get_path(PLUGIN_PATH).'<br />';\n\techo 'SYS_ARCHIVE_PATH :'.api_get_path(SYS_ARCHIVE_PATH).'<br />';\n\techo 'INCLUDE_PATH :'.api_get_path(INCLUDE_PATH).'<br />';\n\techo 'LIBRARY_PATH :'.api_get_path(LIBRARY_PATH).'<br />';\n\techo 'CONFIGURATION_PATH :'.api_get_path(CONFIGURATION_PATH).'<br />';\n\t\n}", "abstract public function generate() : string;", "abstract protected function mini(): string;", "function makeSalt() {\r\n static $seed = \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n $algo = (PHP_VERSION_ID >= 50307) ? '$2y' : '$2a'; //DON'T CHANGE THIS!!\r\n $strength = '$12'; //too high will time out script.\r\n $salt = '$';\r\n for ($i = 0; $i < 22; $i++) {\r\n $salt .= substr($seed, mt_rand(0, 63), 1);\r\n }\r\n return $algo . $strength . $salt;\r\n}", "function greeting()\n{\n return 'Welcome!';\n}", "function __construct() {}" ]
[ "0.5567709", "0.5329465", "0.51470697", "0.5142269", "0.51126146", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.5050366", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.50485283", "0.4946217", "0.4946217", "0.49194622", "0.48857874", "0.48848093", "0.4865442", "0.48534846", "0.48519745", "0.4845289", "0.48431295", "0.4839957", "0.48014763", "0.4799676", "0.47906777", "0.47818676", "0.47721186", "0.475903", "0.47569942", "0.4718119", "0.47179702", "0.4716087", "0.47127348", "0.46940467", "0.46715453", "0.46641386", "0.4643868", "0.46405625", "0.4637183", "0.46281245", "0.4622345", "0.46200138", "0.4618454", "0.46084642", "0.45979837", "0.4594985", "0.45925704", "0.45837563", "0.4583622", "0.45805115", "0.45766926", "0.45752206", "0.45662943", "0.45654824", "0.45613584" ]
0.0
-1
require_once "RSMtestsFunctionsLibrary.php"; Get relations for the round and subject passed
function getRelations($theRoundID, $theSubjectID, $clientID) { global $definitions; //get item type $relationsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['roundSubjectsTestRelations'], $clientID); //get properties $relationsRoundPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsRoundID' ], $clientID); $relationsSubjectPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsSubjectID' ], $clientID); $relationsTestCasesPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsTestID' ], $clientID); $relationsTestCategoriesPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsTestCatIDs'], $clientID); //First get the relation associated $returnProperties = array(); $returnProperties[] = array('ID' => $relationsRoundPropertyID, 'name' => 'roundID'); $returnProperties[] = array('ID' => $relationsSubjectPropertyID, 'name' => 'subjectID'); $returnProperties[] = array('ID' => $relationsTestCasesPropertyID, 'name' => 'testCasesIDs'); $returnProperties[] = array('ID' => $relationsTestCategoriesPropertyID, 'name' => 'testCatIDs'); //build the filter $filters = array(); $filters[] = array('ID' => $relationsRoundPropertyID, 'value' => $theRoundID); $filters[] = array('ID' => $relationsSubjectPropertyID, 'value' => $theSubjectID); $relations = getFilteredItemsIDs($relationsItemTypeID, $clientID, $filters, $returnProperties); return $relations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRelations($theRoundID, $theSubjectID, $clientID) {\n global $definitions;\n\n $relationsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['roundSubjectsTestRelations'], $clientID);\n\n $relationsRoundPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsRoundID'], $clientID);\n $relationsSubjectPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsSubjectID'], $clientID);\n $relationsTestCasesPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsTestID'], $clientID);\n $relationsTestCategoriesPropertyID = getClientPropertyID_RelatedWith_byName($definitions['roundSubjectsTestRelationsTestCatIDs'], $clientID);\n\n $relationsTestCategoriesPropertyID;\n\n //First get the relation associated\n $returnProperties = array();\n $returnProperties[] = array('ID' => $relationsRoundPropertyID, 'name' => 'roundID');\n $returnProperties[] = array('ID' => $relationsSubjectPropertyID, 'name' => 'subjectID');\n $returnProperties[] = array('ID' => $relationsTestCasesPropertyID, 'name' => 'testCasesIDs');\n $returnProperties[] = array('ID' => $relationsTestCategoriesPropertyID, 'name' => 'testCatIDs');\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $relationsRoundPropertyID, 'value' => $theRoundID);\n $filters[] = array('ID' => $relationsSubjectPropertyID, 'value' => $theSubjectID);\n\n $relations = getFilteredItemsIDs($relationsItemTypeID, $clientID, $filters, $returnProperties);\n\n return $relations;\n}", "public function testGetUnitRelationships()\n {\n }", "function getRoundsForStudy($theStudyID, $clientID) {\n global $definitions;\n\n $roundItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['roundsplanning'], $clientID);\n $roundsAssociatedStudyID = getClientPropertyID_RelatedWith_byName($definitions['roundsplanningAssociatedStudyID'], $clientID);\n\n //First get the relation associated\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $roundsAssociatedStudyID, 'value' => $theStudyID);\n\n $rounds = getFilteredItemsIDs($roundItemTypeID, $clientID, $filters, $returnProperties);\n\n return $rounds;\n\n}", "abstract public function findRelatedRecordsBySubject(): array;", "abstract function relations();", "public static function workflowRelations();", "public function testGetUnitRelationshipTypes()\n {\n }", "public function youCanFetchRelations()\n {\n // Arrange...\n $this->login();\n $lecture = factory(Lecture::class)->make();\n\n // Act...\n $this->json('post', 'lectures', array_merge($lecture->toArray(), [\n 'with' => 'subject'\n ]));\n\n // Assert...\n $this->seeSuccessStructure([\n 'subject'\n ]);\n }", "public function testGetSurveys0()\n {\n }", "public function testGetSurveys0()\n {\n }", "function getStepsScriptsForTestCase($theTC_ID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepDescriptionPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsDescription'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n $stepMainPropertyID = getMainPropertyID($stepsItemTypeID, $clientID);\n $stepStepTypePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsType'], $clientID);\n $stepStepScriptPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsScript'], $clientID);\n\n $typesListID = getAppListID('stepsTypes');\n\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n $finalResult = array();\n //Next, check that has one $relation\n if ((count($relations) - 1) == 0) {\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepMainPropertyID, 'name' => 'stepsMainValue');\n $returnProperties[] = array('ID' => $stepDescriptionPropertyID, 'name' => 'description');\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepStepTypePropertyID, 'name' => 'stepType');\n $returnProperties[] = array('ID' => $stepStepScriptPropertyID, 'name' => 'stepScript');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $theTC_ID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relations[0]['ID']);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n //Get the id of the list client related\n $clientListID = getClientListID_RelatedWith($typesListID, $clientID);\n\n //Get all the values for this list and client\n $ClientValues = getListValues($clientListID, $clientID);\n\n //Add the \"isStep\" parameter\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n //First, encode the name and the description\n $orderedSteps[$i]['stepsMainValue'] = base64_encode($orderedSteps[$i]['stepsMainValue']);\n $orderedSteps[$i]['description'] = base64_encode($orderedSteps[$i]['description']);\n\n //for every system list value, get the client list value\n\n for ($j = 0; $j < count($ClientValues); $j++) {\n if (strcmp($ClientValues[$j]['value'], $orderedSteps[$i]['stepType']) == 0) {\n //get the client id value\n $AppValueID = getAppListValueID_RelatedWith($ClientValues[$j]['valueID'], $clientID);\n\n if ($AppValueID > 0) {\n //Get the app value and add to client values\n $orderedSteps[$i]['scriptAppValue'] = getAppValue($AppValueID);\n } else {\n //Not related. Add an empty value\n $orderedSteps[$i]['scriptAppValue'] = 'undefined';\n }\n break;\n }\n }\n\n //Also, get their units and results\n // get params\n // get checked values\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $theSubjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_ID'] = $p['ID'];\n //Add the result id\n $orderedSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'] = $p['resultID'];\n //Add the execution value\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'] = $p['executionValue'];\n }\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResultDescription') {\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'] = $p['ID'];\n //Add the result id\n $orderedSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'] = $p['resultID'];\n\n }\n }\n $finalResult[] = $orderedSteps[$i];\n }\n\n }\n\n return $finalResult;\n}", "public function getRelations();", "public function getRelations();", "function requirement_get_test_details($req_id, $testset_id) {\n\n\t$tbl_test_req_assoc\t\t\t= TEST_REQ_ASSOC_TBL;\n\t$f_test_req_assoc_id\t\t= $tbl_test_req_assoc .\".\". TEST_REQ_ASSOC_ID;\n\t$f_test_req_assoc_test_id\t= $tbl_test_req_assoc .\".\". TEST_REQ_ASSOC_TEMPEST_TEST_ID;\n\t$f_test_req_assoc_req_id\t= $tbl_test_req_assoc .\".\". TEST_REQ_ASSOC_REQ_ID;\n\t$f_test_req_assoc_percent\t= $tbl_test_req_assoc .\".\". TEST_REQ_ASSOC_PERCENT_COVERED;\n\n\t$ts_assoc_tbl = TEST_TS_ASSOC_TBL;\n\t$f_ts_assoc_id = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_ID;\n\t$f_ts_assoc_ts_id = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_TS_ID;\n\t$f_ts_assoc_test_id = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_TEST_ID;\n\t$f_ts_assoc_test_status = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_STATUS;\n\t$f_ts_assoc_assigned_to = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_ASSIGNED_TO;\n\t$f_ts_assoc_comments = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_COMMENTS;\n\t$f_ts_assoc_timestamp = TEST_TS_ASSOC_TBL. \".\" .TEST_TS_ASSOC_TIMESTAMP;\n\n $tbl_test \t\t= TEST_TBL;\n\t$f_test_id\t\t\t\t= $tbl_test. \".\" .TEST_ID;\n\n\t$q = \"\tSELECT DISTINCT\n\t\t\t\t$f_test_req_assoc_test_id,\n\t\t\t\t$f_test_req_assoc_percent,\n\t\t\t\t$f_ts_assoc_test_status\n\t\t\tFROM $tbl_test_req_assoc\n\t\t\tINNER JOIN $tbl_test\n\t\t\t\tON $f_test_id = $f_test_req_assoc_test_id\n\t\t\tINNER JOIN $ts_assoc_tbl\n\t\t\t\tON $f_test_req_assoc_test_id = $f_ts_assoc_test_id\n\t\t\tWHERE $f_test_req_assoc_req_id = $req_id\n\t\t\t\tAND $f_ts_assoc_ts_id = $testset_id\";\n\n\tglobal $db;\n\n\t$rows = db_fetch_array($db, db_query($db, $q));\n\n\treturn $rows;\n}", "function testRdfsFModel()\n\t{\n\t\t$testURI='http://www.hpl.hp.com/semweb/2003/query_tester#';\n\t\t$testmodel=new MemModel($testURI);\n\t\t$testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf');\n\t\t$i=1;\n\t\tdo \n\t\t{\n\t\t\t$inf= new RDFSBModel();\t\t\n\t\t\t#$inf->addModel($rdfsAxioms);\n\t\t\t$res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null);\n\t\t\tif ($res1->isEmpty())\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t$findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null);\n\t\t\t$inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject());\n\t\n\t\t\t$findDATA=$res1->find(null,new Resource($testURI.'data'),null);\n\t\t\t$inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject());\n\t\t\t\t\t\t\n\t\t\t$findQUERY=$res1->find(null,new Resource($testURI.'query'),null);\n\t\t\t$query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf);\n\t\t\t\n\t\t\t$result = new MemModel();\n\t\t\t$findRESULT=$res1->find(null,new Resource($testURI.'result'),null);\n\t\t\t$result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject());\n\n\t\t\t$isEqual=$query->containsAll($result);\n\t\t\t\n\t\t\tif (!$isEqual)\n\t\t\t{\n\t\t\t\t$query->writeAsHtmlTable();\n\t\t\t\t$result->writeAsHtmlTable();\n\t\t\t\t$subtract=$result->subtract($query);\n\t\t\t\techo '<BR><BR>subtracted<BR>';\n\t\t\t\t$subtract->writeAsHtmlTable();\n\t\t\t\t\n\t\t\t};\n\t\t\t\n\t\t\t$findDATA=$res1->find(null,new Resource($testURI.'description'),null);\n\t\t\techo '<b>'.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)</b><BR>';\n\t\t\t\n\t\t\t$this->assertTrue($isEqual);\n\t\n\t\t} while (true);\t\n\t}", "function getSubjectsForStudy($theStudyID, $clientID) {\n global $definitions;\n\n $subjectItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['subject'], $clientID);\n $subjectStudy_PropID = getClientPropertyID_RelatedWith_byName($definitions['subjectStudyID'], $clientID);\n\n //First get the relation associated\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $subjectStudy_PropID, 'value' => $theStudyID);\n\n $subjects = getFilteredItemsIDs($subjectItemTypeID, $clientID, $filters, $returnProperties);\n\n return $subjects;\n\n}", "public function getRelAll ()\n {\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['rel']));\n }", "function get_rad_surveys($conn, $sup_restriction = NULL, $start_restriction = NULL, $end_restriction = NULL) {\n\t$query_rad = \"SELECT * FROM rad_survey_comment, rad_header WHERE \" .\n\t\t \"rad_survey_comment.header_id = rad_header.header_id \" . \n\t\t ($sup_restriction !== NULL ? (' AND ' . get_sup_filter($sup_restriction, \"rad_header\")) : \"\") . \n\t\t ($start_restriction !== NULL ? (' AND (rad_header.date_start >= \"' . $start_restriction . \n\t\t '\" OR rad_header.date_end >= \"' . $start_restriction . '\") ') : \"\") . \n\t\t ($end_restriction !== NULL ? (' AND (rad_header.date_start <= \"' . $end_restriction . \n\t\t '\" OR rad_header.date_end <= \"' . $end_restriction . '\") ') : \"\");\n\treturn exec_query($conn, $query_rad);\n}", "protected static function _relations() {\n\n\t}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function testCreateUnitRelationships()\n {\n }", "function dbplus_rzap($relation)\n{\n}", "function read_roster($roundid) {\n global $db;\n $roster = array();\n $stmt = $db->prepare('SELECT rosterid, Roster.racerid FROM Roster'\n .' INNER JOIN RegistrationInfo'\n .' ON Roster.racerid = RegistrationInfo.racerid'\n .' WHERE roundid = :roundid'\n .' AND passedinspection = 1'\n .' ORDER BY rosterid');\n $stmt->execute(array(':roundid' => $roundid));\n foreach ($stmt as $row) {\n $roster[] = $row['racerid'];\n }\n return $roster;\n}", "function test_getJoin()\n {\n $question = new MDB_QT(TABLE_QUESTION);\n $joinOn1 = TABLE_QUESTION.'.id='.TABLE_ANSWER.'.question_id';\n $question->setJoin(TABLE_ANSWER, $joinOn1);\n\n $all = array(\n 'default' => array(TABLE_ANSWER => $joinOn1),\n );\n $tables = array(TABLE_ANSWER);\n $right = array();\n $left = array();\n\n $this->assertEqual($all, $question->getJoin());\n $this->assertEqual($tables, $question->getJoin('tables'));\n $this->assertEqual($right, $question->getJoin('right'));\n $this->assertEqual($left, $question->getJoin('left'));\n\n //--------------------------------------------------------\n\n $joinOn2 = TABLE_USER.'.id='.TABLE_ANSWER.'.question_id';\n $question->setRightJoin(TABLE_USER, $joinOn2);\n\n $all = array(\n 'default' => array(TABLE_ANSWER => $joinOn1),\n 'right' => array(TABLE_USER => $joinOn2),\n );\n $tables = array(TABLE_ANSWER, TABLE_USER);\n $right = array(TABLE_USER => $joinOn2);\n $left = array();\n\n $this->assertEqual($all, $question->getJoin());\n $this->assertEqual($tables, $question->getJoin('tables'));\n $this->assertEqual($right, $question->getJoin('right'));\n $this->assertEqual($left, $question->getJoin('left'));\n }", "public function testGetSurvey0()\n {\n }", "public function testGetSurvey0()\n {\n }", "function okrs_relation_data($data, $type, $rel_id, $q)\n{\n\n $CI = &get_instance();\n $CI->load->model('okr/okr_model');\n\n if ($type == 'okrs') {\n if ($rel_id != '') {\n $data = $CI->okr_model->get_okrs($rel_id);\n } else {\n $data = [];\n }\n }\n return $data;\n}", "function test_getTrendingPromptrs()\n {\n $name = \"mikes 5 top interview questions\";\n $topic_id = 5;\n $trending_index = 3;\n $test_promptr = new Promptr($name, $topic_id, $trending_index);\n $test_promptr->save();\n\n $name2 = \"mikes 50 top interview questions\";\n $trending_index2 = 4;\n $test_promptr2 = new Promptr($name2, $topic_id, $trending_index2);\n $test_promptr2->save();\n\n $name3 = \"mikes 500 top interview questions\";\n $trending_index3 = 5;\n $test_promptr3 = new Promptr($name3, $topic_id, $trending_index3);\n $test_promptr3->save();\n\n $name4 = \"mikes 5000 top interview questions\";\n $trending_index4 = 6;\n $test_promptr4 = new Promptr($name4, $topic_id, $trending_index4);\n $test_promptr4->save();\n\n $name5 = \"mikes 50000 top interview questions\";\n $trending_index5 = 7;\n $test_promptr5 = new Promptr($name5, $topic_id, $trending_index5);\n $test_promptr5->save();\n\n $name6 = \"mikes 500000 top interview questions\";\n $trending_index6 = 8;\n $test_promptr6 = new Promptr($name6, $topic_id, $trending_index6);\n $test_promptr6->save();\n\n //Act\n $result = Promptr::getTrendingPromptrs();\n\n //Assert\n $this->assertEquals([$test_promptr6, $test_promptr5, $test_promptr4, $test_promptr3, $test_promptr2], $result);\n }", "function getPersons(){\n\t\t \n\t\t $linksObj = new dbXML_dbLinks;\n\t\t $creatorRels = $linksObj->relToCreator;\n\t\t $contribRels = $linksObj->relToContributor;\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT actTab.uuid, links.targ_uuid, links.link_type,\n\t\t persons.combined_name, persons.last_name, persons.first_name, persons.mid_init\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN links ON actTab.uuid = links.origin_uuid\n\t\t JOIN persons ON persons.uuid = links.targ_uuid\n\t\t WHERE links.targ_type LIKE '%person%' ;\n\t\t \";\n\t\t \n\t\t $resultA = $db->fetchAll($sql);\n\t\t \n\t\t $sql =\t\"\t\n\t\t\t\tSELECT actTab.uuid, links.targ_uuid, links.link_type, \n\t\t\t\tusers.combined_name, users.last_name, users.first_name, users.mid_init\n\t\t\t\tFROM \".$this->penelopeTabID.\" AS actTab\n\t\t\t\tJOIN links ON actTab.uuid = links.origin_uuid\n\t\t\t\tJOIN users ON users.uuid = links.targ_uuid\n\t\t\t\tWHERE links.targ_type LIKE '%person%'\n\t\t\t\t \n\t\t\t\t\";\n\t\t \n\t\t $resultB = $db->fetchAll($sql);\n\t\t if($resultA && $resultB){\n\t\t\t\t$result = array();\n\t\t\t\tforeach($resultA as $row){\n\t\t\t\t\t $ukey = md5($row[\"uuid\"].$row[\"targ_uuid\"].$row[\"link_type\"]);\n\t\t\t\t\t $result[$ukey] = $row;\n\t\t\t\t}\n\t\t\t\tforeach($resultB as $row){\n\t\t\t\t\t $ukey = md5($row[\"uuid\"].$row[\"targ_uuid\"].$row[\"link_type\"]);\n\t\t\t\t\t if(!array_key_exists($ukey, $result)){\n\t\t\t\t\t\t $result[$ukey] = $row;\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t elseif($resultB && !$resultA){\n\t\t\t\t$result = $resultB;\n\t\t }\n\t\t elseif(!$resultB && $resultA){\n\t\t\t\t$result = $resultA;\n\t\t }\n\t\t \n\t\t if($result){\n\t\t\t\t\n\t\t\t\t$rawCreators = array();\n\t\t\t\t$rawContributors = array();\n\t\t\t\t$persons = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $uuid = $row[\"targ_uuid\"];\n\t\t\t\t\t $uri = self::personBaseURI.$uuid;\n\t\t\t\t\t $name = $row[\"combined_name\"];\n\t\t\t\t\t $linkType = $row[\"link_type\"];\n\t\t\t\t\t if(in_array($linkType, $creatorRels)){\n\t\t\t\t\t\t if(!array_key_exists($uri, $rawCreators)){\n\t\t\t\t\t\t\t\t$rawCreators[$uri] = array(\"name\" => $name, \"count\" => 1);\n\t\t\t\t\t\t\t\t$rawCreators[$uri][\"rel\"] = $this->getLinkedPerson($uuid);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t$rawCreators[$uri][\"count\"] ++ ; \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t elseif(in_array($linkType, $contribRels)){\n\t\t\t\t\t\t if(!array_key_exists($uri, $rawContributors)){\n\t\t\t\t\t\t\t\t$rawContributors[$uri] = array(\"name\" => $name, \"count\" => 1);\n\t\t\t\t\t\t\t\t$rawContributors[$uri][\"rel\"] = $this->getLinkedPerson($uuid);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t$rawContributors[$uri][\"count\"] = $rawContributors[$uri][\"count\"] + 1; \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t if(!array_key_exists($uri, $persons)){\n\t\t\t\t\t\t $persons[$uri] = array(\"name\" => $name, \"count\" => 1);\n\t\t\t\t\t\t $persons[$uri][\"rel\"] = $this->getLinkedPerson($uuid);\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t $persons[$uri][\"count\"] ++ ; \n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//combine URIs for the same person, choose the URI with the most associated items\n\t\t\t\t$rawCreators = $this->consolidateRelatedURIs($rawCreators);\n\t\t\t\t$rawContributors = $this->consolidateRelatedURIs($rawContributors);\n\t\t\t\t$persons = $this->consolidateRelatedURIs($persons);\n\t\t\t\t\n\t\t\t\t//sort the array by count, from high to low\n\t\t\t\t$rawCreators = $this->orderURIs($rawCreators);\n\t\t\t\t$rawContributors = $this->orderURIs($rawContributors);\n\t\t\t\t$persons = $this->orderURIs($persons);\n\t\t\t\t\n\t\t\t\t$this->rawCreators = $rawCreators;\n\t\t\t\t$this->rawContributors = $rawContributors;\n\t\t\t\t$this->rawLinkedPersons = $persons;\n\t\t\t\t\n\t\t }\n\t }", "function get_rad_survey_labs($conn, $survey_id) {\n\t$query_labs = \"SELECT building, room FROM rad_survey_labs WHERE survey_id = \" . $survey_id;\n\treturn exec_query($conn, $query_labs);\n}", "public function testGetAllAssociated()\n {\n $this->setUp();\n $users = new Users(self::$config);\n $admin = $users->get(1);\n $student = $users->get(3);\n $injuries = new Injuries(self::$config);\n\n $reports = $injuries->getAllAssociated($admin);\n\n $this->assertNotNull($reports);\n $this->assertEquals(5, count($reports));\n\n // There are 3 where this student is involved\n $reports = $injuries->getAllAssociated($student);\n\n $this->assertNotNull($reports);\n $this->assertEquals(3, count($reports));\n }", "function testGetCriteria()\n {\n $criteria1 = $this->RubricsCriteria->getCriteria(1);\n // Compare result to fixture data\n $this->assertTrue(!empty($criteria1));\n $this->assertNotNull($criteria1);\n $this->assertEqual($criteria1[0]['RubricsCriteria']['criteria'],\n 'Participated in Team Meetings');\n $this->assertEqual($criteria1[1]['RubricsCriteria']['criteria'],\n 'Was Helpful and Co-operative');\n $this->assertEqual($criteria1[2]['RubricsCriteria']['criteria'],\n 'Submitted Work on Time');\n\n }", "public function test_rel(){\n\t\t//$data1 = array('name'=>'jack','age'=>24);\n\t\t//$a->data($data1)->save();\n\n\t\t//$a = new article();\n\t\t//$a->data(array('title'=>'art1','content'=>'test'))->save();\n\t\t//$a = new user_article_author();\n\t\t//$a->data(array('user_id'=>1,'article_id'=>1,'status'=>'open'))->save();\n\t\t$a = new user_article_author();\n\t\t$b = $a->rel();\n\t\tdump ($b->where('user.user_id = 1')->select());\n\t\tdump($b->sql);\n\t}", "public function findrelation(){\n\t\t$famid = \\Input::get('fid'); \n\t\t$memid1 = \\Input::get('rfid1');\n\t\t$memid2 = \\Input::get('rfid2');\n\t\tMisc::isfam_valid($famid,\"Show\");\n\n\t\tif($memid1 == $memid2) return \\Response::make(\"SELF\");\n\t\t$famgraph = new FamilyGraph($famid);\n \t \t\n \t \t$relation = $famgraph->FindRelationsBetween($memid1,$memid2) ;\n \t \treturn \\Response::make(Misc::get_relation_in_mylang($relation) );\n\t}", "public function getStaffQualifications() {\r\n //Query statement\r\n $query = \"SELECT [concept_name] AS [qualification] FROM [dbo].[concept] \r\n WHERE (([concept].[concept_ID_parent]) In (880,881,885,1494,1495,1498,1623,1624))\r\n ORDER BY [concept_ID_parent], [sort_weight];\";\r\n //Prepare the query statement\r\n $stmt = $this->conn->prepare($query);\r\n\r\n //Execute query statement\r\n $stmt->execute();\r\n return $stmt;\r\n }", "public function testGetSurveyResponses0()\n {\n }", "public function testGetSurveyResponses0()\n {\n }", "function get_AllSurveys(){\r\n $sql = $this->db->prepare(\"SELECT DISTINCT s.SurveyID, s.SurveyTitle, s.DatePosted FROM SURVEYLOOKUP L LEFT JOIN SURVEY s ON s.SurveyID = L.SurveyID\r\n WHERE :chamberid = L.ChamberID or :chamberid = L.RelatedChamber ORDER BY s.DatePosted DESC;\");\r\n $result = $sql->execute(array(\r\n \"chamberid\" => $_SESSION['chamber']\r\n ));\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function getWithRelations();", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "function updateAutomatedResultForATestCase($testCaseID, $subjectID, $roundID, $clientID) {\n global $definitions;\n\n //DEFINITIONS FOR ITEM TYPES\n $resultsRelationsID = getClientItemTypeID_RelatedWith_byName($definitions['automatizationResultsRelations'], $clientID);\n\n //DEFINITIONS FOR PROPERTIES\n $parentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n $parentStudyForSubjectPropertyID = getClientPropertyID_RelatedWith_byName($definitions['subjectStudyID'], $clientID);\n $autResRelRoundPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsRoundID'], $clientID);\n $autResRelSubjectPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsSubjectID'], $clientID);\n $autResRelParentCatPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsTestCategoryParentID'], $clientID);\n $autResRelCatPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsTestCategoryID'], $clientID);\n $autResRelTestCasesCountPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsTestCasesCount'], $clientID);\n $autResRelTestCasesOKPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsTestCasesOKCount'], $clientID);\n $autResRelTestCasesNOKPropertyID = getClientPropertyID_RelatedWith_byName($definitions['automatizationResultsRelationsTestCasesNOKCount'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Next, get the parentID value\n $parentFolderID = getItemPropertyValue($testCaseID, $parentTestCategoryPropertyID, $clientID);\n\n //Get the studyID value for this subject\n $studyID = getItemPropertyValue($subjectID, $parentStudyForSubjectPropertyID, $clientID);\n\n //We need also, the related items\n $relations = getRelations($roundID, $subjectID, $clientID);\n\n //When we've the relations, we need count the steps for every test\n if (count($relations) - 1 == 0) {\n $theTestCases = explode(\",\", $relations[0]['testCasesIDs']);\n\n $totalTc = 0;\n $totalOK = 0;\n $totalNOK = 0;\n\n //Get directly testcases that are related\n $relatedTestCases = getFilteredTestCasesInsideCategory($parentFolderID, $theTestCases, $clientID);\n\n foreach ($relatedTestCases as $tc) {\n $detailedTc = getTestCaseData($tc['ID'], $subjectID, $roundID, $studyID, $clientID);\n\n //print(\"DetailedTC for tc \".$tc['ID'].\" in testCategory $testCategory \\n\\r\");\n //print_r($detailedTc);\n\n if ($detailedTc != null) {\n //print (\"process automated testcase \".$tc['ID'].\":\\n\\r\" );\n //print(\"TestCase Data for testCase \".$tc['ID'].\":\\n\\r\");\n //print_r($detailedTc);\n\n $totalTc++;\n $counter = 0;\n $counterOK = 0;\n $counterNOK = 0;\n\n //Search their steps results for Selenium results\n while (isset($detailedTc['STEP_ID_' . $counter])) {\n\n if (isset($detailedTc['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $counter])) {\n if (base64_decode($detailedTc['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $counter]) == 'OK') {\n $counterOK++;\n\n } elseif (base64_decode($detailedTc['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $counter]) == 'NOK') {\n $counterNOK++;\n\n }\n }\n $counter++;\n }//End while\n\n //Check if the final state for the tc is ok, nok or not executed\n if ($counterNOK > 0) {\n //Any step nok. Final result NOK\n $totalNOK++;\n } else {\n if ($counterOK > 0) {\n //NOK = 0, any tc OK. Final result OK\n $totalOK++;\n } else {\n //all values 0.Do nothing\n }\n }\n } //End if detailed TC\n\n }//End foreach related test cases\n\n //Finally, check if relation results exists for this relation, round and testCategory\n if ($totalTc > 0) {\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $autResRelRoundPropertyID, 'value' => $roundID);\n $filters[] = array('ID' => $autResRelSubjectPropertyID, 'value' => $subjectID);\n $filters[] = array('ID' => $autResRelCatPropertyID, 'value' => $parentFolderID);\n\n // get relations\n $resultRelation = getFilteredItemsIDs($resultsRelationsID, $clientID, $filters, $returnProperties);\n\n if (count($resultRelation) - 1 == 0) {\n //exists\n //Update the values\n //print (\"updating total tc for itemRelation: TestCategory: $testCategory, RoundID: $roundID, SubjectID: $subject, totalTC value:$totalTc \\n\\r\");\n //flush();\n setPropertyValueByID($autResRelTestCasesCountPropertyID, $resultsRelationsID, $resultRelation[0]['ID'], $clientID, $totalTc);\n\n //print (\"updating tc OK for itemRelation: TestCategory: $testCategory, RoundID: $roundID, SubjectID: $subject, testCases OK value:$totalOK \\n\\r\");\n //flush();\n setPropertyValueByID($autResRelTestCasesOKPropertyID, $resultsRelationsID, $resultRelation[0]['ID'], $clientID, $totalOK);\n\n //print (\"updating tc NOK for itemRelation: TestCategory: $testCategory, RoundID: $roundID, SubjectID: $subject, testCases NOK value:$totalNOK \\n\\r\");\n //flush();\n setPropertyValueByID($autResRelTestCasesNOKPropertyID, $resultsRelationsID, $resultRelation[0]['ID'], $clientID, $totalNOK);\n\n } else {\n if (count($resultRelation) - 1 > 0) {\n //error. More than 1 relation\n print(\"Error. Found more than one automated results relation:\\n\");\n print_r($resultRelation);\n flush();\n exit ;\n } else {\n //does not exists\n //Create a new relation\n //First, get the parent TCategory\n\n $parentCategoryID = getItemPropertyValue($parentFolderID, $categoryParentPropertyID, $clientID);\n //print(\"Parent category id for testCategory $testCategory = $parentCategoryID \\n\\r\");\n //flush();\n $propertiesValues = array( array('ID' => $autResRelRoundPropertyID, 'value' => $roundID), array('ID' => $autResRelSubjectPropertyID, 'value' => $subjectID), array('ID' => $autResRelCatPropertyID, 'value' => $parentFolderID), array('ID' => $autResRelParentCatPropertyID, 'value' => $parentCategoryID), array('ID' => $autResRelTestCasesCountPropertyID, 'value' => $totalTc), array('ID' => $autResRelTestCasesOKPropertyID, 'value' => $totalOK), array('ID' => $autResRelTestCasesNOKPropertyID, 'value' => $totalNOK));\n\n }//end if count resultRelation>0\n\n }//end if count resultRelation==0\n }//End if totalTC>0\n\n }//End if count relations\n\n}", "function ros_get_typergradesfull($sid, $orderby=-1, $desc=false) {\n global $DB, $CFG;\n $params = array();\n $toreturn = array();\n $gradestblname = $CFG->prefix.\"roshine_grades\";\n $userstblname = $CFG->prefix.\"user\";\n $exertblname = $CFG->prefix.\"roshine_exercises\";\n $atttblname = $CFG->prefix.\"roshine_attempts\";\n $sql = \"SELECT \".$gradestblname.\".id, \"\n .$userstblname.\".firstname, \"\n .$userstblname.\".lastname, \"\n .$userstblname.\".id as u_id, \"\n .$gradestblname.\".pass, \"\n .$atttblname.\".ros_suspicion, \"\n .$gradestblname.\".mistakes, \"\n .$gradestblname.\".timeinseconds, \"\n .$gradestblname.\".hitsperminute, \"\n .$gradestblname.\".fullhits, \"\n .$gradestblname.\".precisionfield, \"\n .$gradestblname.\".timetaken, \"\n .$exertblname.\".exercisename, \"\n .$gradestblname.\".wpm\".\n \" FROM \".$gradestblname.\n \" LEFT JOIN \".$userstblname.\" ON \".$gradestblname.\".userid = \".$userstblname.\".id\".\n \" LEFT JOIN \".$exertblname.\" ON \".$gradestblname.\".exercise = \".$exertblname.\".id\".\n \" LEFT JOIN \".$atttblname.\" ON \".$atttblname.\".id = \".$gradestblname.\".attemptid\".\n \" WHERE roshine=\".$sid;\n if ($orderby == 0 || $orderby == -1) {\n $oby = \" ORDER BY \".$gradestblname.\".id\";\n } else if ($orderby == 1) {\n $oby = \" ORDER BY \".$userstblname.\".firstname\";\n } else if ($orderby == 2) {\n $oby = \" ORDER BY \".$userstblname.\".lastname\";\n } else if ($orderby == 3) {\n $oby = \" ORDER BY \".$atttblname.\".ros_suspicion\";\n } else if ($orderby == 4) {\n $oby = \" ORDER BY \".$gradestblname.\".mistakes\";\n } else if ($orderby == 5) {\n $oby = \" ORDER BY \".$gradestblname.\".timeinseconds\";\n } else if ($orderby == 6) {\n $oby = \" ORDER BY \".$gradestblname.\".hitsperminute\";\n } else if ($orderby == 7) {\n $oby = \" ORDER BY \".$gradestblname.\".fullhits\";\n } else if ($orderby == 8) {\n $oby = \" ORDER BY \".$gradestblname.\".precisionfield\";\n } else if ($orderby == 9) {\n $oby = \" ORDER BY \".$gradestblname.\".timetaken\";\n } else if ($orderby == 10) {\n $oby = \" ORDER BY \".$exertblname.\".exercisename\";\n } else if ($orderby == 12) {\n $oby = \" ORDER BY \".$gradestblname.\".wpm\";\n } else {\n $oby = \"\";\n }\n $sql .= $oby;\n if ($desc) {\n $sql .= \" DESC\";\n }\n if ($grades = $DB->get_records_sql($sql, $params)) {\n return $grades;\n }\n return false;\n}", "protected function setUp()\n {\n \t$this->wildcardStringMatchType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:search:wildcard\");\n \n \t$this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG');\n $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS');\n\n\t \t$this->manager = $this->sharedFixture['CourseManager'];\n $this->session = $this->manager->getCourseOfferingSearchSessionForCatalog($this->mcugId);\n $this->object = $this->session->getCourseOfferingQuery();\n \n $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201');\n $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104');\n $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890');\n $this->termId2 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200790');\n \n $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS');\n $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM');\n $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS');\n $this->geolSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/GEOL');\n $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM');\n $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED');\n $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI');\n $this->natsciDivTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI');\n $this->ugLevelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/level/UG');\n\t\t\n\t\t$this->instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors');\n\t\t$this->weeklyScheduleType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:weekly_schedule');\n\t\t$this->enrollmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:enrollment');\n\t\t$this->otherType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:other');\n\t\t\n\t\t$this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LCT');\n\t\t$this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LAB');\n\t\t$this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/DSC');\n\t\t\n \t$this->barryId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000002');\n \t$this->calvinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000003');\n \t\n \t$this->mbh216Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/216');\n \t$this->mbh560Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/560');\n \t$this->mainCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/M');\n \t$this->breadloafCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/BL');\n\n }", "abstract public static function relations() : ? array;", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "function get_radiolog(){\n\t$conn = connect();\n\t$sql = \"select u.person_id, first_name, last_name from persons p join users u on p.person_id=u.person_id where u.CLASS='r'\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$count = 0;\n\n\twhile($row = oci_fetch_assoc($statement)){\n\t\t$ret[$count] = $row;\n\t\t$count = $count + 1; \n\t}\n\toci_free_statement($statement);\n\toci_close($conn);\n\treturn $ret;\n}", "function get_rad_survey_results($conn, $survey_id) {\n\t$query_results = \"SELECT * FROM rad_survey_result WHERE survey_id = \" . $survey_id;\n\treturn exec_query($conn, $query_results);\n}", "public function testProfilePrototypeGetReviews()\n {\n\n }", "function subjectData() {\r\n\t\t$sql = \"SELECT a.*, s.*, f.*, c.*\r\n\t\t\tFROM assignment a \r\n\t\t\tINNER JOIN subject s ON s.subjectid = a.subjectid\r\n\t\t\tINNER JOIN audio_file f ON f.audioid = a.audioid\r\n\t\t\tINNER JOIN audio_category_bridge ac ON ac.audioid = a.audioid\r\n\t\t\tINNER JOIN audio_category c ON c.categoryid = ac.categoryid\r\n\t\tWHERE \r\n\t\t\t(a.active + s.active + f.active + c.active) = 4 \r\n\t\t\tAND s.subjectid = {$this->userid}\";\r\n\t\treturn $this->db->query($sql);\r\n\t}", "public function getTests()\n {\n return $this->hasMany(Tests::className(), ['quest_id' => 'id']);\n }", "public function getRelationList();", "function roshine_get_participants($roshineid) {\n return false;\n}", "function meetsPrerequisite($clid, $course_dept,$course_num,$semester,$year,$section){\n\t$meetsPrereqSet = mysql_query(\"select * from ((select prim_key from requisite R,take T where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and T.clid='$clid' and T.course_num=R.req_course_num and T.course_dept=R.req_course_dept and (T.grade <= R.grade or T.grade is null) and T.grade <> 'W' and T.grade <> 'I' and T.grade <> 'F') union all (select prim_key from requisite R,spec_cred S where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and S.clid='$clid' and S.course_num=R.req_course_num and S.course_dept=R.req_course_dept and (S.grade <= R.grade or S.grade is null) and S.grade <> 'W' and S.grade <> 'I' and S.grade <> 'F') union all (select prim_key from requisite R,take T,counts_for C where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and T.clid='$clid' and T.course_num=C.course_num and T.course_dept=C.course_dept and C.sub_course_num=R.course_num and C.sub_course_dept=R.course_dept and (T.grade <= R.grade or T.grade is null) and T.grade <> 'W' and T.grade <> 'I' and T.grade <> 'F') union all (select prim_key from requisite R,spec_cred S,counts_for C where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and S.clid='$clid' and S.course_num=C.course_num and S.course_dept=C.course_dept and C.sub_course_num=R.course_num and C.sub_course_dept=R.course_dept and (S.grade <= R.grade or S.grade is null) and S.grade <> 'W' and S.grade <> 'I' and S.grade <> 'F') union all (select prim_key from class_requisite R,take T where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and R.semester='$semester' and R.year='$year' and R.section_num='$section' and T.clid='$clid' and T.course_num=R.req_course_num and T.course_dept=R.req_course_dept and (T.grade <= R.grade or T.grade is null) and T.grade <> 'W' and T.grade <> 'I' and T.grade <> 'F') union all (select prim_key from class_requisite R,spec_cred S where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.semester='$semester' and R.year='$year' and R.section_num='$section' and R.type='P' and S.clid='$clid' and S.course_num=R.req_course_num and S.course_dept=R.req_course_dept and (S.grade <= R.grade or S.grade is null) and S.grade <> 'W' and S.grade <> 'I' and S.grade <> 'F') union all (select prim_key from class_requisite R,take T,counts_for C where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.semester='$semester' and R.year='$year' and R.section_num='$section' and R.type='P' and T.clid='$clid' and T.course_num=C.course_num and T.course_dept=C.course_dept and C.sub_course_num=R.course_num and C.sub_course_dept=R.course_dept and (T.grade <= R.grade or T.grade is null) and T.grade <> 'W' and T.grade <> 'I' and T.grade <> 'F') union all (select prim_key from class_requisite R,spec_cred S,counts_for C where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.semester='$semester' and R.year='$year' and R.section_num='$section' and R.type='P' and S.clid='$clid' and S.course_num=C.course_num and S.course_dept=C.course_dept and C.sub_course_num=R.course_num and C.sub_course_dept=R.course_dept and (S.grade <= R.grade or S.grade is null) and S.grade <> 'W' and S.grade <> 'I' and S.grade <> 'F')) as result group by prim_key having count(*)=(select count(*) from requisite R where R.course_num='$course_num' and R.course_dept='$course_dept' and R.course_dept <> 'INST' and R.type='P' and R.prim_key=result.prim_key);\") or die(mysql_error());\n\t$act_composite=calculateAct($clid);\n\t$ACTquery=mysql_query(\"select * from course C,student S where S.clid='$clid' and (C.act_composite='$act_composite' or C.act_math=S.act_math or C.act_english=S.act_english or C.act_reading=S.act_reading or C.act_science=S.act_science);\") or die(mysql_error());\n\tif((mysql_fetch_array($meetsPrereqSet)) or (mysql_fetch_array($ACTquery))) return true;\n\telse return false;\n\n}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testProfilePrototypeFindByIdReviews()\n {\n\n }", "abstract public function included(): ?JsonApiParser\\Collections\\Relations;", "public static function main()\n\t{\n\t\trequire_once \"PHPUnit/TextUI/TestRunner.php\";\n\n\t\t$suite = new PHPUnit_Framework_TestSuite(\"RelationsTest\");\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "function getDemographicsDrillDownTableRelationship($params)\n\t{\n\t\t$response = array();\n\t\t$company_id = !empty($params['companyId']) ? $params['companyId'] : (!empty($params['companyid']) ? $params['companyid'] : '');\n\t\t$campaign_ids = !empty($params['campaignId']) ? $params['campaignId'] : (!empty($params['campaignid']) ? $params['campaignid'] : '');\n\t\t\n\t\t$sort = !empty($params['sort']) ? $params['sort'] : '';\n\t\t$sort_order = !empty($params['sortOrder']) ? $params['sortOrder'] : (!empty($params['sortorder']) ? $params['sortorder'] : 'asc');\n\t\t\n\t\tif(empty($campaign_ids))\n\t\t{\n\t\t\t\n\t\t\t$arr_campaign_ids = array(-1);\n\t\t\t$rs = Database::mysqli_query(\"select id as campaign_id from items where manufacturer_id = '$company_id'\");\n\t\t\twhile($row = Database::mysqli_fetch_assoc($rs))\n\t\t\t\t$arr_campaign_ids[] = $row['campaign_id'];\n\t\t\t$campaign_ids = implode(',', $arr_campaign_ids);\n\t\t\t\n\t\t\t$where_clause_views = \" and iv.company_id = '$company_id'\";\n\t\t\t$where_clause_shares = \" and r.company_id = '$company_id'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$where_clause_views = \" and iv.items_id in (\" . $campaign_ids. \")\";\n\t\t\t$where_clause_shares = \" and r.item_shared in (\" . $campaign_ids. \")\";\n\t\t}\n\t\t$where_clause_claims = \" and ui.item_id in (\" . $campaign_ids. \")\";\n\t\t\n\t\t// SQL to find the number of entrants\n\t\t$sql = \"select u.relationship_status, count(t2.user_id) as num_users from\n\t\t(\n\t\t\tselect distinct(t.user_id) as user_id from\n\t\t\t(select iv.user_id from items_views iv where iv.user_id > 0 $where_clause_views\n\t\t\tunion all \n\t\t\tselect ui.user_id from user_items ui where ui.user_id > 0 $where_clause_claims \n\t\t\tunion all \n\t\t\tselect r.user_id from referrals r where r.user_id > 0 $where_clause_shares\n\t\t\t) as t\n\t\t) as t2\n\t\tinner join users u on t2.user_id = u.id\n\t\t group by u.relationship_status \";\n\t\t // error_log(\"SQL for finding num users inarr_users CSAPI::getDemographicsDrillDownTableRelationship(): \" . $sql);\n\t\t$arr_users = array();\n\t\t$total_num_users = 0;\n\t\t$response['data'] = array(); // Data\n\t\t\n\t\t$rs = Database::mysqli_query($sql);\n\t\twhile($row = Database::mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t$relationship_status = $row['relationship_status'];\n\t\t\t$num_users = $row['num_users'] + 0;\n\t\t\t$arr_users[$relationship_status] = $num_users;\n\t\t\t$total_num_users += $num_users;\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t\t$sql =\t\" select relationship_status, sum(views) as views, sum(claims) as claims, sum(redeems) as redeems, sum(shares) as shares, sum(referrals) as referrals from\n\t\t(select u.relationship_status, 'view' as activity_type, count(iv.id) as views, 0 as claims, 0 as redeems, 0 as shares, 0 as referrals from items_views iv inner join users u on iv.user_id = u.id where iv.user_id > 0 and u.is_test_account != 1 $where_clause_views group by u.relationship_status \n\t\tunion all \n\t\tselect u.relationship_status, 'claim' as activity_type, 0 as views, count(ui.id) as claims, 0 as redeems, 0 as shares, 0 as referrals from user_items ui inner join users u on ui.user_id = u.id where ui.date_claimed is not null and ui.user_id > 0 and u.is_test_account != 1 $where_clause_claims group by u.relationship_status\n\t\tunion all\n\t\tselect u.relationship_status, 'redeem' as activity_type, 0 as views, 0 as claims, count(ui.id) as redeems, 0 as shares, 0 as referrals from user_items ui inner join users u on ui.user_id = u.id where ui.date_redeemed is not null and ui.user_id > 0 and u.is_test_account != 1 $where_clause_claims group by u.relationship_status\n\t\tunion all\n\t\tselect u.relationship_status, 'share' as activity_type, 0 as views, 0 as claims, 0 as redeems, count(r.id) as shares, 0 as referrals from referrals r inner join users u on r.user_id = u.id where r.user_id > 0 and u.is_test_account != 1 $where_clause_shares group by u.relationship_status\n\t\tunion all \n\t\tselect u.relationship_status, 'referral' as activity_type, 0 as views, 0 as claims, 0 as redeems, 0 as shares, count(ui.id) as referrals from user_items ui inner join users u on ui.user_id = u.id where ui.referral_id is not null and ui.date_claimed is not null and ui.user_id > 0 and u.is_test_account != 1 $where_clause_claims group by u.relationship_status\n\t\t) as t\n\t\t group by relationship_status\";\n\t\t// error_log(\"SQL in CSAPI::getDemographicsDrillDownTableRelationship() : \" . $sql);\n\t\t\n\t\t$rs = Database::mysqli_query($sql);\n\t\t\n\t\t$total_views\t= 0;\n\t\t$total_claims\t= 0;\n\t\t$total_redeems\t= 0;\n\t\t$total_shares\t= 0;\n\t\t$total_referrals = 0;\n\t\t\n\t\twhile($row = Database::mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t// $activity_count = $row['activity_count'] + 0;\n\t\t\t// $activity_type = $row['activity_type'];\n\t\t\t$relationship_status = $row['relationship_status'];\n\t\t// if(!isset($response[$age_range_name][$gender][$activity_type]))\n\t\t\t//\t$response[$age_range_name][$gender][$activity_type] = 0;\n\t\t\t//\t$response[$age_range_name][$gender][$activity_type] += $activity_count;\n\t\t\t\n\t\t\t$users = isset($arr_users[$relationship_status]) ? $arr_users[$relationship_status] : 0;\n\t\t\t$views = $row['views'] + 0;\n\t\t\t$claims = $row['claims'] + 0;\n\t\t\t$redeems = $row['redeems'] + 0;\n\t\t\t$shares = $row['shares'] + 0;\n\t\t\t$referrals = $row['referrals'] + 0;\n\t\t\t\n\t\t\t$total_views\t+= $views;\n\t\t\t$total_claims\t+= $claims;\n\t\t\t$total_redeems\t+= $redeems;\n\t\t\t$total_shares\t+= $shares;\n\t\t\t$total_referrals += $referrals;\n\t\t\n\t\t\t\n\t\t\t$relationship_status = !empty($row['relationship_status']) ? $row['relationship_status'] : 'Not Provided';\n\t\t\t$tmp_data = array(\n\t\t\t\t'relationship_status' => $relationship_status,\n\t\t\t\t'users' => $users,\n\t\t\t\t'views' => $views,\n\t\t\t\t'claims' => $claims,\n\t\t\t\t'redeems' => $redeems,\n\t\t\t\t'shares' => $shares,\n\t\t\t\t'referrals' => $referrals,\n\t\t\t);\n\t\t\t\n\t\t\t$response['data'][] = $tmp_data;\n\t\t\t\n\t\t}\n\t\t\n\t\tforeach($response['data'] as $i => $tmp_data) \n\t\t{\n\t\t\t$response['data'][$i]['percent_users'] = !empty($total_num_users) ? round(($response['data'][$i]['users'] * 100) / $total_num_users, 1) : 0;\n\t\t\t$response['data'][$i]['percent_views'] = !empty($total_views) ? round(($response['data'][$i]['views'] * 100) / $total_views, 1) : 0;\n\t\t\t$response['data'][$i]['percent_claims'] = !empty($total_claims) ? round(($response['data'][$i]['claims'] * 100) / $total_claims, 1) : 0;\n\t\t\t$response['data'][$i]['percent_redeems'] = !empty($total_redeems) ? round(($response['data'][$i]['redeems'] * 100) / $total_redeems, 1) : 0;\n\t\t\t$response['data'][$i]['percent_shares'] = !empty($total_shares) ? round(($response['data'][$i]['shares'] * 100) / $total_shares, 1) : 0;\n\t\t\t$response['data'][$i]['percent_referrals'] = !empty($total_referrals) ? round(($response['data'][$i]['referrals'] * 100) / $total_referrals, 1) : 0;\n\t\t}\n\t\tif(!empty($sort))\n\t\t\tCommon::multiSortArrayByColumn($response['data'], $sort, $sort_order);\n\t\t\n\t\t$response['categories'] = array(\n\t\t\t\t'relationship_status',\n\t\t\t\t'users',\n\t\t\t\t'views', \n\t\t\t\t'claims', \n\t\t\t\t'redeems', \n\t\t\t\t'shares',\n\t\t\t\t'referrals',\n\t\t\t\t'percent_users',\n\t\t\t\t'percent_views',\n\t\t\t\t'percent_claims',\n\t\t\t\t'percent_redeems',\n\t\t\t\t'percent_shares',\n\t\t\t\t'percent_referrals'\n\t\t); \n\t\t\t\t\n\t\t$response['settings'] = $params;\n\t\t/*\n\t\t$html = '<table role=\"grid\" style=\"width: 100%; margin-bottom: 0px;\">\n\t\t <thead>\n\t\t <tr>\n\t\t <th width=\"50%\">Relationship Status</th>\n\t\t <th width=\"10%\">Users</th>\n\t\t <th width=\"10%\">Views</th>\n\t\t <th width=\"10%\">Claims</th>\n\t\t <th width=\"10%\">Shares</th>\n\t\t <th width=\"10%\">Redeems</th>\n\t \t</tr>\n\t\t </thead>\n\t\t <tbody>';\n\t\tforeach($response as $relationship_status => $data)\n\t\t{\n\t\t\t$country = 'US'; // Hard coded for now\n\t\t\t$views =\t!empty($data['view']) ? $data['view'] : 0;\n\t\t\t$claims =\t!empty($data['claim']) ? $data['claim'] : 0;\n\t\t\t$redeems =\t!empty($data['redeem']) ? $data['redeem'] : 0;\n\t\t\t$shares =\t!empty($data['share']) ? $data['share'] : 0;\n\t\t\t$referrals = !empty($data['referral']) ? $data['referral'] : 0;\n\t\t\t\n\t\t\t$users = isset($arr_users[$relationship_status]) ? $arr_users[$relationship_status] : 0;\n\t\t\t$percent_users = round(($users * 100) / $total_num_users, 1);\n\t\t\t$percent_views = round(($views * 100) / $total_num_users, 1);\n\t\t\t$percent_claims = round(($claims * 100) / $total_num_users, 1);\n\t\t\t$percent_redeems = round(($redeems * 100) / $total_num_users, 1);\n\t\t\t$percent_shares = round(($shares * 100) / $total_num_users, 1);\n\t\t\t$percent_referrals = round(($referrals * 100) / $total_num_users, 1);\n\n\t\t\t$html .= \"<tr>\n\t\t <td>$relationship_status</td>\n\t\t <td>$users ($percent_users%)</td>\n\t\t <td>$views ($percent_views%)</td>\n\t\t <td>$claims ($percent_claims%)</td>\n\t\t <td>$shares ($percent_shares%)</td>\n\t\t <td>$redeems ($percent_redeems%)</td>\n\t\t </tr>\";\n\t\t}\n\t\t$html .= '</tbody>\n\t\t</table>';\n\n\t\t$response['html']=$html;\n\t\t*/\n\t\tDatabase::mysqli_free_result($rs);\n\t\t\n\t\treturn $response;\n\t}", "function setup(){\n if(!class_exists('Relationship')){\n\n }\n\n $rel = new Relationship();\n if(!empty($this->vardef['relationship'])){\n \t$rel->retrieve_by_name($this->vardef['relationship']);\n }\n if($rel->relationship_type == 'many-to-many'){\n if($rel->lhs_module == $this->module_dir){\n $this->related_module = $rel->rhs_module;\n $module_dir = $rel->lhs_module;\n }else {\n if($rel->rhs_module == $this->module_dir){\n $this->related_module = $rel->lhs_module;\n $module_dir = $rel->rhs_module;\n }else{\n die(\"this field has no relationships mapped with this module\");\n }\n }\n if($module_dir != $this->module_dir){\n die('These modules do not match : '. $this->module_dir . ' and ' . $module_dir);\n }\n if(isset($GLOBALS['beanList'][$this->module_dir])){\n $class = $GLOBALS['beanList'][$this->module_dir];\n if(file_exists($GLOBALS['beanFiles'][$class])){\n $this->bean = loadBean($this->module_dir);\n $this->bean->retrieve($_REQUEST['bean_id']);\n if($this->bean->load_relationship($this->vardef['name'])){\n $this->check_id();\n $this->retrieve_values();\n }else{\n die('failed to load the relationship');\n }\n }else{\n die('class file do not exist');\n }\n }else{\n die($this->module_dir . ' is not in the beanList.');\n }\n }\n else{\n die(\"the relationship is not a many-to-many\");\n }\n }", "function getSeleniumResultsForTestCase($testCaseID, $relationID, $studyID, $subjectID, $clientID) {\n\n global $definitions;\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n\n //First, we need the steps for this testCase\n\n //Next, get the results fo the step\n // get checked values\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $testCaseID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relationID);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n $totalOK = 0;\n $totalNOK = 0;\n $hasSeleniumResults = False;\n\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $subjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $hasSeleniumResults = True;\n $theResult = base64_decode($p['executionValue']);\n if ($theResult == 'OK') {\n $totalOK++;\n } elseif ($theResult == 'NOK') {\n $totalNOK++;\n }\n }\n\n }\n }\n if ($hasSeleniumResults == True) {\n if ($totalOK > 0 && $totalNOK == 0) {\n return 'OK';\n } elseif ($totalNOK > 0) {\n return 'NOK';\n } elseif ($totalOK == 0 && $totalNOK == 0) {\n return 'NOT_EXECUTED';\n }\n } else {\n return 'NOSELENIUM';\n }\n\n}", "function ros_get_users_of_one_instance($roshineid)\n{\n global $DB, $CFG;\n $params = array();\n $toreturn = array();\n $gradestblname = $CFG->prefix.\"roshine_grades\";\n $userstblname = $CFG->prefix.\"user\";\n $sql = \"SELECT DISTINCT \".$userstblname.\".firstname, \".$userstblname.\".lastname, \".$userstblname.\".id\".\n \" FROM \".$gradestblname.\n \" LEFT JOIN \".$userstblname.\" ON \".$gradestblname.\".userid = \".$userstblname.\".id\".\n \" WHERE (roshine=\".$roshineid.\")\";\n if ($grades = $DB->get_records_sql($sql, $params)) {\n return $grades;\n }\n return false;\n}", "public function testGetAuthorizationDivisionspermittedSubjectId()\n {\n }", "public function testReportsReferralsGet()\n {\n }", "function rst_load_rosterData($appGlobals, $chain, $readPeriod = TRUE) {\n $this->rst_load_kids($appGlobals);\n}", "public function test_reputationReport() {\n\n }", "public function getTests();", "public function Interests() {\n\t\treturn parent::getRelated();\n\t}", "public function testGetSurveyContacts0()\n {\n }", "public function testGetSurveyContacts0()\n {\n }", "abstract public function get_subject();", "function languagelesson_get_basics($cmid = 0, $lessonid = 0) {\n\tglobal $DB;\n\t\n if ($cmid) {\n if (!$cm = get_coursemodule_from_id('languagelesson', $cmid)) {\n print_error('Course Module ID was incorrect');\n }\n if (!$course = $DB->get_record('course', array('id'=>$cm->course))) {\n print_error('Course is misconfigured');\n }\n if (!$lesson = $DB->get_record('languagelesson', array('id'=>$cm->instance))) {\n print_error('Course module is incorrect');\n }\n } else if ($lessonid) {\n if (!$lesson = $DB->get_record('languagelesson', array('id'=>$lessonid))) {\n print_error('Course module is incorrect');\n }\n if (!$course = $DB->get_record('course', array('id'=>$lesson->course))) {\n print_error('Course is misconfigured');\n }\n if (!$cm = get_coursemodule_from_instance('languagelesson', $lesson->id, $course->id)) {\n print_error('Course Module ID was incorrect');\n }\n } else {\n print_error('No course module ID or lesson ID were passed');\n }\n \n return array($cm, $course, $lesson);\n}", "public function getDrugsQuery ()\n\n{\n\n//this function performs the SPARQL query and saves the result in a EasyRDF array (mixed objects - literals and ressources (uri))\n\n$sparql = new \\EasyRdf_Sparql_Client(self::endpoint);\n\n\n$result = $sparql->query('SELECT ?drug ?drugname ?target ?indication\n\t\t\tWHERE {\n\t\t\t?drug a <http://bio2rdf.org/drugbank_vocabulary:Drug> .\n\t\t\t?drug rdfs:label ?drugname .\n\t\t\t?drug <http://bio2rdf.org/drugbank_vocabulary:target> ?t .\n\t\t\t?t rdfs:label ?target .\n\t\t\tOPTIONAL{\n\t\t\t?drug <http://bio2rdf.org/drugbank_vocabulary:indication> ?indication .}\n\t\t\t} LIMIT 20');\n\n echo '<pre>';\n\nreturn $result;\n\n}", "public function testGetUsersRooms()\n {\n }", "function ipal_get_answers_student($question_id){\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\r\n\t$answerarray=array(); \r\n\t$line=\"\";\r\n\t$answers=$DB->get_records('question_answers',array('question'=>$question_id));\r\n\t\t\tforeach($answers as $answers){\r\n\t\t\t\t$answerarray[$answers->id]=$answers->answer; \r\n\t\t\t}\r\n\t\t\t\r\n\treturn($answerarray);\r\n}", "public function testListSharedLinkRenditions()\n {\n }", "public function testGetAuthorizationSubjectsRolecounts()\n {\n }", "function get_Surveys(){\r\n $sql = $this->db->prepare(\"CALL SPgetSurvey2(:userid,:chamberID,:businessID);\");\r\n $result = $sql->execute(array(\r\n \"userid\" => $_SESSION['userid'],\r\n \"chamberID\" => $_SESSION['chamber'],\r\n \"businessID\" => $_SESSION['businessid'],\r\n ));\r\n if ($result){\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n else{\r\n return false; // was array(); HL 10/10/17\r\n }\r\n }", "public function testGetterAndSetter()\n {\n\n $this->checkOneToMany('Game');\n $this->checkOneToMany('Player');\n $this->checkOneToMany('Team');\n $this->checkAttribute('DuelsWon', 1);\n $this->checkAttribute('DuelsWonGround', 2);\n $this->checkAttribute('DuelsWonHeader', 3);\n $this->checkAttribute('DuelsLost', 10);\n $this->checkAttribute('DuelsLostGround', 12);\n $this->checkAttribute('DuelsLostHeader', 13);\n $this->checkAttribute('DuelsWonPercentage', 30);\n $this->checkAttribute('PassesCompleted', 31);\n $this->checkAttribute('PassesFailed', 32);\n $this->checkAttribute('PassesCompletedPercentage', 34);\n $this->checkAttribute('PassesFailedPercentage', 35);\n $this->checkAttribute('Passes', 36);\n $this->checkAttribute('PassesShort', 37);\n $this->checkAttribute('BallsTouched', 38);\n $this->checkAttribute('Shots', 39);\n $this->checkAttribute('ShotsOnGoal', 40);\n $this->checkAttribute('ShotsInsideBox', 41);\n $this->checkAttribute('ShotsOutsideBox', 42);\n $this->checkAttribute('ShotsFootInsideBox', 43);\n $this->checkAttribute('ShotsFootOutsideBox', 44);\n $this->checkAttribute('ShotsHeader', 45);\n $this->checkAttribute('Crosses', 46);\n $this->checkAttribute('Offsides', 47);\n $this->checkAttribute('Freekicks', 48);\n $this->checkAttribute('MissChance', 49);\n $this->checkAttribute('Assists', 50);\n $this->checkAttribute('AssistsShot', 51);\n $this->checkAttribute('ThrowIn', 52);\n $this->checkAttribute('ShotsPenaltyScored', 53);\n $this->checkAttribute('ShotsPenaltyMissed', 54);\n $this->checkAttribute('Punt', 55);\n $this->checkAttribute('CornerKicks', 56);\n $this->checkAttribute('ShotsOffPost', 57);\n $this->checkAttribute('Saves', 58);\n $this->checkAttribute('CatchesPunchesCorners', 59);\n $this->checkAttribute('CatchesPunchesCrosses', 60);\n $this->checkAttribute('GoalsAgainst', 61);\n $this->checkAttribute('PenaltySaves', 62);\n $this->checkAttribute('ClearCutChance', 61);\n $this->checkAttribute('FoulsCommitted', 63);\n $this->checkAttribute('FoulsSuffered', 64);\n $this->checkAttribute('Handballs', 65);\n $this->checkAttribute('YellowCards', 66);\n $this->checkAttribute('RedCards', 67);\n $this->checkAttribute('YellowRedCards', 68);\n $this->checkAttribute('TrackingDistance', 61.10);\n $this->checkAttribute('TrackingSprintsDistance', 61.20);\n $this->checkAttribute('TrackingFastRunsDistance', 61.30);\n $this->checkAttribute('TrackingOffensiveRunsDistance', 61.40);\n $this->checkAttribute('TrackingAverageSpeed', 61.50);\n $this->checkAttribute('TrackingMaxSpeed', 61.60);\n $this->checkAttribute('TrackingSprints', 69);\n $this->checkAttribute('TrackingFastRuns', 70);\n $this->checkAttribute('TrackingOffensiveRuns', 71);\n }", "public function testGetUserrecordingsSummary()\n {\n }", "public\tfunction load_subjects()\n\t\t{\n\t\t\tglobal $connection, $subjects_rows, $retrieved;\n\t\t\t\n\t\t\t$sql = \"call load_subjects()\";\n\t\t\t$connection->next_result();\n\t\t\t$retrieved = $connection -> query( $sql );\n\t\t\t\n\t\t\tif ( $retrieved ->num_rows )\n\t\t\t{\n\t\t\t\t$subjects_rows = $retrieved -> fetch_all( MYSQLI_ASSOC );\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie('Database Query Failed loading subjects');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "function &_getGlobalSurveyData($obj_id)\n\t{\n\t\t$survey = new ilObjSurvey($obj_id, false);\n\t\t$survey->loadFromDb();\n\t\t$result = array();\n\t\tif (($survey->getTitle()) and ($survey->author) and (count($survey->questions)))\n\t\t{\n\t\t\t$result[\"complete\"] = true;\n\t\t} \n\t\t\telse \n\t\t{\n\t\t\t$result[\"complete\"] = false;\n\t\t}\n\t\t$result[\"evaluation_access\"] = $survey->getEvaluationAccess();\n\t\treturn $result;\n\t}", "public function testProfilePrototypeFindByIdGroups()\n {\n\n }" ]
[ "0.72404677", "0.5648223", "0.56259716", "0.5612863", "0.5479739", "0.54645437", "0.54273313", "0.536446", "0.53118503", "0.53118503", "0.53082985", "0.5284517", "0.5284517", "0.52818125", "0.5240556", "0.52320874", "0.5208981", "0.51988804", "0.5197865", "0.5194668", "0.5153721", "0.5137218", "0.51157314", "0.51145744", "0.5110855", "0.51073694", "0.51073694", "0.5067808", "0.5063032", "0.50480753", "0.5044026", "0.5041305", "0.50286776", "0.502317", "0.5011441", "0.5011259", "0.5001606", "0.5001606", "0.49979907", "0.49528342", "0.49528342", "0.4946177", "0.49442613", "0.49442613", "0.49442613", "0.49442613", "0.49442613", "0.49442613", "0.49442613", "0.49442613", "0.49367437", "0.49255258", "0.49081156", "0.48961687", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48949447", "0.48886093", "0.48831284", "0.48831254", "0.48830348", "0.48687458", "0.486831", "0.48652974", "0.48638684", "0.48466825", "0.48425665", "0.48421955", "0.48398745", "0.48331204", "0.48329532", "0.48250663", "0.48166654", "0.48125333", "0.48101556", "0.48032427", "0.4798147", "0.4797063", "0.47833115", "0.47753054", "0.47753054", "0.47643232", "0.4758692", "0.47416967", "0.4738407", "0.4738108", "0.47374883", "0.4726527", "0.47220138", "0.47185564", "0.47169423", "0.4714582", "0.4711592", "0.47108483" ]
0.7326091
0
/This function returns all the testcases inside one group (and inside their categories and subcategories)
function getAllTestCategoriesInsideAGroup($groupID, $clientID) { global $definitions; //get item type $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID); //get property $testCategoryParentGroupID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryGroupID'], $clientID); //First, we need get all the categories that has the parent groupID // build return properties array $returnProperties = array(); //build the filter $filters = array(); $filters[] = array('ID' => $testCategoryParentGroupID, 'value' => $groupID); $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties); //Get only the testCategories ids $onlyIds = array(); foreach ($testCategories as $tcat) { $onlyIds[] = $tcat['ID']; } return $onlyIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllTestCasesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside group\n $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID);\n\n //Next, create a string with all the categories inside the group\n $toFilter = implode(',', $onlyIds);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($allTestCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function drush_test_list($groups) {\n foreach ($groups as $group_name => $group_tests) {\n foreach ($group_tests as $test_class => $test_info) {\n $rows[] = array('group' => $group_name, 'class' => $test_class, 'name' => $test_info['name']);\n }\n }\n return $rows;\n}", "function getAllTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside\n $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID);\n\n $toFilter = implode(',', $allCategories);\n\n //When we have all the categories inside, get their test cases\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function simpletest_drush_test_groups($tests) {\n $groups = array();\n foreach (simpletest_categorize_tests($tests) as $name => $group) {\n $sanitized = strtr($name, array(' ' => ''));\n $groups[$sanitized] = $group;\n }\n return $groups;\n}", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function getTests();", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "function drush_test_xml_results($test_id, $dir, $info) {\n $dir = is_string($dir) ? $dir : '.';\n\n // Get an array of test result objects from the database.\n if (drush_drupal_major_version() >= 7) {\n $results = db_query(\"SELECT * FROM {simpletest} WHERE test_id = :test_id ORDER BY test_class, message_id\", array(':test_id' => $test_id));\n }\n else {\n $result = db_query(\"SELECT * FROM {simpletest} WHERE test_id = %d ORDER BY test_class, message_id\", $test_id);\n $results = array();\n while ($row = db_fetch_object($result)) {\n $results[] = $row;\n }\n }\n\n // Collect and aggregate the data from simpletest.\n $test_suites = array();\n foreach ($results as $result) {\n // Create test_suite object.\n // Formatting name so it becomes \"group.name\" without any other dots. Jenkins uses string splitting on dots to gather info.\n $test_suite_name = str_replace('.', '', $info['group']) . '.' . str_replace('.', '', $info['name']);\n if (!isset($test_suites[$test_suite_name])) {\n $test_suite = new stdClass();\n $test_suite->name = $test_suite_name;\n $test_suite->test_cases = array();\n $test_suites[$test_suite_name] = $test_suite;\n }\n else {\n $test_suite = $test_suites[$test_suite_name];\n }\n // Create test_case object.\n list(, $test_case_name) = explode('->', $result->function, 2);\n if (empty($test_case_name)) {\n // There is no '->' present on static function calls. Use the whole string in those cases.\n $test_case_name = $result->function;\n }\n $test_case_name = str_replace('.', '', $test_case_name); // Remove those dots Jenkins loves so much.\n if (!isset($test_suite->test_cases[$test_case_name])) {\n $test_case = new stdClass();\n $test_case->name = $test_case_name;\n $test_case->failure_message = '';\n $test_case->error_message = '';\n $test_case->system_out = '';\n $test_case->system_err = '';\n $test_suite->test_cases[$test_case_name] = $test_case;\n }\n else {\n $test_case = $test_suite->test_cases[$test_case_name];\n }\n // Prepare message.\n $status = str_pad($result->status . ':', 10);\n $message = strip_tags($result->message, '<a>'); // Jenkins encodes the output so don't use any tags.\n $message = preg_replace('/<a.*?href=\"([^\"]+)\".*?>(.*?)<\\/a>/', '$1 $2', $message); // Jenkins will turn urls into clickable links.\n $message = $status . ' [' . $result->message_group . '] ' . $message . ' [' . basename($result->file) . ':' . $result->line . \"]\\n\";\n // Everything is logged in system_out.\n $test_case->system_out .= $message;\n // Failures go to failures.\n if ($result->status == 'fail') {\n $test_case->failure_message .= $message;\n }\n // Exceptions go both to errors and system_err.\n if ($result->status == 'exception') {\n $test_case->error_message .= $message;\n $test_case->system_err .= $message;\n }\n }\n\n // Build an XML document from our results.\n $xml = new DOMDocument('1.0', 'UTF-8');\n foreach ($test_suites as $test_suite) {\n $test_suite_element = $xml->createElement('testsuite');\n $test_suite_element->setAttribute('name', $test_suite->name);\n foreach ($test_suite->test_cases as $test_case) {\n $test_case_element = $xml->createElement('testcase');\n $test_case_element->setAttribute('name', $test_case->name);\n if (!empty($test_case->failure_message)) {\n $failure_element = $xml->createElement('failure');\n $failure_element->setAttribute('message', $test_case->failure_message);\n $test_case_element->appendChild($failure_element);\n }\n if (!empty($test_case->error_message)) {\n $error_element = $xml->createElement('error');\n $error_element->setAttribute('message', $test_case->error_message);\n $test_case_element->appendChild($error_element);\n }\n if (!empty($test_case->system_out)) {\n $system_out_element = $xml->createElement('system-out');\n $system_out_element->appendChild($xml->createTextNode($test_case->system_out));\n $test_case_element->appendChild($system_out_element);\n }\n if (!empty($test_case->system_err)) {\n $system_err_element = $xml->createElement('system-err');\n $system_err_element->appendChild($xml->createTextNode($test_case->system_err));\n $test_case_element->appendChild($system_err_element);\n }\n $test_suite_element->appendChild($test_case_element);\n }\n $xml->appendChild($test_suite_element);\n }\n // Save to disk.\n file_put_contents($dir . '/testsuite-' . $test_id . '.xml', $xml->saveXML());\n}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch, $clientID) {\n global $definitions;\n\n $testcasesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n $testcasesNamePropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesName'], $clientID);\n $testcasesOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesOrder'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n $returnProperties[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'name' => 'testCategoryParentID');\n $returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n //Next, clear all the test cases that are not inside the relation\n $appliedTestCases = array();\n for ($i = 0; $i < count($testCases); $i++) {\n if (in_array($testCases[$i]['ID'], $idsToSearch)) {\n $appliedTestCases[] = $testCases[$i];\n }\n }\n //And return the testCases\n return ($appliedTestCases);\n}", "public function testGroups(): void\n {\n $process = $this->phpbench(\n 'run --group=do_nothing --dump --progress=none benchmarks/set1/BenchmarkBench.php'\n );\n\n $this->assertExitCode(0, $process);\n $output = $process->getOutput();\n $this->assertXPathCount(1, $output, '//subject');\n }", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "public function run()\n {\n $data = [\n \t\t[//CG1\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C01',\n \t\t\t'categoryname' => 'Đầm Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C02',\n \t\t\t'categoryname' => 'Áo Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C03',\n \t\t\t'categoryname' => 'Quần Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C04',\n \t\t\t'categoryname' => 'Chân Váy',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C05',\n \t\t\t'categoryname' => 'Bộ Liền',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t],//END CG1\n \t\t[//CG2\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C06',\n \t\t\t'categoryname' => 'Đầm Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C07',\n \t\t\t'categoryname' => 'Áo Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C08',\n \t\t\t'categoryname' => 'Quần Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C09',\n \t\t\t'categoryname' => 'Chân Váy',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C10',\n \t\t\t'categoryname' => 'Bộ Liền',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t],//END CG2\n \t\t[//CG3\n \t\t\t'categorygroup_id' => 'CG3',\n \t\t\t'categoryid' => 'C11',\n \t\t\t'categoryname' => 'Sản Phẩm Mẹ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG3',\n \t\t\t'categoryid' => 'C12',\n \t\t\t'categoryname' => 'Sản Phẩm Bé',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t]\n \t];\n\n DB::table('categories')->insert($data);\n }", "function getTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public static function suite() {\n\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Collectionable plugin tests');\n\n\t\t$basePath = App::pluginPath('Collectionable') . 'Test' . DS . 'Case' . DS;\n\t\t$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basePath));\n\n\t\twhile ($it->valid()) {\n\n\t\t\tif (!$it->isDot()) {\n\t\t\t\t$file = $it->key();\n\t\t\t\tif (preg_match('|Test\\.php$|', $file) && $file !== __FILE__) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$it->next();\n\t\t}\n\n\t\treturn $suite;\n\n\t}", "function get_categories_by_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'));\n\n\t\t// start hook\n\t\t$vars = $this->_hook('get_categories_by_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_category_by_group($vars['group_id'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_categories_by_group_end', $data);\n\n\t\t$this->response($data);\n\t}", "public function testGetItemSubCategoryByFilter()\n {\n }", "public function provideValidCategoryGroups()\n {\n return [\n 'emptyArray' => [\n 'CategoryGroups' => [],\n 'expectedResult' => [],\n ],\n 'single group' => [\n 'CategoryGroups' => [\n 'group1' => $this->getMockCategoryGroup(1),\n ],\n 'expectedResult' => [\n 'groupHandle1' => [\n 'name' => 'groupName1',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n ],\n ],\n 'multiple groups' => [\n 'CategoryGroups' => [\n 'group1' => $this->getMockCategoryGroup(1),\n 'group2' => $this->getMockCategoryGroup(2),\n ],\n 'expectedResult' => [\n 'groupHandle1' => [\n 'name' => 'groupName1',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n 'groupHandle2' => [\n 'name' => 'groupName2',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n ],\n ],\n ];\n }", "public function getTestResultsData()\n {\n $out = [];\n\n // Case #0, sorted in default acceding\n $out[] = [\n [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc'\n ];\n\n // Case #1, sorted in descending order by term, blue is prioritized.\n $out[] = [\n [\n 'acme',\n 'bar',\n 'foo',\n ],\n 'sc_zero_choices'\n ];\n\n // Case #2, all items prioritized, so sorting shouldn't matter.\n $out[] = [\n [\n 'blue',\n 'green',\n ],\n 'sc_sort_term_a'\n ];\n\n // Case #3, sort items by count, red prioritized.\n $out[] = [\n [\n 'yellow',\n ],\n 'sc_sort_term_d'\n ];\n\n // Case #4\n $out[] = [\n [\n 'blue',\n 'red',\n 'green',\n 'yellow'\n ],\n 'sc_sort_count'\n ];\n\n // Case #5 with selected man\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc',\n ['manufacturer' => 'a']\n ];\n\n // Case #6 with selected man with zero choices\n $out[] = [\n [\n 'acme',\n 'foo',\n 'bar',\n ],\n 'sc_zero_choices',\n ['manufacturer' => 'a']\n ];\n\n // Case #7 with selected man with zero choices\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n 'green',\n ],\n 'sc_zero_choices_color',\n ['manufacturer' => 'a']\n ];\n\n return $out;\n }", "public static function getGroups(): array\n {\n return ['test'];\n }", "public function testListCategories()\n {\n }", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "private function getCaseNodes(): array\n {\n $caseNodes = $this->xml->xpath('//testcase');\n $cases = [];\n foreach ($caseNodes as $node) {\n $caseFilename = (string) $node['file'];\n if (! isset($cases[$caseFilename])) {\n $cases[$caseFilename] = [];\n }\n\n $cases[$caseFilename][] = $node;\n }\n\n return $cases;\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Indicadores Tests');\n\t\t$suite->addTestDirectoryRecursive(App::pluginPath('Indicadores') . 'Test' . DS . 'Case' . DS);\n\n\t\treturn $suite;\n\t}", "public function testAll()\n\t\t{\n\t\t\tlist ($categoriesBefore) = $this->category->all(array ('nameContains' => 'Top Category'));\n\t\t\tforeach ($categoriesBefore as $categoryBefore) {\n\t\t\t\t$categoryBefore->delete();\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$this->category->create(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'categoryName' => array ('en' => \"Top Category $i\"),\n\t\t\t\t\t\t'categoryImage' => \"topcategory$i.jpg\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tlist ($categories, $count) = $this->category->all(array (\n\t\t\t\t'nameContains' => 'Top Category',\n\t\t\t\t'limit' => 2,\n\t\t\t\t'offset' => 1,\n\t\t\t\t'fields' => 'categoryId,categoryName'\n\t\t\t));\n\t\t\t\n\t\t\t$this->assertEquals(3, $count);\n\t\t\t$this->assertEquals(2, count($categories));\n\t\t\t\n\t\t\tfor ($j = 1; $j <= 2; $j++) {\n\t\t\t\t$this->assertEquals('Top Category '.($j + 1), $categories[$j - 1]->name->EN);\n\t\t\t\t$this->assertTrue(!isset($categories[$j - 1]->image));\n\t\t\t}\n\t\t}", "public function run()\n\t{\n\t\t$now = date('Y-m-d H:i:s');\n\t\t$subcategories = [\n\t\t\t[\n\t\t\t\t'id' => 1,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Rules',\n\t\t\t\t'subcatDescription' => 'Here are the rules',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 2,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'More Rules',\n\t\t\t\t'subcatDescription' => 'Another subcat',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 3,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Buttons',\n\t\t\t\t'subcatDescription' => 'About buttons',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 4,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Wells',\n\t\t\t\t'subcatDescription' => 'About wells',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 5,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Models',\n\t\t\t\t'subcatDescription' => 'stupid things...',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 6,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'databases',\n\t\t\t\t'subcatDescription' => 'eloquent is weird',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t]\n\t\t];\n\t\t\n\t\tDB::table('subcategories')->insert($subcategories);\n\n\t}", "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}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }", "function getParentCategoriesForTestCase($testCaseID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //First, get the parent test category for the test case\n $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID);\n\n //return all categories\n return getParentCategoriesForCategory($categoryID, $clientID);\n}", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "function test_all () {\n\n\t\t$this->layout = 'test';\n\n\t\t$tests_folder = new Folder('../tests');\n\n\t\t$results = array();\n\t\t$total_errors = 0;\n\t\tforeach ($tests_folder->findRecursive('.*\\.php') as $test) {\n\t\t\tif (preg_match('/^(.+)\\.php/i', basename($test), $r)) {\n\t\t\t\trequire_once($test);\n\t\t\t\t$test_name = Inflector::Camelize($r[1]);\n\t\t\t\tif (preg_match('/^(.+)Test$/i', $test_name, $r)) {\n\t\t\t\t\t$module_name = $r[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$module_name = $test_name;\n\t\t\t\t}\n\t\t\t\t$suite = new TestSuite($test_name);\n\t\t\t\t$result = TestRunner::run($suite);\n\n\t\t\t\t$total_errors += $result['errors'];\n\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'name'=>$module_name,\n\t\t\t\t\t'result'=>$result,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->set('success', !$total_errors);\n\t\t$this->set('results', $results);\n\t}", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "public function test_scenario1() {\n\n $data = array(\n array(\"model\" =>\n array(\"topic_model\" =>\n array(\"alpha\" => 0.08,\n \"beta\" => 0.1,\n \"hashed_seed\" => 0,\n \"language\" => \"en\",\n \"bigrams\" => True,\n \"case_sensitive\" => False,\n \"term_topic_assignments\" => array(array(0, 0, 1, 2),\n array(0, 1, 2, 0),\n array(1, 2, 0, 0),\n array(0, 0, 2, 0)),\n \"termset\" => array(\"cycling\", \"playing\", \"shouldn't\", \"uńąnimous court\"),\n \"options\" => [],\n \"topics\" => array(array(\"name\" => \"Topic 1\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"a\", \"b\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 2\",\n \"id\" => \"000001\",\n \"top_terms\" => array(\"c\", \"d\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 3\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"e\", \"f\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 4\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"g\", \"h\"),\n \"probability\" => 0.1)),\n \"fields\" => array(\"000001\" => array(\"datatype\" => \"string\",\n \"name\" => \"TEST TEXT\",\n \"optype\" => \"text\",\n \"order\" => 0,\n \"preferred\" => True,\n \"summary\" => [],\n \"term_analysis\" => []))),\n \"resource\" => \"topicmodel/aaaaaabbbbbbccccccdddddd\",\n \"status\" => array(\"code\" => 5)),\n \"text\" => array(\"TEST TEXT\" => \"uńąnimous court 'UŃĄNIMOUS COURT' `play``the plays PLAYing SHOULDN'T CYCLE cycling shouldn't uńąnimous or court's\"),\n \"expected\" => array(array(\"name\" => 'Topic 1', \"probability\" => 0.17068527918781726),\n array(\"name\" => 'Topic 2', \"probability\" => 0.1865482233502538),\n array(\"name\" => 'Topic 3', \"probability\" => 0.5157043147208121),\n array(\"name\" => 'Topic 4', \"probability\" => 0.12706218274111675))));\n\n foreach($data as $item) {\n print \"\\nSuccessfully creating a local distribution from a Topic Model\\n\";\n print \"I create a local topic model\\n\";\n $object = json_decode(json_encode($item[\"model\"]), FALSE);\n $local_topic_model = new TopicModel($object);\n\n print \"I create a distribution for local topic model\\n\";\n $distribution = $local_topic_model->distribution($item[\"text\"]);\n\n print \"And the distribution for local topic model equals the expected values.\\n\";\n $this->assertEquals($distribution, $item[\"expected\"]);\n }\n }", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "public function tests()\n {\n $this->authCheck();\n\n /*$testData = DB::table('diagnostic_tests')\n ->get();*/\n\n $testData = DB::table('diagnostic_tests')\n ->join('categories', 'diagnostic_tests.category_id', '=', 'categories.id')\n ->select('diagnostic_tests.*', 'categories.name as catName')\n ->get();\n \n $tests=view('admin.test_list')\n ->with('testData',$testData);\n\n return view('admin.master')\n ->with('main_content',$tests);\n\n }", "public function run()\n {\n DB::table('tests')->truncate();\n $data = [\n [\n 'category_id' => 4,\n 'created_user_id' => 1,\n 'name' => 'test 14',\n 'code' => 'HK-492',\n 'content_guide' => 'HK492 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 5,\n 'created_user_id' => 1,\n 'name' => 'test 13',\n 'code' => 'HK-493',\n 'content_guide' => 'HK493 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 6,\n 'created_user_id' => 1,\n 'name' => 'test 187',\n 'code' => 'HK-494',\n 'content_guide' => 'HK494 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 7,\n 'created_user_id' => 1,\n 'name' => 'test 165',\n 'code' => 'HK-495',\n 'content_guide' => 'HK495 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 8,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-496',\n 'content_guide' => 'HK496 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 9,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-497',\n 'content_guide' => 'HK497 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 10,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-498',\n 'content_guide' => 'HK498 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 11,\n 'created_user_id' => 1,\n 'name' => 'test 14534',\n 'code' => 'HK-499',\n 'content_guide' => 'HK499 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 12,\n 'created_user_id' => 1,\n 'name' => 'test 14534',\n 'code' => 'HK-490',\n 'content_guide' => 'HK490 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 13,\n 'created_user_id' => 1,\n 'name' => 'test 1453',\n 'code' => 'HK-491',\n 'content_guide' => 'HK492 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 14,\n 'created_user_id' => 1,\n 'name' => 'test 1464',\n 'code' => 'HK-429',\n 'content_guide' => 'HK429 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 15,\n 'created_user_id' => 1,\n 'name' => 'test 1468',\n 'code' => 'HK-439',\n 'content_guide' => 'HK439 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 16,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-459',\n 'content_guide' => 'HK459 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 17,\n 'created_user_id' => 1,\n 'name' => 'test 1765',\n 'code' => 'HK-469',\n 'content_guide' => 'HK469 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 18,\n 'created_user_id' => 1,\n 'name' => 'test 17867',\n 'code' => 'HK-489',\n 'content_guide' => 'HK489 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 19,\n 'created_user_id' => 1,\n 'name' => 'test 1756',\n 'code' => 'HK-249',\n 'content_guide' => 'HK249 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 20,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-349',\n 'content_guide' => 'HK349 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 21,\n 'created_user_id' => 1,\n 'name' => 'test 145',\n 'code' => 'HK-549',\n 'content_guide' => 'HK549 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 22,\n 'created_user_id' => 1,\n 'name' => 'test 17486',\n 'code' => 'HK-949',\n 'content_guide' => 'HK949 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 1,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-649',\n 'content_guide' => 'HK649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 2,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-1249',\n 'content_guide' => 'HK1249 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 3,\n 'created_user_id' => 1,\n 'name' => 'test 1724',\n 'code' => 'HK-2349',\n 'content_guide' => 'HK2349 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 4,\n 'created_user_id' => 1,\n 'name' => 'test 14678',\n 'code' => 'HK-5649',\n 'content_guide' => 'HK5649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 5,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-9649',\n 'content_guide' => 'HK9649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n ];\n foreach ($data as $item) {\n Test::create($item);\n }\n }", "public function testGetItemSubCategoryTags()\n {\n }", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "private function getContestsInfo(Group $group, &$contests)\n {\n $contests = $group\n ->contests()\n ->select(Constants::CONTESTS_DISPLAYED_FIELDS)\n ->paginate(Constants::CONTESTS_COUNT_PER_PAGE);\n }", "public function getContests($orderby);", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch){\n\n\tglobal $clientID,$categoriesItemTypeID,$categoryParentPropertyID,$testcasesItemTypeID,$testCasesCategoryPropertyID,$testcasesNamePropertyID,$testcasesOrderPropertyID,$inDebug;\n\n\t// build return properties array\n\t$returnProperties = array();\n\t$returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n\t$returnProperties[] = array('ID' => $testCasesCategoryPropertyID, 'name' => 'testCategoryParentID');\n\t$returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n\t//build the filter\n\t$filters = array();\n\t$filters[] = array('ID' => $testCasesCategoryPropertyID, 'value' => $parentCategoryID);\n\n\t$testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n\t//Next, save only the test cases that are inside the relation\n\t$resultTC = array();\n\tfor ($i=0;$i<count($testCases);$i++){\n\t\tforeach ($idsToSearch as $rel){\n\t\t\tif ($testCases[$i]['ID']==$rel){\n\t\t\t\t//test found in relation, add to returning array\n\t\t\t\t$resultTC[]=$testCases[$i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t//And return the testCases\n\treturn($resultTC);\n}", "private function groupByCategory(){\n \n $searchResults = null;\n $items = $this->items; \n \n foreach($items as $item){\n foreach($item->categories as $category_tmp){ \n $searchResults[$category_tmp][] = $item;\n } \n }\n \n return $searchResults;\n }", "public function run()\n {\n $categories = [\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Gear', 'slug' => 'gear', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Parts', 'slug' => 'parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Casual', 'slug' => 'casual', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'News', 'slug' => 'news', 'sortorder' => 4, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Clothes', 'slug' => 'clothes', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Helmets', 'slug' => 'helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Boots', 'slug' => 'boots', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Suspension', 'slug' => 'suspension', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'maintenance', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Oils', 'slug' => 'oils', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'T-Sirts', 'slug' => 'tshirts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'Caps', 'slug' => 'caps', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Jerseys', 'slug' => 'jerseys', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Pants', 'slug' => 'pants', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-helmets', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-boots', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-boots', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Fork', 'slug' => 'fork-parts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Shock', 'slug' => 'shock-parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Airfilter', 'slug' => 'airfilter', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Oilfilter', 'slug' => 'oilfilter', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Brakepads', 'slug' => 'brakepads', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Engine Oils', 'slug' => 'engine-oils', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Suspension Oils', 'slug' => 'suspension-oils', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'bike-maintenance', 'sortorder' => 3, 'active' => 1],\n ];\n\n DB::table('categories')->insert($categories);\n }", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public function testCanGetFilteredDatasetsForAccountsOptionallyFilteredByProjectAndTagAndCategories() {\n AuthenticationHelper::login(\"[email protected]\", \"password\");\n\n\n $categories = [\n new CategorySummary(\"Account1\", \"An account wide category available to account 1\", \"account1\")\n ];\n $this->metaDataService->returnValue(\"getObjectCategoriesFromSummaries\", [\n new ObjectCategory(new Category(new CategorySummary(\"Account 1\", \"Account 1\", \"account1\"), 1)),\n ], [\n $categories, 1, null\n ]);\n\n\n $accountDataSet = new DatasetInstanceSummary(\"Account Dataset\", \"test-json\", null, [], [], [], null, null, $categories);\n $this->datasetService->saveDataSetInstance($accountDataSet, null, 1);\n\n $accountDataSet = new DatasetInstanceSummary(\"Second Account Dataset\", \"test-json\");\n $this->datasetService->saveDataSetInstance($accountDataSet, null, 1);\n\n\n $datasetProject = new Project(\"Dataset Project\", 1, \"datasetProject\");\n $datasetProject->save();\n\n $this->metaDataService->returnValue(\"getObjectTagsFromSummaries\", [\n new ObjectTag(new Tag(new TagSummary(\"Special\", \"Special Tag\", \"special\"), 1, \"datasetProject\")),\n new ObjectTag(new Tag(new TagSummary(\"General\", \"General Tag\", \"general\"), 1, \"datasetProject\"))\n ], [\n [\n new TagSummary(\"Special\", \"\", \"special\"),\n new TagSummary(\"General\", \"\", \"general\")\n ], 1, \"datasetProject\"\n ]);\n\n $this->metaDataService->returnValue(\"getObjectTagsFromSummaries\", [\n new ObjectTag(new Tag(new TagSummary(\"General\", \"General Tag\", \"general\"), 1, \"datasetProject\"))\n ], [\n [\n new TagSummary(\"General\", \"\", \"general\")\n ], 1, \"datasetProject\"\n ]);\n\n\n $projectDataSet = new DatasetInstanceSummary(\"Project Dataset\", \"test-json\");\n $projectDataSet->setTags([\n new TagSummary(\"Special\", \"\", \"special\"),\n new TagSummary(\"General\", \"\", \"general\")\n ]);\n $this->datasetService->saveDataSetInstance($projectDataSet, \"datasetProject\", 1);\n\n $projectDataSet = new DatasetInstanceSummary(\"Second Project Dataset\", \"test-json\");\n $projectDataSet->setTags([\n new TagSummary(\"General\", \"\", \"general\")\n ]);\n $this->datasetService->saveDataSetInstance($projectDataSet, \"datasetProject\", 1);\n\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [], null, 0, 10, 1);\n $this->assertEquals(4, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Project Dataset\", $filtered[1]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[2]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[2]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[3]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[3]->getTitle());\n\n\n // Filter on title\n $filtered = $this->datasetService->filterDataSetInstances(\"econd\", [], [], null, 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n\n // Filter on categories\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [\"account1\"], [], null, 0, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n\n // Filter on project key\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n // Filter on tags\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"special\"], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n\n // Filter on special NONE tags\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"NONE\"], null, 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[1]->getTitle());\n\n // Offsets and limits\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 0, 1, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 1, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[0]->getTitle());\n\n\n }", "public function testBasicTestGroupSort()\n {\n $sampleTestArray = [\n 'test1' => 100,\n 'test2' => 300,\n 'test3' => 50,\n 'test4' => 60,\n 'test5' => 25,\n 'test6' => 125,\n 'test7' => 250,\n 'test8' => 1,\n 'test9' => 80,\n 'test10' => 25\n ];\n\n $expectedResult = [\n 1 => ['test2'],\n 2 => ['test7'],\n 3 => ['test6', 'test4', 'test8'],\n 4 => ['test1', 'test9'],\n 5 => ['test3', 'test5', 'test10']\n ];\n\n $testSorter = new ParallelGroupSorter();\n $actualResult = $testSorter->getTestsGroupedBySize([], $sampleTestArray, 200);\n\n $this->assertCount(5, $actualResult);\n\n foreach ($actualResult as $gropuNumber => $actualTests) {\n $expectedTests = $expectedResult[$gropuNumber];\n $this->assertEquals($expectedTests, array_keys($actualTests));\n }\n }", "function __testObjectFilesFromGroupFile($groupFile, $isApp = true) {\n\t\t$manager = CodeCoverageManager::getInstance();\n\t\t$testManager = new TestManager();\n\n\t\t$path = TESTS;\n\t\tif (!$isApp) {\n\t\t\t$path = CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'tests';\n\t\t}\n\t\tif (!!$manager->pluginTest) {\n\t\t\t$path = App::pluginPath($manager->pluginTest) . DS . 'tests';\n\t\t}\n\n\t\t$result = array();\n\t\tif ($groupFile == 'all') {\n\t\t\t$files = array_keys($testManager->getTestCaseList());\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$file = str_replace(DS . 'tests' . DS . 'cases' . DS, DS, $file);\n\t\t\t\t$file = str_replace('.test.php', '.php', $file);\n\t\t\t\t$file = str_replace(DS . DS, DS, $file);\n\t\t\t\t$result[] = $file;\n\t\t\t}\n\t\t} else {\n\t\t\t$path .= DS . 'groups' . DS . $groupFile . $testManager->_groupExtension;\n\t\t\tif (!file_exists($path)) {\n\t\t\t\ttrigger_error(__('This group file does not exist!', true));\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\t$result = array();\n\t\t\t$groupContent = file_get_contents($path);\n\t\t\t$ds = '\\s*\\.\\s*DS\\s*\\.\\s*';\n\t\t\t$pluginTest = 'APP\\.\\'plugins\\'' . $ds . '\\'' . $manager->pluginTest . '\\'' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pluginTest .= '|App::pluginPath\\(\\'' . $manager->pluginTest . '\\'\\)' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pattern = '/\\s*TestManager::addTestFile\\(\\s*\\$this,\\s*(' . $pluginTest . '|APP_TEST_CASES|CORE_TEST_CASES)' . $ds . '(.*?)\\)/i';\n\t\t\tpreg_match_all($pattern, $groupContent, $matches);\n\n\t\t\tforeach ($matches[2] as $file) {\n\t\t\t\t$patterns = array(\n\t\t\t\t\t'/\\s*\\.\\s*DS\\s*\\.\\s*/',\n\t\t\t\t\t'/\\s*APP_TEST_CASES\\s*/',\n\t\t\t\t\t'/\\s*CORE_TEST_CASES\\s*/',\n\t\t\t\t);\n\n\t\t\t\t$replacements = array(DS, '', '');\n\t\t\t\t$file = preg_replace($patterns, $replacements, $file);\n\t\t\t\t$file = str_replace(\"'\", '', $file);\n\t\t\t\t$result[] = $manager->__testObjectFileFromCaseFile($file, $isApp) . '.php';\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function run()\n {\n\n $category_array = [\n \n //category\n 'Home Services' => [\n \n // sub-category\n 'Key Making' => [\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Other key making'\n ],\n \n // sub-category\n 'Carpenter' => [\n //services\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixture repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n\n //sub-category\n 'Plumber' => [\n 'Tap Repair',\n 'Flush Repair',\n 'Leakage',\n 'Installation of Sanitaryware',\n 'Other plumber service',\n ]\n ],\n\n //category\n 'Road Services' => [\n \n //sub-category\n 'Crane/Towing' => [\n \n //services\n 'Hydraulic/Rope',\n 'Chain',\n 'Zero degree',\n 'Other towing service'\n ]\n ],\n\n //category\n 'Office Services' => [\n\n //sub-category\n 'Key Making' => [\n\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Others key making',\n ],\n\n //sub-category\n 'Carpenter' => [\n\n //services\n 'Flooring',\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixer repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n ]\n ];\n\n foreach ($category_array as $category_name => $sub_category_array) {\n $category = new Category();\n $category->name = $category_name;\n $category->save();\n\n foreach ($sub_category_array as $sub_category_name => $services_array) {\n $sub_category = new SubCategory();\n $sub_category->name = $sub_category_name;\n $sub_category->category_id = $category->id;\n $sub_category->save();\n\n $total_services = count($services_array);\n for ($i = 0; $i < $total_services; $i++) {\n $service = new Service();\n $service->name = $services_array[$i];\n $service->sub_category_id = $sub_category->id;\n $service->save();\n }\n }\n }\n }", "public function getTests()\n {\n return $this->hasMany(Test::className(), ['projectId' => 'id']);\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getContestsByType_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|required|callback_validateSession');\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No,All]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('MatchGUID', 'MatchGUID', 'trim|callback_validateEntityGUID[Matches,MatchID]');\n $this->form_validation->set_rules('Keyword', 'Search Keyword', 'trim');\n $this->form_validation->set_rules('Filter', 'Filter', 'trim|in_list[Normal]');\n $this->form_validation->set_rules('OrderBy', 'OrderBy', 'trim');\n $this->form_validation->set_rules('Sequence', 'Sequence', 'trim|in_list[ASC,DESC]');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Contests Data */\n\n $ContestData = array();\n\n $ContestTypes[] = array('Key' => 'Hot Contest', 'TagLine' => 'Filling Fast. Join Now!', 'Where' => array('ContestType' => 'Hot'));\n $ContestTypes[] = array('Key' => 'Contests for Champions', 'TagLine' => 'High Entry Fees, Intense Competition', 'Where' => array('ContestType' => 'Champion'));\n $ContestTypes[] = array('Key' => 'Head To Head Contest', 'TagLine' => 'The Ultimate Face Off', 'Where' => array('ContestType' => 'Head to Head'));\n $ContestTypes[] = array('Key' => 'Practice Contest', 'TagLine' => 'Hone Your Skills', 'Where' => array('ContestType' => 'Practice'));\n $ContestTypes[] = array('Key' => 'More Contest', 'TagLine' => 'Keep Winning!', 'Where' => array('ContestType' => 'More'));\n $ContestTypes[] = array('Key' => 'Mega Contest', 'TagLine' => 'Get ready for mega winnings!', 'Where' => array('ContestType' => 'Mega'));\n $ContestTypes[] = array('Key' => 'Winner Takes All', 'TagLine' => 'Everything To Play For', 'Where' => array('ContestType' => 'Winner Takes All'));\n $ContestTypes[] = array('Key' => 'Only For Beginners', 'TagLine' => 'Play Your First Contest Now', 'Where' => array('ContestType' => 'Only For Beginners'));\n\n foreach ($ContestTypes as $key => $Contests) {\n\n array_push($ContestData, $this->SnakeDrafts_model->getContests(@$this->Post['Params'], array_merge($this->Post, array('MatchID' => @$this->MatchID, 'UserID' => @$this->UserID, 'SessionUserID' => $this->SessionUserID), $Contests['Where']), TRUE, @$this->Post['PageNo'], @$this->Post['PageSize'])['Data']);\n $ContestData[$key]['Key'] = $Contests['Key'];\n $ContestData[$key]['TagLine'] = $Contests['TagLine'];\n }\n\n $Statics = $this->db->query('SELECT (SELECT COUNT(*) AS `NormalContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Normal\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as NormalContest,\n ( SELECT COUNT(*) AS `ReverseContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN(1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Reverse\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as ReverseContest,(\n SELECT COUNT(*) AS `JoinedContest` FROM `nba_sports_contest_join` J, `nba_sports_contest` C WHERE C.ContestID = J.ContestID AND J.UserID = \"' . $this->SessionUserID . '\" AND C.MatchID = \"' . $this->MatchID . '\"\n )as JoinedContest,(\n SELECT COUNT(*) AS `TotalTeams` FROM `nba_sports_users_teams`WHERE UserID = \"' . $this->SessionUserID . '\" AND MatchID = \"' . $this->MatchID . '\"\n ) as TotalTeams,(SELECT COUNT(*) AS `H2HContest` FROM `nba_sports_contest` C, `tbl_entity` E, `nba_sports_contest_join` CJ WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestFormat=\"Head to Head\" AND E.StatusID = 1 AND C.ContestID = CJ.ContestID AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID )) as H2HContests')->row();\n\n if (!empty($ContestData)) {\n $this->Return['Data']['Results'] = $ContestData;\n $this->Return['Data']['Statics'] = $Statics;\n }\n }", "public function testGetGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function findGroups() {\n\t\t\n\t}", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "public function testGetAllChildren() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get\n $categories = $this->kb_category->get_all_children( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "public function test_Category_Tree(){\n\n\t\t$exp_total\t= Good::all()->count();\n\n\t\t$get\t= [\n\t\t\t'draw'\t=> '12'\n\t\t];\n\t\t$res\t= Good::getTableData( $get );\n\n\t\t$this->assertEquals( 12, $res['draw'], \"\\n*** Assert 1 ***\\nWrong 'draw' value\\n\" );\n\t\t$this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 2 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t\t$new_item\t= [\n\t\t\t'name'\t=> ''\n\t\t\t,'article'=> ''\n\t\t\t,'rprice'\t=> 5.567\n\t\t\t,'wprice'\t=> 4.444\n\t\t\t,'inpack'\t=> 24\n\t\t\t,'packs'\t=> 13\n\t\t\t,'assort'\t=> 17\n\t\t];\n\n\n\n\t\t$this->db['Good']\t= [];\n\t\t$items\t= &$this->db['Good'];\n\n\t for( $i=0; $i<3; $i++ ){\n\t \t$item\t= $new_item;\n\t \t$item['name']\t= self::_ut_name.'_'.$i;\n\t \t$item['article']\t= self::_ut_name.'_'.$i;\n\t\t\t$item_obj\t= new Good();\n\t \t$item_obj\t= $item_obj->fill( $item );\n\t\t $res \t= $item_obj->save();\n\n\t\t $ids[]\t=\n\t\t $item['id']\t= $item_obj->id;;\n\n\t\t\t$items[]\t= $item;\n\n\t\t $item_obj\t= NULL;\n\t }\n\n\n// print_r( $ids);\n\n// \t $ut_item_id\t= $item_obj->id;\n\n\n\t $exp_total\t= Good::all()->count();\n\t $res\t= Good::getTableData( $get );\n// \t $item_obj->delete();\n\n// \t\tGood::whereIn('id');\n\n\n\t $this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 3 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t}", "public static function get_tests()\n {\n }", "public function getSubGroups() {}", "public function testGetAll() {\n // Create\n $this->phactory->create('kb_category');\n\n // Get\n $categories = $this->kb_category->get_all();\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "public function testGetItemSubCategoryById()\n {\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All ArraySort Tests');\n\n\t\t$path = App::pluginPath('ArraySort') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\t\treturn $suite;\n\t}", "public function generatePopularSubcategories()\n {\n\n $categoryId = $this->id;\n\n $subcategories = Subcategory::\n whereHas('categories', function ($query) use ($categoryId) {\n $query->where('categories.id', $categoryId);\n })\n ->whereHas('evercisegroups', function($query){})\n ->take(15)\n ->get()\n ->sortByDesc(function ($subcats) {\n return $subcats->evercisegroups->count();\n });\n\n $output = [];\n foreach ($subcategories as $subcat) {\n $output[] = [\n 'name' => $subcat->name,\n 'classes' => $subcat->evercisegroups->count(),\n ];\n }\n\n\n return $output;\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 }", "public function testGetProductCategories() {\n \n }", "function testGroupings()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$cust = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\r\n\t\t// Test add new category\r\n\t\t$data = $cust->addGroupingEntry(\"groups\", \"Unit Test Group\", \"e3e3e3\");\r\n\t\t$this->assertTrue(is_array($data));\r\n\t\t$this->assertTrue($data['id'] > 0);\r\n\t\t$eid = $data['id'];\r\n\r\n\t\t// Test get grouping data\r\n\r\n\t\t// Test update color\r\n\t\t$ret = $cust->updateGroupingEntry(\"groups\", $eid, null, \"cccccc\");\r\n\t\t$this->assertTrue($ret);\r\n\t\t$this->assertEquals($this->dbh->GetValue($this->dbh->Query(\"select color from customer_labels where id='$eid'\"), 0, \"color\"), \"cccccc\");\r\n\t\t\r\n\t\t// Test delete\r\n\t\t$ret = $cust->deleteGroupingEntry(\"groups\", $eid);\r\n\t\t$this->assertTrue($ret);\r\n\t}", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "public function getTests()\n\t{\n\t\t# code...\n\t\treturn $this->tests;\n\t}", "public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Plugin plugins test');\n\t\t$plugins = App::objects('plugin', APP . 'Plugin', false);\n\t\tforeach ($plugins as $plugin) {\n\t\t\tif (CakePlugin::loaded($plugin)) {\n\t\t\t\t$file = CakePlugin::path($plugin) . 'Test' . DS . 'Case' . DS . 'All' . $plugin . 'TestsTest.php';\n\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $suite;\n\t}", "public function scenarios(): array;", "public function testGetRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function processMultiLevelTestControllerDataProvider(): array\n {\n return [\n ['noparams', [], StatusCode::OK, 'No Parameters'],\n ['noparams', ['param1'], StatusCode::NOT_FOUND, ''],\n ['noparams', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['noparams', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foo', [], StatusCode::NOT_FOUND, ''],\n ['foo', ['param1'], StatusCode::OK, 'FooAction: Foo=[param1]'],\n ['foo', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foo', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobar', [], StatusCode::NOT_FOUND, ''],\n ['foobar', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobar', ['param1', 'param2'], StatusCode::OK, 'FooBarAction: Foo=[param1], Bar=[param2]'],\n ['foobar', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', [], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1', 'param2', 'param3'], 200, 'FooBarBazAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foonull', [], StatusCode::OK, 'FooNullAction: Foo=[*null*]'],\n ['foonull', ['param1'], StatusCode::OK, 'FooNullAction: Foo=[param1]'],\n ['foonull', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foonull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foonullbarnull', [], StatusCode::OK, 'FooNullBarNullAction: Foo=[*null*], Bar=[*null*]'],\n ['foonullbarnull', ['param1'], StatusCode::OK, 'FooNullBarNullAction: Foo=[param1], Bar=[*null*]'],\n ['foonullbarnull', ['param1', 'param2'], StatusCode::OK, 'FooNullBarNullAction: Foo=[param1], Bar=[param2]'],\n ['foonullbarnull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foonullbarnullbaznull', [], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[*null*], Bar=[*null*], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[*null*], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1', 'param2'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foobarnull', [], StatusCode::NOT_FOUND, ''],\n ['foobarnull', ['param1'], StatusCode::OK, 'FooBarNullAction: Foo=[param1], Bar=[*null*]'],\n ['foobarnull', ['param1', 'param2'], StatusCode::OK, 'FooBarNullAction: Foo=[param1], Bar=[param2]'],\n ['foobarnull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobarnullbaznull', [], StatusCode::NOT_FOUND, ''],\n ['foobarnullbaznull', ['param1'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[*null*], Baz=[*null*]'],\n ['foobarnullbaznull', ['param1', 'param2'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[*null*]'],\n ['foobarnullbaznull', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foobarbazstring', [], StatusCode::NOT_FOUND, ''],\n ['foobarbazstring', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobarbazstring', ['param1', 'param2'], StatusCode::OK, 'FooBarBazStringAction: Foo=[param1], Bar=[param2], Baz=[default string]'],\n ['foobarbazstring', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooBarBazStringAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['nonexisting', [], StatusCode::NOT_FOUND, ''],\n ['nonexisting', ['param1'], StatusCode::OK, 'DefaultAction: Foo=[nonexisting], Bar=[param1], Baz=[*null*]'],\n ['nonexisting', ['param1', 'param2'], StatusCode::OK, 'DefaultAction: Foo=[nonexisting], Bar=[param1], Baz=[param2]'],\n ['nonexisting', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ];\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function getGroups() {}", "public function filter_testcats()\n\t{\n\t\t$test_id = $this->input->post('test_id');\n\t\t$testcats = $this->testCatModel->get_testcats_by_test($test_id, TRUE);\n\t\techo form_dropdown_and_label('testcat', testcat_options($testcats));\n\t}", "public function getCases()\n {\n try {\n $sql = \"SELECT * FROM cases WHERE DELETED = 0\";\n\n //filter variables\n $text_filter = \"\";\n $date_filter = \"\";\n $category_filter = \"\";\n\n //prepare query\n if (isset($_SESSION['order_results'])) {\n\n //set session variables value\n (isset($_SESSION['text_filter'])) ? $text_filter = $_SESSION['text_filter'] : $text_filter = \"\";\n (isset($_SESSION['date_filter'])) ? $date_filter = $_SESSION['date_filter'] : $date_filter = \"\";\n\n //if value == 0 -> all categories\n (isset($_SESSION['category_filter']) && intval($_SESSION['category_filter']) != 0) ? $category_filter = $_SESSION['category_filter'] : $category_filter = \"\";\n\n $id = $text_filter;\n $text_filter = \"%\" . $text_filter . \"%\";\n $date_filter = \"%\" . $date_filter . \"%\";\n $category_filter = \"%\" . $category_filter . \"%\";\n\n\n if (intval($_SESSION['order_results']) == 0 || intval($_SESSION['order_results']) == 2) {\n\n //variable that sets if include or not null category id\n $include_null_category_id = (($_SESSION['category_filter']) == 0) ? \" OR category_id IS NULL) \" : \") \";\n\n //if true order by most recent\n $order = \"\";\n (intval($_SESSION['order_results']) == 0) ? $order = \"desc\" : null;\n //order by date\n $sql = \"SELECT * FROM cases WHERE DELETED = 0 AND \n (description LIKE :text_filter \n OR id LIKE :id \n OR title LIKE :text_filter \n OR variant LIKE :id) \n AND (created_at LIKE :date_filter) \n AND (category_id LIKE :category_id\" . $include_null_category_id .\n \"order by created_at \" . $order;\n\n } else if (intval($_SESSION['order_results']) == 1) {\n //variable that sets if include or not null category id\n $include_null_category_id = (($_SESSION['category_filter']) == 0) ? \" OR c.category_id IS NULL) \" : \") \";\n\n $sql = \"SELECT c.* FROM cases c\n INNER JOIN cases a ON \n c.id = a.variant \n where a.deleted = 0 AND a.variant IS NOT NULL \n AND (c.description LIKE :text_filter \n OR c.id LIKE :id \n OR c.title LIKE :text_filter \n OR c.variant LIKE :id) \n AND (c.created_at LIKE :date_filter)\n AND (c.category_id LIKE :category_id\" . $include_null_category_id .\n \" group by a.variant \n order by count(a.variant) desc;\";\n }\n }\n\n $prepared_query = $this->conn->prepare($sql);\n\n //bind params\n $prepared_query->bindParam(':text_filter', $text_filter, PDO::PARAM_STR);\n $prepared_query->bindParam(':id', $id, PDO::PARAM_STR);\n $prepared_query->bindParam(':date_filter', $date_filter, PDO::PARAM_STR);\n $prepared_query->bindParam(':category_id', $category_filter, PDO::PARAM_STR);\n\n $prepared_query->execute();\n\n return $prepared_query->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $ex) {\n }\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Attempt Plugin Tests');\n\n\t\t$basePath = CakePlugin::path('Attempt') . 'Test' . DS . 'Case' . DS;\n\t\t// controllers\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'Component' . DS . 'AttemptComponentTest.php');\n\t\t// models\n\t\t$suite->addTestFile($basePath . 'Model' . DS . 'AttemptTest.php');\n\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$Suite = new CakeTestSuite('All Tools tests');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Utility');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Misc');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View' . DS . 'Helper');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Behavior');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Datasource');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Console' . DS . 'Command');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component');\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component' . DS . 'Auth');\n\n\t\t//$path = dirname(__FILE__);\n\t\t//$Suite->addTestDirectory($path . DS . 'Controller');\n\n\t\t//$path = CakePlugin::path('Tools') . 'Test' . DS . 'Case' . DS;\n\t\t//$Suite->addTestDirectoryRecursive($path);\n\t\treturn $Suite;\n\t}", "public function testGetAllCategories()\n\t{\n\t $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n\t\t$number_of_categories = 10;\n\t\t$categories = factory(Category::class, $number_of_categories)->create([\n\t\t 'user_id' => $user->id\n ]);\n\n\t\t$response = $this->get('api/categories');\n\t\t$response->assertStatus(200);\n\t\t$this->assertTrue(count($categories) == $number_of_categories );\n\t}", "public function testGroupPagesLoads() {\n\t\t$categoryElementLocator = $this->locatorObj->readConfigData ( \"categoryLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of GroupPagesLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$categoryElementLocator,\"name\" );\n\t\t$this->byName ( $categoryElementLocator)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$articleCountLocator,\"xpath\");\n\t\t$GrouppageCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$this->logger->info ( \"The count value of the available results is fetched\" );\n\t\t$parts = explode ( ' ', $GrouppageCount );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 1500) {\n\t\t\t$this->logger->info ( \"Group page is loaded successfully and count is greater than 1500\" );\n\t\t} else {\n\t\t\t$this->fail ( \"Group page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of GroupPagesLoads testcase********** \" );\n\t}", "function get_all_knowledge_base_articles_grouped($only_clients = true, $where = array())\n{\n $CI =& get_instance();\n $CI->load->model('knowledge_base_model');\n $groups = $CI->knowledge_base_model->get_kbg('', 1);\n $i = 0;\n foreach ($groups as $group) {\n $CI->db->select('slug,subject,description,tblknowledgebase.active as active_article,articlegroup,articleid,staff_article');\n $CI->db->from('tblknowledgebase');\n $CI->db->where('articlegroup', $group['groupid']);\n $CI->db->where('active', 1);\n if ($only_clients == true) {\n $CI->db->where('staff_article', 0);\n }\n $CI->db->where($where);\n $CI->db->order_by('article_order', 'asc');\n $articles = $CI->db->get()->result_array();\n if (count($articles) == 0) {\n unset($groups[$i]);\n $i++;\n continue;\n }\n $groups[$i]['articles'] = $articles;\n $i++;\n }\n\n return $groups;\n}", "public function run()\n {\n $categories = [\n ['name' => 'cash_sale_without_check', 'name_ua' => 'Готівковий продаж без чеку', 'type' => 1, 'account_id' => 1],\n ['name' => 'sale_with_goods_delivery', 'name_ua' => 'Продаж з відправленням товару', 'type' => 1, 'account_id' => 1],\n ['name' => 'online_sale', 'name_ua' => 'Продаж онлайн', 'type' => 1, 'account_id' => 1],\n ['name' => 'withdrawal_non_cash_account', 'name_ua' => 'Зняття коштів з безготівкового рахунку', 'type' => 1, 'account_id' => 1],\n ['name' => 'ecquiring_sale', 'name_ua' => 'Продаж по еквайрингу', 'type' => 1, 'account_id' => 2],\n ['name' => 'other_noncash_addition', 'name_ua' => 'Інші поповнення безготівкового рахунку', 'type' => 1, 'account_id' => 2],\n ['name' => 'withdrawal_cash_account', 'name_ua' => 'Поповнення рахунку з готівкового', 'type' => 1, 'account_id' => 2],\n ['name' => 'goods_return', 'name_ua' => 'Повернення товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'goods_purchase', 'name_ua' => 'Закупка нового товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'other_cash_expenses', 'name_ua' => 'Інші витрати', 'type' => 0, 'account_id' => 1],\n ['name' => 'bank_services', 'name_ua' => 'Послуги банку', 'type' => 0, 'account_id' => 2],\n ['name' => 'other_noncash_expenses', 'name_ua' =>'Інші витрати', 'type' => 0, 'account_id' => 2],\n ];\n\n foreach($categories as $category){\n DB::table('categories')->insert($category);\n }\n }", "public static function groupList()\n {\n $category = Category::all();\n $array = [];\n foreach ($category->where('category_id', 0) as $parent){\n\n $array[$parent->title] = array();\n\n foreach($parent->children as $attribute) {\n $array[$parent->title][$attribute->id] = $attribute->title;\n }\n }\n\n return $array;\n }", "function icress_getSubject_wrapper($campus, $faculty, $subject) {\n $jadual = file_get_contents(getTimetableURL(true) . \"/list/{$campus}/{$faculty}/{$subject}.html\");\n $http_response_header or die(\"Alert_Error: Icress timeout! Please try again later.\"); \n\t\n # parse the html to more neat representation about classes\n $jadual = str_replace(array(\"\\r\", \"\\n\"), '', $jadual);\n\n\t// set error level\n\t$internalErrors = libxml_use_internal_errors(true);\n\t$htmlDoc = new DOMDocument();\n\t$htmlDoc->loadHTML($jadual);\n\t// Restore error level\n\tlibxml_use_internal_errors($internalErrors);\n\n\t$tableRows = $htmlDoc->getElementsByTagName('tr');\n\t$groups = [];\n\n\tforeach ($tableRows as $key => $row) {\n\t\tif ($key === 0 || $key === 1) {\n\t\t\tcontinue;\n\t\t}\n\t\t$tableDatas = [];\n\t\tforeach($row->childNodes as $tableData) {\n\t\t\tif (strcmp($tableData->nodeName, 'td') === 0) {\n\t\t\t\tarray_push($tableDatas, $tableData->nodeValue);\n\t\t\t}\n\t\t}\n\n\t\t$group = trim($row->childNodes[5]->nodeValue);\n\t\tarray_shift($tableDatas);\n\t\t$groups[$group][] = $tableDatas;\n\t}\n\n return $groups;\n}", "function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function testBuild()\n {\n $case = new \\ParserCase();\n $subjects = $this->parser->buildSubjects($case);\n $this->assertContainsOnlyInstancesOf('PhpBench\\\\Benchmark\\\\Subject', $subjects);\n $this->assertCount(2, $subjects);\n $subject = reset($subjects);\n\n $this->assertEquals(array('group1'), $subject->getGroups());\n $this->assertEquals(array('beforeSelectSql'), $subject->getBeforeMethods());\n $this->assertEquals(array('provideNodes', 'provideColumns'), $subject->getParameterProviders());\n $this->assertEquals(3, $subject->getNbIterations());\n $this->assertInternalType('int', $subject->getNbIterations());\n $this->assertEquals('Run a select query', $subject->getDescription());\n }", "function getBenchmarksByGroup(string $name){\n $benchmark_group = [];\n foreach($this->benchmarks as $benchmark){\n if($benchmark->getName() == $name || Text::startsWith($benchmark->getName(), $name.'.')){\n $benchmark_group[] = $benchmark;\n }\n }\n return $benchmark_group;\n }", "function get_covered_lines_by_filename_and_testgroup($file_name, $test_group)\n {\n $this->db->distinct();\n $this->db->select('covered_lines.line_number')\n ->from('tests')\n ->where_in('tests.test_group', $test_group)\n ->join('covered_files', 'covered_files.fk_test_id = tests.id')\n ->where('covered_files.file_name', $file_name)\n ->join('covered_lines', 'covered_lines.fk_file_id = covered_files.id');\n $result = $this->db->get()->result_array();\n //print_r($this->db->last_query());\n return $result;\n }", "public function run()\n {\n $categories =\n [\n [\n 'id' => 1,\n 'title' => 'product',\n 'slug' => 'product',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'title' => 'post',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 3,\n 'title' => 'DRIED FRUITS',\n 'slug' => 'dried-fruits',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'title' => 'HERBS&SPICES',\n 'slug' => 'herb-and-spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'title' => 'WHOLEFOODS & LEGUMES',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'title' => 'NUTS',\n 'slug' => 'nuts',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 7,\n 'title' => 'TEAS',\n 'slug' => 'teas',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'title' => 'Raw Almonds',\n 'slug' => 'raw-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 9,\n 'title' => 'Roasted Almonds',\n 'slug' => 'roasted-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 10,\n 'title' => 'Walnut',\n 'slug' => 'walnut',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 11,\n 'title' => 'Pumpkin Seeds',\n 'slug' => 'pumpkin-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 12,\n 'title' => 'Sunflower Seeds',\n 'slug' => 'sunflower-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 13,\n 'title' => 'Fruit Tea',\n 'slug' => 'fruit-tea',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 7,\n ],\n [\n 'id' => 14,\n 'title' => 'Yellow Apricot',\n 'slug' => 'yellow-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 15,\n 'title' => 'Natural Brown Apricot',\n 'slug' => 'natural-brown-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 16,\n 'title' => 'Herbs',\n 'slug' => 'herbs',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 17,\n 'title' => 'Spices',\n 'slug' => 'spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 18,\n 'title' => 'Cinnamon Powder',\n 'slug' => 'cinnamon-powder',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 19,\n 'title' => 'Cinnamon Sticks',\n 'slug' => 'cinnamon-sticks',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 20,\n 'title' => 'Paprika',\n 'slug' => 'paprika',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 17,\n ],\n\n ];\n\n\n Category::insert($categories);\n //Category::factory(1)->create();\n }", "public function getGroups();", "public function getGroups();", "public function testAddItemSubCategory()\n {\n }", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "public function groups();", "public function groups();", "public function getTests()\n {\n return array();\n }" ]
[ "0.74986976", "0.7086617", "0.6691464", "0.65267557", "0.63119113", "0.620665", "0.6079876", "0.60327107", "0.6007429", "0.5951198", "0.5872737", "0.5853507", "0.5796919", "0.5793174", "0.57880014", "0.5783927", "0.5762488", "0.57443327", "0.57362705", "0.57321674", "0.56898737", "0.56468314", "0.5644729", "0.56272733", "0.5622255", "0.5612686", "0.5596235", "0.559453", "0.55899173", "0.55887604", "0.55872566", "0.55785173", "0.5577745", "0.5556453", "0.5551248", "0.55305946", "0.5522399", "0.5518405", "0.55138713", "0.5499298", "0.549346", "0.5493305", "0.5484882", "0.54776555", "0.5459991", "0.5446057", "0.54420227", "0.5432787", "0.54290015", "0.54137814", "0.53976333", "0.53975445", "0.5391955", "0.53738934", "0.5365477", "0.53546286", "0.53536576", "0.5342667", "0.5339755", "0.5328894", "0.53286076", "0.53094995", "0.5297114", "0.52839994", "0.52765316", "0.52659845", "0.52652556", "0.52574533", "0.52410036", "0.52394056", "0.5233689", "0.5230577", "0.52267385", "0.5226284", "0.5222392", "0.52207106", "0.52194846", "0.5212061", "0.52052426", "0.52042645", "0.52034855", "0.51990104", "0.51882195", "0.51761425", "0.51721907", "0.516729", "0.51661915", "0.51640296", "0.5156497", "0.5152238", "0.51504356", "0.5146296", "0.5143882", "0.5142695", "0.5142695", "0.5136046", "0.5132053", "0.51306653", "0.51306653", "0.5126799" ]
0.6938299
2
This function returns all the testcases inside one group (and inside their categories and subcategories)
function getAllTestCasesInsideAGroup($groupID, $clientID) { global $definitions; //get item type $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID); //get property $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID); //get all categories inside group $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID); //Next, create a string with all the categories inside the group $toFilter = implode(',', $onlyIds); //Create the filter // build return properties array $returnProperties = array(); //build the filter $filters = array(); $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN'); $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties); //Get only the testCategories ids $onlyIds = array(); foreach ($allTestCases as $tcas) { $onlyIds[] = $tcas['ID']; } return $onlyIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function getAllTestCategoriesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentGroupID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryGroupID'], $clientID);\n\n //First, we need get all the categories that has the parent groupID\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentGroupID, 'value' => $groupID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "function drush_test_list($groups) {\n foreach ($groups as $group_name => $group_tests) {\n foreach ($group_tests as $test_class => $test_info) {\n $rows[] = array('group' => $group_name, 'class' => $test_class, 'name' => $test_info['name']);\n }\n }\n return $rows;\n}", "function getAllTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside\n $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID);\n\n $toFilter = implode(',', $allCategories);\n\n //When we have all the categories inside, get their test cases\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function simpletest_drush_test_groups($tests) {\n $groups = array();\n foreach (simpletest_categorize_tests($tests) as $name => $group) {\n $sanitized = strtr($name, array(' ' => ''));\n $groups[$sanitized] = $group;\n }\n return $groups;\n}", "public function getTests();", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "function drush_test_xml_results($test_id, $dir, $info) {\n $dir = is_string($dir) ? $dir : '.';\n\n // Get an array of test result objects from the database.\n if (drush_drupal_major_version() >= 7) {\n $results = db_query(\"SELECT * FROM {simpletest} WHERE test_id = :test_id ORDER BY test_class, message_id\", array(':test_id' => $test_id));\n }\n else {\n $result = db_query(\"SELECT * FROM {simpletest} WHERE test_id = %d ORDER BY test_class, message_id\", $test_id);\n $results = array();\n while ($row = db_fetch_object($result)) {\n $results[] = $row;\n }\n }\n\n // Collect and aggregate the data from simpletest.\n $test_suites = array();\n foreach ($results as $result) {\n // Create test_suite object.\n // Formatting name so it becomes \"group.name\" without any other dots. Jenkins uses string splitting on dots to gather info.\n $test_suite_name = str_replace('.', '', $info['group']) . '.' . str_replace('.', '', $info['name']);\n if (!isset($test_suites[$test_suite_name])) {\n $test_suite = new stdClass();\n $test_suite->name = $test_suite_name;\n $test_suite->test_cases = array();\n $test_suites[$test_suite_name] = $test_suite;\n }\n else {\n $test_suite = $test_suites[$test_suite_name];\n }\n // Create test_case object.\n list(, $test_case_name) = explode('->', $result->function, 2);\n if (empty($test_case_name)) {\n // There is no '->' present on static function calls. Use the whole string in those cases.\n $test_case_name = $result->function;\n }\n $test_case_name = str_replace('.', '', $test_case_name); // Remove those dots Jenkins loves so much.\n if (!isset($test_suite->test_cases[$test_case_name])) {\n $test_case = new stdClass();\n $test_case->name = $test_case_name;\n $test_case->failure_message = '';\n $test_case->error_message = '';\n $test_case->system_out = '';\n $test_case->system_err = '';\n $test_suite->test_cases[$test_case_name] = $test_case;\n }\n else {\n $test_case = $test_suite->test_cases[$test_case_name];\n }\n // Prepare message.\n $status = str_pad($result->status . ':', 10);\n $message = strip_tags($result->message, '<a>'); // Jenkins encodes the output so don't use any tags.\n $message = preg_replace('/<a.*?href=\"([^\"]+)\".*?>(.*?)<\\/a>/', '$1 $2', $message); // Jenkins will turn urls into clickable links.\n $message = $status . ' [' . $result->message_group . '] ' . $message . ' [' . basename($result->file) . ':' . $result->line . \"]\\n\";\n // Everything is logged in system_out.\n $test_case->system_out .= $message;\n // Failures go to failures.\n if ($result->status == 'fail') {\n $test_case->failure_message .= $message;\n }\n // Exceptions go both to errors and system_err.\n if ($result->status == 'exception') {\n $test_case->error_message .= $message;\n $test_case->system_err .= $message;\n }\n }\n\n // Build an XML document from our results.\n $xml = new DOMDocument('1.0', 'UTF-8');\n foreach ($test_suites as $test_suite) {\n $test_suite_element = $xml->createElement('testsuite');\n $test_suite_element->setAttribute('name', $test_suite->name);\n foreach ($test_suite->test_cases as $test_case) {\n $test_case_element = $xml->createElement('testcase');\n $test_case_element->setAttribute('name', $test_case->name);\n if (!empty($test_case->failure_message)) {\n $failure_element = $xml->createElement('failure');\n $failure_element->setAttribute('message', $test_case->failure_message);\n $test_case_element->appendChild($failure_element);\n }\n if (!empty($test_case->error_message)) {\n $error_element = $xml->createElement('error');\n $error_element->setAttribute('message', $test_case->error_message);\n $test_case_element->appendChild($error_element);\n }\n if (!empty($test_case->system_out)) {\n $system_out_element = $xml->createElement('system-out');\n $system_out_element->appendChild($xml->createTextNode($test_case->system_out));\n $test_case_element->appendChild($system_out_element);\n }\n if (!empty($test_case->system_err)) {\n $system_err_element = $xml->createElement('system-err');\n $system_err_element->appendChild($xml->createTextNode($test_case->system_err));\n $test_case_element->appendChild($system_err_element);\n }\n $test_suite_element->appendChild($test_case_element);\n }\n $xml->appendChild($test_suite_element);\n }\n // Save to disk.\n file_put_contents($dir . '/testsuite-' . $test_id . '.xml', $xml->saveXML());\n}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch, $clientID) {\n global $definitions;\n\n $testcasesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n $testcasesNamePropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesName'], $clientID);\n $testcasesOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesOrder'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n $returnProperties[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'name' => 'testCategoryParentID');\n $returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n //Next, clear all the test cases that are not inside the relation\n $appliedTestCases = array();\n for ($i = 0; $i < count($testCases); $i++) {\n if (in_array($testCases[$i]['ID'], $idsToSearch)) {\n $appliedTestCases[] = $testCases[$i];\n }\n }\n //And return the testCases\n return ($appliedTestCases);\n}", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "public function run()\n {\n $data = [\n \t\t[//CG1\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C01',\n \t\t\t'categoryname' => 'Đầm Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C02',\n \t\t\t'categoryname' => 'Áo Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C03',\n \t\t\t'categoryname' => 'Quần Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C04',\n \t\t\t'categoryname' => 'Chân Váy',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG1',\n \t\t\t'categoryid' => 'C05',\n \t\t\t'categoryname' => 'Bộ Liền',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t],//END CG1\n \t\t[//CG2\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C06',\n \t\t\t'categoryname' => 'Đầm Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C07',\n \t\t\t'categoryname' => 'Áo Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C08',\n \t\t\t'categoryname' => 'Quần Nữ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C09',\n \t\t\t'categoryname' => 'Chân Váy',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG2',\n \t\t\t'categoryid' => 'C10',\n \t\t\t'categoryname' => 'Bộ Liền',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t],//END CG2\n \t\t[//CG3\n \t\t\t'categorygroup_id' => 'CG3',\n \t\t\t'categoryid' => 'C11',\n \t\t\t'categoryname' => 'Sản Phẩm Mẹ',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t], [\n \t\t\t'categorygroup_id' => 'CG3',\n \t\t\t'categoryid' => 'C12',\n \t\t\t'categoryname' => 'Sản Phẩm Bé',\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t\t]\n \t];\n\n DB::table('categories')->insert($data);\n }", "public function provideValidCategoryGroups()\n {\n return [\n 'emptyArray' => [\n 'CategoryGroups' => [],\n 'expectedResult' => [],\n ],\n 'single group' => [\n 'CategoryGroups' => [\n 'group1' => $this->getMockCategoryGroup(1),\n ],\n 'expectedResult' => [\n 'groupHandle1' => [\n 'name' => 'groupName1',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n ],\n ],\n 'multiple groups' => [\n 'CategoryGroups' => [\n 'group1' => $this->getMockCategoryGroup(1),\n 'group2' => $this->getMockCategoryGroup(2),\n ],\n 'expectedResult' => [\n 'groupHandle1' => [\n 'name' => 'groupName1',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n 'groupHandle2' => [\n 'name' => 'groupName2',\n 'hasUrls' => null,\n 'template' => null,\n 'maxLevels' => null,\n 'locales' => [\n 'en' => [\n 'urlFormat' => null,\n 'nestedUrlFormat' => null,\n ],\n ],\n 'fieldLayout' => [\n 'fields' => [],\n ],\n ],\n ],\n ],\n ];\n }", "public function testGroups(): void\n {\n $process = $this->phpbench(\n 'run --group=do_nothing --dump --progress=none benchmarks/set1/BenchmarkBench.php'\n );\n\n $this->assertExitCode(0, $process);\n $output = $process->getOutput();\n $this->assertXPathCount(1, $output, '//subject');\n }", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "public static function getGroups(): array\n {\n return ['test'];\n }", "function getTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public static function suite() {\n\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Collectionable plugin tests');\n\n\t\t$basePath = App::pluginPath('Collectionable') . 'Test' . DS . 'Case' . DS;\n\t\t$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basePath));\n\n\t\twhile ($it->valid()) {\n\n\t\t\tif (!$it->isDot()) {\n\t\t\t\t$file = $it->key();\n\t\t\t\tif (preg_match('|Test\\.php$|', $file) && $file !== __FILE__) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$it->next();\n\t\t}\n\n\t\treturn $suite;\n\n\t}", "function get_categories_by_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'));\n\n\t\t// start hook\n\t\t$vars = $this->_hook('get_categories_by_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_category_by_group($vars['group_id'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_categories_by_group_end', $data);\n\n\t\t$this->response($data);\n\t}", "public function getTestResultsData()\n {\n $out = [];\n\n // Case #0, sorted in default acceding\n $out[] = [\n [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc'\n ];\n\n // Case #1, sorted in descending order by term, blue is prioritized.\n $out[] = [\n [\n 'acme',\n 'bar',\n 'foo',\n ],\n 'sc_zero_choices'\n ];\n\n // Case #2, all items prioritized, so sorting shouldn't matter.\n $out[] = [\n [\n 'blue',\n 'green',\n ],\n 'sc_sort_term_a'\n ];\n\n // Case #3, sort items by count, red prioritized.\n $out[] = [\n [\n 'yellow',\n ],\n 'sc_sort_term_d'\n ];\n\n // Case #4\n $out[] = [\n [\n 'blue',\n 'red',\n 'green',\n 'yellow'\n ],\n 'sc_sort_count'\n ];\n\n // Case #5 with selected man\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc',\n ['manufacturer' => 'a']\n ];\n\n // Case #6 with selected man with zero choices\n $out[] = [\n [\n 'acme',\n 'foo',\n 'bar',\n ],\n 'sc_zero_choices',\n ['manufacturer' => 'a']\n ];\n\n // Case #7 with selected man with zero choices\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n 'green',\n ],\n 'sc_zero_choices_color',\n ['manufacturer' => 'a']\n ];\n\n return $out;\n }", "public function testGetItemSubCategoryByFilter()\n {\n }", "private function getCaseNodes(): array\n {\n $caseNodes = $this->xml->xpath('//testcase');\n $cases = [];\n foreach ($caseNodes as $node) {\n $caseFilename = (string) $node['file'];\n if (! isset($cases[$caseFilename])) {\n $cases[$caseFilename] = [];\n }\n\n $cases[$caseFilename][] = $node;\n }\n\n return $cases;\n }", "public function testListCategories()\n {\n }", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Indicadores Tests');\n\t\t$suite->addTestDirectoryRecursive(App::pluginPath('Indicadores') . 'Test' . DS . 'Case' . DS);\n\n\t\treturn $suite;\n\t}", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }", "function getParentCategoriesForTestCase($testCaseID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //First, get the parent test category for the test case\n $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID);\n\n //return all categories\n return getParentCategoriesForCategory($categoryID, $clientID);\n}", "public function run()\n\t{\n\t\t$now = date('Y-m-d H:i:s');\n\t\t$subcategories = [\n\t\t\t[\n\t\t\t\t'id' => 1,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Rules',\n\t\t\t\t'subcatDescription' => 'Here are the rules',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 2,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'More Rules',\n\t\t\t\t'subcatDescription' => 'Another subcat',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 3,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Buttons',\n\t\t\t\t'subcatDescription' => 'About buttons',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 4,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Wells',\n\t\t\t\t'subcatDescription' => 'About wells',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 5,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Models',\n\t\t\t\t'subcatDescription' => 'stupid things...',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 6,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'databases',\n\t\t\t\t'subcatDescription' => 'eloquent is weird',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t]\n\t\t];\n\t\t\n\t\tDB::table('subcategories')->insert($subcategories);\n\n\t}", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "function test_all () {\n\n\t\t$this->layout = 'test';\n\n\t\t$tests_folder = new Folder('../tests');\n\n\t\t$results = array();\n\t\t$total_errors = 0;\n\t\tforeach ($tests_folder->findRecursive('.*\\.php') as $test) {\n\t\t\tif (preg_match('/^(.+)\\.php/i', basename($test), $r)) {\n\t\t\t\trequire_once($test);\n\t\t\t\t$test_name = Inflector::Camelize($r[1]);\n\t\t\t\tif (preg_match('/^(.+)Test$/i', $test_name, $r)) {\n\t\t\t\t\t$module_name = $r[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$module_name = $test_name;\n\t\t\t\t}\n\t\t\t\t$suite = new TestSuite($test_name);\n\t\t\t\t$result = TestRunner::run($suite);\n\n\t\t\t\t$total_errors += $result['errors'];\n\n\t\t\t\t$results[] = array(\n\t\t\t\t\t'name'=>$module_name,\n\t\t\t\t\t'result'=>$result,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->set('success', !$total_errors);\n\t\t$this->set('results', $results);\n\t}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "public function testAll()\n\t\t{\n\t\t\tlist ($categoriesBefore) = $this->category->all(array ('nameContains' => 'Top Category'));\n\t\t\tforeach ($categoriesBefore as $categoryBefore) {\n\t\t\t\t$categoryBefore->delete();\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$this->category->create(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'categoryName' => array ('en' => \"Top Category $i\"),\n\t\t\t\t\t\t'categoryImage' => \"topcategory$i.jpg\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tlist ($categories, $count) = $this->category->all(array (\n\t\t\t\t'nameContains' => 'Top Category',\n\t\t\t\t'limit' => 2,\n\t\t\t\t'offset' => 1,\n\t\t\t\t'fields' => 'categoryId,categoryName'\n\t\t\t));\n\t\t\t\n\t\t\t$this->assertEquals(3, $count);\n\t\t\t$this->assertEquals(2, count($categories));\n\t\t\t\n\t\t\tfor ($j = 1; $j <= 2; $j++) {\n\t\t\t\t$this->assertEquals('Top Category '.($j + 1), $categories[$j - 1]->name->EN);\n\t\t\t\t$this->assertTrue(!isset($categories[$j - 1]->image));\n\t\t\t}\n\t\t}", "public function tests()\n {\n $this->authCheck();\n\n /*$testData = DB::table('diagnostic_tests')\n ->get();*/\n\n $testData = DB::table('diagnostic_tests')\n ->join('categories', 'diagnostic_tests.category_id', '=', 'categories.id')\n ->select('diagnostic_tests.*', 'categories.name as catName')\n ->get();\n \n $tests=view('admin.test_list')\n ->with('testData',$testData);\n\n return view('admin.master')\n ->with('main_content',$tests);\n\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 test_scenario1() {\n\n $data = array(\n array(\"model\" =>\n array(\"topic_model\" =>\n array(\"alpha\" => 0.08,\n \"beta\" => 0.1,\n \"hashed_seed\" => 0,\n \"language\" => \"en\",\n \"bigrams\" => True,\n \"case_sensitive\" => False,\n \"term_topic_assignments\" => array(array(0, 0, 1, 2),\n array(0, 1, 2, 0),\n array(1, 2, 0, 0),\n array(0, 0, 2, 0)),\n \"termset\" => array(\"cycling\", \"playing\", \"shouldn't\", \"uńąnimous court\"),\n \"options\" => [],\n \"topics\" => array(array(\"name\" => \"Topic 1\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"a\", \"b\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 2\",\n \"id\" => \"000001\",\n \"top_terms\" => array(\"c\", \"d\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 3\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"e\", \"f\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 4\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"g\", \"h\"),\n \"probability\" => 0.1)),\n \"fields\" => array(\"000001\" => array(\"datatype\" => \"string\",\n \"name\" => \"TEST TEXT\",\n \"optype\" => \"text\",\n \"order\" => 0,\n \"preferred\" => True,\n \"summary\" => [],\n \"term_analysis\" => []))),\n \"resource\" => \"topicmodel/aaaaaabbbbbbccccccdddddd\",\n \"status\" => array(\"code\" => 5)),\n \"text\" => array(\"TEST TEXT\" => \"uńąnimous court 'UŃĄNIMOUS COURT' `play``the plays PLAYing SHOULDN'T CYCLE cycling shouldn't uńąnimous or court's\"),\n \"expected\" => array(array(\"name\" => 'Topic 1', \"probability\" => 0.17068527918781726),\n array(\"name\" => 'Topic 2', \"probability\" => 0.1865482233502538),\n array(\"name\" => 'Topic 3', \"probability\" => 0.5157043147208121),\n array(\"name\" => 'Topic 4', \"probability\" => 0.12706218274111675))));\n\n foreach($data as $item) {\n print \"\\nSuccessfully creating a local distribution from a Topic Model\\n\";\n print \"I create a local topic model\\n\";\n $object = json_decode(json_encode($item[\"model\"]), FALSE);\n $local_topic_model = new TopicModel($object);\n\n print \"I create a distribution for local topic model\\n\";\n $distribution = $local_topic_model->distribution($item[\"text\"]);\n\n print \"And the distribution for local topic model equals the expected values.\\n\";\n $this->assertEquals($distribution, $item[\"expected\"]);\n }\n }", "private function groupByCategory(){\n \n $searchResults = null;\n $items = $this->items; \n \n foreach($items as $item){\n foreach($item->categories as $category_tmp){ \n $searchResults[$category_tmp][] = $item;\n } \n }\n \n return $searchResults;\n }", "public function run()\n {\n DB::table('tests')->truncate();\n $data = [\n [\n 'category_id' => 4,\n 'created_user_id' => 1,\n 'name' => 'test 14',\n 'code' => 'HK-492',\n 'content_guide' => 'HK492 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 5,\n 'created_user_id' => 1,\n 'name' => 'test 13',\n 'code' => 'HK-493',\n 'content_guide' => 'HK493 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 6,\n 'created_user_id' => 1,\n 'name' => 'test 187',\n 'code' => 'HK-494',\n 'content_guide' => 'HK494 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 7,\n 'created_user_id' => 1,\n 'name' => 'test 165',\n 'code' => 'HK-495',\n 'content_guide' => 'HK495 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 8,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-496',\n 'content_guide' => 'HK496 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 9,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-497',\n 'content_guide' => 'HK497 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 10,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-498',\n 'content_guide' => 'HK498 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 11,\n 'created_user_id' => 1,\n 'name' => 'test 14534',\n 'code' => 'HK-499',\n 'content_guide' => 'HK499 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 12,\n 'created_user_id' => 1,\n 'name' => 'test 14534',\n 'code' => 'HK-490',\n 'content_guide' => 'HK490 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 13,\n 'created_user_id' => 1,\n 'name' => 'test 1453',\n 'code' => 'HK-491',\n 'content_guide' => 'HK492 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 14,\n 'created_user_id' => 1,\n 'name' => 'test 1464',\n 'code' => 'HK-429',\n 'content_guide' => 'HK429 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 15,\n 'created_user_id' => 1,\n 'name' => 'test 1468',\n 'code' => 'HK-439',\n 'content_guide' => 'HK439 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 16,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-459',\n 'content_guide' => 'HK459 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 17,\n 'created_user_id' => 1,\n 'name' => 'test 1765',\n 'code' => 'HK-469',\n 'content_guide' => 'HK469 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 18,\n 'created_user_id' => 1,\n 'name' => 'test 17867',\n 'code' => 'HK-489',\n 'content_guide' => 'HK489 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 19,\n 'created_user_id' => 1,\n 'name' => 'test 1756',\n 'code' => 'HK-249',\n 'content_guide' => 'HK249 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 20,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-349',\n 'content_guide' => 'HK349 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 21,\n 'created_user_id' => 1,\n 'name' => 'test 145',\n 'code' => 'HK-549',\n 'content_guide' => 'HK549 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 22,\n 'created_user_id' => 1,\n 'name' => 'test 17486',\n 'code' => 'HK-949',\n 'content_guide' => 'HK949 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 1,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-649',\n 'content_guide' => 'HK649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 2,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-1249',\n 'content_guide' => 'HK1249 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 3,\n 'created_user_id' => 1,\n 'name' => 'test 1724',\n 'code' => 'HK-2349',\n 'content_guide' => 'HK2349 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 4,\n 'created_user_id' => 1,\n 'name' => 'test 14678',\n 'code' => 'HK-5649',\n 'content_guide' => 'HK5649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n [\n 'category_id' => 5,\n 'created_user_id' => 1,\n 'name' => 'test 1786',\n 'code' => 'HK-9649',\n 'content_guide' => 'HK9649 - guide',\n 'execute_time' => 45,\n 'total_question' => 60,\n 'free' => 1,\n 'publish' => 1,\n ],\n ];\n foreach ($data as $item) {\n Test::create($item);\n }\n }", "public function getContests($orderby);", "public function testGetItemSubCategoryTags()\n {\n }", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch){\n\n\tglobal $clientID,$categoriesItemTypeID,$categoryParentPropertyID,$testcasesItemTypeID,$testCasesCategoryPropertyID,$testcasesNamePropertyID,$testcasesOrderPropertyID,$inDebug;\n\n\t// build return properties array\n\t$returnProperties = array();\n\t$returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n\t$returnProperties[] = array('ID' => $testCasesCategoryPropertyID, 'name' => 'testCategoryParentID');\n\t$returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n\t//build the filter\n\t$filters = array();\n\t$filters[] = array('ID' => $testCasesCategoryPropertyID, 'value' => $parentCategoryID);\n\n\t$testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n\t//Next, save only the test cases that are inside the relation\n\t$resultTC = array();\n\tfor ($i=0;$i<count($testCases);$i++){\n\t\tforeach ($idsToSearch as $rel){\n\t\t\tif ($testCases[$i]['ID']==$rel){\n\t\t\t\t//test found in relation, add to returning array\n\t\t\t\t$resultTC[]=$testCases[$i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t//And return the testCases\n\treturn($resultTC);\n}", "private function getContestsInfo(Group $group, &$contests)\n {\n $contests = $group\n ->contests()\n ->select(Constants::CONTESTS_DISPLAYED_FIELDS)\n ->paginate(Constants::CONTESTS_COUNT_PER_PAGE);\n }", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public function testBasicTestGroupSort()\n {\n $sampleTestArray = [\n 'test1' => 100,\n 'test2' => 300,\n 'test3' => 50,\n 'test4' => 60,\n 'test5' => 25,\n 'test6' => 125,\n 'test7' => 250,\n 'test8' => 1,\n 'test9' => 80,\n 'test10' => 25\n ];\n\n $expectedResult = [\n 1 => ['test2'],\n 2 => ['test7'],\n 3 => ['test6', 'test4', 'test8'],\n 4 => ['test1', 'test9'],\n 5 => ['test3', 'test5', 'test10']\n ];\n\n $testSorter = new ParallelGroupSorter();\n $actualResult = $testSorter->getTestsGroupedBySize([], $sampleTestArray, 200);\n\n $this->assertCount(5, $actualResult);\n\n foreach ($actualResult as $gropuNumber => $actualTests) {\n $expectedTests = $expectedResult[$gropuNumber];\n $this->assertEquals($expectedTests, array_keys($actualTests));\n }\n }", "public function run()\n {\n $categories = [\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Gear', 'slug' => 'gear', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Parts', 'slug' => 'parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Casual', 'slug' => 'casual', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'News', 'slug' => 'news', 'sortorder' => 4, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Clothes', 'slug' => 'clothes', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Helmets', 'slug' => 'helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Boots', 'slug' => 'boots', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Suspension', 'slug' => 'suspension', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'maintenance', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Oils', 'slug' => 'oils', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'T-Sirts', 'slug' => 'tshirts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'Caps', 'slug' => 'caps', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Jerseys', 'slug' => 'jerseys', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Pants', 'slug' => 'pants', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-helmets', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-boots', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-boots', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Fork', 'slug' => 'fork-parts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Shock', 'slug' => 'shock-parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Airfilter', 'slug' => 'airfilter', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Oilfilter', 'slug' => 'oilfilter', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Brakepads', 'slug' => 'brakepads', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Engine Oils', 'slug' => 'engine-oils', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Suspension Oils', 'slug' => 'suspension-oils', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'bike-maintenance', 'sortorder' => 3, 'active' => 1],\n ];\n\n DB::table('categories')->insert($categories);\n }", "public function run()\n {\n\n $category_array = [\n \n //category\n 'Home Services' => [\n \n // sub-category\n 'Key Making' => [\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Other key making'\n ],\n \n // sub-category\n 'Carpenter' => [\n //services\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixture repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n\n //sub-category\n 'Plumber' => [\n 'Tap Repair',\n 'Flush Repair',\n 'Leakage',\n 'Installation of Sanitaryware',\n 'Other plumber service',\n ]\n ],\n\n //category\n 'Road Services' => [\n \n //sub-category\n 'Crane/Towing' => [\n \n //services\n 'Hydraulic/Rope',\n 'Chain',\n 'Zero degree',\n 'Other towing service'\n ]\n ],\n\n //category\n 'Office Services' => [\n\n //sub-category\n 'Key Making' => [\n\n //services\n 'Car Key',\n 'Door Key',\n 'Bike Key',\n 'Others key making',\n ],\n\n //sub-category\n 'Carpenter' => [\n\n //services\n 'Flooring',\n 'Furniture repair/manufacturing',\n 'Modular kitchen',\n 'Door/gate repairing and manufacturing',\n 'Interior decoration',\n 'Antique wooden work',\n 'Other wooden work',\n ],\n\n //sub-category\n 'Electrician' => [\n\n //services\n 'AC/refrigerator repairing',\n 'Geyser repairing',\n 'Juicer/mixer repairing',\n 'Home Wiring',\n 'Other electrician service',\n ],\n ]\n ];\n\n foreach ($category_array as $category_name => $sub_category_array) {\n $category = new Category();\n $category->name = $category_name;\n $category->save();\n\n foreach ($sub_category_array as $sub_category_name => $services_array) {\n $sub_category = new SubCategory();\n $sub_category->name = $sub_category_name;\n $sub_category->category_id = $category->id;\n $sub_category->save();\n\n $total_services = count($services_array);\n for ($i = 0; $i < $total_services; $i++) {\n $service = new Service();\n $service->name = $services_array[$i];\n $service->sub_category_id = $sub_category->id;\n $service->save();\n }\n }\n }\n }", "function __testObjectFilesFromGroupFile($groupFile, $isApp = true) {\n\t\t$manager = CodeCoverageManager::getInstance();\n\t\t$testManager = new TestManager();\n\n\t\t$path = TESTS;\n\t\tif (!$isApp) {\n\t\t\t$path = CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'tests';\n\t\t}\n\t\tif (!!$manager->pluginTest) {\n\t\t\t$path = App::pluginPath($manager->pluginTest) . DS . 'tests';\n\t\t}\n\n\t\t$result = array();\n\t\tif ($groupFile == 'all') {\n\t\t\t$files = array_keys($testManager->getTestCaseList());\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$file = str_replace(DS . 'tests' . DS . 'cases' . DS, DS, $file);\n\t\t\t\t$file = str_replace('.test.php', '.php', $file);\n\t\t\t\t$file = str_replace(DS . DS, DS, $file);\n\t\t\t\t$result[] = $file;\n\t\t\t}\n\t\t} else {\n\t\t\t$path .= DS . 'groups' . DS . $groupFile . $testManager->_groupExtension;\n\t\t\tif (!file_exists($path)) {\n\t\t\t\ttrigger_error(__('This group file does not exist!', true));\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\t$result = array();\n\t\t\t$groupContent = file_get_contents($path);\n\t\t\t$ds = '\\s*\\.\\s*DS\\s*\\.\\s*';\n\t\t\t$pluginTest = 'APP\\.\\'plugins\\'' . $ds . '\\'' . $manager->pluginTest . '\\'' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pluginTest .= '|App::pluginPath\\(\\'' . $manager->pluginTest . '\\'\\)' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pattern = '/\\s*TestManager::addTestFile\\(\\s*\\$this,\\s*(' . $pluginTest . '|APP_TEST_CASES|CORE_TEST_CASES)' . $ds . '(.*?)\\)/i';\n\t\t\tpreg_match_all($pattern, $groupContent, $matches);\n\n\t\t\tforeach ($matches[2] as $file) {\n\t\t\t\t$patterns = array(\n\t\t\t\t\t'/\\s*\\.\\s*DS\\s*\\.\\s*/',\n\t\t\t\t\t'/\\s*APP_TEST_CASES\\s*/',\n\t\t\t\t\t'/\\s*CORE_TEST_CASES\\s*/',\n\t\t\t\t);\n\n\t\t\t\t$replacements = array(DS, '', '');\n\t\t\t\t$file = preg_replace($patterns, $replacements, $file);\n\t\t\t\t$file = str_replace(\"'\", '', $file);\n\t\t\t\t$result[] = $manager->__testObjectFileFromCaseFile($file, $isApp) . '.php';\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function findGroups() {\n\t\t\n\t}", "public function testCanGetFilteredDatasetsForAccountsOptionallyFilteredByProjectAndTagAndCategories() {\n AuthenticationHelper::login(\"[email protected]\", \"password\");\n\n\n $categories = [\n new CategorySummary(\"Account1\", \"An account wide category available to account 1\", \"account1\")\n ];\n $this->metaDataService->returnValue(\"getObjectCategoriesFromSummaries\", [\n new ObjectCategory(new Category(new CategorySummary(\"Account 1\", \"Account 1\", \"account1\"), 1)),\n ], [\n $categories, 1, null\n ]);\n\n\n $accountDataSet = new DatasetInstanceSummary(\"Account Dataset\", \"test-json\", null, [], [], [], null, null, $categories);\n $this->datasetService->saveDataSetInstance($accountDataSet, null, 1);\n\n $accountDataSet = new DatasetInstanceSummary(\"Second Account Dataset\", \"test-json\");\n $this->datasetService->saveDataSetInstance($accountDataSet, null, 1);\n\n\n $datasetProject = new Project(\"Dataset Project\", 1, \"datasetProject\");\n $datasetProject->save();\n\n $this->metaDataService->returnValue(\"getObjectTagsFromSummaries\", [\n new ObjectTag(new Tag(new TagSummary(\"Special\", \"Special Tag\", \"special\"), 1, \"datasetProject\")),\n new ObjectTag(new Tag(new TagSummary(\"General\", \"General Tag\", \"general\"), 1, \"datasetProject\"))\n ], [\n [\n new TagSummary(\"Special\", \"\", \"special\"),\n new TagSummary(\"General\", \"\", \"general\")\n ], 1, \"datasetProject\"\n ]);\n\n $this->metaDataService->returnValue(\"getObjectTagsFromSummaries\", [\n new ObjectTag(new Tag(new TagSummary(\"General\", \"General Tag\", \"general\"), 1, \"datasetProject\"))\n ], [\n [\n new TagSummary(\"General\", \"\", \"general\")\n ], 1, \"datasetProject\"\n ]);\n\n\n $projectDataSet = new DatasetInstanceSummary(\"Project Dataset\", \"test-json\");\n $projectDataSet->setTags([\n new TagSummary(\"Special\", \"\", \"special\"),\n new TagSummary(\"General\", \"\", \"general\")\n ]);\n $this->datasetService->saveDataSetInstance($projectDataSet, \"datasetProject\", 1);\n\n $projectDataSet = new DatasetInstanceSummary(\"Second Project Dataset\", \"test-json\");\n $projectDataSet->setTags([\n new TagSummary(\"General\", \"\", \"general\")\n ]);\n $this->datasetService->saveDataSetInstance($projectDataSet, \"datasetProject\", 1);\n\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [], null, 0, 10, 1);\n $this->assertEquals(4, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Project Dataset\", $filtered[1]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[2]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[2]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[3]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[3]->getTitle());\n\n\n // Filter on title\n $filtered = $this->datasetService->filterDataSetInstances(\"econd\", [], [], null, 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n\n // Filter on categories\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [\"account1\"], [], null, 0, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n\n // Filter on project key\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n // Filter on tags\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[1]->getTitle());\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"special\"], \"datasetProject\", 0, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n\n // Filter on special NONE tags\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"NONE\"], null, 0, 10, 1);\n $this->assertEquals(2, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Account Dataset\", $filtered[0]->getTitle());\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[1]);\n $this->assertEquals(\"Second Account Dataset\", $filtered[1]->getTitle());\n\n // Offsets and limits\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 0, 1, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Project Dataset\", $filtered[0]->getTitle());\n\n\n $filtered = $this->datasetService->filterDataSetInstances(\"\", [], [\"general\"], \"datasetProject\", 1, 10, 1);\n $this->assertEquals(1, sizeof($filtered));\n $this->assertInstanceOf(DatasetInstanceSearchResult::class, $filtered[0]);\n $this->assertEquals(\"Second Project Dataset\", $filtered[0]->getTitle());\n\n\n }", "public function getTests()\n {\n return $this->hasMany(Test::className(), ['projectId' => 'id']);\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getContestsByType_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|required|callback_validateSession');\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No,All]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('MatchGUID', 'MatchGUID', 'trim|callback_validateEntityGUID[Matches,MatchID]');\n $this->form_validation->set_rules('Keyword', 'Search Keyword', 'trim');\n $this->form_validation->set_rules('Filter', 'Filter', 'trim|in_list[Normal]');\n $this->form_validation->set_rules('OrderBy', 'OrderBy', 'trim');\n $this->form_validation->set_rules('Sequence', 'Sequence', 'trim|in_list[ASC,DESC]');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Contests Data */\n\n $ContestData = array();\n\n $ContestTypes[] = array('Key' => 'Hot Contest', 'TagLine' => 'Filling Fast. Join Now!', 'Where' => array('ContestType' => 'Hot'));\n $ContestTypes[] = array('Key' => 'Contests for Champions', 'TagLine' => 'High Entry Fees, Intense Competition', 'Where' => array('ContestType' => 'Champion'));\n $ContestTypes[] = array('Key' => 'Head To Head Contest', 'TagLine' => 'The Ultimate Face Off', 'Where' => array('ContestType' => 'Head to Head'));\n $ContestTypes[] = array('Key' => 'Practice Contest', 'TagLine' => 'Hone Your Skills', 'Where' => array('ContestType' => 'Practice'));\n $ContestTypes[] = array('Key' => 'More Contest', 'TagLine' => 'Keep Winning!', 'Where' => array('ContestType' => 'More'));\n $ContestTypes[] = array('Key' => 'Mega Contest', 'TagLine' => 'Get ready for mega winnings!', 'Where' => array('ContestType' => 'Mega'));\n $ContestTypes[] = array('Key' => 'Winner Takes All', 'TagLine' => 'Everything To Play For', 'Where' => array('ContestType' => 'Winner Takes All'));\n $ContestTypes[] = array('Key' => 'Only For Beginners', 'TagLine' => 'Play Your First Contest Now', 'Where' => array('ContestType' => 'Only For Beginners'));\n\n foreach ($ContestTypes as $key => $Contests) {\n\n array_push($ContestData, $this->SnakeDrafts_model->getContests(@$this->Post['Params'], array_merge($this->Post, array('MatchID' => @$this->MatchID, 'UserID' => @$this->UserID, 'SessionUserID' => $this->SessionUserID), $Contests['Where']), TRUE, @$this->Post['PageNo'], @$this->Post['PageSize'])['Data']);\n $ContestData[$key]['Key'] = $Contests['Key'];\n $ContestData[$key]['TagLine'] = $Contests['TagLine'];\n }\n\n $Statics = $this->db->query('SELECT (SELECT COUNT(*) AS `NormalContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Normal\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as NormalContest,\n ( SELECT COUNT(*) AS `ReverseContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN(1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Reverse\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as ReverseContest,(\n SELECT COUNT(*) AS `JoinedContest` FROM `nba_sports_contest_join` J, `nba_sports_contest` C WHERE C.ContestID = J.ContestID AND J.UserID = \"' . $this->SessionUserID . '\" AND C.MatchID = \"' . $this->MatchID . '\"\n )as JoinedContest,(\n SELECT COUNT(*) AS `TotalTeams` FROM `nba_sports_users_teams`WHERE UserID = \"' . $this->SessionUserID . '\" AND MatchID = \"' . $this->MatchID . '\"\n ) as TotalTeams,(SELECT COUNT(*) AS `H2HContest` FROM `nba_sports_contest` C, `tbl_entity` E, `nba_sports_contest_join` CJ WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestFormat=\"Head to Head\" AND E.StatusID = 1 AND C.ContestID = CJ.ContestID AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID )) as H2HContests')->row();\n\n if (!empty($ContestData)) {\n $this->Return['Data']['Results'] = $ContestData;\n $this->Return['Data']['Statics'] = $Statics;\n }\n }", "public function getSubGroups() {}", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "public static function get_tests()\n {\n }", "public function scenarios(): array;", "public function testGetGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetAllChildren() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get\n $categories = $this->kb_category->get_all_children( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "public function generatePopularSubcategories()\n {\n\n $categoryId = $this->id;\n\n $subcategories = Subcategory::\n whereHas('categories', function ($query) use ($categoryId) {\n $query->where('categories.id', $categoryId);\n })\n ->whereHas('evercisegroups', function($query){})\n ->take(15)\n ->get()\n ->sortByDesc(function ($subcats) {\n return $subcats->evercisegroups->count();\n });\n\n $output = [];\n foreach ($subcategories as $subcat) {\n $output[] = [\n 'name' => $subcat->name,\n 'classes' => $subcat->evercisegroups->count(),\n ];\n }\n\n\n return $output;\n }", "public function testGetAll() {\n // Create\n $this->phactory->create('kb_category');\n\n // Get\n $categories = $this->kb_category->get_all();\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "public static function groupList()\n {\n $category = Category::all();\n $array = [];\n foreach ($category->where('category_id', 0) as $parent){\n\n $array[$parent->title] = array();\n\n foreach($parent->children as $attribute) {\n $array[$parent->title][$attribute->id] = $attribute->title;\n }\n }\n\n return $array;\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 }", "public function getTests()\n\t{\n\t\t# code...\n\t\treturn $this->tests;\n\t}", "public function testGetProductCategories() {\n \n }", "public function getGroups() {}", "public function processMultiLevelTestControllerDataProvider(): array\n {\n return [\n ['noparams', [], StatusCode::OK, 'No Parameters'],\n ['noparams', ['param1'], StatusCode::NOT_FOUND, ''],\n ['noparams', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['noparams', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foo', [], StatusCode::NOT_FOUND, ''],\n ['foo', ['param1'], StatusCode::OK, 'FooAction: Foo=[param1]'],\n ['foo', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foo', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobar', [], StatusCode::NOT_FOUND, ''],\n ['foobar', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobar', ['param1', 'param2'], StatusCode::OK, 'FooBarAction: Foo=[param1], Bar=[param2]'],\n ['foobar', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', [], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foobarbaz', ['param1', 'param2', 'param3'], 200, 'FooBarBazAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foonull', [], StatusCode::OK, 'FooNullAction: Foo=[*null*]'],\n ['foonull', ['param1'], StatusCode::OK, 'FooNullAction: Foo=[param1]'],\n ['foonull', ['param1', 'param2'], StatusCode::NOT_FOUND, ''],\n ['foonull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foonullbarnull', [], StatusCode::OK, 'FooNullBarNullAction: Foo=[*null*], Bar=[*null*]'],\n ['foonullbarnull', ['param1'], StatusCode::OK, 'FooNullBarNullAction: Foo=[param1], Bar=[*null*]'],\n ['foonullbarnull', ['param1', 'param2'], StatusCode::OK, 'FooNullBarNullAction: Foo=[param1], Bar=[param2]'],\n ['foonullbarnull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foonullbarnullbaznull', [], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[*null*], Bar=[*null*], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[*null*], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1', 'param2'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[*null*]'],\n ['foonullbarnullbaznull', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooNullBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foobarnull', [], StatusCode::NOT_FOUND, ''],\n ['foobarnull', ['param1'], StatusCode::OK, 'FooBarNullAction: Foo=[param1], Bar=[*null*]'],\n ['foobarnull', ['param1', 'param2'], StatusCode::OK, 'FooBarNullAction: Foo=[param1], Bar=[param2]'],\n ['foobarnull', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ['foobarnullbaznull', [], StatusCode::NOT_FOUND, ''],\n ['foobarnullbaznull', ['param1'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[*null*], Baz=[*null*]'],\n ['foobarnullbaznull', ['param1', 'param2'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[*null*]'],\n ['foobarnullbaznull', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooBarNullBazNullAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['foobarbazstring', [], StatusCode::NOT_FOUND, ''],\n ['foobarbazstring', ['param1'], StatusCode::NOT_FOUND, ''],\n ['foobarbazstring', ['param1', 'param2'], StatusCode::OK, 'FooBarBazStringAction: Foo=[param1], Bar=[param2], Baz=[default string]'],\n ['foobarbazstring', ['param1', 'param2', 'param3'], StatusCode::OK, 'FooBarBazStringAction: Foo=[param1], Bar=[param2], Baz=[param3]'],\n ['nonexisting', [], StatusCode::NOT_FOUND, ''],\n ['nonexisting', ['param1'], StatusCode::OK, 'DefaultAction: Foo=[nonexisting], Bar=[param1], Baz=[*null*]'],\n ['nonexisting', ['param1', 'param2'], StatusCode::OK, 'DefaultAction: Foo=[nonexisting], Bar=[param1], Baz=[param2]'],\n ['nonexisting', ['param1', 'param2', 'param3'], StatusCode::NOT_FOUND, ''],\n ];\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All ArraySort Tests');\n\n\t\t$path = App::pluginPath('ArraySort') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\t\treturn $suite;\n\t}", "public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }", "public function testGetItemSubCategoryById()\n {\n }", "public function test_Category_Tree(){\n\n\t\t$exp_total\t= Good::all()->count();\n\n\t\t$get\t= [\n\t\t\t'draw'\t=> '12'\n\t\t];\n\t\t$res\t= Good::getTableData( $get );\n\n\t\t$this->assertEquals( 12, $res['draw'], \"\\n*** Assert 1 ***\\nWrong 'draw' value\\n\" );\n\t\t$this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 2 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t\t$new_item\t= [\n\t\t\t'name'\t=> ''\n\t\t\t,'article'=> ''\n\t\t\t,'rprice'\t=> 5.567\n\t\t\t,'wprice'\t=> 4.444\n\t\t\t,'inpack'\t=> 24\n\t\t\t,'packs'\t=> 13\n\t\t\t,'assort'\t=> 17\n\t\t];\n\n\n\n\t\t$this->db['Good']\t= [];\n\t\t$items\t= &$this->db['Good'];\n\n\t for( $i=0; $i<3; $i++ ){\n\t \t$item\t= $new_item;\n\t \t$item['name']\t= self::_ut_name.'_'.$i;\n\t \t$item['article']\t= self::_ut_name.'_'.$i;\n\t\t\t$item_obj\t= new Good();\n\t \t$item_obj\t= $item_obj->fill( $item );\n\t\t $res \t= $item_obj->save();\n\n\t\t $ids[]\t=\n\t\t $item['id']\t= $item_obj->id;;\n\n\t\t\t$items[]\t= $item;\n\n\t\t $item_obj\t= NULL;\n\t }\n\n\n// print_r( $ids);\n\n// \t $ut_item_id\t= $item_obj->id;\n\n\n\t $exp_total\t= Good::all()->count();\n\t $res\t= Good::getTableData( $get );\n// \t $item_obj->delete();\n\n// \t\tGood::whereIn('id');\n\n\n\t $this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 3 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t}", "function get_all_knowledge_base_articles_grouped($only_clients = true, $where = array())\n{\n $CI =& get_instance();\n $CI->load->model('knowledge_base_model');\n $groups = $CI->knowledge_base_model->get_kbg('', 1);\n $i = 0;\n foreach ($groups as $group) {\n $CI->db->select('slug,subject,description,tblknowledgebase.active as active_article,articlegroup,articleid,staff_article');\n $CI->db->from('tblknowledgebase');\n $CI->db->where('articlegroup', $group['groupid']);\n $CI->db->where('active', 1);\n if ($only_clients == true) {\n $CI->db->where('staff_article', 0);\n }\n $CI->db->where($where);\n $CI->db->order_by('article_order', 'asc');\n $articles = $CI->db->get()->result_array();\n if (count($articles) == 0) {\n unset($groups[$i]);\n $i++;\n continue;\n }\n $groups[$i]['articles'] = $articles;\n $i++;\n }\n\n return $groups;\n}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Plugin plugins test');\n\t\t$plugins = App::objects('plugin', APP . 'Plugin', false);\n\t\tforeach ($plugins as $plugin) {\n\t\t\tif (CakePlugin::loaded($plugin)) {\n\t\t\t\t$file = CakePlugin::path($plugin) . 'Test' . DS . 'Case' . DS . 'All' . $plugin . 'TestsTest.php';\n\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $suite;\n\t}", "public function getGroups();", "public function getGroups();", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "function getBenchmarksByGroup(string $name){\n $benchmark_group = [];\n foreach($this->benchmarks as $benchmark){\n if($benchmark->getName() == $name || Text::startsWith($benchmark->getName(), $name.'.')){\n $benchmark_group[] = $benchmark;\n }\n }\n return $benchmark_group;\n }", "public function getTests()\n {\n return array();\n }", "public function getTests()\n {\n return array();\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function testGetAllCategories()\n\t{\n\t $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n\t\t$number_of_categories = 10;\n\t\t$categories = factory(Category::class, $number_of_categories)->create([\n\t\t 'user_id' => $user->id\n ]);\n\n\t\t$response = $this->get('api/categories');\n\t\t$response->assertStatus(200);\n\t\t$this->assertTrue(count($categories) == $number_of_categories );\n\t}", "public function run()\n {\n $categories = [\n ['name' => 'cash_sale_without_check', 'name_ua' => 'Готівковий продаж без чеку', 'type' => 1, 'account_id' => 1],\n ['name' => 'sale_with_goods_delivery', 'name_ua' => 'Продаж з відправленням товару', 'type' => 1, 'account_id' => 1],\n ['name' => 'online_sale', 'name_ua' => 'Продаж онлайн', 'type' => 1, 'account_id' => 1],\n ['name' => 'withdrawal_non_cash_account', 'name_ua' => 'Зняття коштів з безготівкового рахунку', 'type' => 1, 'account_id' => 1],\n ['name' => 'ecquiring_sale', 'name_ua' => 'Продаж по еквайрингу', 'type' => 1, 'account_id' => 2],\n ['name' => 'other_noncash_addition', 'name_ua' => 'Інші поповнення безготівкового рахунку', 'type' => 1, 'account_id' => 2],\n ['name' => 'withdrawal_cash_account', 'name_ua' => 'Поповнення рахунку з готівкового', 'type' => 1, 'account_id' => 2],\n ['name' => 'goods_return', 'name_ua' => 'Повернення товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'goods_purchase', 'name_ua' => 'Закупка нового товару', 'type' => 0, 'account_id' => 1],\n ['name' => 'other_cash_expenses', 'name_ua' => 'Інші витрати', 'type' => 0, 'account_id' => 1],\n ['name' => 'bank_services', 'name_ua' => 'Послуги банку', 'type' => 0, 'account_id' => 2],\n ['name' => 'other_noncash_expenses', 'name_ua' =>'Інші витрати', 'type' => 0, 'account_id' => 2],\n ];\n\n foreach($categories as $category){\n DB::table('categories')->insert($category);\n }\n }", "public function testGetRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function filter_testcats()\n\t{\n\t\t$test_id = $this->input->post('test_id');\n\t\t$testcats = $this->testCatModel->get_testcats_by_test($test_id, TRUE);\n\t\techo form_dropdown_and_label('testcat', testcat_options($testcats));\n\t}", "public static function suite() {\n\t\t$Suite = new CakeTestSuite('All Tools tests');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Utility');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Misc');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View' . DS . 'Helper');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Behavior');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Datasource');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Console' . DS . 'Command');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component');\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component' . DS . 'Auth');\n\n\t\t//$path = dirname(__FILE__);\n\t\t//$Suite->addTestDirectory($path . DS . 'Controller');\n\n\t\t//$path = CakePlugin::path('Tools') . 'Test' . DS . 'Case' . DS;\n\t\t//$Suite->addTestDirectoryRecursive($path);\n\t\treturn $Suite;\n\t}", "function icress_getSubject_wrapper($campus, $faculty, $subject) {\n $jadual = file_get_contents(getTimetableURL(true) . \"/list/{$campus}/{$faculty}/{$subject}.html\");\n $http_response_header or die(\"Alert_Error: Icress timeout! Please try again later.\"); \n\t\n # parse the html to more neat representation about classes\n $jadual = str_replace(array(\"\\r\", \"\\n\"), '', $jadual);\n\n\t// set error level\n\t$internalErrors = libxml_use_internal_errors(true);\n\t$htmlDoc = new DOMDocument();\n\t$htmlDoc->loadHTML($jadual);\n\t// Restore error level\n\tlibxml_use_internal_errors($internalErrors);\n\n\t$tableRows = $htmlDoc->getElementsByTagName('tr');\n\t$groups = [];\n\n\tforeach ($tableRows as $key => $row) {\n\t\tif ($key === 0 || $key === 1) {\n\t\t\tcontinue;\n\t\t}\n\t\t$tableDatas = [];\n\t\tforeach($row->childNodes as $tableData) {\n\t\t\tif (strcmp($tableData->nodeName, 'td') === 0) {\n\t\t\t\tarray_push($tableDatas, $tableData->nodeValue);\n\t\t\t}\n\t\t}\n\n\t\t$group = trim($row->childNodes[5]->nodeValue);\n\t\tarray_shift($tableDatas);\n\t\t$groups[$group][] = $tableDatas;\n\t}\n\n return $groups;\n}", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Attempt Plugin Tests');\n\n\t\t$basePath = CakePlugin::path('Attempt') . 'Test' . DS . 'Case' . DS;\n\t\t// controllers\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'Component' . DS . 'AttemptComponentTest.php');\n\t\t// models\n\t\t$suite->addTestFile($basePath . 'Model' . DS . 'AttemptTest.php');\n\n\t\treturn $suite;\n\t}", "public function findCategories();", "public function run()\n {\n $categories =\n [\n [\n 'id' => 1,\n 'title' => 'product',\n 'slug' => 'product',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'title' => 'post',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 3,\n 'title' => 'DRIED FRUITS',\n 'slug' => 'dried-fruits',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'title' => 'HERBS&SPICES',\n 'slug' => 'herb-and-spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'title' => 'WHOLEFOODS & LEGUMES',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'title' => 'NUTS',\n 'slug' => 'nuts',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 7,\n 'title' => 'TEAS',\n 'slug' => 'teas',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'title' => 'Raw Almonds',\n 'slug' => 'raw-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 9,\n 'title' => 'Roasted Almonds',\n 'slug' => 'roasted-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 10,\n 'title' => 'Walnut',\n 'slug' => 'walnut',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 11,\n 'title' => 'Pumpkin Seeds',\n 'slug' => 'pumpkin-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 12,\n 'title' => 'Sunflower Seeds',\n 'slug' => 'sunflower-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 13,\n 'title' => 'Fruit Tea',\n 'slug' => 'fruit-tea',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 7,\n ],\n [\n 'id' => 14,\n 'title' => 'Yellow Apricot',\n 'slug' => 'yellow-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 15,\n 'title' => 'Natural Brown Apricot',\n 'slug' => 'natural-brown-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 16,\n 'title' => 'Herbs',\n 'slug' => 'herbs',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 17,\n 'title' => 'Spices',\n 'slug' => 'spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 18,\n 'title' => 'Cinnamon Powder',\n 'slug' => 'cinnamon-powder',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 19,\n 'title' => 'Cinnamon Sticks',\n 'slug' => 'cinnamon-sticks',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 20,\n 'title' => 'Paprika',\n 'slug' => 'paprika',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 17,\n ],\n\n ];\n\n\n Category::insert($categories);\n //Category::factory(1)->create();\n }", "public function groups();", "public function groups();", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "public static function data4Select($category)\n {\n // Grouped data\n $all_data = BusinessPartner::where('category_id', $category)->get();\n $results = array();\n foreach ($all_data as $buz) {\n $coupons = array();\n foreach ($buz->coupons as $l) {\n $tmp['id'] = $l->id;\n $tmp['text'] = $l->name;\n $coupons[] = $tmp;\n }\n $group['text'] = $buz->name;\n $group['children'] = $coupons;\n\n if (count($coupons)) {\n $results[] = $group;\n }\n }\n return array(\"results\"=>$results);\n }", "public function getGroups(): array;", "public function getCases()\n {\n try {\n $sql = \"SELECT * FROM cases WHERE DELETED = 0\";\n\n //filter variables\n $text_filter = \"\";\n $date_filter = \"\";\n $category_filter = \"\";\n\n //prepare query\n if (isset($_SESSION['order_results'])) {\n\n //set session variables value\n (isset($_SESSION['text_filter'])) ? $text_filter = $_SESSION['text_filter'] : $text_filter = \"\";\n (isset($_SESSION['date_filter'])) ? $date_filter = $_SESSION['date_filter'] : $date_filter = \"\";\n\n //if value == 0 -> all categories\n (isset($_SESSION['category_filter']) && intval($_SESSION['category_filter']) != 0) ? $category_filter = $_SESSION['category_filter'] : $category_filter = \"\";\n\n $id = $text_filter;\n $text_filter = \"%\" . $text_filter . \"%\";\n $date_filter = \"%\" . $date_filter . \"%\";\n $category_filter = \"%\" . $category_filter . \"%\";\n\n\n if (intval($_SESSION['order_results']) == 0 || intval($_SESSION['order_results']) == 2) {\n\n //variable that sets if include or not null category id\n $include_null_category_id = (($_SESSION['category_filter']) == 0) ? \" OR category_id IS NULL) \" : \") \";\n\n //if true order by most recent\n $order = \"\";\n (intval($_SESSION['order_results']) == 0) ? $order = \"desc\" : null;\n //order by date\n $sql = \"SELECT * FROM cases WHERE DELETED = 0 AND \n (description LIKE :text_filter \n OR id LIKE :id \n OR title LIKE :text_filter \n OR variant LIKE :id) \n AND (created_at LIKE :date_filter) \n AND (category_id LIKE :category_id\" . $include_null_category_id .\n \"order by created_at \" . $order;\n\n } else if (intval($_SESSION['order_results']) == 1) {\n //variable that sets if include or not null category id\n $include_null_category_id = (($_SESSION['category_filter']) == 0) ? \" OR c.category_id IS NULL) \" : \") \";\n\n $sql = \"SELECT c.* FROM cases c\n INNER JOIN cases a ON \n c.id = a.variant \n where a.deleted = 0 AND a.variant IS NOT NULL \n AND (c.description LIKE :text_filter \n OR c.id LIKE :id \n OR c.title LIKE :text_filter \n OR c.variant LIKE :id) \n AND (c.created_at LIKE :date_filter)\n AND (c.category_id LIKE :category_id\" . $include_null_category_id .\n \" group by a.variant \n order by count(a.variant) desc;\";\n }\n }\n\n $prepared_query = $this->conn->prepare($sql);\n\n //bind params\n $prepared_query->bindParam(':text_filter', $text_filter, PDO::PARAM_STR);\n $prepared_query->bindParam(':id', $id, PDO::PARAM_STR);\n $prepared_query->bindParam(':date_filter', $date_filter, PDO::PARAM_STR);\n $prepared_query->bindParam(':category_id', $category_filter, PDO::PARAM_STR);\n\n $prepared_query->execute();\n\n return $prepared_query->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $ex) {\n }\n }", "public function provideTestCases()\n {\n return [\n ['time', ['time'], false],\n ['bar', null, true],\n ];\n }", "public function getSuitesList(){\n return $this->_get(1);\n }" ]
[ "0.70565355", "0.6960221", "0.6703277", "0.6524542", "0.6343473", "0.62679315", "0.6077294", "0.6069568", "0.6024369", "0.5877993", "0.58598197", "0.58119255", "0.57896143", "0.57848513", "0.5781865", "0.57703596", "0.57599324", "0.5756043", "0.57417434", "0.574049", "0.5717577", "0.5707189", "0.56708956", "0.56266", "0.5623265", "0.561016", "0.56050223", "0.5597238", "0.55620104", "0.5556615", "0.5540436", "0.5539259", "0.5516192", "0.55122423", "0.5511978", "0.55065775", "0.55036706", "0.5500374", "0.5500241", "0.5497428", "0.5489082", "0.5477994", "0.5475063", "0.54634464", "0.54492116", "0.5417793", "0.5408877", "0.5408457", "0.5396073", "0.53871316", "0.5384613", "0.53736377", "0.5365487", "0.5364952", "0.534839", "0.53350884", "0.5332573", "0.5330661", "0.53106487", "0.53047276", "0.5298654", "0.529142", "0.528726", "0.528593", "0.52856547", "0.5273448", "0.52732736", "0.5269837", "0.52661747", "0.52628535", "0.5258707", "0.5250282", "0.5248172", "0.5227611", "0.52180755", "0.5215279", "0.5215279", "0.52148175", "0.52043015", "0.520163", "0.520163", "0.5195062", "0.5192787", "0.51908123", "0.51891845", "0.518546", "0.51831156", "0.51648915", "0.51647425", "0.5161898", "0.5159916", "0.5156133", "0.51554537", "0.51554537", "0.5153162", "0.5151473", "0.5142563", "0.51330674", "0.5132831", "0.5131477" ]
0.7521374
0
This function returns all the categories inside one parent category and their subcategories
function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) { global $definitions; //get item type $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID); //get property $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID); //First, we need the tree categories $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID); //Transform the items tree and store the ids in an unidimensional array $allCategories = array(); //First, add the parentCategoryID $allCategories[] = $parentCategoryID; if ($tree) { foreach ($tree as $parid => $parent) { if (!in_array($parid, $allCategories)) { //Add the value $allCategories[] = $parid; } foreach ($parent as $child) { $id = $child['ID']; //Check if the values does not exist in the allCategories array. if (!in_array($id, $allCategories)) { //Add the value $allCategories[] = $id; } } } } //And return the testCategories return ($allCategories); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }", "function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}", "public function getAllCategories() {\n $allCategories= $this->getCategories(); \n foreach ($allCategories as $value){\n $value->setChildren($this->getSubCategories($value->getId()));\n }\n return $allCategories;\n \n }", "public function getCategories($parent_id = 0) {\n\t\t$category_data = FALSE;\n\t\t\n\t\tif (! $category_data) {\n\t\t\t$category_data = array ();\n\t\t\t\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\tc.category_id,\r\n\t\t\t\t\tc.parent_id,\r\n\t\t\t\t\tcd.name,\r\n\t\t\t\t\t(SELECT COUNT(*) FROM `\" . DB_PREFIX . \"category` cc WHERE cc.parent_id = c.category_id) as children\r\n\t\t\tFROM `\" . DB_PREFIX . \"category` c\r\n\t\t\tLEFT JOIN `\" . DB_PREFIX . \"category_description` cd\r\n\t\t\t\tON (c.category_id = cd.category_id)\r\n\t\t\tWHERE c.parent_id = \" . ( int ) $parent_id . \"\r\n\t\t\tAND c.status = 1\r\n\t\t\tAND cd.language_id = \" . ( int ) $this->config->get ( 'config_language_id' ) . \"\r\n\t\t\tORDER BY c.sort_order, cd.name ASC\";\n\t\t\t\n\t\t\t$query = $this->db->query ( $sql );\n\t\t\t\n\t\t\tforeach ( $query->rows as $result ) {\n\t\t\t\t$category_data [] = array (\n\t\t\t\t\t\t'category_id' => $result ['category_id'],\n\t\t\t\t\t\t'parent_id' => $result ['parent_id'],\n\t\t\t\t\t\t'name' => $result ['name'],\n\t\t\t\t\t\t'children' => $result ['children'],\n\t\t\t\t\t\t'disabled' => ((in_array ( $result ['category_id'], $this->config->get ( 'msconf_restrict_categories' ) ) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 1 && $result ['parent_id'] == 0) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 2 && $result ['children'] > 0)) ? TRUE : FALSE) \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// Recursive call of the function and merge of all the categories together\n\t\t\t\t$category_data = array_merge ( $category_data, $this->getCategories ( $result ['category_id'] ) );\n\t\t\t}\n\t\t\t\n\t\t\t// $this->cache->set('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id, $category_data);\n\t\t}\n\t\t\n\t\t// The first calls of the function (for the root categories), where indentation takes place\n\t\tif ($parent_id == 0) {\n\t\t\t$category_data_indented = array ();\n\t\t\tforeach ( $category_data as $category ) {\n\t\t\t\t$category_data_indented [] = array (\n\t\t\t\t\t\t'category_id' => $category ['category_id'],\n\t\t\t\t\t\t'name' => str_repeat ( '&nbsp;&nbsp;&nbsp;', $this->_getDepth ( $category_data, $category ['category_id'] ) ) . $category ['name'],\n\t\t\t\t\t\t'parent_id' => $category ['parent_id'],\n\t\t\t\t\t\t'children' => $category ['children'],\n\t\t\t\t\t\t'disabled' => $category ['disabled'] \n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $category_data_indented;\n\t\t}\n\t\t\n\t\treturn $category_data;\n\t}", "public function getAllCategories() {\n\n if (!isset(parent::all()[0])) {\n return [];\n }\n return parent::all()[0]->children;\n }", "public function getCategories($parent_id) {\n// if (!$category_data) {\n\t$category_data = array();\n\n\t$rows = Make::a('catalog/category')\n\t\t->table_alias('c')\n\t\t->select_expr('c.category_id,c.ref_category_code,c.status,c.sort_order')\n\t\t->left_outer_join('category_description', array('c.category_id', '=', 'cd.category_id'), 'cd')\n\t\t->where('c.parent_id', $parent_id)\n\t\t->where('cd.language_id', QS::app()->config->get('config_language_id'))\n\t\t->order_by_asc('c.sort_order')\n\t\t->order_by_asc('cd.name')\n\t\t->find_many(true);\n\n\tforeach ($rows as $result) {\n\t $category_data[] = array(\n\t\t'category_id' => $result['category_id'],\n\t\t'ref_category_code' => $result['ref_category_code'],\n\t\t'name' => $this->getPath($result['category_id']),\n\t\t'status' => $result['status'],\n\t\t'sort_order' => $result['sort_order']\n\t );\n\n\t $category_data = array_merge($category_data, $this->getCategories($result['category_id']));\n\t}\n\n// QS::app()->cache->set('category.' . QS::app()->config->get('config_language_id') . '.' . $parent_id, $category_data);\n//}\n\n\treturn $category_data;\n }", "private function get_parent_categories(){\r\n\t\t$rslt = array();\r\n\r\n\t\t$args = array('taxonomy'=>'market_reports_category', 'hide_empty' => false, 'parent'=>0, 'orderby'=>'term_id','order'=>'ASC');\r\n\t\t$parent_cats = get_terms($args);\r\n\t\t// $rslt['-1'] = 'None';\r\n\t\t// wp_die(var_dump($parent_cats));\r\n\t\tforeach ($parent_cats as $key => $parent_cat) {\r\n\t\t\t$rslt[$parent_cat->term_id] = $parent_cat->name;\r\n\t\t}\r\n\t\t// rsort($rslt);\r\n\t\treturn $rslt;\r\n\t}", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "public function getCategories() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE parent is null ORDER BY name ASC\");\n $stmt->setFetchMode(\\PDO::FETCH_CLASS, '\\App\\Model\\Category\\ProductCategoryModel');\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }", "public function getAllCategories()\n\t{\n\t\treturn $this->_db->loadAssoc(\"SELECT * FROM @_#_categories ORDER BY title\", 'parent_id', true);\n\t}", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public function subcategories()\n {\n return $this->hasMany(Category::class, 'parent_id')->where('status', 1);\n }", "public function getCategories() {\n\t\t$db = JFactory::getDBO();\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('a.id', 'a.parent_id', 'a.name')));\n\t\t$query->from($db->quoteName('#__gtpihps_categories', 'a'));\n\t\t\n\t\t$query->where($db->quoteName('a.published') . ' = 1');\n\t\t$query->order($db->quoteName('a.id'));\n\t\t\n\t\t$db->setQuery($query);\n\t\t$raw = $db->loadObjectList();\n\t\t$data = array();\n\t\tforeach ($raw as $item) {\n\t\t\t$data[$item->parent_id][$item->id] = $item->name;\n\t\t}\n\t\treturn $data;\n\t}", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public static function getSubCategories($parent_cat_id) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=$parent_cat_id\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "public function categories()\n {\n /* $categories=Category::where('parent',0)->with('grandchildren')->get()\n ->toArray();*/\n\n //to get parent to child level heirarchy\n /*$categories=Category::with('grandchildren')->get()\n ->toArray();*/\n\n //to get children of specific category\n /*foreach($categories as $category){\n $parent=$category->children()->get();\n\n if(!is_null($parent)){\n print_r($parent);\n \n }\n }*/\n\n /*$categories=Category::orderBy('name', 'asc')\n ->orderBy('parent', 'asc')->get();*/\n\n $categories=Category::where('parent',0)->with('children','children.grandchildren')->orderBy('name', 'asc')->get()\n ->toArray();\n return response()->json(['categories'=>$categories]);\n }", "private function _cats_by_parent($cats)\n\t\t{\n\t\t\t$cats_by_parent = array();\n\n\t\t\tforeach ($cats as $cat)\n\t\t\t{\n\t\t\t\tif (! isset($cats_by_parent[$cat['parent_id']]))\n\t\t\t\t{\n\t\t\t\t\t$cats_by_parent[$cat['parent_id']] = array();\n\t\t\t\t}\n\n\t\t\t\t$cats_by_parent[$cat['parent_id']][] = $cat;\n\t\t\t}\n\n\t\t\treturn $cats_by_parent;\n\t\t}", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "private function getCategories() {\r\n $data['categories'] = array();\r\n\r\n $this->load->model('catalog/category');\r\n\r\n $categories_1 = $this->model_catalog_category->getCategories(0);\r\n\r\n foreach ($categories_1 as $category_1) {\r\n $level_2_data = array();\r\n\r\n $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);\r\n\r\n foreach ($categories_2 as $category_2) {\r\n $level_3_data = array();\r\n\r\n $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);\r\n\r\n foreach ($categories_3 as $category_3) {\r\n $level_3_data[] = array(\r\n 'category_id' => $category_3['category_id'],\r\n 'name' => $category_3['name'],\r\n );\r\n }\r\n\r\n $level_2_data[] = array(\r\n 'category_id' => $category_2['category_id'],\r\n 'name' => $category_2['name'],\r\n 'children' => $level_3_data\r\n );\r\n }\r\n\r\n $data['categories'][] = array(\r\n 'category_id' => $category_1['category_id'],\r\n 'name' => $category_1['name'],\r\n 'children' => $level_2_data\r\n );\r\n }\r\n return $data['categories'];\r\n }", "public function getChildCat($parent = array(0), $type = false, $data = false)\n {\n global $rlDb;\n\n foreach ($parent as $parent_id) {\n $parent_id = (int) $parent_id;\n\n $sql = \"SELECT *, `Modified` \";\n $sql .= \"FROM `{db_prefix}categories` \";\n $sql .= \"WHERE `Type` = '{$type['Key']}' AND `Status` = 'active' AND `Parent_ID` = '{$parent_id}'\";\n if ($type['Cat_hide_empty']) {\n $sql .= \"AND `Count` > 0 \";\n }\n $sql .= \"ORDER BY `Position`\";\n\n if ($tmp_categories = $rlDb->getAll($sql)) {\n foreach ($tmp_categories as $cKey => $cValue) {\n $ids[] = $cValue['ID'];\n\n $categories[$cValue['ID']] = $cValue;\n $categories[$cValue['ID']]['pName'] = 'categories+name+' . $cValue['Key'];\n $categories[$cValue['ID']]['pTitle'] = 'categories+title+' . $cValue['Key'];\n\n /* get subcategories */\n if ($type['Cat_show_subcats']) {\n // TODO - add this condition in output if needs\n $rlDb->calcRows = true;\n $subCategories = $rlDb->fetch(array('ID', 'Count', 'Path`, CONCAT(\"categories+name+\", `Key`) AS `pName`, CONCAT(\"categories+title+\", `Key`) AS `pTitle', 'Key'), array('Status' => 'active', 'Parent_ID' => $cValue['ID']), \"ORDER BY `Position`\", null, 'categories');\n $rlDb->calcRows = false;\n\n if (!empty($subCategories)) {\n $categories[$cValue['ID']]['sub_categories'] = $subCategories;\n $categories[$cValue['ID']]['sub_categories_calc'] = $rlDb->foundRows;\n }\n\n unset($subCategories);\n }\n }\n unset($tmp_categories);\n\n $data[$parent_id] = $categories;\n\n unset($categories);\n } else {\n continue;\n }\n }\n\n if ($parent) {\n return $this->getChildCat($ids, $type, $data);\n } else {\n return $data;\n }\n }", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "public function getCategoriesForSettings() {\n \n $qb = $this->_em->createQueryBuilder();\n $qb->select('c')\n ->from('ABOMainBundle:Category', 'c')\n ->join('c.parent', 'p')\n ->addSelect('p')\n ->where('c.level = :level')\n ->setParameter('level', 2);\n \n return $qb->getQuery()->getResult();\n }", "function get_parent_cats($context) {\n global $COURSE;\n\n switch ($context->contextlevel) {\n // a category can be the parent of another category\n // there is no limit of depth in this case\n case CONTEXT_COURSECAT:\n static $categoryparents = null; // cache for parent categories\n if (!isset($categoryparents)) {\n $categoryparents = array();\n }\n if (array_key_exists($context->instanceid, $categoryparents)) {\n return $categoryparents[$context->instanceid];\n }\n\n if (!$cat = get_record('course_categories','id',$context->instanceid)) {\n //error?\n return array();\n }\n $parents = array();\n while (!empty($cat->parent)) {\n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $cat->parent)) {\n debugging('Incorrect category parent');\n break;\n }\n $parents[] = $catcontext->id;\n $cat = get_record('course_categories','id',$cat->parent);\n }\n return $categoryparents[$context->instanceid] = array_reverse($parents);\n break;\n \n // a course always fall into a category, unless it's a site course\n // this happens when SITEID == $course->id\n // in this case the parent of the course is site context\n case CONTEXT_COURSE:\n static $courseparents = null; // cache course parents\n if (!isset($courseparents)) {\n $courseparents = array();\n }\n if (array_key_exists($context->instanceid, $courseparents)) {\n return $courseparents[$context->instanceid];\n }\n\n if (count($courseparents) > 1000) {\n $courseparents = array(); // max cache size when looping through thousands of courses\n }\n if ($context->instanceid == SITEID) {\n return $courseparents[$context->instanceid] = array(); // frontpage course does not have parent cats\n }\n if ($context->instanceid == $COURSE->id) {\n $course = $COURSE;\n } else if (!$course = get_record('course', 'id', $context->instanceid)) {\n //error?\n return array();;\n }\n\n if (empty($course->category)) {\n // this should not happen\n return $courseparents[$context->instanceid] = array();\n }\n \n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $course->category)) {\n debugging('Incorect course category');\n return array();;\n }\n\n return $courseparents[$context->instanceid] = array_merge(get_parent_cats($catcontext), array($catcontext->id)); //recursion :-)\n break;\n\n default:\n // something is very wrong!\n return array();\n break;\n }\n}", "private function get_category_by_parent($parent){\n $query = DB::table('ps_category as a')\n ->select('a.id_category','b.name')\n ->join('ps_category_lang as b','a.id_category','b.id_category')\n ->where('a.id_parent',$parent)\n ->where('a.active',1)\n ->groupBy('a.id_category')\n ->get();\n return $query;\n }", "public static function treeCategories(): array\n {\n return JEasyUi::jsonFormat(self::parentCategories());\n }", "public function findChildren($id_parent){\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.parent', $queryBuilder->createNamedParameter($id_parent))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.sys_language_uid', $queryBuilder->createNamedParameter($GLOBALS['TSFE']->sys_language_uid, \\PDO::PARAM_INT))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.deleted', $queryBuilder->createNamedParameter(0))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.hidden', $queryBuilder->createNamedParameter(0))\n )\n ->execute();\n $list_cat=[];\n while ($row = $statement->fetch()) {\n\n $list= array(\n 'uid' => $row['uid'],\n 'title' => $row['title'],\n 'parent' => $row['parent'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n );\n array_push($list_cat, $list);\n }\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.uid', $queryBuilder->createNamedParameter($id_parent))\n )\n \n ->execute();\n while ($row = $statement->fetch()) {\n $list=array(\n 'uid' =>$row['uid'],\n 'title' =>$row['title'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n 'children' => $list_cat);\n }\n return $list;\n }", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "private function getChildrenCategories($parentCategoryId)\n {\n $parentCategoryId = intval($parentCategoryId);\n $queryResult = $this->dataBase->query(\"SELECT * FROM `categories` WHERE `parent_category_id` = {$parentCategoryId}\");\n\n $childrenCategories = [];\n $i = 0;\n\n while ($row = $queryResult->fetch()) {\n $childrenCategories[$i] = $row;\n\n if ($this->getChildrenCategories($row[\"id\"])) {\n $childrenCategories[$i][\"children_categories\"] = $this->getChildrenCategories($row[\"id\"]);\n }\n $i++;\n }\n\n return $childrenCategories;\n }", "public function parentCategories()\n {\n return $this->hasMany(self::class, 'id', 'parent_id');\n }", "public function get_sub_categories($parent_id) {\n $parent_id = $this->real_escape_string($parent_id);\n return $this->query(\"SELECT * FROM sub_cat WHERE parent_id = '\"\n . $parent_id . \"' order by id \");\n }", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "private static function getParentChildren():array\n {\n $parentChildren = [];\n $categories = self::select('*')->get()->toArray();\n\n foreach ($categories as $id){\n $children = [];\n foreach ($categories as $row){\n if ($id['id'] == $row['parent_id']){\n $children[] = $row['id'];\n }\n }\n $parentChildren[$id['id']] = $children;\n }\n\n return $parentChildren;\n\n }", "public function buildParentsChildrenCategoriesHierarchy(): array\n {\n $categoriesDepths = $this->buildCategoriesDepths();\n $parentsChildrenDtos = [];\n $skippedCategoriesIds = [];\n\n foreach( $categoriesDepths as $categoryId => $depth ){\n\n $category = $this->app->repositories->myNotesCategoriesRepository->find($categoryId);\n $categoryId = $category->getId();\n\n $childCategoriesIds = $this->app->repositories->myNotesCategoriesRepository->getChildrenCategoriesIdsForCategoriesIds([$categoryId]);\n $parentChildDto = $this->buildParentChildDtoForHierarchy($category, $depth);\n\n //if we have a children then we already added it to parent so we don't want it as separated being\n $skippedCategoriesIds = array_merge($skippedCategoriesIds, $childCategoriesIds);\n\n if( in_array($categoryId, $skippedCategoriesIds) ){\n continue;\n }\n\n $parentsChildrenDtos[] = $parentChildDto;\n }\n\n // sort alphabetically by name\n uasort($parentsChildrenDtos, fn(ParentChildDTO $currentElement, ParentChildDTO $nextElement) =>\n $currentElement->getName() > $nextElement->getName()\n );\n\n return $parentsChildrenDtos;\n }", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "public function getAllCategories()\n {\n return $this->AllChildren()->filter('ClassName', PortfolioCategory::class);\n }", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "public function categories($parentId = null) {\n if (!empty($this->request->data['Category'])) {\n if ($this->Classified->Category->save($this->request->data)) {\n $this->Session->setFlash(__('Category saved'));\n }\n }\n\t\t\n\t\t$conditions = !empty($parentId) ? array('Category.parent_id' => $parentId, 'Category.model' => 'Classified') : array('Category.model' => 'Classified');\n $categories = $this->Classified->Category->find('threaded', array('conditions' => $conditions, 'order' => array('name' => 'ASC')));\n $this->set('parentCategories', $this->Classified->Category->generateTreeList(null, null, null, '--'));\n $this->set(compact('categories'));\n $this->set('page_title_for_layout', __('Classified Categories & Options'));\n\t\t//$this->layout = 'default';\n\t\treturn $categories; // used in element Categories/categories\n }", "public function get_cat_array($parent_id = 0)\n {\n $category = (new \\yii\\db\\Query())->select(['pcate_id', 'pcate_name', 'parent_id'])->from('lg_position_category')->all();\n\n $arr = array();\n //var_dump($category);die;\n foreach ($category as $k => $row) {\n // 对每个分类进行循环。\n if ($category[$k]['parent_id'] == $parent_id) {\n //如果有子类\n $row['child'] = $this->get_cat_array($category[$k]['pcate_id']);\n //调用函数,传入参数,继续查询下级\n $arr[] = $row; //组合数组\n }\n }\n return $arr;\n }", "public function allSubCategory() {\n return $this->db->get_where('r_category',array('subCategory !='=>0))->result_array();\n }", "function getAllActiveChildCategoriesForSearch($parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$parent_id.\" ORDER BY \tsub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getCategories();", "public function getCategories();", "public static function getParents()\n {\n $tableCategoriesLevelOne=CategoriesLevelOne::tableName();\n $dependency = new DbDependency;\n $dependency->sql=\"SELECT MAX(id) FROM $tableCategoriesLevelOne\";\n $query=Category::getDb()->cache(function($db)\n {\n return Category::find()->orderBy(\"order_by ASC\")->with(['relationCategoriesLevelOne'])->all();\n }, Yii::$app->params['7_day_cache'], $dependency);\n\n return $query;\n }", "private function categoryTree($parent_id = 0, $sub_mark = '')\n {\n $query = DB::table('category')\n ->select('*')\n ->where('parent_id',$parent_id)\n ->get()\n ->pluck('cat_name','id');\n\n \n foreach ($query as $id => $value)\n {\n //echo $key.\" : \".$sub_mark.$value.\"</br>\";\n array_push($this->categories, $sub_mark.$value.':'.$id);\n $this->categoryTree($id, $sub_mark.'---');\n }\n return $this->categories;\n }", "public function get_child_ids($parent = 0)\n\t{\n\t\t// First we get all the categories and store it.\n\t\tif (empty($this->_all_cats))\n\t\t{\n\t\t\t$this->_ci->db->select('cat_id,cat_parent')\n\t\t\t\t\t\t->from('categories')\n\t\t\t\t\t\t->where('cat_display', 'yes');\n\t\t\t$query = $this->_ci->db->get();\n\n\t\t\tif ($query->num_rows() == 0) \n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t} \n\n\t\t\t$this->_all_cats = $query->result_array();\n\t\t}\n\t\t\n\t\tforeach ($this->_all_cats as $row)\n\t\t{\n\t\t\t// This assigns all the fields to the array.\n\t\t\tforeach ($row AS $key => $val)\n\t\t\t{\n\t\t\t\t$arr[$key] = $val;\n\t\t\t}\n\t\t\t\n\t\t\t$menu_array[$row['cat_id']] = $arr;\n\t\t}\n\t\t\n\t\tunset($arr);\n\t\t\n\t\tforeach($menu_array as $key => $val)\n\t\t{\n\t\t\t// Now add any children.\n\t\t\tif ($parent == $val['cat_parent'] OR $parent == $val['cat_id'])\n\t\t\t{\n\t\t\t\t$depth = 0;\n\t\t\t\tif ( ! in_array($val['cat_id'], $this->_cat_ids, TRUE)) \n\t\t\t\t{\n\t\t\t\t\t$this->_cat_ids = array_merge(array($val['cat_id']),$this->_cat_ids);\n\t\t\t\t\t$this->_child_subtree($key, $menu_array, $depth);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\n $categories = Category::orderBy('id', 'desc')->get();\n\n foreach ($categories as $key => &$category) {\n if($category->parent_id != 0 || $category->parent_id != null) {\n $parent = Category::find($category->parent_id);\n $category->parent = $parent;\n }\n }\n\n return $categories;\n\n }", "public static function getChildCategories($parent_id)\n {\n $categories = self::find()->where(['parent_id' => $parent_id])->all();\n return ArrayHelper::map($categories, 'id', 'name');\n }", "public function categories() {\n return $this->hasMany(Categories::class, 'parent');\n }", "function getCategories()\n\t{\n\t\t$query = ' SELECT ' .\n\t\t\t$this->db->nameQuote('alias') . ',' .\n\t\t\t$this->db->nameQuote('id') . ',' .\n\t\t\t$this->db->nameQuote('name') .\n\t\t\t' FROM ' . $this->db->nameQuote('#__k2_categories') .\n\t\t\t' WHERE ' . $this->db->nameQuote('parent') . ' = ' . $this->db->quote($this->params->get('primaryCategory')) .\n\t\t\t' AND ' . $this->db->nameQuote('id') . ' NOT IN (' . implode(',', $this->params->get('regionCategories')) . ')' .\n\t\t\t' AND ' . $this->db->nameQuote('published') . ' = ' . $this->db->quote('1') .\n\t\t\t' AND ' . $this->db->nameQuote('trash') . ' = ' . $this->db->quote('0') .\n\t\t\t' ORDER BY ' . $this->db->nameQuote('ordering') . ' ASC';\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "function cl_woo_get_cat_filter_children( $parent_term_id = null ) {\n\n\t$output = array();\n\t$child_terms = null;\n\n\t//Get children of this term\n\t$child_terms = Prso_Woocom::get_product_terms(\n\t\tarray(\n\t\t\t'parent' => $parent_term_id,\n\t\t)\n\t);\n\n\tif ( isset( $child_terms->terms ) && ! empty( $child_terms->terms ) ) {\n\n\t\tforeach ( $child_terms->terms as $key => $grandchild_term ) {\n\n\t\t\t$child_terms->terms[ $key ]->children = cl_woo_get_cat_filter_children( $grandchild_term->term_id );\n\n\t\t}\n\n\t\t$output = $child_terms->terms;\n\n\t}\n\n\treturn $output;\n}", "public function parentcategories() {\n return $this->belongsTo(Categories::class, 'parent');\n// return $this->belongsToMany(Categories::class, 'listing_categories', 'category_id', 'listing_id');\n }", "public function get_categories_by_parent_id($parent_id)\n {\n return Category::where('status', 1)\n ->where('parent_category_id', $parent_id)\n ->get()\n ->toArray();\n }", "function getCategoriesRecursive($all_categories, &$categories, $parent_id = 0, $depth = 0)\n {\n $cats = $all_categories->filter(function ($item) use ($parent_id) {\n return $item->parent_id == $parent_id;\n });\n\n foreach ($cats as $key => $cat)\n {\n $categories[$key] = array(\n \"id\" => $cat->id,\n \"text\" => str_repeat('-', $depth) .' '. $cat->category_name,\n );\n\n $this->getCategoriesRecursive($all_categories, $categories, $cat->id, $depth + 1);\n }\n }", "public function subCategorylist()\n {\n $data = [];\n $sub_categories = Category::where('parent', '!=' ,'0')->get();\n if(count($sub_categories)){\n $data = ['status' => true, 'code' => 200, 'data'=>$sub_categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "public function categories()\n {\n return $this->hasMany(\\Hydrofon\\Category::class, 'parent_id');\n }", "function getCategories($categories, &$result, $parent_id = 0, $depth = 0)\n {\n $cats = $categories->filter(function ($item) use ($parent_id) {\n return $item->parent_id == $parent_id;\n });\n\n //loop through them\n foreach ($cats as $cat)\n {\n //add category. Don't forget the dashes in front. Use ID as index\n $result[$cat->id] = str_repeat('-', $depth) . ($depth ? ' ' : '') . $cat->name;\n //go deeper - let's look for \"children\" of current category\n $this->getCategories($categories, $result, $cat->id, $depth + 1);\n }\n }", "public function getChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n $children = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $children[] = new self((int) $result->getValue('category_id'), $this->clang_id);\n $result->next();\n }\n return $children;\n }", "protected function getChildK2Categories()\n {\n $db = $this->db;\n $query = $db->getQuery(true);\n $query->select($db->quoteName(array('id', 'parent')));\n $query->from($db->quoteName('#__k2_categories'));\n $query->where($db->quoteName('published') . ' = 1');\n $query->where($db->quoteName('parent') . ' != 0');\n $db->setQuery($query);\n return $db->loadObjectList('id');\n }", "public static function getRootCategories()\n {\n $app = App::getInstance();\n\n $sql = $app['safesql']->query(\n \"SELECT\n\t\t\t\t`id`\n\t\t\tFROM `category`\n\t\t\tWHERE hidden = 0\n\t\t\tAND id > 0\n\t\t\tAND parent IS NULL\n\t\t\tAND deleted = 0\n\t\t\tORDER BY `order` ASC\",\n array());\n $results = $app['db']->get_results($sql);\n $cats = array();\n\n if (!is_null($results)) {\n foreach ($results as $cat) {\n $cats[] = new Category($cat->id);\n }\n }\n return $cats;\n }", "function get_sub_categories($category_ID)\n {\n $get_sub_category_query=site_query(\"select * from Category where parentID=\".$category_ID.\" order by displayOrder\",\"get_sub_categories()\",$dev);\n return $get_sub_category_query;\n }", "public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }", "public function get_categories() {\n global $DB;\n $categories = array();\n $results = $DB->get_records('course_categories', array('parent' => '0', 'visible' => '1', 'depth' => '1'));\n if (!empty($results)) {\n foreach ($results as $value) {\n $categories[$value->id] = $value->name;\n }\n }\n return $categories;\n }", "public function makeCategory() {\n $categories = NewsCategory::orderBy('sort', 'asc')->where('parent_id', 0)->get();\n $categories->map(function($d){\n $d['sub_category'] = $d->child;\n return $d;\n });\n return $categories;\n }", "public function GetChildCategories()\n\t\t{\n\t\t\t$categoryId = $this->GetCatId();\n\t\t\t$childCatsCache = $GLOBALS['ISC_CLASS_DATA_STORE']->Read('ChildCategories');\n\n\t\t\t// The cache has a cached version of the children for this category so just return it\n\t\t\tif(isset($childCatsCache[$categoryId])) {\n\t\t\t\treturn explode(',', $childCatsCache[$categoryId]);\n\t\t\t}\n\n\t\t\tif(!is_array($childCatsCache)) {\n\t\t\t\t$childCatsCache = array();\n\t\t\t}\n\n\t\t\t$childCats = array();\n\t\t\t$query = \"\n\t\t\t\tSELECT categoryid\n\t\t\t\tFROM [|PREFIX|]categories\n\t\t\t\tWHERE CONCAT(',', catparentlist, ',') LIKE '%,\".(int)$categoryId.\",%' AND categoryid!='\".(int)$categoryId.\"'\n\t\t\t\";\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile($child = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$childCats[] = $child['categoryid'];\n\t\t\t}\n\t\t\t$childCatsCache[$categoryId] = implode(',', $childCats);\n\t\t\t$GLOBALS['ISC_CLASS_DATA_STORE']->Save('ChildCategories', $childCatsCache);\n\t\t\treturn $childCats;\n\t\t}", "public function structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }", "public static function getCategoriesByParentId($parentId = 0) {\n return Catalog::category()->where('category_id', '=', $parentId)->orderBy('weight')->orderBy('name')->all();\n }", "public function findAllCategories(): iterable;", "function L_showChildCats ($parent, $usename) {\n\t\t\n\t\t$idObj = get_category_by_slug($parent); \n\t\t$parent_id = $idObj->term_id;\n\t\t$all_cats_ids = get_all_category_ids();\n\t\t\n\t\tforeach ( $all_cats_ids as $cat_id ) {\n\t\t\t\n\t\t\tif (cat_is_ancestor_of($parent_id, $cat_id)) {\n\t\t\t\n\t\t\t\tif ($usename) {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = get_cat_name($cat_id); \n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = (int)$cat_id;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif ($child_cats <> NULL) {\n\t\t\t\n\t\t\tsort( $child_cats ); \n\t\t\n\t\t}\n\t\t\n\t\treturn $child_cats; \n\t\t\n\t}", "public function getCategories()\n {\n $categories = ClassInfo::subclassesFor('ConsultationCategory');\n return $this->Children()->filter('Classname', $categories);\n }", "public function subcategories(){\n return $this->hasMany(Category::class,'parent_category_id')->where('hidden', 0);\n }", "public function getAllCategories();", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "function showParentCategories( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tsort_order asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function showParentCategoriesForSearch( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tcategory_title asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function get_all_category(){\n $cat_args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n\n );\n $all_category = get_categories( $cat_args );\n\n return $all_category;\n }", "function show_cats2($cats_grouped_by_parent, $parent_id = 0) {\n\t\t\t\tglobal $baseurl;\n\t\t\t\tglobal $loc_slug;\n\t\t\t\tglobal $loc_type;\n\t\t\t\tglobal $loc_id;\n\t\t\t\tglobal $cat_items_count;\n\n\t\t\t\tif($parent_id == 0) {\n\t\t\t\t\techo '<ul class=\"cat-tree cat-main-parent\">';\n\t\t\t\t} else {\n\t\t\t\t\techo '<ul class=\"cat-tree\">';\n\t\t\t\t}\n\n\t\t\t\t/*\n$tree .= '<a href=\"' . $baseurl . '/' . $loc_slug . '/list/' . $cat_slug3 . '/' . $loc_type . '-' . $loc_id . '-' . $cat_id3 . '-1\">' . $plural_name3 . \"($this_cat_count3)\" . '</a>';\n\t\t\t\t*/\n\n\t\t\t\tif(!empty($cats_grouped_by_parent)) {\n\t\t\t\t\tforeach ($cats_grouped_by_parent[$parent_id] as $v) {\n\t\t\t\t\t\t$this_cat_slug = (!empty($v['plural_name'])) ? to_slug($v['plural_name']) : to_slug($v['cat_name']);\n\t\t\t\t\t\t$this_cat_name = (!empty($v['plural_name'])) ? $v['plural_name'] : $v['cat_name'];\n\t\t\t\t\t\t$this_cat_id = $v['cat_id'];\n\t\t\t\t\t\t$this_iconfont_tag = (!empty($v['iconfont_tag'])) ? $v['iconfont_tag'] : '';\n\t\t\t\t\t\t$this_cat_count = (!empty($cat_items_count[$this_cat_id])) ? $cat_items_count[$this_cat_id] : 0;\n\n\t\t\t\t\t\techo '<li data-cat-id=\"' . $v['cat_id'] . '\"> ';\n\t\t\t\t\t\t\techo \"<a href='$baseurl/$loc_slug/list/$this_cat_slug/$loc_type-$loc_id-$this_cat_id-1'>\n\t\t\t\t\t\t\t\t$this_iconfont_tag $this_cat_name ($this_cat_count)</a>\";\n\n\n\n\t\t\t\t\t\t\t//if there are children\n\t\t\t\t\t\t\tif (!empty($cats_grouped_by_parent[$this_cat_id])) {\n\t\t\t\t\t\t\t\tshow_cats2($cats_grouped_by_parent, $this_cat_id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\techo '</ul>';\n\t\t\t}", "function getAllMainCatsWithChildren() {\r\n $sql = 'SELECT * FROM categories WHERE parent_id = 0';\r\n\r\n include '../config/db.php';\r\n\r\n $rs = mysqli_query($link, $sql);\r\n mysqli_close($link);\r\n\r\n $smartyRs = array();\r\n while ($row = $rs->fetch_assoc()) {\r\n\r\n $rsChildren = getChildrenForCat($row['id']);\r\n\r\n if ($rsChildren) {\r\n $row['children'] = $rsChildren;\r\n }\r\n\r\n $smartyRs[] = $row;\r\n }\r\n\r\n return $smartyRs;\r\n}", "function getParentCategoriesForCategory($categoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //start loop with passed category\n $aux = $categoryID;\n\n $categoriesArray = array();\n\n //search parent category until 0 level reached\n while ($aux != 0) {\n $categoriesArray[] = $aux;\n $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID);\n }\n\n //return categories array\n return $categoriesArray;\n}", "public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function getChildrenCategories()\n {\n $childrenCategories = $this->getCategory()->getChildrenCategories();\n\n Mage::dispatchEvent(\n 'category_filter_get_children_categories',\n array(\n 'filter' => $this,\n 'category' => $this->getLayer()->getCurrentCategory(),\n 'children_categories' => $childrenCategories\n )\n );\n\n return $childrenCategories;\n }", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public function getCategory(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$categories = new Categories;\n\n\t\tif(isset($params['category']) && $params['category']!=\"\"){\n\t\t\t$categories = $categories->where('slug', \"=\", $params['category']);\n\t\t}\n\n\t\t$categories = $categories->where('cat_status',1);\t\t\n\n\t\tif(isset($params['onlyParent']) && $params['onlyParent']){\n\t\t\t$categories = $categories->where('ancestors','exists',false);\n\t\t}\n\n\t\t$categories = $categories->get();\n\n\t\tif(empty($categories) || !is_object($categories) || empty($categories->toArray())){\n\t\t\treturn response([],404);\n\t\t}\n\n\t\tif(isset($params['withChild']) && $params['withChild']){\n\n\t\t\tforeach($categories as &$category){\t\t\t\t\n\t\t\t\t$category['children'] = array();\n\t\t\t\t$category['children'] = Categories::where('cat_status',1)->where('ancestors.0._id','=',$category['_id'])->get(array('_id','slug','cat_title','metaTitle','metaDescription','metaKeywords'));\n\t\t\t}\n\n\t\t}\t\n\t\t\n\t\t\n\t\tif(isset($params['withCount']) && $params['withCount']){\n\n\t\t\t// db.products.aggregate([{$group:{_id:\"$categories\",count:{$sum:1}}}])\n\n\t\t\t$products = DB::collection('products')->raw(function($collection){\n\n\t\t\t\treturn $collection->aggregate(array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$match' => array(\n\t\t\t\t\t\t\t'status' => 1\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$project' => array('categories' => 1)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$unwind' => array(\n\t\t\t\t\t\t\t'path' => '$categories',\n\t\t\t\t\t\t\t'preserveNullAndEmptyArrays' => true\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$group' => array(\n\t\t\t\t\t\t\t'_id'=>'$categories',\n\t\t\t\t\t\t\t'count' => array(\n\t\t\t\t\t\t\t\t'$sum' => 1\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t});\n\n\t\t\t$processedPro = [];\n\t\t\tforeach($products['result'] as $product){\n\n\t\t\t\t$cat = $product['_id'];\n\n\t\t\t\t$processedPro[$cat] = $product['count'];\n\n\t\t\t}\n\n\t\t\tforeach($categories as &$category){\n\n\t\t\t\t$category['productCount'] = isset($processedPro[$category['_id']])?$processedPro[$category['_id']]:0;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn response($categories);\n\t}", "public function getCategoriesAndParents() {\n\t\t$cats = array();\n\t\tif ($this->categories) {\n\t\t\t$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']);\n\t\t\t$catMode = intval($configuration[\"categoryMode\"]);\n\t\t\t$lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']);\n\t\t\t// Step 1: select all categories of the current language\n\t\t\t$categoriesUtility = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('\\quizpalme\\Camaliga\\Utility\\AllCategories');\n\t\t\t$all_cats = $categoriesUtility->getCategoriesarrayComplete();\n\t\t\t// Step 2: aktuelle orig_uid herausfinden\n\t\t\t$orig_uid = intval($this->getUid());\t// ist immer die original uid (nicht vom übersetzten Element!)\n\t\t\tif ($lang > 0 && $catMode == 0) {\n\t\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t'uid',\n\t\t\t\t\t\t'tx_camaliga_domain_model_content',\n\t\t\t\t\t\t'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang . ' AND t3_origuid=' . $orig_uid);\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4))\n\t\t\t\t\t\tif ($row['uid']) {\n\t\t\t\t\t\t\t$orig_uid = intval($row['uid']);\t// uid of the translated element\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t\t}\n\t\t\t// Step 3: get the mm-categories of the current element (from the original or translated element)\n\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'uid_local',\n\t\t\t\t'sys_category_record_mm',\n\t\t\t\t\"tablenames='tx_camaliga_domain_model_content' AND uid_foreign=\" . $orig_uid);\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){\n\t\t\t\t\t$uid = $row['uid_local'];\n\t\t\t\t\tif (!isset($all_cats[$uid]['parent'])) continue;\n\t\t\t\t\t$parent = (int) $all_cats[$uid]['parent'];\n\t\t\t\t\t//if (!$all_cats[$parent]['title'])\tcontinue;\n\t\t\t\t\tif (!isset($cats[$parent])) {\n\t\t\t\t\t\t$cats[$parent] = array();\n\t\t\t\t\t\t$cats[$parent]['childs'] = array();\n\t\t\t\t\t\t$cats[$parent]['title'] = $all_cats[$parent]['title'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($all_cats[$uid]['title'])\n\t\t\t\t\t\t$cats[$parent]['childs'][$uid] = $all_cats[$uid]['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t}\n\t\treturn $cats;\n\t}", "public function categoryList()\n {\n $data = [];\n $categories = Category::where('parent', 0)->get();\n if($categories){\n $data = ['status' => true, 'code' => 200, 'data'=>$categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "public function getCategories()\n {\n if ($this->_categories === null) {\n /** @var $tree Tree */\n $tree = $this->_categoryFactory->create()->getTreeModel();\n $tree->load(null, 2);\n // Load only to second level.\n $tree->addCollectionData(null, 'position');\n $this->_categories = $tree->getNodeById(Category::TREE_ROOT_ID)->getChildren();\n }\n return $this->_categories;\n }", "public function findCategories();", "function get_subcategories($categoryid) {\r\n global $DB;\r\n\r\n $subcategories = $DB->get_records('question_categories', array('parent' => $categoryid), 'id');\r\n\r\n foreach ($subcategories as $subcategory) {\r\n $subcategories = array_merge($subcategories, get_subcategories($subcategory->id));\r\n }\r\n\r\n return $subcategories;\r\n}", "public function getCategories()\n {\n return $this->hasMany(Category::className(), ['id' => 'tree_id'])->viaTable('{{%news_tree}}', ['news_id' => 'id']);\n }", "function tep_get_parent_categories(&$categories, $categories_id) {\n\tglobal $obj_categories;\n\tif(!$categories_id) return null;\n\t$parent_id = $obj_categories->get_parent_id($categories_id);\n\tif($parent_id == 0 ) return;\n\t$categories[sizeof($categories)] = $parent_id;\n\ttep_get_parent_categories($categories, $parent_id);\n }", "public function fetch_category(){\n $this->db->where('parent_id', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }" ]
[ "0.80137753", "0.7982417", "0.7608047", "0.7503634", "0.7493022", "0.74341655", "0.74308854", "0.73981786", "0.7324852", "0.7305709", "0.7301678", "0.72558624", "0.7221863", "0.71843475", "0.7150873", "0.71488196", "0.71227723", "0.71027344", "0.70949554", "0.7094945", "0.7089921", "0.7087924", "0.7075342", "0.7060242", "0.7041812", "0.70255595", "0.7020483", "0.7015103", "0.7001407", "0.6998308", "0.6996807", "0.6947829", "0.69476146", "0.69326544", "0.69146436", "0.6911402", "0.6891923", "0.688854", "0.6860282", "0.68549794", "0.68527967", "0.6851176", "0.68280417", "0.68045086", "0.6795802", "0.6782565", "0.67754453", "0.6775432", "0.67691374", "0.6752049", "0.67423123", "0.67423123", "0.6729897", "0.672799", "0.67185307", "0.6712642", "0.6704165", "0.6703836", "0.6701079", "0.66994226", "0.66976076", "0.66820353", "0.66801006", "0.6678348", "0.66603076", "0.6655563", "0.66498643", "0.6641203", "0.66382194", "0.66373307", "0.6627181", "0.66130614", "0.6612812", "0.6608655", "0.6603326", "0.6597348", "0.6584889", "0.6580357", "0.6574483", "0.65742403", "0.6573092", "0.6572916", "0.65705436", "0.6566492", "0.6558093", "0.65578574", "0.6552144", "0.654388", "0.65434486", "0.652857", "0.65195215", "0.6516871", "0.6512328", "0.65085965", "0.64993906", "0.6495587", "0.6488439", "0.64879596", "0.6476262", "0.64731836" ]
0.6911727
35
This function returns the categories inside one parent category only (not subcategories)
function getTestCategoriesInsideACategory($parentCategoryID, $clientID) { global $definitions; //get item type $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID); //get property $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID); //Create the filter // build return properties array $returnProperties = array(); //build an empty filter $filters = array(); $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID); $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties); //Get only the testCategories ids $onlyIds = array(); foreach ($testCategories as $tcat) { $onlyIds[] = $tcat['ID']; } return $onlyIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }", "function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "private function get_category_by_parent($parent){\n $query = DB::table('ps_category as a')\n ->select('a.id_category','b.name')\n ->join('ps_category_lang as b','a.id_category','b.id_category')\n ->where('a.id_parent',$parent)\n ->where('a.active',1)\n ->groupBy('a.id_category')\n ->get();\n return $query;\n }", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "private function get_parent_categories(){\r\n\t\t$rslt = array();\r\n\r\n\t\t$args = array('taxonomy'=>'market_reports_category', 'hide_empty' => false, 'parent'=>0, 'orderby'=>'term_id','order'=>'ASC');\r\n\t\t$parent_cats = get_terms($args);\r\n\t\t// $rslt['-1'] = 'None';\r\n\t\t// wp_die(var_dump($parent_cats));\r\n\t\tforeach ($parent_cats as $key => $parent_cat) {\r\n\t\t\t$rslt[$parent_cat->term_id] = $parent_cat->name;\r\n\t\t}\r\n\t\t// rsort($rslt);\r\n\t\treturn $rslt;\r\n\t}", "function get_parent_cats($context) {\n global $COURSE;\n\n switch ($context->contextlevel) {\n // a category can be the parent of another category\n // there is no limit of depth in this case\n case CONTEXT_COURSECAT:\n static $categoryparents = null; // cache for parent categories\n if (!isset($categoryparents)) {\n $categoryparents = array();\n }\n if (array_key_exists($context->instanceid, $categoryparents)) {\n return $categoryparents[$context->instanceid];\n }\n\n if (!$cat = get_record('course_categories','id',$context->instanceid)) {\n //error?\n return array();\n }\n $parents = array();\n while (!empty($cat->parent)) {\n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $cat->parent)) {\n debugging('Incorrect category parent');\n break;\n }\n $parents[] = $catcontext->id;\n $cat = get_record('course_categories','id',$cat->parent);\n }\n return $categoryparents[$context->instanceid] = array_reverse($parents);\n break;\n \n // a course always fall into a category, unless it's a site course\n // this happens when SITEID == $course->id\n // in this case the parent of the course is site context\n case CONTEXT_COURSE:\n static $courseparents = null; // cache course parents\n if (!isset($courseparents)) {\n $courseparents = array();\n }\n if (array_key_exists($context->instanceid, $courseparents)) {\n return $courseparents[$context->instanceid];\n }\n\n if (count($courseparents) > 1000) {\n $courseparents = array(); // max cache size when looping through thousands of courses\n }\n if ($context->instanceid == SITEID) {\n return $courseparents[$context->instanceid] = array(); // frontpage course does not have parent cats\n }\n if ($context->instanceid == $COURSE->id) {\n $course = $COURSE;\n } else if (!$course = get_record('course', 'id', $context->instanceid)) {\n //error?\n return array();;\n }\n\n if (empty($course->category)) {\n // this should not happen\n return $courseparents[$context->instanceid] = array();\n }\n \n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $course->category)) {\n debugging('Incorect course category');\n return array();;\n }\n\n return $courseparents[$context->instanceid] = array_merge(get_parent_cats($catcontext), array($catcontext->id)); //recursion :-)\n break;\n\n default:\n // something is very wrong!\n return array();\n break;\n }\n}", "function showParentCategoriesForSearch( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tcategory_title asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getCategories($parent_id = 0) {\n\t\t$category_data = FALSE;\n\t\t\n\t\tif (! $category_data) {\n\t\t\t$category_data = array ();\n\t\t\t\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\tc.category_id,\r\n\t\t\t\t\tc.parent_id,\r\n\t\t\t\t\tcd.name,\r\n\t\t\t\t\t(SELECT COUNT(*) FROM `\" . DB_PREFIX . \"category` cc WHERE cc.parent_id = c.category_id) as children\r\n\t\t\tFROM `\" . DB_PREFIX . \"category` c\r\n\t\t\tLEFT JOIN `\" . DB_PREFIX . \"category_description` cd\r\n\t\t\t\tON (c.category_id = cd.category_id)\r\n\t\t\tWHERE c.parent_id = \" . ( int ) $parent_id . \"\r\n\t\t\tAND c.status = 1\r\n\t\t\tAND cd.language_id = \" . ( int ) $this->config->get ( 'config_language_id' ) . \"\r\n\t\t\tORDER BY c.sort_order, cd.name ASC\";\n\t\t\t\n\t\t\t$query = $this->db->query ( $sql );\n\t\t\t\n\t\t\tforeach ( $query->rows as $result ) {\n\t\t\t\t$category_data [] = array (\n\t\t\t\t\t\t'category_id' => $result ['category_id'],\n\t\t\t\t\t\t'parent_id' => $result ['parent_id'],\n\t\t\t\t\t\t'name' => $result ['name'],\n\t\t\t\t\t\t'children' => $result ['children'],\n\t\t\t\t\t\t'disabled' => ((in_array ( $result ['category_id'], $this->config->get ( 'msconf_restrict_categories' ) ) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 1 && $result ['parent_id'] == 0) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 2 && $result ['children'] > 0)) ? TRUE : FALSE) \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// Recursive call of the function and merge of all the categories together\n\t\t\t\t$category_data = array_merge ( $category_data, $this->getCategories ( $result ['category_id'] ) );\n\t\t\t}\n\t\t\t\n\t\t\t// $this->cache->set('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id, $category_data);\n\t\t}\n\t\t\n\t\t// The first calls of the function (for the root categories), where indentation takes place\n\t\tif ($parent_id == 0) {\n\t\t\t$category_data_indented = array ();\n\t\t\tforeach ( $category_data as $category ) {\n\t\t\t\t$category_data_indented [] = array (\n\t\t\t\t\t\t'category_id' => $category ['category_id'],\n\t\t\t\t\t\t'name' => str_repeat ( '&nbsp;&nbsp;&nbsp;', $this->_getDepth ( $category_data, $category ['category_id'] ) ) . $category ['name'],\n\t\t\t\t\t\t'parent_id' => $category ['parent_id'],\n\t\t\t\t\t\t'children' => $category ['children'],\n\t\t\t\t\t\t'disabled' => $category ['disabled'] \n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $category_data_indented;\n\t\t}\n\t\t\n\t\treturn $category_data;\n\t}", "function showParentCategories( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tsort_order asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function getParents()\n {\n $tableCategoriesLevelOne=CategoriesLevelOne::tableName();\n $dependency = new DbDependency;\n $dependency->sql=\"SELECT MAX(id) FROM $tableCategoriesLevelOne\";\n $query=Category::getDb()->cache(function($db)\n {\n return Category::find()->orderBy(\"order_by ASC\")->with(['relationCategoriesLevelOne'])->all();\n }, Yii::$app->params['7_day_cache'], $dependency);\n\n return $query;\n }", "public function parentCategories()\n {\n return $this->hasMany(self::class, 'id', 'parent_id');\n }", "public function getCategories($parent_id) {\n// if (!$category_data) {\n\t$category_data = array();\n\n\t$rows = Make::a('catalog/category')\n\t\t->table_alias('c')\n\t\t->select_expr('c.category_id,c.ref_category_code,c.status,c.sort_order')\n\t\t->left_outer_join('category_description', array('c.category_id', '=', 'cd.category_id'), 'cd')\n\t\t->where('c.parent_id', $parent_id)\n\t\t->where('cd.language_id', QS::app()->config->get('config_language_id'))\n\t\t->order_by_asc('c.sort_order')\n\t\t->order_by_asc('cd.name')\n\t\t->find_many(true);\n\n\tforeach ($rows as $result) {\n\t $category_data[] = array(\n\t\t'category_id' => $result['category_id'],\n\t\t'ref_category_code' => $result['ref_category_code'],\n\t\t'name' => $this->getPath($result['category_id']),\n\t\t'status' => $result['status'],\n\t\t'sort_order' => $result['sort_order']\n\t );\n\n\t $category_data = array_merge($category_data, $this->getCategories($result['category_id']));\n\t}\n\n// QS::app()->cache->set('category.' . QS::app()->config->get('config_language_id') . '.' . $parent_id, $category_data);\n//}\n\n\treturn $category_data;\n }", "public function getCategories() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE parent is null ORDER BY name ASC\");\n $stmt->setFetchMode(\\PDO::FETCH_CLASS, '\\App\\Model\\Category\\ProductCategoryModel');\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public static function getSubCategories($parent_cat_id) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=$parent_cat_id\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function parentcategories() {\n return $this->belongsTo(Categories::class, 'parent');\n// return $this->belongsToMany(Categories::class, 'listing_categories', 'category_id', 'listing_id');\n }", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "protected function getChildK2Categories()\n {\n $db = $this->db;\n $query = $db->getQuery(true);\n $query->select($db->quoteName(array('id', 'parent')));\n $query->from($db->quoteName('#__k2_categories'));\n $query->where($db->quoteName('published') . ' = 1');\n $query->where($db->quoteName('parent') . ' != 0');\n $db->setQuery($query);\n return $db->loadObjectList('id');\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "function getAllActiveChildCategoriesForSearch($parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$parent_id.\" ORDER BY \tsub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "protected function parentCategoryTC()\n {\n return PostCategory::parentCategories()->firstOrFail();\n }", "private function _cats_by_parent($cats)\n\t\t{\n\t\t\t$cats_by_parent = array();\n\n\t\t\tforeach ($cats as $cat)\n\t\t\t{\n\t\t\t\tif (! isset($cats_by_parent[$cat['parent_id']]))\n\t\t\t\t{\n\t\t\t\t\t$cats_by_parent[$cat['parent_id']] = array();\n\t\t\t\t}\n\n\t\t\t\t$cats_by_parent[$cat['parent_id']][] = $cat;\n\t\t\t}\n\n\t\t\treturn $cats_by_parent;\n\t\t}", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "public function getAllCategories() {\n\n if (!isset(parent::all()[0])) {\n return [];\n }\n return parent::all()[0]->children;\n }", "public function getParentCategory() {\r\n\t\t$postID = $_POST['id'];\r\n\t\t$parentList = '<select id=\"ExpenseCategory[]\" class=\"form-control xxx ExpenseCategory exParentCat\" name=\"ExpenseParentCategory[]\">';\r\n\t\t$parentList .= '<option value=\"-1\" > Select Sub Category</option>'; \r\n\t\t$parentCat = getCategoryParent($_POST['CatType']); \r\n\t\tif( !empty( $parentCat ))\r\n\t\t{\r\n\t\t\tforeach($parentCat as $val){\r\n\t\t\t\tif( getCategoryParentId($postID) == $val->id)\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" selected=\"selected\"> '.$val->title.' </option>';\r\n\t\t\t\telse\t\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" > '.$val->title.' </option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$parentList .= '</select>'; \r\n\t\techo $parentList; \r\n\t}", "function getParentCategoriesForCategory($categoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //start loop with passed category\n $aux = $categoryID;\n\n $categoriesArray = array();\n\n //search parent category until 0 level reached\n while ($aux != 0) {\n $categoriesArray[] = $aux;\n $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID);\n }\n\n //return categories array\n return $categoriesArray;\n}", "function tep_get_parent_categories(&$categories, $categories_id) {\n\tglobal $obj_categories;\n\tif(!$categories_id) return null;\n\t$parent_id = $obj_categories->get_parent_id($categories_id);\n\tif($parent_id == 0 ) return;\n\t$categories[sizeof($categories)] = $parent_id;\n\ttep_get_parent_categories($categories, $parent_id);\n }", "public function getChildCat($parent = array(0), $type = false, $data = false)\n {\n global $rlDb;\n\n foreach ($parent as $parent_id) {\n $parent_id = (int) $parent_id;\n\n $sql = \"SELECT *, `Modified` \";\n $sql .= \"FROM `{db_prefix}categories` \";\n $sql .= \"WHERE `Type` = '{$type['Key']}' AND `Status` = 'active' AND `Parent_ID` = '{$parent_id}'\";\n if ($type['Cat_hide_empty']) {\n $sql .= \"AND `Count` > 0 \";\n }\n $sql .= \"ORDER BY `Position`\";\n\n if ($tmp_categories = $rlDb->getAll($sql)) {\n foreach ($tmp_categories as $cKey => $cValue) {\n $ids[] = $cValue['ID'];\n\n $categories[$cValue['ID']] = $cValue;\n $categories[$cValue['ID']]['pName'] = 'categories+name+' . $cValue['Key'];\n $categories[$cValue['ID']]['pTitle'] = 'categories+title+' . $cValue['Key'];\n\n /* get subcategories */\n if ($type['Cat_show_subcats']) {\n // TODO - add this condition in output if needs\n $rlDb->calcRows = true;\n $subCategories = $rlDb->fetch(array('ID', 'Count', 'Path`, CONCAT(\"categories+name+\", `Key`) AS `pName`, CONCAT(\"categories+title+\", `Key`) AS `pTitle', 'Key'), array('Status' => 'active', 'Parent_ID' => $cValue['ID']), \"ORDER BY `Position`\", null, 'categories');\n $rlDb->calcRows = false;\n\n if (!empty($subCategories)) {\n $categories[$cValue['ID']]['sub_categories'] = $subCategories;\n $categories[$cValue['ID']]['sub_categories_calc'] = $rlDb->foundRows;\n }\n\n unset($subCategories);\n }\n }\n unset($tmp_categories);\n\n $data[$parent_id] = $categories;\n\n unset($categories);\n } else {\n continue;\n }\n }\n\n if ($parent) {\n return $this->getChildCat($ids, $type, $data);\n } else {\n return $data;\n }\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function categories($parentId = null) {\n if (!empty($this->request->data['Category'])) {\n if ($this->Classified->Category->save($this->request->data)) {\n $this->Session->setFlash(__('Category saved'));\n }\n }\n\t\t\n\t\t$conditions = !empty($parentId) ? array('Category.parent_id' => $parentId, 'Category.model' => 'Classified') : array('Category.model' => 'Classified');\n $categories = $this->Classified->Category->find('threaded', array('conditions' => $conditions, 'order' => array('name' => 'ASC')));\n $this->set('parentCategories', $this->Classified->Category->generateTreeList(null, null, null, '--'));\n $this->set(compact('categories'));\n $this->set('page_title_for_layout', __('Classified Categories & Options'));\n\t\t//$this->layout = 'default';\n\t\treturn $categories; // used in element Categories/categories\n }", "public function subcategories()\n {\n return $this->hasMany(Category::class, 'parent_id')->where('status', 1);\n }", "private static function getParentChildren():array\n {\n $parentChildren = [];\n $categories = self::select('*')->get()->toArray();\n\n foreach ($categories as $id){\n $children = [];\n foreach ($categories as $row){\n if ($id['id'] == $row['parent_id']){\n $children[] = $row['id'];\n }\n }\n $parentChildren[$id['id']] = $children;\n }\n\n return $parentChildren;\n\n }", "public function getListParentCode()\n {\n\n $urlConApi = config('app.api') . 'category?mod=list_category';\n\n $result = $this->getListData($urlConApi);\n\n $listParentCode = [];\n if (isset($result['data'])) {\n foreach ($result['data'] as $key => $parentCode) {\n $listParentCode[] = $parentCode['Code'];\n }\n }\n\n return $listParentCode;\n }", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }", "public function parentcategory()\n {\n return $this->belongsTo(Category::class, 'parent_id')->select('id', 'category_name');\n }", "public function parentcategory()\n {\n return $this->belongsTo(Category::class, 'parent_id')->select('id', 'category_name');\n }", "public function categories() {\n return $this->hasMany(Categories::class, 'parent');\n }", "public static function getRootCategories()\n {\n $app = App::getInstance();\n\n $sql = $app['safesql']->query(\n \"SELECT\n\t\t\t\t`id`\n\t\t\tFROM `category`\n\t\t\tWHERE hidden = 0\n\t\t\tAND id > 0\n\t\t\tAND parent IS NULL\n\t\t\tAND deleted = 0\n\t\t\tORDER BY `order` ASC\",\n array());\n $results = $app['db']->get_results($sql);\n $cats = array();\n\n if (!is_null($results)) {\n foreach ($results as $cat) {\n $cats[] = new Category($cat->id);\n }\n }\n return $cats;\n }", "public function fetch_category(){\n $this->db->where('parent_id', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public function categories()\n {\n return $this->hasMany(\\Hydrofon\\Category::class, 'parent_id');\n }", "public function get_no_parents($lang_id=1)\n\t{\n $this->db->select('*');\n $this->db->where('parent_id', 0);\n $this->db->join($this->_table_name.'_lang', $this->_table_name.'.id = '.$this->_table_name.'_lang.category_id');\n $this->db->where('language_id', $lang_id);\n $categories = parent::get();\n \n // Return key => value pair array\n $array = array(0 => 'Select');\n //$array = array(0 => lang('No parent'));\n if(count($categories))\n {\n foreach($categories as $n)\n {\n $array[$n->id] = $n->title;\n }\n }\n \n return $array;\n\t}", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "function getCategories()\n\t{\n\t\t$query = ' SELECT ' .\n\t\t\t$this->db->nameQuote('alias') . ',' .\n\t\t\t$this->db->nameQuote('id') . ',' .\n\t\t\t$this->db->nameQuote('name') .\n\t\t\t' FROM ' . $this->db->nameQuote('#__k2_categories') .\n\t\t\t' WHERE ' . $this->db->nameQuote('parent') . ' = ' . $this->db->quote($this->params->get('primaryCategory')) .\n\t\t\t' AND ' . $this->db->nameQuote('id') . ' NOT IN (' . implode(',', $this->params->get('regionCategories')) . ')' .\n\t\t\t' AND ' . $this->db->nameQuote('published') . ' = ' . $this->db->quote('1') .\n\t\t\t' AND ' . $this->db->nameQuote('trash') . ' = ' . $this->db->quote('0') .\n\t\t\t' ORDER BY ' . $this->db->nameQuote('ordering') . ' ASC';\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "function getDocumentsGeneralParentCategories() {\n\n\t\t//solo se usan las categorias del modulo documentos\n\t\t//no se usan generales\n\t\tif (!DocumentPeer::usesGlobalCategories())\n\t\t\treturn array();\n\n\t\t$criteria = new Criteria();\n\n\t\t$criteria->addJoin(UserGroupPeer::GROUPID,GroupCategoryPeer::GROUPID,Criteria::INNER_JOIN);\n\t\t$criteria->addJoin(GroupCategoryPeer::CATEGORYID,CategoryPeer::ID,Criteria::INNER_JOIN);\n\t\t$criteria->add(UserGroupPeer::USERID,$this->getId());\n\t\t$criteria->add(CategoryPeer::ACTIVE,1);\n\t\t$criteria->add(CategoryPeer::PARENTID,0);\n\t\t$criteria->add(CategoryPeer::MODULE,'');\n\n\t\t$result = CategoryPeer::doSelect($criteria);\n\t\treturn $result;\n\n\t}", "function L_showChildCats ($parent, $usename) {\n\t\t\n\t\t$idObj = get_category_by_slug($parent); \n\t\t$parent_id = $idObj->term_id;\n\t\t$all_cats_ids = get_all_category_ids();\n\t\t\n\t\tforeach ( $all_cats_ids as $cat_id ) {\n\t\t\t\n\t\t\tif (cat_is_ancestor_of($parent_id, $cat_id)) {\n\t\t\t\n\t\t\t\tif ($usename) {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = get_cat_name($cat_id); \n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = (int)$cat_id;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif ($child_cats <> NULL) {\n\t\t\t\n\t\t\tsort( $child_cats ); \n\t\t\n\t\t}\n\t\t\n\t\treturn $child_cats; \n\t\t\n\t}", "function get_parent_cat_info( $parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE category_id = \".$parent_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r != false )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }", "public static function treeCategories(): array\n {\n return JEasyUi::jsonFormat(self::parentCategories());\n }", "public function get_categories_by_parent_id($parent_id)\n {\n return Category::where('status', 1)\n ->where('parent_category_id', $parent_id)\n ->get()\n ->toArray();\n }", "public function getCategories() {\n\t\t$db = JFactory::getDBO();\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('a.id', 'a.parent_id', 'a.name')));\n\t\t$query->from($db->quoteName('#__gtpihps_categories', 'a'));\n\t\t\n\t\t$query->where($db->quoteName('a.published') . ' = 1');\n\t\t$query->order($db->quoteName('a.id'));\n\t\t\n\t\t$db->setQuery($query);\n\t\t$raw = $db->loadObjectList();\n\t\t$data = array();\n\t\tforeach ($raw as $item) {\n\t\t\t$data[$item->parent_id][$item->id] = $item->name;\n\t\t}\n\t\treturn $data;\n\t}", "public function Parent()\n\t{\n\t\treturn Category::findOrFail($this->category_id);\n\t}", "function get_parent_of_category($category_id) {\n\twhile($category_id) {\n\t\t$category = get_category($category_id); // get the object for the catid\n\t\t$category_id = $category->category_parent; // assign parent ID (if exists) to $catid\n\t\t\n\t\t$category_parent = $category->cat_ID;\n\t}\n\treturn get_category($category_parent);\n}", "public function categories()\n {\n return $this->belongsToMany(Category::class, 'solution_categories', 'solution_id', 'category_id')->isParent();\n }", "public function getCategoriesForSettings() {\n \n $qb = $this->_em->createQueryBuilder();\n $qb->select('c')\n ->from('ABOMainBundle:Category', 'c')\n ->join('c.parent', 'p')\n ->addSelect('p')\n ->where('c.level = :level')\n ->setParameter('level', 2);\n \n return $qb->getQuery()->getResult();\n }", "public function findChildren($id_parent){\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.parent', $queryBuilder->createNamedParameter($id_parent))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.sys_language_uid', $queryBuilder->createNamedParameter($GLOBALS['TSFE']->sys_language_uid, \\PDO::PARAM_INT))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.deleted', $queryBuilder->createNamedParameter(0))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.hidden', $queryBuilder->createNamedParameter(0))\n )\n ->execute();\n $list_cat=[];\n while ($row = $statement->fetch()) {\n\n $list= array(\n 'uid' => $row['uid'],\n 'title' => $row['title'],\n 'parent' => $row['parent'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n );\n array_push($list_cat, $list);\n }\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.uid', $queryBuilder->createNamedParameter($id_parent))\n )\n \n ->execute();\n while ($row = $statement->fetch()) {\n $list=array(\n 'uid' =>$row['uid'],\n 'title' =>$row['title'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n 'children' => $list_cat);\n }\n return $list;\n }", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "public function getAllCategories()\n\t{\n\t\treturn $this->_db->loadAssoc(\"SELECT * FROM @_#_categories ORDER BY title\", 'parent_id', true);\n\t}", "private function getCatParent() {\r\n $rCat = new Read;\r\n $rCat->ExeRead(\"ml_categories\", \"WHERE category_id = :id\", \"id={$this->Data['post_category']}\");\r\n if ($rCat->getResult()):\r\n return $rCat->getResult()[0]['category_parent'];\r\n else:\r\n return null;\r\n endif;\r\n }", "public function getCatsInside() {\r\n\t\treturn $this->_cats;\r\n\t}", "public function categories()\n {\n /* $categories=Category::where('parent',0)->with('grandchildren')->get()\n ->toArray();*/\n\n //to get parent to child level heirarchy\n /*$categories=Category::with('grandchildren')->get()\n ->toArray();*/\n\n //to get children of specific category\n /*foreach($categories as $category){\n $parent=$category->children()->get();\n\n if(!is_null($parent)){\n print_r($parent);\n \n }\n }*/\n\n /*$categories=Category::orderBy('name', 'asc')\n ->orderBy('parent', 'asc')->get();*/\n\n $categories=Category::where('parent',0)->with('children','children.grandchildren')->orderBy('name', 'asc')->get()\n ->toArray();\n return response()->json(['categories'=>$categories]);\n }", "public function getAllCategories() {\n $allCategories= $this->getCategories(); \n foreach ($allCategories as $value){\n $value->setChildren($this->getSubCategories($value->getId()));\n }\n return $allCategories;\n \n }", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "private function getChildrenCategories($parentCategoryId)\n {\n $parentCategoryId = intval($parentCategoryId);\n $queryResult = $this->dataBase->query(\"SELECT * FROM `categories` WHERE `parent_category_id` = {$parentCategoryId}\");\n\n $childrenCategories = [];\n $i = 0;\n\n while ($row = $queryResult->fetch()) {\n $childrenCategories[$i] = $row;\n\n if ($this->getChildrenCategories($row[\"id\"])) {\n $childrenCategories[$i][\"children_categories\"] = $this->getChildrenCategories($row[\"id\"]);\n }\n $i++;\n }\n\n return $childrenCategories;\n }", "public function getCategory($parentId)\n {\n $sql = \"SELECT distinct * FROM categories WHERE parent=:id\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindValue(\":id\", $parentId);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "function dbThrowProductCategories( $bParent = null ){\n global $oCategory;\n $aCategories = throwCategories( );\n $aFile = file( DB_PRODUCTS_CATEGORIES );\n $iCount = count( $aFile );\n for( $i = 1; $i < $iCount; $i++ ){\n $aExp = explode( '$', $aFile[$i] );\n if( isset( $aCategories[$aExp[0]] ) && isset( $oCategory->aData[$oCategory->aParent[$aExp[0]]] ) ){\n $aData[$aExp[1]][] = $aExp[0];\n if( isset( $bParent ) )\n $aData[$aExp[1]][] = $oCategory->aParent[$aExp[0]];\n }\n } // end for\n if( isset( $aData ) )\n return $aData;\n }", "public function subcategories(){\n return $this->hasMany(Category::class,'parent_category_id')->where('hidden', 0);\n }", "public function get_child_ids($parent = 0)\n\t{\n\t\t// First we get all the categories and store it.\n\t\tif (empty($this->_all_cats))\n\t\t{\n\t\t\t$this->_ci->db->select('cat_id,cat_parent')\n\t\t\t\t\t\t->from('categories')\n\t\t\t\t\t\t->where('cat_display', 'yes');\n\t\t\t$query = $this->_ci->db->get();\n\n\t\t\tif ($query->num_rows() == 0) \n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t} \n\n\t\t\t$this->_all_cats = $query->result_array();\n\t\t}\n\t\t\n\t\tforeach ($this->_all_cats as $row)\n\t\t{\n\t\t\t// This assigns all the fields to the array.\n\t\t\tforeach ($row AS $key => $val)\n\t\t\t{\n\t\t\t\t$arr[$key] = $val;\n\t\t\t}\n\t\t\t\n\t\t\t$menu_array[$row['cat_id']] = $arr;\n\t\t}\n\t\t\n\t\tunset($arr);\n\t\t\n\t\tforeach($menu_array as $key => $val)\n\t\t{\n\t\t\t// Now add any children.\n\t\t\tif ($parent == $val['cat_parent'] OR $parent == $val['cat_id'])\n\t\t\t{\n\t\t\t\t$depth = 0;\n\t\t\t\tif ( ! in_array($val['cat_id'], $this->_cat_ids, TRUE)) \n\t\t\t\t{\n\t\t\t\t\t$this->_cat_ids = array_merge(array($val['cat_id']),$this->_cat_ids);\n\t\t\t\t\t$this->_child_subtree($key, $menu_array, $depth);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "public function getCategoriesAndParents() {\n\t\t$cats = array();\n\t\tif ($this->categories) {\n\t\t\t$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']);\n\t\t\t$catMode = intval($configuration[\"categoryMode\"]);\n\t\t\t$lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']);\n\t\t\t// Step 1: select all categories of the current language\n\t\t\t$categoriesUtility = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('\\quizpalme\\Camaliga\\Utility\\AllCategories');\n\t\t\t$all_cats = $categoriesUtility->getCategoriesarrayComplete();\n\t\t\t// Step 2: aktuelle orig_uid herausfinden\n\t\t\t$orig_uid = intval($this->getUid());\t// ist immer die original uid (nicht vom übersetzten Element!)\n\t\t\tif ($lang > 0 && $catMode == 0) {\n\t\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t'uid',\n\t\t\t\t\t\t'tx_camaliga_domain_model_content',\n\t\t\t\t\t\t'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang . ' AND t3_origuid=' . $orig_uid);\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4))\n\t\t\t\t\t\tif ($row['uid']) {\n\t\t\t\t\t\t\t$orig_uid = intval($row['uid']);\t// uid of the translated element\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t\t}\n\t\t\t// Step 3: get the mm-categories of the current element (from the original or translated element)\n\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'uid_local',\n\t\t\t\t'sys_category_record_mm',\n\t\t\t\t\"tablenames='tx_camaliga_domain_model_content' AND uid_foreign=\" . $orig_uid);\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){\n\t\t\t\t\t$uid = $row['uid_local'];\n\t\t\t\t\tif (!isset($all_cats[$uid]['parent'])) continue;\n\t\t\t\t\t$parent = (int) $all_cats[$uid]['parent'];\n\t\t\t\t\t//if (!$all_cats[$parent]['title'])\tcontinue;\n\t\t\t\t\tif (!isset($cats[$parent])) {\n\t\t\t\t\t\t$cats[$parent] = array();\n\t\t\t\t\t\t$cats[$parent]['childs'] = array();\n\t\t\t\t\t\t$cats[$parent]['title'] = $all_cats[$parent]['title'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($all_cats[$uid]['title'])\n\t\t\t\t\t\t$cats[$parent]['childs'][$uid] = $all_cats[$uid]['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t}\n\t\treturn $cats;\n\t}", "function lb_get_root_category($product_id) {\n $prod_terms = get_the_terms( $product_id, 'product_cat' );\n \n foreach ($prod_terms as $prod_term) {\n // gets product cat id\n $product_cat_id = $prod_term->term_id;\n\n // gets an array of all parent category levels\n $product_parent_categories_all_hierachy = get_ancestors( $product_cat_id, 'product_cat' ); \n \n // This cuts the array and extracts the last set in the array\n $last_parent_cat = array_slice($product_parent_categories_all_hierachy, -1, 1, true);\n \n foreach($last_parent_cat as $last_parent_cat_value){\n // $last_parent_cat_value is the id of the most top level category, can be use whichever one like\n }\n }\n \n $category = &get_category((int)$last_parent_cat_value);\n \n if(isset($category->slug)) {\n return $category->slug;\n } else {\n return '';\n } \n}", "public static function getCategoriesByParentId($parentId = 0) {\n return Catalog::category()->where('category_id', '=', $parentId)->orderBy('weight')->orderBy('name')->all();\n }", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "function get_category_array() {\n $args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n );\n return get_categories($args);\n}", "public function actionCategory($parent=null)\n {\n if($parent === 0 || $parent == null) {\n $query = Category::find()->where('ID != 1 && PARENTID=0')->all();\n \n return $this->render('category', [\n \t\t'model' => $query,\n ]);\n } else {\n \t$q = new CategoryList();\n \t$q->traverseBackToRoot($parent);\n $query = Category::find()->where('ID != 1 && PARENTID='.$parent)->all();\n\n\t return $this->render('category', [\n\t 'model' => $query, 'cattraverse' => $q->CList,\n\t ]);\n }\n }", "function cl_woo_get_cat_filter_children( $parent_term_id = null ) {\n\n\t$output = array();\n\t$child_terms = null;\n\n\t//Get children of this term\n\t$child_terms = Prso_Woocom::get_product_terms(\n\t\tarray(\n\t\t\t'parent' => $parent_term_id,\n\t\t)\n\t);\n\n\tif ( isset( $child_terms->terms ) && ! empty( $child_terms->terms ) ) {\n\n\t\tforeach ( $child_terms->terms as $key => $grandchild_term ) {\n\n\t\t\t$child_terms->terms[ $key ]->children = cl_woo_get_cat_filter_children( $grandchild_term->term_id );\n\n\t\t}\n\n\t\t$output = $child_terms->terms;\n\n\t}\n\n\treturn $output;\n}", "public function GetChildCategories()\n\t\t{\n\t\t\t$categoryId = $this->GetCatId();\n\t\t\t$childCatsCache = $GLOBALS['ISC_CLASS_DATA_STORE']->Read('ChildCategories');\n\n\t\t\t// The cache has a cached version of the children for this category so just return it\n\t\t\tif(isset($childCatsCache[$categoryId])) {\n\t\t\t\treturn explode(',', $childCatsCache[$categoryId]);\n\t\t\t}\n\n\t\t\tif(!is_array($childCatsCache)) {\n\t\t\t\t$childCatsCache = array();\n\t\t\t}\n\n\t\t\t$childCats = array();\n\t\t\t$query = \"\n\t\t\t\tSELECT categoryid\n\t\t\t\tFROM [|PREFIX|]categories\n\t\t\t\tWHERE CONCAT(',', catparentlist, ',') LIKE '%,\".(int)$categoryId.\",%' AND categoryid!='\".(int)$categoryId.\"'\n\t\t\t\";\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile($child = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$childCats[] = $child['categoryid'];\n\t\t\t}\n\t\t\t$childCatsCache[$categoryId] = implode(',', $childCats);\n\t\t\t$GLOBALS['ISC_CLASS_DATA_STORE']->Save('ChildCategories', $childCatsCache);\n\t\t\treturn $childCats;\n\t\t}", "public function foodbakery_restaurant_parent_categories($category_id) {\n $parent_cate_array = '';\n $category_obj = get_term_by('id', $category_id, 'restaurant-category');\n if (isset($category_obj->parent) && $category_obj->parent != '0') {\n $parent_cate_array .= $this->foodbakery_restaurant_parent_categories($category_obj->parent);\n }\n $parent_cate_array .= isset($category_obj->slug) ? $category_obj->slug . ',' : '';\n return $parent_cate_array;\n }", "public function testCategoriesAreFilteredByParent()\n {\n $visibleCategory = factory(Category::class)->create();\n $notVisibleCategory = factory(Category::class)->create();\n\n $visibleCategory->parent()->associate(factory(Category::class)->create());\n $visibleCategory->save();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('categories?filter[categories.parent_id]='.$visibleCategory->parent->id)\n ->assertSuccessful()\n ->assertSee(route('categories.edit', $visibleCategory))\n ->assertDontSee(route('categories.edit', $notVisibleCategory));\n }", "function get_the_category_list($separator = '', $parents = '', $post_id = \\false)\n {\n }", "public static function getChildCategories($parent_id)\n {\n $categories = self::find()->where(['parent_id' => $parent_id])->all();\n return ArrayHelper::map($categories, 'id', 'name');\n }", "public function category()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "public function getCategories();", "public function getCategories();", "public function getParents() {}", "public function get_cat_array($parent_id = 0)\n {\n $category = (new \\yii\\db\\Query())->select(['pcate_id', 'pcate_name', 'parent_id'])->from('lg_position_category')->all();\n\n $arr = array();\n //var_dump($category);die;\n foreach ($category as $k => $row) {\n // 对每个分类进行循环。\n if ($category[$k]['parent_id'] == $parent_id) {\n //如果有子类\n $row['child'] = $this->get_cat_array($category[$k]['pcate_id']);\n //调用函数,传入参数,继续查询下级\n $arr[] = $row; //组合数组\n }\n }\n return $arr;\n }", "function getparent(){\r\n\tglobal $con;\r\n\t$getAll = $con->prepare(\"SELECT * FROM categories WHERE parent = 0 ORDER BY ID ASC\");\r\n\t$getAll->execute();\t\r\n\t$parent = $getAll->fetchAll();\r\n\treturn $parent;\r\n}", "public function categoryList()\n {\n $data = [];\n $categories = Category::where('parent', 0)->get();\n if($categories){\n $data = ['status' => true, 'code' => 200, 'data'=>$categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "public function updateCategoriesByParent()\n {\n global $config, $rlListingTypes;\n\n if (!$config['cache']) {\n return false;\n }\n\n if ($rlListingTypes->types) {\n foreach ($rlListingTypes->types as $key => $value) {\n $out[$value['Key']] = $this->getChildCat(array(0), $value);\n }\n $this->set('cache_categories_by_parent', $out);\n }\n }", "function getParentOfParentId($i_ParentOfParent, $i_shop)\r\n {\r\n $i_parentOfParent = $this->oMySQL->executeSQL(\"select dd.magentoCatId from tbl_katneu aa\r\n left join test.tbl_magentoCategory bb on bb.wawiCatId = aa.kategorie and bb.shop = $i_shop\r\n left join test.tbl_magentoCategory dd on dd.wawiCatId = aa.parent and dd.shop = $i_shop\r\n where aa.kategorie in( \".$i_ParentOfParent.\" ) limit 1\");\r\n if ($i_parentOfParent) {\r\n return $i_parentOfParent;\r\n }\r\n return false;\r\n }", "private function categoryTree($parent_id = 0, $sub_mark = '')\n {\n $query = DB::table('category')\n ->select('*')\n ->where('parent_id',$parent_id)\n ->get()\n ->pluck('cat_name','id');\n\n \n foreach ($query as $id => $value)\n {\n //echo $key.\" : \".$sub_mark.$value.\"</br>\";\n array_push($this->categories, $sub_mark.$value.':'.$id);\n $this->categoryTree($id, $sub_mark.'---');\n }\n return $this->categories;\n }", "public function getAllCategories()\n {\n return $this->AllChildren()->filter('ClassName', PortfolioCategory::class);\n }", "public function parent_category()\n {\n return $this->belongsTo(Category::class);\n }", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}" ]
[ "0.8241106", "0.80656826", "0.7721613", "0.76219827", "0.7516852", "0.75166065", "0.7508327", "0.7327596", "0.72452265", "0.72415334", "0.7238069", "0.718599", "0.71627456", "0.7108079", "0.6898846", "0.68768287", "0.6861745", "0.68567145", "0.68544215", "0.68466514", "0.68141645", "0.68042666", "0.6802909", "0.67944306", "0.6754205", "0.6751774", "0.67478657", "0.67209834", "0.6707103", "0.6702547", "0.66973656", "0.66877633", "0.6683154", "0.6671718", "0.6669344", "0.66512644", "0.6646602", "0.6646602", "0.6636854", "0.66347724", "0.6615416", "0.6605711", "0.6598947", "0.6598181", "0.6596916", "0.658705", "0.65835416", "0.6576364", "0.65633327", "0.65582156", "0.6555665", "0.6534637", "0.65281236", "0.6516906", "0.65164274", "0.6510017", "0.6484981", "0.64837146", "0.6479151", "0.64706695", "0.64699733", "0.6464394", "0.64579237", "0.6443599", "0.6436184", "0.64283115", "0.64271355", "0.64264464", "0.6421404", "0.64194375", "0.6417185", "0.64116246", "0.6405217", "0.64029264", "0.64017224", "0.64011234", "0.639605", "0.6388848", "0.6386346", "0.63846976", "0.6342163", "0.6340596", "0.63365096", "0.6334738", "0.6334488", "0.63329875", "0.632767", "0.63231486", "0.63231486", "0.6323144", "0.6320781", "0.63168925", "0.63168585", "0.6315547", "0.63125086", "0.6302889", "0.62987643", "0.62949234", "0.629141", "0.62826407" ]
0.64809835
58
This function returns all the testcases inside one parent category and their subcategories
function getAllTestCasesInsideCategory($parentCategoryID, $clientID) { global $definitions; //get item type $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID); //get property $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID); //get all categories inside $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID); $toFilter = implode(',', $allCategories); //When we have all the categories inside, get their test cases //Create the filter // build return properties array $returnProperties = array(); //build an empty filter $filters = array(); $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN'); $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties); //Get only the testCategories ids $onlyIds = array(); foreach ($testCases as $tcas) { $onlyIds[] = $tcas['ID']; } return $onlyIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function getTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function getParentCategoriesForTestCase($testCaseID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //First, get the parent test category for the test case\n $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID);\n\n //return all categories\n return getParentCategoriesForCategory($categoryID, $clientID);\n}", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "function getParentCategoriesForCategory($categoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //start loop with passed category\n $aux = $categoryID;\n\n $categoriesArray = array();\n\n //search parent category until 0 level reached\n while ($aux != 0) {\n $categoriesArray[] = $aux;\n $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID);\n }\n\n //return categories array\n return $categoriesArray;\n}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch, $clientID) {\n global $definitions;\n\n $testcasesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n $testcasesNamePropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesName'], $clientID);\n $testcasesOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesOrder'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n $returnProperties[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'name' => 'testCategoryParentID');\n $returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n //Next, clear all the test cases that are not inside the relation\n $appliedTestCases = array();\n for ($i = 0; $i < count($testCases); $i++) {\n if (in_array($testCases[$i]['ID'], $idsToSearch)) {\n $appliedTestCases[] = $testCases[$i];\n }\n }\n //And return the testCases\n return ($appliedTestCases);\n}", "public function testGetByParent() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get the categories\n $categories = $this->kb_category->get_by_parent( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch){\n\n\tglobal $clientID,$categoriesItemTypeID,$categoryParentPropertyID,$testcasesItemTypeID,$testCasesCategoryPropertyID,$testcasesNamePropertyID,$testcasesOrderPropertyID,$inDebug;\n\n\t// build return properties array\n\t$returnProperties = array();\n\t$returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n\t$returnProperties[] = array('ID' => $testCasesCategoryPropertyID, 'name' => 'testCategoryParentID');\n\t$returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n\t//build the filter\n\t$filters = array();\n\t$filters[] = array('ID' => $testCasesCategoryPropertyID, 'value' => $parentCategoryID);\n\n\t$testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n\t//Next, save only the test cases that are inside the relation\n\t$resultTC = array();\n\tfor ($i=0;$i<count($testCases);$i++){\n\t\tforeach ($idsToSearch as $rel){\n\t\t\tif ($testCases[$i]['ID']==$rel){\n\t\t\t\t//test found in relation, add to returning array\n\t\t\t\t$resultTC[]=$testCases[$i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t//And return the testCases\n\treturn($resultTC);\n}", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "function getAllTestCategoriesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentGroupID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryGroupID'], $clientID);\n\n //First, we need get all the categories that has the parent groupID\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentGroupID, 'value' => $groupID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "function getAllTestCasesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside group\n $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID);\n\n //Next, create a string with all the categories inside the group\n $toFilter = implode(',', $onlyIds);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($allTestCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "function getAllActiveChildCategoriesForSearch($parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$parent_id.\" ORDER BY \tsub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "public function testGetAllChildren() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get\n $categories = $this->kb_category->get_all_children( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "public function subCategorylist()\n {\n $data = [];\n $sub_categories = Category::where('parent', '!=' ,'0')->get();\n if(count($sub_categories)){\n $data = ['status' => true, 'code' => 200, 'data'=>$sub_categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public static function getSubCategories($parent_cat_id) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=$parent_cat_id\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "private function get_parent_categories(){\r\n\t\t$rslt = array();\r\n\r\n\t\t$args = array('taxonomy'=>'market_reports_category', 'hide_empty' => false, 'parent'=>0, 'orderby'=>'term_id','order'=>'ASC');\r\n\t\t$parent_cats = get_terms($args);\r\n\t\t// $rslt['-1'] = 'None';\r\n\t\t// wp_die(var_dump($parent_cats));\r\n\t\tforeach ($parent_cats as $key => $parent_cat) {\r\n\t\t\t$rslt[$parent_cat->term_id] = $parent_cat->name;\r\n\t\t}\r\n\t\t// rsort($rslt);\r\n\t\treturn $rslt;\r\n\t}", "public function subcategories()\n {\n return $this->hasMany(Category::class, 'parent_id')->where('status', 1);\n }", "function showParentCategoriesForSearch( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tcategory_title asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "public function testCategoriesAreFilteredByParent()\n {\n $visibleCategory = factory(Category::class)->create();\n $notVisibleCategory = factory(Category::class)->create();\n\n $visibleCategory->parent()->associate(factory(Category::class)->create());\n $visibleCategory->save();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('categories?filter[categories.parent_id]='.$visibleCategory->parent->id)\n ->assertSuccessful()\n ->assertSee(route('categories.edit', $visibleCategory))\n ->assertDontSee(route('categories.edit', $notVisibleCategory));\n }", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "function showParentCategories( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tsort_order asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }", "function get_sub_categories($category_ID)\n {\n $get_sub_category_query=site_query(\"select * from Category where parentID=\".$category_ID.\" order by displayOrder\",\"get_sub_categories()\",$dev);\n return $get_sub_category_query;\n }", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "public function getCategories($parent_id = 0) {\n\t\t$category_data = FALSE;\n\t\t\n\t\tif (! $category_data) {\n\t\t\t$category_data = array ();\n\t\t\t\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\tc.category_id,\r\n\t\t\t\t\tc.parent_id,\r\n\t\t\t\t\tcd.name,\r\n\t\t\t\t\t(SELECT COUNT(*) FROM `\" . DB_PREFIX . \"category` cc WHERE cc.parent_id = c.category_id) as children\r\n\t\t\tFROM `\" . DB_PREFIX . \"category` c\r\n\t\t\tLEFT JOIN `\" . DB_PREFIX . \"category_description` cd\r\n\t\t\t\tON (c.category_id = cd.category_id)\r\n\t\t\tWHERE c.parent_id = \" . ( int ) $parent_id . \"\r\n\t\t\tAND c.status = 1\r\n\t\t\tAND cd.language_id = \" . ( int ) $this->config->get ( 'config_language_id' ) . \"\r\n\t\t\tORDER BY c.sort_order, cd.name ASC\";\n\t\t\t\n\t\t\t$query = $this->db->query ( $sql );\n\t\t\t\n\t\t\tforeach ( $query->rows as $result ) {\n\t\t\t\t$category_data [] = array (\n\t\t\t\t\t\t'category_id' => $result ['category_id'],\n\t\t\t\t\t\t'parent_id' => $result ['parent_id'],\n\t\t\t\t\t\t'name' => $result ['name'],\n\t\t\t\t\t\t'children' => $result ['children'],\n\t\t\t\t\t\t'disabled' => ((in_array ( $result ['category_id'], $this->config->get ( 'msconf_restrict_categories' ) ) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 1 && $result ['parent_id'] == 0) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 2 && $result ['children'] > 0)) ? TRUE : FALSE) \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// Recursive call of the function and merge of all the categories together\n\t\t\t\t$category_data = array_merge ( $category_data, $this->getCategories ( $result ['category_id'] ) );\n\t\t\t}\n\t\t\t\n\t\t\t// $this->cache->set('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id, $category_data);\n\t\t}\n\t\t\n\t\t// The first calls of the function (for the root categories), where indentation takes place\n\t\tif ($parent_id == 0) {\n\t\t\t$category_data_indented = array ();\n\t\t\tforeach ( $category_data as $category ) {\n\t\t\t\t$category_data_indented [] = array (\n\t\t\t\t\t\t'category_id' => $category ['category_id'],\n\t\t\t\t\t\t'name' => str_repeat ( '&nbsp;&nbsp;&nbsp;', $this->_getDepth ( $category_data, $category ['category_id'] ) ) . $category ['name'],\n\t\t\t\t\t\t'parent_id' => $category ['parent_id'],\n\t\t\t\t\t\t'children' => $category ['children'],\n\t\t\t\t\t\t'disabled' => $category ['disabled'] \n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $category_data_indented;\n\t\t}\n\t\t\n\t\treturn $category_data;\n\t}", "public function run()\n {\n $categories =\n [\n [\n 'id' => 1,\n 'title' => 'product',\n 'slug' => 'product',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'title' => 'post',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 3,\n 'title' => 'DRIED FRUITS',\n 'slug' => 'dried-fruits',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'title' => 'HERBS&SPICES',\n 'slug' => 'herb-and-spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'title' => 'WHOLEFOODS & LEGUMES',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'title' => 'NUTS',\n 'slug' => 'nuts',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 7,\n 'title' => 'TEAS',\n 'slug' => 'teas',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'title' => 'Raw Almonds',\n 'slug' => 'raw-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 9,\n 'title' => 'Roasted Almonds',\n 'slug' => 'roasted-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 10,\n 'title' => 'Walnut',\n 'slug' => 'walnut',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 11,\n 'title' => 'Pumpkin Seeds',\n 'slug' => 'pumpkin-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 12,\n 'title' => 'Sunflower Seeds',\n 'slug' => 'sunflower-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 13,\n 'title' => 'Fruit Tea',\n 'slug' => 'fruit-tea',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 7,\n ],\n [\n 'id' => 14,\n 'title' => 'Yellow Apricot',\n 'slug' => 'yellow-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 15,\n 'title' => 'Natural Brown Apricot',\n 'slug' => 'natural-brown-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 16,\n 'title' => 'Herbs',\n 'slug' => 'herbs',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 17,\n 'title' => 'Spices',\n 'slug' => 'spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 18,\n 'title' => 'Cinnamon Powder',\n 'slug' => 'cinnamon-powder',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 19,\n 'title' => 'Cinnamon Sticks',\n 'slug' => 'cinnamon-sticks',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 20,\n 'title' => 'Paprika',\n 'slug' => 'paprika',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 17,\n ],\n\n ];\n\n\n Category::insert($categories);\n //Category::factory(1)->create();\n }", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }", "public function findCategories();", "public function testGetItemSubCategoryByFilter()\n {\n }", "public function testListCategories()\n {\n }", "function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}", "public function getSearchData($parentCategory = 2);", "public function run()\n {\n\n $categories = [\n ['name'=>'Electronics','is_parent'=>1], //1\n ['name'=>'Mobile','parent_id'=>1], //2\n ['name'=>'Tablets','parent_id'=>1], \n ['name'=>'Laptops','parent_id'=>1], \n \n ['name'=>'kitchn','is_parent'=>true], //5\n ['name'=>'cup','parent_id'=>5], //4\n ['name'=>'furniture','parent_id'=>5], //4\n\n ['name'=>'Personal Care','is_parent'=>true], //8\n ['name'=>'Mens grooming','parent_id'=>8], //4\n ['name'=>'Foundation','parent_id'=>8], //4\n\n ['name'=>'Grocery & Pets','is_parent'=>true], //11\n ['name'=>'Beverages','parent_id'=>11], //4\n ['name'=>'Breakfast','parent_id'=>11], //4\n \n ];\n foreach($categories as $category){\n Category::create([\n 'name'=>$category['name'],\n 'slug'=>Str::slug($category['name']),\n 'is_parent'=>$category['is_parent'] ?? 0,\n 'parent_id'=>$category['parent_id'] ?? null\n ]);\n }\n\n // $categories = [\n // [\n // 'name' => 'Electronics',\n // 'subCategory' => ['Mobile', 'Tablets', 'Laptops', 'Desktops', 'Televisions', 'Gaming Consoles', 'Printers']\n // ],\n // [\n // 'name' => 'Electronic Accessories',\n // 'subCategory' => ['Phone Cases', 'Chargers', 'Headphones', 'SmartWatches', 'BlueTooth Speakers', 'Screen protectors']\n // ],\n // [\n // 'name' => 'Personal Care',\n // 'subCategory' => ['Mens grooming', 'Mens grooming', 'Foundation', 'Deodrants', 'Female hygiene', 'Soap handwash', 'Skin care', 'Hair care']\n // ],\n // [\n // 'name' => 'Babys & Toys',\n // 'subCategory' => ['Disposable Diapers', 'Baby Gear', 'Personal Care', 'Toys & Games']\n // ],\n // [\n // 'name' => 'Grocery & Pets',\n // 'subCategory' => ['Beverages', 'Breakfast', 'Fruits', 'Vegetables', 'Pet Food', 'Daily Food']\n // ],\n // [\n // 'name' => 'Home & Lifestyle',\n // 'subCategory' => ['Bath', 'Bedding', 'Decor', 'Furniture', 'Appliances & Electicals', 'Kitchen Utensils']\n // ],\n // [\n // 'name' => 'Sports & Outdoors',\n // 'subCategory' => ['Mens Collections', 'Womens Collections', 'Exercise & Fitness', 'Travel & Luggage']\n // ],\n // [\n // 'name' => 'AutoMotive & Motorbike',\n // 'subCategory' => ['Auto Motive', 'Motorcycle', 'Moto Parts & Accessories', 'Riding gear']\n // ],\n // ];\n\n // foreach ($categories as $category) {\n\n // $newCategory = Category::create([\n // 'category_name' => $category['name'],\n // ]);\n // foreach ($category['subCategory'] as $item) {\n // $subcategory = SubCategory::create([\n // 'category_id' => $newCategory->id,\n // 'subCategory_name' => $item,\n // ]);\n // }\n // }\n }", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "public function Categorylist()\n{\n $CI = & get_instance();\n $CI->load->model(array('Common_model'));\n $data['categories'] = $CI->Common_model->get_category(0,0,0,1,1);//(1,1)//(getting only parent is vechicles,show_in_navigation_menu is yes)\n //echo $CI->db->last_query();\n return $data;\n}", "public function getCategories($parent_id) {\n// if (!$category_data) {\n\t$category_data = array();\n\n\t$rows = Make::a('catalog/category')\n\t\t->table_alias('c')\n\t\t->select_expr('c.category_id,c.ref_category_code,c.status,c.sort_order')\n\t\t->left_outer_join('category_description', array('c.category_id', '=', 'cd.category_id'), 'cd')\n\t\t->where('c.parent_id', $parent_id)\n\t\t->where('cd.language_id', QS::app()->config->get('config_language_id'))\n\t\t->order_by_asc('c.sort_order')\n\t\t->order_by_asc('cd.name')\n\t\t->find_many(true);\n\n\tforeach ($rows as $result) {\n\t $category_data[] = array(\n\t\t'category_id' => $result['category_id'],\n\t\t'ref_category_code' => $result['ref_category_code'],\n\t\t'name' => $this->getPath($result['category_id']),\n\t\t'status' => $result['status'],\n\t\t'sort_order' => $result['sort_order']\n\t );\n\n\t $category_data = array_merge($category_data, $this->getCategories($result['category_id']));\n\t}\n\n// QS::app()->cache->set('category.' . QS::app()->config->get('config_language_id') . '.' . $parent_id, $category_data);\n//}\n\n\treturn $category_data;\n }", "private function get_category_by_parent($parent){\n $query = DB::table('ps_category as a')\n ->select('a.id_category','b.name')\n ->join('ps_category_lang as b','a.id_category','b.id_category')\n ->where('a.id_parent',$parent)\n ->where('a.active',1)\n ->groupBy('a.id_category')\n ->get();\n return $query;\n }", "public function subCategories()\n {\n return $this->belongsToMany(Category::class, 'solution_categories', 'solution_id', 'category_id')->isChild();\n }", "public function allSubCategory() {\n return $this->db->get_where('r_category',array('subCategory !='=>0))->result_array();\n }", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "function get_subcategories($categoryid) {\r\n global $DB;\r\n\r\n $subcategories = $DB->get_records('question_categories', array('parent' => $categoryid), 'id');\r\n\r\n foreach ($subcategories as $subcategory) {\r\n $subcategories = array_merge($subcategories, get_subcategories($subcategory->id));\r\n }\r\n\r\n return $subcategories;\r\n}", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}", "public function getCategoriesForSettings() {\n \n $qb = $this->_em->createQueryBuilder();\n $qb->select('c')\n ->from('ABOMainBundle:Category', 'c')\n ->join('c.parent', 'p')\n ->addSelect('p')\n ->where('c.level = :level')\n ->setParameter('level', 2);\n \n return $qb->getQuery()->getResult();\n }", "public function testGetItemSubCategoryById()\n {\n }", "public function run()\n {\n Category::create([\n 'name' => 'Imunitet',\n 'slug' => 'imunitet'\n \n ]);\n Category::create([\n 'name' => 'Bebi Program',\n 'slug' => 'bebi-program'\n ]);\n Category::create([\n 'name' => 'Mršavljenje',\n 'slug' => 'mrsavljenje'\n ]);\n Category::create([\n 'name' => 'Kozmetika',\n 'slug' => 'kozmetika'\n ]);\n Category::create([\n 'name' => 'Potencija',\n 'slug' => 'potencija'\n ]);\n \n // Subcategories \n Category::create([\n 'name' => 'Vitamini',\n 'slug' => 'imunitet-vitamini',\n 'parent_id' => 1\n ]);\n Category::create([\n 'name' => 'Minerali',\n 'slug' => 'imunitet-minerali',\n 'parent_id' => 1\n ]);\n Category::create([\n 'name' => 'Čajevi',\n 'slug' => 'imunitet-cajevi',\n 'parent_id' => 1\n ]); \n Category::create([\n 'name' => 'Vitamini',\n 'slug' => 'bebi-program-vitamini',\n 'parent_id' => 2\n ]);\n Category::create([\n 'name' => 'Minerali',\n 'slug' => 'bebi-program-minerali',\n 'parent_id' => 2\n ]);\n Category::create([\n 'name' => 'Čajevi',\n 'slug' => 'bebi-program-cajevi',\n 'parent_id' => 2\n ]); \n Category::create([\n 'name' => 'Vitamini',\n 'slug' => 'mrsavljenje-vitamini',\n 'parent_id' => 3\n ]);\n Category::create([\n 'name' => 'Minerali',\n 'slug' => 'mrsavljenje-minerali',\n 'parent_id' => 3\n ]);\n Category::create([\n 'name' => 'Čajevi',\n 'slug' => 'mrsavljenje-cajevi',\n 'parent_id' => 3\n ]); \n Category::create([\n 'name' => 'Vitamini',\n 'slug' => 'kozmetika-vitamini',\n 'parent_id' => 4\n ]);\n Category::create([\n 'name' => 'Minerali',\n 'slug' => 'kozmetika-minerali',\n 'parent_id' => 4\n ]);\n Category::create([\n 'name' => 'Čajevi',\n 'slug' => 'kozmetika-cajevi',\n 'parent_id' => 4\n ]); \n Category::create([\n 'name' => 'Vitamini',\n 'slug' => 'potencija-vitamini',\n 'parent_id' => 5\n ]);\n Category::create([\n 'name' => 'Minerali',\n 'slug' => 'potencija-minerali',\n 'parent_id' => 5\n ]);\n Category::create([\n 'name' => 'Čajevi',\n 'slug' => 'potencija-cajevi',\n 'parent_id' => 5\n ]); \n }", "public function run()\n {\n /*-------------------------------------------*/\n Category::create([ //root id:1\n 'parent_id' => null,\n 'name' => 'programming languages'\n ]);\n Category::create([ //id:2\n 'parent_id' => 1,\n 'name' => 'web'\n ]);\n Category::create([ //id:3\n 'parent_id' => 1,\n 'name' => 'mobile'\n ]);\n Category::create([ //web //id:4\n 'parent_id' => 2, //parent:web\n 'name' => 'php'\n ]);\n Category::create([ //web //id:5\n 'parent_id' => 2, //parent:web\n 'name' => 'html'\n ]);\n Category::create([ //web //id:6\n 'parent_id' => 2, //parent:web\n 'name' => 'css'\n ]);\n Category::create([ //mobile //id:7\n 'parent_id' => 3, //parent:mobile\n 'name' => 'flutter'\n ]);\n Category::create([ //mobile //id:8\n 'parent_id' => 3, //parent:mobile\n 'name' => 'java'\n ]);\n Category::create([ //php //id:9\n 'parent_id' => 4, //parent:web\\php\n 'name' => 'laravel'\n ]);\n Category::create([ //php //id:10\n 'parent_id' => 4, //parent:web\\php\n 'name' => 'lumen'\n ]);\n\n /*-------------------------------------------*/\n\n Category::create([ //root id:11\n 'parent_id' => null, //parent\n 'name' => 'multimedia'\n ]);\n\n Category::create([ //images id:12\n 'parent_id' => 11, //parent:multimedia\n 'name' => 'images'\n ]);\n Category::create([ //sounds id:13\n 'parent_id' => 11, //parent:multimedia\n 'name' => 'sounds'\n ]);\n\n Category::create([ //root id:14\n 'parent_id' => 12, //parent:multimedia\\images\\\n 'name' => 'gif'\n ]);\n Category::create([ //root id:15\n 'parent_id' => 12, //parent:multimedia\\images\\\n 'name' => 'png'\n ]);\n Category::create([ //root id:16\n 'parent_id' => 12, //parent:multimedia\\images\\\n 'name' => 'jpg'\n ]);\n Category::create([ //root id:17\n 'parent_id' => 12, //parent:multimedia\\images\\\n 'name' => 'bmp'\n ]);\n\n Category::create([ //root id:18\n 'parent_id' => 13, //parent:multimedia\\sounds\n 'name' => 'ogg'\n ]);\n Category::create([ //root id:19\n 'parent_id' => 13, //parent:multimedia\\sounds\n 'name' => 'mp3'\n ]);\n\n\n }", "function createTree($categories)\n{\n $tree = [];\n\n foreach ($categories as $category) {\n if (empty($category[\"parent_uid\"])) {\n $tree[] = $category;\n unset($category);\n }\n }\n\n // уровень вложенности 2\n foreach ($tree as &$itemTree) {\n foreach ($categories as $category) {\n /* if(!empty($category[\"parent_uid\"])) {\n print_r($itemTree);\n print_r($category);\n echo \"\\n\";\n echo \"tree:\\n\";\n print_r($itemTree[\"uid\"]);\n echo \"\\n category\";\n print_r($category[\"parent_uid\"]);\n exit();\n }*/\n if ($itemTree[\"uid\"] == $category[\"parent_uid\"]) {\n $itemTree[\"categories\"] = $category;\n unset($category);\n }\n }\n }\n\n return $tree;\n}", "public function getChildCat($parent = array(0), $type = false, $data = false)\n {\n global $rlDb;\n\n foreach ($parent as $parent_id) {\n $parent_id = (int) $parent_id;\n\n $sql = \"SELECT *, `Modified` \";\n $sql .= \"FROM `{db_prefix}categories` \";\n $sql .= \"WHERE `Type` = '{$type['Key']}' AND `Status` = 'active' AND `Parent_ID` = '{$parent_id}'\";\n if ($type['Cat_hide_empty']) {\n $sql .= \"AND `Count` > 0 \";\n }\n $sql .= \"ORDER BY `Position`\";\n\n if ($tmp_categories = $rlDb->getAll($sql)) {\n foreach ($tmp_categories as $cKey => $cValue) {\n $ids[] = $cValue['ID'];\n\n $categories[$cValue['ID']] = $cValue;\n $categories[$cValue['ID']]['pName'] = 'categories+name+' . $cValue['Key'];\n $categories[$cValue['ID']]['pTitle'] = 'categories+title+' . $cValue['Key'];\n\n /* get subcategories */\n if ($type['Cat_show_subcats']) {\n // TODO - add this condition in output if needs\n $rlDb->calcRows = true;\n $subCategories = $rlDb->fetch(array('ID', 'Count', 'Path`, CONCAT(\"categories+name+\", `Key`) AS `pName`, CONCAT(\"categories+title+\", `Key`) AS `pTitle', 'Key'), array('Status' => 'active', 'Parent_ID' => $cValue['ID']), \"ORDER BY `Position`\", null, 'categories');\n $rlDb->calcRows = false;\n\n if (!empty($subCategories)) {\n $categories[$cValue['ID']]['sub_categories'] = $subCategories;\n $categories[$cValue['ID']]['sub_categories_calc'] = $rlDb->foundRows;\n }\n\n unset($subCategories);\n }\n }\n unset($tmp_categories);\n\n $data[$parent_id] = $categories;\n\n unset($categories);\n } else {\n continue;\n }\n }\n\n if ($parent) {\n return $this->getChildCat($ids, $type, $data);\n } else {\n return $data;\n }\n }", "public function run()\n\t{\n\t\t$now = date('Y-m-d H:i:s');\n\t\t$subcategories = [\n\t\t\t[\n\t\t\t\t'id' => 1,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Rules',\n\t\t\t\t'subcatDescription' => 'Here are the rules',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 2,\n\t\t\t\t'catid' => 1,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'More Rules',\n\t\t\t\t'subcatDescription' => 'Another subcat',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 3,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'Buttons',\n\t\t\t\t'subcatDescription' => 'About buttons',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 4,\n\t\t\t\t'catid' => 3,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Wells',\n\t\t\t\t'subcatDescription' => 'About wells',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 5,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 2,\n\t\t\t\t'subcatTitle' => 'Models',\n\t\t\t\t'subcatDescription' => 'stupid things...',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t],\n\t\t\t[\n\t\t\t\t'id' => 6,\n\t\t\t\t'catid' => 4,\n\t\t\t\t'userid' => 1,\n\t\t\t\t'subcatTitle' => 'databases',\n\t\t\t\t'subcatDescription' => 'eloquent is weird',\n\t\t\t\t'subcatTotalposts' =>1,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t]\n\t\t];\n\t\t\n\t\tDB::table('subcategories')->insert($subcategories);\n\n\t}", "public function getCategories()\n {\n $categories = ClassInfo::subclassesFor('ConsultationCategory');\n return $this->Children()->filter('Classname', $categories);\n }", "function showChildCategories($category_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$category_id.\" order by sub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "function get_parent_cats($context) {\n global $COURSE;\n\n switch ($context->contextlevel) {\n // a category can be the parent of another category\n // there is no limit of depth in this case\n case CONTEXT_COURSECAT:\n static $categoryparents = null; // cache for parent categories\n if (!isset($categoryparents)) {\n $categoryparents = array();\n }\n if (array_key_exists($context->instanceid, $categoryparents)) {\n return $categoryparents[$context->instanceid];\n }\n\n if (!$cat = get_record('course_categories','id',$context->instanceid)) {\n //error?\n return array();\n }\n $parents = array();\n while (!empty($cat->parent)) {\n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $cat->parent)) {\n debugging('Incorrect category parent');\n break;\n }\n $parents[] = $catcontext->id;\n $cat = get_record('course_categories','id',$cat->parent);\n }\n return $categoryparents[$context->instanceid] = array_reverse($parents);\n break;\n \n // a course always fall into a category, unless it's a site course\n // this happens when SITEID == $course->id\n // in this case the parent of the course is site context\n case CONTEXT_COURSE:\n static $courseparents = null; // cache course parents\n if (!isset($courseparents)) {\n $courseparents = array();\n }\n if (array_key_exists($context->instanceid, $courseparents)) {\n return $courseparents[$context->instanceid];\n }\n\n if (count($courseparents) > 1000) {\n $courseparents = array(); // max cache size when looping through thousands of courses\n }\n if ($context->instanceid == SITEID) {\n return $courseparents[$context->instanceid] = array(); // frontpage course does not have parent cats\n }\n if ($context->instanceid == $COURSE->id) {\n $course = $COURSE;\n } else if (!$course = get_record('course', 'id', $context->instanceid)) {\n //error?\n return array();;\n }\n\n if (empty($course->category)) {\n // this should not happen\n return $courseparents[$context->instanceid] = array();\n }\n \n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $course->category)) {\n debugging('Incorect course category');\n return array();;\n }\n\n return $courseparents[$context->instanceid] = array_merge(get_parent_cats($catcontext), array($catcontext->id)); //recursion :-)\n break;\n\n default:\n // something is very wrong!\n return array();\n break;\n }\n}", "public function getAllTopLevelCat($cat_id, $needle) {\n// echo $cat_id;\n// echo \"\\ngetAllTopLevelCat 1 \";\n// echo $needle;\n// \n// echo \"\\ngetAllTopLevelCat 2 \";\n\n $basesql = \"SELECT c.category_id AS itemid, c.image AS imageurl, cd.NAME AS itemheading, cd.description AS itemdesc, c.parent_id, cd.icomoon AS icomoon_code\n\t\t\t\t\tFROM oc_category c \n\t\t\t\t\tLEFT JOIN oc_category_description cd ON c.category_id=cd.category_id \n\t\t\t\t\tWHERE c.category_id='\" . $cat_id . \"'\";\n\n $catdata = $this->queryRun($basesql, 'select');\n\n\n\n if (!empty($catdata)) {\n if ($catdata['parent_id'] == $needle) {\n// echo \"\\nin here\";\n// echo $catdata['parent_id'];\n// var_dump($catdata);\n\n return $catdata;\n } else {\n// echo \"\\nin else\";\n// echo $catdata['parent_id'];\n if ($catdata['parent_id'] != 0)\n $this->getAllTopLevelCat($catdata['parent_id'], $needle);\n }\n }\n }", "function get_subcategories_list() {\n $query = $this->db->get('subcategories');\n return $query->result_array();\n }", "function printCategory($parent_id, $role)\n{\n $cats = new Category();\n $cate = $cats->getByParentId($parent_id);\n if ($parent_id == 0) {\n\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a>';\n printCategory($r['id'], $role);\n echo '</li>';\n }\n }\n } else {\n //nếu là danh mục con\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n echo '<ul class=\"sub-menu\">';\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a></li>';\n }\n echo '</ul>';\n }\n }\n}", "public function subcategory()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->order_by($this->pro->category.'_parent','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent>',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "private function getCaseNodes(): array\n {\n $caseNodes = $this->xml->xpath('//testcase');\n $cases = [];\n foreach ($caseNodes as $node) {\n $caseFilename = (string) $node['file'];\n if (! isset($cases[$caseFilename])) {\n $cases[$caseFilename] = [];\n }\n\n $cases[$caseFilename][] = $node;\n }\n\n return $cases;\n }", "public function testGetItemSubCategoryTags()\n {\n }", "function getCategories($object) { \n\n $R1 = new Category(); // R1 --\n $R11 = new Category(); // | | - R11 --\n $R111 = new Category(); // | | - R111\n $R112 = new Category(); // | | - R112\n $R11->addSubcategory($R111); // |\n $R11->addSubcategory($R112); // |\n $R1->addSubcategory($R11); // |\n $R2 = new Category(); // R2 --\n $R21 = new Category(); // | - R21 --\n $R211 = new Category(); // | | - R211\n $R22 = new Category(); // |\n $R221 = new Category(); // | - R22 --\n $R21->addSubcategory($R211); // | - R221\n $R22->addSubcategory($R221);\n $R2->addSubcategory($R21);\n $R2->addSubcategory($R22);\n\n $object->addCollectionEntry($R1); \n $object->addCollectionEntry($R2); \n}", "private function categoryTree($parent_id = 0, $sub_mark = '')\n {\n $query = DB::table('category')\n ->select('*')\n ->where('parent_id',$parent_id)\n ->get()\n ->pluck('cat_name','id');\n\n \n foreach ($query as $id => $value)\n {\n //echo $key.\" : \".$sub_mark.$value.\"</br>\";\n array_push($this->categories, $sub_mark.$value.':'.$id);\n $this->categoryTree($id, $sub_mark.'---');\n }\n return $this->categories;\n }", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "public function get_sub_categories($parent_id) {\n $parent_id = $this->real_escape_string($parent_id);\n return $this->query(\"SELECT * FROM sub_cat WHERE parent_id = '\"\n . $parent_id . \"' order by id \");\n }", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public static function getDressSubacategories($parent_cat_id) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_dress_type_subcategory WHERE dress_type_category_id=$parent_cat_id\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n ?><ul><?php\n foreach ($result as $subcat) {\n ?>\n <li><a href=\"#\" data-typec=\"<?php echo $subcat->id ?>\"><?php echo $subcat->label ?></a></li>\n <?php\n }\n ?></ul><?php\n }\n }", "function getSubCategoryTab($parent, $ajax)\n{\n\t$ci =& get_instance();\n\t$sc = '';\n\t$qs = $ci->db->query(\"SELECT * FROM product_tab WHERE id_parent = \".$parent);\n\n\tif( $qs->num_rows() > 0 )\n\t{\n\t\tforeach( $qs->result() as $rs )\n\t\t{\n\t\t\tif( hasChild($rs->id) === TRUE ) //----- ถ้ามี sub category\n\t\t\t{\n\t\t\t\t$sc .= '<li class=\"dropdown-hover\" onmouseover=\"expandTab((this))\" onmouseout=\"collapseTab((this))\">';\n\t\t\t\t$sc .= '<a id=\"ul-'.$rs->id.'\" class=\"dropdown-toggle\" href=\"#cat-'.$rs->id.'\" data-toggle=\"tab\" onClick=\"'.$ajax.'(\\''.$rs->id.'\\')\">';\n\t\t\t\t$sc .= $rs->name.'</a>';\n\t\t\t\t$sc .= \t'<ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"ul-'.$rs->id.'\">';\n\t\t\t\t$sc .= \tgetSubTab($rs->id, $ajax);\n\t\t\t\t$sc .= '</ul>';\n\t\t\t\t$sc .= '</li>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sc .= '<li class=\"menu\"><a href=\"#cat-'.$rs->id.'\" role=\"tab\" data-toggle=\"tab\" onClick=\"'.$ajax.'(\\''.$rs->id.'\\')\">'.$rs->name.'</a></li>';\n\t\t\t}\n\n\t\t}\n\t}\n\treturn $sc;\n}", "public function getCategories();", "public function getCategories();", "public function getCategories() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE parent is null ORDER BY name ASC\");\n $stmt->setFetchMode(\\PDO::FETCH_CLASS, '\\App\\Model\\Category\\ProductCategoryModel');\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function get_sub_cat_list1($parentid,$subcatid){\n\t\t\n\t\t$parentid= trim($parentid);\n\t\t$subcatid= trim($subcatid);\n\t\t\n\t\treturn $this->db->query(\"select a.*,b.* from subcategory_name as a inner join subcategory as b on a.subcategory_name_id=b.subcategory_name_id where b.subcategory_name_id='$subcatid' and b.ParentCategory='$parentid'\")->result_array();\n\t\n\t\t\n\t}", "public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "public function showSubcategories(){\n return ArticleModel::showSubcategories();\n }", "public function all_parent_units()\n\t{\n\t\t$this->db->where('units_status = 1 AND units_parent = 0');\n\t\t$this->db->order_by('units_name', 'ASC');\n\t\t$query = $this->db->get('units');\n\t\t\n\t\treturn $query;\n\t}", "public function run()\n {\n $categories = [\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Gear', 'slug' => 'gear', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Parts', 'slug' => 'parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'Casual', 'slug' => 'casual', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 0, 'c_group' => 0, 'name' => 'News', 'slug' => 'news', 'sortorder' => 4, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Clothes', 'slug' => 'clothes', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Helmets', 'slug' => 'helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 1, 'name' => 'Boots', 'slug' => 'boots', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Suspension', 'slug' => 'suspension', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'maintenance', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 2, 'name' => 'Oils', 'slug' => 'oils', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'T-Sirts', 'slug' => 'tshirts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 1, 'c_group' => 3, 'name' => 'Caps', 'slug' => 'caps', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Jerseys', 'slug' => 'jerseys', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 5, 'c_group' => 1, 'name' => 'Pants', 'slug' => 'pants', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-helmets', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 6, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-helmets', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-boots', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 7, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-boots', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Fork', 'slug' => 'fork-parts', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 8, 'c_group' => 2, 'name' => 'Shock', 'slug' => 'shock-parts', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Airfilter', 'slug' => 'airfilter', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Oilfilter', 'slug' => 'oilfilter', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 9, 'c_group' => 2, 'name' => 'Brakepads', 'slug' => 'brakepads', 'sortorder' => 3, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Engine Oils', 'slug' => 'engine-oils', 'sortorder' => 1, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Suspension Oils', 'slug' => 'suspension-oils', 'sortorder' => 2, 'active' => 1],\n ['parent_id' => 10, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'bike-maintenance', 'sortorder' => 3, 'active' => 1],\n ];\n\n DB::table('categories')->insert($categories);\n }", "public function treeDataProvider()\n {\n $catData = [\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ],\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat422',\n 'active' => true,\n 'sort' => 1,\n 'left' => 6,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat5',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat6',\n 'active' => true,\n 'sort' => 1,\n 'left' => 9,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n ];\n\n $data = [];\n foreach ($catData as $category) {\n $data[$category['id']] = $this->buildCategory($category);\n }\n\n return [['data' => $data]];\n }", "public function subcategories(){\n return $this->hasMany(Category::class,'parent_category_id')->where('hidden', 0);\n }", "public function findChildren($id_parent){\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.parent', $queryBuilder->createNamedParameter($id_parent))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.sys_language_uid', $queryBuilder->createNamedParameter($GLOBALS['TSFE']->sys_language_uid, \\PDO::PARAM_INT))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.deleted', $queryBuilder->createNamedParameter(0))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.hidden', $queryBuilder->createNamedParameter(0))\n )\n ->execute();\n $list_cat=[];\n while ($row = $statement->fetch()) {\n\n $list= array(\n 'uid' => $row['uid'],\n 'title' => $row['title'],\n 'parent' => $row['parent'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n );\n array_push($list_cat, $list);\n }\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.uid', $queryBuilder->createNamedParameter($id_parent))\n )\n \n ->execute();\n while ($row = $statement->fetch()) {\n $list=array(\n 'uid' =>$row['uid'],\n 'title' =>$row['title'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n 'children' => $list_cat);\n }\n return $list;\n }", "function getCategories($categories, &$result, $parent_id = 0, $depth = 0)\n {\n $cats = $categories->filter(function ($item) use ($parent_id) {\n return $item->parent_id == $parent_id;\n });\n\n //loop through them\n foreach ($cats as $cat)\n {\n //add category. Don't forget the dashes in front. Use ID as index\n $result[$cat->id] = str_repeat('-', $depth) . ($depth ? ' ' : '') . $cat->name;\n //go deeper - let's look for \"children\" of current category\n $this->getCategories($categories, $result, $cat->id, $depth + 1);\n }\n }", "public function getSubCategoryList($category_id)\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_category');\r\n\t\t$this->db->where('category_status', '1');\r\n\t\t$this->db->where('category_parent_id', $category_id);\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function categoryList()\n {\n $data = [];\n $categories = Category::where('parent', 0)->get();\n if($categories){\n $data = ['status' => true, 'code' => 200, 'data'=>$categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getParentCategory() {\r\n\t\t$postID = $_POST['id'];\r\n\t\t$parentList = '<select id=\"ExpenseCategory[]\" class=\"form-control xxx ExpenseCategory exParentCat\" name=\"ExpenseParentCategory[]\">';\r\n\t\t$parentList .= '<option value=\"-1\" > Select Sub Category</option>'; \r\n\t\t$parentCat = getCategoryParent($_POST['CatType']); \r\n\t\tif( !empty( $parentCat ))\r\n\t\t{\r\n\t\t\tforeach($parentCat as $val){\r\n\t\t\t\tif( getCategoryParentId($postID) == $val->id)\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" selected=\"selected\"> '.$val->title.' </option>';\r\n\t\t\t\telse\t\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" > '.$val->title.' </option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$parentList .= '</select>'; \r\n\t\techo $parentList; \r\n\t}", "public function testAddItemSubCategory()\n {\n }" ]
[ "0.7586548", "0.73783547", "0.71820617", "0.7177901", "0.7008018", "0.6816272", "0.6548999", "0.65266335", "0.65198386", "0.6519264", "0.6501634", "0.64544076", "0.64261615", "0.62595737", "0.6247661", "0.61789495", "0.6156544", "0.6150775", "0.6107434", "0.6097609", "0.6072083", "0.6071978", "0.6052959", "0.60242385", "0.6023747", "0.59503275", "0.5943999", "0.59348845", "0.593227", "0.59275997", "0.5909146", "0.587012", "0.58692753", "0.5869238", "0.5861807", "0.5854358", "0.5850173", "0.58443636", "0.58329695", "0.58295614", "0.58272505", "0.58181417", "0.5804283", "0.58007985", "0.57843125", "0.5781609", "0.57770973", "0.57669765", "0.5763319", "0.5755832", "0.57518554", "0.5741047", "0.57369757", "0.57322234", "0.5711945", "0.570805", "0.57043153", "0.56994736", "0.5698376", "0.5670345", "0.5649734", "0.5645217", "0.56425303", "0.5636041", "0.5618614", "0.5615409", "0.56100696", "0.5606023", "0.5604991", "0.56024444", "0.5597627", "0.5597599", "0.5594909", "0.55926067", "0.559121", "0.55879515", "0.55863273", "0.55839914", "0.5560956", "0.5551322", "0.5546883", "0.5546664", "0.5543333", "0.5543333", "0.55398643", "0.55389106", "0.5525599", "0.55230236", "0.55064076", "0.55012995", "0.5497948", "0.549156", "0.54814863", "0.54811275", "0.5480673", "0.5472313", "0.54539835", "0.544996", "0.5449598", "0.5449543" ]
0.77038574
0
This function returns the testcases inside one parent category only (not subcategories)
function getTestCasesInsideCategory($parentCategoryID, $clientID) { global $definitions; //get item type $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID); //get property $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID); // build return properties array $returnProperties = array(); //build an empty filter $filters = array(); $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $parentCategoryID); $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties); //Get only the testCategories ids $onlyIds = array(); foreach ($testCases as $tcas) { $onlyIds[] = $tcas['ID']; } return $onlyIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside\n $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID);\n\n $toFilter = implode(',', $allCategories);\n\n //When we have all the categories inside, get their test cases\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "function getParentCategoriesForTestCase($testCaseID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //First, get the parent test category for the test case\n $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID);\n\n //return all categories\n return getParentCategoriesForCategory($categoryID, $clientID);\n}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public function testGetByParent() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get the categories\n $categories = $this->kb_category->get_by_parent( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "function getParentCategoriesForCategory($categoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //start loop with passed category\n $aux = $categoryID;\n\n $categoriesArray = array();\n\n //search parent category until 0 level reached\n while ($aux != 0) {\n $categoriesArray[] = $aux;\n $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID);\n }\n\n //return categories array\n return $categoriesArray;\n}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch, $clientID) {\n global $definitions;\n\n $testcasesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n $testcasesNamePropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesName'], $clientID);\n $testcasesOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesOrder'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n $returnProperties[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'name' => 'testCategoryParentID');\n $returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCaseParentTestCategoryPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n //Next, clear all the test cases that are not inside the relation\n $appliedTestCases = array();\n for ($i = 0; $i < count($testCases); $i++) {\n if (in_array($testCases[$i]['ID'], $idsToSearch)) {\n $appliedTestCases[] = $testCases[$i];\n }\n }\n //And return the testCases\n return ($appliedTestCases);\n}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch){\n\n\tglobal $clientID,$categoriesItemTypeID,$categoryParentPropertyID,$testcasesItemTypeID,$testCasesCategoryPropertyID,$testcasesNamePropertyID,$testcasesOrderPropertyID,$inDebug;\n\n\t// build return properties array\n\t$returnProperties = array();\n\t$returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n\t$returnProperties[] = array('ID' => $testCasesCategoryPropertyID, 'name' => 'testCategoryParentID');\n\t$returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n\t//build the filter\n\t$filters = array();\n\t$filters[] = array('ID' => $testCasesCategoryPropertyID, 'value' => $parentCategoryID);\n\n\t$testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n\t//Next, save only the test cases that are inside the relation\n\t$resultTC = array();\n\tfor ($i=0;$i<count($testCases);$i++){\n\t\tforeach ($idsToSearch as $rel){\n\t\t\tif ($testCases[$i]['ID']==$rel){\n\t\t\t\t//test found in relation, add to returning array\n\t\t\t\t$resultTC[]=$testCases[$i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t//And return the testCases\n\treturn($resultTC);\n}", "function showParentCategoriesForSearch( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tcategory_title asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function getAllTestCategoriesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentGroupID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryGroupID'], $clientID);\n\n //First, we need get all the categories that has the parent groupID\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentGroupID, 'value' => $groupID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "function getAllTestCasesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside group\n $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID);\n\n //Next, create a string with all the categories inside the group\n $toFilter = implode(',', $onlyIds);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($allTestCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function showParentCategories( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tsort_order asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function testCategoriesAreFilteredByParent()\n {\n $visibleCategory = factory(Category::class)->create();\n $notVisibleCategory = factory(Category::class)->create();\n\n $visibleCategory->parent()->associate(factory(Category::class)->create());\n $visibleCategory->save();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('categories?filter[categories.parent_id]='.$visibleCategory->parent->id)\n ->assertSuccessful()\n ->assertSee(route('categories.edit', $visibleCategory))\n ->assertDontSee(route('categories.edit', $notVisibleCategory));\n }", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "function getAllActiveChildCategoriesForSearch($parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$parent_id.\" ORDER BY \tsub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "private function get_parent_categories(){\r\n\t\t$rslt = array();\r\n\r\n\t\t$args = array('taxonomy'=>'market_reports_category', 'hide_empty' => false, 'parent'=>0, 'orderby'=>'term_id','order'=>'ASC');\r\n\t\t$parent_cats = get_terms($args);\r\n\t\t// $rslt['-1'] = 'None';\r\n\t\t// wp_die(var_dump($parent_cats));\r\n\t\tforeach ($parent_cats as $key => $parent_cat) {\r\n\t\t\t$rslt[$parent_cat->term_id] = $parent_cat->name;\r\n\t\t}\r\n\t\t// rsort($rslt);\r\n\t\treturn $rslt;\r\n\t}", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "public static function parentCategories()\n {\n return Category::with('children')\n ->orderBy('priority')\n ->where([\n 'category_type' => static::class,\n 'parent_id' => null,\n ])->get();\n }", "private function get_category_by_parent($parent){\n $query = DB::table('ps_category as a')\n ->select('a.id_category','b.name')\n ->join('ps_category_lang as b','a.id_category','b.id_category')\n ->where('a.id_parent',$parent)\n ->where('a.active',1)\n ->groupBy('a.id_category')\n ->get();\n return $query;\n }", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function get_parent_cat_info( $parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE category_id = \".$parent_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r != false )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "protected function parentCategoryTC()\n {\n return PostCategory::parentCategories()->firstOrFail();\n }", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "public function testCategoryCanNotBeItsOwnParent(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.parent_id', $items[0]->id)\n ->emit('save')\n ->assertHasErrors(['editValues.parent_id'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertEquals(0, $items[0]->fresh()->parent()->count());\n }", "public static function getSubCategories($parent_cat_id) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=$parent_cat_id\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}", "public function getSearchData($parentCategory = 2);", "public function getAllTopLevelCat($cat_id, $needle) {\n// echo $cat_id;\n// echo \"\\ngetAllTopLevelCat 1 \";\n// echo $needle;\n// \n// echo \"\\ngetAllTopLevelCat 2 \";\n\n $basesql = \"SELECT c.category_id AS itemid, c.image AS imageurl, cd.NAME AS itemheading, cd.description AS itemdesc, c.parent_id, cd.icomoon AS icomoon_code\n\t\t\t\t\tFROM oc_category c \n\t\t\t\t\tLEFT JOIN oc_category_description cd ON c.category_id=cd.category_id \n\t\t\t\t\tWHERE c.category_id='\" . $cat_id . \"'\";\n\n $catdata = $this->queryRun($basesql, 'select');\n\n\n\n if (!empty($catdata)) {\n if ($catdata['parent_id'] == $needle) {\n// echo \"\\nin here\";\n// echo $catdata['parent_id'];\n// var_dump($catdata);\n\n return $catdata;\n } else {\n// echo \"\\nin else\";\n// echo $catdata['parent_id'];\n if ($catdata['parent_id'] != 0)\n $this->getAllTopLevelCat($catdata['parent_id'], $needle);\n }\n }\n }", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function get_parent_cats($context) {\n global $COURSE;\n\n switch ($context->contextlevel) {\n // a category can be the parent of another category\n // there is no limit of depth in this case\n case CONTEXT_COURSECAT:\n static $categoryparents = null; // cache for parent categories\n if (!isset($categoryparents)) {\n $categoryparents = array();\n }\n if (array_key_exists($context->instanceid, $categoryparents)) {\n return $categoryparents[$context->instanceid];\n }\n\n if (!$cat = get_record('course_categories','id',$context->instanceid)) {\n //error?\n return array();\n }\n $parents = array();\n while (!empty($cat->parent)) {\n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $cat->parent)) {\n debugging('Incorrect category parent');\n break;\n }\n $parents[] = $catcontext->id;\n $cat = get_record('course_categories','id',$cat->parent);\n }\n return $categoryparents[$context->instanceid] = array_reverse($parents);\n break;\n \n // a course always fall into a category, unless it's a site course\n // this happens when SITEID == $course->id\n // in this case the parent of the course is site context\n case CONTEXT_COURSE:\n static $courseparents = null; // cache course parents\n if (!isset($courseparents)) {\n $courseparents = array();\n }\n if (array_key_exists($context->instanceid, $courseparents)) {\n return $courseparents[$context->instanceid];\n }\n\n if (count($courseparents) > 1000) {\n $courseparents = array(); // max cache size when looping through thousands of courses\n }\n if ($context->instanceid == SITEID) {\n return $courseparents[$context->instanceid] = array(); // frontpage course does not have parent cats\n }\n if ($context->instanceid == $COURSE->id) {\n $course = $COURSE;\n } else if (!$course = get_record('course', 'id', $context->instanceid)) {\n //error?\n return array();;\n }\n\n if (empty($course->category)) {\n // this should not happen\n return $courseparents[$context->instanceid] = array();\n }\n \n if (!$catcontext = get_context_instance(CONTEXT_COURSECAT, $course->category)) {\n debugging('Incorect course category');\n return array();;\n }\n\n return $courseparents[$context->instanceid] = array_merge(get_parent_cats($catcontext), array($catcontext->id)); //recursion :-)\n break;\n\n default:\n // something is very wrong!\n return array();\n break;\n }\n}", "public function testGetItemSubCategoryByFilter()\n {\n }", "public function testGetAllChildren() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get\n $categories = $this->kb_category->get_all_children( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "public function get_sub_by_parent_cat($parent_id = ''){\n\t\t$query = $this->db->get_where('sub_categories', array('\tparent_cat_id' => $parent_id));\n\t\treturn $query->result();\n\t}", "public function Categorylist()\n{\n $CI = & get_instance();\n $CI->load->model(array('Common_model'));\n $data['categories'] = $CI->Common_model->get_category(0,0,0,1,1);//(1,1)//(getting only parent is vechicles,show_in_navigation_menu is yes)\n //echo $CI->db->last_query();\n return $data;\n}", "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "public function testAddParentsOfCategoryWithSuccess()\n {\n $categoriesCreatedArray = $this->createCategoriesDataForTest();\n\n $lastValueArray = end($categoriesCreatedArray);\n $firstValueArray = $categoriesCreatedArray[0];\n\n $this->assertInstanceOf(InlineResponse2011::class, $lastValueArray);\n\n $this->resourceAPI->deleteCategoryById($firstValueArray->getData()[0]->getId());\n }", "public function getParentCategory() {\r\n\t\t$postID = $_POST['id'];\r\n\t\t$parentList = '<select id=\"ExpenseCategory[]\" class=\"form-control xxx ExpenseCategory exParentCat\" name=\"ExpenseParentCategory[]\">';\r\n\t\t$parentList .= '<option value=\"-1\" > Select Sub Category</option>'; \r\n\t\t$parentCat = getCategoryParent($_POST['CatType']); \r\n\t\tif( !empty( $parentCat ))\r\n\t\t{\r\n\t\t\tforeach($parentCat as $val){\r\n\t\t\t\tif( getCategoryParentId($postID) == $val->id)\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" selected=\"selected\"> '.$val->title.' </option>';\r\n\t\t\t\telse\t\r\n\t\t\t\t\t$parentList .= '<option value=\"'.$val->id.'\" > '.$val->title.' </option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$parentList .= '</select>'; \r\n\t\techo $parentList; \r\n\t}", "public function testGetItemSubCategoryById()\n {\n }", "public function subCategorylist()\n {\n $data = [];\n $sub_categories = Category::where('parent', '!=' ,'0')->get();\n if(count($sub_categories)){\n $data = ['status' => true, 'code' => 200, 'data'=>$sub_categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "function getParentOfParentId($i_ParentOfParent, $i_shop)\r\n {\r\n $i_parentOfParent = $this->oMySQL->executeSQL(\"select dd.magentoCatId from tbl_katneu aa\r\n left join test.tbl_magentoCategory bb on bb.wawiCatId = aa.kategorie and bb.shop = $i_shop\r\n left join test.tbl_magentoCategory dd on dd.wawiCatId = aa.parent and dd.shop = $i_shop\r\n where aa.kategorie in( \".$i_ParentOfParent.\" ) limit 1\");\r\n if ($i_parentOfParent) {\r\n return $i_parentOfParent;\r\n }\r\n return false;\r\n }", "function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}", "public function testDeleteParentsOfCategoryWithoutProducts()\n {\n $categoriesCreatedArray = $this->createCategoriesDataForTest();\n\n $firstValueArray = $categoriesCreatedArray[0];\n\n $this->resourceAPI->deleteCategoryById($firstValueArray->getData()[0]->getId());\n }", "public function all_parent_units()\n\t{\n\t\t$this->db->where('units_status = 1 AND units_parent = 0');\n\t\t$this->db->order_by('units_name', 'ASC');\n\t\t$query = $this->db->get('units');\n\t\t\n\t\treturn $query;\n\t}", "public function getCategories($parent_id = 0) {\n\t\t$category_data = FALSE;\n\t\t\n\t\tif (! $category_data) {\n\t\t\t$category_data = array ();\n\t\t\t\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\tc.category_id,\r\n\t\t\t\t\tc.parent_id,\r\n\t\t\t\t\tcd.name,\r\n\t\t\t\t\t(SELECT COUNT(*) FROM `\" . DB_PREFIX . \"category` cc WHERE cc.parent_id = c.category_id) as children\r\n\t\t\tFROM `\" . DB_PREFIX . \"category` c\r\n\t\t\tLEFT JOIN `\" . DB_PREFIX . \"category_description` cd\r\n\t\t\t\tON (c.category_id = cd.category_id)\r\n\t\t\tWHERE c.parent_id = \" . ( int ) $parent_id . \"\r\n\t\t\tAND c.status = 1\r\n\t\t\tAND cd.language_id = \" . ( int ) $this->config->get ( 'config_language_id' ) . \"\r\n\t\t\tORDER BY c.sort_order, cd.name ASC\";\n\t\t\t\n\t\t\t$query = $this->db->query ( $sql );\n\t\t\t\n\t\t\tforeach ( $query->rows as $result ) {\n\t\t\t\t$category_data [] = array (\n\t\t\t\t\t\t'category_id' => $result ['category_id'],\n\t\t\t\t\t\t'parent_id' => $result ['parent_id'],\n\t\t\t\t\t\t'name' => $result ['name'],\n\t\t\t\t\t\t'children' => $result ['children'],\n\t\t\t\t\t\t'disabled' => ((in_array ( $result ['category_id'], $this->config->get ( 'msconf_restrict_categories' ) ) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 1 && $result ['parent_id'] == 0) || ($this->config->get ( 'msconf_additional_category_restrictions' ) == 2 && $result ['children'] > 0)) ? TRUE : FALSE) \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// Recursive call of the function and merge of all the categories together\n\t\t\t\t$category_data = array_merge ( $category_data, $this->getCategories ( $result ['category_id'] ) );\n\t\t\t}\n\t\t\t\n\t\t\t// $this->cache->set('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id, $category_data);\n\t\t}\n\t\t\n\t\t// The first calls of the function (for the root categories), where indentation takes place\n\t\tif ($parent_id == 0) {\n\t\t\t$category_data_indented = array ();\n\t\t\tforeach ( $category_data as $category ) {\n\t\t\t\t$category_data_indented [] = array (\n\t\t\t\t\t\t'category_id' => $category ['category_id'],\n\t\t\t\t\t\t'name' => str_repeat ( '&nbsp;&nbsp;&nbsp;', $this->_getDepth ( $category_data, $category ['category_id'] ) ) . $category ['name'],\n\t\t\t\t\t\t'parent_id' => $category ['parent_id'],\n\t\t\t\t\t\t'children' => $category ['children'],\n\t\t\t\t\t\t'disabled' => $category ['disabled'] \n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $category_data_indented;\n\t\t}\n\t\t\n\t\treturn $category_data;\n\t}", "function showChildCategories($category_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$category_id.\" order by sub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function parentcategory()\n {\n return $this->belongsTo(Category::class, 'parent_id')->select('id', 'category_name');\n }", "public function parentcategory()\n {\n return $this->belongsTo(Category::class, 'parent_id')->select('id', 'category_name');\n }", "public function subCategories()\n {\n return $this->belongsToMany(Category::class, 'solution_categories', 'solution_id', 'category_id')->isChild();\n }", "public static function getParents()\n {\n $tableCategoriesLevelOne=CategoriesLevelOne::tableName();\n $dependency = new DbDependency;\n $dependency->sql=\"SELECT MAX(id) FROM $tableCategoriesLevelOne\";\n $query=Category::getDb()->cache(function($db)\n {\n return Category::find()->orderBy(\"order_by ASC\")->with(['relationCategoriesLevelOne'])->all();\n }, Yii::$app->params['7_day_cache'], $dependency);\n\n return $query;\n }", "function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}", "public function fetch_category(){\n $this->db->where('parent_id', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "function test_get_parent()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Create a new tree\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\t\t$allnodes = $this->_tree->get_all_nodes(); \r\n\t\t// Walk trough all nodes and compare it's relations whith the one provided\r\n\t\t// by the relation tree\r\n\t\tforeach($allnodes AS $nid => $node)\r\n\t\t{\r\n\t\t\t$parent = $this->_tree->get_parent($nid, true);\r\n\t\t\tif (!isset($relation_tree[$nid]['parent_id']))\r\n\t\t\t{\r\n\t\t\t\t$this->assertFalse($parent, 'A rootnode returned a parent');\r\n\t\t\t\tcontinue;\r\n\t\t\t} \r\n\t\t\t$this->assertEqual($relation_tree[$nid]['parent_id'], $parent['id'], 'Relation tree parent doesn\\'t match method return');\r\n\t\t} \r\n\t\treturn true;\r\n\t}", "function _find_parent_forum_and_category($rows,$parent_forum)\n\t{\n\t\t$cat_id=NULL;\n\t\t$parent_id=NULL;\n\t\tforeach ($rows as $row2)\n\t\t{\n\t\t\tif ($row2['forum_id']==$parent_forum)\n\t\t\t{\n\t\t\t\tif ($row2['forum_type']==0)\n\t\t\t\t{\n\t\t\t\t\t$cat_id=$row2['forum_id'];\n\t\t\t\t\tbreak;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$parent_id=$row2['forum_id'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($parent_id===0) $parent_id=NULL;\n\t\tif ($cat_id===0) $cat_id=NULL;\n\t\tif ((is_null($parent_id)) && (!is_null($cat_id)))\n\t\t{\n\t\t\tforeach ($rows as $row2)\n\t\t\t{\n\t\t\t\tif ($row2['forum_id']==$cat_id) $cat_parent_id=$row2['parent_id'];\n\t\t\t}\n\t\t\tlist(,$parent_id)=$this->_find_parent_forum_and_category($rows,$cat_parent_id);\n\t\t}\n\t\treturn array($cat_id,$parent_id);\n\t}", "public function getListParentCode()\n {\n\n $urlConApi = config('app.api') . 'category?mod=list_category';\n\n $result = $this->getListData($urlConApi);\n\n $listParentCode = [];\n if (isset($result['data'])) {\n foreach ($result['data'] as $key => $parentCode) {\n $listParentCode[] = $parentCode['Code'];\n }\n }\n\n return $listParentCode;\n }", "public function subcategories()\n {\n return $this->hasMany(Category::class, 'parent_id')->where('status', 1);\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "public function subcategory()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->order_by($this->pro->category.'_parent','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent>',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "function get_sub_categories($category_ID)\n {\n $get_sub_category_query=site_query(\"select * from Category where parentID=\".$category_ID.\" order by displayOrder\",\"get_sub_categories()\",$dev);\n return $get_sub_category_query;\n }", "public function testListCategories()\n {\n }", "public function Parent()\n\t{\n\t\treturn Category::findOrFail($this->category_id);\n\t}", "function getParentCategoryTitleById( $parent_id)\n\t{\n\t\t$q = \"SELECT category_title FROM title_dev_categories WHERE category_id = \".$parent_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r['category_title'];\n\t\telse\n\t\t\treturn false;\n\t}", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "function getParentCategoryTextById( $parent_id)\n\t{\n\t\t$q = \"SELECT category_text FROM title_dev_categories WHERE category_id = \".$parent_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r['category_text'];\n\t\telse\n\t\t\treturn false;\n\t}", "function L_showChildCats ($parent, $usename) {\n\t\t\n\t\t$idObj = get_category_by_slug($parent); \n\t\t$parent_id = $idObj->term_id;\n\t\t$all_cats_ids = get_all_category_ids();\n\t\t\n\t\tforeach ( $all_cats_ids as $cat_id ) {\n\t\t\t\n\t\t\tif (cat_is_ancestor_of($parent_id, $cat_id)) {\n\t\t\t\n\t\t\t\tif ($usename) {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = get_cat_name($cat_id); \n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$child_cats[] = (int)$cat_id;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif ($child_cats <> NULL) {\n\t\t\t\n\t\t\tsort( $child_cats ); \n\t\t\n\t\t}\n\t\t\n\t\treturn $child_cats; \n\t\t\n\t}", "function printCategory($parent_id, $role)\n{\n $cats = new Category();\n $cate = $cats->getByParentId($parent_id);\n if ($parent_id == 0) {\n\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a>';\n printCategory($r['id'], $role);\n echo '</li>';\n }\n }\n } else {\n //nếu là danh mục con\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n echo '<ul class=\"sub-menu\">';\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a></li>';\n }\n echo '</ul>';\n }\n }\n}", "private function getCaseNodes(): array\n {\n $caseNodes = $this->xml->xpath('//testcase');\n $cases = [];\n foreach ($caseNodes as $node) {\n $caseFilename = (string) $node['file'];\n if (! isset($cases[$caseFilename])) {\n $cases[$caseFilename] = [];\n }\n\n $cases[$caseFilename][] = $node;\n }\n\n return $cases;\n }", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "public function testGetItemSubCategoryTags()\n {\n }", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "function get_parent_of_category($category_id) {\n\twhile($category_id) {\n\t\t$category = get_category($category_id); // get the object for the catid\n\t\t$category_id = $category->category_parent; // assign parent ID (if exists) to $catid\n\t\t\n\t\t$category_parent = $category->cat_ID;\n\t}\n\treturn get_category($category_parent);\n}", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "public function getCategories($parent_id) {\n// if (!$category_data) {\n\t$category_data = array();\n\n\t$rows = Make::a('catalog/category')\n\t\t->table_alias('c')\n\t\t->select_expr('c.category_id,c.ref_category_code,c.status,c.sort_order')\n\t\t->left_outer_join('category_description', array('c.category_id', '=', 'cd.category_id'), 'cd')\n\t\t->where('c.parent_id', $parent_id)\n\t\t->where('cd.language_id', QS::app()->config->get('config_language_id'))\n\t\t->order_by_asc('c.sort_order')\n\t\t->order_by_asc('cd.name')\n\t\t->find_many(true);\n\n\tforeach ($rows as $result) {\n\t $category_data[] = array(\n\t\t'category_id' => $result['category_id'],\n\t\t'ref_category_code' => $result['ref_category_code'],\n\t\t'name' => $this->getPath($result['category_id']),\n\t\t'status' => $result['status'],\n\t\t'sort_order' => $result['sort_order']\n\t );\n\n\t $category_data = array_merge($category_data, $this->getCategories($result['category_id']));\n\t}\n\n// QS::app()->cache->set('category.' . QS::app()->config->get('config_language_id') . '.' . $parent_id, $category_data);\n//}\n\n\treturn $category_data;\n }", "public function run()\n {\n\n $categories = [\n ['name'=>'Electronics','is_parent'=>1], //1\n ['name'=>'Mobile','parent_id'=>1], //2\n ['name'=>'Tablets','parent_id'=>1], \n ['name'=>'Laptops','parent_id'=>1], \n \n ['name'=>'kitchn','is_parent'=>true], //5\n ['name'=>'cup','parent_id'=>5], //4\n ['name'=>'furniture','parent_id'=>5], //4\n\n ['name'=>'Personal Care','is_parent'=>true], //8\n ['name'=>'Mens grooming','parent_id'=>8], //4\n ['name'=>'Foundation','parent_id'=>8], //4\n\n ['name'=>'Grocery & Pets','is_parent'=>true], //11\n ['name'=>'Beverages','parent_id'=>11], //4\n ['name'=>'Breakfast','parent_id'=>11], //4\n \n ];\n foreach($categories as $category){\n Category::create([\n 'name'=>$category['name'],\n 'slug'=>Str::slug($category['name']),\n 'is_parent'=>$category['is_parent'] ?? 0,\n 'parent_id'=>$category['parent_id'] ?? null\n ]);\n }\n\n // $categories = [\n // [\n // 'name' => 'Electronics',\n // 'subCategory' => ['Mobile', 'Tablets', 'Laptops', 'Desktops', 'Televisions', 'Gaming Consoles', 'Printers']\n // ],\n // [\n // 'name' => 'Electronic Accessories',\n // 'subCategory' => ['Phone Cases', 'Chargers', 'Headphones', 'SmartWatches', 'BlueTooth Speakers', 'Screen protectors']\n // ],\n // [\n // 'name' => 'Personal Care',\n // 'subCategory' => ['Mens grooming', 'Mens grooming', 'Foundation', 'Deodrants', 'Female hygiene', 'Soap handwash', 'Skin care', 'Hair care']\n // ],\n // [\n // 'name' => 'Babys & Toys',\n // 'subCategory' => ['Disposable Diapers', 'Baby Gear', 'Personal Care', 'Toys & Games']\n // ],\n // [\n // 'name' => 'Grocery & Pets',\n // 'subCategory' => ['Beverages', 'Breakfast', 'Fruits', 'Vegetables', 'Pet Food', 'Daily Food']\n // ],\n // [\n // 'name' => 'Home & Lifestyle',\n // 'subCategory' => ['Bath', 'Bedding', 'Decor', 'Furniture', 'Appliances & Electicals', 'Kitchen Utensils']\n // ],\n // [\n // 'name' => 'Sports & Outdoors',\n // 'subCategory' => ['Mens Collections', 'Womens Collections', 'Exercise & Fitness', 'Travel & Luggage']\n // ],\n // [\n // 'name' => 'AutoMotive & Motorbike',\n // 'subCategory' => ['Auto Motive', 'Motorcycle', 'Moto Parts & Accessories', 'Riding gear']\n // ],\n // ];\n\n // foreach ($categories as $category) {\n\n // $newCategory = Category::create([\n // 'category_name' => $category['name'],\n // ]);\n // foreach ($category['subCategory'] as $item) {\n // $subcategory = SubCategory::create([\n // 'category_id' => $newCategory->id,\n // 'subCategory_name' => $item,\n // ]);\n // }\n // }\n }", "function load_category($parent)\n{\n$sql=\"SELECT * from yr14_category where parentid='\".$parent.\"' order by id\";\n$result=mysql_query($sql);\nif(!$result || mysql_num_rows($result)<=0)\nreturn 0;\nelse\nreturn $result;\n}", "function getDocumentsGeneralParentCategories() {\n\n\t\t//solo se usan las categorias del modulo documentos\n\t\t//no se usan generales\n\t\tif (!DocumentPeer::usesGlobalCategories())\n\t\t\treturn array();\n\n\t\t$criteria = new Criteria();\n\n\t\t$criteria->addJoin(UserGroupPeer::GROUPID,GroupCategoryPeer::GROUPID,Criteria::INNER_JOIN);\n\t\t$criteria->addJoin(GroupCategoryPeer::CATEGORYID,CategoryPeer::ID,Criteria::INNER_JOIN);\n\t\t$criteria->add(UserGroupPeer::USERID,$this->getId());\n\t\t$criteria->add(CategoryPeer::ACTIVE,1);\n\t\t$criteria->add(CategoryPeer::PARENTID,0);\n\t\t$criteria->add(CategoryPeer::MODULE,'');\n\n\t\t$result = CategoryPeer::doSelect($criteria);\n\t\treturn $result;\n\n\t}", "public function get_no_parents($lang_id=1)\n\t{\n $this->db->select('*');\n $this->db->where('parent_id', 0);\n $this->db->join($this->_table_name.'_lang', $this->_table_name.'.id = '.$this->_table_name.'_lang.category_id');\n $this->db->where('language_id', $lang_id);\n $categories = parent::get();\n \n // Return key => value pair array\n $array = array(0 => 'Select');\n //$array = array(0 => lang('No parent'));\n if(count($categories))\n {\n foreach($categories as $n)\n {\n $array[$n->id] = $n->title;\n }\n }\n \n return $array;\n\t}", "function tep_get_parent_categories(&$categories, $categories_id) {\n\tglobal $obj_categories;\n\tif(!$categories_id) return null;\n\t$parent_id = $obj_categories->get_parent_id($categories_id);\n\tif($parent_id == 0 ) return;\n\t$categories[sizeof($categories)] = $parent_id;\n\ttep_get_parent_categories($categories, $parent_id);\n }", "public function run()\n {\n $categories =\n [\n [\n 'id' => 1,\n 'title' => 'product',\n 'slug' => 'product',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'title' => 'post',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 3,\n 'title' => 'DRIED FRUITS',\n 'slug' => 'dried-fruits',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'title' => 'HERBS&SPICES',\n 'slug' => 'herb-and-spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'title' => 'WHOLEFOODS & LEGUMES',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'title' => 'NUTS',\n 'slug' => 'nuts',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 7,\n 'title' => 'TEAS',\n 'slug' => 'teas',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'title' => 'Raw Almonds',\n 'slug' => 'raw-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 9,\n 'title' => 'Roasted Almonds',\n 'slug' => 'roasted-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 10,\n 'title' => 'Walnut',\n 'slug' => 'walnut',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 11,\n 'title' => 'Pumpkin Seeds',\n 'slug' => 'pumpkin-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 12,\n 'title' => 'Sunflower Seeds',\n 'slug' => 'sunflower-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 13,\n 'title' => 'Fruit Tea',\n 'slug' => 'fruit-tea',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 7,\n ],\n [\n 'id' => 14,\n 'title' => 'Yellow Apricot',\n 'slug' => 'yellow-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 15,\n 'title' => 'Natural Brown Apricot',\n 'slug' => 'natural-brown-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 16,\n 'title' => 'Herbs',\n 'slug' => 'herbs',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 17,\n 'title' => 'Spices',\n 'slug' => 'spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 18,\n 'title' => 'Cinnamon Powder',\n 'slug' => 'cinnamon-powder',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 19,\n 'title' => 'Cinnamon Sticks',\n 'slug' => 'cinnamon-sticks',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 20,\n 'title' => 'Paprika',\n 'slug' => 'paprika',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 17,\n ],\n\n ];\n\n\n Category::insert($categories);\n //Category::factory(1)->create();\n }", "function get_sub_cat($cat_main, $catrow )\n{\n\tglobal $db;\n\n\tif ($cat_main > 0)\n\t{\n\t\t$sql= \"SELECT * FROM \".CATEGORIES_TABLE.\" WHERE cat_id <> $cat_main AND cat_main=$cat_main\";\n\t\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie sons '.$sql, '', __LINE__, __FILE__, $sql);\n\t\twhile ( $catw = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$i = count($catrow);\n\t\t\t$catrow[$i] = $catw;\n\t\t\tif ($catw['cat_id'] > 0)\n\t\t\t\t$catrow = get_sub_cat($catw['cat_id'],$catrow);\n\t\t}\n\t}\n\treturn $catrow;\n}", "function getparent(){\r\n\tglobal $con;\r\n\t$getAll = $con->prepare(\"SELECT * FROM categories WHERE parent = 0 ORDER BY ID ASC\");\r\n\t$getAll->execute();\t\r\n\t$parent = $getAll->fetchAll();\r\n\treturn $parent;\r\n}", "public function parentCategories()\n {\n return $this->hasMany(self::class, 'id', 'parent_id');\n }", "function get_category_data( $adunit = false ) {\n\t$exposed_values = array();\n\t$parent_categories = array();\n\t$sub_categories = array();\n\t$exposed_values['parent_categories'] = 'no_value';\n\t$exposed_values['sub_categories'] = 'no_value';\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\t$category_tax = 'category';\n\t\t$categories = get_the_terms( $post->ID, $category_tax );\n\t\tif ( ! empty( $categories ) ) {\n\t\t\tforeach ( $categories as $term ) {\n\t\t\t\t$ancestors = get_ancestors( $term->term_id, $category_tax );\n\t\t\t\tif ( ! empty( $ancestors ) ) {\n\t\t\t\t\tforeach ( $ancestors as $ancestor ) {\n\t\t\t\t\t\t$remove[] = \"'\";\n\t\t\t\t\t\tif ( ! $adunit ) {\n\t\t\t\t\t\t\t$remove[] = '-';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ancestor_term = get_term( $ancestor );\n\t\t\t\t\t\tarray_push( $parent_categories, str_replace( $remove, '', $ancestor_term->slug ) );\n\t\t\t\t\t\tarray_push( $sub_categories, str_replace( $remove, '', $term->slug ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$term_slug = $term->slug;\n\t\t\t\t\tarray_push( $parent_categories, $term_slug );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$filter_similar_parent_cats = array_unique( $parent_categories, SORT_STRING );\n\t\t\t$parent_categories = implode( ', ', $filter_similar_parent_cats );\n\t\t\t$filter_similar_sub_cats = array_unique( $sub_categories, SORT_STRING );\n\t\t\t$sub_categories = implode( ', ', $filter_similar_sub_cats );\n\t\t\tif ( ! empty( $parent_categories ) ) {\n\t\t\t\t$exposed_values['parent_categories'] = $parent_categories;\n\t\t\t}\n\t\t\tif ( ! empty( $sub_categories ) ) {\n\t\t\t\t$exposed_values['sub_categories'] = $sub_categories;\n\t\t\t}\n\t\t}\n\t} elseif ( is_category() || is_archive() ) {\n\t\t$q_object = get_queried_object();\n\t\t// WP_Post_Type archives don't have a \"slug\" property.\n\t\tif ( ! empty( $q_object->slug ) ) {\n\t\t\t$cat_slug = $q_object->slug;\n\t\t\t$exposed_values['parent_categories'] = $cat_slug;\n\t\t\t$exposed_values['sub_categories'] = $cat_slug;\n\t\t}\n\t\tif ( is_post_type_archive( 'joke' ) ) {\n\t\t\t$exposed_values['parent_categories'] = 'jokes';\n\t\t\t$exposed_values['sub_categories'] = 'jokes';\n\t\t}\n\t} elseif ( is_page() ) {\n\t\t$exposed_values['parent_categories'] = 'misc';\n\t\t$exposed_values['sub_categories'] = 'misc';\n\t} elseif ( is_home() && is_front_page() ) {\n\t\t$exposed_values['parent_categories'] = 'homepage';\n\t\t$exposed_values['sub_categories'] = 'homepage';\n\t}\n\treturn $exposed_values;\n}", "public function build_category_tree($output, $preselected, $parent=0, $indent=''){\t\n $this->db->select('category_id,category_name,parentid');\n $this->db->where('parentid',$parent); \n $sql = $this->db->get('category'); \n \n foreach ($sql->result_array() as $c)\n {\n $selected = ($c[\"category_id\"] == $preselected) ? \"selected=\\\"selected\\\"\" : \"\";\n $output .= \"<option value=\\\"\" . $c[\"category_id\"] . \"\\\" \" . $selected . \">\" . $indent . $c[\"category_name\"] . \"</option>\";\n if($c[\"category_id\"] != $parent){\n $this->crud_model->build_category_tree($output, $preselected, $c[\"category_id\"], $indent . \"&nbsp;&nbsp;\");\n } \n }\n return $sql->result_array();\n}", "public function testAddItemSubCategory()\n {\n }", "public function category()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "public function getChildCat($parent = array(0), $type = false, $data = false)\n {\n global $rlDb;\n\n foreach ($parent as $parent_id) {\n $parent_id = (int) $parent_id;\n\n $sql = \"SELECT *, `Modified` \";\n $sql .= \"FROM `{db_prefix}categories` \";\n $sql .= \"WHERE `Type` = '{$type['Key']}' AND `Status` = 'active' AND `Parent_ID` = '{$parent_id}'\";\n if ($type['Cat_hide_empty']) {\n $sql .= \"AND `Count` > 0 \";\n }\n $sql .= \"ORDER BY `Position`\";\n\n if ($tmp_categories = $rlDb->getAll($sql)) {\n foreach ($tmp_categories as $cKey => $cValue) {\n $ids[] = $cValue['ID'];\n\n $categories[$cValue['ID']] = $cValue;\n $categories[$cValue['ID']]['pName'] = 'categories+name+' . $cValue['Key'];\n $categories[$cValue['ID']]['pTitle'] = 'categories+title+' . $cValue['Key'];\n\n /* get subcategories */\n if ($type['Cat_show_subcats']) {\n // TODO - add this condition in output if needs\n $rlDb->calcRows = true;\n $subCategories = $rlDb->fetch(array('ID', 'Count', 'Path`, CONCAT(\"categories+name+\", `Key`) AS `pName`, CONCAT(\"categories+title+\", `Key`) AS `pTitle', 'Key'), array('Status' => 'active', 'Parent_ID' => $cValue['ID']), \"ORDER BY `Position`\", null, 'categories');\n $rlDb->calcRows = false;\n\n if (!empty($subCategories)) {\n $categories[$cValue['ID']]['sub_categories'] = $subCategories;\n $categories[$cValue['ID']]['sub_categories_calc'] = $rlDb->foundRows;\n }\n\n unset($subCategories);\n }\n }\n unset($tmp_categories);\n\n $data[$parent_id] = $categories;\n\n unset($categories);\n } else {\n continue;\n }\n }\n\n if ($parent) {\n return $this->getChildCat($ids, $type, $data);\n } else {\n return $data;\n }\n }", "public function testGetCategoriesWithIncludesNested()\n {\n $includes = [\"children\"];\n\n $categories = $this->resourceAPI->getCategoryById($this->resourceId, $includes);\n\n $this->assertInstanceOf(InlineResponse2011::class, $categories);\n }", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "function child_category() {\r\n $input = $this->validate_child_category();\r\n $res = $this->CategoriesModel->get_child_category($input['sub_cat_id']);\r\n if ($res) {\r\n return_data(true, 'Child categories Found!', $res);\r\n }\r\n return_data(false, 'Child Categories not found!', array());\r\n }", "function getMasterparentCategorie()\n \t{\n \t\treturn $this->conn_db->get_parent_categorie($this->uid);\n \t\t \t\t\t\n \t}", "public function findCategories();", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }" ]
[ "0.7650469", "0.7343272", "0.734251", "0.72037286", "0.71789485", "0.68887734", "0.6658828", "0.66286737", "0.657201", "0.65059453", "0.64021194", "0.6396007", "0.63922936", "0.6322818", "0.6291699", "0.61062264", "0.60999966", "0.60893714", "0.6061898", "0.6060847", "0.6054744", "0.6048262", "0.6025412", "0.6013335", "0.5998899", "0.5952807", "0.59189034", "0.5898988", "0.5893087", "0.5794207", "0.57674986", "0.5754926", "0.5751065", "0.5745174", "0.57131577", "0.571256", "0.5712194", "0.5712023", "0.57036406", "0.5701291", "0.56962067", "0.56687605", "0.56317514", "0.56267136", "0.561056", "0.5604374", "0.56022197", "0.55900216", "0.5572456", "0.5551391", "0.5536816", "0.55346674", "0.55342025", "0.55342025", "0.55309826", "0.5529208", "0.55272824", "0.55258274", "0.5520622", "0.55049425", "0.5503485", "0.54978937", "0.5496383", "0.5491134", "0.5487381", "0.54721826", "0.5458509", "0.5442705", "0.54362947", "0.5430309", "0.54282534", "0.542333", "0.541995", "0.54139686", "0.54128206", "0.5398965", "0.5396067", "0.5393728", "0.5392688", "0.539225", "0.5380441", "0.5345617", "0.5344358", "0.53294593", "0.5329185", "0.5327651", "0.53110254", "0.5310958", "0.5304493", "0.5303379", "0.53016394", "0.5294927", "0.5293182", "0.52931035", "0.5278025", "0.5274373", "0.5273217", "0.5267085", "0.5266956", "0.526446" ]
0.7512762
1
Get the structure from the testCategories to the first test category. Returns all inversed testCategories tree
function getParentCategoriesForCategory($categoryID, $clientID) { global $definitions; //get item type $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID); //get property $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID); //start loop with passed category $aux = $categoryID; $categoriesArray = array(); //search parent category until 0 level reached while ($aux != 0) { $categoriesArray[] = $aux; $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID); } //return categories array return $categoriesArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "public function testSortByHierarchy() {\n // Create\n $this->phactory->create('kb_category');\n\n // Sort them\n $categories = $this->kb_category->sort_by_hierarchy();\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertNotNull( $category->depth );\n }", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "public static function getCategoryTree() {\n $catModel = new \\App\\Category();\n $catTree = $catModel->getCategoryTree();\n return $catTree;\n }", "public function structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function createTree($categories)\n{\n $tree = [];\n\n foreach ($categories as $category) {\n if (empty($category[\"parent_uid\"])) {\n $tree[] = $category;\n unset($category);\n }\n }\n\n // уровень вложенности 2\n foreach ($tree as &$itemTree) {\n foreach ($categories as $category) {\n /* if(!empty($category[\"parent_uid\"])) {\n print_r($itemTree);\n print_r($category);\n echo \"\\n\";\n echo \"tree:\\n\";\n print_r($itemTree[\"uid\"]);\n echo \"\\n category\";\n print_r($category[\"parent_uid\"]);\n exit();\n }*/\n if ($itemTree[\"uid\"] == $category[\"parent_uid\"]) {\n $itemTree[\"categories\"] = $category;\n unset($category);\n }\n }\n }\n\n return $tree;\n}", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}", "public function getCategoryLimitedSortedTree()\n {\n $page = $this->request->getParam('p') ?: 1;\n $beginPageValue = ($page * $this->getLimitPerPage()) - $this->getLimitPerPage();\n $categories = $this->getCategoriesTree();\n $categories = array_splice($categories, $beginPageValue, $this->getLimitPerPage());\n\n return $categories;\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function getTree()\n {\n return HandbookCategory::all()->toTree();\n }", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "function getParentCategoriesForTestCase($testCaseID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //First, get the parent test category for the test case\n $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID);\n\n //return all categories\n return getParentCategoriesForCategory($categoryID, $clientID);\n}", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "function get_all_comic_categories() {\n global $comiccat, $category_tree, $non_comic_categories;\n\n $categories_by_id = get_all_category_objects_by_id();\n\n foreach (array_keys($categories_by_id) as $category_id) {\n $category_tree[] = $categories_by_id[$category_id]->parent . '/' . $category_id;\n }\n\n do {\n $all_ok = true;\n for ($i = 0; $i < count($category_tree); ++$i) {\n $current_parts = explode(\"/\", $category_tree[$i]);\n if (reset($current_parts) != 0) {\n\n $all_ok = false;\n for ($j = 0; $j < count($category_tree); ++$j) {\n $j_parts = explode(\"/\", $category_tree[$j]);\n\n if (end($j_parts) == reset($current_parts)) {\n $category_tree[$i] = implode(\"/\", array_merge($j_parts, array_slice($current_parts, 1)));\n break;\n }\n }\n }\n }\n } while (!$all_ok);\n\n $non_comic_tree = array();\n\n if (get_option('comicpress-enable-storyline-support') == 1) {\n $result = get_option(\"comicpress-storyline-category-order\");\n if (!empty($result)) {\n $category_tree = explode(\",\", $result);\n }\n $non_comic_tree = array_keys($categories_by_id);\n foreach ($category_tree as $node) {\n $parts = explode(\"/\", $node);\n $category_id = end($parts);\n if ($parts[1] == $comiccat) {\n if (($index = array_search($category_id, $non_comic_tree)) !== false) {\n array_splice($non_comic_tree, $index, 1);\n }\n }\n }\n } else {\n $new_category_tree = array();\n foreach ($category_tree as $node) {\n $parts = explode(\"/\", $node);\n if ($parts[1] == $comiccat) {\n $new_category_tree[] = $node;\n } else {\n $non_comic_tree[] = end($parts);\n }\n }\n $category_tree = $new_category_tree;\n }\n\n $non_comic_categories = implode(\" and \", $non_comic_tree);\n}", "function retrieveHierarchy() {\r\n\t\t$arrCats = $this->generateTreeByLevels(3);\r\n\t\t\r\n\t\treturn $arrCats;\r\n\t}", "public static function getTree ($category)\n\t{\n\t\t$db = DataAccess::getInstance();\n\t\t$category = (int)$category;\n\t\tif (!$category) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$category_next = $category;\n\t\t\n\t\t$get_parent_stmt = $db->Prepare(\"SELECT c.`parent_id`, c.`in_statement`, l.`category_name` FROM \".geoTables::categories_table.\" as c, \".geoTables::categories_languages_table.\" as l WHERE c.`category_id` = l.`category_id` AND c.`category_id` = ? AND l.`language_id` = \".$db->getLanguage().\" LIMIT 1\");\n\t\t\n\t\tif (!$get_parent_stmt) {\n\t\t\ttrigger_error('ERROR SQL: message: '.$db->ErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\t$tree = array();\n\t\twhile ($category_next > 0) {\n\t\t\t/*\n\t\t\t * Store the category info in static array, one entry for each category\n\t\t\t * so we only get info for each category once for times that we need\n\t\t\t * to get category tree a bunch of times in same page load. Doing it\n\t\t\t * this way should minimize extra memory usage\n\t\t\t */\n\t\t\tif (!isset(self::$_category_tree_array[$category_next])) {\n\t\t\t\t$category_result = $db->Execute($get_parent_stmt, array($category_next));\r\n\t\t\t\t\r\n\t\t\t\tif (!$category_result) {\r\n\t\t\t\t\ttrigger_error('ERROR SQL: message: '.$db->ErrorMsg());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif ($category_result->RecordCount() == 1) {\r\n\t\t\t\t\t$show = $category_result->FetchRow();\r\n\t\t\t\t\tself::$_category_tree_array[$category_next] = array(\r\n\t\t\t\t\t\t'parent_id' => $show['parent_id'],\r\n\t\t\t\t\t\t'in_statement' => $show['in_statement'],\r\n\t\t\t\t\t\t'category_name' => geoString::fromDB($show['category_name']),\r\n\t\t\t\t\t\t'category_id' => $category_next,\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tree[] = self::$_category_tree_array[$category_next];\n\t\t\t$category_next = self::$_category_tree_array[$category_next]['parent_id'];\n\t \t}\n\t\t\n\t\t//reverse order of tree, or it will be backwards since we started from\n \t\t//the outermost cat and worked our way up.\n \t\treturn array_reverse($tree, true);\n\t}", "public function getCategoriesAndParents() {\n\t\t$cats = array();\n\t\tif ($this->categories) {\n\t\t\t$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']);\n\t\t\t$catMode = intval($configuration[\"categoryMode\"]);\n\t\t\t$lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']);\n\t\t\t// Step 1: select all categories of the current language\n\t\t\t$categoriesUtility = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('\\quizpalme\\Camaliga\\Utility\\AllCategories');\n\t\t\t$all_cats = $categoriesUtility->getCategoriesarrayComplete();\n\t\t\t// Step 2: aktuelle orig_uid herausfinden\n\t\t\t$orig_uid = intval($this->getUid());\t// ist immer die original uid (nicht vom übersetzten Element!)\n\t\t\tif ($lang > 0 && $catMode == 0) {\n\t\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t'uid',\n\t\t\t\t\t\t'tx_camaliga_domain_model_content',\n\t\t\t\t\t\t'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang . ' AND t3_origuid=' . $orig_uid);\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4))\n\t\t\t\t\t\tif ($row['uid']) {\n\t\t\t\t\t\t\t$orig_uid = intval($row['uid']);\t// uid of the translated element\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t\t}\n\t\t\t// Step 3: get the mm-categories of the current element (from the original or translated element)\n\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'uid_local',\n\t\t\t\t'sys_category_record_mm',\n\t\t\t\t\"tablenames='tx_camaliga_domain_model_content' AND uid_foreign=\" . $orig_uid);\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){\n\t\t\t\t\t$uid = $row['uid_local'];\n\t\t\t\t\tif (!isset($all_cats[$uid]['parent'])) continue;\n\t\t\t\t\t$parent = (int) $all_cats[$uid]['parent'];\n\t\t\t\t\t//if (!$all_cats[$parent]['title'])\tcontinue;\n\t\t\t\t\tif (!isset($cats[$parent])) {\n\t\t\t\t\t\t$cats[$parent] = array();\n\t\t\t\t\t\t$cats[$parent]['childs'] = array();\n\t\t\t\t\t\t$cats[$parent]['title'] = $all_cats[$parent]['title'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($all_cats[$uid]['title'])\n\t\t\t\t\t\t$cats[$parent]['childs'][$uid] = $all_cats[$uid]['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t}\n\t\treturn $cats;\n\t}", "public function makeCategory() {\n $categories = NewsCategory::orderBy('sort', 'asc')->where('parent_id', 0)->get();\n $categories->map(function($d){\n $d['sub_category'] = $d->child;\n return $d;\n });\n return $categories;\n }", "public function getTree() {\n return $this->_buildBranch($this->root_category_id);\n }", "public function getCategories()\n {\n if ($this->_categories === null) {\n /** @var $tree Tree */\n $tree = $this->_categoryFactory->create()->getTreeModel();\n $tree->load(null, 2);\n // Load only to second level.\n $tree->addCollectionData(null, 'position');\n $this->_categories = $tree->getNodeById(Category::TREE_ROOT_ID)->getChildren();\n }\n return $this->_categories;\n }", "public function categoryTree( $category ){ return $this->APICall( array('categoryTree' => $category), \"Couldn't get the category tree for \" . $category ); }", "public function findCategories();", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }", "public function getCategoryTree() {\n $q = \"select * from \".TP.\"transaction_type_master order by type,subtype1,subtype2_display_order\";\n $res = mysql_query($q);\n $ret = array();\n if (!$res) {\n return $ret;\n }\n while($row = mysql_fetch_assoc($res)) {\n $ret[$row['type']][$row['subtype1']][] = $row['subtype2'];\n //var_dump($row);\n }\n //var_Dump($ret);\n return $ret;\n }", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "public function getCategories();", "public function getCategories();", "function getTreeCats2($order, $ordering, $category_id, $categories_id, &$categories, $level){\n++$level;\n$cat = &JTable::getInstance('category', 'jshop');\n$cat->category_id = $category_id;\n$cats = $cat->getChildCategories($order, $ordering);\nforeach($cats as $key=>$value){\n$cats[$key]->level = $level;\n$categories[] = $value;\njShopCategoriesHelper::getTreeCats2($order, $ordering, $value->category_id, $categories_id, $categories, $level);\n}\n}", "function getCategories($object) { \n\n $R1 = new Category(); // R1 --\n $R11 = new Category(); // | | - R11 --\n $R111 = new Category(); // | | - R111\n $R112 = new Category(); // | | - R112\n $R11->addSubcategory($R111); // |\n $R11->addSubcategory($R112); // |\n $R1->addSubcategory($R11); // |\n $R2 = new Category(); // R2 --\n $R21 = new Category(); // | - R21 --\n $R211 = new Category(); // | | - R211\n $R22 = new Category(); // |\n $R221 = new Category(); // | - R22 --\n $R21->addSubcategory($R211); // | - R221\n $R22->addSubcategory($R221);\n $R2->addSubcategory($R21);\n $R2->addSubcategory($R22);\n\n $object->addCollectionEntry($R1); \n $object->addCollectionEntry($R2); \n}", "public function getAllCategories() {\n $allCategories= $this->getCategories(); \n foreach ($allCategories as $value){\n $value->setChildren($this->getSubCategories($value->getId()));\n }\n return $allCategories;\n \n }", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "public function getAllCategories() {\n\n if (!isset(parent::all()[0])) {\n return [];\n }\n return parent::all()[0]->children;\n }", "function getAllTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside\n $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID);\n\n $toFilter = implode(',', $allCategories);\n\n //When we have all the categories inside, get their test cases\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "function oab_getSwappzaCategoryTree($dbcon) {\n $categories = array();\n $categoriesFinal = array();\n \n //Fetch Categories\n $stmt = $dbcon->prepare(\"SELECT categoryID,name\"\n . \" FROM SwappzaCategory WHERE ?\");\n \n if ($stmt) {\n $one = 1;\n $stmt->bind_param('d', $one);\n $stmt->execute();\n $stmt->bind_result($categoryID, $name);\n\n while ($stmt->fetch()) {\n array_push($categories, new SwappzaCategory($categoryID, $name, \"\", array()));\n }\n \n $stmt->close();\n \n //Fetch Subcategory for each category\n foreach($categories as $category) {\n $stmt = $dbcon->prepare(\"SELECT SwappzaSubCategory.subcategoryID, SwappzaSubCategory.name\"\n . \" FROM SwappzaSubCategoryOf\"\n . \" JOIN SwappzaSubCategory ON SwappzaSubCategoryOf.subcategoryID=SwappzaSubCategory.subcategoryID\"\n . \" WHERE SwappzaSubCategoryOf.categoryID=?\");\n \n if ($stmt) {\n $id = $category->getID();\n $stmt->bind_param('d', $id);\n $stmt->execute();\n $stmt->bind_result($subcategoryID, $subcategoryName);\n \n $subCategories = array();\n \n while($stmt->fetch()) {\n array_push($subCategories, new SwappzaSubCategory($subcategoryID, $subcategoryName, ''));\n }\n \n array_push($categoriesFinal,\n new SwappzaCategory(\n $category->getID(),\n $category->getName(),\n $category->getDescription(),\n $subCategories\n ));\n \n $stmt->close();\n } else {\n error_log(\"failed to prepare second statement from oab_getSwappzaCategoryTree in swappza.php\");\n }\n } \n \n } else {\n error_log(\"failed to prepare first statement from oab_getSwappzaCategoryTree in swappza.php\");\n }\n \n return $categoriesFinal; \n}", "protected function getCategories()\n {\n if (! is_null($this->categories)) {\n return $this->categories;\n }\n\n $categories = $this->app['sanatorium.categories.category']->findAll();\n\n foreach ($categories as $category) {\n $category->uri = $category->url === '/' ? null : $category->url;\n }\n\n return $this->categories = $categories;\n }", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function getCategoriesForSettings() {\n \n $qb = $this->_em->createQueryBuilder();\n $qb->select('c')\n ->from('ABOMainBundle:Category', 'c')\n ->join('c.parent', 'p')\n ->addSelect('p')\n ->where('c.level = :level')\n ->setParameter('level', 2);\n \n return $qb->getQuery()->getResult();\n }", "public function buildTree($selected_cat = 0)\n\t{\n\t\t//Save the origin dataset category_id\n\t\t$this->_dataset_stored_category_id = $selected_cat;\n\t\n\t\tif ($selected_cat=='' || $selected_cat==0)\n\t\t{\n\t\t\t$cat_array = array(\n\t\t\t\t\t\t'text'=>'eBay',\n\t\t\t\t\t\t'id'=>'1',\n\t\t\t\t\t\t'path'=>'1',\n\t\t\t\t\t\t'cls'=>'folder active-category',\n\t\t\t\t\t\t'children' => $this->_addChildren(null)\n\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cat_array = $this->_buildRecursiveTree($selected_cat);\n\t\t}\t\n\t\t\n\t\treturn $cat_array;\t\t\n\t}", "public static function getCategoryTopLevel() {\n\t\t\t$db = Db::getInstance();\n\t\t\t// Regex that grabs all top-level categories using location\n\t\t\t$regexForTopLevel = \"^[0-9]+$\";\n\t\t\t$categoryQuery = $db->prepare('SELECT location, description \n\t\t\t\t\t\t\t\t\t\t\t FROM categories \n\t\t\t\t\t\t\t\t\t\t\tWHERE location REGEXP :regex\n\t\t\t\t\t\t\t\t\t\t ORDER BY location'\n\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$categoryQuery->execute(array('regex' => $regexForTopLevel));\n\t\t\t$allTopCategories = $categoryQuery->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $allTopCategories;\n\t\t}", "public function treeDataProvider()\n {\n $catData = [\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ],\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat422',\n 'active' => true,\n 'sort' => 1,\n 'left' => 6,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat5',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat6',\n 'active' => true,\n 'sort' => 1,\n 'left' => 9,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n ];\n\n $data = [];\n foreach ($catData as $category) {\n $data[$category['id']] = $this->buildCategory($category);\n }\n\n return [['data' => $data]];\n }", "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "function generate_categories($keys=false,$current=null,$leaf=null,$depth=0) {\n \n \n return ($out);\n }", "public function getSubMenu(){\n\t\t$catalogue = $this->getMenu()->content;\n\t\tforeach($catalogue as $first){\n\t\t\t$noms_sub_menu = $this->GetHTTP(\n\t\t\t\t'https://api.zalando.com/categories', array(\n\t\t\t\t\t'key' => implode(\",\", $first->childKeys),\n\t\t\t\t\t'pageSize' => '20000')\n\t\t\t)->content;\n\t\t\tfor ($i = 0; $i < count($first->childKeys); $i++){\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $first->childKeys[$i];\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $noms_sub_menu[$i]->name;\n\t\t\t\tunset($first->childKeys[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $catalogue;\n\t}", "public function index()\n {\n $categories = Category::orderBy('id', 'desc')->get();\n\n foreach ($categories as $key => &$category) {\n if($category->parent_id != 0 || $category->parent_id != null) {\n $parent = Category::find($category->parent_id);\n $category->parent = $parent;\n }\n }\n\n return $categories;\n\n }", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "public function getCategoriesStall(){\n\t\t$this->db->query('SELECT * FROM categories_tbl WHERE type=1');\n\t\treturn $this->db->resultSet();\n\t}", "public function getCategoriesStall(){\n\t\t$this->db->query('SELECT * FROM categories_tbl WHERE type=1');\n\t\treturn $this->db->resultSet();\n\t}", "public function testListCategories()\n {\n }", "public static function getRootCategories()\n {\n $app = App::getInstance();\n\n $sql = $app['safesql']->query(\n \"SELECT\n\t\t\t\t`id`\n\t\t\tFROM `category`\n\t\t\tWHERE hidden = 0\n\t\t\tAND id > 0\n\t\t\tAND parent IS NULL\n\t\t\tAND deleted = 0\n\t\t\tORDER BY `order` ASC\",\n array());\n $results = $app['db']->get_results($sql);\n $cats = array();\n\n if (!is_null($results)) {\n foreach ($results as $cat) {\n $cats[] = new Category($cat->id);\n }\n }\n return $cats;\n }", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "public function test_Category_Tree(){\n\n\t\t$exp_total\t= Good::all()->count();\n\n\t\t$get\t= [\n\t\t\t'draw'\t=> '12'\n\t\t];\n\t\t$res\t= Good::getTableData( $get );\n\n\t\t$this->assertEquals( 12, $res['draw'], \"\\n*** Assert 1 ***\\nWrong 'draw' value\\n\" );\n\t\t$this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 2 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t\t$new_item\t= [\n\t\t\t'name'\t=> ''\n\t\t\t,'article'=> ''\n\t\t\t,'rprice'\t=> 5.567\n\t\t\t,'wprice'\t=> 4.444\n\t\t\t,'inpack'\t=> 24\n\t\t\t,'packs'\t=> 13\n\t\t\t,'assort'\t=> 17\n\t\t];\n\n\n\n\t\t$this->db['Good']\t= [];\n\t\t$items\t= &$this->db['Good'];\n\n\t for( $i=0; $i<3; $i++ ){\n\t \t$item\t= $new_item;\n\t \t$item['name']\t= self::_ut_name.'_'.$i;\n\t \t$item['article']\t= self::_ut_name.'_'.$i;\n\t\t\t$item_obj\t= new Good();\n\t \t$item_obj\t= $item_obj->fill( $item );\n\t\t $res \t= $item_obj->save();\n\n\t\t $ids[]\t=\n\t\t $item['id']\t= $item_obj->id;;\n\n\t\t\t$items[]\t= $item;\n\n\t\t $item_obj\t= NULL;\n\t }\n\n\n// print_r( $ids);\n\n// \t $ut_item_id\t= $item_obj->id;\n\n\n\t $exp_total\t= Good::all()->count();\n\t $res\t= Good::getTableData( $get );\n// \t $item_obj->delete();\n\n// \t\tGood::whereIn('id');\n\n\n\t $this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 3 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t}", "function getCategoryTreeAssoc()\n {\n $category_structure = $this->loadCategoryStructure();\n //echo '<pre>';\n //print_r($category_structure);\n $level = 0;\n $rs = '';\n $rs .= '<form method=\"post\">';\n $rs .= '<table border=\"0\">';\n $rs .= '<tr>';\n $rs .= '<td class=\"row_title\" colspan=\"4\"><input type=\"submit\" value=\"' . Multilanguage::_('L_TEXT_SAVE') . '\" name=\"submit\" /></td>';\n $rs .= '</tr>';\n $rs .= '<tr>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('L_TEXT_TITLE') . '</td>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('OPERATION_TYPE', 'system') . '</td>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('ESTATE_TYPE', 'system') . '</td>';\n $rs .= '<td class=\"row_title\"></td>';\n $rs .= '</tr>';\n if (count($category_structure) > 0) {\n foreach ($category_structure['childs'][0] as $item_id => $catalog_id) {\n //echo $catalog_id.'<br>';\n $rs .= $this->getRowAssoc($catalog_id, $category_structure, $level, 'row1');\n $rs .= $this->getChildNodesRowAssoc($catalog_id, $category_structure, $level + 1, $current_category_id);\n }\n }\n $rs .= '<tr>';\n $rs .= '<input type=\"hidden\" name=\"action\" value=\"structure\" />';\n $rs .= '<input type=\"hidden\" name=\"do\" value=\"associations\" />';\n $rs .= '<td class=\"row_title\" colspan=\"4\"><input type=\"submit\" value=\"' . Multilanguage::_('L_TEXT_SAVE') . '\" name=\"submit\" /></td>';\n\n $rs .= '</tr>';\n $rs .= '</table>';\n $rs .= '</form>';\n return $rs;\n }", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function tep_get_parent_categories(&$categories, $categories_id) {\n\tglobal $obj_categories;\n\tif(!$categories_id) return null;\n\t$parent_id = $obj_categories->get_parent_id($categories_id);\n\tif($parent_id == 0 ) return;\n\t$categories[sizeof($categories)] = $parent_id;\n\ttep_get_parent_categories($categories, $parent_id);\n }", "function pico_sync_cattree($mydirname)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// rebuild tree informations\n\tlist($tree_array, $subcattree, $contents_total, $subcategories_total, $subcategories_ids_cs) = pico_makecattree_recursive($mydirname, 0);\n\t//array_shift( $tree_array ) ;\n\t$paths = [];\n\t$previous_depth = 0;\n\n\tif (!empty($tree_array)) foreach ($tree_array as $key => $val) {\n\t\t// build the absolute path of the category\n\t\t$depth_diff = $val['depth'] - $previous_depth;\n\t\t$previous_depth = $val['depth'];\n\t\tif ($depth_diff > 0) {\n\t\t\tfor ($i = 0; $i < $depth_diff; $i++) {\n\t\t\t\t$paths[$val['cat_id']] = $val['cat_title'];\n\t\t\t}\n\t\t} else if (0 !== $val['cat_id']) {\n\t\t\tfor ($i = 0; $i < -$depth_diff + 1; $i++) {\n\t\t\t\tarray_pop($paths);\n\t\t\t}\n\t\t\t$paths[$val['cat_id']] = $val['cat_title'];\n\t\t}\n\n\t\t// redundant array\n\t\t$redundants = [\n\t\t\t'cat_id' => $val['cat_id'],\n\t\t\t'depth' => $val['depth'],\n\t\t\t'cat_title' => $val['cat_title'],\n\t\t\t'contents_count' => $val['contents_count'],\n\t\t\t'contents_total' => $val['contents_total'],\n\t\t\t'subcategories_count' => $val['subcategories_count'],\n\t\t\t'subcategories_total' => $val['subcategories_total'],\n\t\t\t'subcategories_ids_cs' => $val['subcategories_ids_cs'],\n\t\t\t'subcattree_raw' => $val['subcattree_raw'],\n ];\n\n\t\t$db->queryF(\n 'UPDATE '\n . $db->prefix($mydirname . '_categories') . ' SET cat_depth_in_tree='\n . (int)$val['depth'] . ', cat_order_in_tree='\n . ($key) . ', cat_path_in_tree='\n . $db->quoteString(pico_common_serialize($paths)) . ', cat_redundants='\n . $db->quoteString(pico_common_serialize($redundants)) . ' WHERE cat_id='\n . $val['cat_id']);\n\t}\n}", "private function getCategories() {\r\n $data['categories'] = array();\r\n\r\n $this->load->model('catalog/category');\r\n\r\n $categories_1 = $this->model_catalog_category->getCategories(0);\r\n\r\n foreach ($categories_1 as $category_1) {\r\n $level_2_data = array();\r\n\r\n $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);\r\n\r\n foreach ($categories_2 as $category_2) {\r\n $level_3_data = array();\r\n\r\n $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);\r\n\r\n foreach ($categories_3 as $category_3) {\r\n $level_3_data[] = array(\r\n 'category_id' => $category_3['category_id'],\r\n 'name' => $category_3['name'],\r\n );\r\n }\r\n\r\n $level_2_data[] = array(\r\n 'category_id' => $category_2['category_id'],\r\n 'name' => $category_2['name'],\r\n 'children' => $level_3_data\r\n );\r\n }\r\n\r\n $data['categories'][] = array(\r\n 'category_id' => $category_1['category_id'],\r\n 'name' => $category_1['name'],\r\n 'children' => $level_2_data\r\n );\r\n }\r\n return $data['categories'];\r\n }", "function getCatTitleBuild( &$categories )\n\t{\n\t\tforeach ($categories as $index => $category)\n\t\t{\n\t\t\tunset($category['Sub_cats']);\n\t\t\t$out[] = $category;\n\t\t\tif ( !empty($categories[$index]['Sub_cats']) )\n\t\t\t{\n\t\t\t\t$out = array_merge($out, $this -> getCatTitleBuild($categories[$index]['Sub_cats']));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $out;\n\t}", "public static function getTopCategories() {\n global $lC_Database, $lC_Language;\n \n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_link_target, c.categories_custom_url, c.categories_mode from :table_categories c, :table_categories_description cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 and c.categories_visibility_nav = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n while ( $Qcategories->next() ) {\n $topCategories[] = array('id' => $Qcategories->value('categories_id'),\n 'name' => $Qcategories->value('categories_name'),\n 'link_target' => $Qcategories->value('categories_link_target'),\n 'custom_url' => $Qcategories->value('categories_custom_url'),\n 'mode' => $Qcategories->value('categories_mode'));\n }\n \n return $topCategories; \n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function getServiceCategories($service){\n\t\t\treturn $this->loadSubTree($this->getNodeForService($service));\n\t\t}", "public function getCategories() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE parent is null ORDER BY name ASC\");\n $stmt->setFetchMode(\\PDO::FETCH_CLASS, '\\App\\Model\\Category\\ProductCategoryModel');\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public function getCategories()\n {\n $categories = ClassInfo::subclassesFor('ConsultationCategory');\n return $this->Children()->filter('Classname', $categories);\n }", "private function create_category_tree($categories)\n {\n foreach($categories as $category_name)\n {\n $parent_id = (isset($category) ? $category->get_property('id') : 0);\n $category = $this->create_category($category_name, $parent_id);\n\n if ( ! $category)\n {\n return false;\n }\n }\n\n // Return the last category made\n return $category;\n }", "function parseCategories($tree, $root = 0) {\n\n\n $return = [];\n # Traverse the tree and search for direct children of the root\n foreach($tree as $key => $value) {\n # A direct child is found\n if($value[\"parent_id\"] == $root) {\n \n # Remove item from tree (we don't need to traverse this again)\n unset($tree[$key]);\n # Append the child into result array and parse its children\n $return[] = array(\n 'value' => $value,\n 'children' => parseCategories($tree, $value[\"id\"])\n );\n }\n }\n \n return empty($return) ? null : $return;\n}", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "function getTerCategories($CategoriesId=NULL){\n\t\t$this->db->select('*');\n\t\t$this->db->from('c_categories');\n\t\tif($CategoriesId){\n\t\t\t$this->db->where('parent_id', $CategoriesId);\n\t\t}else{\n\n\t\t\t$this->db->where(\"parent_id\", 0);\n\t\t}\n\t\t \n\t\t$query = $this->db->get();\n//\techo $this->db->last_query();\n\t\treturn $query->result_array();\n\n\t}", "public function fetch_category(){\n $this->db->where('parent_id', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "function get_cat_structure($cat_id = 0, $level = 0, $prefix = '', $prefix_id = '')\n{\n global $ce_cache, $config, $db_prefix;\n $cat_sort = $ce_cache['cat_sort'];\n $exists = false;\n\n if (!isset($ce_cache['cat_structure_html'])) {\n $ce_cache['cat_structure_html'] = '';\n }\n $res = sql_query(\"SELECT * FROM \".$db_prefix.\"product_cat WHERE parent_id='$cat_id' ORDER BY FIELD(idx,$cat_sort)\");\n while ($row = sql_fetch_array($res)) {\n if (!$exists) {\n if ($level == 0) {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"<ul id=\\\"myID\\\" class=\\\"myCLASS\\\">\\n\";\n } else {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"<ul>\\n\";\n }\n $exists = true;\n }\n\n $path = (empty($prefix)) ? $row['cat_name'] : strip_tags($prefix).' &raquo; '.$row['cat_name'];\n $path_id = (empty($prefix_id)) ? $row['idx'] : $prefix_id.','.$row['idx'];\n $ce_cache['cat_structure'][$row['idx']] = $path;\n if (!$level) {\n $ce_cache['cat_structure_top'][$row['idx']] = $row['cat_name'];\n }\n if ($config['enable_adp'] && $row['permalink']) {\n $row['url'] = $config['site_url'].'/'.$row['permalink'];\n } else {\n $row['url'] = \"$config[site_url]/shop_search.php?cat_id=$row[idx]\";\n }\n $path_link = (empty($prefix)) ? \"<a href=\\\"$row[url]\\\">$row[cat_name]</a>\" : $prefix.' &raquo; '.\"<a href=\\\"$row[url]\\\">$row[cat_name]</a>\";\n $ce_cache['cat_name_def'][$row['idx']] = $row['cat_name'];\n $ce_cache['cat_url'][$row['idx']] = $row['url'];\n $ce_cache['cat_structure_link'][$row['idx']] = $path_link;\n $ce_cache['cat_structure_id'][$row['idx']] = $path_id;\n $ce_cache['cat_permalink_def'][$row['idx']] = $row['permalink'];\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level + 1).\"<li><a href=\\\"$row[url]\\\">$row[cat_name]</a>\\n\";\n get_cat_structure($row['idx'], $level+1, $path_link, $path_id);\n }\n if ($exists) {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"</ul>\\n\";\n }\n}", "public function run()\n {\n $categories =\n [\n [\n 'id' => 1,\n 'title' => 'product',\n 'slug' => 'product',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'title' => 'post',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => null,\n ],\n [\n 'id' => 3,\n 'title' => 'DRIED FRUITS',\n 'slug' => 'dried-fruits',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'title' => 'HERBS&SPICES',\n 'slug' => 'herb-and-spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'title' => 'WHOLEFOODS & LEGUMES',\n 'slug' => 'nuts-and-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'title' => 'NUTS',\n 'slug' => 'nuts',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 7,\n 'title' => 'TEAS',\n 'slug' => 'teas',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'title' => 'Raw Almonds',\n 'slug' => 'raw-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 9,\n 'title' => 'Roasted Almonds',\n 'slug' => 'roasted-almonds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 10,\n 'title' => 'Walnut',\n 'slug' => 'walnut',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 5,\n ],\n [\n 'id' => 11,\n 'title' => 'Pumpkin Seeds',\n 'slug' => 'pumpkin-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 12,\n 'title' => 'Sunflower Seeds',\n 'slug' => 'sunflower-seeds',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 6,\n ],\n [\n 'id' => 13,\n 'title' => 'Fruit Tea',\n 'slug' => 'fruit-tea',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 7,\n ],\n [\n 'id' => 14,\n 'title' => 'Yellow Apricot',\n 'slug' => 'yellow-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 15,\n 'title' => 'Natural Brown Apricot',\n 'slug' => 'natural-brown-apricot',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 2,\n ],\n [\n 'id' => 16,\n 'title' => 'Herbs',\n 'slug' => 'herbs',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 17,\n 'title' => 'Spices',\n 'slug' => 'spices',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 3,\n ],\n [\n 'id' => 18,\n 'title' => 'Cinnamon Powder',\n 'slug' => 'cinnamon-powder',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 19,\n 'title' => 'Cinnamon Sticks',\n 'slug' => 'cinnamon-sticks',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 16,\n ],\n [\n 'id' => 20,\n 'title' => 'Paprika',\n 'slug' => 'paprika',\n 'seo_title' => 'Register Seo Title',\n 'seo_description' => 'Register Seo Description',\n 'parent_id' => 17,\n ],\n\n ];\n\n\n Category::insert($categories);\n //Category::factory(1)->create();\n }", "public static function getParents()\n {\n $tableCategoriesLevelOne=CategoriesLevelOne::tableName();\n $dependency = new DbDependency;\n $dependency->sql=\"SELECT MAX(id) FROM $tableCategoriesLevelOne\";\n $query=Category::getDb()->cache(function($db)\n {\n return Category::find()->orderBy(\"order_by ASC\")->with(['relationCategoriesLevelOne'])->all();\n }, Yii::$app->params['7_day_cache'], $dependency);\n\n return $query;\n }", "public function extractImportedCategories()\n {\n $categories = [];\n /** @var \\Shopware\\CustomModels\\Connect\\Attribute $attribute */\n foreach ($this->attributeRepository->findRemoteArticleAttributes() as $attribute) {\n $categories = array_merge($categories, $attribute->getCategory());\n }\n\n return $this->convertTree($this->categoryResolver->generateTree($categories));\n }", "function read_Categories() {\n\n\t\tglobal $myCategories;\n\t\tglobal $gesamt;\n\t\t\n\t\t$i = 0;\n\t\t\n\t\tforeach ($myCategories as $catInfo):\n\t\t\n\t\t$test=$myCategories->category[$i]['typ'];\n\t\t\n\t\tarray_push($gesamt, $test);\n\t\t\n\t\t$i++;\n\t\tendforeach;\t\n\t\t\n\t}", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "public function getAllMainCategories(){\n\t\t$query = $this->db->query('\n\t\t\tselect c.id, c.name\n\t\t\tfrom food_category c\n\t\t\twhere\n\t\t\t\tmain = 1\n\t\t\torder by\n\t\t\t\tname asc');\n\t\treturn $query->result();\n\t}", "function fillInCategories()\n {\n #echo \"eZNewsFlowerArticleCreator::fillInCategories()<br />\\n\";\n\n $name = $this->IniObject->GlobalIni->read_var( \"eZNewsCustomer\", \"Name\" );\n $itemType = new eZNewsItemType( \"flowercategory\" );\n $changeType = new eZNewsChangeType( \"publish\" );\n \n $categories = new eZNewsItem( $name );\n $categories->getChildren( &$childrenItems, $count );\n\n $canonicalParent = $this->Item->getIsCanonical();\n\n $i = 0;\n foreach( $childrenItems as $child )\n {\n $child->get( $outID );\n if( $child->ItemTypeID() == $itemType->ID() && $changeType->ID() == $child->status() )\n {\n $this->IniObject->set_var( \"item_id\", $child->ID() );\n $this->IniObject->set_var( \"item_name\", $child->name() );\n $this->IniObject->set_var( \"Selected\", \"\" );\n if( $i == 0 && empty( $canonicalParent ) )\n {\n $this->IniObject->set_var( \"Selected\", \"selected\" );\n }\n\n if( $child->ID() == $canonicalParent || $child->Name() == $canonicalParent ) \n {\n $this->IniObject->set_var( \"Selected\", \"selected\" );\n }\n \n $this->IniObject->parse( \"item\", \"item_template\", true );\n \n $i++;\n }\n }\n }", "function getCatTitleSort( &$categories, $level = 0, $parent = 0, $out = false, $log = false, $bread_crumbs = false )\n\t{\n\t\tforeach ($categories as $index => $category)\n\t\t{\n\t\t\tif ( $category['Parent_ID'] == $parent )\n\t\t\t{\n\t\t\t\t$bread_crumbs[$category['ID']] = $category['Parent_ID'];\n\t\t\t\t$tmp[$category['ID']] = $category;\n\t\t\t\t$tmp[$category['ID']]['pName'] = 'categories+name+'. $category['Key'];\n\t\t\t\t$tmp[$category['ID']]['margin'] = $category['Level'] * 10 + 5;\n\t\t\t\t$log[$category['Level']][$category['ID']] = $category['ID'];\n\t\t\t\tunset($categories[$index]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this -> rlArraySort($tmp, 'name');\n\t\t\n\t\tforeach ( $tmp as $t_item )\n\t\t{\n\t\t\t$ttmp[$t_item['ID']] = $t_item;\n\t\t}\n\t\t$tmp = $ttmp;\n\t\tunset($ttmp);\n\t\t\n\t\t$next_parent = array_shift($log[$level]);\n\n\t\tif ( empty($out) )\n\t\t{\n\t\t\t$out = $tmp;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $tmp )\n\t\t\t{\n\t\t\t\t$relations = $this -> getCatTitleBC($bread_crumbs, $parent);\n\t\t\t\teval('$out'. $relations .' = $tmp;');\n\t\t\t}\n\t\t}\n\t\tunset($tmp, $relations);\n\t\t\n\t\tif ( empty($log[$level]) )\n\t\t{\n\t\t\tunset($log[$level]);\n\t\t\t$level++;\n\t\t}\n\t\t\n\t\t//if ( !empty($log) && !empty($categories) )\n\t\tif ( $next_parent && !empty($categories) )\n\t\t{\n\t\t\treturn $this -> getCatTitleSort($categories, $level, $next_parent, $out, $log, $bread_crumbs);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $out;\n\t\t}\n\t}", "function getCategories($categories, &$result, $parent_id = 0, $depth = 0)\n {\n $cats = $categories->filter(function ($item) use ($parent_id) {\n return $item->parent_id == $parent_id;\n });\n\n //loop through them\n foreach ($cats as $cat)\n {\n //add category. Don't forget the dashes in front. Use ID as index\n $result[$cat->id] = str_repeat('-', $depth) . ($depth ? ' ' : '') . $cat->name;\n //go deeper - let's look for \"children\" of current category\n $this->getCategories($categories, $result, $cat->id, $depth + 1);\n }\n }", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "public function getCategories() : array;", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public static function getCategoryData()\n\t{\n\n\t\tstatic $cats;\n\n\t\t$app = Factory::getApplication();\n\n\t\tif (!isset($cats))\n\t\t{\n\t\t\t$db = Factory::getDbo();\n\n\t\t\t$sql = \"SELECT c.* FROM #__categories as c WHERE extension='\" . JEV_COM_COMPONENT . \"' order by c.lft asc\";\n\t\t\t$db->setQuery($sql);\n\t\t\t$cats = $db->loadObjectList('id');\n\t\t\tforeach ($cats as &$cat)\n\t\t\t{\n\t\t\t\t$cat->name = $cat->title;\n\t\t\t\t$params = new JevRegistry($cat->params);\n\t\t\t\t$cat->color = $params->get(\"catcolour\", \"\");\n\t\t\t\t$cat->overlaps = $params->get(\"overlaps\", 0);\n\t\t\t}\n\t\t\tunset ($cat);\n\n\t\t\t$app->triggerEvent('onGetCategoryData', array(& $cats));\n\n\t\t}\n\n\t\t$app->triggerEvent('onGetAccessibleCategories', array(& $cats, false));\n\n\n\t\treturn $cats;\n\t}", "public function Categorylist()\n{\n $CI = & get_instance();\n $CI->load->model(array('Common_model'));\n $data['categories'] = $CI->Common_model->get_category(0,0,0,1,1);//(1,1)//(getting only parent is vechicles,show_in_navigation_menu is yes)\n //echo $CI->db->last_query();\n return $data;\n}", "public function fancytreeSupportData()\n {\n $processReaction = $this->manageCategoryEngine\n ->getAllCategories();\n\n return __processResponse($processReaction, [], $processReaction['data']);\n }", "function get_subcategories($categoryid) {\r\n global $DB;\r\n\r\n $subcategories = $DB->get_records('question_categories', array('parent' => $categoryid), 'id');\r\n\r\n foreach ($subcategories as $subcategory) {\r\n $subcategories = array_merge($subcategories, get_subcategories($subcategory->id));\r\n }\r\n\r\n return $subcategories;\r\n}", "public static function treeCategories(): array\n {\n return JEasyUi::jsonFormat(self::parentCategories());\n }", "function categories($prefix_subcategories = true)\n{\n $temp = [];\n $temp['01-00'] = 'Arts';\n $temp['01-01'] = 'Design';\n $temp['01-02'] = 'Fashion & Beauty';\n $temp['01-03'] = 'Food';\n $temp['01-04'] = 'Books';\n $temp['01-05'] = 'Performing Arts';\n $temp['01-06'] = 'Visual Arts';\n\n $temp['02-00'] = 'Business';\n $temp['02-02'] = 'Careers';\n $temp['02-03'] = 'Investing';\n $temp['02-04'] = 'Management';\n $temp['02-06'] = 'Entrepreneurship';\n $temp['02-07'] = 'Marketing';\n $temp['02-08'] = 'Non-Profit';\n\n $temp['03-00'] = 'Comedy';\n $temp['03-01'] = 'Comedy Interviews';\n $temp['03-02'] = 'Improv';\n $temp['03-03'] = 'Stand-Up';\n\n $temp['04-00'] = 'Education';\n $temp['04-04'] = 'Language Learning';\n $temp['04-05'] = 'Courses';\n $temp['04-06'] = 'How To';\n $temp['04-07'] = 'Self-Improvement';\n\n $temp['20-00'] = 'Fiction';\n $temp['20-01'] = 'Comedy Fiction';\n $temp['20-02'] = 'Drama';\n $temp['20-03'] = 'Science Fiction';\n\n $temp['06-00'] = 'Government';\n\n $temp['30-00'] = 'History';\n\n $temp['07-00'] = 'Health & Fitness';\n $temp['07-01'] = 'Alternative Health';\n $temp['07-02'] = 'Fitness';\n // $temp['07-03'] = 'Self-Help';\n $temp['07-04'] = 'Sexuality';\n $temp['07-05'] = 'Medicine';\n $temp['07-06'] = 'Mental Health';\n $temp['07-07'] = 'Nutrition';\n\n $temp['08-00'] = 'Kids & Family';\n $temp['08-01'] = 'Education for Kids';\n $temp['08-02'] = 'Parenting';\n $temp['08-03'] = 'Pets & Animals';\n $temp['08-04'] = 'Stories for Kids';\n\n $temp['40-00'] = 'Leisure';\n $temp['40-01'] = 'Animation & Manga';\n $temp['40-02'] = 'Automotive';\n $temp['40-03'] = 'Aviation';\n $temp['40-04'] = 'Crafts';\n $temp['40-05'] = 'Games';\n $temp['40-06'] = 'Hobbies';\n $temp['40-07'] = 'Home & Garden';\n $temp['40-08'] = 'Video Games';\n\n $temp['09-00'] = 'Music';\n $temp['09-01'] = 'Music Commentary';\n $temp['09-02'] = 'Music History';\n $temp['09-03'] = 'Music Interviews';\n\n $temp['10-00'] = 'News';\n $temp['10-01'] = 'Business News';\n $temp['10-02'] = 'Daily News';\n $temp['10-03'] = 'Entertainment News';\n $temp['10-04'] = 'News Commentary';\n $temp['10-05'] = 'Politics';\n $temp['10-06'] = 'Sports News';\n $temp['10-07'] = 'Tech News';\n\n $temp['11-00'] = 'Religion & Spirituality';\n $temp['11-01'] = 'Buddhism';\n $temp['11-02'] = 'Christianity';\n $temp['11-03'] = 'Hinduism';\n $temp['11-04'] = 'Islam';\n $temp['11-05'] = 'Judaism';\n $temp['11-06'] = 'Religion';\n $temp['11-07'] = 'Spirituality';\n\n $temp['12-00'] = 'Science';\n $temp['12-01'] = 'Medicine';\n $temp['12-02'] = 'Natural Sciences';\n $temp['12-03'] = 'Social Sciences';\n $temp['12-04'] = 'Astronomy';\n $temp['12-05'] = 'Chemistry';\n $temp['12-06'] = 'Earth Sciences';\n $temp['12-07'] = 'Life Sciences';\n $temp['12-08'] = 'Mathematics';\n $temp['12-09'] = 'Nature';\n $temp['12-10'] = 'Physics';\n\n $temp['13-00'] = 'Society & Culture';\n // $temp['13-01'] = 'History';\n $temp['13-02'] = 'Personal Journals';\n $temp['13-03'] = 'Philosophy';\n $temp['13-04'] = 'Places & Travel';\n $temp['13-05'] = 'Relationships';\n $temp['13-06'] = 'Documentary';\n\n $temp['14-00'] = 'Sports';\n $temp['14-05'] = 'Baseball';\n $temp['14-06'] = 'Basketball';\n $temp['14-07'] = 'Cricket';\n $temp['14-08'] = 'Fantasy Sports';\n $temp['14-09'] = 'Football';\n $temp['14-10'] = 'Golf';\n $temp['14-11'] = 'Hockey';\n $temp['14-12'] = 'Rugby';\n $temp['14-13'] = 'Running';\n $temp['14-14'] = 'Soccer';\n $temp['14-15'] = 'Swimming';\n $temp['14-16'] = 'Tennis';\n $temp['14-17'] = 'Volleyball';\n $temp['14-18'] = 'Wilderness';\n $temp['14-19'] = 'Wrestling';\n\n $temp['15-00'] = 'Technology';\n\n $temp['50-00'] = 'True Crime';\n\n $temp['16-00'] = 'TV & Film';\n $temp['16-01'] = 'After Shows';\n $temp['16-02'] = 'Film History';\n $temp['16-03'] = 'Film Interviews';\n $temp['16-04'] = 'Film Reviews';\n $temp['16-05'] = 'TV Reviews';\n\n if ($prefix_subcategories) {\n foreach ($temp as $key => $val) {\n $parts = explode('-', $key);\n $cat = $parts[0];\n $subcat = $parts[1];\n\n if ($subcat != '00') {\n $temp[$key] = $temp[$cat.'-00'].' > '.$val;\n }\n }\n }\n\n return $temp;\n}", "function get_category_data( $adunit = false ) {\n\t$exposed_values = array();\n\t$parent_categories = array();\n\t$sub_categories = array();\n\t$exposed_values['parent_categories'] = 'no_value';\n\t$exposed_values['sub_categories'] = 'no_value';\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\t$category_tax = 'category';\n\t\t$categories = get_the_terms( $post->ID, $category_tax );\n\t\tif ( ! empty( $categories ) ) {\n\t\t\tforeach ( $categories as $term ) {\n\t\t\t\t$ancestors = get_ancestors( $term->term_id, $category_tax );\n\t\t\t\tif ( ! empty( $ancestors ) ) {\n\t\t\t\t\tforeach ( $ancestors as $ancestor ) {\n\t\t\t\t\t\t$remove[] = \"'\";\n\t\t\t\t\t\tif ( ! $adunit ) {\n\t\t\t\t\t\t\t$remove[] = '-';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ancestor_term = get_term( $ancestor );\n\t\t\t\t\t\tarray_push( $parent_categories, str_replace( $remove, '', $ancestor_term->slug ) );\n\t\t\t\t\t\tarray_push( $sub_categories, str_replace( $remove, '', $term->slug ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$term_slug = $term->slug;\n\t\t\t\t\tarray_push( $parent_categories, $term_slug );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$filter_similar_parent_cats = array_unique( $parent_categories, SORT_STRING );\n\t\t\t$parent_categories = implode( ', ', $filter_similar_parent_cats );\n\t\t\t$filter_similar_sub_cats = array_unique( $sub_categories, SORT_STRING );\n\t\t\t$sub_categories = implode( ', ', $filter_similar_sub_cats );\n\t\t\tif ( ! empty( $parent_categories ) ) {\n\t\t\t\t$exposed_values['parent_categories'] = $parent_categories;\n\t\t\t}\n\t\t\tif ( ! empty( $sub_categories ) ) {\n\t\t\t\t$exposed_values['sub_categories'] = $sub_categories;\n\t\t\t}\n\t\t}\n\t} elseif ( is_category() || is_archive() ) {\n\t\t$q_object = get_queried_object();\n\t\t// WP_Post_Type archives don't have a \"slug\" property.\n\t\tif ( ! empty( $q_object->slug ) ) {\n\t\t\t$cat_slug = $q_object->slug;\n\t\t\t$exposed_values['parent_categories'] = $cat_slug;\n\t\t\t$exposed_values['sub_categories'] = $cat_slug;\n\t\t}\n\t\tif ( is_post_type_archive( 'joke' ) ) {\n\t\t\t$exposed_values['parent_categories'] = 'jokes';\n\t\t\t$exposed_values['sub_categories'] = 'jokes';\n\t\t}\n\t} elseif ( is_page() ) {\n\t\t$exposed_values['parent_categories'] = 'misc';\n\t\t$exposed_values['sub_categories'] = 'misc';\n\t} elseif ( is_home() && is_front_page() ) {\n\t\t$exposed_values['parent_categories'] = 'homepage';\n\t\t$exposed_values['sub_categories'] = 'homepage';\n\t}\n\treturn $exposed_values;\n}", "public function getProductCollectionFromCategoryLeft() {\n $categoryId = $this->getCurrentcat();\n $not_in_array_left = $this->getProductCollectionFromThreeRow();\n $not_in_array_parent = $this->getProductId();\n $not_in_array = array_merge($not_in_array_left, $not_in_array_parent);\n\t $category = $this->categoryFactory->create()->load($categoryId);\n\t $collection = $category->getProductCollection()->addAttributeToSelect('*')\n\t ->addAttributeToFilter('type_id', array('eq' => 'grouped'))\n ->addAttributeToFilter('status',\\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED)->setPageSize(10)\n ->addAttributeToFilter('entity_id', array('nin' => $not_in_array));\n return $collection;\n \t}" ]
[ "0.6431287", "0.628329", "0.62236667", "0.61234224", "0.6120856", "0.5991601", "0.5969033", "0.59373623", "0.59091896", "0.5882585", "0.58429545", "0.58425784", "0.58111674", "0.57841706", "0.5761384", "0.5739707", "0.5735731", "0.57079184", "0.56722015", "0.5649777", "0.56227356", "0.5608041", "0.55937254", "0.5591214", "0.5554408", "0.5524789", "0.55146205", "0.550912", "0.5489542", "0.5485045", "0.547082", "0.54630136", "0.54569274", "0.5455613", "0.5455613", "0.54460275", "0.5434998", "0.54118276", "0.5408881", "0.53945875", "0.5380826", "0.5374305", "0.5371578", "0.5368366", "0.53576237", "0.53562754", "0.53491783", "0.53466856", "0.53377426", "0.5334499", "0.532906", "0.5319196", "0.5311665", "0.5308871", "0.53044474", "0.53044474", "0.5303685", "0.53003746", "0.5297336", "0.5296406", "0.52928954", "0.5279298", "0.52750874", "0.5251705", "0.52489334", "0.52342695", "0.5233773", "0.5232659", "0.5217777", "0.5208454", "0.5205857", "0.51944923", "0.5192138", "0.5187615", "0.5179574", "0.5179427", "0.5169333", "0.5160448", "0.515378", "0.5153536", "0.51385826", "0.5131549", "0.51265323", "0.51243013", "0.51133776", "0.5110998", "0.51048476", "0.5101905", "0.5096214", "0.50914824", "0.5088925", "0.508572", "0.50845414", "0.50843185", "0.50785506", "0.50732106", "0.5072645", "0.50654024", "0.5065397", "0.5063388" ]
0.5641655
20
Get the structure from the testCase to the first test category. Returns all inversed testCategories tree
function getParentCategoriesForTestCase($testCaseID, $clientID) { global $definitions; //get item type $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID); //get property $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID); //First, get the parent test category for the test case $categoryID = getItemPropertyValue($testCaseID, $testCasesParentPropertyID, $clientID); //return all categories return getParentCategoriesForCategory($categoryID, $clientID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "function getAllTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //First, we need the tree categories\n $tree = getItemsTree($itemTypeTestCasesCategoriesID, $clientID, $testCategoryParentPropertyID, $parentCategoryID);\n\n //Transform the items tree and store the ids in an unidimensional array\n $allCategories = array();\n\n //First, add the parentCategoryID\n $allCategories[] = $parentCategoryID;\n\n if ($tree) {\n foreach ($tree as $parid => $parent) {\n\n if (!in_array($parid, $allCategories)) {\n //Add the value\n $allCategories[] = $parid;\n }\n\n foreach ($parent as $child) {\n $id = $child['ID'];\n\n //Check if the values does not exist in the allCategories array.\n if (!in_array($id, $allCategories)) {\n //Add the value\n $allCategories[] = $id;\n }\n }\n }\n }\n\n //And return the testCategories\n return ($allCategories);\n}", "public function testSortByHierarchy() {\n // Create\n $this->phactory->create('kb_category');\n\n // Sort them\n $categories = $this->kb_category->sort_by_hierarchy();\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertNotNull( $category->depth );\n }", "public function getPartialTreeDataProvider()\n {\n // Case #0.\n $cat1 = $this->buildCategory(\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $out[] = [new \\ArrayIterator([$cat1]), 5, 'cat1', [$cat1]];\n\n // Case #1 test finding in deeper level with multiple side categories.\n $cat2 = $this->buildCategory(\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat3 = $this->buildCategory(\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ]\n );\n\n $cat4 = $this->buildCategory(\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ]\n );\n\n $cat41 = $this->buildCategory(\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat42 = $this->buildCategory(\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ]\n );\n\n $cat421 = $this->buildCategory(\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ]\n );\n\n $tree = [$cat1, $cat2, $cat3, $cat4];\n\n $cat4->setChild('cat42', $cat42);\n $cat4->setChild('cat41', $cat41);\n $cat42->setChild('cat421', $cat421);\n\n $out[] = [new \\ArrayIterator($tree), 5, 'cat42', [$cat42]];\n\n // Case #2 test with improper arguments.\n $out[] = [[], 0, null, null, 'Category Id must be defined on getPartialTree() method'];\n\n return $out;\n }", "public function getCategoryTree() {\n $categories = TableRegistry::get('Categories');\n\n $first_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'slug'\n ])->where([\n 'level' => '0',\n 'status' => '1'\n ])->toArray();\n\n $second_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '1',\n 'status' => '1'\n ])->toArray();\n\n $second_category_array = array();\n\n foreach ($second_level_categories as $second_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($second_category_array [$second_category ['parent_id']]))\n $second_category_array [$second_category ['parent_id']] = array();\n $second_category_array [$second_category ['parent_id']] [] = $second_category;\n }\n\n $third_level_categories = $categories->find()->select([\n 'id',\n 'title',\n 'parent_id',\n 'slug'\n ])->where([\n 'level' => '2',\n 'status' => '1'\n ])->toArray();\n\n $third_category_array = array();\n\n foreach ($third_level_categories as $third_category) {\n // $second_category_array[$second_category['parent_id']] = array();\n if (!is_array($third_category_array [$third_category ['parent_id']]))\n $third_category_array [$third_category ['parent_id']] = array();\n $third_category_array [$third_category ['parent_id']] [] = $third_category;\n }\n\n return [\n $first_level_categories,\n $second_category_array,\n $third_category_array\n ];\n }", "function get_categories_tree() {\n\t\tglobal $db;\n\t\t$sql = \" SELECT id, name, parent_id AS parent_id \n\t\t\t\tFROM \" . $this->table_category;\n\t\t$db->query ( $sql );\n\t\t$categories = $db->getObjectList ();\n\t\t\n\t\t$tree = FSFactory::getClass ( 'tree', 'tree/' );\n\t\t$rs = $tree->indentRows ( $categories, 1 );\n\t\treturn $rs;\n\t}", "function getCategoryTree($db) {\n // Make Category Tree\n $query = \"SELECT `COMPLAINT_TYPE`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $category['name'] = trim($row[\"COMPLAINT_TYPE\"], ' /');\n $category['COMPLAINT_TYPE'] = $row[\"COMPLAINT_TYPE\"];\n $category['slug'] = slugify($category['name']);\n $category['count'] = $row[\"COUNT(*)\"];\n if( $category['slug'] != 'n-a' && $category['slug'] != 'select-one' && $category['slug'] != 'other' ){\n $topCategories[$category['slug']]=$category;\n }\n }\n\n $query = \"SELECT `COMPLAINT_TYPE`, `DESCRIPTOR`, COUNT(*) FROM `cases` WHERE `BOROUGH` != '' GROUP BY `COMPLAINT_TYPE`, `DESCRIPTOR` ORDER BY COUNT(*) DESC\";\n foreach( $db->query($query) as $row ) {\n $subCategory['name'] = trim($row[\"DESCRIPTOR\"], ' /');\n $subCategory['DESCRIPTOR'] = $row[\"DESCRIPTOR\"];\n $subCategory['slug'] = slugify($subCategory['name']);\n $subCategory['count'] = $row[\"COUNT(*)\"];\n if(\n trim($row['COMPLAINT_TYPE']) != ''\n && $subCategory['slug'] != 'n-a'\n && $subCategory['slug'] != 'select'\n ){\n $topCategories[slugify($row['COMPLAINT_TYPE'])]['subCategories'][$subCategory['slug']]=$subCategory;\n }\n }\n\n return $topCategories;\n}", "public static function getCategoryTree() {\n $catModel = new \\App\\Category();\n $catTree = $catModel->getCategoryTree();\n return $catTree;\n }", "function getParentCategoriesForCategory($categoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //start loop with passed category\n $aux = $categoryID;\n\n $categoriesArray = array();\n\n //search parent category until 0 level reached\n while ($aux != 0) {\n $categoriesArray[] = $aux;\n $aux = getItemPropertyValue($aux, $testCategoryParentPropertyID, $clientID);\n }\n\n //return categories array\n return $categoriesArray;\n}", "function getAllTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside\n $allCategories = getAllTestCategoriesInsideACategory($parentCategoryID, $clientID);\n\n $toFilter = implode(',', $allCategories);\n\n //When we have all the categories inside, get their test cases\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function getCategoryHierarchyAsArray()\n{\n return array\n (\n array\n (\n 'idString' => '1' ,\n 'idParentString' => null ,\n 'name' => 'Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1' ,\n 'idParentString' => '1' ,\n 'name' => 'Cons',\n 'children' => array\n (\n array('idString' => '1-1-1', 'idParentString' => '1-1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-1-2', 'idParentString' => '1-1', 'name' => 'ConsultingB', 'children' => array()),\n array('idString' => '1-1-3', 'idParentString' => '1-1', 'name' => 'Management ', 'children' => array()),\n array\n (\n 'idString' => '1-1-4' ,\n 'idParentString' => '1-1' ,\n 'name' => 'More Categories',\n 'children' => array\n (\n array('idString' => '1-1-4-1', 'idParentString' => '1-1-4', 'name' => 'Cat1', 'children' => array()),\n array('idString' => '1-1-4-2', 'idParentString' => '1-1-4', 'name' => 'Cat2', 'children' => array()),\n array\n (\n 'idString' => '1-1-4-3' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Still more categories',\n 'children' => array\n (\n array\n (\n 'idString' => '1-1-4-3-1',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatA' ,\n 'children' => array()\n ),\n array\n (\n 'idString' => '1-1-4-3-2',\n 'idParentString' => '1-1-4-3' ,\n 'name' => 'CatB' ,\n 'children' => array()\n )\n )\n ),\n array\n (\n 'idString' => '1-1-4-4' ,\n 'idParentString' => '1-1-4' ,\n 'name' => 'Category 3',\n 'children' => array()\n )\n )\n )\n )\n ),\n array('idString' => '1-2', 'idParentString' => '1', 'name' => 'ConsultingA', 'children' => array()),\n array('idString' => '1-3', 'idParentString' => '1', 'name' => 'ConsultingB', 'children' => array())\n )\n ),\n array\n (\n 'idString' => '2' ,\n 'idParentString' => null ,\n 'name' => 'Not Approved',\n 'children' => array\n (\n array\n (\n 'idString' => '2-1' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 1',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-2' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 2',\n 'children' => array()\n ),\n array\n (\n 'idString' => '2-3' ,\n 'idParentString' => '2' ,\n 'name' => 'Consulting - 3',\n 'children' => array()\n )\n )\n )\n );\n}", "function retrieveHierarchy() {\r\n\t\t$arrCats = $this->generateTreeByLevels(3);\r\n\t\t\r\n\t\treturn $arrCats;\r\n\t}", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }", "public function getChildCategories()\n {\n if (!$this->hasData('category_tabs')) {\n $currentCategory = $this->getMainCategory();\n $results = [];\n if ($currentCategory) {\n $tabIds = $currentCategory->getData('sss_category_tab_ids');\n if (!is_array($tabIds)) {\n $tabIds = explode(',', $tabIds);\n }\n /**\n * Enable Catalog Category Flat ... \n * @var $tabCollection \\Magento\\Catalog\\Model\\ResourceModel\\Category\\Flat\\Collection\n */\n if ($currentCategory->getUseFlatResource()) {\n $tabCollection = $currentCategory->getCollection();\n\n $tabCollection\n ->addIsActiveFilter()\n ->addAttributeToSelect('include_in_menu')\n ->addAttributeToSelect('sss_custom_tab_title')\n ->addAttributeToSelect('position')\n ->addAttributeToSelect('sss_tab_position')\n ->addAttributeToSelect('name')\n ->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES)\n ->addFieldToFilter('parent_id', ['eq' => $currentCategory->getId()]);\n\n $tabCollection->getSelect()\n ->orWhere('main_table.entity_id in (?)', $tabIds, \\Magento\\Framework\\DB\\Select::TYPE_CONDITION);\n\n $results = $tabCollection->getItems();\n } else {\n $tabCollection = $currentCategory->getChildrenCategories();\n if ($tabCollection instanceof AbstractCollection) {\n $tabCollection->setLoadProductCount(false);\n $tabCollection->addAttributeToSelect('sss_custom_tab_title');\n $tabCollection->addLevelFilter(3);\n try {\n $tabCollection->addAttributeToFilter('sss_visible_in_tab', SourceBoolean::VALUE_YES);\n } catch (\\Exception $e) {\n }\n $results = $tabCollection->getItems();\n } else {\n foreach ($tabCollection as $childCategory) {\n if (3 == $childCategory->getLevel()) {\n $results[] = $childCategory;\n }\n }\n }\n }\n usort($results, function ($first, $second) {\n if ($first->getData('sss_tab_position') || $second->getData('sss_tab_position')) {\n return $first->getData('sss_tab_position') >= $second->getData('sss_tab_position');\n } else {\n return $first->getData('position') >= $second->getData('position');\n }\n });\n }\n $this->setData('category_tabs', $results);\n }\n return $this->getData('category_tabs');\n }", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function getTree()\n {\n return HandbookCategory::all()->toTree();\n }", "function get_all_comic_categories() {\n global $comiccat, $category_tree, $non_comic_categories;\n\n $categories_by_id = get_all_category_objects_by_id();\n\n foreach (array_keys($categories_by_id) as $category_id) {\n $category_tree[] = $categories_by_id[$category_id]->parent . '/' . $category_id;\n }\n\n do {\n $all_ok = true;\n for ($i = 0; $i < count($category_tree); ++$i) {\n $current_parts = explode(\"/\", $category_tree[$i]);\n if (reset($current_parts) != 0) {\n\n $all_ok = false;\n for ($j = 0; $j < count($category_tree); ++$j) {\n $j_parts = explode(\"/\", $category_tree[$j]);\n\n if (end($j_parts) == reset($current_parts)) {\n $category_tree[$i] = implode(\"/\", array_merge($j_parts, array_slice($current_parts, 1)));\n break;\n }\n }\n }\n }\n } while (!$all_ok);\n\n $non_comic_tree = array();\n\n if (get_option('comicpress-enable-storyline-support') == 1) {\n $result = get_option(\"comicpress-storyline-category-order\");\n if (!empty($result)) {\n $category_tree = explode(\",\", $result);\n }\n $non_comic_tree = array_keys($categories_by_id);\n foreach ($category_tree as $node) {\n $parts = explode(\"/\", $node);\n $category_id = end($parts);\n if ($parts[1] == $comiccat) {\n if (($index = array_search($category_id, $non_comic_tree)) !== false) {\n array_splice($non_comic_tree, $index, 1);\n }\n }\n }\n } else {\n $new_category_tree = array();\n foreach ($category_tree as $node) {\n $parts = explode(\"/\", $node);\n if ($parts[1] == $comiccat) {\n $new_category_tree[] = $node;\n } else {\n $non_comic_tree[] = end($parts);\n }\n }\n $category_tree = $new_category_tree;\n }\n\n $non_comic_categories = implode(\" and \", $non_comic_tree);\n}", "public function findCategories();", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function getCategoryLimitedSortedTree()\n {\n $page = $this->request->getParam('p') ?: 1;\n $beginPageValue = ($page * $this->getLimitPerPage()) - $this->getLimitPerPage();\n $categories = $this->getCategoriesTree();\n $categories = array_splice($categories, $beginPageValue, $this->getLimitPerPage());\n\n return $categories;\n }", "public function getCategories();", "public function getCategories();", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getCategoriesAndParents() {\n\t\t$cats = array();\n\t\tif ($this->categories) {\n\t\t\t$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['camaliga']);\n\t\t\t$catMode = intval($configuration[\"categoryMode\"]);\n\t\t\t$lang = intval($GLOBALS['TSFE']->config['config']['sys_language_uid']);\n\t\t\t// Step 1: select all categories of the current language\n\t\t\t$categoriesUtility = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('\\quizpalme\\Camaliga\\Utility\\AllCategories');\n\t\t\t$all_cats = $categoriesUtility->getCategoriesarrayComplete();\n\t\t\t// Step 2: aktuelle orig_uid herausfinden\n\t\t\t$orig_uid = intval($this->getUid());\t// ist immer die original uid (nicht vom übersetzten Element!)\n\t\t\tif ($lang > 0 && $catMode == 0) {\n\t\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t'uid',\n\t\t\t\t\t\t'tx_camaliga_domain_model_content',\n\t\t\t\t\t\t'deleted=0 AND hidden=0 AND sys_language_uid=' . $lang . ' AND t3_origuid=' . $orig_uid);\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4))\n\t\t\t\t\t\tif ($row['uid']) {\n\t\t\t\t\t\t\t$orig_uid = intval($row['uid']);\t// uid of the translated element\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t\t}\n\t\t\t// Step 3: get the mm-categories of the current element (from the original or translated element)\n\t\t\t$res4 = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'uid_local',\n\t\t\t\t'sys_category_record_mm',\n\t\t\t\t\"tablenames='tx_camaliga_domain_model_content' AND uid_foreign=\" . $orig_uid);\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res4) > 0) {\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res4)){\n\t\t\t\t\t$uid = $row['uid_local'];\n\t\t\t\t\tif (!isset($all_cats[$uid]['parent'])) continue;\n\t\t\t\t\t$parent = (int) $all_cats[$uid]['parent'];\n\t\t\t\t\t//if (!$all_cats[$parent]['title'])\tcontinue;\n\t\t\t\t\tif (!isset($cats[$parent])) {\n\t\t\t\t\t\t$cats[$parent] = array();\n\t\t\t\t\t\t$cats[$parent]['childs'] = array();\n\t\t\t\t\t\t$cats[$parent]['title'] = $all_cats[$parent]['title'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($all_cats[$uid]['title'])\n\t\t\t\t\t\t$cats[$parent]['childs'][$uid] = $all_cats[$uid]['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res4);\n\t\t}\n\t\treturn $cats;\n\t}", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function categoryTree( $category ){ return $this->APICall( array('categoryTree' => $category), \"Couldn't get the category tree for \" . $category ); }", "function getCategories($object) { \n\n $R1 = new Category(); // R1 --\n $R11 = new Category(); // | | - R11 --\n $R111 = new Category(); // | | - R111\n $R112 = new Category(); // | | - R112\n $R11->addSubcategory($R111); // |\n $R11->addSubcategory($R112); // |\n $R1->addSubcategory($R11); // |\n $R2 = new Category(); // R2 --\n $R21 = new Category(); // | - R21 --\n $R211 = new Category(); // | | - R211\n $R22 = new Category(); // |\n $R221 = new Category(); // | - R22 --\n $R21->addSubcategory($R211); // | - R221\n $R22->addSubcategory($R221);\n $R2->addSubcategory($R21);\n $R2->addSubcategory($R22);\n\n $object->addCollectionEntry($R1); \n $object->addCollectionEntry($R2); \n}", "public function testListCategories()\n {\n }", "function get_categories($params=''){\n $sql = ('SELECT id, name, parentid, level FROM categories ORDER BY name');\n $cat_array = $this->db->query($sql)->result_array();\n \n //this will generate html output - probably faster, but html code is out of templates!!!\n //$output_html = $this->generate_list_html(\"-1\",$cat_array);\n \n //this is slower method, but no html code in php\n //for this option, smarty modifier(compiler) need to be installed(compiler.defun.php)\n $arr = array();\n if(!empty($params['catId']) && $params['catId'] > 0){\t\t\n //generate top category, because it is not back from recursion function \t\n $this->CreateNestedArray($cat_array, $arr, $params['catId'], 0, 20);\n $arr2[0] = $this->get_category($params['catId']);\n $arr2[0]['children'] = $arr;\n return $arr2;\n }else{\n //get all categories\n $this->CreateNestedArray($cat_array, $arr, \"-1\", 0, 20);\n return $arr;\n }\n \n return;\n }", "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "public static function getTree ($category)\n\t{\n\t\t$db = DataAccess::getInstance();\n\t\t$category = (int)$category;\n\t\tif (!$category) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$category_next = $category;\n\t\t\n\t\t$get_parent_stmt = $db->Prepare(\"SELECT c.`parent_id`, c.`in_statement`, l.`category_name` FROM \".geoTables::categories_table.\" as c, \".geoTables::categories_languages_table.\" as l WHERE c.`category_id` = l.`category_id` AND c.`category_id` = ? AND l.`language_id` = \".$db->getLanguage().\" LIMIT 1\");\n\t\t\n\t\tif (!$get_parent_stmt) {\n\t\t\ttrigger_error('ERROR SQL: message: '.$db->ErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\t$tree = array();\n\t\twhile ($category_next > 0) {\n\t\t\t/*\n\t\t\t * Store the category info in static array, one entry for each category\n\t\t\t * so we only get info for each category once for times that we need\n\t\t\t * to get category tree a bunch of times in same page load. Doing it\n\t\t\t * this way should minimize extra memory usage\n\t\t\t */\n\t\t\tif (!isset(self::$_category_tree_array[$category_next])) {\n\t\t\t\t$category_result = $db->Execute($get_parent_stmt, array($category_next));\r\n\t\t\t\t\r\n\t\t\t\tif (!$category_result) {\r\n\t\t\t\t\ttrigger_error('ERROR SQL: message: '.$db->ErrorMsg());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif ($category_result->RecordCount() == 1) {\r\n\t\t\t\t\t$show = $category_result->FetchRow();\r\n\t\t\t\t\tself::$_category_tree_array[$category_next] = array(\r\n\t\t\t\t\t\t'parent_id' => $show['parent_id'],\r\n\t\t\t\t\t\t'in_statement' => $show['in_statement'],\r\n\t\t\t\t\t\t'category_name' => geoString::fromDB($show['category_name']),\r\n\t\t\t\t\t\t'category_id' => $category_next,\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tree[] = self::$_category_tree_array[$category_next];\n\t\t\t$category_next = self::$_category_tree_array[$category_next]['parent_id'];\n\t \t}\n\t\t\n\t\t//reverse order of tree, or it will be backwards since we started from\n \t\t//the outermost cat and worked our way up.\n \t\treturn array_reverse($tree, true);\n\t}", "function getTestCasesInsideCategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $parentCategoryID);\n\n $testCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "function createTree($categories)\n{\n $tree = [];\n\n foreach ($categories as $category) {\n if (empty($category[\"parent_uid\"])) {\n $tree[] = $category;\n unset($category);\n }\n }\n\n // уровень вложенности 2\n foreach ($tree as &$itemTree) {\n foreach ($categories as $category) {\n /* if(!empty($category[\"parent_uid\"])) {\n print_r($itemTree);\n print_r($category);\n echo \"\\n\";\n echo \"tree:\\n\";\n print_r($itemTree[\"uid\"]);\n echo \"\\n category\";\n print_r($category[\"parent_uid\"]);\n exit();\n }*/\n if ($itemTree[\"uid\"] == $category[\"parent_uid\"]) {\n $itemTree[\"categories\"] = $category;\n unset($category);\n }\n }\n }\n\n return $tree;\n}", "public function getCategory() {}", "public function makeCategory() {\n $categories = NewsCategory::orderBy('sort', 'asc')->where('parent_id', 0)->get();\n $categories->map(function($d){\n $d['sub_category'] = $d->child;\n return $d;\n });\n return $categories;\n }", "function getTreeCats2($order, $ordering, $category_id, $categories_id, &$categories, $level){\n++$level;\n$cat = &JTable::getInstance('category', 'jshop');\n$cat->category_id = $category_id;\n$cats = $cat->getChildCategories($order, $ordering);\nforeach($cats as $key=>$value){\n$cats[$key]->level = $level;\n$categories[] = $value;\njShopCategoriesHelper::getTreeCats2($order, $ordering, $value->category_id, $categories_id, $categories, $level);\n}\n}", "public function getTree() {\n return $this->_buildBranch($this->root_category_id);\n }", "public function getServiceCategories($service){\n\t\t\treturn $this->loadSubTree($this->getNodeForService($service));\n\t\t}", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "public function getCategories()\n {\n if ($this->_categories === null) {\n /** @var $tree Tree */\n $tree = $this->_categoryFactory->create()->getTreeModel();\n $tree->load(null, 2);\n // Load only to second level.\n $tree->addCollectionData(null, 'position');\n $this->_categories = $tree->getNodeById(Category::TREE_ROOT_ID)->getChildren();\n }\n return $this->_categories;\n }", "public function getCategoriesForSettings() {\n \n $qb = $this->_em->createQueryBuilder();\n $qb->select('c')\n ->from('ABOMainBundle:Category', 'c')\n ->join('c.parent', 'p')\n ->addSelect('p')\n ->where('c.level = :level')\n ->setParameter('level', 2);\n \n return $qb->getQuery()->getResult();\n }", "public function getParentCategories()\n {\n return [\n 1 => [\n 'ru' => 'Готовые наборы для аэрографии',\n 'uk' => 'Готові набори для аерографії',\n 'en' => 'Ready-made airbrush kits',\n ],\n 2 => [\n 'ru' => 'Дополнительное оборудование и аксессуары для аэрографии',\n 'uk' => 'Додаткове обладнання та аксесуари для аерографії',\n 'en' => 'Additional equipment and accessories for airbrushing'\n ],\n 3 => [\n 'ru' => 'Аэрографы и компрессоры Fengda',\n 'uk' => 'Аерографи і компресори Fengda',\n 'en' => 'Fengda Airbrushes and Compressors',\n ],\n 4 => [\n 'ru' => 'Товары для аэрографии на ногтях (nail art)',\n 'uk' => 'Товари для аерографії на нігтях (nail art)',\n 'en' => 'Goods for airbrushing on nails (nail art)',\n ],\n 6 => [\n 'ru' => 'Товары для аэрографии визажистов, гримеров и др.',\n 'uk' => 'Товари для аерографії візажистів, гримерів і ін.',\n 'en' => 'Goods for aerography of make-up artists, make-up artists, etc.',\n ],\n 5 => [\n 'ru' => 'Товары для аэрографии на кондитерских изделиях',\n 'uk' => 'Товари для аерографії на кондитерських виробах',\n 'en' => 'Goods for airbrushing confectionery products',\n ],\n 7 => [\n 'ru' => 'Краски для аэрографии Createx и Wicked Colors',\n 'uk' => 'Фарби для аерографії Createx і Wicked Colors',\n 'en' => 'Paints for airbrushing Createx and Wicked Colors',\n 'not_active' => true\n ],\n 8 => [\n 'ru' => 'Краски для аэрографии Auto Air Colors',\n 'uk' => 'Фарби для аерографії Auto Air Colors',\n 'en' => 'Paints for airbrushing Auto Air Colors',\n 'not_active' => true\n ],\n 9 => [\n 'ru' => 'Аэрографы и запчасти H&S/Hansa',\n 'uk' => 'Аерографи і запчастини H&S/Hansa',\n 'en' => 'Airbrushes and spare parts H&S/Hansa',\n ]\n ];\n }", "public function getCategories()\n {\n $categories = ClassInfo::subclassesFor('ConsultationCategory');\n return $this->Children()->filter('Classname', $categories);\n }", "public function buildTree($selected_cat = 0)\n\t{\n\t\t//Save the origin dataset category_id\n\t\t$this->_dataset_stored_category_id = $selected_cat;\n\t\n\t\tif ($selected_cat=='' || $selected_cat==0)\n\t\t{\n\t\t\t$cat_array = array(\n\t\t\t\t\t\t'text'=>'eBay',\n\t\t\t\t\t\t'id'=>'1',\n\t\t\t\t\t\t'path'=>'1',\n\t\t\t\t\t\t'cls'=>'folder active-category',\n\t\t\t\t\t\t'children' => $this->_addChildren(null)\n\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cat_array = $this->_buildRecursiveTree($selected_cat);\n\t\t}\t\n\t\t\n\t\treturn $cat_array;\t\t\n\t}", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "function getTestCategoriesInsideACategory($parentCategoryID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentPropertyID, 'value' => $parentCategoryID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public function extractImportedCategories()\n {\n $categories = [];\n /** @var \\Shopware\\CustomModels\\Connect\\Attribute $attribute */\n foreach ($this->attributeRepository->findRemoteArticleAttributes() as $attribute) {\n $categories = array_merge($categories, $attribute->getCategory());\n }\n\n return $this->convertTree($this->categoryResolver->generateTree($categories));\n }", "public function getAllCategories() {\n\n if (!isset(parent::all()[0])) {\n return [];\n }\n return parent::all()[0]->children;\n }", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public function fancytreeSupportData()\n {\n $processReaction = $this->manageCategoryEngine\n ->getAllCategories();\n\n return __processResponse($processReaction, [], $processReaction['data']);\n }", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "public function testDescendants() {\n $decendants = $this->traverser->descendants('Category:Root category', function ($pageInfo, $parentCatName) {\n if ($parentCatName === 'Category:Root category') {\n $this->assertEquals('Test page A1', $pageInfo['title']);\n }\n if ($parentCatName === 'Category:Sub category C') {\n $this->assertEquals('Test page C1', $pageInfo['title']);\n }\n });\n $this->assertCount(4, $decendants);\n }", "public function getCategoryTree() {\n $q = \"select * from \".TP.\"transaction_type_master order by type,subtype1,subtype2_display_order\";\n $res = mysql_query($q);\n $ret = array();\n if (!$res) {\n return $ret;\n }\n while($row = mysql_fetch_assoc($res)) {\n $ret[$row['type']][$row['subtype1']][] = $row['subtype2'];\n //var_dump($row);\n }\n //var_Dump($ret);\n return $ret;\n }", "public function getCategories() : array;", "function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}", "public function test_Category_Tree(){\n\n\t\t$exp_total\t= Good::all()->count();\n\n\t\t$get\t= [\n\t\t\t'draw'\t=> '12'\n\t\t];\n\t\t$res\t= Good::getTableData( $get );\n\n\t\t$this->assertEquals( 12, $res['draw'], \"\\n*** Assert 1 ***\\nWrong 'draw' value\\n\" );\n\t\t$this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 2 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t\t$new_item\t= [\n\t\t\t'name'\t=> ''\n\t\t\t,'article'=> ''\n\t\t\t,'rprice'\t=> 5.567\n\t\t\t,'wprice'\t=> 4.444\n\t\t\t,'inpack'\t=> 24\n\t\t\t,'packs'\t=> 13\n\t\t\t,'assort'\t=> 17\n\t\t];\n\n\n\n\t\t$this->db['Good']\t= [];\n\t\t$items\t= &$this->db['Good'];\n\n\t for( $i=0; $i<3; $i++ ){\n\t \t$item\t= $new_item;\n\t \t$item['name']\t= self::_ut_name.'_'.$i;\n\t \t$item['article']\t= self::_ut_name.'_'.$i;\n\t\t\t$item_obj\t= new Good();\n\t \t$item_obj\t= $item_obj->fill( $item );\n\t\t $res \t= $item_obj->save();\n\n\t\t $ids[]\t=\n\t\t $item['id']\t= $item_obj->id;;\n\n\t\t\t$items[]\t= $item;\n\n\t\t $item_obj\t= NULL;\n\t }\n\n\n// print_r( $ids);\n\n// \t $ut_item_id\t= $item_obj->id;\n\n\n\t $exp_total\t= Good::all()->count();\n\t $res\t= Good::getTableData( $get );\n// \t $item_obj->delete();\n\n// \t\tGood::whereIn('id');\n\n\n\t $this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 3 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t}", "function generate_categories($keys=false,$current=null,$leaf=null,$depth=0) {\n \n \n return ($out);\n }", "function get_category_data( $adunit = false ) {\n\t$exposed_values = array();\n\t$parent_categories = array();\n\t$sub_categories = array();\n\t$exposed_values['parent_categories'] = 'no_value';\n\t$exposed_values['sub_categories'] = 'no_value';\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\t$category_tax = 'category';\n\t\t$categories = get_the_terms( $post->ID, $category_tax );\n\t\tif ( ! empty( $categories ) ) {\n\t\t\tforeach ( $categories as $term ) {\n\t\t\t\t$ancestors = get_ancestors( $term->term_id, $category_tax );\n\t\t\t\tif ( ! empty( $ancestors ) ) {\n\t\t\t\t\tforeach ( $ancestors as $ancestor ) {\n\t\t\t\t\t\t$remove[] = \"'\";\n\t\t\t\t\t\tif ( ! $adunit ) {\n\t\t\t\t\t\t\t$remove[] = '-';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ancestor_term = get_term( $ancestor );\n\t\t\t\t\t\tarray_push( $parent_categories, str_replace( $remove, '', $ancestor_term->slug ) );\n\t\t\t\t\t\tarray_push( $sub_categories, str_replace( $remove, '', $term->slug ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$term_slug = $term->slug;\n\t\t\t\t\tarray_push( $parent_categories, $term_slug );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$filter_similar_parent_cats = array_unique( $parent_categories, SORT_STRING );\n\t\t\t$parent_categories = implode( ', ', $filter_similar_parent_cats );\n\t\t\t$filter_similar_sub_cats = array_unique( $sub_categories, SORT_STRING );\n\t\t\t$sub_categories = implode( ', ', $filter_similar_sub_cats );\n\t\t\tif ( ! empty( $parent_categories ) ) {\n\t\t\t\t$exposed_values['parent_categories'] = $parent_categories;\n\t\t\t}\n\t\t\tif ( ! empty( $sub_categories ) ) {\n\t\t\t\t$exposed_values['sub_categories'] = $sub_categories;\n\t\t\t}\n\t\t}\n\t} elseif ( is_category() || is_archive() ) {\n\t\t$q_object = get_queried_object();\n\t\t// WP_Post_Type archives don't have a \"slug\" property.\n\t\tif ( ! empty( $q_object->slug ) ) {\n\t\t\t$cat_slug = $q_object->slug;\n\t\t\t$exposed_values['parent_categories'] = $cat_slug;\n\t\t\t$exposed_values['sub_categories'] = $cat_slug;\n\t\t}\n\t\tif ( is_post_type_archive( 'joke' ) ) {\n\t\t\t$exposed_values['parent_categories'] = 'jokes';\n\t\t\t$exposed_values['sub_categories'] = 'jokes';\n\t\t}\n\t} elseif ( is_page() ) {\n\t\t$exposed_values['parent_categories'] = 'misc';\n\t\t$exposed_values['sub_categories'] = 'misc';\n\t} elseif ( is_home() && is_front_page() ) {\n\t\t$exposed_values['parent_categories'] = 'homepage';\n\t\t$exposed_values['sub_categories'] = 'homepage';\n\t}\n\treturn $exposed_values;\n}", "protected function getCategories()\n {\n if (! is_null($this->categories)) {\n return $this->categories;\n }\n\n $categories = $this->app['sanatorium.categories.category']->findAll();\n\n foreach ($categories as $category) {\n $category->uri = $category->url === '/' ? null : $category->url;\n }\n\n return $this->categories = $categories;\n }", "public function fetch_category(){\n $this->db->where('parent_id', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public static function getCategoryData()\n\t{\n\n\t\tstatic $cats;\n\n\t\t$app = Factory::getApplication();\n\n\t\tif (!isset($cats))\n\t\t{\n\t\t\t$db = Factory::getDbo();\n\n\t\t\t$sql = \"SELECT c.* FROM #__categories as c WHERE extension='\" . JEV_COM_COMPONENT . \"' order by c.lft asc\";\n\t\t\t$db->setQuery($sql);\n\t\t\t$cats = $db->loadObjectList('id');\n\t\t\tforeach ($cats as &$cat)\n\t\t\t{\n\t\t\t\t$cat->name = $cat->title;\n\t\t\t\t$params = new JevRegistry($cat->params);\n\t\t\t\t$cat->color = $params->get(\"catcolour\", \"\");\n\t\t\t\t$cat->overlaps = $params->get(\"overlaps\", 0);\n\t\t\t}\n\t\t\tunset ($cat);\n\n\t\t\t$app->triggerEvent('onGetCategoryData', array(& $cats));\n\n\t\t}\n\n\t\t$app->triggerEvent('onGetAccessibleCategories', array(& $cats, false));\n\n\n\t\treturn $cats;\n\t}", "public function getCategory();", "public function getCategory();", "public function getCategory()\n {\n }", "public static function getCategoryTopLevel() {\n\t\t\t$db = Db::getInstance();\n\t\t\t// Regex that grabs all top-level categories using location\n\t\t\t$regexForTopLevel = \"^[0-9]+$\";\n\t\t\t$categoryQuery = $db->prepare('SELECT location, description \n\t\t\t\t\t\t\t\t\t\t\t FROM categories \n\t\t\t\t\t\t\t\t\t\t\tWHERE location REGEXP :regex\n\t\t\t\t\t\t\t\t\t\t ORDER BY location'\n\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$categoryQuery->execute(array('regex' => $regexForTopLevel));\n\t\t\t$allTopCategories = $categoryQuery->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $allTopCategories;\n\t\t}", "function getAllTestCategoriesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesCategoriesID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n\n //get property\n $testCategoryParentGroupID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryGroupID'], $clientID);\n\n //First, we need get all the categories that has the parent groupID\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCategoryParentGroupID, 'value' => $groupID);\n\n $testCategories = getFilteredItemsIDs($itemTypeTestCasesCategoriesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($testCategories as $tcat) {\n $onlyIds[] = $tcat['ID'];\n }\n\n return $onlyIds;\n}", "public static function getActiveCategories(){}", "public function getSubMenu(){\n\t\t$catalogue = $this->getMenu()->content;\n\t\tforeach($catalogue as $first){\n\t\t\t$noms_sub_menu = $this->GetHTTP(\n\t\t\t\t'https://api.zalando.com/categories', array(\n\t\t\t\t\t'key' => implode(\",\", $first->childKeys),\n\t\t\t\t\t'pageSize' => '20000')\n\t\t\t)->content;\n\t\t\tfor ($i = 0; $i < count($first->childKeys); $i++){\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $first->childKeys[$i];\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $noms_sub_menu[$i]->name;\n\t\t\t\tunset($first->childKeys[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $catalogue;\n\t}", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public function getCategoriesStall(){\n\t\t$this->db->query('SELECT * FROM categories_tbl WHERE type=1');\n\t\treturn $this->db->resultSet();\n\t}", "public function getCategoriesStall(){\n\t\t$this->db->query('SELECT * FROM categories_tbl WHERE type=1');\n\t\treturn $this->db->resultSet();\n\t}", "function oab_getSwappzaCategoryTree($dbcon) {\n $categories = array();\n $categoriesFinal = array();\n \n //Fetch Categories\n $stmt = $dbcon->prepare(\"SELECT categoryID,name\"\n . \" FROM SwappzaCategory WHERE ?\");\n \n if ($stmt) {\n $one = 1;\n $stmt->bind_param('d', $one);\n $stmt->execute();\n $stmt->bind_result($categoryID, $name);\n\n while ($stmt->fetch()) {\n array_push($categories, new SwappzaCategory($categoryID, $name, \"\", array()));\n }\n \n $stmt->close();\n \n //Fetch Subcategory for each category\n foreach($categories as $category) {\n $stmt = $dbcon->prepare(\"SELECT SwappzaSubCategory.subcategoryID, SwappzaSubCategory.name\"\n . \" FROM SwappzaSubCategoryOf\"\n . \" JOIN SwappzaSubCategory ON SwappzaSubCategoryOf.subcategoryID=SwappzaSubCategory.subcategoryID\"\n . \" WHERE SwappzaSubCategoryOf.categoryID=?\");\n \n if ($stmt) {\n $id = $category->getID();\n $stmt->bind_param('d', $id);\n $stmt->execute();\n $stmt->bind_result($subcategoryID, $subcategoryName);\n \n $subCategories = array();\n \n while($stmt->fetch()) {\n array_push($subCategories, new SwappzaSubCategory($subcategoryID, $subcategoryName, ''));\n }\n \n array_push($categoriesFinal,\n new SwappzaCategory(\n $category->getID(),\n $category->getName(),\n $category->getDescription(),\n $subCategories\n ));\n \n $stmt->close();\n } else {\n error_log(\"failed to prepare second statement from oab_getSwappzaCategoryTree in swappza.php\");\n }\n } \n \n } else {\n error_log(\"failed to prepare first statement from oab_getSwappzaCategoryTree in swappza.php\");\n }\n \n return $categoriesFinal; \n}", "function get_simple_categories($type='all', $parentid=false, $order=false){\n $parentid = intval($parentid);\n $where=$orderby='';\n if($type=='root') $where = 'WHERE parentid = -1';\n elseif ($type=='sub' && $parentid) $where = \"WHERE parentid = '$parentid'\";\n if($order) $orderby = ' order by name '.$order;\n $sql = \"SELECT id as catId, name as catName FROM categories \" . $where . $orderby; //, marketplaceCount\n $cats = $this->db->query($sql)->result_array();\n foreach($cats as $key=>$value){\n //$cats[$key]['marketplaceCount'] = number_format($value['marketplaceCount']);\n $haveSubCategories = $this->db_getone(\"SELECT id from categories where parentid='{$value['catId']}'\", 'id');\n if($haveSubCategories) $cats[$key]['haveSubCategories'] = 1;\n else $cats[$key]['haveSubCategories'] = 0;\n }\n return $cats;\n }", "public function testGetByParent() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get the categories\n $categories = $this->kb_category->get_by_parent( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }", "function get_cat_structure($cat_id = 0, $level = 0, $prefix = '', $prefix_id = '')\n{\n global $ce_cache, $config, $db_prefix;\n $cat_sort = $ce_cache['cat_sort'];\n $exists = false;\n\n if (!isset($ce_cache['cat_structure_html'])) {\n $ce_cache['cat_structure_html'] = '';\n }\n $res = sql_query(\"SELECT * FROM \".$db_prefix.\"product_cat WHERE parent_id='$cat_id' ORDER BY FIELD(idx,$cat_sort)\");\n while ($row = sql_fetch_array($res)) {\n if (!$exists) {\n if ($level == 0) {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"<ul id=\\\"myID\\\" class=\\\"myCLASS\\\">\\n\";\n } else {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"<ul>\\n\";\n }\n $exists = true;\n }\n\n $path = (empty($prefix)) ? $row['cat_name'] : strip_tags($prefix).' &raquo; '.$row['cat_name'];\n $path_id = (empty($prefix_id)) ? $row['idx'] : $prefix_id.','.$row['idx'];\n $ce_cache['cat_structure'][$row['idx']] = $path;\n if (!$level) {\n $ce_cache['cat_structure_top'][$row['idx']] = $row['cat_name'];\n }\n if ($config['enable_adp'] && $row['permalink']) {\n $row['url'] = $config['site_url'].'/'.$row['permalink'];\n } else {\n $row['url'] = \"$config[site_url]/shop_search.php?cat_id=$row[idx]\";\n }\n $path_link = (empty($prefix)) ? \"<a href=\\\"$row[url]\\\">$row[cat_name]</a>\" : $prefix.' &raquo; '.\"<a href=\\\"$row[url]\\\">$row[cat_name]</a>\";\n $ce_cache['cat_name_def'][$row['idx']] = $row['cat_name'];\n $ce_cache['cat_url'][$row['idx']] = $row['url'];\n $ce_cache['cat_structure_link'][$row['idx']] = $path_link;\n $ce_cache['cat_structure_id'][$row['idx']] = $path_id;\n $ce_cache['cat_permalink_def'][$row['idx']] = $row['permalink'];\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level + 1).\"<li><a href=\\\"$row[url]\\\">$row[cat_name]</a>\\n\";\n get_cat_structure($row['idx'], $level+1, $path_link, $path_id);\n }\n if ($exists) {\n $ce_cache['cat_structure_html'] .= str_repeat(\"\\t\", $level).\"</ul>\\n\";\n }\n}", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }", "public function get_categories() {\n\t\treturn [ 'happyden' ];\n\t}", "function getXMLCategoryEntry($categoryId, $indent) {\n $result = '';\n if (isset($this->categories[$categoryId]) && is_array($this->categories[$categoryId])) {\n if (isset($this->sessionParams['open_categories'][$categoryId]) &&\n isset($this->categories[$categoryId]['CATEG_COUNT']) &&\n $this->categories[$categoryId]['CATEG_COUNT'] > 0) {\n $opened = TRUE;\n } else {\n $opened = FALSE;\n }\n if (empty($this->categories[$categoryId]['CATEG_COUNT']) ||\n $this->categories[$categoryId]['CATEG_COUNT'] < 1) {\n $nodeHref = FALSE;\n $node = ' node=\"empty\"';\n if (isset($this->sessionParams['move_category']) &&\n $categoryId == (int)$this->sessionParams['move_category']) {\n $imageIndex = 'items-folder'; // 178;\n } else {\n $imageIndex = 'items-folder'; // 56;\n }\n } elseif ($opened) {\n $nodeHref = $this->getLink(\n array('cmd' => 'close_category', 'cat_close_id' => (int)$categoryId)\n );\n $node = sprintf(' node=\"open\" nhref=\"%s\"', $nodeHref);\n if (isset($this->sessionParams['move_category']) &&\n $categoryId == (int)$this->sessionParams['move_category']) {\n $imageIndex = 'items-folder'; // 179;\n } else {\n $imageIndex = 'items-folder'; // 57;\n }\n } else {\n $nodeHref = $this->getLink(\n array('cmd' => 'open_category', 'cat_open_id' => (int)$categoryId)\n );\n $node = sprintf(' node=\"close\" nhref=\"%s\"', $nodeHref);\n if (isset($this->sessionParams['move_category']) &&\n $categoryId == (int)$this->sessionParams['move_category']) {\n $imageIndex = 'items-folder'; // 178;\n } else {\n $imageIndex = 'items-folder'; // 56;\n }\n }\n if (!isset($this->categories[$categoryId]) ||\n !isset($this->categories[$categoryId]['category_title']) ||\n $this->categories[$categoryId]['category_title'] == \"\") {\n if (isset($this->alternativeCategoryNames) &&\n is_array($this->alternativeCategoryNames) &&\n isset($this->alternativeCategoryNames[$categoryId])) {\n $title = '['.$this->alternativeCategoryNames[$categoryId].']';\n } else {\n $title = $this->_gt('No Title');\n }\n } else {\n $title = $this->categories[$categoryId]['category_title'];\n }\n if ($opened) {\n $modus = 'close';\n } else {\n $modus = 'open';\n }\n if (isset($this->params) && isset($this->params['cat_id'])) {\n if (!isset($this->params['tag_id'])) {\n $selected = ($this->params['cat_id'] == $categoryId) ? ' selected=\"selected\"' : '';\n } else {\n $selected = '';\n }\n $tagResult = $this->getTagListXML($categoryId, $indent + 1);\n } else {\n $selected = '';\n $tagResult = '';\n }\n if (isset($this->params['cat_id']) && $this->params['cat_id'] == $categoryId) {\n if (isset($this->sessionParams['move_category']) &&\n $categoryId == (int)$this->sessionParams['move_category']) {\n $imageIndex = 'items-folder'; // 179;\n } else {\n $imageIndex = 'items-folder'; // 57;\n }\n }\n $result .= sprintf(\n '<listitem href=\"%s\" title=\"%s\" indent=\"%d\" image=\"%s\" %s %s>'.LF,\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cat_id' => (int)$categoryId))\n ),\n papaya_strings::escapeHTMLChars($title),\n $indent,\n papaya_strings::escapeHTMLChars($this->images[$imageIndex]),\n $node,\n $selected\n );\n $result .= '</listitem>'.LF;\n $result .= $tagResult;\n $result .= $this->getXMLCategorySubTree($categoryId, $indent + 1);\n }\n return $result;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "private function groupByCategory(){\n \n $searchResults = null;\n $items = $this->items; \n \n foreach($items as $item){\n foreach($item->categories as $category_tmp){ \n $searchResults[$category_tmp][] = $item;\n } \n }\n \n return $searchResults;\n }", "private function getCategories() {\r\n $data['categories'] = array();\r\n\r\n $this->load->model('catalog/category');\r\n\r\n $categories_1 = $this->model_catalog_category->getCategories(0);\r\n\r\n foreach ($categories_1 as $category_1) {\r\n $level_2_data = array();\r\n\r\n $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);\r\n\r\n foreach ($categories_2 as $category_2) {\r\n $level_3_data = array();\r\n\r\n $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);\r\n\r\n foreach ($categories_3 as $category_3) {\r\n $level_3_data[] = array(\r\n 'category_id' => $category_3['category_id'],\r\n 'name' => $category_3['name'],\r\n );\r\n }\r\n\r\n $level_2_data[] = array(\r\n 'category_id' => $category_2['category_id'],\r\n 'name' => $category_2['name'],\r\n 'children' => $level_3_data\r\n );\r\n }\r\n\r\n $data['categories'][] = array(\r\n 'category_id' => $category_1['category_id'],\r\n 'name' => $category_1['name'],\r\n 'children' => $level_2_data\r\n );\r\n }\r\n return $data['categories'];\r\n }", "public function getAllCategories() {\n $allCategories= $this->getCategories(); \n foreach ($allCategories as $value){\n $value->setChildren($this->getSubCategories($value->getId()));\n }\n return $allCategories;\n \n }", "function read_Categories() {\n\n\t\tglobal $myCategories;\n\t\tglobal $gesamt;\n\t\t\n\t\t$i = 0;\n\t\t\n\t\tforeach ($myCategories as $catInfo):\n\t\t\n\t\t$test=$myCategories->category[$i]['typ'];\n\t\t\n\t\tarray_push($gesamt, $test);\n\t\t\n\t\t$i++;\n\t\tendforeach;\t\n\t\t\n\t}", "public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "function getCategoryTreeAssoc()\n {\n $category_structure = $this->loadCategoryStructure();\n //echo '<pre>';\n //print_r($category_structure);\n $level = 0;\n $rs = '';\n $rs .= '<form method=\"post\">';\n $rs .= '<table border=\"0\">';\n $rs .= '<tr>';\n $rs .= '<td class=\"row_title\" colspan=\"4\"><input type=\"submit\" value=\"' . Multilanguage::_('L_TEXT_SAVE') . '\" name=\"submit\" /></td>';\n $rs .= '</tr>';\n $rs .= '<tr>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('L_TEXT_TITLE') . '</td>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('OPERATION_TYPE', 'system') . '</td>';\n $rs .= '<td class=\"row_title\">' . Multilanguage::_('ESTATE_TYPE', 'system') . '</td>';\n $rs .= '<td class=\"row_title\"></td>';\n $rs .= '</tr>';\n if (count($category_structure) > 0) {\n foreach ($category_structure['childs'][0] as $item_id => $catalog_id) {\n //echo $catalog_id.'<br>';\n $rs .= $this->getRowAssoc($catalog_id, $category_structure, $level, 'row1');\n $rs .= $this->getChildNodesRowAssoc($catalog_id, $category_structure, $level + 1, $current_category_id);\n }\n }\n $rs .= '<tr>';\n $rs .= '<input type=\"hidden\" name=\"action\" value=\"structure\" />';\n $rs .= '<input type=\"hidden\" name=\"do\" value=\"associations\" />';\n $rs .= '<td class=\"row_title\" colspan=\"4\"><input type=\"submit\" value=\"' . Multilanguage::_('L_TEXT_SAVE') . '\" name=\"submit\" /></td>';\n\n $rs .= '</tr>';\n $rs .= '</table>';\n $rs .= '</form>';\n return $rs;\n }", "public function getCurrentSubcategories()\n {\n return $this->_getHelper()->getCurrentSubcategories();\n }" ]
[ "0.6299497", "0.6204236", "0.61932635", "0.6171437", "0.60780704", "0.6059209", "0.59716314", "0.59021354", "0.5776588", "0.57236856", "0.5707779", "0.5692827", "0.5683793", "0.5652623", "0.5638312", "0.56229925", "0.5620955", "0.55915844", "0.55809176", "0.5569658", "0.5541206", "0.5538625", "0.5532774", "0.5529767", "0.5529767", "0.5523459", "0.5511091", "0.54857254", "0.54578865", "0.54497004", "0.544598", "0.5424297", "0.5416884", "0.54163915", "0.54156053", "0.54135036", "0.54111695", "0.53975296", "0.53947335", "0.53885865", "0.53708124", "0.5361476", "0.5360073", "0.5355905", "0.5346531", "0.53201723", "0.531114", "0.5307878", "0.53008133", "0.5294653", "0.5278508", "0.5275184", "0.5273873", "0.5269569", "0.5268256", "0.5264003", "0.52505004", "0.52445185", "0.52415144", "0.5234076", "0.5211604", "0.5210266", "0.5208156", "0.52080286", "0.52054334", "0.52054334", "0.5200063", "0.519034", "0.51864046", "0.51826555", "0.51799965", "0.5176787", "0.51590455", "0.51495165", "0.51495165", "0.51378006", "0.5136918", "0.5124293", "0.51066", "0.5088164", "0.5075593", "0.5068258", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50657576", "0.50638914", "0.5063805", "0.50633126", "0.50604004", "0.50493205", "0.5041014", "0.5040778", "0.5038016" ]
0.6220792
1
Adds the tests or categories that aren't in the relation
function addItemsToRelationIfNotExists($itemsList, $listToAdd) { //First, split the two lists $existingRelation = explode(',', $itemsList); $toAddIds = explode(',', $listToAdd); //Only add if previously not exists for ($i = 0; $i < count($toAddIds); $i++) { $theAddedID = $toAddIds[$i]; if (!in_array($theAddedID, $existingRelation)) { //The item does not exist $existingRelation[] = $theAddedID; } } //Finally, implode the list of categories and return //First, clear empty values $existingRelation = array_filter($existingRelation); return implode(',', $existingRelation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddCategoriesWithoutI18n()\n {\n $this->setExpectedException(ApiException::class, null, 422);\n\n $category = new Category();\n $category->setActive(true);\n $category->setPosition(1);\n $category->setVisibility([Model\\Brand::VISIBILITY_FACEBOOK]);\n\n $this->resourceAPI->addCategories($category);\n }", "public function testCategoryCanNotBeItsOwnParent(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.parent_id', $items[0]->id)\n ->emit('save')\n ->assertHasErrors(['editValues.parent_id'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertEquals(0, $items[0]->fresh()->parent()->count());\n }", "public function testCreateCategoryWithEmptyData()\n {\n $this->createCategory([])\n ->assertJsonStructure([\n 'message',\n 'errors' => [\n 'name'\n ]\n ]);\n }", "public function testCategoryData(){\n\n $count = Category::all()->count();\n $this->assertEquals($count, 3);\n $this->assertDatabaseHas('categories', ['titulo' => 'Minería Windows']);\n $this->assertDatabaseHas('categories', ['titulo' => 'Minería Linux']);\n $this->assertDatabaseHas('categories', ['titulo' => 'Minería IOS']);\n }", "public function testCategory()\n {\n $category = factory(Category::class)->make();\n $category->save();\n $category2 = factory(Category::class)->make();\n $category2->save();\n $user = factory(\\App\\User::class)->create();\n $user->save();\n $user->categories()->attach($category->id);\n $user->categories()->attach($category2->id);\n $this->assertTrue(true);\n}", "public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }", "public function mockupCategories()\n {\n return $this->hasMany('App\\MockupCategory');\n }", "public function testUserCanNotDeleteCategory(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('delete', $items[0]->id)\n ->assertForbidden();\n\n $this->assertModelExists($items[0]);\n }", "public function testAddCategoriesWithError()\n {\n $this->setExpectedException(ApiException::class, null, 422);\n\n $category = new Category();\n $category->setVisibility(['all']);\n\n $i18nPT = new Model\\I18n();\n $i18nPT->setName('Foobar name');\n $i18nPT->setLocale('pt_PT');\n $i18nPT->setDescription('Foobar description');\n\n $i18nPT2 = new Model\\I18n();\n $i18nPT2->setName('Foobar name');\n $i18nPT2->setLocale('pt_PT');\n $i18nPT2->setDescription('Foobar description');\n\n $category->setI18n([$i18nPT, $i18nPT2]);\n\n $this->resourceAPI->addCategories($category);\n }", "public function testWithAllNonExistentTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAllTags('Apple,Kumquat')->get();\n\n self::assertEmpty($models);\n }", "public function test_Category_Tree(){\n\n\t\t$exp_total\t= Good::all()->count();\n\n\t\t$get\t= [\n\t\t\t'draw'\t=> '12'\n\t\t];\n\t\t$res\t= Good::getTableData( $get );\n\n\t\t$this->assertEquals( 12, $res['draw'], \"\\n*** Assert 1 ***\\nWrong 'draw' value\\n\" );\n\t\t$this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 2 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t\t$new_item\t= [\n\t\t\t'name'\t=> ''\n\t\t\t,'article'=> ''\n\t\t\t,'rprice'\t=> 5.567\n\t\t\t,'wprice'\t=> 4.444\n\t\t\t,'inpack'\t=> 24\n\t\t\t,'packs'\t=> 13\n\t\t\t,'assort'\t=> 17\n\t\t];\n\n\n\n\t\t$this->db['Good']\t= [];\n\t\t$items\t= &$this->db['Good'];\n\n\t for( $i=0; $i<3; $i++ ){\n\t \t$item\t= $new_item;\n\t \t$item['name']\t= self::_ut_name.'_'.$i;\n\t \t$item['article']\t= self::_ut_name.'_'.$i;\n\t\t\t$item_obj\t= new Good();\n\t \t$item_obj\t= $item_obj->fill( $item );\n\t\t $res \t= $item_obj->save();\n\n\t\t $ids[]\t=\n\t\t $item['id']\t= $item_obj->id;;\n\n\t\t\t$items[]\t= $item;\n\n\t\t $item_obj\t= NULL;\n\t }\n\n\n// print_r( $ids);\n\n// \t $ut_item_id\t= $item_obj->id;\n\n\n\t $exp_total\t= Good::all()->count();\n\t $res\t= Good::getTableData( $get );\n// \t $item_obj->delete();\n\n// \t\tGood::whereIn('id');\n\n\n\t $this->assertEquals( $exp_total, $res['recordsTotal'], \"\\n*** Assert 3 ***\\nWrong 'recordsTotal' value\\n\" );\n\n\t}", "public function clearCategories()\n {\n $scenario = Scenarios::getOrCreateUserScenario();\n $scenario->categories()->detach();\n }", "public function testMissingParentIsNotAllowed(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.parent_id', 100)\n ->emit('save')\n ->assertHasErrors(['editValues.parent_id'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertEquals(0, $items[0]->fresh()->parent()->count());\n }", "private function makeRelationBetweenCategoryAndDummyTable() {}", "public function testShowListCategoriesWithoutData()\n {\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->resize(900, 1600)\n ->assertSee('List Categories');\n $elements = $browser->elements('#table-categories tbody tr');\n $this->assertCount(0, $elements);\n });\n }", "public function testCategoriesMinimal()\n {\n $category = CertificateCategory::create([\n 'name' => 'TestNaam'\n ]);\n\n $this->assertDatabaseHas('certificate_categories', [\n 'id' => $category->id,\n 'slug' => 'testnaam',\n 'name' => 'TestNaam',\n 'name_short' => null,\n 'description' => null,\n 'default_expire_years' => null,\n 'is_required' => false\n ]);\n\n $found = CertificateCategory::find($category->id);\n\n $this->assertEquals($category->name, $found->name);\n $this->assertEquals('TestNaam', $category->name_short);\n $this->assertEquals('TestNaam', $found->name_short);\n }", "public function testUserCanNotEditACategory(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.name', 'Updated Category')\n ->emit('save')\n ->assertForbidden();\n\n $this->assertDatabaseHas(Category::class, [\n 'name' => $items[0]->name,\n ]);\n }", "public function testMissingResourcesAreNotAllowed(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.groups', [100])\n ->emit('save')\n ->assertHasErrors(['editValues.groups.*'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertEquals(0, $items[0]->groups()->count());\n }", "public function testListCategories()\n {\n }", "function testCategoryAdd() {\n\n $data = array(\n 'name' => 'Big Game 21' . md5(date('Y-m-d H:i:s').rand(1,100)),\n 'sort' => 2\n );\n\n // To verify add dailyshow Category is invalid\n //=========================================\n // To verify data is empty\n $dataInvalid = '';\n $testResultFirst = $this->parlaycategory->add( $dataInvalid );\n\n if (is_array($testResultFirst) && isset($testResultFirst['message']) ) {\n\n $this->assertContains( $testResultFirst['message'], 'Please enter the required data', 'To verify data is empty');\n }\n\n // To verify data is empty\n $dataInvalid['name'] = '';\n $testResultSecond = $this->parlaycategory->add( $dataInvalid );\n\n if (is_array($testResultSecond) && isset($testResultSecond['message']) ) {\n\n $this->assertContains( $testResultSecond['message'][0], 'The name field is required.', 'To verify data is empty');\n }\n\n // To verify add category is exist\n $categories = $this->parlaycategory->get_by(array('id !=' => 0));\n\n if ( !empty( $categories ) ) {\n\n $dataInvalid['name'] = $categories->name;\n $dataInvalid['sort'] = 2;\n $testResultThird = $this->parlaycategory->add( $dataInvalid );\n\n if ( is_array($testResultThird) && isset($testResultThird['message']) ) {\n\n $this->assertContains( $testResultThird['message'], \"Cannot save a duplicate Parlay Category with name - \" . $dataInvalid['name'], 'To verify add category is exist');\n }\n }\n\n // To verify add dailyshow Category is valid\n //=======================================\n $nameExpected = $data['name'];\n $testResultFourth = $this->parlaycategory->add( $data );\n\n if ( is_object($testResultFourth) ) {\n\n // To verify name returm must be equal name dailyshow Category input\n $this->assertEquals($testResultFourth->name, $nameExpected, 'To verify name returm must be equal name dailyshow Category input');\n\n } else {\n\n $this->assertTrue( FALSE , \"Can't verify add category dailyshow is case valid\");\n }\n\n }", "public function testListCategoriesWithoutPagination()\n {\n $this->makeDataOfListCategories(8);\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->resize(900, 1600)\n ->assertSee('List Categories');\n $elements = $browser->elements('#table-categories tbody tr');\n $this->assertCount(8, $elements);\n });\n }", "protected function setupCategories()\n {\n static $done;\n\n if (!empty($done)) {\n return;\n }\n\n $c = new Categories();\n $c->setContext('G_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $c = new Categories();\n $c->setContext('LG_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Little Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $done = true;\n }", "public function testAddItemSubCategory()\n {\n }", "public function testIsNotTagged(): void\n {\n /** @var Collection $models */\n $models = TestModel::isNotTagged()->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel1->getKey(),\n ],\n $keys\n );\n }", "public function testGetProductCategories() {\n \n }", "public function tearDown() {\n $this->kb_category = KnowledgeBaseCategory::$categories_by_parent = KnowledgeBaseCategory::$categories = null;\n }", "public function testCreateCategoryFail()\n { \n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/category/create')\n ->type('name', '')\n ->press('Submit')\n ->assertSee('The name field is required.')\n ->assertPathIs('/admin/category/create');\n });\n }", "public function testNoFacet()\n {\n\n $this->dispatch('solr-search');\n\n $coll1Link = $this->_getFacetLink('collection', 'Collection 1');\n $coll2Link = $this->_getFacetLink('collection', 'Collection 2');\n\n // Should display all facet links.\n $this->_assertFacetLink($coll1Link, 'Collection 1');\n $this->_assertFacetLink($coll2Link, 'Collection 2');\n\n // Should display all items.\n $this->_assertResultLink(record_url($this->item1), 'Item 1');\n $this->_assertResultLink(record_url($this->item2), 'Item 2');\n $this->_assertResultLink(record_url($this->item3), 'Item 3');\n $this->_assertResultLink(record_url($this->item4), 'Item 4');\n\n }", "public function testAddItemSubCategoryAudit()\n {\n }", "public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }", "public function testAddItemSubCategoryTag()\n {\n }", "public function testDeleteParentsOfCategoryWithoutProducts()\n {\n $categoriesCreatedArray = $this->createCategoriesDataForTest();\n\n $firstValueArray = $categoriesCreatedArray[0];\n\n $this->resourceAPI->deleteCategoryById($firstValueArray->getData()[0]->getId());\n }", "public function testWithoutAllTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n ],\n $keys\n );\n }", "public function testDerivedRelationViaCastedUpModelAttributeThatCastsDownTwiceWithNoSkips()\n {\n //todo: test casting down more than one level. not sure how to test this..\n //since meetings is only one skip past activity not really testing that castDown fully\n //$this->fail();\n }", "public function testSaveCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "public function testIncrementing()\n {\n $category = new Category(); \n $this->assertFalse($category->incrementing);\n }", "public function testAddCategories()\n {\n $category = new Category();\n $category->setActive(true);\n $category->setPosition(1);\n $category->setVisibility([Model\\Brand::VISIBILITY_FACEBOOK]);\n\n $i18n = new Model\\I18n();\n $i18n->setName('Foobar name');\n $i18n->setLocale('pt_PT');\n $i18n->setDescription('Foobar description');\n\n $category->setI18n([$i18n]);\n\n $response = $this->resourceAPI->addCategories($category);\n $this->assertInstanceOf(InlineResponse2011::class, $response);\n }", "public function testRemoveItemsWithoutChildren() {\n $facet = new Facet(['id' => 'llama'], 'facets_facet');\n // Setup results.\n $results = [\n new Result($facet, 'a', 'A', 5),\n new Result($facet, 'b', 'B', 2),\n new Result($facet, 'c', 'C', 4),\n ];\n $child = new Result($facet, 'a_1', 'A 1', 3);\n $results[0]->setChildren([$child]);\n\n // Execute the build method, so we can test the behavior.\n $built_results = $this->processor->build($facet, $results);\n\n // Sort to have a 0-indexed array.\n sort($built_results);\n\n // Check the output.\n $this->assertCount(2, $built_results);\n $this->assertSame('b', $built_results[0]->getRawValue());\n $this->assertSame('c', $built_results[1]->getRawValue());\n }", "public function testWithoutAnyTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAnyTags('Apple,Banana')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel5->getKey(),\n ],\n $keys\n );\n }", "public function testWithoutAllTagsAndWithoutAnyTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana')->withoutAnyTags('Cherry,Durian')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey()\n ],\n $keys\n );\n }", "public function testWithoutAllTagsIncludingUntagged(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana', true)->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel1->getKey(),\n $this->testModel2->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n ],\n $keys\n );\n }", "public function testWithAnyNonExistentTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAnyTags('Apple,Kumquat')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel4->getKey(),\n $this->testModel6->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }", "public function testEditButtonInListCategoriesWithoutData()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->adminUserToLogin)\n ->visit('/admin/categories')\n ->assertSee('List Categories')\n ->assertMissing('#table-categories .btn-show-edit-modal')\n ->assertMissing('#table-categories #edit-modal1');\n });\n }", "public function testUnexistingChildren()\n {\n $unit1 = $this->getUnit('customer');\n $unit1->setReversedMapping([\n 'email' => 'map.email'\n ]);\n $unit1->setReversedConnection([\n 'customer_id' => 'id',\n ]);\n $unit1->setMapping([\n 'id' => 'map.customer_id',\n 'email' => 'map.email',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n [1, '[email protected]'],\n [2, '[email protected]'],\n [3, '[email protected]'],\n [4, '[email protected]'],\n false,\n ]\n ));\n $unit1->setIsEntityCondition(function (MapInterface $map) {\n return !empty($map['email']);\n });\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('address');\n $unit2->setReversedMapping([\n 'city' => 'map.city',\n ]);\n $unit2->setReversedConnection([\n 'customer_id' => 'customer_id',\n ]);\n $unit2->setMapping([\n 'id' => 'map.incr(\"address_id\", 1)',\n 'city' => 'map.city',\n 'customer_id' => 'map.customer_id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n [1, 'Kiev', 1],\n [2, 'Chicago', 1],\n [3, 'Wroclaw', 2],\n [4, 'Warsaw', 4],\n [5, 'Donetsk', 4],\n false,\n ]\n ));\n $unit2->setTmpFileName('address_tmp.csv');\n $unit2->setParent($unit1);\n $unit2->setOptional(true);\n\n $expected = [\n [[\n 'email' => '[email protected]',\n 'address' => [\n [\n 'city' => 'Kiev'\n ],\n [\n 'city' => 'Chicago'\n ],\n ],\n ]],\n [[\n 'email' => '[email protected]',\n 'address' => [\n [\n 'city' => 'Wroclaw'\n ],\n ],\n ]],\n [[\n 'email' => '[email protected]',\n 'address' => [\n [\n 'city' => null,\n ],\n ],\n ]],\n [[\n 'email' => '[email protected]',\n 'address' => [\n [\n 'city' => 'Warsaw'\n ],\n [\n 'city' => 'Donetsk'\n ],\n ],\n ]],\n ];\n\n $action = $this->getAction([$unit1, $unit2], $expected);\n $action->process($this->getResultMock());\n }", "public function testCategoriesFull() {\n $category = CertificateCategory::create([\n 'name' => 'TestNaam Full',\n 'name_short' => 'Naam Full',\n 'description' => 'Een volledig ingevuld CertificateCategory',\n 'default_expire_years' => 4,\n 'is_required' => true\n ]);\n\n $this->assertEquals('Naam Full', $category->name_short);\n\n $this->assertDatabaseHas('certificate_categories', [\n 'name' => 'TestNaam Full',\n 'name_short' => 'Naam Full',\n 'slug' => 'naam-full',\n 'description' => 'Een volledig ingevuld CertificateCategory',\n 'default_expire_years' => 4,\n 'is_required' => true\n ]);\n }", "public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }", "public function testDeleteCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n $category->delete();\n $this->assertFalse($category == null);\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "public function regenerate_missing_relation_objects()\n {\n $l_dao = isys_cmdb_dao_category_g_relation::instance(isys_application::instance()->database);\n\n try\n {\n $l_root_location = 'SELECT isys_obj__id FROM isys_obj WHERE isys_obj__const = \\'C__OBJ__ROOT_LOCATION\\';';\n $l_root_location_id = $l_dao->retrieve($l_root_location)\n ->get_row_value('isys_obj__id');\n $l_sql = 'SELECT * FROM isys_catg_location_list\n\t\t\t\tWHERE isys_catg_location_list__isys_catg_relation_list__id IS NULL AND\n\t\t\t\t(isys_catg_location_list__isys_obj__id != \\'' . $l_root_location_id . '\\' AND isys_catg_location_list__isys_obj__id > 0);';\n $l_res = $l_dao->retrieve($l_sql);\n\n if ($l_res->num_rows() > 0)\n {\n while ($l_row = $l_res->get_row())\n {\n // rebuild missing relation for location entries\n $l_dao->handle_relation(\n $l_row['isys_catg_location_list__id'],\n 'isys_catg_location_list',\n C__RELATION_TYPE__LOCATION,\n null,\n $l_row['isys_catg_location_list__parentid'],\n $l_row['isys_catg_location_list__isys_obj__id']\n );\n } // while\n } // if\n return true;\n }\n catch (Exception $e)\n {\n isys_notify::error('Error with following message: ' . $e->getMessage());\n } // try\n return false;\n }", "public function testAll()\n\t\t{\n\t\t\tlist ($categoriesBefore) = $this->category->all(array ('nameContains' => 'Top Category'));\n\t\t\tforeach ($categoriesBefore as $categoryBefore) {\n\t\t\t\t$categoryBefore->delete();\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$this->category->create(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'categoryName' => array ('en' => \"Top Category $i\"),\n\t\t\t\t\t\t'categoryImage' => \"topcategory$i.jpg\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tlist ($categories, $count) = $this->category->all(array (\n\t\t\t\t'nameContains' => 'Top Category',\n\t\t\t\t'limit' => 2,\n\t\t\t\t'offset' => 1,\n\t\t\t\t'fields' => 'categoryId,categoryName'\n\t\t\t));\n\t\t\t\n\t\t\t$this->assertEquals(3, $count);\n\t\t\t$this->assertEquals(2, count($categories));\n\t\t\t\n\t\t\tfor ($j = 1; $j <= 2; $j++) {\n\t\t\t\t$this->assertEquals('Top Category '.($j + 1), $categories[$j - 1]->name->EN);\n\t\t\t\t$this->assertTrue(!isset($categories[$j - 1]->image));\n\t\t\t}\n\t\t}", "public function testFailAddSameCategoryName()\n {\n $categoryA = 'categoryA' ;\n $categoryB = 'categoryA' ;\n \n $service = $this->app->make(CategoryServiceInterface::class);\n $new = $service->save(null, $categoryA);\n\n $this->assertInstanceOf(Model::class, $new);\n $this->assertDatabaseHas('categories', [\n 'name' => $categoryA\n ]);\n\n $other = $service->save(null, $categoryA);\n }", "public function testAddFullCategoriesWithSuccess()\n {\n $category = new Category();\n $category->setVisibility([Model\\Brand::VISIBILITY_FACEBOOK, Model\\Brand::VISIBILITY_MOBILE]);\n $category->setPosition(1);\n $category->setActive(true);\n\n $i18nUS = new Model\\I18n();\n $i18nUS->setLocale('en_US');\n $i18nUS->setName('Category name here');\n $i18nUS->setDescription('Description of category here');\n\n $i18nPT = new Model\\I18n();\n $i18nPT->setName('Foobar name');\n $i18nPT->setLocale('pt_PT');\n $i18nPT->setDescription('Foobar description');\n\n $category->setI18n([$i18nUS, $i18nPT]);\n\n $response = $this->resourceAPI->addCategories($category);\n\n $this->assertInstanceOf(InlineResponse2011::class, $response);\n\n }", "public function testGetDuplicateItemSubCategoryById()\n {\n }", "public function testAddFullCategoriesWithImagesWithSuccess()\n {\n $category = new Category();\n $category->setVisibility([Category::VISIBILITY_FACEBOOK, Category::VISIBILITY_MOBILE]);\n $category->setPosition(99);\n $category->setActive(true);\n\n $i18nUS = new I18n();\n $i18nUS->setLocale('pt_PT');\n $i18nUS->setName('Category generated by integration test');\n $i18nUS->setDescription('Description of category here');\n\n $category->setI18n([$i18nUS]);\n\n $response = $this->resourceAPI->addCategories($category);\n $this->assertInstanceOf(InlineResponse2011::class, $response);\n /**\n * @var $categoryCreated Category\n */\n $categoryCreated = $response->getData()[0];\n $this->assertInstanceOf(Category::class, $categoryCreated);\n $this->assertTrue($categoryCreated->getActive());\n $this->assertEquals(99, $categoryCreated->getPosition());\n $this->assertCount(2, $categoryCreated->getVisibility());\n $this->assertInstanceOf(I18n::class, $categoryCreated->getI18n()[0]);\n $i18nPt = $categoryCreated->getI18n()[0];\n $this->assertEquals('pt_PT', $i18nPt->getLocale());\n $this->assertEquals('Category generated by integration test', $i18nPt->getName());\n $this->assertEquals('Description of category here', $i18nPt->getDescription());\n }", "public function testWithoutAnyTagsIncludingUntagged(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAnyTags('Apple,Banana', true)->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel1->getKey(),\n $this->testModel5->getKey(),\n ],\n $keys\n );\n }", "public function skip() {\n parent::skip();\n foreach ($this->suites as $suite) {\n $suite->skip();\n }\n foreach ($this->cases as $case) {\n $case->skip();\n }\n }", "public function loadMissing($relations);", "public function testCreateTestCaseWithoutName()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('someRandomDecription', 'description1')\n ->type('someRandomPrefixes','prefixes1')\n ->type('someRandomSteps','steps1')\n ->press('submit')\n ->seePageIs('/library/testcase/create');\n\n\n $this->dontSeeInDatabase('TestCaseHistory', [\n 'TestCaseDescription' => 'someRandomDecription',\n 'TestCasePrefixes' => 'someRandomPrefixes'\n ]);\n\n }", "public function test_get_errors_if_category_not_exist()\n {\n $data = [\n 'category_id' => 10,\n 'name' => 'Test_item',\n 'value' => 50,\n 'quality' => -10,\n ];\n\n $response = $this->json('POST', '/api/items/', $data);\n\n $response->assertStatus(404);\n\n $response->assertSee('errors');\n }", "public function test_getDuplicateItemCategoryById() {\n\n }", "function testAddEntities() {\n\t\t$this->assertEquals(array('User', 'Comment', 'MultiDep'), $this->config->_relations['auto']);\n\t\t\n\t\t// check the reverse relations have been correctly defined\n\t\t$this->assertEquals(array('my_blog_tag_set', 'comments'), array_keys($this->config->_relations['Blog']));\n\t\t$this->assertEquals(array('user_set', 'blog_set', 'my_blog_tag_set', 'comment_set'), array_keys($this->config->_relations['Tag']));\n\t}", "public function testAddAssociationExistingObjects()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $origCnt = count($user->articles);\n $this->assertTrue($origCnt > 0);\n\n $user->addArticle(Article::find($this->articles('xml_rpc')->id));\n $user->addArticle(Article::find($this->articles('best_practices')->id));\n\n // save, and make sure the association object is created\n $user->save();\n\n // make sure both were created, and are associated\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user instanceof User);\n $this->assertEquals($origCnt + 2, count($user->articles));\n\n $article1 = Article::find($this->articles('xml_rpc')->id);\n $article2 = Article::find($this->articles('best_practices')->id);\n $this->assertTrue($article1 instanceof Article);\n $this->assertTrue($article2 instanceof Article);\n\n $this->assertEquals($article1->user_id, $user->id);\n $this->assertEquals($article2->user_id, $user->id);\n\n // make sure 2 were added to total count\n $newCnt = count($user->articles);\n $this->assertEquals(2, $newCnt - $origCnt);\n }", "public function test_create_category()\n {\n $category=categories::factory()->create();\n $this->assertDatabaseHas('categories',['cat_name'=>$category->cat_name]);\n\n }", "public function testWithAnyTagsAndWithoutAnyTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAnyTags('Apple,Banana')->withoutAnyTags('Cherry')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }", "public function testAdd() {\r\n\t\t$data = $this->record;\r\n\t\tunset($data['ShopProductAttribute']['id']);\r\n\t\t$result = $this->ShopProductAttribute->add($data);\r\n\t\t$this->assertTrue($result);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$data = $this->record;\r\n\t\t\tunset($data['ShopProductAttribute']['id']);\r\n\t\t\t//unset($data['ShopProductAttribute']['title']);\r\n\t\t\t$result = $this->ShopProductAttribute->add($data);\r\n\t\t\t$this->fail('No exception');\r\n\t\t} catch (OutOfBoundsException $e) {\r\n\t\t\t$this->pass('Correct exception thrown');\r\n\t\t}\r\n\t\t\r\n\t}", "public function testCategoryMustHaveAName(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.name', '')\n ->emit('save')\n ->assertHasErrors(['editValues.name'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertDatabaseHas(Category::class, [\n 'name' => $items[0]->name,\n ]);\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 }", "function get_uncategorized_news() {\r\n $args = array(\r\n 'post_type' => 'news',\r\n 'posts_per_page' => -1,\r\n 'post_status' => 'publish',\r\n 'tax_query' => array(\r\n array(\r\n 'taxonomy' => 'dept',\r\n 'operator' => 'NOT EXISTS',\r\n ),\r\n ),\r\n );\r\n return get_posts($args);\r\n}", "protected function assertPreConditions()\n {\n $this->navigate('manage_categories', false);\n $this->categoryHelper()->checkCategoriesPage();\n }", "public function testCreateUnitRelationships()\n {\n }", "function testRemoveUnusedTagsEnabled() {\n\t\t$entry1 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry1');\n\t\t\n\t\t// should contain \"tag1\"\n\t\t$entry2 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry2');\n\t\t\n\t\t$field = new TagField('Tags', null, null, 'TagFieldTest_BlogEntry');\n\t\t$field->setValue('tag3');\n\t\t$field->saveInto($entry1);\n\t\t$entry1->write();\n\t\t\n\t\t$this->assertInstanceOf(\n\t\t\t'TagFieldTest_Tag', \n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag1')->First(),\n\t\t\t'Removing a tag relation which is still present in other objects shouldnt remove the tag record'\n\t\t);\n\t\t$this->assertNull(\n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag2')->First(),\n\t\t\t'If the only remaining relation of a tag record is removed, the tag should be removed completely'\n\t\t);\n\t}", "private function loadUnMatchedCollection()\n {\n $this->unMatchedCollection = collect();\n\n foreach ($this->mergeCollection as $key => $item)\n {\n\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->baseCollection->whereIn($basePivot,$item->$mergePivot)->first())\n {\n $this->unMatchedCollection->push($item);\n continue 2;\n }\n }\n\n\n }\n\n }", "public function test_admin_user_can_add_category_test()\n {\n $this->factory\n ->createCategory()\n ->createUser()\n ->signIn($this);\n\n $attribute = [\n 'name' => 'Test Category'\n ];\n\n $response = $this->post('api/category', $attribute);\n\n $response->assertOk();\n\n $this->assertEquals('Test Category', $response->getOriginalContent()['data']['category']['name']);\n }", "public function testAddParentsOfCategoryWithSuccess()\n {\n $categoriesCreatedArray = $this->createCategoriesDataForTest();\n\n $lastValueArray = end($categoriesCreatedArray);\n $firstValueArray = $categoriesCreatedArray[0];\n\n $this->assertInstanceOf(InlineResponse2011::class, $lastValueArray);\n\n $this->resourceAPI->deleteCategoryById($firstValueArray->getData()[0]->getId());\n }", "public function testCategoriesAreFilteredByParent()\n {\n $visibleCategory = factory(Category::class)->create();\n $notVisibleCategory = factory(Category::class)->create();\n\n $visibleCategory->parent()->associate(factory(Category::class)->create());\n $visibleCategory->save();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('categories?filter[categories.parent_id]='.$visibleCategory->parent->id)\n ->assertSuccessful()\n ->assertSee(route('categories.edit', $visibleCategory))\n ->assertDontSee(route('categories.edit', $notVisibleCategory));\n }", "public function test_getAllCategories_ifAnyCategoryExists_returnsAllCategories()\n {\n $collection = collect([new Category(), new Category()]);\n\n $this->_categoryRepositoryStub\n ->method('all')\n ->willReturn($collection);\n\n $categoryService = new CategoryService($this->_categoryRepositoryStub);\n $this->assertCount(2, $categoryService->getAllCategories());\n }", "public function test_addItemCategory() {\n\n }", "public function testGetCategories()\n {\n $response = $this->get(\"/api/categories\");\n $response->assertResponseStatus(200);\n $response->seeJson([\"success\" => true]);\n }", "public function testFilterSubCategoryNotEmptyExistingCategoryId() {\n $allCategories = $this->model_catalog_product->getAllCategories(); //run conditions on getProducts method\n $filters = array( //set up conditions for test\n 'filter_category_id' => $allCategories[0]['category_id'], //necessary to access filter_sub_category\n 'filter_sub_category' => 'true',\n );\n $products = $this->model_catalog_product->getProducts($filters); //run conditions on getProducts method\n $productsTotal = $this->model_catalog_product->getTotalProducts($filters);\n $this->assertTrue(sizeof($products) == $productsTotal, sizeof($products) . ' Retrieved from filter_sub_category=>\"true\", filter_category_id=>27, 1 products');\n }", "private function _loadCategories()\n {\n try {\n $this->_categories = Doctrine_Core::getTable('Category')->findAll(Doctrine_Core::HYDRATE_ARRAY);\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function setUp()\n {\n parent::setUp();\n factory(Category::class, 17)->create();\n }", "public function testIsMany()\n {\n $this->skip('abstract method');\n }", "function testDeletingCategory()\n {\n \n $this->tester->seeRecord('common\\models\\Category', ['description' => 'abc']);\n\n $category = Category::find()->where(['description' => 'abc'])->One();\n $category->delete();\n\n $this->tester->dontseeRecord('common\\models\\Category', ['description' => 'abc']);;\n }", "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売キャンペーン'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO', true), 'seo');\n $this->assertEquals(Record::mapCategory('地代家賃'), 'rent');\n $this->assertEquals(Record::mapCategory('packing & delivery expenses'), 'delivery');\n $this->assertEquals(Record::mapCategory('Revenue'), 'revenue');\n $this->assertEquals(Record::mapCategory('収益'), 'revenue');\n $this->assertEquals(Record::mapCategory('水道光熱費'), 'utility');\n $this->assertEquals(Record::mapCategory('法定福利費'), 'labor');\n $this->assertEquals(Record::mapCategory('法定福利費', true), 'welfare');\n }", "public function categories_is_required()\n {\n $user = User::factory()->create();\n\n $entry = array_filter(Entry::factory()->raw([\n 'category_id' => null,\n 'user_id' => null\n ]));\n\n Sanctum::actingAs($user, ['entries:create']);\n\n $this->jsonApi()->withData([\n 'type' => 'entries',\n 'attributes' => $entry,\n 'relationships' => [\n 'authors' => [\n 'data' => [\n 'id' => $user->getRouteKey(),\n 'type' => 'authors'\n ]\n ],\n ]\n ])->post(route('api.v1.entries.create'))\n ->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY)//422\n ->assertJsonFragment(['source' => ['pointer' => '/data']]);\n\n $this->assertDatabaseMissing('entries', $entry);\n }", "public function setUp()\n {\n // This listener gets a name to be able to disable and reenable it dynamically during runtime.\n $this->addListener(new TimeIt_Doctrine_CategorisableListener(), 'CategoryListener');\n }", "public function testCopyPrepareDataHABTMViaWithAsHasMany() {\n\t\t$this->Article->bindModel(\n\t\t\tarray(\n\t\t\t\t'hasMany' => array(\n\t\t\t\t\t'ArticlesWidget' => array()\n\t\t\t\t),\n\t\t\t\t'hasAndBelongsToMany' => array(\n\t\t\t\t\t'Widget' => array('with' => 'ArticlesWidget')\n\t\t\t\t),\n\t\t\t),\n\t\t\tfalse\n\t\t);\n\t\t$this->Article->ArticlesWidget->bindModel(\n\t\t\tarray(\n\t\t\t\t'belongsTo' => array(\n\t\t\t\t\t'Article' => array(),\n\t\t\t\t\t'Widget' => array(),\n\t\t\t\t),\n\t\t\t),\n\t\t\tfalse\n\t\t);\n\t\t$before = $this->Article->find('first', array(\n\t\t\t'contain' => array(\n\t\t\t\t'ArticlesWidget',\n\t\t\t\t'ArticlesWidget.Widget',\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\t$this->assertEquals(\n\t\t\t$before,\n\t\t\tarray(\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'title' => 'First Article',\n\t\t\t\t\t'body' => 'First Article Body',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:39:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:41:31'\n\t\t\t\t),\n\t\t\t\t'ArticlesWidget' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '1',\n\t\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t\t'widget_id' => '1',\n\t\t\t\t\t\t'order' => '1',\n\t\t\t\t\t\t'status' => 'good',\n\t\t\t\t\t\t'Widget' => array(\n\t\t\t\t\t\t\t'id' => '1',\n\t\t\t\t\t\t\t'name' => 'Widget 1'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '2',\n\t\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t\t'widget_id' => '2',\n\t\t\t\t\t\t'order' => '2',\n\t\t\t\t\t\t'status' => 'maybe',\n\t\t\t\t\t\t'Widget' => array(\n\t\t\t\t\t\t\t'id' => '2',\n\t\t\t\t\t\t\t'name' => 'Widget 2'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '3',\n\t\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t\t'widget_id' => '3',\n\t\t\t\t\t\t'order' => '3',\n\t\t\t\t\t\t'status' => 'bad',\n\t\t\t\t\t\t'Widget' => array(\n\t\t\t\t\t\t\t'id' => '3',\n\t\t\t\t\t\t\t'name' => 'Widget 3'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$result = $this->Article->copyPrepareData($before);\n\t\t$expected = array(\n\t\t\t'Article' => array(\n\t\t\t\t'user_id' => '1',\n\t\t\t\t'title' => 'First Article',\n\t\t\t\t'body' => 'First Article Body',\n\t\t\t\t'published' => 'Y',\n\t\t\t\t'updated' => '2007-03-18 10:41:31'\n\t\t\t),\n\t\t\t// handles as hasMany (nested)\n\t\t\t'ArticlesWidget' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'widget_id' => '1',\n\t\t\t\t\t'order' => '1',\n\t\t\t\t\t'status' => 'good',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'widget_id' => '2',\n\t\t\t\t\t'order' => '2',\n\t\t\t\t\t'status' => 'maybe',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'widget_id' => '3',\n\t\t\t\t\t'order' => '3',\n\t\t\t\t\t'status' => 'bad',\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testGetAllCategories()\n\t{\n\t $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n\t\t$number_of_categories = 10;\n\t\t$categories = factory(Category::class, $number_of_categories)->create([\n\t\t 'user_id' => $user->id\n ]);\n\n\t\t$response = $this->get('api/categories');\n\t\t$response->assertStatus(200);\n\t\t$this->assertTrue(count($categories) == $number_of_categories );\n\t}", "public function testCategoriesAreListed()\n {\n $category = factory(Category::class)->create();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('categories')\n ->assertSuccessful()\n ->assertSee($category->name);\n }", "public function testExample()\n{\n $temporada = new Temporada();\n $episodio1 = new Episodio();\n $episodio1->assistido = true;\n $episodio2 = new Episodio();\n $episodio2->assistido = false;\n $episodio3 = new Episodio();\n $episodio3->assistido = true;\n $temporada->episodios->add($episodio1);\n $temporada->episodios->add($episodio2);\n $temporada->episodios->add($episodio3);\n\n\n $episodiosAssistidos = $temporada->getEpisodiosAssistidos();\n $this->assertCount(2, $episodiosAssistidos);\n}", "public function testWithAllTagsEmpty(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAllTags('')->get();\n\n self::assertEmpty($models);\n }", "public function allWithoutTree()\n {\n return HandbookCategory::all();\n }", "public function testModels()\n {\n foreach(array('TextPageCategory') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->seed(TestCategorySeeder::class);\n }", "public function setUp()\n {\n parent::setUp();\n factory(Store::class)->create();\n factory(Category::class, 1)->create();\n factory(Category::class, 1)->states('parent')->create();\n factory(Product::class)->create();\n }", "public function testReusableRelation()\n {\n $this->specify(\n 'Reusing relations does not work correctly',\n function () {\n $customers = Customers::find([\n 'document_id = :did: AND status = :status: AND customer_id <> :did:',\n 'bind' => ['did' => 1, 'status' => 'A']\n ]);\n\n expect($customers)->isInstanceOf(Simple::class);\n expect(count($customers))->equals(2);\n\n expect($customers[0]->user)->isInstanceOf(Users::class);\n expect($customers[0]->user)->isInstanceOf(Users::class);\n expect($customers[0]->user)->isInstanceOf(Users::class);\n\n expect($customers[1]->user)->isInstanceOf(Users::class);\n expect($customers[1]->user)->isInstanceOf(Users::class);\n expect($customers[1]->user)->isInstanceOf(Users::class);\n\n expect($customers->getFirst())->isInstanceOf(Customers::class);\n\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[1]->user->name)->equals('Nikolaos Dimopoulos');\n\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers->getFirst()->user->name)->equals('Nikolaos Dimopoulos');\n\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n expect($customers[0]->user->name)->equals('Nikolaos Dimopoulos');\n }\n );\n }", "public function testCreateCategoryWithExistingName()\n {\n $category = factory(Category::class)->create();\n\n $this->createCategory($category->toArray())\n ->assertJsonStructure([\n 'message',\n 'errors' => [\n 'name'\n ]\n ]);\n }", "public function testMultiRelationColumn()\n {\n $this->specify(\n 'The Model::hasMany by using multi relation column does not work as expected',\n function () {\n $list = Packages::find();\n foreach ($list as $item) {\n expect($item)->isInstanceOf(Packages::class);\n expect($item->details)->isInstanceOf(Simple::class);\n expect($item->details->valid())->true();\n expect($item->details->count())->greaterOrEquals(2);\n expect($item->details->getFirst())->isInstanceOf(PackageDetails::class);\n }\n }\n );\n }", "public function testDeleteItemSubCategory()\n {\n }", "public function clearExpertCategorys()\n\t{\n\t\t$this->collExpertCategorys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function testAddMinimalCategoriesWithSuccess()\n {\n $category = new Category();\n\n $i18n = new Model\\I18n();\n $i18n->setName('Foobar name');\n $i18n->setLocale('pt_PT');\n $i18n->setDescription('Foobar description');\n\n $category->setI18n([$i18n]);\n\n $response = $this->resourceAPI->addCategories($category);\n\n $this->assertInstanceOf(InlineResponse2011::class, $response);\n }", "public function testGetAllParents() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $ph_kb_category_child = $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get all categories\n $categories = $this->kb_category->get_all_parents( $ph_kb_category_child->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( self::NAME, $category->name );\n }" ]
[ "0.5967625", "0.5955763", "0.57028973", "0.56872016", "0.56073993", "0.55611086", "0.5550551", "0.55462074", "0.5514198", "0.55095315", "0.5498648", "0.54900724", "0.5438827", "0.54218835", "0.540567", "0.53877515", "0.53515035", "0.5342937", "0.53364605", "0.5292597", "0.52563834", "0.5253473", "0.5246025", "0.5238761", "0.5237288", "0.52173644", "0.5213515", "0.51803565", "0.51796925", "0.5137936", "0.51365596", "0.51239824", "0.51115775", "0.5107576", "0.5104687", "0.5099729", "0.50953865", "0.50845724", "0.506357", "0.50605077", "0.5055208", "0.50543773", "0.5037166", "0.5034325", "0.5005172", "0.5001962", "0.5000492", "0.4999018", "0.49966356", "0.4994192", "0.49849403", "0.4982723", "0.49787307", "0.4972", "0.49602646", "0.4955356", "0.49417847", "0.49325758", "0.49204347", "0.49136996", "0.4890451", "0.4879575", "0.48789912", "0.4875544", "0.48731393", "0.4869323", "0.48670313", "0.48545295", "0.48339754", "0.4832101", "0.48319295", "0.4826608", "0.48220682", "0.48206282", "0.4818484", "0.48125613", "0.48109016", "0.4806261", "0.48030153", "0.48027626", "0.48027247", "0.48025352", "0.48006618", "0.4800202", "0.47940105", "0.47853538", "0.47780618", "0.4777506", "0.4776018", "0.47741887", "0.47719905", "0.47643295", "0.47544876", "0.47521302", "0.47513986", "0.47496495", "0.47452185", "0.47445711", "0.47434124", "0.47428852", "0.47423625" ]
0.0
-1
Removes the tests or categories that are in the relation
function removeItemsFromRelationIfExists($itemsList, $listToRemove) { //First, split the two lists $existingRelation = explode(',', $itemsList); $toRemoveIds = explode(',', $listToRemove); //Only remove if previously exists for ($i = 0; $i < count($toRemoveIds); $i++) { $theRemovedPos = array_search($toRemoveIds[$i], $existingRelation); if ($theRemovedPos !== false) { //The item exists unset($existingRelation[$theRemovedPos]); } } //Finally, implode the list of categories and return //First, clear empty values $existingRelation = array_filter($existingRelation); return implode(',', $existingRelation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearCategories()\n {\n $scenario = Scenarios::getOrCreateUserScenario();\n $scenario->categories()->detach();\n }", "public function clearCategories() {\n\t\t$this->quizCategoriesTable->deleteWhere('quizId', $this->id);\n\t}", "private function clearCategories() {\n $sql = \"DELETE FROM project_category WHERE project_id = %d\";\n $sql = sprintf($sql, $this->id);\n self::$connection->execute($sql);\n }", "public function tearDown() {\n $this->kb_category = KnowledgeBaseCategory::$categories_by_parent = KnowledgeBaseCategory::$categories = null;\n }", "public function testDeleteParentsOfCategoryWithoutProducts()\n {\n $categoriesCreatedArray = $this->createCategoriesDataForTest();\n\n $firstValueArray = $categoriesCreatedArray[0];\n\n $this->resourceAPI->deleteCategoryById($firstValueArray->getData()[0]->getId());\n }", "public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }", "function testDeletingCategory()\n {\n \n $this->tester->seeRecord('common\\models\\Category', ['description' => 'abc']);\n\n $category = Category::find()->where(['description' => 'abc'])->One();\n $category->delete();\n\n $this->tester->dontseeRecord('common\\models\\Category', ['description' => 'abc']);;\n }", "public function remove() {\n if ( is_null( $this->id ) )\n return;\n\n $this->prepare(\n 'DELETE FROM `categories` WHERE `category_id` = :category_id OR `parent_category_id` = :parent_category_id'\n , 'ii'\n , array( ':category_id' => $this->id, ':parent_category_id' => $this->id )\n )->query();\n }", "public function clearExpertCategorys()\n\t{\n\t\t$this->collExpertCategorys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function testDeleteCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n $category->delete();\n $this->assertFalse($category == null);\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "public function testIsRemoveContentRelationed()\n {\n // 1. Create Page 1\n $page1 = $this->createPage();\n\n $pageId = $page1->id;\n\n // 2. Create Page 2 with content relation\n $attributes = $this->attributes['page'];\n $attributes['fields'][] = [\n 'identifier' => 'content',\n 'type' => 'contents',\n 'value' => [\n ['id' => $pageId]\n ]\n ];\n $page2 = $this->createPage($attributes);\n\n // 3. Remove page 1\n (new DeleteContent($page1))->handle();\n\n // 4. Test page 2 fields\n $page2 = Content::find(2);\n\n $contentId = $page2->field('content') ? $page2->field('content')->value : null;\n\n $this->assertNotEquals($pageId, $contentId);\n }", "public function removeTestEntity()\n {\n $this->removeCompanyEntity('Test Company CREATE');\n $this->removeCompanyEntity('Test Company UPDATE');\n }", "public function remove_category() {\n\t\t$this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(Request::get(\"cat\"));\n\t\t$this->model->categories->unlink($category);\n if(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\t\n\t}", "public function testRemoveItemsWithoutChildren() {\n $facet = new Facet(['id' => 'llama'], 'facets_facet');\n // Setup results.\n $results = [\n new Result($facet, 'a', 'A', 5),\n new Result($facet, 'b', 'B', 2),\n new Result($facet, 'c', 'C', 4),\n ];\n $child = new Result($facet, 'a_1', 'A 1', 3);\n $results[0]->setChildren([$child]);\n\n // Execute the build method, so we can test the behavior.\n $built_results = $this->processor->build($facet, $results);\n\n // Sort to have a 0-indexed array.\n sort($built_results);\n\n // Check the output.\n $this->assertCount(2, $built_results);\n $this->assertSame('b', $built_results[0]->getRawValue());\n $this->assertSame('c', $built_results[1]->getRawValue());\n }", "public function testCategoriesCanBeDeleted()\n {\n $admin = factory(User::class)->states('admin')->create();\n $category = factory(Category::class)->create();\n\n $response = $this->actingAs($admin)->delete('categories/'.$category->id);\n\n $response->assertRedirect('/categories');\n $this->assertDatabaseMissing('categories', [\n 'name' => $category->name,\n ]);\n }", "public function removeAllRelatedPosts() {}", "public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }", "public function testWithoutAllTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n ],\n $keys\n );\n }", "public function test_delete_ScienceFiction_category_along_with_its_books(){\n $this->visit('/admin/categories')->press('delete')->press('Proceed')\n ->see('Data removed')->see('The Evolutionary Void')->see('The Dreaming Void')->see('Blood Music');\n\n\n }", "protected function tearDown()\n\t{\n\t\t$this->object->DeleteList(array(array(\"objectId\", \">\", 0)));\n\t\t$this->child->DeleteList(array(array(\"childId\", \">\", 0)));\n\t\t$this->sibling->DeleteList(array(array(\"siblingId\", \">\", 0)));\n\t\t$this->parent_->DeleteList(array(array(\"parent_Id\", \">\", 0)));\n\t\tunset($this->object);\n\t\tunset($this->sibling);\n\t\tunset($this->sibling2);\n\t\tunset($this->child);\n\t\tunset($this->child2);\n\t\tunset($this->parent_);\n\t}", "public function test_delete_components() {\n $result = cy\\JORK::from('Model_Topic')\n ->with('posts')\n ->where('id', '=', cy\\DB::esc(1))\n ->exec('jork_test');\n $topic = $result[0];\n $topic->delete();\n $this->assertEquals(2, count(DB::select()->from('t_posts')\n ->where('topicFk', 'is', NULL)->exec('jork_test')));\n\n }", "public function removeAllCategories()\n {\n return $this->unlinkAll('categories', true);\n }", "public function tearDown()\n {\n $sqlBuilder = new \\Apps\\Database\\Delete();\n $sql = $sqlBuilder->delete()->from('Shows')->where('Country = :country')->result();\n $pdo = array('country' => 'UnitTest');\n $this->database->run($sql, $pdo);\n\n $sql = $sqlBuilder->delete()->from('Songs')->where('Title LIKE :title')->result();\n $pdo = array('title' => 'UnitTest%');\n $this->database->run($sql, $pdo);\n\n $sql = $sqlBuilder->delete()->from('People')->where('Name LIKE :name')->result();\n $pdo = array('name' => 'UnitTest%');\n $this->database->run($sql, $pdo);\n\n $this->database->close();\n }", "public function testWithoutAllTagsIncludingUntagged(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana', true)->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel1->getKey(),\n $this->testModel2->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n ],\n $keys\n );\n }", "public function tearDown(){\n unset($this->user);\n unset($this->household);\n unset($this->unit);\n unset($this->qty);\n unset($this->category);\n unset($this->food);\n unset($this->ingredient);\n unset($this->recipe);\n unset($this->meal);\n unset($this->groceryItem);\n\n unset($this->userFty);\n unset($this->householdFty);\n unset($this->unitFty);\n unset($this->qtyFty);\n unset($this->categoryFty);\n unset($this->foodFty);\n unset($this->ingredientFty);\n unset($this->recipeFty);\n unset($this->mealFty);\n unset($this->groceryItemFty);\n }", "protected function tearDown(): void\n {\n foreach (['default'] as $connection) {\n $this->schema($connection)->drop('users');\n $this->schema($connection)->drop('friends');\n $this->schema($connection)->drop('posts');\n $this->schema($connection)->drop('photos');\n }\n\n Relation::morphMap([], false);\n }", "public function tearDown(): void\n {\n $this->schema($this->schemaName)->drop('users');\n $this->schema($this->schemaName)->drop('emails');\n $this->schema($this->schemaName)->drop('phones');\n $this->schema($this->schemaName)->drop('role_users');\n $this->schema($this->schemaName)->drop('roles');\n $this->schema($this->schemaName)->drop('permission_roles');\n $this->schema($this->schemaName)->drop('permissions');\n $this->schema($this->schemaName)->drop('tasks');\n $this->schema($this->schemaName)->drop('locations');\n $this->schema($this->schemaName)->drop('assignments');\n $this->schema($this->schemaName)->drop('jobs');\n\n Relation::morphMap([], false);\n\n parent::tearDown();\n }", "public function testMultiDimensionalKeyGetsRemoved()\n {\n $this->filter->value('test.test.test')->remove();\n\n $result = $this->filter->filter([\n 'test' => [\n 'test' => [\n 'test' => 'test',\n ],\n ],\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "protected function tearDown()\n {\n $this->cleanUpTable('oxuser');\n oxDb::getDb()->execute(\"delete from oxremark where oxparentid = '_testArt'\");\n oxDb::getDb()->execute(\"delete from oxnewssubscribed where oxuserid = '_testArt'\");\n parent::tearDown();\n }", "public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "public function delete() {\n\t\t$sql = 'delete from cart_categories where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$sql = 'delete from cart_categories_description where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$cats = $this->getSubCategories();\n\t\tforeach ($cats as $cat) {\n\t\t\t$cat->delete();\n\t\t}\n\t}", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testMultipleMultiDimensionalKeyGetsRemoved()\n {\n $this->filter->values([\n 'test.test.test',\n 'test.test2',\n 'test.test3.test'\n ])->remove();\n\n $result = $this->filter->filter([\n 'test' => [\n 'test' => [\n 'test' => 'test',\n ],\n 'test2' => 'test',\n 'test3' => [\n 'test' => 'test',\n ],\n ],\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "protected function removeAllItems($type)\n\t{\n\t\t$names = ItemHelper::getItemsNameByType($this->items, $type);\n\t\tif (empty($names)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach ($names as $n => $hardTrue) {\n\t\t\t$this->domain->assignment->revokeAllByItemName($n);\n\t\t}\n\t\t\n\t\t/*foreach ($this->domain->assignment->all() as $i => $assignments) {\n\t\t\tforeach ($assignments as $n => $assignment) {\n\t\t\t\tif (isset($names[$assignment->roleName])) {\n\t\t\t\t\tunset($this->assignments[$i][$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t$this->children = ItemHelper::removeByNames($this->children, $names);\n\t\t\n\t\t$this->saveItems();\n\t}", "public function deleteChildren(){\n $this->publicEnvironments()->delete();\n $this->privateEnvironments()->delete();\n $collections = Collection::where('project_id', $this->id)->get();\n\n foreach($collections as $collection){\n $collection->items()->delete();\n $collection->delete();\n }\n }", "public function testRemoveMulti()\n {\n $data = static::articleData();\n\n $result = Hash::remove($data, '{n}.Article.title');\n $this->assertFalse(isset($result[0]['Article']['title']));\n $this->assertFalse(isset($result[1]['Article']['title']));\n\n $result = Hash::remove($data, '{n}.Article.{s}');\n $this->assertFalse(isset($result[0]['Article']['id']));\n $this->assertFalse(isset($result[0]['Article']['user_id']));\n $this->assertFalse(isset($result[0]['Article']['title']));\n $this->assertFalse(isset($result[0]['Article']['body']));\n\n $data = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth']],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n\n $result = Hash::remove($data, '{n}.Item[id=/\\b2|\\b4/]');\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n\n $data[3]['testable'] = true;\n $result = Hash::remove($data, '{n}[testable].Item[id=/\\b2|\\b4/].title');\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4], 'testable' => true],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n }", "public function testWithoutAnyTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAnyTags('Apple,Banana')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel5->getKey(),\n ],\n $keys\n );\n }", "public function testClearAssociations()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user->articleCount > 0);\n\n $user->clearArticles();\n $user->save();\n\n // refetch to make sure data was cleared\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user instanceof User);\n $this->assertEquals('0', $user->articleCount);\n }", "public function tearDown()\n {\n $this->objectManager->create('Mage\\CatalogRule\\Test\\TestStep\\DeleteAllCatalogRulesStep')->run();\n }", "public function EliminarCategorias()\n\t{\n\n\t\t$sql = \" select codcategoria from productos where codcategoria = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcategoria\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from categorias where codcategoria = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codcategoria);\n\t\t\t$codcategoria = base64_decode($_GET[\"codcategoria\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: categorias?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: categorias?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "public function testRemove() {\n $index = Phish_Index::load();\n $index->store('TestA', 'testa.php');\n $index->store('TestB', 'testb.php');\n $index->remove('TestA');\n $this->assertNotEmpty($index->classes());\n }", "public function testDeleteCategoryUsingDELETE()\n {\n }", "protected function tearDown()\n {\n foreach ($this->aNews as $oNew) {\n $oNew->delete();\n }\n parent::tearDown();\n }", "protected function tearDown()\n {\n unset($this->constraint);\n }", "function categories_delete()\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Delete categories table\n $query = \"DROP TABLE \".$xartable['categories'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete links table\n $query = \"DROP TABLE \".$xartable['categories_linkage'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete categories ext privileges table\n $query = \"DROP TABLE \".$xartable['categories_ext_privileges'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete module variables\n// xarModDelVar('categories', 'bold');\n xarModDelVar('categories', 'catsperpage');\n\n // Remove module hooks\n if (!xarModUnregisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) return;\n if (!xarModUnregisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) return;\n if (!xarModUnregisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) return;\n if (!xarModUnregisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook'))return;\n if (!xarModUnregisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook'))return;\n if (!xarModUnregisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook'))return;\n if (!xarModUnregisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook'))return;\n if (!xarModUnregisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) return;\n\n // UnRegister blocks\n if (!xarModAPIFunc('blocks', 'admin', 'unregister_block_type',\n array('modName' => 'categories',\n 'blockType'=> 'navigation'))) return;\n\n xarTplUnregisterTag('categories-navigation');\n xarTplUnregisterTag('categories-filter');\n xarTplUnregisterTag('categories-catinfo');\n /**\n * Remove instances and masks\n */\n\n // Remove Masks and Instances\n xarRemoveMasks('categories');\n xarRemoveInstances('categories');\n\n // Deletion successful\n return true;\n}", "public function down()\n\t{\n\t\tSchema::drop('categories');\n\t}", "public function delete_test($test_id)\n\t{\n\t\t// Delete references to test categories\n\t\t$this->db->delete('testcat', array('test_id' => $test_id));\n\n\t\t$this->db->delete('test', array('id' => $test_id));\n\t}", "public function testDeleteItemSubCategory()\n {\n }", "public function testDeleteModelSet()\n {\n }", "public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }", "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE course';\n \n $connection_manager = new connection_manager();\n $conn = $connection_manager->connect();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n $count = $stmt->rowCount();\n }", "public function tearDown()\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users32');\n $this->schema()->drop('usersb');\n $this->schema()->drop('posts');\n $this->schema()->drop('posts32');\n $this->schema()->drop('postsb');\n $this->schema()->drop('rolesb');\n $this->schema()->drop('roles32');\n $this->schema()->drop('user32_role32');\n $this->schema()->drop('userb_roleb');\n }", "public function testWithoutAllTagsAndWithoutAnyTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAllTags('Apple,Banana')->withoutAnyTags('Cherry,Durian')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey()\n ],\n $keys\n );\n }", "function deleteStepsResultsForATestCase($testCase, $relation, $clientID) {\n\n global $definitions;\n\n //DEFINITIONS\n $itemTypeStepsID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n $resultsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['result'], $clientID);\n\n //DEFINITIONS FOR PROPERTIES\n $tcParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $relatedStepPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRelatedID'], $clientID);\n $relatedRelationPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n $stepAssocPropertyID = getClientPropertyID_RelatedWith_byName($definitions['resultStepAssociatedID'], $clientID);\n\n //build the return array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $tcParentPropertyID, 'value' => $testCase);\n $filters[] = array('ID' => $relatedStepPropertyID, 'value' => 0, 'mode' => '<>');\n $filters[] = array('ID' => $relatedRelationPropertyID, 'value' => $relation['ID']);\n\n // get testcase steps\n $steps = getFilteredItemsIDs($itemTypeStepsID, $clientID, $filters, $returnProperties);\n\n $stepsList = array();\n\n foreach ($steps as $step) {\n $stepsList[] = $step['ID'];\n }\n\n if (count($stepsList) > 0) {\n // delete steps associated results\n //build the return array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepAssocPropertyID, 'value' => implode(',', $stepsList), 'mode' => '<-IN');\n\n //get results\n $res = getFilteredItemsIDs($resultsItemTypeID, $clientID, $filters, $returnProperties);\n\n $resList = array();\n\n foreach ($res as $result) {\n $resList[] = $result['ID'];\n }\n\n if (count($resList) > 0) {\n //Clear results steps list\n deleteItems($resultsItemTypeID, $clientID, implode(',', $resList));\n }\n\n // finally delete steps\n deleteItems($itemTypeStepsID, $clientID, implode(',', $stepsList));\n }\n}", "public function removeAll()\n {\n foreach ($this->findAll() as $object) {\n $this->remove($object);\n }\n }", "public function cleanup()\n {\n if ($this->catalogRule != '-') {\n $this->deleteAllCatalogRule->run();\n }\n }", "public function cleanup() : void\n {\n unset($this->groups);\n }", "public function remove_all_cat_field()\n\t{\n\t\t//Get logged in session admin id\n\t\t$user_id \t\t\t\t\t\t= ($this->session->userdata('user_id_hotcargo')) ? $this->session->userdata('user_id_hotcargo') : 1;\n\t\t$setting_data \t\t\t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t$data['data']['setting_data'] \t= $setting_data;\n\t\t$data['data']['settings'] \t\t= $this->sitesetting_model->get_settings();\n\t\t$data['data']['dealer_id'] \t\t= $user_id;\n\t\t\n\t\t//getting all admin data \n\t\t$data['myaccount_data'] \t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t\n\t\t\n\t\t//Get requested form type from url segment position 3\n\t\t$field_id \t\t\t\t\t= $this->uri->segment(3);\n\t\t\n\t\t//deleting query\n\t\t$this->mongo_db->where(array('form_type' => $field_id));\n\t\tif($this->mongo_db->delete_all('form_fields'))\n\t\t\t$this->session->set_flashdata('flash_message', 'info_deleted');\n\t\telse\n\t\t\t$this->session->set_flashdata('flash_message', 'info_delete_failed');\n\t\t\t\n\t\tredirect('control/data-forms');\n\t}", "public function cleanupNews() {\n\n $this->_useCategoryDatasource();\n $this->_useItemDatasource();\n\n // Delete old news items\n $this->_externalNewsItemDatasource->prune();\n\n // Identify non-permanent categories that haven't been updated in a while\n $unusedCategories = $this->_externalNewsCategoryDatasource->getPrunable();\n\n // Remove mapping links between agent users and old non-permanent categories\n $mappingDatasource = new Datasource_Cms_ExternalNews_CategoriesAgentsMap();\n $mappingDatasource->pruneByCategories($unusedCategories);\n\n // Remove old non-permanent categories\n $this->_externalNewsCategoryDatasource->prune();\n }", "public function testCollectionTypeChildrenRemoved()\n {\n $article = $this->createArticleSlideshow();\n $this->updater->update($this->documentManager, $article);\n $this->documentManager->persist($article);\n $this->documentManager->flush();\n $this->documentManager->clear();\n\n $article = $this->documentManager->find(null, '/test/article');\n $slideshow = $article->slideshow;\n $slideshow->removeElement($slideshow->first());\n $slideshow->removeElement($slideshow->first());\n\n $this->documentManager->persist($article);\n $this->documentManager->flush();\n $this->documentManager->clear();\n\n $image0 = $this->documentManager->find(null, '/test/article/psict:slideshow-0');\n $image1 = $this->documentManager->find(null, '/test/article/psict:slideshow-1');\n $image2 = $this->documentManager->find(null, '/test/article/psict:slideshow-2');\n\n $this->assertNull($image0);\n $this->assertNull($image1);\n $this->assertNotNull($image2);\n }", "protected function tearDown()\n {\n // cleaning up\n $sQ = 'delete from oxuser where oxusername like \"test%\" ';\n oxDb::getDb()->execute($sQ);\n $sQ = 'delete from oxaddress where oxid like \"test%\" ';\n oxDb::getDb()->execute($sQ);\n\n $this->cleanUpTable('oxuser');\n $this->cleanUpTable('oxnewssubscribed');\n\n parent::tearDown();\n }", "function remove_uncategorized_links( $categories ){\n\n\tforeach ( $categories as $cat_key => $category ){\n\t\tif( 15 == $category->term_id ){\n\t\t\tunset( $categories[ $cat_key ] );\n\t\t}\n\t}\n\n\treturn $categories;\n\t\n}", "public function removeAll()\n {\n echo $this->_em->createQueryBuilder()->delete('Tdms\\Entity\\Product', 'p')->getQuery()->execute();\n }", "public function deleteTestEntities() {\n $statement = sprintf(\"DELETE FROM %s WHERE %s < 0 AND %s < 0\", static::TABLE, static::FIELDS[0], static::FIELDS[1]);\n\n $this->db->exec($statement);\n }", "public function testRemove()\n {\n $manager = $this->getModelManager();\n\n // Get the first tutor\n $tutor = $manager->findById(1);\n\n /** @var TutorLanguage $tutorLanguage */\n $tutorLanguage = $tutor->getTutorLanguages()->first();\n\n $this->performMockedRemove($tutorLanguage);\n\n $manager->saveEntity($tutor);\n $manager->reloadEntity($tutor);\n\n $this->assertNotContains(\n $tutorLanguage,\n $tutor->getTutorLanguages()\n );\n\n // Now try removing it again - should throw an error\n $response = $this->performMockedRemove($tutorLanguage);\n\n $this->assertBadRequestJsonResponse($response);\n }", "protected function revisionableCleanUp()\n {\n $relation = $this->model->getRevisionHistoryName();\n $relationObject = $this->model->{$relation}();\n\n $revisionLimit = property_exists($this->model, 'revisionableLimit')\n ? (int) $this->model->revisionableLimit\n : self::DEFAULT_REVISION_LIMIT;\n\n $toDelete = $relationObject\n ->orderBy('id', 'desc')\n ->skip($revisionLimit)\n ->limit(self::CLEANUP_REVISION_BATCH)\n ->get();\n\n foreach ($toDelete as $record) {\n $record->delete();\n }\n }", "public function testDeleteCategoriesApi()\n {\n $user = User::where(\"id\", 1)->first();\n $category = Category::first();\n $response = $this->delete(\"/api/categories/\" . $category->slug);\n $response->assertResponseStatus(401);\n $response->seeJson([\"success\" => false]);\n\n $token = $this->app[\"auth\"]->guard(\"api\")->fromUser($user);\n\n if ($user->isAdmin() || $user->isEditor()) {\n $response = $this->delete(\"/api/categories/\" . $category->slug, [], [\n 'Authorization' => 'Bearer ' . $token\n ]);\n $response->assertResponseStatus(200);\n $response->seeJson([\"success\" => true]);\n } else {\n $response = $this->delete(\"/api/categories/\" . $category->slug, [], [\n 'Authorization' => 'Bearer ' . $token\n ]);\n $response->assertResponseStatus(403);\n $response->seeJson([\"success\" => false]);\n }\n }", "protected function tearDown()\n {\n oxDb::getDb()->execute(\"delete from oxobject2action where oxactionid='_testGroupDelete'\");\n oxDb::getDb()->execute(\"delete from oxobject2action where oxactionid='_testGroupDeleteAll'\");\n oxDb::getDb()->execute(\"delete from oxobject2action where oxactionid='_testActionAdd'\");\n oxDb::getDb()->execute(\"delete from oxgroups where oxid='_testGroupAll'\");\n\n parent::tearDown();\n }", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "protected function emptyTestVocabulary(): void {\n $storage = $this->container->get('entity_type.manager')->getStorage('taxonomy_term');\n if ($tids = $storage->getQuery()->condition('vid', 'test_vocab')->execute()) {\n $storage->delete($storage->loadMultiple($tids));\n }\n }", "public function testRelationshipsAreDeletedWithTheirUser(): void\n {\n $user = User::factory()->create([\n 'created_at' => now()->subYear(),\n ]);\n\n $booking = Booking::factory()->for($user)->create();\n $identifier = $user->identifiers()->create(['value' => 'test-value']);\n $subscription = $user->subscription()->create();\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n $this->assertModelMissing($booking);\n $this->assertModelMissing($identifier);\n $this->assertModelMissing($subscription);\n }", "public function testWithoutAnyTagsIncludingUntagged(): void\n {\n /** @var Collection $models */\n $models = TestModel::withoutAnyTags('Apple,Banana', true)->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel1->getKey(),\n $this->testModel5->getKey(),\n ],\n $keys\n );\n }", "public function testProjectAssignmentsUnlinkRelation()\n {\n }", "public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }", "public function remove () {\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t $node->parentNode->removeChild($node);\r\n\t}", "public function tearDown()\n {\n if ($this->origBackend) {\n Image::set_backend($this->origBackend);\n }\n\n // Remove the test files that we've created\n $fileIDs = $this->allFixtureIDs('Image');\n foreach ($fileIDs as $fileID) {\n $file = DataObject::get_by_id('Image', $fileID);\n if ($file && file_exists(BASE_PATH.\"/$file->Filename\")) {\n unlink(BASE_PATH.\"/$file->Filename\");\n }\n }\n\n // Remove the test folders that we've created\n $folderIDs = $this->allFixtureIDs('Folder');\n foreach ($folderIDs as $folderID) {\n $folder = DataObject::get_by_id('Folder', $folderID);\n if ($folder && file_exists(BASE_PATH.\"/$folder->Filename\")) {\n Filesystem::removeFolder(BASE_PATH.\"/$folder->Filename\");\n }\n if ($folder && file_exists(BASE_PATH.'/'.$folder->Filename.'_resampled')) {\n Filesystem::removeFolder(BASE_PATH.'/'.$folder->Filename.'_resampled');\n }\n }\n\n parent::tearDown();\n }", "public function eliminate()\n {\n //items_list() from helpers/strings.php\n return $this->inLists(items_list())\n ->delete();\n }", "public function remove_all($key)\n\t{\n\t\tif (in_array($key, $this->_has_many))\n\t\t{\n\t\t\treturn db::delete($this->_table_name.'_'.AutoModeler::factory(inflector::singular($key))->get_table_name())->where(inflector::singular($this->_table_name).'_id', '=', $this->id)->execute($this->_db);\n\t\t}\n\t\telse if (in_array($key, $this->_belongs_to))\n\t\t{\n\t\t\treturn db::delete(AutoModeler::factory(inflector::singular($key))->get_table_name().'_'.$this->_table_name)->where(inflector::singular($this->_table_name).'_id', '=', $this->id)->execute($this->_db);\n\t\t}\n\t}", "function testRemoveUnusedTagsEnabled() {\n\t\t$entry1 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry1');\n\t\t\n\t\t// should contain \"tag1\"\n\t\t$entry2 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry2');\n\t\t\n\t\t$field = new TagField('Tags', null, null, 'TagFieldTest_BlogEntry');\n\t\t$field->setValue('tag3');\n\t\t$field->saveInto($entry1);\n\t\t$entry1->write();\n\t\t\n\t\t$this->assertInstanceOf(\n\t\t\t'TagFieldTest_Tag', \n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag1')->First(),\n\t\t\t'Removing a tag relation which is still present in other objects shouldnt remove the tag record'\n\t\t);\n\t\t$this->assertNull(\n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag2')->First(),\n\t\t\t'If the only remaining relation of a tag record is removed, the tag should be removed completely'\n\t\t);\n\t}", "protected function pruning()\n {\n $this->pizzas()->detach();\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "public function tearDown()\n {\n $this->cmsIndex->open();\n $this->cmsIndex->getLinksBlock()->openLink(\"Compare Products\");\n for ($i = 1; $i <= count($this->products); $i++) {\n $this->catalogProductCompare->getCompareProductsBlock()->removeProduct();\n }\n }", "public function testDeleteAllChildrenInFacility(){\n $childDAO = new childDAO();\n $children = $childDAO->findChildrenInFacility(5);\n $this->assertEquals(10,count($children));\n\n $childDAO->deleteAllChildrenInFacility(5);\n $children = $childDAO->findChildrenInFacility(5);\n $this->assertEquals(0,count($children));\n }", "public function testDeleteItemSubCategoryTag()\n {\n }", "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }", "public function testUserCanNotDeleteCategory(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('delete', $items[0]->id)\n ->assertForbidden();\n\n $this->assertModelExists($items[0]);\n }", "private function _prune()\n {\n if (empty($this->_files) && empty($this->_subdirectories)) {\n $this->_element->delete();\n if ($this->_parent instanceOf Horde_Pear_Package_Xml_Directory) {\n $this->_parent->_deleteSubdirectory($this->_element->getName());\n }\n }\n }", "function remove_all_cat($id,$tab) \r\n{\r\n\t\r\n\t$qlist=hb_mysql_query(\"SELECT * FROM \".$tab.\" WHERE id='$id'\");\r\n\tif (hb_mysql_num_rows($qlist)>0) {\r\n\t\t\r\n\t\t while($curitem=hb_mysql_fetch_array($qlist)) \r\n\t\t {\r\n\t\t\t \r\n\t\t\t remove_all_cat($curitem['id'],$tab);\r\n\t\t \r\n\t\t }\r\n\t\r\n\t}\r\n\t\r\n\thb_mysql_query(\"DELETE FROM \".$tab.\" WHERE id='$id'\");\r\n}", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "public function testDeleteConditions() {\n $this->loadFixtures('Users', 'Profiles');\n\n $this->assertSame(5, User::total());\n $this->assertSame(3, User::deleteMany(function(Query $query) {\n $query->where('age', '>', 30);\n }));\n $this->assertSame(2, User::total());\n }", "protected function tearDown()\n {\n \n unset($this->object->db);\n\n }", "public function tearDown() {\n\t\t$sql = \"DELETE FROM solrexample WHERE 1=1\";\n\t\tExampleSolrActiveRecord::model()->getDbConnection()->createCommand($sql)->execute();\n\t}", "protected function tearDown()\n {\n // Make sure any test entities created are deleted\n foreach ($this->testEntities as $entity)\n {\n // Second param is a 'hard' delete which actually purges the data\n $this->entityLoader->delete($entity, true);\n }\n }", "function removeCollection()\n {\n $collection = eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );\n $collection->remove();\n }", "public function provide_test_remove(): \\Generator\n {\n // Any item MUST have at least one assignment.\n // Remove this assignment only if there is another (non empty ?)\n\n // If sale is not accepted\n // -> remove if empty\n\n yield [\n [\n 'unit' => [\n 'item' => [\n '_reference' => '#item',\n 'order' => [],\n ],\n ],\n 'item' => '#item',\n ],\n [\n 'hard' => false,\n 'exception' => null,\n 'expected' => true,\n ],\n ];\n }", "public function tearDown() {\n\t\tunset($this->ItemsTable);\n\t\tunset($this->PDO);\n\t}", "public function removeAllSubGroups() {}", "public function testDeleteFirstLevelNodeWithoutChildren()\n {\n $model4 = Animal::findOne(4);\n $model4->delete();\n $model4 = Animal::findOne(4);\n $this->assertNull($model4);\n }" ]
[ "0.73939544", "0.65888613", "0.62314576", "0.61368716", "0.61323315", "0.6111323", "0.6049203", "0.60189515", "0.58857423", "0.58665246", "0.5841267", "0.58157915", "0.5764568", "0.5682738", "0.5670453", "0.5642359", "0.56197023", "0.5613559", "0.55975145", "0.5596358", "0.5595188", "0.55784416", "0.55471176", "0.554208", "0.55414385", "0.5540771", "0.5531588", "0.551674", "0.5506133", "0.5505452", "0.5503949", "0.5484944", "0.5480694", "0.54728794", "0.5460648", "0.54602134", "0.5454327", "0.54528654", "0.54374516", "0.5427884", "0.54179245", "0.54126126", "0.5394266", "0.53882426", "0.5380121", "0.5379192", "0.5373185", "0.53635925", "0.53571135", "0.5347082", "0.53381336", "0.53306353", "0.5328716", "0.5324618", "0.532433", "0.53237844", "0.52930826", "0.5289024", "0.52855456", "0.528482", "0.5284039", "0.5277679", "0.5270235", "0.5254631", "0.5241172", "0.5239986", "0.52271086", "0.52235144", "0.5217418", "0.52127796", "0.5210946", "0.5209321", "0.519756", "0.51967686", "0.51951295", "0.5182759", "0.5176495", "0.5175404", "0.5168798", "0.5168581", "0.5165656", "0.5164912", "0.5161279", "0.51570714", "0.5156066", "0.51529616", "0.51430666", "0.5142498", "0.51417667", "0.51410997", "0.51325905", "0.5130511", "0.5127945", "0.5127596", "0.5125923", "0.51245636", "0.5118618", "0.5116074", "0.5115858", "0.51104957", "0.5107417" ]
0.0
-1
This function removes the steps of a test case from the results
function deleteStepsResultsForATestCase($testCase, $relation, $clientID) { global $definitions; //DEFINITIONS $itemTypeStepsID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID); $resultsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['result'], $clientID); //DEFINITIONS FOR PROPERTIES $tcParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID); $relatedStepPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRelatedID'], $clientID); $relatedRelationPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID); $stepAssocPropertyID = getClientPropertyID_RelatedWith_byName($definitions['resultStepAssociatedID'], $clientID); //build the return array $returnProperties = array(); //build the filter $filters = array(); $filters[] = array('ID' => $tcParentPropertyID, 'value' => $testCase); $filters[] = array('ID' => $relatedStepPropertyID, 'value' => 0, 'mode' => '<>'); $filters[] = array('ID' => $relatedRelationPropertyID, 'value' => $relation['ID']); // get testcase steps $steps = getFilteredItemsIDs($itemTypeStepsID, $clientID, $filters, $returnProperties); $stepsList = array(); foreach ($steps as $step) { $stepsList[] = $step['ID']; } if (count($stepsList) > 0) { // delete steps associated results //build the return array $returnProperties = array(); //build the filter $filters = array(); $filters[] = array('ID' => $stepAssocPropertyID, 'value' => implode(',', $stepsList), 'mode' => '<-IN'); //get results $res = getFilteredItemsIDs($resultsItemTypeID, $clientID, $filters, $returnProperties); $resList = array(); foreach ($res as $result) { $resList[] = $result['ID']; } if (count($resList) > 0) { //Clear results steps list deleteItems($resultsItemTypeID, $clientID, implode(',', $resList)); } // finally delete steps deleteItems($itemTypeStepsID, $clientID, implode(',', $stepsList)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function clean(&$testResults) {\n $n = count($testResults);\n for($i = 0; $i < $n; $i++) {\n $this->cleanTestResult(&$testResults[$i]);\n }\n }", "public function skip() {\n parent::skip();\n foreach ($this->suites as $suite) {\n $suite->skip();\n }\n foreach ($this->cases as $case) {\n $case->skip();\n }\n }", "public function getSkippedScenarios();", "public function clearResults()\n {\n $this->_return = null;\n }", "function bp_course_remove_quiz_results() {\n\tglobal $bp;\n\n\t/**\n\t * When clicking on a screen notification, we need to remove it from the menu.\n\t * The following command will do so.bp_notifications_delete_notifications_by_type\n \t */\n\tbp_notifications_delete_notifications_by_type( $bp->loggedin_user->id, $bp->course->slug, 'quiz_results' );\n}", "function my_filter_site_status_tests($tests) {\n unset($tests['async']['background_updates']);\n return $tests;\n}", "public function dontSeeFailNow() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Assertion('dontSeeFailNow', func_get_args()));\n }", "public function testStepKeyReplacementFilteredOut()\n {\n $clickStepKey = \"clickStepKey\";\n $fillFieldStepKey = \"fillFieldStepKey\";\n $clickAction = \"click\";\n $fillFieldAction =\"fillField\";\n\n $actionGroupUnderTest = (new ActionGroupObjectBuilder())\n ->withActionObjects([\n new ActionObject($clickStepKey, $clickAction, ['selector' => 'value']),\n new ActionObject($fillFieldStepKey, $fillFieldAction, ['selector' => 'value'])\n ])\n ->build();\n\n $result = $actionGroupUnderTest->extractStepKeys();\n\n $this->assertNotContains($clickStepKey, $result);\n $this->assertNotContains($fillFieldStepKey, $result);\n $this->assertCount(0, $result);\n }", "protected function clearResults() {\n\t\t$this->error = '';\n\t\t$this->status_org = false;\n\t\t$this->status_new = false;\n\t}", "public function shouldBeSkipped();", "public function tearDown()\n {\n $this->testStepFactory->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n\n $this->testStepFactory->create(\n \\Magento\\SalesRule\\Test\\TestStep\\DeleteSalesRulesStep::class,\n ['salesRules' => [$this->salesRuleName]]\n )->run();\n\n $this->testStepFactory->create(\n \\Magento\\Catalog\\Test\\TestStep\\DeleteAttributeStep::class,\n ['attribute' => $this->attribute]\n )->run();\n }", "public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class, [])->run();\n }", "public function testCreateTestCaseWithoutName()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('someRandomDecription', 'description1')\n ->type('someRandomPrefixes','prefixes1')\n ->type('someRandomSteps','steps1')\n ->press('submit')\n ->seePageIs('/library/testcase/create');\n\n\n $this->dontSeeInDatabase('TestCaseHistory', [\n 'TestCaseDescription' => 'someRandomDecription',\n 'TestCasePrefixes' => 'someRandomPrefixes'\n ]);\n\n }", "public function benchThisWillBeSkipped()\n {\n }", "public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class)->run();\n $this->objectManager->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => 'default_tax_configuration,shipping_tax_class_taxable_goods_rollback']\n )->run();\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "function clear() {\n\t\txdebug_stop_code_coverage();\n\t}", "protected function outputSpecificStep() {}", "function deleteTestCasesViewer(&$dbHandler,&$smartyObj,&$tprojectMgr,&$treeMgr,&$tsuiteMgr,\r\n &$tcaseMgr,$argsObj,$feedback = null)\r\n{\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->main_descr = lang_get('delete_testcases');\r\n $guiObj->system_message = '';\r\n\r\n\r\n $tables = $tprojectMgr->getDBTables(array('nodes_hierarchy','node_types','tcversions'));\r\n $testcase_cfg = config_get('testcase_cfg');\r\n $glue = $testcase_cfg->glue_character;\r\n\r\n $containerID = isset($argsObj->testsuiteID) ? $argsObj->testsuiteID : $argsObj->objectID;\r\n $containerName = $argsObj->tsuite_name;\r\n if( is_null($containerName) )\r\n {\r\n $dummy = $treeMgr->get_node_hierarchy_info($argsObj->objectID);\r\n $containerName = $dummy['name'];\r\n }\r\n\r\n $guiObj->testCaseSet = $tsuiteMgr->get_children_testcases($containerID);\r\n $guiObj->exec_status_quo = null;\r\n $tcasePrefix = $tprojectMgr->getTestCasePrefix($argsObj->tprojectID);\r\n $hasExecutedTC = false;\r\n\r\n if( !is_null($guiObj->testCaseSet) && count($guiObj->testCaseSet) > 0)\r\n {\r\n foreach($guiObj->testCaseSet as &$child)\r\n {\r\n $external = $tcaseMgr->getExternalID($child['id'],null,$tcasePrefix);\r\n $child['external_id'] = $external[0];\r\n \r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n $getOptions = array('addExecIndicator' => true);\r\n $dummy = $tcaseMgr->get_exec_status($child['id'],null,$getOptions);\r\n $child['draw_check'] = $argsObj->grants->delete_executed_testcases || (!$dummy['executed']);\r\n\r\n $hasExecutedTC = $hasExecutedTC || $dummy['executed'];\r\n unset($dummy['executed']);\r\n $guiObj->exec_status_quo[] = $dummy;\r\n }\r\n }\r\n // Need to understand if platform column has to be displayed on GUI\r\n if( !is_null($guiObj->exec_status_quo) )\r\n {\r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n\r\n $itemSet = array_keys($guiObj->exec_status_quo);\r\n foreach($itemSet as $mainKey)\r\n {\r\n $guiObj->display_platform[$mainKey] = false;\r\n if(!is_null($guiObj->exec_status_quo[$mainKey]) )\r\n {\r\n $versionSet = array_keys($guiObj->exec_status_quo[$mainKey]);\r\n $stop = false;\r\n foreach($versionSet as $version_id)\r\n {\r\n $tplanSet = array_keys($guiObj->exec_status_quo[$mainKey][$version_id]);\r\n foreach($tplanSet as $tplan_id)\r\n {\r\n if( ($guiObj->display_platform[$mainKey] = !isset($guiObj->exec_status_quo[$mainKey][$version_id][$tplan_id][0])) )\r\n {\r\n $stop = true;\r\n break;\r\n }\r\n }\r\n \r\n if($stop)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // check if operation can be done\r\n $guiObj->user_feedback = $feedback;\r\n if(!is_null($guiObj->testCaseSet) && (sizeof($guiObj->testCaseSet) > 0) )\r\n {\r\n $guiObj->op_ok = true;\r\n $guiObj->user_feedback = '';\r\n }\r\n else\r\n {\r\n $guiObj->children = null;\r\n $guiObj->op_ok = false;\r\n $guiObj->user_feedback = is_null($guiObj->user_feedback) ? lang_get('no_testcases_available') : $guiObj->user_feedback;\r\n }\r\n\r\n if(!$argsObj->grants->delete_executed_testcases && $hasExecutedTC)\r\n {\r\n $guiObj->system_message = lang_get('system_blocks_delete_executed_tc');\r\n }\r\n\r\n $guiObj->objectID = $containerID;\r\n $guiObj->object_name = $containerName;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $smartyObj->assign('gui', $guiObj);\r\n}", "private function resetResults() {\n $this->results = array();\n }", "public function tearDown()\n {\n $this->objectManager->create('Mage\\CatalogRule\\Test\\TestStep\\DeleteAllCatalogRulesStep')->run();\n }", "protected function tearDown()\n {\n $this->_filter = null; \n }", "public function endSkip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::PASS);\n }\n }", "public function withoutTransformer();", "public function skip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::SKIP);\n }\n }", "public function clear() {\n\t\t$this->expected_query = '';\n\t}", "protected function tearDown()\n {\n unset($this->output);\n }", "public function tearDown(){\n unset($this->user);\n unset($this->household);\n unset($this->unit);\n unset($this->qty);\n unset($this->category);\n unset($this->food);\n unset($this->ingredient);\n unset($this->recipe);\n unset($this->meal);\n unset($this->groceryItem);\n\n unset($this->userFty);\n unset($this->householdFty);\n unset($this->unitFty);\n unset($this->qtyFty);\n unset($this->categoryFty);\n unset($this->foodFty);\n unset($this->ingredientFty);\n unset($this->recipeFty);\n unset($this->mealFty);\n unset($this->groceryItemFty);\n }", "public function tearDown()\n {\n parent::tearDown();\n unset($this->startSituation);\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function unmarkAllExecutions() {}", "public function tearDown() {\n\t\t$sql = \"DELETE FROM solrexample WHERE 1=1\";\n\t\tExampleSolrActiveRecord::model()->getDbConnection()->createCommand($sql)->execute();\n\t}", "protected function tearDown()\n {\n PHP_Depend_Code_Filter_Collection::getInstance()->setFilter();\n\n $this->_clearRunResources();\n\n parent::tearDown();\n }", "protected function remove($steps, $key)\n {\n if (isset($steps[$key])) {\n if ($steps[$key]['type'] == 3) {\n unset($steps[$key]);\n } else {\n $removing = false;\n $stepType = $steps[$key]['type'];\n foreach ($steps as $currentKey => $step) {\n $matchesFrom = (isset($step['from']) && $step['from'] == $key);\n $matchesEnd = (isset($step['end']) && $step['end'] == $key);\n if (($stepType == 2 && $currentKey == $key) || $matchesFrom) {\n unset($steps[$currentKey]);\n break;\n } elseif (($stepType == 1 && $currentKey == $key) || $matchesEnd) {\n unset($steps[$currentKey]);\n $removing = true;\n } elseif ($removing) {\n unset($steps[$currentKey]);\n }\n }\n }\n }\n return $steps;\n }", "public function clearNextSteps()\n {\n $this->nextSteps = null;\n\n return $this;\n }", "public function provide_test_remove(): \\Generator\n {\n // Any item MUST have at least one assignment.\n // Remove this assignment only if there is another (non empty ?)\n\n // If sale is not accepted\n // -> remove if empty\n\n yield [\n [\n 'unit' => [\n 'item' => [\n '_reference' => '#item',\n 'order' => [],\n ],\n ],\n 'item' => '#item',\n ],\n [\n 'hard' => false,\n 'exception' => null,\n 'expected' => true,\n ],\n ];\n }", "public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }", "public function testOverrideIterations(): void\n {\n $process = $this->phpbench(\n 'run --filter=benchDoNothing --progress=none --dump --iterations=10 benchmarks/set1/BenchmarkBench.php'\n );\n\n $this->assertExitCode(0, $process);\n $output = $process->getOutput();\n $this->assertXPathCount(10, $output, '//subject[@name=\"benchDoNothing\"]//iteration');\n }", "function wd_remove_site_health_checks( $tests ) {\n unset( $tests['direct']['wordpress_version'] );\n unset( $tests['direct']['theme_version'] );\n unset( $tests['direct']['php_version'] );\n unset( $tests['direct']['php_extensions'] );\n unset( $tests['direct']['scheduled_events'] );\n unset( $tests['async']['background_updates'] );\n return $tests;\n}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "protected function tearDown(): void\n {\n DummyHookPlugin::$beforeHookCalled = 0;\n DummyHookPlugin::$beforeActionCalled = 0;\n DummyHookPlugin::$afterActionCalled = 0;\n DummyHookPlugin::$afterHookCalled = 0;\n DummyHookPluginSkipsActions::$skipStartIn = 'beforeHook';\n DummyHookPluginSkipsActions::$skipStartAt = 1;\n DummyConstrainedHookPlugin::$restriction = null;\n DummyConstrainedHookPluginAlt::$restriction = null;\n DummyConstrainedPlugin::$restriction = null;\n }", "public function testNotRun(\\unittest\\TestSkipped $ignore) {\n $this->stats['notrun']++;\n }", "public function tearDown()\n {\n foreach (glob(__DIR__.'/../data/*.json') as $jsonFile) {\n if (basename($jsonFile) != 'json_output_test_json_fixed.json') {\n unlink($jsonFile);\n }\n }\n }", "public static function tearDownAfterClass()\n {\n echo PHP_EOL, 'Result: ', self::$ok, ' detected', PHP_EOL;\n }", "function endTest() {\n unset($this->CalendarRecursion);\n unset($this->CalendarInstance);\n unset($this->Activity);\n ClassRegistry::flush();\n }", "protected static function clear($step)\n {\n $file = static::getCacheStateIndicatorFileName($step);\n\n if ($file) {\n \\Includes\\Utils\\FileManager::deleteFile($file);\n }\n }", "public function resetReportStatuses()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportProcessingStatusList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function disableWorstResults() {\r\n\t\tforeach ($this->getRaces() as $race) {\r\n\t\t\t$race->disableWorstResults();\r\n\t\t}\r\n\t}", "public function afterTest(TestCase $t) {\n // Empty\n }", "public function clearFailed()\n {\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);\n $this->getLogger()->debug('Cleared \"failed\" and \"not-parsed\" filters');\n }", "public function test_clear_batches() {\n\t\t$this->register_successful_batch( 'hello' );\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 1, $batches );\n\n\t\tlocomotive_clear_existing_batches();\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 0, $batches );\n\t}", "public function testMergeSkipGeneration()\n {\n $this->generateAndCompareTest('MergeSkip');\n }", "abstract public function ForgetStep( $name );", "public function testGetStepsWithNoArgs()\n {\n $this->setEntityObjectHandlerReturn(function ($entityName) {\n if ($entityName == \"data1\") {\n return (new EntityDataObjectBuilder())->withDataFields(['field1' => 'testValue'])->build();\n }\n });\n\n $actionGroupUnderTest = (new ActionGroupObjectBuilder())\n ->withActionObjects([new ActionObject('action1', 'testAction', ['userInput' => '{{data1.field1}}'])])\n ->build();\n\n $steps = $actionGroupUnderTest->getSteps(null, self::ACTION_GROUP_MERGE_KEY);\n $this->assertOnMergeKeyAndActionValue($steps, ['userInput' => 'testValue']);\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "function getStepsScriptsForTestCase($theTC_ID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepDescriptionPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsDescription'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n $stepMainPropertyID = getMainPropertyID($stepsItemTypeID, $clientID);\n $stepStepTypePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsType'], $clientID);\n $stepStepScriptPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsScript'], $clientID);\n\n $typesListID = getAppListID('stepsTypes');\n\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n $finalResult = array();\n //Next, check that has one $relation\n if ((count($relations) - 1) == 0) {\n\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepMainPropertyID, 'name' => 'stepsMainValue');\n $returnProperties[] = array('ID' => $stepDescriptionPropertyID, 'name' => 'description');\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepStepTypePropertyID, 'name' => 'stepType');\n $returnProperties[] = array('ID' => $stepStepScriptPropertyID, 'name' => 'stepScript');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $theTC_ID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relations[0]['ID']);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n //Get the id of the list client related\n $clientListID = getClientListID_RelatedWith($typesListID, $clientID);\n\n //Get all the values for this list and client\n $ClientValues = getListValues($clientListID, $clientID);\n\n //Add the \"isStep\" parameter\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n //First, encode the name and the description\n $orderedSteps[$i]['stepsMainValue'] = base64_encode($orderedSteps[$i]['stepsMainValue']);\n $orderedSteps[$i]['description'] = base64_encode($orderedSteps[$i]['description']);\n\n //for every system list value, get the client list value\n\n for ($j = 0; $j < count($ClientValues); $j++) {\n if (strcmp($ClientValues[$j]['value'], $orderedSteps[$i]['stepType']) == 0) {\n //get the client id value\n $AppValueID = getAppListValueID_RelatedWith($ClientValues[$j]['valueID'], $clientID);\n\n if ($AppValueID > 0) {\n //Get the app value and add to client values\n $orderedSteps[$i]['scriptAppValue'] = getAppValue($AppValueID);\n } else {\n //Not related. Add an empty value\n $orderedSteps[$i]['scriptAppValue'] = 'undefined';\n }\n break;\n }\n }\n\n //Also, get their units and results\n // get params\n // get checked values\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $theSubjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_ID'] = $p['ID'];\n //Add the result id\n $orderedSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'] = $p['resultID'];\n //Add the execution value\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'] = $p['executionValue'];\n }\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResultDescription') {\n $orderedSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'] = $p['ID'];\n //Add the result id\n $orderedSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'] = $p['resultID'];\n\n }\n }\n $finalResult[] = $orderedSteps[$i];\n }\n\n }\n\n return $finalResult;\n}", "protected function xxxtearDown(): void\n {\n // reduce memory usage\n\n // get all properties of self\n $refl = new \\ReflectionObject($this);\n foreach ($refl->getProperties() as $prop) {\n // if not phpunit related or static\n if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {\n // make accessible and set value to to free memory\n $prop->setAccessible(true);\n $prop->setValue($this, null);\n }\n }\n //echo 'post reduce memory usage: '.sprintf('%.2fM', memory_get_usage(true)/1024/1024);\n\n parent::tearDown();\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_APPLY_REWARDS] = array();\n $this->values[self::_STAGE_OLD_PROGRESS] = null;\n $this->values[self::_JOIN_TIMES] = null;\n $this->values[self::_BREAK_HISTORY] = null;\n }", "public function removeValuesFromOutputArray(){\n\t\ttry{\n\t\t\t$this->filteredOutput = array();\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage(),3,\"/var/tmp/error.log\");\n\t\t\terror_log(\"\\n\");\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n }", "public function getFailedSteps();", "function spr_section_exclude_lifecycle($event,$step) {\n// $event:\t\"plugin_lifecycle.stm_article_order\"\n// $step:\t\"installed\", \"enabled\", \"disabled\", \"deleted\"\n// TXP 4.5: reinstall/upgrade only triggers \"installed\" event (now have to manually detect whether upgrade required)\nglobal $spr_exclude_debug;\n\nif ($spr_exclude_debug) {\n\techo \"spr_section_exclude_lifecycle start\";\n}\n\n\t$result = '?';\n\tif (($step == 'enabled') or ($step = 'installed')) {\n\t\t\t$result = spr_section_exclude_install();\n\t}\n\telse if ($step == 'deleted') {\n\t\t$result = spr_section_exclude_uninstall();\n\t}\n\tif ($spr_exclude_debug){\n\t\techo \"Event=$event Step=$step Result=$result\";\n\t}\n}", "function getSeleniumResultsForTestCase($testCaseID, $relationID, $studyID, $subjectID, $clientID) {\n\n global $definitions;\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n\n //First, we need the steps for this testCase\n\n //Next, get the results fo the step\n // get checked values\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $testCaseID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relationID);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n $totalOK = 0;\n $totalNOK = 0;\n $hasSeleniumResults = False;\n\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $subjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $hasSeleniumResults = True;\n $theResult = base64_decode($p['executionValue']);\n if ($theResult == 'OK') {\n $totalOK++;\n } elseif ($theResult == 'NOK') {\n $totalNOK++;\n }\n }\n\n }\n }\n if ($hasSeleniumResults == True) {\n if ($totalOK > 0 && $totalNOK == 0) {\n return 'OK';\n } elseif ($totalNOK > 0) {\n return 'NOK';\n } elseif ($totalOK == 0 && $totalNOK == 0) {\n return 'NOT_EXECUTED';\n }\n } else {\n return 'NOSELENIUM';\n }\n\n}", "function unsucc_test_html($test_counter, $test_name, $returned_val, $exp_val){\n echo \"<font size=\\\"2\\\" color=\\\"red\\\">$test_counter. $test_name TEST : failed</font><br>\\n\";\n if($returned_val === \"124\"){\n echo \"<font size=\\\"2\\\" color=\\\"black\\\" style=\\\"margin-left: 15%\\\">Program got stucked killed the process</font><br>\\n\";\n }\n echo \"<font size=\\\"2\\\" color=\\\"black\\\" style=\\\"margin-left: 15%\\\">Expected return value : $exp_val - returned : $returned_val</font><br>\\n\";\n }", "protected function _clearAndOutput() {}", "private function pruneResults(/*iterable*/ $results)\n {\n $buffer = [];\n foreach ($results as $item) {\n $buffer[] = $item;\n\n if (count($buffer) > 50) {\n $this->clearTokenBuffer($buffer);\n $buffer = [];\n }\n }\n\n $this->clearTokenBuffer($buffer);\n }", "public function tearDown(): void\n {\n // do somrthing after the benchmark\n }", "function civi_health_check_remove_rest_availability($tests) {\n unset( $tests['direct']['rest_availability'] );\n return $tests;\n}", "public function tearDownSuite($path){\n\t\t$this->printSummary($path);\n\t}", "function remove_timing_for_bawpvc( $timings ) {\n return array( 'all' => '' );\n}", "public function clearResult() {\n $this->_dataHandler->clearResult();\n }", "protected function cleanExecutionArrays() {}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_STAGE_ID] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_HEROES] = array();\n }", "public function tearDown() {\n\t\tremove_filter( 'doing_it_wrong_trigger_error', '__return_false' );\n\n\t\tparent::tearDown();\n\t}", "public function pruneCommand() {\n\t\t$count = $this->removeAllImages();\n\t\t$this->outputLine('%d record(s) purged.', [$count]);\n\t}", "public function test_clear_result_status() {\n\n\t\t$post_batch = new Posts();\n\n\t\t$post_batch->register( array(\n\t\t\t'name' => 'Hey there',\n\t\t\t'type' => 'post',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\my_post_callback_function_test',\n\t\t\t'args' => array(\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'post_type' => 'post',\n\t\t\t),\n\t\t) );\n\n\t\t$post_batch->run( 1 );\n\n\t\t$post_batch->clear_result_status();\n\n\t\t// Loop through each post and make sure our value was set.\n\t\tforeach ( $this->posts as $post ) {\n\t\t\t$meta = get_post_meta( $post, 'custom-key', true );\n\t\t\t$this->assertEquals( 'my-value', $meta );\n\n\t\t\t$status = get_post_meta( $post, $post_batch->slug . '_status', true );\n\t\t\t$this->assertEquals( '', $status );\n\t\t}\n\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertEquals( 'reset', $batches['hey-there']['status'] );\n\t}", "protected function tearDown()\n {\n $this->calculator = NULL;\n }", "function accessibility_filter_cleanup_report($report) {\n\t$result = array(QUAIL_TEST_SEVERE => array('total' => 0),\n\t\t\t\t\tQUAIL_TEST_MODERATE => array('total' => 0),\n\t\t\t\t\tQUAIL_TEST_SUGGESTION => array('total' => 0),\n\t);\n\tforeach($report as $testname => $test) {\n\t\tif(isset($test['problems']) && count($test['problems']) > 0) {\n\t\t\t//only tests where there were no issues to report\n\t\t\t$result[$test['severity']][$testname] = $test;\n\t\t\tif(isset($test['problems']['pass']) && $test['problems']['pass'] === false) {\n\t\t\t\t$result[$test['severity']]['total']++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$result[$test['severity']]['total'] += count($test['problems']);\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "protected static function removeEmptyDefaultCases(DOMDocument $ir)\n\t{\n\t\t$xpath = new DOMXPath($ir);\n\t\tforeach ($xpath->query('//case[not(@test | node())]') as $case)\n\t\t{\n\t\t\t$case->parentNode->removeChild($case);\n\t\t}\n\t}", "public function tearDown()\n {\n unset($this->_textile);\n }", "public function clearSuccessful()\n {\n $this->getFilter()->clear($this->getProject() . 'parsed');\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);\n $this->getLogger()->debug('Cleared \"visited\" and \"scheduled\" filters');\n }", "public function tearDown() : void {\n $pids = db_select('payment', 'p')\n ->fields('p', ['pid'])\n ->condition('p.pmid', $this->method->pmid)\n ->execute()\n ->fetchCol();\n foreach ($pids as $pid) {\n entity_delete('payment', $pid);\n }\n entity_delete('payment_method', $this->method->pmid);\n parent::tearDown();\n }", "public function resetWantedPartitioningAndSteps()\n\t{\n\t\t$this->resetWantedPartitioning();\n\t\t$this->partitionStepsForShift = $this->partitionSteps = array();\n\t\t$this->discardUndo();\n\t\t$this->unsetEFIBootPartDev();\n\t}", "public function testRemoveItemsWithoutChildren() {\n $facet = new Facet(['id' => 'llama'], 'facets_facet');\n // Setup results.\n $results = [\n new Result($facet, 'a', 'A', 5),\n new Result($facet, 'b', 'B', 2),\n new Result($facet, 'c', 'C', 4),\n ];\n $child = new Result($facet, 'a_1', 'A 1', 3);\n $results[0]->setChildren([$child]);\n\n // Execute the build method, so we can test the behavior.\n $built_results = $this->processor->build($facet, $results);\n\n // Sort to have a 0-indexed array.\n sort($built_results);\n\n // Check the output.\n $this->assertCount(2, $built_results);\n $this->assertSame('b', $built_results[0]->getRawValue());\n $this->assertSame('c', $built_results[1]->getRawValue());\n }", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }", "protected function tearDown(): void {\n\t\t$this->http_client = null;\n\t\t$this->process_transactions = array();\n\n\t\tif ( ! empty( $this->transactions ) ) {\n\t\t\t$this->transactions = array();\n\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\t$this->key_pairs['tag'] = $this->tag;\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\tTestHelpers::removeJsonFile( $this->process_tag );\n\t\t\tTestHelpers::removeJsonFile( $this->tag );\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function tearDown()\n {\n unset($this->_filteringEscaping);\n }", "public function test_clear() {\n\n }", "public function clearResults($modelName);", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INFO] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RSEED] = null;\n }", "public function testCreateTestCaseWithoutDetails()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('TestCase1', 'name1')\n ->select('1', 'testSuite1')\n ->press('submit');\n\n $this->seeInDatabase('TestCase', [\n 'Name' => 'TestCase1',\n 'TestSuite_id' => '1'\n ]);\n }", "function stopCountingAdded()\n {\n\t$this->stopCountingAddedLevels();\n\t$this->stopCountingAddedVehicles();\n\t$this->doStopCountingAdded();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ACTIVITY_REWARD] = array();\n }", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "function Step1_IntegrityHard() { return( $this->stepTest( 'integ_') ); }", "public function stepOutOfScope();" ]
[ "0.58990055", "0.58325917", "0.5803855", "0.5635781", "0.55998796", "0.5564479", "0.5558872", "0.5542909", "0.5541296", "0.55059236", "0.5505281", "0.5501082", "0.54515016", "0.5410092", "0.5388904", "0.5348952", "0.5348952", "0.5348952", "0.5318067", "0.5308237", "0.5293523", "0.52912426", "0.5259884", "0.52530885", "0.52439153", "0.52430576", "0.5240815", "0.5219789", "0.52196836", "0.52089524", "0.51907426", "0.51841235", "0.51808083", "0.51694095", "0.5162406", "0.5158061", "0.51525825", "0.5141413", "0.51313794", "0.5122368", "0.51197875", "0.5107183", "0.5102869", "0.50856966", "0.50760657", "0.5075552", "0.5073644", "0.507308", "0.50634694", "0.50616735", "0.5057364", "0.5055234", "0.50446236", "0.5044127", "0.50331", "0.5013923", "0.50115174", "0.50090367", "0.50000596", "0.499888", "0.49951258", "0.49936134", "0.4992267", "0.49860328", "0.49812484", "0.49657097", "0.49581528", "0.49529052", "0.49514323", "0.4949951", "0.4939675", "0.49363217", "0.4935726", "0.49342224", "0.49271148", "0.49222162", "0.49201265", "0.49133885", "0.49022093", "0.48982853", "0.48925608", "0.48866034", "0.48854908", "0.48850062", "0.48775715", "0.48675692", "0.48643497", "0.48585427", "0.4857613", "0.48520955", "0.48442376", "0.48343486", "0.4832546", "0.4824042", "0.4824022", "0.4821711", "0.48186508", "0.48152137", "0.4813644", "0.48093358" ]
0.6617149
0
This function duplicate the steps of a test case
function duplicateStepsForTestCase($testCase, $relation, $clientID) { global $definitions; //DEFINITIONS $itemTypeStepsID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID); //DEFINITIONS FOR PROPERTIES $tcParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID); $relatedStepPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRelatedID'], $clientID); $relatedRelationPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID); //First, duplicate the steps inside the test case and set the new relation //build the return array $returnProperties = array(); //build the filter $filters = array(); $filters[] = array('ID' => $tcParentPropertyID, 'value' => $testCase); $filters[] = array('ID' => $relatedStepPropertyID, 'value' => 0); // get testcase steps $steps = getFilteredItemsIDs($itemTypeStepsID, $clientID, $filters, $returnProperties); foreach ($steps as $step) { // make a copy of the step $stepCopy = duplicateItem($itemTypeStepsID, $step['ID'], $clientID); // change some properties setPropertyValueByID($relatedStepPropertyID, $itemTypeStepsID, $stepCopy, $clientID, $step['ID'], '', $RSuserID); setPropertyValueByID($relatedRelationPropertyID, $itemTypeStepsID, $stepCopy, $clientID, $relation['ID'], '', $RSuserID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "abstract protected function define_my_steps();", "public function preTesting() {}", "protected function executeSpecificStep() {}", "public function step_1()\n {\n }", "protected function test9() {\n\n }", "public function preTest() {}", "public function step_2()\n {\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function test()\n {\n $this->executeScenario();\n }", "public function run_tests()\n {\n }", "public function testGetChangeDuplicates()\n {\n }", "public function _testMultipleInventories()\n {\n\n }", "function Step1_IntegrityHard() { return( $this->stepTest( 'integ_') ); }", "function test(){\r\n //placeholder for future test functions\r\n }", "protected abstract function test();", "protected abstract function test();", "public function test_scenario1() {\n\n $data = array(array(\"filename\"=> \"data/iris.csv\",\n\t \"local_file\" => \"tmp/if_then_rules_iris.txt\",\n\t\t\t \"expected_file\" => \"data/model/if_then_rules_iris.txt\"),\n array(\"filename\"=> \"data/iris_sp_chars.csv\",\n \"local_file\" => \"tmp/iris_sp_chars.txt\",\n \"expected_file\" => \"data/model/if_then_rules_iris_sp_chars.txt\"),\n array(\"filename\"=> \"data/spam.csv\",\n \"local_file\" => \"tmp/if_then_rules_spam.txt\",\n \"expected_file\" => \"data/model/if_then_rules_spam.txt\"),\n array(\"filename\"=> \"data/grades.csv\",\n \"local_file\" => \"tmp/if_then_rules_grades.txt\",\n \"expected_file\" => \"data/model/if_then_rules_grades.txt\"),\n array(\"filename\"=> \"data/diabetes.csv\",\n \"local_file\" => \"tmp/if_then_rules_diabetes.txt\",\n \"expected_file\" => \"data/model/if_then_rules_diabetes.txt\"),\n array(\"filename\"=> \"data/iris_missing2.csv\",\n \"local_file\" => \"tmp/if_then_rules_iris_missing2.txt\",\n \"expected_file\" => \"data/model/if_then_rules_iris_missing2.txt\"),\n array(\"filename\"=> \"data/tiny_kdd.csv\",\n \"local_file\" => \"tmp/if_then_rules_tiny_kdd.txt\",\n \"expected_file\" => \"data/model/if_then_rules_tiny_kdd.txt\")\n\t );\n\n foreach($data as $item) {\n print \"\\nSuccessfully creating a model and translate the tree model into a set of IF-THEN rules\\n\";\n\t print \"Given I create a data source uploading a \". $item[\"filename\"]. \" file\\n\";\n\t $source = self::$api->create_source($item[\"filename\"], $options=array('name'=>'local_test_source', 'project'=> self::$project->resource));\n\t $this->assertEquals(BigMLRequest::HTTP_CREATED, $source->code);\n\t $this->assertEquals(1, $source->object->status->code);\n\n print \"And I wait until the local source is ready\\n\";\n\t $resource = self::$api->_check_resource($source->resource, null, 3000, 30);\n\t $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"And I create dataset with local source\\n\";\n\t $dataset = self::$api->create_dataset($source->resource);\n\t $this->assertEquals(BigMLRequest::HTTP_CREATED, $dataset->code);\n\t $this->assertEquals(BigMLRequest::QUEUED, $dataset->object->status->code);\n\n print \"And I wait until the dataset is ready\\n\";\n\t $resource = self::$api->_check_resource($dataset->resource, null, 3000, 30);\n\t $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"And I create model\\n\";\n\t $model = self::$api->create_model($dataset->resource);\n\t $this->assertEquals(BigMLRequest::HTTP_CREATED, $model->code);\n\n print \"And I wail until the model is ready\\n\";\n $resource = self::$api->_check_resource($model->resource, null, 3000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"And I create a local model\\n\";\n\t $local_model = new Model($model->resource, self::$api);\n print \"I translate the tree into IF_THEN rules\\n\";\n\n\t $fp = fopen($item[\"local_file\"], 'w');\n $local_model->rules($fp);\n fclose($fp);\n\t print \" Then I check the output is like \" . $item[\"expected_file\"] . \" expected file\\n\";\n $this->assertEquals(0, strcmp(trim(file_get_contents($item[\"local_file\"])), trim(file_get_contents($item[\"expected_file\"]))));\n\n }\n\n\n }", "public function testProcessWeirdCase1()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit1->setReversedConnection([\n 'tid' => 'id',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'id' => 'id',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '1'],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('test2');\n $unit2->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit2->setReversedConnection([\n 'tid' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'parent_id' => 'id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '2'],\n false,\n ]\n ));\n $unit2->setTmpFileName('customer_tmp.csv');\n $unit2->setParent($unit1);\n\n $action = $this->getAction([$unit1, $unit2]);\n $action->process($this->getResultMock());\n }", "protected function outputSpecificStep() {}", "public function test_all() {\n $obj = new My_task;\n \n echo \"Start test_reverse() <br>\";\n $obj->test_reverse();\n echo \"<br><br>\";\n \n echo \"Start test_is_palindrome() <br>\";\n $obj->test_is_palindrome();\n echo \"<br><br>\";\n \n echo \"Start test_encryption() <br>\";\n $obj->test_encryption(); \n echo \"<br><br>\";\n }", "function morestepdata() {\n $this->auth(SUPER_ADM_LEVEL);\n $this->load->model('m_testdata');\n $users = $this->m_user->getAll(400);\n // insert random steps\n // simulation of user is required to insert steps\n foreach ($users as $user) {\n $d = new JDate();\n $this->_simulate($user->id);\n for ($i = 0; $i < 3; $i++) {\n $this->m_step->create_x($user->id, 1, $this->_randomSteps(), $d->getDate());\n $d->subDays(1);\n }\n $this->_stopsimulate();\n }\n echo 'Success! hopefully ;)' ;\n }", "abstract protected function run_tests($code, $testcases);", "public function step()\n {\n }", "public function testStaircaseWithTwoSteps()\n {\n $steps = 2;\n $this->assertEquals(' #' . PHP_EOL\n . '##',\n $this->staircase->printStaircase($steps));\n }", "public function testGetDuplicateItemSubCategoryById()\n {\n }", "function copyTestCases(&$smartyObj,$template_dir,&$tsuiteMgr,&$tcaseMgr,$argsObj)\r\n{\r\n $op = array('refreshTree' => false, 'userfeedback' => '');\r\n if( ($qty=sizeof($argsObj->tcaseSet)) > 0)\r\n {\r\n $msg_id = $qty == 1 ? 'one_testcase_copied' : 'testcase_set_copied';\r\n $op['userfeedback'] = sprintf(lang_get($msg_id),$qty);\r\n\r\n $copyOpt = array('check_duplicate_name' => config_get('check_names_for_duplicates'),\r\n 'action_on_duplicate_name' => config_get('action_on_duplicate_name'),\r\n 'stepAsGhost' => $argsObj->stepAsGhost);\r\n $copyOpt['copy_also'] = array('keyword_assignments' => $argsObj->copyKeywords,\r\n 'requirement_assignments' => $argsObj->copyRequirementAssignments);\r\n\r\n $copy_op =array();\r\n foreach($argsObj->tcaseSet as $key => $tcaseid)\r\n {\r\n $copy_op[$tcaseid] = $tcaseMgr->copy_to($tcaseid, $argsObj->containerID, $argsObj->userID, $copyOpt);\r\n }\r\n $guiObj = new stdClass();\r\n $guiObj->attachments = getAttachmentInfosFrom($tsuiteMgr,$argsObj->objectID);\r\n $guiObj->id = $argsObj->objectID;\r\n $guiObj->refreshTree = true;\r\n $op['refreshTree'] = true;\r\n }\r\n return $op;\r\n}", "public function handleTeststep ($row, $tc_id, $ts_id, $seq)\n{\n $ts = [];\n if(!isset($row[9])|| $row[9] == null || $row[9] == \"\"){\n\t\t\t//If nothing to process then do nothing\n\t\t\t//return $ts_id;\n }else{\n $ts['description'] \t\t= $row[9];\n $ts['expected_result'] \t= $row[10];\n $ts['tp_id'] \t\t\t= session()->get('open_project');\n $ts['tc_id'] \t\t\t= $tc_id;\n $check \t\t\t\t\t= \\App\\TestStep::where($ts)->first();\n if($check == null)\n {\n $ts_id = $ts['ts_id'] = $tc_id.\"_\".$this->genrateRandomInt();\n $ts['status'] = 'not_executed';\n $ts['created_by'] = session()->get('email');\n $ts['seq_no'] = $seq;\n \\App\\TestStep::create($ts);\n $execution_content['scroll'] = 'No';\n $execution_content['resource_id'] = '';\n $execution_content['text'] = '';\n $execution_content['content_desc'] = '';\n $execution_content['class'] = '';\n $execution_content['index'] = '';\n $execution_content['sendkey'] = '';\n $execution_content['screenshot'] = 'No';\n $execution_content['checkpoint'] = '';\n $execution_content['wait'] = '';\n $execution_content['tc_id'] = $tc_id;\n $execution_content['tp_id'] = session()->get('open_project');\n $execution_content['ts_id'] = $ts_id;\n $execution_content['tl_id'] = 0;\n $execution_content['seq_no'] = $seq;\n $execution_content['e_id'] = $ts_id.\"_\".$this->genrateRandomInt();\n \\App\\Execution::create($execution_content);\n }\n else{\n $ts_id = $check->ts_id;\n }\n }\n return $ts_id;\n }", "public function postTesting() {}", "function Step2_Workflow()\r\n {\r\n // So the winter workflow tests are separated.\r\n if( ($ok = $this->sedAdmin->oPS->DoTests( 'workflow-winter_' )) ) {\r\n $ok = $this->sedAdmin->oPS->DoTests( 'workflow_' );\r\n }\r\n $s = $this->sedAdmin->oPS->GetOutput(); // output from test 1 plus possibly test 2, because they are appended internally\r\n return( $this->stepperRet( $ok, $s ) );\r\n }", "public function testGetStepsWithNoArgs()\n {\n $this->setEntityObjectHandlerReturn(function ($entityName) {\n if ($entityName == \"data1\") {\n return (new EntityDataObjectBuilder())->withDataFields(['field1' => 'testValue'])->build();\n }\n });\n\n $actionGroupUnderTest = (new ActionGroupObjectBuilder())\n ->withActionObjects([new ActionObject('action1', 'testAction', ['userInput' => '{{data1.field1}}'])])\n ->build();\n\n $steps = $actionGroupUnderTest->getSteps(null, self::ACTION_GROUP_MERGE_KEY);\n $this->assertOnMergeKeyAndActionValue($steps, ['userInput' => 'testValue']);\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 }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function testSpecial(): void {\n\t}", "abstract protected function constructTestHelper();", "public function testGetDuplicateOrderById()\n {\n }", "public function setUp();", "abstract protected function before();", "public function parallelSplitTests()\n {\n\n }", "public function step_3()\n {\n }", "public function testProcessWeirdCase2()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit1->setReversedConnection([\n 'tid' => 'id',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'id' => 'id',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '1'],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('test2');\n $unit2->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit2->setReversedConnection([\n 'tid' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'parent_id' => 'id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n false\n ]\n ));\n $unit2->setTmpFileName('customer_tmp.csv');\n $unit2->setParent($unit1);\n\n $action = $this->getAction([$unit1, $unit2]);\n $action->process($this->getResultMock());\n }", "public function testGetChangeFirstBuilds()\n {\n }", "public function test1and8(){ $this->markTestSkipped(\"ignoring for travis build\");\n $legalEntityType = \"INDIVIDUAL_SOLE_PROPRIETORSHIP\";\n $taxId = mt_rand(100000000, 999999999);\n $streetAddress1 = \"900 Chelmsford St\";\n $legalEntityPostRequest = $this->legalEntityPostRequest1 . $legalEntityType . $this->legalEntityPostRequest2 . $taxId . $this->legalEntityPostRequest3 . $streetAddress1 . $this->legalEntityPostRequest4;\n $expected_url_suffix = \"/legalentity\";\n $response = $this->Communication->httpPostRequest($expected_url_suffix, $legalEntityPostRequest);\n\n $legalEntityIdFromTest1 = $response[\"legalEntityId\"];\n $pspMerchantId = mt_rand(100,999);\n $submerchant_post_request =$this->submerchant_post_request1. $pspMerchantId . $this->submerchant_post_request2;\n $expected_url_suffix2 = $expected_url_suffix . \"/\" . $legalEntityIdFromTest1 . \"/submerchant\";\n $response2 = $this->Communication->httpPostRequest($expected_url_suffix2, $submerchant_post_request );\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function test_addReplenishmentProcessAudit() {\n\n }", "public function testGetStepsWithDefaultCase()\n {\n $entity = (new EntityDataObjectBuilder())\n ->withDataFields(['field1' => 'testValue'])\n ->build();\n $this->setEntityObjectHandlerReturn($entity);\n $actionGroupUnderTest = (new ActionGroupObjectBuilder())->build();\n $steps = $actionGroupUnderTest->getSteps(null, self::ACTION_GROUP_MERGE_KEY);\n $this->assertOnMergeKeyAndActionValue($steps, ['userInput' => 'literal']);\n }", "public function runTestSequence ()\n {\n $this->numberOfAssertions = 0;\n \n try {\n // Run setup\n $this->setUp();\n \n // Run test\n $this->result = $this->runtest();\n \n $this->status = 0; // Passed\n } // Catch for incomplete test\n catch (CIUnit_Framework_Exception_IncompleteTest $e) {\n $this->status = 2; // Incomplete\n $this->statusMessage = $e->getMessage();\n } \n\n // Catch for skipped test\n catch (CIUnit_Framework_Exception_SkippedTest $e) {\n $this->status = 1; // Skipped\n $this->statusMessage = $e->getMessage();\n } \n\n // Catch for Assertion Failure\n catch (CIUnit_Framework_Exception_AssertionFailed $e) {\n $this->status = 3; // Failure\n $this->statusMessage = $e->getMessage();\n } // Catch for Error\n catch (Exception $e) {\n $this->status = 4; // Error\n $this->statusMessage = $e->getMessage();\n }\n \n // revert fictures\n try {\n $this->tearDown();\n } // catch any errors\n catch (Exception $error) {\n if (! isset($e))\n $e = $error;\n }\n \n // If there is exception caught throw it\n if (isset($e))\n throw $e;\n }", "public function run()\n {\n $labOrder = factory(LabOrder::class)->create();\n $SKUs = SKU::where('item_type', 'lab-test')->get()->shuffle();\n\n for ($i=0; $i < 5; $i++) {\n $labTest = factory(LabTest::class)->create([\n 'lab_order_id' => $labOrder->id,\n 'sku_id' => $SKUs->pop()->id,\n ]);\n if (maybe()) {\n factory(LabTestResult::class)->create([\n 'lab_test_id' => $labTest->id,\n ]);\n }\n }\n }", "public function test_prepare_item() {}", "public function test_scenario1() {\n $data = array(array(\"predictions\" => \"./data/predictions_c.json\", \"method\" => 0, \"prediction\" => \"a\", \"confidence\" => 0.450471270879),\n\t array(\"predictions\" => \"./data/predictions_c.json\", \"method\" => 1, \"prediction\" => \"a\", \"confidence\" => 0.552021302649),\n\t\t array(\"predictions\" => \"./data/predictions_c.json\", \"method\" => 2, \"prediction\" => \"a\", \"confidence\" => 0.403632421178),\n\t\t array(\"predictions\" => \"./data/predictions_r.json\", \"method\" => 0, \"prediction\" => 1.55555556667, \"confidence\" => 0.400079152063),\n\t\t array(\"predictions\" => \"./data/predictions_r.json\", \"method\" => 1, \"prediction\" => 1.59376845074, \"confidence\" => 0.248366474212),\n\t\t array(\"predictions\" => \"./data/predictions_r.json\", \"method\" => 2, \"prediction\" => 1.55555556667 , \"confidence\" => 0.400079152063));\n\n foreach($data as $item) {\n\t print \"\\nSuccessfully computing predictions combinations\\n\";\n\t $predictions = json_decode(file_get_contents($item[\"predictions\"]));\n\n print \"Given I create a MultiVote for the set of predictions in file \" . $item[\"predictions\"] . \"\\n\";\n $multivote = new MultiVote($predictions);\n\t print \"When I compute the prediction with confidence using method \" . $item[\"method\"] . \"\\n\";\n\t $combined_results = $multivote->combine($item[\"method\"], true);\n\t print \"And I compute the prediction without confidence using method \" . $item[\"method\"] . \"\\n\";\n $combined_results_no_confidence = $multivote->combine($item[\"method\"]);\n\n\n if ($multivote->is_regression()) {\n\t print \"Then the combined prediction is \" . $item[\"prediction\"] . \"\\n\";\n $this->assertEquals(round($combined_results[0], 6), round($item[\"prediction\"],6));\n\t print \"And the combined prediction without confidence is \" . $item[\"prediction\"] . \"\\n\";\n\t $this->assertEquals(round($combined_results_no_confidence, 6), round($item[\"prediction\"] ,6));\n\t } else {\n\t print \"Then the combined prediction is \" . $item[\"prediction\"] . \"\\n\";\n\t $this->assertEquals($combined_results[0], $item[\"prediction\"]);\n\t print \"And the combined prediction without confidence is \" . $item[\"prediction\"] . \"\\n\";\n\t $this->assertEquals($combined_results_no_confidence, $item[\"prediction\"]);\n\t }\n\n print \"And the confidence for the combined prediction is \" . $item[\"confidence\"] . \"\\n\";\n\t $this->assertEquals(round($combined_results[1], 6), round($item[\"confidence\"],6));\n }\n }", "public function testGetChallengeActivities()\n {\n }", "private function _test_exec() {\n\t\t// pro kazdy jeden testovaci soubor\n\t\tforeach ($this->_dirs as $name => $dir) {\n\t\t\tforeach ($dir as $index => $test) {\n\t\t\t\t// pro kazdou cestu proved test\n\t\t\t\t$test_ret = $this->_test_single_test($test[0], $test[1]);\n\t\t\t\t// vysledek testu uloz\n\t\t\t\t$this->_dirs[$name][$index][1] = $test_ret;\n\t\t\t}\n\t\t}\n\n\t\t$this->_test_render();\n\t}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "public function testGetDuplicatePackingPlanById()\n {\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.65887916", "0.65253687", "0.64334506", "0.6366367", "0.6351567", "0.62950706", "0.62858593", "0.61406565", "0.6132214", "0.6116482", "0.60540974", "0.60418534", "0.603572", "0.60321826", "0.6024948", "0.60017884", "0.60017884", "0.60012907", "0.59583235", "0.593861", "0.59051937", "0.5842015", "0.5838581", "0.58253795", "0.5806015", "0.57958907", "0.57888794", "0.57792926", "0.5773846", "0.5763744", "0.576023", "0.5747032", "0.5715637", "0.5714406", "0.5702429", "0.5692702", "0.5677997", "0.5669791", "0.56646866", "0.5662744", "0.56613415", "0.5654167", "0.5651987", "0.56509054", "0.56505144", "0.56460434", "0.562316", "0.5616103", "0.5612888", "0.560722", "0.56014097", "0.5597182", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5595945", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.5593921", "0.559355", "0.559355", "0.5593087", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059", "0.5593059" ]
0.6459156
2
zavolat metodu rodice, ktera provede obecne hlavni kroky a nacte parametry
public function apiAction(Request $request) { parent::indexAction($request, ""); // KONTROLA ZABEZPECENI - pro jistotu // test, jestli je uzivatel prihlasen, pokud NE, tak redirect na LOGIN $this->checkAdminLogged(); // objekt pro praci s obyvateli $scheduler = new Scheduler(); $scheduler->SetPDOConnection($this->ds1->GetPDOConnection()); // DATA - v postu dostanu field a search // POZOR: data jsou ve formatu application/json a neni mozne je prijmout $_POST, musi se to takto: $json_data = file_get_contents("php://input"); $post_data = (array) json_decode($json_data); // zaroven pretypovat na pole // pro kontrolni vypis zpet do Angularu - zobrazit se to v konzoli: // print_r($post_data); // nacist vstupni data: field = napr. klicove_slovo, search: vstup od uživatele, např. lyž $select = @$post_data["select"]; $id = @$post_data["id"]; $limit = @$post_data["limit"]; if (!empty($limit)) { $scheduler->setLimit($limit); } switch($select) { case "days": return $this->selectServicesDays($scheduler); case "detail": return $this->selectDetailServices($scheduler, $id); case "time": return $this->selectServicesTime($scheduler); case "all": return $this->selectServicesAll($scheduler); case "obyvatel": return $this->selectServicesObyvatele($scheduler, $id); case "type": return $this->selectServicesType($scheduler, $id); case "history": return $this->selectServicesHistory($scheduler); case "types": return $this->selectTypes($scheduler); case "obInService": return $this->selectObyvatelInServices($scheduler); case "users": return $this->selectServicesUsers($scheduler); case "service": return $this->selectSpecificService($scheduler, $id); } return new JsonResponse("We have nothing to offer you."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "public function valorpasaje();", "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 }", "function precio($precioUnidad, $cantidad, $descuento = 0 ){ // las variables que tenemos son arbitrarias, por lo cual hay que mirar bien si ponerlas en () de la funcion\n\n\n\n$multiplicar = $precioUnidad * $cantidad;\n\n// $descuento es un porcentaje\n\n// $restar = $multiplicar - $descuento; // este descuento debe ir en % por lo cual no es lo mismo que un entero, por lo cual lo colocaremos en entero\n\n\n// si esto fuera un porcentaje entonces seria $multiplicar = $precioUnidad * $cantidad; // $porcentaje = $multiplicar - $descuento; // $solucion = $multiplicar - $porcentaje; lo cual es lo que haremos\n\n$porcentaje = $multiplicar * $descuento;\n\n$solucion = $multiplicar - $porcentaje;\nreturn $solucion;\n// si colocamos todos los datos en solo sitio o una sola linea, sin especificar es e novatos, porque hay que haber un orden\n\n}", "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 peramalanRoti()\n {\n $alpha = 0.9;\n $data[\"ramal\"] = array();\n $data[\"peramalan\"] = $this->m_penjualan->peramalan($_POST[\"idroti\"]);\n $index = 0;\n foreach ($data[\"peramalan\"] as $ramal) {\n\n if ($index == 0) {\n $data[\"ramal\"][] = $ramal[\"total\"];\n } else {\n $data[\"ramal\"][] = ($alpha * $ramal[\"total\"]) + (1 - $alpha) * $data[\"ramal\"][$index - 1];\n }\n $pesanan = $this->m_pemesanan->peramalan($ramal[\"tanggal\"], $_POST[\"idroti\"]);\n if ($pesanan[0][\"total\"] == null) {\n $data[\"pesanan\"][] = 0;\n } else {\n $data[\"pesanan\"][] = $pesanan[0][\"total\"];\n }\n\n $rencana = $data[\"ramal\"][$index] + $data[\"pesanan\"][$index];\n\n $tanggal = (new DateTime($ramal[\"tanggal\"]))->add(new DateInterval(\"P1D\"))->format('Y-m-d');\n $dataRencana = array(\n 'idroti' => $_POST[\"idroti\"],\n 'jumlah' => $rencana,\n 'tanggal' => $tanggal,\n );\n $chekTanggal = $this->m_rencanaproduksi->chekrencana($tanggal, $_POST[\"idroti\"]);\n if (sizeof($chekTanggal) == 0) {\n $this->m_rencanaproduksi->simpanrencana($dataRencana);\n }\n $index++;\n }\n// var_dump($dataRencana);\n// exit();\n $data[\"roti\"] = $this->m_produk->produk();\n $this->load->view('pimpinan/v_peramalan', array('data' => $data));\n }", "function f_obj($individu){\n\t\t$cluster = count($individu); //menghitung jumlah cluster berdasarkan individu\n\t\t$target = 10;\n\t\t$hasil = 0;\n\t\tfor ($i=0; $i < $cluster; $i++) { \n\t\t\t$hasil += $individu[$i];\n\t\t}\n\n\t\t$evaluasi = abs($hasil - $target);\n\t\treturn $evaluasi; //nilai fitness masih 0-10\n\t}", "function rola_dado_completo($qtd, $codDado, $operacao, $modificador){\n\t$resultado = 0;\n\n\t$i = 0; $j = 1;\n\n\techo \"Em rola_dado_completo(): <br/>\";\n\techo \"qtd: \" . $qtd . \"<br/>\";\n\techo \"codDado: \" . $codDado . \"<br/>\";\n\techo \"operacao: \" . $operacao . \"<br/>\";\n\techo \"modificador: \" . $modificador . \"<br/>\";\n\n\t$populacao = array();\n\t$limite = $codDado * 10;\n\n\tif($codDado == 1){\n\t\t//Adiciona o modificador na rolagem\n\t\tif($operacao == \"+\"){\n\t\t\t$resultado = 1 + $modificador;\n\t\t}\n\t\t\n\t\tif($operacao == \"-\"){\n\t\t\t$resultado1 - $modificador;\n\t\t}\n\n\t\tif($operacao == \"*\"){\n\t\t\t$resultado = $modificador;\n\t\t}\n\n\t\tif($operacao == \"/\"){\n\t\t\t$resultado = 1 / $modificador;\n\t\t}\n\n\t\treturn $resultado;\n\t}\n\n\t//Funcao que espalha os numeros do intervalo a ser rolado em um array\n\twhile($i < $limite){\n\n\t\tif($j > $codDado){\n\t\t\t$j = 1;\n\t\t}\n\t\tarray_push($populacao, $j);\n\n\t\t$j++;\n\t\t$i++;\n\t}\n\n\t$i = 0;\n\t$pos1 = 0;\n\t$pos2 = 0;\n\t$temp = 0;\n\n\t//Embaralha os numeros da população e acumula o resultado das rolagens\n\twhile($i < $limite){\n\t\t$max = $limite -1;\n\n\t\t//Gera um pequeno delay (p ver se aumenta a aleatoriedade)\n\t\t$delay = rand(1, 1000);\n\t\tfor($k = 0; $k < $delay; $k++);\n\t\t$pos1 = rand(0, $max);\n\n\t\t//Gera um pequeno delay (p ver se aumenta a aleatoriedade)\n\t\tfor($k = 0; $k < $delay; $k++);\n\t\t$pos2 = rand(0, $max);\n\n\t\t$temp = $populacao[$pos1];\n\n\t\t//troca os valores de lugar\n\t\t$populacao[$pos1] = $populacao[$pos2];\n\t\t$populacao[$pos2] = $temp;\n\n\t\t$i++;\n\t}\n\n\t//Acumula o resultado das rolagens\n\t$i = 0;\n\twhile($i < $qtd){\n\t\t$max = $limite -1;\n\t\t$resultado += $populacao[rand(0, $max)];\n\t\t$i++;\n\t}\n\n\t// echo \"Resultado da rolagem dos dados:\" . $resultado .\"<br/>\";\n\n\t//Adiciona o modificador na rolagem\n\tif($operacao == \"+\"){\n\t\t$resultado += $modificador;\n\t}\n\t\n\tif($operacao == \"-\"){\n\t\t$resultado -= $modificador;\n\t}\n\n\tif($operacao == \"*\"){\n\t\t$resultado *= $modificador;\n\t}\n\n\tif($operacao == \"/\"){\n\t\t$resultado /= $modificador;\n\t}\n\n\treturn $resultado;\n}", "public function rgveda_verse_modern($gra) {\n $data = [\n [1,191,1,1,191],\n [192,234,2,1,43],\n [235,295,3,1,62],\n [297,354,4,1,58],\n [355,441,5,1,87],\n [442,516,6,1,75],\n [517,620,7,1,104],\n [621,668,8,1,48],\n [1018,1028,8,59,59], //Vālakhilya hymns 1—11\n [669,712,8,60,103],\n [713,826,9,1,114],\n [827,1017,10,1,191]\n ];\n for($i=0;$i<count($data);$i++) {\n list($gra1,$gra2,$mandala,$hymn1,$hymn2) = $data[$i];\n if (($gra1 <= $gra) && ($gra<=$gra2)) {\n $hymn = $hymn1 + ($gra - $gra1);\n $x = \"$mandala.$hymn\";\n return $x;\n }\n }\n return \"?\"; // algorithm failed\n}", "function gl_dijagonala_sve_jedinice($matrica)\n{\n\t// echo ( napravi_tabelu( $matrica ) );\n\t/*\t\n\tif($matrica[$r][$r] != 1)\n\t{\n\t\t$x = $matrica[$r][$r];\n\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t// exit();\n\t\t\n\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t{\n\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t{\n\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t}\n\t\t}\n\t}*/\n\t\n\t\n\tfor($r = 0; $r < count($matrica); $r++)\n\t{\n\t\tif($matrica[$r][$r] != 1)\n\t\t{\n\t\t\t$x = $matrica[$r][$r];\n\t\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t\t// exit();\n\n\t\t\t// podela citavog reda matrice sa vrednoscu njegove glavne idjagonale\n\t\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t\t{\n\t\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t\t{\n\t\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $matrica;\n}", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "function ermittle_Pokalrunde_Hin_Rueck($spieltypnr)\n{\n $pokalrunde = 0;\n $hinspielkz = true;\n $anzahl = 0;\n //\n if ($spieltypnr == 101)\n {\n $pokalrunde = 1;\n $hinspielkz = true;\n $anzahl = 128;\n }\n if ($spieltypnr == 102)\n {\n $pokalrunde = 1;\n $hinspielkz = false;\n $anzahl = 128;\n }\n //\n if ($spieltypnr == 103)\n {\n $pokalrunde = 2;\n $hinspielkz = true;\n $anzahl = 64;\n }\n if ($spieltypnr == 104)\n {\n $pokalrunde = 2;\n $hinspielkz = false;\n $anzahl = 64;\n }\n //\n if ($spieltypnr == 105)\n {\n $pokalrunde = 3;\n $hinspielkz = true;\n $anzahl = 32;\n }\n if ($spieltypnr == 106)\n {\n $pokalrunde = 3;\n $hinspielkz = false;\n $anzahl = 32;\n }\n //\n if ($spieltypnr == 107)\n {\n $pokalrunde = 4;\n $hinspielkz = true;\n $anzahl = 16;\n }\n if ($spieltypnr == 108)\n {\n $pokalrunde = 4;\n $hinspielkz = false;\n $anzahl = 16;\n }\n //\n if ($spieltypnr == 109)\n {\n $pokalrunde = 5;\n $hinspielkz = true;\n $anzahl = 8;\n }\n if ($spieltypnr == 110)\n {\n $pokalrunde = 5;\n $hinspielkz = false;\n $anzahl = 8;\n }\n //\n if ($spieltypnr == 111)\n {\n $pokalrunde = 6;\n $hinspielkz = true;\n $anzahl = 4;\n }\n if ($spieltypnr == 112)\n {\n $pokalrunde = 6;\n $hinspielkz = false;\n $anzahl = 4;\n }\n //\n if ($spieltypnr == 113)\n {\n $pokalrunde = 7;\n $hinspielkz = true;\n $anzahl = 2;\n }\n if ($spieltypnr == 114)\n {\n $pokalrunde = 7;\n $hinspielkz = false;\n $anzahl = 2;\n }\n //\n if ($spieltypnr == 115)\n {\n $pokalrunde = 8;\n $hinspielkz = true;\n $anzahl = 1;\n }\n if ($spieltypnr == 116)\n {\n $pokalrunde = 8;\n $hinspielkz = false;\n $anzahl = 1;\n }\n if ($spieltypnr == 201)\n {\n $pokalrunde = 1;\n $hinspielkz = true;\n $anzahl = 8;\n }\n if ($spieltypnr == 202)\n {\n $pokalrunde = 1;\n $hinspielkz = false;\n $anzahl = 8;\n }\n if ($spieltypnr == 203)\n {\n $pokalrunde = 2;\n $hinspielkz = true;\n $anzahl = 4;\n }\n if ($spieltypnr == 204)\n {\n $pokalrunde = 2;\n $hinspielkz = false;\n $anzahl = 4;\n }\n if ($spieltypnr == 205)\n {\n $pokalrunde = 3;\n $hinspielkz = true;\n $anzahl = 2;\n }\n if ($spieltypnr == 206)\n {\n $pokalrunde = 3;\n $hinspielkz = false;\n $anzahl = 2;\n }\n if ($spieltypnr == 207)\n {\n $pokalrunde = 4;\n $hinspielkz = true;\n $anzahl = 1;\n }\n if ($spieltypnr == 208)\n {\n $pokalrunde = 4;\n $hinspielkz = false;\n $anzahl = 1;\n }\n return ([\n 'pokalrunde' => $pokalrunde,\n 'hinspielkz' => $hinspielkz,\n 'anzahl' => $anzahl,\n ]);\n}", "function valore_totale_lordo_mio_ordine($id_ordine,$id_user){\r\n return (float)valore_costi_totali($id_ordine,$id_user)+\r\n valore_arrivato_netto_ordine_user($id_ordine,$id_user);\r\n}", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "function rola_dado_simples($qtd, $codDado){\n\t$i = 0; $j = 1;\n\t$resultado = 0;\n\n\t$populacao = array();\n\t$limite = $codDado * 10;\n\n\t//Funcao que espalha os numeros do intervalo a ser rolado em um array\n\twhile($i < $limite){\n\n\t\tif($j > $codDado){\n\t\t\t$j = 1;\n\t\t}\n\n\t\tarray_push($populacao, $j);\n\n\t\t$j++;\n\t\t$i++;\n\t}\n\n\t$i = 0;\n\t$pos1 = 0;\n\t$pos2 = 0;\n\t$temp = 0;\n\n\t//Embaralha os numeros da população e acumula o resultado das rolagens\n\twhile($i < $limite){\n\n\t\t//Gera um pequeno delay (p ver se aumenta a aleatoriedade)\n\t\t$delay = rand(1, 1000);\n\n\t\t//Gera um pequeno delay (p ver se aumenta a aleatoriedade)\n\t\tfor($k = 0; $k < $delay; $k++);\n\t\t$pos1 = rand(0, ($limite-1));\n\n\t\t//Gera um pequeno delay (p ver se aumenta a aleatoriedade)\n\t\tfor($k = 0; $k < $delay; $k++);\n\t\t$pos2 = rand(0, ($limite-1));\n\n\t\t$temp = $populacao[$pos1];\n\n\t\t//troca os valores de lugar\n\t\t$populacao[$pos1] = $populacao[$pos2];\n\t\t$populacao[$pos2] = $temp;\n\n\t\t$i++;\n\t}\n\n\t//Acumula o resultado das rolagens\n\t$i = 0;\n\twhile($i < $qtd){\n\t\t$resultado += $populacao[rand(1, $codDado)];\n\t\t$i++;\n\t}\n\n\treturn $resultado;\n}", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public function Redutor_De_Ordem_Chio(Array $matriz, int $coeficiente_final) {\n \n echo \"Antes da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\"; \n\n $m = $matriz; \n \n $linha = 0;\n $coluna = 0;\n \n \n if($m['ordem'] == 1) {\n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n */ \n\n $resultado = $m['matriz'][0][0] * $coeficiente_final;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n\n echo \"O resultado do Determinante é: \" . $resultado;\n\n return $resultado;\n \n }else{\n \n \n $determinante = $m['matriz'];\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\"; \n\n //ira força o número 1 em um elemento da primeira linha\n\n $soma_de_elementos = 0;\n\n for ($i=0; $i < $m['ordem']; $i++) { \n\n \n \n if($determinante[0][$i] != 0) {\n\n $coeficiente = $determinante[0][$i];\n\n $linha = 0;\n $coluna = $i;\n\n\n break;\n \n\n }\n \n // Se a primeira linha só apresentar elementos igual a 0 então a matriz 1x1 resultado da reduções por chió será um elemento nulo\n // poís o determinante tem que ser zero pois a primeira linha é nula\n // logo se todos os elementos são zero a soma de todos os elemento tem que ser zero\n\n $soma_de_elementos += $determinante[0][$i];\n\n \n\n } \n\n if($soma_de_elementos == 0 ) {\n\n $resultado = 0;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n \n echo \"O resultado do Determinante é: \" . $resultado;\n \n return $resultado;\n\n }else{\n\n\n\n\n /**\n * A regra de Chió só ser aplicado no elemento que está primeira linha e na primeira coluna cujo valor é igual a 1.\n * Como nem todos o determinante vão satisfazer essa condição, será nesse inverter algumas fileiras (linha ou coluna)\n * e também dividir as fileiras para forçar que o primeiro elemento do determinante tenha valor igual a 1.\n * \n * Logo serão usados as propriedades do determinante:\n * Uma fileira (linha ou coluna) nula resulta em um determinante de valor igual a zero;\n * Para cada inversão de fileiro inverte-se o sinal do valor do determinante;\n * Multiplicar uma fileira por valor faz com o resultado do determinante seja multiplicado pelo mesmo valor\n */\n\n \n \n \n \n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n * \n */ \n\n\n /**\n * Inversão de fileira.\n * Só a primeira linha será válidada, pois se todos os elementos dela forem nulos então o \n * determinante será nulo.\n * Caso o primeiro seja zero e os outros diferente de zero então será necessário uma inversão\n * que matematicamente signica multiplicar o valor do determinante pelo valor -1\n * \n */\n\n $fileira = $linha + $coluna;\n\n $inverte_fileira = ( $fileira == 0 ) ? 1 : -1;\n \n \n $coeficiente_final *= $inverte_fileira * $coeficiente; \n \n \n \n echo \"Coeficiente: \" . $coeficiente; \n echo \"<br>\";\n echo \"Coeficiente final: \" . $coeficiente_final; \n echo \"<br>\";\n echo \"Linha: \" . $linha;\n echo \"<br>\"; \n echo \"Coluna: \" . $coluna;\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n \n \n\n for ($i=0; $i < $m['ordem']; $i++) { \n \n // analisando as colunas\n \n $determinante[0][$i] = $m['matriz'][0][$i] / $coeficiente; \n\n \n }\n\n\n \n\n\n echo \"Analisando o determinante parte 1\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n\n \n \n \n // ---------------- daqui pra cima esta certo ---------------------\n \n \n \n // aplicando a regra de Chió\n\n \n\n $chio = array();\n\n for ($i=0; $i < $m['ordem']; $i++) {\n \n for ($j=0; $j < $m['ordem'] ; $j++) { \n\n \n if($i != $linha && $j != $coluna) {\n \n\n $det[] = $determinante[$i][$j];\n \n\n $chio[] = $determinante[$i][$j] -( $determinante[$linha][$j] * $determinante[$i][$coluna] );\n\n \n\n }\n \n\n }\n \n }\n\n\n // Vai permitir a usar recursividade pois deixará o array no formato certo\n\n $chio = $this->mostra_Matriz($chio);\n\n\n\n // Debug \n\n\n echo \"Depois da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n \n\n echo \"Para Debug: Matriz em processo de redução de ordem: \";\n echo \"<br>\";\n print_r($det);\n \n echo \"<br>\";\n echo \"<br>\";\n\n echo \"Redução de Chió Completa: \";\n echo \"<br>\"; \n\n print_r($chio);\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n echo \"<br>\";\n\n echo \"Nova redução de ordem do Determinante\";\n\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n\n\n\n\n // ---------------- daqui pra cima esta certo ---------------------\n\n // Usando a recursidade para chegar na matriz de ordem 1\n\n \n\n $this->Redutor_De_Ordem_Chio($chio, $coeficiente_final);\n\n\n }\n\n \n\n\n }\n\n\n \n \n\n\n }", "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 ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "function lupe_vagas($idt_periodo,$municipio,$idt_programa,$cod_programa)\r\n\r\n//p($municipio);\r\n// exit();\r\n\r\n\r\n{\r\n\r\n // p($idt_eve_periodo);\r\n if ($idt_periodo=='')\r\n {\r\n // erro de parâmetro\r\n // exit()\r\n }\r\n //\r\n // Montar select\r\n //\r\n $kselectw = 'select sum(qtd_vagas_turma) as qtd_vagas\r\n from periodo_let_prgr_muni_cur_turma as turma\r\n inner join periodo_letivo pelet on turma.idt_periodo=pelet.idt\r\n inner join periodo peins on pelet.idt_periodo=peins.idt\r\n left join programa pr on turma.programa=pr.codigo';\r\n $kwherew=' where peins.idt='.$idt_periodo.' and pr.codigo='.aspa($cod_programa);\r\n\r\n if ($municipio!='')\r\n {\r\n $kwherew=$kwherew.' and cod_municipio='.aspa($municipio);\r\n }\r\n if ($idt_programa!=-1)\r\n {\r\n // tom $kwherew=$kwherew.' and idt_periodo_let_programa='.$idt_programa;\r\n $kwherew=$kwherew.' and turma.programa='.aspa($cod_programa);\r\n }\r\n $korderbyw=' ';\r\n\r\n\r\n $a=$kselectw.$kwherew.$korderbyw;\r\n\r\n//p($kwherew);\r\n\r\n\r\n// p($a);\r\n// exit();\r\n\r\n $qtd_vagas=0;\r\n\r\n $ktabelaw = execsql($a);\r\n ForEach($ktabelaw->data as $row)\r\n {\r\n $qtd_vagas=$qtd_vagas+$row['qtd_vagas'];\r\n\r\n }\r\n\r\n // p($qtd_vagas);\r\n// exit();\r\n\r\n\r\n return $qtd_vagas;\r\n}", "function temporalidad($rm_id){\n $resultado=$this->model_mestrategico->get_resultado_mplazo($rm_id); \n $programado=$this->model_mestrategico->get_resultado_mplazo_programado($rm_id);\n $configuracion=$this->model_proyecto->configuracion_session();\n $tabla = '';\n $nro=0;\n foreach($programado as $row) {\n $nro++;\n $matriz [1][$nro]=$row['g_id'];\n $matriz [2][$nro]=$row['rmp_prog'];\n }\n\n $g=$configuracion[0]['conf_gestion_desde'];\n for($j = 1; $j<=5; $j++){\n $matriz_r[1][$j]=$g;\n $matriz_r[2][$j]='0'; //// P\n $matriz_r[3][$j]='0'; //// PA\n $matriz_r[4][$j]='0'; //// %PA\n $g++;\n }\n\n for($i = 1 ;$i<=$nro ;$i++){\n for($j = 1 ;$j<=5 ;$j++){\n if($matriz[1][$i]==$matriz_r[1][$j]){\n $matriz_r[2][$j]=round($matriz[2][$i],2);\n }\n }\n }\n\n $pa=0;\n for($j = 1 ;$j<=5 ;$j++){\n $pa=$pa+$matriz_r[2][$j];\n $matriz_r[3][$j]=$pa+$resultado[0]['rm_linea_base'];\n if($resultado[0]['rm_meta']!=0){\n $matriz_r[4][$j]=round(((($pa+$resultado[0]['rm_linea_base'])/$resultado[0]['rm_meta'])*100),2);\n }\n }\n return $matriz_r;\n }", "function temporalidad_rcp($rm_id){\n for ($i=0; $i <=12 ; $i++) { \n $mes[$i]='mes'.$i.'';\n $prog[1][$i]=0; /// p\n $prog[2][$i]=0; /// pa\n $prog[3][$i]=0; /// %pa\n }\n\n $resultado=$this->model_mestrategico->get_resultado_mplazo($rm_id); \n $programado=$this->model_mestrategico->get_resultado_mplazo_programado_gestion($rm_id);\n\n \n if(count($programado)!=0){\n $programado_mensual=$this->model_mestrategico->get_resultado_cplazo_programado($programado[0]['rmp_id']);\n if(count($programado_mensual)!=0){\n\n $pa=0;\n for ($i=1; $i <=12 ; $i++) { \n $prog[1][$i]=$programado_mensual[0][$mes[$i]];\n $pa=$pa+$prog[1][$i];\n $prog[2][$i]=$pa+$resultado[0]['rm_linea_base'];\n if($resultado[0]['rm_meta']!=0){\n $prog[3][$j]=round((($prog[2][$i]/$resultado[0]['rm_meta'])*100),2);\n }\n }\n \n }\n }\n return $prog;\n }", "protected function individu_krustosana() {\n\n\t\t$krustosana = $this->krustosanas_pari; $paris = array();\n\n\n\t\t$pari_krusosanai = (count($krustosana) % 2 > 0) ? (count($krustosana) - 1) / 2 : (count($krustosana)) / 2;\n\t\tfor($i = 0; $i < $pari_krusosanai; $i++) {\n\t\t\t\n\t\t\tif($i > 0 && $krustosana[2*$i][1] == $krustosana[2*$i+1][1] || $i == 0 && $krustosana[0][1] == $krustosana[1][1]) {\n\t\t\t\t$paris[$i] = array('-', '-', '-', '-');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$paris[$i] = array($this->rand->generate(), $this->rand->generate());\n\n\t\t\t\t$randVal = floatval($paris[$i][0]); $randKeys = array_keys($this->krustosanas_intervali[0]);\n\n\t\t\t\t\tfor($j = 0; $j < count($this->krustosanas_intervali[0]); $j++) {\n\t\t\t\t\t\tif($randVal < floatval($randKeys[$j])) {\n\t\t\t\t\t\t\tif($j > 0) $paris[$i][] = $this->krustosanas_intervali[0][$randKeys[$j]];\n\t\t\t\t\t\t\telse $paris[$i][] = $this->krustosanas_intervali[0][$randKeys[0]];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t$randVal = floatval($paris[$i][1]); $randKeys = array_keys($this->krustosanas_intervali[1]);\n\t\t\t\t\tfor($j = 0; $j < count($this->krustosanas_intervali[1]); $j++) {\n\t\t\t\t\t\tif($randVal < floatval($randKeys[$j])) {\n\t\t\t\t\t\t\tif($j > 0) $paris[$i][] = $this->dalijuma_skaitlis + $this->krustosanas_intervali[1][$randKeys[$j]];\n\t\t\t\t\t\t\telse $paris[$i][] = $this->dalijuma_skaitlis + $this->krustosanas_intervali[1][$randKeys[0]];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($i > 0) $paris[$i][] = array($krustosana[2*$i], $krustosana[2*$i+1]);\n\t\t\telse $paris[$i][] = array($krustosana[0], $krustosana[1]);\n\t\t}\n\n\t\t// Krustojam\n\t\t$berni = array();\n\t\tforeach($paris as $key => $p) {\n\t\t\t\n\t\t\t$start = $p[2]; $end = $p[3];\n\t\t\tif($start == '-' || $end == '-') {\n\t\t\t\t$this->berni[] = $this->populacija[$p[4][0][1]]['BIN'];\n\t\t\t\t$this->berni[] = $this->populacija[$p[4][1][1]]['BIN'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pirmais = str_split($this->populacija[$p[4][0][1]]['BIN']);\n\t\t\t\t$otrais = str_split($this->populacija[$p[4][1][1]]['BIN']);\n\n\t\t\t\tfor($i = $start; $i <= $end; $i++) {\n\t\t\t\t\t$tmp = $pirmais[$i];\n\t\t\t\t\t$pirmais[$i] = $otrais[$i];\n\t\t\t\t\t$otrais[$i] = $tmp;\n\t\t\t\t}\n\t\t\t\t$this->berni[] = implode('', $pirmais);\n\t\t\t\t$this->berni[] = implode('', $otrais);\n\t\t\t}\n\n\n\t\t}\n\t\t?>\n\t\t<h4>Indivīdu krustošana</h4>\n\t\t<table border=1>\n\t\t\t<tr>\n\t\t\t\t<th rowspan=2>Pāris</th>\n\t\t\t\t<th rowspan=2>BIN</th>\n\t\t\t\t<th colspan=4>Krustošanās punkti</th>\n\t\t\t\t<th rowspan=2>Bērni BIN</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>G.sk.</th>\n\t\t\t\t<th>1. punkts</th>\n\t\t\t\t<th>G.sk.</th>\n\t\t\t\t<th>2. punkts</th>\n\t\t\t</tr>\n\t\t\t<?php $c = 0;\n\t\t\tfor($i = 0; $i < $pari_krusosanai * 2; $i++): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<?php if($i % 2 == 0): $c++; ?>\n\t\t\t\t\t\t<td rowspan=2><?php echo $c; ?></td>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php echo $this->populacija[$krustosana[$i][1]]['BIN']; ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<?php if($i % 2 == 0): ?>\n\n\t\t\t\t\t\t<td rowspan=2><?php echo $paris[$c-1][0]; ?></td>\n\t\t\t\t\t\t<?php if($paris[$c-1][2] != '-'): ?><td rowspan=2>Aiz <?php echo $paris[$c-1][2]; ?>. gēna</td>\n\t\t\t\t\t\t<?php else: ?><td rowspan=2>-</td><?php endif; ?>\n\n\t\t\t\t\t\t<td rowspan=2><?php echo $paris[$c-1][1]; ?></td>\n\t\t\t\t\t\t<?php if($paris[$c-1][3] != '-'): ?><td rowspan=2>Aiz <?php echo $paris[$c-1][3]; ?>. gēna</td>\n\t\t\t\t\t\t<?php else: ?><td rowspan=2>-</td><?php endif; ?>\n\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php echo $this->berni[$i]; ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t</tr>\n\t\t\t<?php endfor; ?>\n\t\t</table>\n\t\t<?php\n\t}", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "function perhitungan(){\n\n\t\tglobal $LR;\n\t\tglobal $HLIn;\n\t\tglobal $HLOut;\n\t\tglobal $numHL;\n\t\tglobal $initHL;\n\n\t\tglobal $ruanNorm;\n\t\tglobal $testNorm;\n\t\tglobal $targetNorm;\n\n\t\tglobal $mseOut;\n\t\tglobal $mseIn;\n\t\tglobal $mse;\n\t\tglobal $dy1;\n\t\tglobal $dy2;\n\t\tglobal $dz;\n\t\tglobal $dbias2;\n\t\t// $person = 0;\n\n\t\t//////////////////////////\n\t\t// $HLIn[$x][0] = uan\n\t\t// $HLIn[$x][1] = test\n\t\t// $HLIn[$x][2] = bias\n\t\t// $HLIn[$x][3] = z_in\n\t\t// $HLIn[$x][4] = z\n\t\t//////////////////////////\n\n\t\t//////////////////////////\n\t\t// $HLOut[$x][0] = z1\n\t\t// $HLOut[$x][1] = z2\n\t\t// $HLOut[$x][2] = bias2\n\t\t// $HLOut[$x][3] = y_in\n\t\t// $HLOut[$x][4] = y\n\t\t//////////////////////////\n\n\t\tfor ($person=0; $person < count($testNorm); $person++) { \n\t\t\t\n\t\t\t// $no = $person + 1;\n\t\t\t// echo \"</br>person\".$no.\"</br>\";\n\n\t\t\tif ($initHL == 1) {\n\t\t\t\tfor ($x = 0; $x < $numHL; $x++){\n\n\t\t\t\t\tfor ($y = 0; $y < 3 ; $y++) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t$HLIn[$x][$y] = rand(1, 10)/10;\n\t\t\t\t\t\t$HLOut[$x][$y] = rand(1, 10)/10; //sekalian y\n\n\t\t\t\t\t\t// echo \"hlin $x \".$HLIn[$x][$y];\n\t\t\t\t\t\t// echo \"hlout $x\".$HLOut[$x][$y].\"</br>\";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$HLIn[$x][3] = $HLIn[$x][2]+($HLIn[$x][0]*$ruanNorm[$person]+$HLIn[$x][1]*$testNorm[$person]); // z_in\n\n\t\t\t\t\t$HLIn[$x][4] = 1/(1+exp(-$HLIn[$x][3]));\n\n\t\t\t\t\t// echo $HLIn[$x][3].\"</br>\";\n\t\t\t\t\t// echo $HLIn[$x][4].\"</br>\";\n\n\t\t\t\t}\n\n\t\t\t\tfor ($x = 0; $x < $numHL; $x++){\n\n\t\t\t\t\t$HLOut[$x][3] = $HLOut[$x][2]+($HLOut[$x][0]*$HLIn[0][4])+($HLOut[$x][1]*$HLIn[1][4]); // y_in\n\t\t\t\t\t\n\t\t\t\t\t$HLOut[$x][4] = 1/(1+exp(-$HLOut[$x][3])); // y\n\n\t\t\t\t\t// echo \"hl out yin \".$HLOut[$x][3].\"</br>\";\n\t\t\t\t\t// echo \"hl out y \".$HLOut[$x][4].\"</br>\"; \n\n\t\t\t\t\t$mseOut[$x] = ($targetNorm[$person][$x]-$HLOut[$x][4])*((1/(1+exp(-$HLOut[$x][3])))*(1-1/(1+exp(-$HLOut[$x][3]))));\n\n\t\t\t\t\t// echo \"mseOut \".$mseOut[$x].\"</br>\";\n\n\t\t\t\t\t$dy1[$x] = $LR * $HLOut[$x][0] * $mseOut[$x];\n\n\t\t\t\t\t$dy2[$x] = $LR * $HLOut[$x][0] * $dy1[$x];\n\n\t\t\t\t\t$dbias2[$x] = $LR * $mseOut[$x];\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor ($x=0; $x < 2 ; $x++) { \n\n\t\t\t\t\t$mseIn[$x] = ($mseOut[0]*$HLOut[0][$x])+($mseOut[1]*$HLOut[1][$x]);\n\t\t\t\t\t$mse[$x] = $mseIn[$x] * ((1/(1+exp(-$HLIn[$x][3])))*(1-1/1+exp(-$HLIn[$x][3])));\n\n\t\t\t\t\tfor ($y = 0; $y < 3; $y++) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t$dz[$x][$y] = $mse[$x] * $HLIn[$x][$y];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\t$initHL = 0;\n\n\t\t\t//////////////////////////\n\t\t\t// kedua dan seterusnya\n\t\t\t//////////////////////////\n\n\t\t\t} else {\n\n\t\t\t\tfor ($x = 0; $x < $numHL; $x++){\n\n\t\t\t\t\tfor ($y = 0; $y < 3 ; $y++) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t$HLIn[$x][$y] = $HLIn[$x][$y] + $dz[$x][$y];\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$HLOut[$x][0] = $HLOut[$x][0] + $dy1[$x];\n\t\t\t\t\t$HLOut[$x][1] = $HLOut[$x][1] + $dy2[$x];\n\t\t\t\t\t$HLOut[$x][2] = $HLOut[$x][2] + $dbias2[$x];\n\n\t\t\t\t\t$HLIn[$x][3] = $HLIn[$x][2]+($HLIn[$x][0]*$ruanNorm[$person]+$HLIn[$x][1]*$testNorm[$person]); // z_in\n\n\t\t\t\t\t$HLIn[$x][4] = 1/(1+exp(-$HLIn[$x][3]));\n\n\n\t\t\t\t\t// echo $HLIn[$x][3];\n\t\t\t\t\t// echo $HLIn[$x][4];\n\n\n\t\t\t\t}\n\n\t\t\t\tfor ($x = 0; $x < $numHL; $x++){\n\n\t\t\t\t\t$HLOut[$x][3] = $HLOut[$x][2]+($HLOut[$x][0]*$HLIn[0][4])+($HLOut[$x][1]*$HLIn[1][4]); // y_in\n\t\t\t\t\t\n\t\t\t\t\t$HLOut[$x][4] = 1/(1+exp(-$HLOut[$x][3])); // y\n\n\t\t\t\t\t// echo \"hl out yin \".$HLOut[$x][3].\"</br>\";\n\t\t\t\t\t// echo \"hl out y \".$HLOut[$x][4].\"</br>\"; \n\n\t\t\t\t\t$mseOut[$x] = ($targetNorm[$person][$x]-$HLOut[$x][4])*((1/(1+exp(-$HLOut[$x][3])))*(1-1/(1+exp(-$HLOut[$x][3]))));\n\n\t\t\t\t\t// echo \"mseOut\".$mseOut[$x].\"</BR>\";\n\n\t\t\t\t\t$dy1[$x] = $LR * $HLOut[$x][0] * $mseOut[$x];\n\n\t\t\t\t\t$dy2[$x] = $LR * $HLOut[$x][0] * $dy1[$x];\n\n\t\t\t\t\t$dbias2[$x]= $LR * $mseOut[$x];\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor ($x=0; $x < 2 ; $x++) { \n\n\t\t\t\t\t$mseIn[$x] = ($mseOut[0]*$HLOut[0][$x])+($mseOut[1]*$HLOut[1][$x]);\n\t\t\t\t\t$mse[$x] = $mseIn[$x] * ((1/(1+exp(-$HLIn[$x][3])))*(1-1/1+exp(-$HLIn[$x][3])));\n\n\t\t\t\t\t// echo $mseIn[$x];\n\t\t\t\t\t// echo $mse[$x].\"</br>\";\n\n\t\t\t\t\tfor ($y = 0; $y < 3; $y++) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t$dz[$x][$y] = $mse[$x] * $HLIn[$x][$y];\n\n\t\t\t\t\t\t// echo \"delta z \".$dz[$x][$y].\"</br>\";\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t\n\n\n\t\t}\n\t}", "function limite_trazadora($fecha) {\r\n $fecha = strtotime(fecha_db($fecha));\r\n $actualm = date('m', $fecha);\r\n $actualy = $actualy2 = date('Y', $fecha);\r\n // $ano = date('Y', $fecha);\r\n $desdem1 = '01';\r\n $hastam1 = '04';\r\n $desdem2 = '05';\r\n $hastam2 = '08';\r\n $desdem3 = '09';\r\n $hastam3 = '12';\r\n if ($actualm >= $desdem1 && $actualm <= $hastam1) {\r\n $cuatrimestre = 1;\r\n $cuatrimestrem = 3;\r\n //$actualy2++;\r\n }\r\n if ($actualm >= $desdem2 && $actualm <= $hastam2) {\r\n $cuatrimestre = 2;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n // $actualy2++;\r\n }\r\n if ($actualm >= $desdem3 && $actualm <= $hastam3) {\r\n $cuatrimestre = 3;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n $actualy2++;\r\n }\r\n\r\n $query2 = \"SELECT desde\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n $valor['desde'] = $actualy . '-' . $res_sql2->fields['desde'];\r\n\r\n $query2 = \"SELECT limite\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n\r\n $valor['limite'] = $actualy2 . '-' . $res_sql2->fields['limite'];\r\n\r\n return $valor;\r\n}", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "function suma_godzin() {\n \n $db_connect = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n \n if( !$db_connect->connect_errno ) {\n \n $query = \"SELECT * FROM czas\";\n \n if( $result = $db_connect->query($query) ) {\n $suma_dnia_int = 0;\n $suma_dnia_mod = 0;\n while( $row_table = $result->fetch_assoc() ) {\n \n $suma_dnia_int = $suma_dnia_int + $row_table['int_sum']++;\n $suma_dnia_mod = $suma_dnia_mod + $row_table['modulo']++;\n \n }\n \n $suma_dnia_mod_mod = $suma_dnia_mod % 60;\n $suma_dnia_mod_mod = czas_pracy_modulo($suma_dnia_mod_mod);\n $suma_dnia_mod_int = $suma_dnia_mod / 60;\n $suma_dnia_mod_int = (int)$suma_dnia_mod_int;\n \n $suma_dnia_int = $suma_dnia_int + $suma_dnia_mod_int;\n $suma_dnia_int = $suma_dnia_int . \".\" . $suma_dnia_mod_mod;\n \n \n return $suma_dnia_int . '<br>'; \n \n \n }\n \n } else {\n \n echo 'Wystąpił błąd podczas połączenia z serwerem.';\n \n }\n \n $db_connect->close();\n \n}", "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "function valore_totale_mio_ordine_lordo($idu,$usr){\r\n$mio_o = valore_totale_mio_ordine($idu,$usr);\r\n//echo \"mio=\".$mio_o.\"<br>\";\r\n\r\n$vto = valore_totale_ordine_qarr($idu);\r\n\r\n//echo \"vto=\".$vto.\"<br>\"; \r\nif ($vto>0){ \r\n$perc = (float)($mio_o/$vto)*100;\r\n\r\n$tras = valore_trasporto($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\";\r\n//echo \"tras=\".$tras.\"<br>\"; \r\n$gest =valore_gestione($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\"; \r\n//echo $perc;\r\nreturn (float)round($mio_o + $tras + $gest,4);\r\n}else{\r\nreturn \"\"; \r\n\t\r\n}\r\n}", "function verificaJogoVelha($jogo){\n\t//valor 1 => jogador 1\n\t//valor 2 => jogador 2\n\t\n\tif($jogo[0] != 0){\n\t\t//primeira horizontal\n\t\tif($jogo[0] == $jogo[1] && $jogo[0] == $jogo[2]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira vertical\n\t\telse if($jogo[0] == $jogo[3] && $jogo[0] == $jogo[6]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira diagonal\n\t\telse if($jogo[0] == $jogo[4] && $jogo[0] == $jogo[8]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t}\n\tif($jogo[2] != 0){\n\t\t//terceira vertical\n\t\tif($jogo[2] == $jogo[5] && $jogo[2] == $jogo[8]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t\t//segunda diagonal\n\t\telse if($jogo[2] == $jogo[4] && $jogo[2] == $jogo[6]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t}\n\tif($jogo[7] != 0){\n\t\t//terceira horizontal\n\t\tif($jogo[6] == $jogo[7] && $jogo[7] == $jogo[8]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t\t//segunda vertical\n\t\telse if($jogo[1] == $jogo[7] && $jogo[4] == $jogo[7]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t}\n\t//segunda horizontal\n\tif($jogo[3] != 0 && $jogo[3] == $jogo[4] && $jogo[3] == $jogo[5]){\n\t\treturn $jogo[3];\n\t}\n\t\n\tfor($i = 0; $i < 9; $i++){\n\t\tif($jogo[$i] == 0) break;\n\t}\n\t\n\tif($i == 9) return 'empate';\n\t\n\treturn false;\n}", "public function dodaj_radnju()\n {\n \n $imeR = $this->request->getVar(\"imeR\");\n $pib = $this->request->getVar(\"pib\");\n $gs = $this->request->getVar(\"geosir\");\n $gd = $this->request->getVar(\"geoduz\");\n $pon = $this->request->getVar(\"pon\");\n $uto = $this->request->getVar(\"uto\");\n $sre = $this->request->getVar(\"sre\");\n $cet = $this->request->getVar(\"cet\");\n $pet = $this->request->getVar(\"pet\");\n $sub = $this->request->getVar(\"sub\");\n $ned = $this->request->getVar(\"ned\");\n $pon1 = $this->request->getVar(\"pon1\");\n $uto1 = $this->request->getVar(\"uto1\");\n $sre1 = $this->request->getVar(\"sre1\");\n $cet1 = $this->request->getVar(\"cet1\");\n $pet1 = $this->request->getVar(\"pet1\");\n $sub1 = $this->request->getVar(\"sub1\");\n $ned1 = $this->request->getVar(\"ned1\");\n $pon2 = $this->request->getVar(\"pon2\");\n $uto2 = $this->request->getVar(\"uto2\");\n $sre2 = $this->request->getVar(\"sre2\");\n $cet2 = $this->request->getVar(\"cet2\");\n $pet2 = $this->request->getVar(\"pet2\");\n $sub2 = $this->request->getVar(\"sub2\");\n $ned2 = $this->request->getVar(\"ned2\");\n $kIme = $this->session->get(\"kIme\");\n $sifra = $this->session->get(\"sifra\");\n $email = $this->session->get(\"email\");\n $tip = $this->session->get(\"tip\");\n\n $rd = \"\";\n if($pon == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($uto == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($sre == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($cet == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($pet == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($sub == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n if($ned == \"on\")\n $rd = $rd.\"1\";\n else\n $rd = $rd.\"0\";\n\n $pon12 = $pon1.\"-\".$pon2;\n $uto12 = $uto1.\"-\".$uto2;\n $sre12 = $sre1.\"-\".$sre2;\n $cet12 = $cet1.\"-\".$cet2;\n $pet12 = $pet1.\"-\".$pet2;\n $sub12 = $sub1.\"-\".$sub2;\n $ned12 = $ned1.\"-\".$pon2;\n $rv = $pon12.\";\".$uto12.\";\".$sre12.\";\".$cet12.\";\".$pet12.\";\".$sub12.\";\".$ned12;\n\n $km = new KorisnikModel();\n $idK = $km->insert([ 'kIme'=>$kIme,\n 'sifra'=>$sifra,\n 'email'=>$email,\n 'tipKorisnika'=>3]);\n $r = new RadnjaModel();\n $data = [\n \"naziv\" => $imeR,\n \"pib\" => $pib,\n \"sirina\" => $gs,\n \"duzina\" => $gd,\n \"radniDani\" => $rd,\n \"radnoVreme\" => $rv,\n \"idPredstavnika\" => $idK\n ];\n $r->insert($data);\n return redirect()->to(site_url(\"Gost/prijava\"));\n }", "public function cercaP() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n\r\n $ricerca = array();\r\n $ricerca[\"numeroPratica\"] = isset($_REQUEST[\"numeroPratica\"]) ? $_REQUEST[\"numeroPratica\"] : null;\r\n $ricerca[\"statoPratica\"] = isset($_REQUEST[\"statoPratica\"]) ? $_REQUEST[\"statoPratica\"] : null;\r\n $ricerca[\"tipoPratica\"] = isset($_REQUEST[\"tipoPratica\"]) ? $_REQUEST[\"tipoPratica\"] : null;\r\n $ricerca[\"incaricato\"] = isset($_REQUEST[\"incaricato\"]) ? $_REQUEST[\"incaricato\"] : null;\r\n $ricerca[\"flagAllaFirma\"] = isset($_REQUEST[\"flagAllaFirma\"]) ? $_REQUEST[\"flagAllaFirma\"] : null;\r\n $ricerca[\"flagFirmata\"] = isset($_REQUEST[\"flagFirmata\"]) ? $_REQUEST[\"flagFirmata\"] : null;\r\n $ricerca[\"flagInAttesa\"] = isset($_REQUEST[\"flagInAttesa\"]) ? $_REQUEST[\"flagInAttesa\"] : null;\r\n $ricerca[\"flagSoprintendenza\"] = isset($_REQUEST[\"flagSoprintendenza\"]) ? $_REQUEST[\"flagSoprintendenza\"] : null;\r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n $richiestaFirmate = isset($_REQUEST[\"richiestaFirmate\"]) ? $_REQUEST[\"richiestaFirmate\"] : 0;\r\n\r\n if ($ruolo < 2) {\r\n $ricerca[\"incaricato\"] = $operatore->getId();\r\n }\r\n\r\n //$numeroPratiche = PraticaFactory::numeroTotalePratiche();\r\n $numeroPratiche= PraticaFactory::elencoNumeroP($ricerca);\r\n \r\n if ($offset >= $numeroPratiche) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n if ($richiestaFirmate === 0) {\r\n $href = '<a href=\"index.php?page=operatore&cmd=aggiornaP&numeroP=';\r\n } elseif ($ruolo > 2) {\r\n $href = '<a href=\"index.php?page=responsabile&cmd=firmaP&numeroP=';\r\n }\r\n\r\n $pratiche = PraticaFactory::elencoP($ricerca, $offset, $numero);\r\n \r\n $x = count($pratiche);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $pratiche[$i]->getNumeroPratica() . \"\\\">\" . $pratiche[$i]->getNumeroPratica() . \"</a></td>\"\r\n . \"<td>\" . $pratiche[$i]->getDataCaricamento(true) . \"</td>\"\r\n . \"<td>\" . $pratiche[$i]->getRichiedente() . \"</td>\"\r\n . \"<td>\" . PraticaFactory::tipoPratica($pratiche[$i]->getTipoPratica()) . \"</td>\"\r\n . \"<td>\" . PraticaFactory::statoPratica($pratiche[$i]->getStatoPratica()) . \"</td>\"\r\n . \"<td>\" . OperatoreFactory::getOperatore($pratiche[$i]->getIncaricato())->getNominativo() . \"</td>\"\r\n . \"</tr>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroPratiche\"] = $numeroPratiche;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "public static function obtener_rutficticio($_rol) {\n while($_rol[0] == \"0\") {\n $_rol = substr($_rol, 1);\n }\n $factor = 2;\n $suma = 0;\n for($i = strlen($_rol) - 1; $i >= 0; $i--) {\n $suma += $factor * $_rol[$i];\n $factor = $factor % 7 == 0 ? 2 : $factor + 1;\n }\n $dv = 11 - $suma % 11;\n /* Por alguna razón me daba que 11 % 11 = 11. Esto lo resuelve. */\n $dv = $dv == 11 ? 0 : ($dv == 10 ? \"K\" : $dv);\n\n $existe = PrsPersonas::where('rut_ficticio',$_rol . \"-\" . $dv)->count();\n\n if($existe == 0){\n return $_rol . \"-\" . $dv;\n }else{\n return Helper::obtener_rutficticio(mt_rand(10000000,99999999));\n }\n\n\n }", "function calculerSurface ($longueur, $largeur, $hauteur)\r\n{\r\n $surfaceGrandMur = $longueur * $hauteur;\r\n $surfacePetitMur = $largeur * $hauteur;\r\n $surfaceTotale = ($surfaceGrandMur + $surfacePetitMur) * 2;\r\n \r\n return $surfaceTotale;\r\n // return 2 * $hauteur * ($longueur + $largeur);\r\n}", "function valore_costo_trasporto_ordine_amico($id_ordine,$id_user,$id_amico){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_netto_singolo_amico($id_ordine,$id_user,$id_amico);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_trasporto;\r\n}", "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}", "function trabajo(){\nglobal $fechac;\nglobal $fechaf;\nglobal $data;\nglobal $plano;\n if(isset($_POST['fechai']))\n $fecha=$_POST['fechai'];\n if(isset($_SESSION['fechai']))\n $fecha=$_SESSION['fechai'];\n $dia=substr($fecha,0,2);\n $mes=substr($fecha,3,2);\n $ano=substr($fecha,6,4);\n $fechac=$ano.\"-\".$mes.\"-\".$dia;\n\n if(isset($_POST['fechat']))\n $fecha=$_POST['fechat'];\n if(isset($_SESSION['fechat']))\n $fecha=$_SESSION['fechat'];\n $dia=substr($fecha,0,2);\n $mes=substr($fecha,3,2);\n $ano=substr($fecha,6,4);\n $fechaf=$ano.\"-\".$mes.\"-\".$dia;\n\n//echo \"trabajo fechac:\".$fechac.\"<br>\";\n//echo \"trabajo fechaf:\".$fechaf.\"<br>\";\n\n/*\nif (!isset($_SESSION['fechai']))\n $_SESSION['fechai']=$_POST['fechai'];\nif (!isset($_SESSION['fechat']))\n $_SESSION['fechat']=$_POST['fechat'];\n\n$fecha=$_POST['fechai'];\n$dia=substr($fecha,0,2);\n$mes=substr($fecha,3,2);\n$ano=substr($fecha,6,4);\n$fechai=$ano.\"-\".$mes.\"-\".$dia;\n$fecha=$_POST['fechat'];\n$dia=substr($fecha,0,2);\n$mes=substr($fecha,3,2);\n$ano=substr($fecha,6,4);\n$fechat=$ano.\"-\".$mes.\"-\".$dia;\n*/\n$query_rsh = \"select sum(pbm1+pb1_9+pb10_14+pb15_64+pb65ym+pbotras +\n pom1+po1_9+po10_14+po15_64+po65ym+pootras) as pediatria,\n sum(hbm1+hb1_9+hb10_14+hb15_64+hb65ym+hbotras +\n hom1+ho1_9+ho10_14+ho15_64+ho65ym+hootras +\n mbm1+mb1_9+mb10_14+mb15_64+mb65ym+mbotras +\n mom1+mo1_9+mo10_14+mo15_64+mo65ym+mootras ) as medicina,\n sum(utitm1+utit1_9+utit10_14+utit15_64+utit65ym+utitotras +\n utibm1+utib1_9+utib10_14+utib15_64+utib65ym+utibotras +\n ucibm1+ucib1_9+ucib10_14+ucib15_64+ucib65ym+ucibotras +\n ucitm1+ucit1_9+ucit10_14+ucit15_64+ucit65ym+ucitotras ) as upc\n FROM hospitaliza\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n\n$query_rsf = \"select sum(falli0a14 + falle0a14 + falleh0a14) as f0a14,\n sum(falli15a64 + falle15a64 + falleh15a64) as f15a64,\n sum(falli65a74 + falle65a74 + falleh65a74) as f65a74,\n sum(falli75ym + falle75ym + falleh75ym) as f75ym,\n\t\t\t\t\t sum(falli0a14ira + falle0a14ira + falleh0a14ira) as f0a14ira,\n sum(falli15a64ira + falle15a64ira + falleh15a64ira) as f15a64ira,\n sum(falli65a74ira + falle65a74ira + falleh65a74ira) as f65a74ira,\n sum(falli75ymira + falle75ymira + falleh75ymira) as f75ymira,\n\t\t\t\t\t sum(ifi0a14) as ifi0a14,\n\t\t\t\t\t sum(ifi15a64) as ifi15a64,\n\t\t\t\t\t sum(ifi65a74) as ifi65a74,\n\t\t\t\t\t sum(ifi75ym) as ifi75ym\n FROM fallecidoh\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n\n$query_rs = \"SELECT \n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym + \n asma_m1 + asma_1a9 + asma_10a14 + asma_15a64 + asma_65ym + \n neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym + \n influ_m1 + influ_1a9 + influ_10a14 + influ_15a64+ influ_65ym + \n larin_m1 + larin_1a9 + larin_10a14 + larin_15a64+ larin_65ym + \n\t\t\tiraltas_m1 + iraltas_1a9 + iraltas_10a14 + iraltas_15a64+ iraltas_65ym + \n resto_m1 + resto_1a9 + resto_10a14 + resto_15a64 + resto_65ym +\n totsinm1 + totsin1a9 + totsin10a14 + totsin15a64 + totsin65ym +\n totm1 + tot1a9 + tot10a14 + tot15a64 + tot65ym) as toturg,\n\n sum(totm1 + tot1a9 + tot10a14 + tot15a64 + tot65ym) as totmed,\n\n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym) as totsbo,\n\n sum(neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym) as totneumo, \n\n sum(bronq_m1 + asma_m1 + neumo_m1 + influ_m1 + larin_m1 + iraltas_m1 + resto_m1) as iram1,\n\n sum(bronq_65ym + asma_65ym + neumo_65ym + influ_65ym + larin_65ym + iraltas_65ym + resto_65ym) as ira65ym,\n\n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym + \n asma_m1 + asma_1a9 + asma_10a14 + asma_15a64 + asma_65ym + \n neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym + \n influ_m1 + influ_1a9 + influ_10a14 + influ_15a64+ influ_65ym + \n larin_m1 + larin_1a9 + larin_10a14 + larin_15a64+ larin_65ym + \n\t\t\t iraltas_m1 + iraltas_1a9 + iraltas_10a14 + iraltas_15a64+ iraltas_65ym + \n resto_m1 + resto_1a9 + resto_10a14 + resto_15a64 + resto_65ym) as totira \n\n FROM aturg_urbana\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n$rs = safe_query($query_rs);\n$row_rs = mysql_fetch_assoc($rs);\n$totalRows_rs = mysql_num_rows($rs);\n$toturg=$row_rs['toturg'];\n$totira=$row_rs['totira'];\n$totmed=$row_rs['totmed'];\n$totsbo=$row_rs['totsbo'];\n$totneumo=$row_rs['totneumo'];\n$iram1=$row_rs['iram1'];\n$ira65ym=$row_rs['ira65ym'];\n\n$rsf = safe_query($query_rsf);\n$row_rsf = mysql_fetch_assoc($rsf);\n$totalRows_rsf = mysql_num_rows($rsf);\n$f0a14=$row_rsf['f0a14'];\n$f15a64=$row_rsf['f15a64'];\n$f65a74=$row_rsf['f65a74'];\n$f75ym=$row_rsf['f75ym'];\n$f0a14ira=$row_rsf['f0a14ira'];\n$f15a64ira=$row_rsf['f15a64ira'];\n$f65a74ira=$row_rsf['f65a74ira'];\n$f75ymira=$row_rsf['f75ymira'];\n$ifi0a14=$row_rsf['ifi0a14'];\n$ifi15a64=$row_rsf['ifi15a64'];\n$ifi65a74=$row_rsf['ifi65a74'];\n$ifi75ym=$row_rsf['ifi75ym'];\n\n$rsh = safe_query($query_rsh);\n$row_rsh = mysql_fetch_assoc($rsh);\n$totalRows_rsh = mysql_num_rows($rsh);\n$pediatria=$row_rsh['pediatria'];\n$medicina=$row_rsh['medicina'];\n$upc=$row_rsh['upc'];\n\nif ($toturg>0){\n $ind1=($totira/$toturg)*100;\n $val1=number_format($ind1,2,\",\",\".\"); }\nelse\n $val1=\"-\";\n\nif ($totmed>0){\n $ind2=($totira/($totmed + $totira))*100;\n $val2=number_format($ind2,2,\",\",\".\"); }\nelse\n $val2=\"-\";\n\nif ($totira>0){\n $ind3=($totsbo/$totira)*100;\n $val3=number_format($ind3,2,\",\",\".\"); }\nelse\n $val3=\"-\";\n\nif ($totneumo>0){\n $ind4=($totneumo/$totira)*100;\n $val4=number_format($ind4,2,\",\",\".\"); }\nelse\n $val4=\"-\";\n\nif ($totira>0){\n $ind5=($iram1/$totira)*100;\n $val5=number_format($ind5,2,\",\",\".\"); }\nelse\n $val5=\"-\";\n\nif ($totira>0){\n $ind6=($ira65ym/$totira)*100;\n $val6=number_format($ind6,2,\",\",\".\"); }\nelse\n $val6=\"-\";\n\n// crea archivo para enviar por correo\n$fileExcel=$_SESSION['nombre'].\".htm\";\n$fileExcel=str_replace(\" \",\"_\",$fileExcel);\n$fp=fopen($fileExcel,\"w\");\n\n$imp= <<<EOQ\n<table width=\"600\" border=\"0\" align=\"center\">\n <caption>\n <font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Gestión IRA<br>\nEOQ;\necho $imp;\n$data=$imp;\n\n$plano=\"Establecimiento: \".$_SESSION['nombre'].\"\\n\";\n$plano.=\"Semana: \".$_SESSION['fechai'].\" al \".$_SESSION['fechat'].\"\\n\";\n\n$imp= \"<br><font size=\\\"1\\\">Establecimiento:</font> <i>\".$_SESSION['nombre'].\"</i> \"\n .\"&nbsp;&nbsp;Fecha: &nbsp;<font size=\\\"1\\\">\".$_SESSION['fechai'].\"&nbsp;&nbsp; al &nbsp;&nbsp;\" .$_SESSION['fechat'].\"</font>\";\necho $imp;\n$data.=$imp;\n\n$plano.=\"Indicador \\t \\t \\t \\t \\t \\t \\t \\t \\tValor \\t Composición\\n\";\n$plano.=\"% consultas IRA / total consultas urgencia \\t\\t\\t $val1% \\t ($totira / $toturg )\\n\";\n$plano.=\"% consultas IRA / total consultas médicas \\t \\t\\t $val2% \\t (($totira /( $totmed + $totira))\\n\";\n$plano.=\"% consultas Sind.Bron.Obs. / total consultas respirat.\\t $val3% \\t ($totsbo / $totira)\\n\";\n$plano.=\"% consultas neumonía / total consultas respiratorias \\t\\t $val4% \\t ($totneumo / $totira)\\n\";\n$plano.=\"Consultas respiratorias por grupo etario:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t\\t < 1 año: \\t\\t $val5% \\t ( $iram1 / $totira )\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t\\t > 65 años: \\t $val6% \\t ( $ira65ym / $totira )\\n\";\n\n$imp= <<<EOQ\n </strong></font> \n </caption>\n <tr bgcolor=\"#DDDDDD\"> \n <td width=\"320\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Indicador</strong></font></td>\n <td width=\"80\"> \n <div align=\"right\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Valor</strong></font></div></td>\n <td width=\"100\">\n <div align=\"right\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Composición\n </strong></font></div>\n <td> \n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas IRA / total consultas urgencia</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val1</strong>%</font></font></font></div>\n </td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totira / $toturg) </strong></font></font></font></div>\n </td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas IRA / total consultas m&eacute;dicas</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val2</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totira /( $totmed + $totira) ) </strong>\n </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas Sind.Bron.Obs. / total consultas respirat.</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val3</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>($totsbo / $totira)</strong>\n </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas neumon&iacute;a / total consultas respiratorias</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val4</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totneumo / $totira)</strong> </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n Consultas respiratorias por grupo etario:</font></strong></td>\n <td><div align=\"right\"></div></td>\n <td>&nbsp;</td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">&lt; \n 1 a&ntilde;o:</font></div></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$val5</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>( $iram1 / $totira )</strong> </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">&gt; \n 65 a&ntilde;os:</font></div></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$val6</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>( $ira65ym / $totira )</strong></font></font></font></div>\n </td>\n\n </tr>\nEOQ;\necho $imp;\n$data.=$imp;\n\n if(strcmp($_SESSION['tipo'],'sapu')!=0){\n\n$plano.=\"Hospitalizaciones:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t Pediatría:\\t\\t\\t $pediatria \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t Medicina:\\t\\t\\t $medicina \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t U.P.C.:\\t\\t\\t $upc \\n\";\n\n$imp= <<<EOQ\n <tr> \n <td><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>Hospitalizaciones</strong></font></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"2\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"></font></font></font></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Pediatría:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$pediatria</strong></font></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Medicina:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$medicina</strong></font></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">U.P.C.:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$upc</strong></font></td>\n </tr>\nEOQ;\necho $imp;\n$data.=$imp;\n\n}\n$plano.=\"Fallecidos según edad:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 0-14 años: \\t\\t $f0a14 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 15-64 años: \\t\\t $f15a64 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 65-74 años: \\t\\t $f65a74 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 75 y más años: \\t\\t $f75ym \\n\";\n\n$imp= <<<EOQ\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Fallecidos \n seg&uacute;n edad X IRA:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f0a14ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f15a64ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f65a74ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f75ymira</strong></font></td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Fallecidos \n seg&uacute;n edad x otras causas:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f0a14</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f15a64</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f65a74</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f75ym</strong></font></td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">IFI:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi0a14</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi15a64</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi65a74</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi75ym</strong></font></td>\n </tr>\n \n</table>\nEOQ;\necho $imp;\n$data.=$imp;\nfwrite($fp,$data); // graba archivo\nfclose($fp); // cierra\n}", "function fantacalcio_calcola_totali($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n// $vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = array();\n foreach ($competitions as $c_id => $competition) {\n $competition_round = get_last_competition_round($c_id);\n $matches_competitions = get_round_matches($competition_round, '', $c_id);\n\n $matches = array_merge($matches, $matches_competitions);\n }\n\n $out = '';\n\n $header = array(\"Comp\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"W\");\n\n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n\n $mod_por_1 = $match->mod_por_1;\n $mod_por_2 = $match->mod_por_2;\n $mod_dif_1 = $match->mod_dif_1;\n $mod_dif_2 = $match->mod_dif_2;\n $mod_centr_1 = $match->mod_centr_1;\n $mod_centr_2 = $match->mod_centr_2;\n $mod_att_1 = $match->mod_att_1;\n $mod_att_2 = $match->mod_att_2;\n \n $bonus_t1 = $match->bonus_t1;\n $bonus_t2 = $match->bonus_t2;\n\n $tot_voti_1 = get_totale($t1_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n $tot_voti_2 = get_totale($t2_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n\n $tot_1 = $tot_voti_1 + $mod_por_1 + $mod_dif_2 + $mod_centr_1 + $mod_att_1 + $bonus_t1;\n $tot_2 = $tot_voti_2 + $mod_por_2 + $mod_dif_1 + $mod_centr_2 + $mod_att_2 + $bonus_t2;\n\n $goals_1 = floor(($tot_1 -60) / 6);\n $goals_2 = floor(($tot_2 -60) / 6);\n $goals_1 = ($goals_1 >= 0) ? $goals_1 : 0;\n $goals_2 = ($goals_2 >= 0) ? $goals_2 : 0;\n \n //vittoria con scarto\n if (variable_get('fantacalcio_scarto', '0') && variable_get('fantacalcio_scarto_punti', '0') > 0) {\n if ( ($goals_1 == $goals_2) && ($tot_1 - $tot_2) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_1++;\n if ( ($goals_1 == $goals_2) && ($tot_2 - $tot_1) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_2++;\n }\n\n $winner_id = ($goals_1 > $goals_2) ? $t1_id : $t2_id;\n $winner_id = ($goals_1 == $goals_2) ? -1 : $winner_id;\n\n //aggiorno partite\n $sql = \"UPDATE {fanta_matches} SET \n pt_1 = '%f', \n pt_2 = '%f', \n tot_1 = '%f', \n tot_2 = '%f', \n goals_1 = '%d', \n goals_2 = '%d', \n played = 1, \n winner_id = '%d' \n WHERE m_id = '%d'\";\n $result = db_query($sql, $tot_voti_1, $tot_voti_2, $tot_1, $tot_2, $goals_1, $goals_2, $winner_id, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Punti\", \"Totale\", \"Goal\", \"Vincitore\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['pt_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['tot_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['goals_1'];\n //$rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['pt_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['tot_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['goals_2'];\n $rows[$row['m_id'] . \"_2\"][] = ($row['winner_id'] == -1) ? \" - \" : $teams[$row['winner_id']]->name;\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n}", "public function ventaMayor($idcliente,$get_tcambio){\n //$sql=\"SELECT ocCab.idordenventa,ocCab.importeordencobro,CASE ovCab.IdMoneda WHEN 2 THEN ocCab.importeordencobro*\".$get_tcambio.\" WHEN 1 THEN ocCab.importeordencobro END AS total\n //FROM wc_ordenventa ovCab,wc_ordencobro ocCab\n //WHERE ovCab.idcliente=\".$idcliente.\"\n //AND ovCab.idordenventa=ocCab.idordenventa\n //AND ovCab.vbcreditos=1\n //AND ovCab.vbventas=1\n //AND ovCab.vbcobranzas=1\n //AND ovCab.estado=1\n //ORDER BY ocCab.idordenventa,ocCab.idordencobro ASC\";\n // $array_ventaMayor = $this->scriptArrayCompleto($sql);\n // $idordenventa=-1;\n // for ($i = 0; $i < count($array_ventaMayor); $i++) {\n // if($idordenventa!=$array_ventaMayor[$i]['idordenventa']){\n // $cadena[]=$array_ventaMayor[$i]['total'];\n // }\n // $idordenventa=$array_ventaMayor[$i]['idordenventa'];\n // }\n // $totalmayor=max($cadena);\n //\n // end como nacio la venta\n\n //start como esta actualmente esta la venta -- angel lo indico en el modulo vista global\n $sql=\"SELECT ovCab.idordenventa,CASE ovCab.IdMoneda WHEN 2 THEN SUM(ogCab.importegasto)*\".$get_tcambio.\" WHEN 1 THEN SUM(ogCab.importegasto) END AS total\n FROM wc_ordenventa ovCab,wc_ordengasto ogCab\n WHERE ovCab.idcliente=\".$idcliente.\"\n AND ovCab.idordenventa=ogCab.idordenventa\n AND ovCab.vbcreditos=1\n AND ovCab.vbventas=1\n AND ovCab.vbcobranzas=1\n AND ovCab.estado=1\n AND ogCab.estado=1\n GROUP BY ovCab.idordenventa ORDER BY total DESC;\";\n $array_ventaMayor = $this->scriptArrayCompleto($sql);\n //end como termino la venta\n return $array_ventaMayor[0]['total'];\n }", "function promedios_por_materia($vector){\n echo \"<hr> ############# Promedios por materia #############\";\n $calificacion1=0;\n $calificacion2=0;\n $calificacion3=0;\n $calificacion4=0;\n $calificacion5=0;\n $calificacion6=0;\n foreach ($vector as $key => $value) {\n $calificacion1=$calificacion1+$vector[$key][0];\n $calificacion2=$calificacion2+$vector[$key][1];\n $calificacion3=$calificacion3+$vector[$key][2];\n $calificacion4=$calificacion4+$vector[$key][3];\n $calificacion5=$calificacion5+$vector[$key][4];\n $calificacion6=$calificacion6+$vector[$key][5];\n }\n $prom=$calificacion1/10;\n echo \"<br> Promedio materia 1: \".$prom;\n $prom=$calificacion2/10;\n echo \"<br> Promedio materia 2: \".$prom;\n $prom=$calificacion3/10;\n echo \"<br> Promedio materia 3: \".$prom;\n $prom=$calificacion4/10;\n echo \"<br> Promedio materia 4: \".$prom;\n $prom=$calificacion5/10;\n echo \"<br> Promedio materia 5: \".$prom;\n $prom=$calificacion6/10;\n echo \"<br> Promedio materia 6: \".$prom;\n }", "function mejor_promedio($vector){\n echo \"<hr> ############# Mejor promedio #############\";\n $promedio=0;\n $cadena;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n if($n>$promedio){\n $promedio=$n;\n $cadena = \"<br>\".$c.\" -->Promedio: \".$n;\n }\n }\n }\n echo $cadena;\n }", "function valore_netto_singolo_amico($ordine,$id_user,$amico){\r\n//echo \"--id_ord: \". $ordine;\r\n//echo \"--id_amico: \". $amico;\r\n//echo \"--id user: \". $id_user.\"<br>\"; \r\n \r\n// la nuova query si appoggia sull'id articolo reperito dalla tabella dettaglio ordini\r\n$sql =\"SELECT Sum(retegas_articoli.prezzo * retegas_distribuzione_spesa.qta_arr) as tot_amico\r\nFROM\r\nretegas_distribuzione_spesa\r\nInner Join retegas_dettaglio_ordini ON retegas_distribuzione_spesa.id_riga_dettaglio_ordine = retegas_dettaglio_ordini.id_dettaglio_ordini\r\nInner Join retegas_articoli ON retegas_dettaglio_ordini.id_articoli = retegas_articoli.id_articoli\r\nWHERE retegas_distribuzione_spesa.id_user = '$id_user' \r\nAND retegas_distribuzione_spesa.id_ordine = '$ordine' \r\nAND retegas_distribuzione_spesa.id_amico = '$amico';\";\r\n\r\n\r\n\r\n//echo $sql;\r\n$ret = mysql_query($sql);\r\n$row = mysql_fetch_row($ret);\r\n//echo \"RESULT\".$row[0].\"<br>\";\r\nreturn round($row[0],4);\r\n \r\n}", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "public function run()\n {\n #primer año\n $this->agregar(7713,[5793,5912],[],[],[5793,5912]); # ipoo\n $this->agregar(7791,[5793,5912],[],[],[5793,5912]); # lenguajes formales\n\n #segundo \n $this->agregar(7655,[5551,7713],[5793],[],[5551,7713,5793]); # ED\n $this->agregar(7949,[7713,7791],[5912],[],[7713,7791,5912]); # tdp\n $this->agregar(5552,[],[5551],[],[5551]); # am2\n $this->agregar(5744,[7791,7655],[7713],[],[7791,7655,7713]); # orga\n $this->agregar(7951,[7655],[7713],[],[7655,7713]); # tdp\n\n #tercero\n $this->agregar(5534,[7951],[7655],[],[7951,7655]); # ayds\n $this->agregar(5561,[5744],[7791],[],[5744,7791]); # arqui\n $this->agregar(5704,[7951],[7949],[],[7951,7951]); # logica\n $this->agregar(7552,[5704,5534],[],[],[5704,5534]); # bases de datos\n $this->agregar(7810,[5552],[7791,7655],[],[5552,7791,7655]); # mcc\n $this->agregar(7820,[7791],[5551,5793],[],[7791,5551,5793]); # estadsitica\n $this->agregar(7925,[5561],[5744],[],[5561,5744]); # soyd\n\n #cuarto\n $this->agregar(5587,[7552],[5534],[],[7552,5534]); # dyds\n $this->agregar(5696,[7925,7552],[5704],[],[7925,7552,5704]); # lenguajes de prog\n $this->agregar(7903,[7925],[],[],[7925]); #redes\n $this->agregar(7502,[5587],[],[],[5587]); # aps\n $this->agregar(5576,[5696],[],[],[5696]); # compiladores\n $this->agregar(5684,[7552],[5704],[],[7552,5704]); # IA\n\n #quinto\n $this->agregar(5523,[5704,7810],[7951],[],[5704,7810,7951]); # algoritmos\n $this->agregar(7680,[5587,7903],[7552],[],[5587,7903,7552]); # iaw\n\n }", "function gestiondegats($idvaisseauquisefaittirerdessus, $pvvaisseau, $degatdutir, $idarme, $idvaisseauquitire, $idflotteattaquant, $idflottedefenseur, $sensbataille)\r\n {\r\n require __DIR__ . '/../include/bddconnection.php';\r\n $reqdiminuernbtir = $bd->prepare(\"UPDATE c_composantvaisseau SET tirrestant = tirrestant-1 WHERE idtable = ?\");\r\n $reqdiminuernbtir->execute(array($idarme));\r\n\r\n $nvpv = $pvvaisseau - $degatdutir;\r\n $Commentairestour = 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' se fait tirer dessus par le vaisesau '.$idvaisseauquitire.', il perd '.$degatdutir.' PV.<br>';\r\n \r\n $texte1 = '<br>Votre vaisseau ('.$idvaisseauquitire.') vient de tirer sur un vaisseau ennemi ('.$idvaisseauquisefaittirerdessus.'). '.$degatdutir.' dégâts infligés.';\r\n $texte2 = '<br>Votre vaisseau ('.$idvaisseauquisefaittirerdessus.') se fait tirer dessus par un vaisseau ennemi ('.$idvaisseauquitire.'). '.$degatdutir.' dégâts recus.';\r\n\r\n if ($nvpv < 0)\r\n {\r\n $texte1 .= ' Vaisseau détruit.';\r\n $texte2 .= ' Vaisseau détruit.';\r\n\r\n $Commentairestour .= 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' vient de se faire détruire.<br>';\r\n $reqinfopvvaisseau = $bd->prepare(' SELECT p.idjoueurplanete, v.nomvaisseau, f.xflotte, f.yflotte, f.universflotte, v.biensvaisseau, v.titanevaisseau, f.idplaneteflotte\r\n FROM c_vaisseau v\r\n INNER JOIN c_flotte f ON f.idflotte = v.idflottevaisseau\r\n LEFT JOIN c_planete p ON p.idplanete = f.idplaneteflotte\r\n WHERE v.idvaisseau = ?');\r\n $reqinfopvvaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n $repinfopvvaisseau = $reqinfopvvaisseau->fetch();\r\n\r\n $reqcreerasteroides = $bd->prepare('INSERT INTO c_champsasteroides (xaste , yaste , uniaste, typeitemsaste, quantite) VALUES (?, ?, ?, ?, ?)');\r\n\r\n if ($repinfopvvaisseau['idjoueurplanete'] != 0)\r\n { // On envoit ce message uniquement aux joueurs.\r\n $textemessage = 'Nous avons perdu le vaisseau ' . $repinfopvvaisseau['nomvaisseau'] . ' en ' . $repinfopvvaisseau['xflotte'] . '-' . $repinfopvvaisseau['yflotte'] . ' lors d\\'une bataille spatiale.' ; \r\n $reqmessageinterne = $bd->prepare('INSERT INTO c_messagerieinterne (expediteur , destinataire , lu , titre , texte) VALUES (?, ?, ?, ?, ?)');\r\n $reqmessageinterne->execute(array('Amirauté', $repinfopvvaisseau['idjoueurplanete'], 0, 'Perte d\\'un vaisseau', $textemessage));\r\n }\r\n \r\n // Créer champs d'astéroides : Reprendre le prix du vaisseau\r\n $nbchampsastebien = floor(($repinfopvvaisseau['biensvaisseau'] / 150));\r\n $nbchampsastetitane = floor(($repinfopvvaisseau['titanevaisseau'] / 30));\r\n\r\n if ($nbchampsastebien > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 6, $nbchampsastebien));\r\n }\r\n if ($nbchampsastetitane > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 8, $nbchampsastetitane));\r\n }\r\n\r\n $reqinfocargo = $bd->prepare(\"SELECT typeitems, quantiteitems FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqinfocargo->execute(array($idvaisseauquisefaittirerdessus));\r\n while ($repinfocargo = $reqinfocargo->fetch())\r\n { // Cas d'un vaisseau trouvé dans le 1er univers\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], $repinfocargo['typeitems'], $repinfocargo['quantiteitems']));\r\n }\r\n\r\n // cargovaisseau\r\n $reqdeletecargo = $bd->prepare(\"DELETE FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqdeletecargo->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // composantvaisseau\r\n $reqdeletecomposant = $bd->prepare(\"DELETE FROM c_composantvaisseau WHERE idvaisseaucompo = ?\");\r\n $reqdeletecomposant->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // vaisseau\r\n $reqdeletevaisseau = $bd->prepare(\"DELETE FROM c_vaisseau WHERE idvaisseau = ?\");\r\n $reqdeletevaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n }\r\n else\r\n {\r\n $reqdiminuerpvvaisseau = $bd->prepare('UPDATE c_vaisseau SET HPvaisseau = ? WHERE idvaisseau = ?');\r\n $reqdiminuerpvvaisseau->execute(array($nvpv, $idvaisseauquisefaittirerdessus));\r\n }\r\n\r\n $reqtrouverrapportdecombat = $bd->prepare('SELECT idrapportcombat FROM c_rapportcombat WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $reqtrouverrapportdecombat->execute(array($idflotteattaquant, $idflottedefenseur));\r\n $reptrouverrapportdecombat = $reqtrouverrapportdecombat->fetch();\r\n\r\n // Vérifier si le rapport existe. Si ce n'est pas le cas, le créer.\r\n if (!isset($reptrouverrapportdecombat['idrapportcombat']))\r\n {\r\n $reqcreerrapportcombat = $bd->prepare('INSERT INTO c_rapportcombat(idflotteattaquant, idflottedefenseur, texteattaquant, textedefenseur) VALUES(?, ?, ?, ?)');\r\n $texteattaquant = 'Début du rapport de combat. Vous attaquez une flotte ('.$idflottedefenseur.').';\r\n $textedefenseur = 'Début du rapport de combat. Vous êtes attaqués par une flotte ('.$idflotteattaquant.').';\r\n $reqcreerrapportcombat->execute(array($idflotteattaquant, $idflottedefenseur, $texteattaquant, $textedefenseur));\r\n }\r\n\r\n if($sensbataille == 1)\r\n {\r\n $textesupplementaireattaquant = $texte1;\r\n $textesupplementairedefenseur = $texte2;\r\n }\r\n elseif($sensbataille == 2)\r\n {\r\n $textesupplementaireattaquant = $texte2;\r\n $textesupplementairedefenseur = $texte1;\r\n }\r\n\r\n // Le compléter.\r\n $requpdaterapportcombat = $bd->prepare('UPDATE c_rapportcombat\r\n SET texteattaquant = concat(texteattaquant, ?), textedefenseur = concat(textedefenseur, ?)\r\n WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $requpdaterapportcombat->execute(array($textesupplementaireattaquant, $textesupplementairedefenseur, $idflotteattaquant, $idflottedefenseur));\r\n\r\n return $Commentairestour;\r\n }", "function xVoisinDroite($x, $y, $largeurPlateau, $hauteurPlateau, $tab_plateau) {\r\n //error_log(var_export(\"xVoisinDroite(\".$x.\", \".$y.\", \".$largeurPlateau.\", \".$hauteurPlateau.\")\", true));\r\n //error_log(var_export($tab_plateau, true));\r\n $xRetour = -1;\r\n $i = $x + 1;\r\n while (($i < $largeurPlateau) && ($xRetour == -1)) {\r\n //error_log(var_export(\"i: \".$i.\", y: \".$y.\" => \".$tab_plateau[$y][$i], true));\r\n if ($tab_plateau[$y][$i] == \"0\") {\r\n $xRetour = $i;\r\n }\r\n $i++;\r\n }\r\n \r\n return $xRetour;\r\n}", "public function iloscMinus($id)\n\t\t{\n\t\t\t$data = array();\n\t\t\t\tif($id === NULL || $id === \"\")\n\t\t\t\t\t$data['error'] = 'Nieokreślone ID!';\n\t\t\t\telse\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$stmt2 = $this->pdo->prepare('SELECT IdTowar, ilosc FROM `koszyk` where IdTowar=:id');\n\t\t\t\t\t\t$stmt2 -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t$ilosc = $stmt2 -> execute();\n\t\t\t\t\t\t$data = $stmt2 -> fetchAll();\n\t\t\t\t\t\tforeach($data as $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilosc = $result['ilosc'];\n\t\t\t\t\t\t\t$idt = $result['IdTowar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($ilosc>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $id.'<br>towary: ';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['idtowary']);\n\t\t\t\t\t\t\t$stmt = $this->pdo->prepare('UPDATE koszyk SET ilosc=ilosc-1 WHERE IdTowar=:id');\n\t\t\t\t\t\t\t$stmt -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t\t$wynik_zapytania = $stmt -> execute();\n\n\t\t\t\t\t\t\t$stmt2 = $this->pdo->prepare(\"update towar set towar.StanMagazynowyDysponowany = towar.StanMagazynowyDysponowany+1 where IdTowar = $idt\");\n\t\t\t\t\t\t\t$stmt2 -> execute();\n\n\t\t\t\t\t\t\t$cookie2 = $_COOKIE['idtowary'];\n\t\t\t\t\t\t\t$cookie2 = stripslashes($cookie2);\n\t\t\t\t\t\t\t$ids = json_decode($cookie2, true);\n\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// echo 'nie ma';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t //echo 'jest';\n\t\t\t\t\t\t\t $indeks = array_search($idt, $ids);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cookie = $_COOKIE['ilosci'];\n\t\t\t\t\t\t\t$cookie = stripslashes($cookie);\n\t\t\t\t\t\t\t$quantity = json_decode($cookie, true);\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false){}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<br>ilosci ';\n\t\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t\t\t$ilosc=$ilosc-1;\n\t\t\t\t\t\t\t $quantity[$indeks]=$ilosc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dane = json_encode($quantity);\n\t\t\t\t\t\t\tsetcookie('ilosci', $dane,time()+60*60*24*30,'/');\n\t\t\t\t\t\t\t$_COOKIE['ilosci'] = $dane;\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(\\PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['error'] =$data['error'].'<br> Błąd wykonywania operacji usunięcia';\n\t\t\t\t\t}\n\t\t\t\t\t/*var_dump($_COOKIE['idtowary']);\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\techo '<br>';*/\n\t\t\t\treturn $data;\n\n\t\t}", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function dgd_testes_de_resistencia($nivel);", "function valore_costo_trasporto_ordine_user($id_ordine,$id_user){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_arrivato_netto_ordine_user($id_ordine,$id_user);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_trasporto;\r\n}", "function bank($bedrag){\n $jaar = 1;\n for ($jaar;$jaar<=10;++$jaar){\n $nieuwbedrag = $bedrag *pow(1.08,$jaar);\n echo 'na '.$jaar.' jaar heeft Hans '.$nieuwbedrag.'euro <br>';\n }\n }", "public function cortesia()\n {\n $this->costo = 0;\n }", "function hieu($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso*$ps->mauso) - ($ps->tuso*$this->mauso);\n $ps->mauso = $this->mauso*$ps->mauso;\n // $ps->toigian_ps();\n return $ps;\n }", "public function registroEnCajadelDia($vector)\n{\n conectar::conexiones();\n if(!isset($vector))\n {\n $sql=\"SELECT * FROM pedidos WHERE fechaPedido BETWEEN \".fechaActualFija.\" AND \".(fechaActualFija+86400).\" AND liquidado =1\";\n\n }\n else\n {\n if ($vector==3) {\n # code...\n $fecha1=strtotime($_REQUEST[\"fecha1\"]);\n $fecha2=strtotime($_REQUEST[\"fecha2\"]);\n $sql=\"SELECT * FROM pedidos WHERE fechaPedido BETWEEN \".$fecha1.\" AND \".$fecha2.\" AND liquidado =1\";\n\n }\n }\n $query=mysql_query($sql);\n $sum=0;\n while ($rs=mysql_fetch_array($query)) {\n # code...\n $sum=$sum+($rs[\"valorPedido\"]-$rs[\"debe\"]);\n }\n\n\n return $sum;\n conectar::desconectar();\n}", "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\n }", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\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 cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id) {\n $sql = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.has_played = 0 \" .\n \"AND f.position = 1 \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n while ($row = db_fetch_array($result)) {\n\n $role = $row['role'];\n $t_id = $row['t_id'];\n \n #1a riserva dello stesso ruolo\n $sqla = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 2 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resulta = db_query($sqla, $role, $competition_round, $c_id, $t_id);\n\n if (db_affected_rows($resulta) > 0) {\n\n while ($rowa = db_fetch_array($resulta)) {\n $pl_id = $rowa['pl_id'];\n \n #se con il voto entra la prima riserva\n if (in_array($pl_id, $pl_votes)) {\n $sqlb = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultb = db_query($sqlb, $pl_id, $t_id, $c_id, $competition_round);\n }\n #se senza voto cerco la seconda riserva\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n }\n }\n\n #nessuna prima riserva ancora non entrata\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n\n }\n}", "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}", "private function roiden($daten)\r\n {\r\n global $tic;\r\n\r\n foreach ($daten as $key => $value) { $daten[$key] = trim($value); }\r\n if (!is_numeric($daten['ticks']) || !is_numeric($daten['ke']) || !is_numeric($daten['me'])) {\r\n $tic->info($this, \"Es d&uuml;rfen nur Zahlen eingegeben werden.\");\r\n return false;\r\n }\r\n\r\n $ticks[0] = array('me' => $daten['me'], 'ke' => $daten['ke'], 'gME' => 0, 'gKE' => 0);\r\n $gesamt = array('gME' => 0, 'gKE' => 0);\r\n for ($i0 = 0; $i0 <= $daten['ticks']; $i0++) {\r\n if ($i0 != 0) {\r\n $ticks[$i0]['gME'] = floor($ticks[$i0 - 1]['me'] / 10);\r\n $ticks[$i0]['gKE'] = floor($ticks[$i0 - 1]['ke'] / 10);\r\n $ticks[$i0]['me'] = $ticks[$i0 - 1]['me'] - $ticks[$i0]['gME'];\r\n $ticks[$i0]['ke'] = $ticks[$i0 - 1]['ke'] - $ticks[$i0]['gKE'];\r\n $gesamt['gME'] = $gesamt['gME'] + $ticks[$i0]['gME'];\r\n $gesamt['gKE'] = $gesamt['gKE'] + $ticks[$i0]['gKE'];\r\n }\r\n foreach ($ticks[$i0] as $key => $value) { $ticks[$i0][$key] = number_format($value, 0, ',', ' '); }\r\n }\r\n $gesamt['exen'] = $gesamt['gME'] + $gesamt['gKE'];\r\n $this->setVar('ticks', $ticks);\r\n $this->setVar('gesamt', $gesamt);\r\n }", "function defiva($subt,$saldoi,$pago){\n $pagoiva;\n $resto = $saldoi -$subt;\n if($resto >0){\n // queda iva por aplicar\n if($resto>$pago){$pagoiva=$pago;}else{$pagoiva=$resto;}\n }else{\n //todo a capital\n $pagoiva = 0;\n }\n return $pagoiva;\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 formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "function iva($subtotal, $iva = 0.21){ // cuando le ponemos el valor a un parametro nos permite que cada vez que haga la operacion, lo haga con el valor que le pusimos al parametro obviamente, esto es mejor que asignarle un valor desde dentro y no estableciendo el valor fijo\n $porcentaje = $subtotal * $iva;\n\n // pusimos en comentarios esto porque no necesitamos que nos haga una operacion final, solo que nos muestre el dato final\n // $solucion = $subtotal + $porcentaje;\n return $porcentaje;\n }", "public function getSimulacionReajuste(){\n //calculando según el IPC acumulado\n //entre el último reajuste realizado y ahora. \n $mes_actual = (int)date(\"m\");\n $agno_actual = (int)date('Y');\n $mes_inicio = $mes_actual - $this->reajusta_meses;\n $agno_inicio = $agno_actual;\n if($mes_inicio <= 0){\n $agno_inicio -= 1;\n $mes_inicio+= 12;\n }\n $ipcs = array();\n if($agno_inicio != $agno_actual){\n $ipcs = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes >= :m and agno = :a','params'=>array(':m'=>$mes_inicio,':a'=>$agno_inicio)));\n $ipcs_actual = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes < :m and agno = :a','params'=>array(':m'=>$mes_actual,':a'=>$agno_actual)));\n foreach($ipcs_actual as $ipc){\n $ipcs[] = $ipc;\n }\n }\n else{\n $ipcs = Ipc::model()->findAll(array('condition'=>'mes >= :m1 and mes < :m2 and agno = :a','params'=>array(':m1'=>$mes_inicio,':m2'=>$mes_actual,':a'=>$agno_actual)));\n }\n\n $ipc_acumulado = 0;\n foreach($ipcs as $ipc){\n //sumo los ipcs para generar el ipc acumulado\n $ipc_acumulado+= $ipc->porcentaje;\n }\n //para hacer el cálculo según porcentaje\n $ipc_acumulado /= 100;\n\n //saco el último debe pagar para ver cuánto era lo que tenía que pagar antes\n $debePagars = DebePagar::model()->findAllByAttributes(array('contrato_id'=>$this->id),array('order'=>'id DESC'));\n $debePagar = $debePagars[0];\n \n $debeNuevo = new DebePagar();\n $debeNuevo->agno = $agno_actual;\n $debeNuevo->mes = $mes_actual;\n $debeNuevo->dia = $debePagar->dia;\n $debeNuevo->contrato_id = $this->id;\n //ahora hay que reajustar los montos del contrato dependiendo del ipc_acumulado\n //el precio base debe ser el valor anterior en debe pagar\n $debeNuevo->monto_gastocomun = intval($debePagar->monto_gastocomun*(1+$ipc_acumulado));\n $debeNuevo->monto_gastovariable = intval($debePagar->monto_gastovariable*(1+$ipc_acumulado));\n $debeNuevo->monto_mueble = intval($debePagar->monto_mueble*(1+$ipc_acumulado));\n $debeNuevo->monto_renta = intval($debePagar->monto_renta*(1+$ipc_acumulado));\n \n return array('actual'=>$debePagar, 'nuevo'=>$debeNuevo);\n }", "function setLlamadasDiariasCreditosNo360($fecha_operacion, $recibo = 0){\n$msg\t= \"====================== GENERAR_LLAMADAS_POR_CREDITOS_NO_360 \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS POR PRIMERA PARCIALIDAD \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS CON \" . DIAS_DE_ANTICIPACION_PARA_LLAMADAS . \" DIAS DE ANTICIPACION \\r\\n\";\n$msg\t.= \"====================== GENERAR LLAMADAS PARA EL \" . getFechaLarga(sumardias($fecha_operacion, DIAS_DE_ANTICIPACION_PARA_LLAMADAS)) . \"\\r\\n\";\n$msg\t.= \"\\tSocio\\tCredito\\tObservaciones\\r\\n\";\n//obtener una muestra de la letra\n/**\n * seleccionar\n */\n$sucursal\t\t= getSucursal();\n\n$sql = \"SELECT\n\t`operaciones_mvtos`.`socio_afectado`,\n\t`operaciones_mvtos`.`docto_afectado`,\n\t`operaciones_mvtos`.`tipo_operacion`,\n\t`operaciones_mvtos`.`fecha_afectacion`,\n\t`operaciones_mvtos`.`periodo_socio`,\n\t`operaciones_mvtos`.`afectacion_real`,\n\t`operaciones_mvtos`.`docto_neutralizador`\nFROM\n\t`operaciones_mvtos` `operaciones_mvtos`\n\nWHERE\n\t(`operaciones_mvtos`.`tipo_operacion` = 410) AND\n\t(`operaciones_mvtos`.`fecha_afectacion` = DATE_ADD('$fecha_operacion', INTERVAL \" . DIAS_DE_ANTICIPACION_PARA_LLAMADAS . \" DAY) ) AND\n\t(`operaciones_mvtos`.`periodo_socio` =1) AND\n\t(`operaciones_mvtos`.`docto_neutralizador` = 1)\n\tAND\n\t(`operaciones_mvtos`.`sucursal` ='$sucursal')\nORDER BY\n\t`operaciones_mvtos`.`fecha_afectacion`,\n\t`operaciones_mvtos`.`socio_afectado`\";\n//$msg\t.= \"$sql\\r\\n\";\n\n$rs = mysql_query($sql, cnnGeneral());\n\twhile($rw = mysql_fetch_array($rs)){\n\t\t$socio\t\t= $rw[\"socio_afectado\"];\n\t\t$credito\t= $rw[\"docto_afectado\"];\n\t\t$oficial\t= $_SESSION[\"SN_b80bb7740288fda1f201890375a60c8f\"];\n\t\t$txt\t\t= setNewLlamadaBySocio($socio, $credito, $fecha_operacion, date(\"H:i:s\"), \"LLAMADAS AUTOMATICAS : $recibo\" );\n\t\t$msg \t\t.= date(\"H:i:s\") . \"\\t\" . $txt . \"\\r\\n\";\n\t}\n\n\treturn $msg;\n}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function checkSoDu()\n{\n // lay tham so post\n $STK = $_POST[\"TKDi\"];\n $SoTien = $_POST[\"SoTien\"];\n // lay muc phi giao dich\n $QD = new QuyDinh();\n $QD->getInfo(1);\n // kiem tra so du\n $TK = new TKNganHang();\n $SoDu = $TK->getSoDu($STK);\n //\n $SoTien += $QD->MucPhi;\n\n $TK = new TKNganHang();\n $SoDu = $TK->getSoDu($STK);\n ////echo \"<script>alert(\".$SoDu.\");</script>\";\n $SoDuSauKhiChuyen=$SoDu-$SoTien;\n // if ($SoDuSauKhiChuyen<=0)\n // echo 0;\n // else\n echo $SoDuSauKhiChuyen;\n //echo $SoDu;\n //echo $SoDu;\n}", "public function mostrar_rutas(){\n for ($i=1; $i <count($this->lista_rutas) ; $i++) { \n \n for($j=0;$j< count($this->lista_rutas[$i]->getRuta());$j++){\n print_r($this->pn[$this->lista_rutas[$i]->getRuta()[$j]].\" \");\n //print_r($this->lista_rutas[$i]->getPuntaje()[$j]. \" \");\n }\n \n echo \"Resultado \";\n print_r(array_sum($this->lista_rutas[$i]->getRes()));\n echo \"<br>\";\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function kalorinormal($g, $tb){\n\tif($g == \"Pria\"){\n\t\t$kb = beratbadanideal($tb, $g) * 30;\n\t}else if($g == \"Wanita\"){\n\t\t$kb = beratbadanideal($tb, $g) * 25;\n\t}\nreturn $kb;\n}", "function fantacalcio_calcola_modificatori($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n \n if (\n variable_get('fantacalcio_modificatore_portiere', '0') \n || variable_get('fantacalcio_modificatore_difesa', '0') \n || variable_get('fantacalcio_modificatore_centrocampo', '0')\n || variable_get('fantacalcio_modificatore_attacco', '0')\n ) {\n\n $out = \"\";\n\n //$vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = get_matches_vote_round($vote_round);\n \n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n \n if (variable_get('fantacalcio_modificatore_portiere', '0')) {\n $mod_portiere_1 = fantacalcio_calcola_modificatori_portiere($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_portiere_2 = fantacalcio_calcola_modificatori_portiere($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_portiere_1 = 0;\n $mod_portiere_2 = 0;\n }\n\n if (variable_get('fantacalcio_modificatore_difesa', '0')) {\n $mod_difesa_1 = fantacalcio_calcola_modificatori_difesa($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_difesa_2 = fantacalcio_calcola_modificatori_difesa($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_difesa_1 = 0;\n $mod_difesa_2 = 0;\n }\n \n if (variable_get('fantacalcio_modificatore_centrocampo', '0')) {\n $mod_centrocampo = fantacalcio_calcola_modificatori_centrocampo($t1_id, $t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_centrocampo_1 = $mod_centrocampo[1];\n $mod_centrocampo_2 = $mod_centrocampo[2];\n }\n else {\n $mod_centrocampo_1 = 0;\n $mod_centrocampo_2 = 0;\n }\n \n if (variable_get('fantacalcio_modificatore_attacco', '0')) {\n $mod_attacco_1 = fantacalcio_calcola_modificatori_attacco($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_attacco_2 = fantacalcio_calcola_modificatori_attacco($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_attacco_1 = 0;\n $mod_attacco_2 = 0;\n }\n\n $sql = \"UPDATE {fanta_matches} SET \n mod_por_1 = '%f',\n mod_por_2 = '%f',\n mod_dif_1 = '%f',\n mod_dif_2 = '%f',\n mod_centr_1 = '%f',\n mod_centr_2 = '%f',\n mod_att_1 = '%f',\n mod_att_2 = '%f'\n WHERE m_id = '%d'\";\n $result = db_query($sql, $mod_portiere_1, $mod_portiere_2, $mod_difesa_1, $mod_difesa_2, $mod_centrocampo_1, $mod_centrocampo_2, $mod_attacco_1, $mod_attacco_2, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Portiere\", \"Difesa\", \"Centrocampo\", \"Attacco\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_por_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_dif_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_centr_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_por_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_dif_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_centr_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_att_2'];\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n\n $out .= theme_table($header, $rows);\n\n }\n }\n else $out = \"No modificatori\";\n \n return $out;\n\n}", "function kaloriusia($u, $tb, $g){\n\tif($u <=39){\n\t\t$kbu = \"0 kkal \";\n\t}else if($u >=40 && $u <= 59){\n\t\t$kbu = kalorinormal($g, $tb) * 0.05;\n\t}else if($u >=60 && $u <= 69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.1;\n\t}else if($u >69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.2;\n\t}\nreturn $kbu;\n}", "public function AggiornaPrezzi(){\n\t}", "public function nuevap5()\n {\n \t$sitios=request('pois');\n $mod=session('mod');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx\n from poi where poi.id_poi in('.$sitios.')');\n $poi=explode(\",\",$sitios);\n $cd=[];\n $pois=array();\n $ban=9999999;\n $vmin=[];\n for ($i=0; $i <count($poi); $i++) { \n foreach ($consult as $key) {\n if ($poi[$i]==$key->id_poi) {\n $cd[]=$key->cy.','.$key->cx;\n $this->pn[$key->id_poi]=$key->pn.\" \";\n }\n }\n }\n for($a=0;$a<count($cd);$a++){\n for ($b=0;$b<count($cd);$b++) { \n if ($a==$b) {\n $pois[$a][$b]=-1;\n }else{\n // se arma la tabla de distancias con todos los puntos de interes que pasaron los filtros anteriores\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$cd[$a].';'.$cd[$b].'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $pois[$a][$b]=$data->trips[0]->distance; \n }\n }\n \n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($i!=$j) {\n if (bccomp($pois[$i][$j],$ban,10)==-1) {\n $min=($pois[$i][$j]);\n $ban=($pois[$i][$j]);\n }\n }\n }\n \n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) {\n if ($i!=$j) {\n $pois[$i][$j]=($pois[$i][$j])-$vmin[$i];\n }\n\n }}\n $vmin=[];\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n if (bccomp($pois[$j][$i],$ban,10)==-1) {\n $min=($pois[$j][$i]);\n $ban=($pois[$j][$i]);\n }\n }\n }\n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n $pois[$j][$i]=($pois[$j][$i])-$vmin[$i];\n }\n }\n } \n\n $a=0;\n // Luego de eliminar de la tabla de distancias los caminos mas largos,se envia la matriz al metodo formar_posi\n $this->lista_rutas[] = new route();\n $this->n_poi=count($poi);\n $this->poi=$poi;\n $this->matriz=$pois; \n $this->poi_conectados[] = new Conexion(); \n for($i = 0; $i < count($this->matriz); $i++) {\n $poi_c = new Conexion();\n for ($j = 0; $j < count($this->matriz); $j++) {\n if ($this->matriz[$i][$j]!=\"-1\") { \n $poi_c->setConexiones($j);\n $poi_c->setValor($this->matriz[$i][$j]);\n \n }\n }\n $this->poi_conectados[]=($poi_c);\n \n }\n \n $this->formar_posi($x=Array(),$y=Array(), 0, \"0\");\n //Finalmente envia al recorrido a la siguiente vista\n $result=$this->rutas_aptas();\n return view('guardarr')->with('rt',$result)->with('p',$this->pn);\n\n }", "function Cuerpo($acceso,$desde,$hasta,$id_f)\n\t{\n\t\t\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t\n\t\t$acceso1=conexion();\n\t\t\n\t\t\n\t\t//$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetDrawColor(0,0,0);\n\t\t$this->SetLineWidth(.2);\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t$w=array(20,20,25);\t\n\t$col=5;\n\t$right=10;\n\t$alto=49;\t\n\t\t$this->SetX($right);\n\t\t\t\n\t\t$this->SetX($right);\n\t\t\t$this->SetFont('Arial','BIU',8);\n\t\t\t$this->Cell($right,6,strtoupper(_('ingresos cobrados por franquicia')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln(12);\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',7);\n\t\t\t\t$this->Cell($w[0],7,\"\",\"LRB\",0,\"L\");\n\t\t\t\t$der=15;\n\t\t\t\t$this->RotatedText($der, $alto, \"FECHA\", 25);\n\t\t\t\t$der=$der+$w[1];\n\t\t\t\t$dato=lectura($acceso,\"SELECT *FROM franquicia order by nombre_franq\");\n\t\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t\t$nombre_franq=trim($dato[$j][\"nombre_franq\"]);\n\t\t\t\t\t$this->RotatedText($der, $alto, $nombre_franq, 25);\n\t\t\t\t\t$der=$der+$w[1];\n\t\t\t\t\t$this->Cell($w[1],7,\"\",\"LRB\",0,\"C\");\n\t\t\t\t}\n\t\t\t\t$der=$der+5;\n\t\t\t\t$this->RotatedText($der, $alto, \"TOTAL\", 25);\n\t\t\t\t$this->Cell($w[2],7,\"\".\" \",\"LRB\",0,\"C\");\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\t\t$sum_total=array();\n\t\t\t$sum_t=0;\n\twhile(comparaFecha($desde,$hasta)<=0){\n\t\t//ECHO \"SELECT sum(monto_pago) as monto FROM pagos where fecha_pago='$desde' \";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT monto_pago as monto FROM pagos where fecha_pago='$desde' and pagos.id_caja_cob<>'EA00000001' limit 1 \");\n\t\t$row=row($acceso);\n\t\t$monto=trim($row[\"monto\"])+0;\n\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\n\t\t\n\t if($monto>0){\n\t\t$wi=0;\n\t\t$j=0;\n\t\t$suma=0;\n\t\t$suma_m=0;\n\t\t$this->SetX(10);\n\t\t//list($ano,$mes,$dia)=explode(\"-\",$desde);\n\t\t$fecha=$desde;\n\t\t$dia=formatofecha($desde);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->Cell($w[$wi],$col,$dia,\"LR\",0,\"C\",$fill);\n\t\t$wi++;\n\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$sum_t=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago='$fecha' and status_pago='PAGADO' and id_franq='$id_franq' and pagos.id_caja_cob<>'EA00000001' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago=trim($row[\"monto_pago\"])+0;\n\t\t\t\t$sum_total[$j]+=$monto_pago;\n\t\t\t\t$sum_t+=$monto_pago;\n\t\t\t\t$this->Cell($w[$wi],$col,number_format($monto_pago+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$sum_total[$j]+=$sum_t;\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell($w[2],$col,number_format($sum_t+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$fill=!$fill;\n\t\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t}//if monto\t\n\t\t$desde=sumadia($desde);\n\t\t\t\n\t}\n\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell($w[0],7,\"TOTAL\",\"1\",0,\"R\",$fill);\n\t\t\t$sum_to=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t//$sum_to+=$sum_total[$j];\n\t\t\t\t$this->Cell($w[1],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->SetFont('Arial','B',10);\n\t\t\t$this->Cell($w[2],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t}", "function calculerSurfaceMurs ($largeur, $longueur, $hauteur)\n {\n // $surface = ($largeur * $hauteur + $longueur * $hauteur) * 2;\n $surface = 2 * $hauteur * ($largeur + $longueur);\n\n return $surface; \n }", "function valore_totale_lordo_gas_esterno($id_ordine,$id_gas){\r\n $ordine = valore_totale_mio_gas($id_ordine,$id_gas);\r\n $costi = valore_costi_esterni_gas($id_ordine,$id_gas);\r\n return (float)$ordine+$costi;\r\n}", "public function getDirectriz()\n {\n $dir = false;\n if (self::getCod() === '110000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '120000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '210000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '220000') $dir='Ciencias Experimentales';\n if (self::getCod() === '230000') $dir='Ciencias Experimentales';\n if (self::getCod() === '240000') $dir='Ciencias de la Salud';\n if (self::getCod() === '250000') $dir='Ciencias Experimentales';\n if (self::getCod() === '310000') $dir='Ciencias Experimentales';\n if (self::getCod() === '320000') $dir='Ciencias de la Salud';\n if (self::getCod() === '330000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '510000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '520000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '530000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '540000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '550000') $dir='Humanidades';\n if (self::getCod() === '560000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '570000') $dir='Humanidades';\n if (self::getCod() === '580000') $dir='Humanidades';\n if (self::getCod() === '590000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '610000') $dir='Ciencias de la Salud';\n if (self::getCod() === '620000') $dir='Humanidades';\n if (self::getCod() === '630000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '710000') $dir='Humanidades';\n if (self::getCod() === '720000') $dir='Humanidades';\n return $dir;\n }", "function graficoPoligno() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $points = array();\n $arPonto = array();\n $arValor = array();\n $idx++;\n\n $color = $this->getColor($idx, 0, 0, 0, 60);\n $x = $this->margem;\n $y = $this->gtamanho + $this->margem;\n\n foreach ($item as $referencia => $value) {\n $val = ($this->gtamanho + ($this->margem * 1)) - (floor((($this->gtamanho) * $value) / $maxValue));\n\n $points[] = $x;\n $points[] = $y;\n $points[] = ($x + $this->columSize);\n $points[] = $val;\n\n $arPonto[] = array(\n 'x' => ($x + $this->columSize),\n 'y' => $val\n );\n\n $arValor[] = array(\n 'x' => ($x + ($this->columSize + $this->margem)),\n 'y' => ($val - 3),\n 'value' => $value\n );\n\n $y = $val;\n $x += $this->columSize;\n }\n\n $points[] = $this->gtamanho + $this->margem;\n $points[] = $this->gtamanho + $this->margem;\n\n imagefilledpolygon($this->image, $points, (count($points) / 2), $color);\n\n if($this->opMostrarPontoValor) {\n foreach ($arPonto as $item) {\n $this->desenhaPonto($item['x'], $item['y'], null);\n }\n\n foreach ($arValor as $item) {\n imagestring($this->image, 2, $item['x'], ($item['y'] - $this->margem), utf8_decode($item['value']), null);\n }\n }\n\n $this->desenhaLabel($label, $color, $labelY);\n $labelY += ($this->margem * 2);\n }\n }", "private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }", "public function luas_Persegi()\n {\n $hitung = $this->lebar * $this->panjang;\n return $hitung;\n }", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\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}", "function mira_pieza($Fk, $Ck)\n{\n $error2 = 0;\n $pos = ((8 - $Fk) * 8) + $Ck;\n $posicion = buscar_posicion($pos);\n $pieza_id = $posicion['pieza_id'];\n if ($pieza_id != 0) {\n $error2 = 1;\n }\n return $error2;\n}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "function temporalidad_pt($ptm_id){\n $pterminal=$this->model_mestrategico->get_pterminal_mplazo($ptm_id); \n $programado=$this->model_mestrategico->get_pterminal_mplazo_programado($ptm_id);\n $configuracion=$this->model_proyecto->configuracion_session();\n $tabla = '';\n $nro=0;\n foreach($programado as $row) {\n $nro++;\n $matriz [1][$nro]=$row['g_id'];\n $matriz [2][$nro]=$row['ptmp_prog'];\n }\n\n $g=$configuracion[0]['conf_gestion_desde'];\n for($j = 1; $j<=5; $j++){\n $matriz_r[1][$j]=$g;\n $matriz_r[2][$j]='0'; //// P\n $matriz_r[3][$j]='0'; //// PA\n $matriz_r[4][$j]='0'; //// %PA\n $g++;\n }\n\n for($i = 1 ;$i<=$nro ;$i++){\n for($j = 1 ;$j<=5 ;$j++){\n if($matriz[1][$i]==$matriz_r[1][$j]){\n $matriz_r[2][$j]=round($matriz[2][$i],2);\n }\n }\n }\n\n $pa=0;\n for($j = 1 ;$j<=5 ;$j++){\n $pa=$pa+$matriz_r[2][$j];\n $matriz_r[3][$j]=$pa+$pterminal[0]['ptm_linea_base'];\n if($pterminal[0]['ptm_meta']!=0){\n $matriz_r[4][$j]=round(((($pa+$pterminal[0]['ptm_linea_base'])/$pterminal[0]['ptm_meta'])*100),2);\n }\n }\n return $matriz_r;\n }", "function valore_costo_trasporto_ordine_gas($id_ordine,$id_gas){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_gas_attuale_netto_qarr = valore_totale_mio_gas($id_ordine,$id_gas);\r\n $percentuale_mio_gas = ($valore_gas_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_gas;\r\n return (float)$costo_trasporto;\r\n}", "function kaloriaktivitas($av, $tb, $g){\n\tif($av == \"Ringan\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.2;\n\t}else if($av == \"Sedang\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.3;\n\t}else if($av == \"Berat\"){\n\t\t$kba = kalorinormal($g, $tb) * 0.5;\n\t}\nreturn $kba;\n}", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "function stan_lacznika($stan,$nr_rups)\n{\t\n\tif($stan==1 && $nr_rups==1) // zamkniety dla rups1\n\t{\n\t\t$wspolrzedna=230;\t\n\t}\n\telseif($stan==0 && $nr_rups==1) // otwarty dla rups1\n\t{\n\t\t$wspolrzedna=220;\n\t}\t\n\telseif($stan==1 && $nr_rups==2) // zamkniety dla rups2\n\t{\n\t\t$wspolrzedna=460;\t\n\t}\n\telseif($stan==0 && $nr_rups==2) // otwarty dla rups2\n\t{\n\t\t$wspolrzedna=450;\n\t}\t\n\telseif($stan==1 && $nr_rups==3.1) // zamkniety dla rups3\n\t{\n\t\t$wspolrzedna=690;\t\n\t}\n\telseif($stan==0 && $nr_rups==3.1) // otwarty dla rups3\n\t{\n\t\t$wspolrzedna=680;\n\t}\n\telseif($stan==1 && $nr_rups==3.2) // zamkniety dla rups3\n\t{\n\t\t$wspolrzedna=710;\t\n\t}\n\telseif($stan==0 && $nr_rups==3.2) // otwarty dla rups3\n\t{\n\t\t$wspolrzedna=700;\n\t}\n\telseif($stan==1 && $nr_rups==4) // zamkniety dla rups4\n\t{\n\t\t$wspolrzedna=940;\t\n\t}\n\telseif($stan==0 && $nr_rups==4) // otwarty dla rups4\n\t{\n\t\t$wspolrzedna=930;\n\t}\n\telseif($stan==1 && $nr_rups==8) // zamkniety dla rups8\n\t{\n\t\t$wspolrzedna=1170;\t\n\t}\n\telseif($stan==0 && $nr_rups==8) // otwarty dla rups8\n\t{\n\t\t$wspolrzedna=1160;\n\t}\t\n\telseif($stan==1 && $nr_rups==9.1) // zamkniety dla rups9.1\n\t{\n\t\t$wspolrzedna=1415;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.1) // otwarty dla rups9.1\n\t{\n\t\t$wspolrzedna=1405;\n\t}\n\telseif($stan==1 && $nr_rups==9.2) // zamkniety dla rups9.2\n\t{\n\t\t$wspolrzedna=1435;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.2) // otwarty dla rups9.2\n\t{\n\t\t$wspolrzedna=1425;\n\t}\t\t\n\telseif($stan==1 && $nr_rups==9.3) // zamkniety dla rups9.3\n\t{\n\t\t$wspolrzedna=1455;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.3) // otwarty dla rups9.3\n\t{\n\t\t$wspolrzedna=1445;\n\t}\t\n\t\n\treturn $wspolrzedna;\n}", "function Recalcular_Saldo_Venta_AddCobro($idventa){\n\t$datosventa\t\t=\tregistro( runsql(\"select fecha, monto,saldo from ventas where id_venta='$idventa'\") ); \n\t$datoscobros\t=\trunsql(\"select id_cobro,fecha,monto,saldo,moneda from cobros where id_venta='$idventa' order by id_cobro desc LIMIT 1 OFFSET 0 ;\"); // AGARRA EL ULTIMO\n\t$tcUSD\t=\tTipoCambio('USD',$datosventa[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datosventa[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Pagado\t=\t0;\n\t$SubMonto\t\t=\t0;\n\t$Saldo_Anterior\t=\t$datosventa[saldo];\n\twhile($i=registro($datoscobros)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcUSD;\n\t\t\t\techo $Monto_Pagado;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcEUR;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcQUE;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t}\n\t$Saldo_Actual\t=\t$Saldo_Anterior\t - $Monto_Pagado;\n//\techo \"<br>**************\". $Saldo_Actual\t.\"=\".\t$Saldo_Anterior\t .\"-\". $Monto_Pagado.\" ****<br>\";exit();\n\t$campos=Array();\n $campos[saldo]\t=\t$Saldo_Actual;\n\t$ins=actualizar(\"ventas\",$campos,\"id_venta = '$idventa'\");\n\t//recalcular_saldo_venta($idventa);\n\t//echo \"<br>actualizar(ventas,\".$Saldo_Actual.\",id_venta = $idventa\"; \texit();\n\treturn $Saldo_Actual;\n}" ]
[ "0.6343705", "0.6323445", "0.630729", "0.6260156", "0.62524784", "0.6220938", "0.6208774", "0.62052613", "0.61596894", "0.61511743", "0.6004822", "0.5986814", "0.5985391", "0.595244", "0.5947402", "0.59426004", "0.59295815", "0.5901086", "0.5895857", "0.58798504", "0.5864931", "0.5854705", "0.58510846", "0.5825255", "0.58248234", "0.5820428", "0.5806312", "0.5798656", "0.57883805", "0.5785211", "0.57771575", "0.57727146", "0.57636213", "0.57631993", "0.5751252", "0.5697627", "0.56712025", "0.5669898", "0.5661875", "0.56503874", "0.5646398", "0.56345046", "0.5632095", "0.5613123", "0.55958503", "0.5582085", "0.55768764", "0.55745864", "0.557356", "0.5573408", "0.55705506", "0.556035", "0.55564165", "0.55377555", "0.5536854", "0.55347586", "0.5528189", "0.55207914", "0.5513683", "0.5504537", "0.5504392", "0.5504119", "0.5499886", "0.54958224", "0.5495377", "0.5490411", "0.5486942", "0.5486653", "0.547901", "0.547471", "0.5473175", "0.547122", "0.54706955", "0.54659444", "0.5465396", "0.54529625", "0.54500026", "0.5448375", "0.5442148", "0.54300386", "0.5429385", "0.54270387", "0.54252756", "0.54243684", "0.5423356", "0.54196453", "0.54193556", "0.54187787", "0.5418542", "0.5411551", "0.53993374", "0.53954566", "0.53954566", "0.5395301", "0.53905207", "0.53900826", "0.53873026", "0.5381573", "0.53806585", "0.5379129", "0.5377517" ]
0.0
-1
nacita detail jedne sluzby
private function selectDetailServices($scheduler, $id){ $result = $scheduler->adminLoadServiceDetail($id); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanphamdetail()\n\t\t{\n\t\t\t$id = $_GET['chitiet_sanpham'];\n\t\t\t//goi ham model de xu li\n\t\t\t$ketqua = $this->sanpham_model->OneRecordData1($id);\n\t\t\treturn $ketqua;\n\t\t}", "public function getDetail();", "public function detail(){\r\n\t\t//only ajax is allowed\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('view');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//search data with pk for default\r\n\t\t$search_data = $this->input->post('ang_id');\r\n\t\t//if no search data exist, response error\r\n\t\tif($search_data === NULL)\r\n\t\t\tajax_response('error');\r\n\r\n\t\t//activate if search data is integer\r\n\t\t//$search_data = uintval($search_data);\r\n\r\n\t\t//get detail\r\n\t\t$detail = $this->m_anggota->get_by_column($search_data);\r\n\r\n\t\t//output return value\r\n\t\tif($detail !== NULL) ajax_response('ok', '', $detail);\r\n\t\telse ajax_response('error');\r\n\t}", "public function studiengang_details() {\r\n\r\n //Sprachen rausfinden:\r\n $this->sprachen = StgProfil::getPossibleLanguages();\r\n //Abschlüsse suchen:\r\n $this->abschlusssuche = new SQLSearch(\"SELECT abschluss_id, name FROM abschluss WHERE name LIKE :input\", _(\"Abschluss eingeben\"));\r\n //zulassungsvoraussetzung:\r\n $this->moeglicheZulassungsvoraussetzungen_wise = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_wise\");\r\n $this->moeglicheZulassungsvoraussetzungen_sose = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_sose\");\r\n //Typen von Studiengängen:\r\n $this->moeglicheStgTypen = StgProfil::getMoeglicheTypen();\r\n\r\n $this->studiengaenge = PersonalRechte::meineStudiengaenge(null, true);\r\n $this->abschluesse = Abschluss::findAllUsed();\r\n $this->profile = StgProfil::getMeineProfile(null, Request::get(\"studiengang_id\"), Request::get(\"abschluss_id\"));\r\n\r\n //Neuen Eintrag in stg_profil erstellen\r\n if (Request::get(\"item_id\") === \"neu\" && !Request::get(\"studiengang_id\")) {\r\n //$this->profil = new StgProfil();\r\n $this->fachsuche = new SQLSearch(\"SELECT studiengang_id, name FROM studiengaenge WHERE name LIKE :input OR beschreibung LIKE :input \", _(\"Studiengang eingeben\"));\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n return;\r\n }\r\n\r\n $this->profil = new StgProfil(Request::get(\"studienprofil_id\") !== \"neu\" ? Request::get(\"studienprofil_id\") : null);\r\n if (!$this->profil->hasPermission()) {\r\n throw new AccessDeniedException(_(\"Sie dürfen diesen Studiengang nicht bearbeiten\"));\r\n }\r\n if (Request::get(\"delete_x\") && Request::get(\"item_id\") && Request::get(\"type\") === \"dokument\") {\r\n $this->profil->deleteDoku(Request::get(\"item_id\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung gelöscht\"));\r\n }\r\n if (Request::get(\"addDocument\")) {\r\n $this->profil->addDoku(Request::get(\"addDocument\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung hinzugefügt\"));\r\n }\r\n //Profil ändern, falls Informationen gesendet worden sind:\r\n if (Request::submitted(\"absenden\")) {\r\n if (Request::get(\"studiengang_id\")) {\r\n //Neuen Eintrag in stg_profil machen:\r\n $this->profil['fach_id'] = Request::get(\"studiengang_id\");\r\n $this->profil->store(); //Nachher wird noch einmal gestored, aber jetzt wollen wir IDs bekommen.\r\n }\r\n if (Request::submitted('informationen')) {\r\n $this->profil->setInformation(Request::getArray(\"informationen\"));\r\n }\r\n if (Request::submitted(\"abschluss_id\")) {\r\n $this->profil['abschluss_id'] = Request::get(\"abschluss_id\");\r\n }\r\n if (Request::submitted('settings')) {\r\n $settings = Request::getArray(\"settings\");\r\n foreach ($settings as $key => $value) {\r\n $this->profil[$key] = $value;\r\n }\r\n if (!$settings['sichtbar']) {\r\n $this->profil['sichtbar'] = 0;\r\n }\r\n }\r\n if (Request::submitted(\"zielvereinbarung\")) {\r\n $this->profil['zielvereinbarung'] = Request::get(\"zielvereinbarung\");\r\n }\r\n if (Request::submitted(\"einleitungstext\")) {\r\n $this->profil['einleitungstext'] = Request::get(\"einleitungstext\");\r\n }\r\n if (Request::submitted('typen')) {\r\n $this->profil->setTypen(Request::getArray(\"typen\"));\r\n }\r\n $this->profil->store();\r\n\r\n if (Request::submitted('textcombination')) {\r\n $textcombinations = (array) @$_REQUEST['textcombination'];\r\n Textbaustein::removeCombination($this->profil->getId());\r\n foreach ($textcombinations as $code => $ids) {\r\n Textbaustein::addCombination($this->profil->getId(), $code, $ids);\r\n }\r\n }\r\n\r\n $this->flash_now(\"success\", _(\"Änderungen wurden übernommen\"));\r\n if (Request::get(\"neues_dokument\")) {\r\n $dokument = new StgFile();\r\n if ($_GET['qqfile'] || isset($_FILES['qqfile'])) {\r\n ob_start();\r\n $dokument->upload();\r\n ob_clean();\r\n }\r\n $dokument['name'] = Request::get(\"neues_dokument_name\");\r\n $dokument['sichtbar'] = Request::get(\"neues_dokument_sichtbar\") ? '1' : '0';\r\n $dokument['jahr'] = Request::get(\"neues_dokument_jahr\");\r\n $dokument['doku_typ_id'] = Request::get(\"neues_dokument_doku_typ_id\");\r\n $dokument['quick_link'] = Request::get(\"neues_dokument_quick_link\");\r\n $dokument['user_id'] = $GLOBALS['user']->id;\r\n $dokument->store();\r\n $dokument->setTags(Request::get(\"neues_dokument_tags\"));\r\n $this->profil->addDoku($dokument->getId());\r\n if ($dokument->isPublic()) {\r\n $this->flash_now(\"success\", _(\"Neues Dokument angelegt und hinzugefügt\"));\r\n } else {\r\n $this->flash_now(\"success\", _(\"Neues internes Dokument angelegt und hinzugefügt. Es kann unter Akkreditierung gefunden werden.\"));\r\n }\r\n }\r\n if (Request::get(\"neuer_ansprechpartner\")) {\r\n $kontakt = new StgAnsprechpartner();\r\n $kontakt['range_typ'] = Request::get(\"range_typ\");\r\n $kontakt['range_id'] = Request::get(\"range_typ\") && Request::get(\"range_id\") ? Request::get(\"range_id\") : \"\";\r\n\r\n if (Request::get(\"ansprechpartner_typ_id\")) {\r\n $typen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n foreach ($typen as $typ) {\r\n if ($typ['ansprechpartner_typ_id'] === Request::get(\"ansprechpartner_typ_id\")) {\r\n $kontakt['ansprechpartner_typ_id'] = Request::get(\"ansprechpartner_typ_id\");\r\n }\r\n }\r\n }\r\n $kontakt['freitext_name'] = Request::get(\"freitext_name\");\r\n $kontakt['freitext_mail'] = Request::get(\"freitext_mail\");\r\n $kontakt['freitext_telefon'] = Request::get(\"freitext_telefon\");\r\n $kontakt['freitext_homepage'] = Request::get(\"freitext_homepage\");\r\n if ($kontakt->store()) {\r\n $this->profil->addAnsprechpartner($kontakt->getId());\r\n $this->flash_now(\"success\", _(\"Neuer Ansprechpartner angelegt und hinzugefügt\"));\r\n }\r\n }\r\n }\r\n\r\n //Informationen:\r\n $this->informationen = $this->profil->getInformation();\r\n\r\n //Verlaufspläne\r\n $this->verlaufsplaene = $this->profil->getVerlaufsplaene();\r\n\r\n //Dateien:\r\n $this->dateien = StgFile::getByStgProfil($this->profil->getId());\r\n $this->dokumentensuche = $this->getDokumentensuche();\r\n\r\n //Kontakte:\r\n $this->kontakte = StgAnsprechpartner::getByStgProfil($this->profil->getId());\r\n usort($this->kontakte, function ($a, $b) {\r\n return strcmp($a->getName('no_title_rev'), $b->getName('no_title_rev'));\r\n });\r\n $this->kontakt_neu = new StgAnsprechpartner();\r\n $this->ansprechpartnertypen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n\r\n\r\n //Aufbaustudiengänge:\r\n $this->mutterstudiengaenge = $this->profil->getAufbauendeStudiengaenge();\r\n $this->profilsuche = $this->getProfilSuche();\r\n\r\n\r\n // Textbausteine\r\n $this->textbausteine = array(\r\n 'de' => Textbaustein::loadAll('de'),\r\n 'en' => Textbaustein::loadAll('en'),\r\n );\r\n $this->textcombinations = Textbaustein::loadCombination($this->profil->getId());\r\n\r\n $this->ansprechpartnersuche = $this->getAnsprechpartnersuche();\r\n $this->datei_url = $this->link_for(\"zsb_dateien/download_file\");\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n //hiernach wird nichts weiter ausgegeben\r\n }", "function set_detail(){\r\n\t\t\t\r\n\t\t$sql=\"SELECT civilite, nom, prenom, adresse, tel_fixe ,tel_mobile ,email,\r\n\t\t url_site,profil, date_creation, date_derniere_connexion, \r\n\t\t\t\t\t nombre_connexions, mode_acces, date_debut_acces, \r\n\t\t\t\t\t date_fin_acces,login, mdp\r\n\t\t\t FROM les_usagers \r\n\t\t\t WHERE id_usager='$this->id_usager'\";\t \t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\twhile ($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\t$this->civilite=$ligne['civilite'];\r\n\t\t\t$this->nom=$ligne['nom'];\r\n\t\t\t$this->prenom=$ligne['prenom'];\r\n\t\t\t$this->adresse=$ligne['adresse'];\r\n\t\t\t$this->tel_fixe=$ligne['tel_fixe'];\r\n\t\t\t$this->tel_mobile=$ligne['tel_mobile'];\r\n\t\t\t$this->email=$ligne['email'];\r\n\t\t\t$this->url_site=$ligne['url_site'];\r\n\t\t\t$this->profil=$ligne['profil'];\r\n\t\t\t$this->date_creation = trans_date($ligne['date_creation']);\r\n\t\t\t$this->date_derniere_connexion = trans_date_time($ligne['date_derniere_connexion']);\r\n\t\t\t$this->nombre_connexions = $ligne['nombre_connexions'];\r\n\t\t\t$this->mode_acces = $ligne['mode_acces'];\r\n\t\t\t$this->date_debut_acces = $ligne['date_debut_acces'];\r\n\t\t\t$this->date_fin_acces = $ligne['date_fin_acces'];\r\n\t\t\t$this->login = $ligne['login'];\r\n\t\t\t$this->mdp = $ligne['mdp'];\r\n\r\n\t\t}\r\n\t}", "function tampil_detail(){\n\n\t\t$id_pengiriman\t =\t$this->uri->segment(3);\n\t\t$data['record'] =\t$this->M_pengiriman->detail($id_pengiriman)->result();\n\t\t$data['record2'] =\t$this->M_pengiriman->detail($id_pengiriman)->row_array();\n\t\t$this->template->content->view('Pengiriman/Detail',$data);\n\t\t$this->template->publish();\n\n\t}", "function newskomentar_viewdetail($tbl_newskomentar){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar WHERE id='$id'\");\n\t\treturn $sql;\n}", "function getById($dato=null){\n $id=$dato[0];\n $alumno=$this->model->getById($id);\n\n session_start();\n $_SESSION['id_Alumno']=$alumno->id;\n\n //renderizando la vista de detalles\n $this->view->alumno=$alumno;\n $this->view->render('alumno/detalle');\n }", "private function detailNavstevy(){\n $this->tpl = \"detail-navstevy\";\n \n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \t$get_idn = idNavstevy($_GET['idn']);\n \t\n \t# pridat poznamku\n if(isSet($_POST['poznamka'])){\n\t\t\t\t$res = Navsteva::pridatPoznamku($_POST['poznamka'], $_SESSION['idz'], $get_idn, $this->db);\n \n if($res == FALSE){\n $this->render['error'] = \"Nepodařilo se přidat poznámku, zkuste to znovu\";\n }\n else{\n $this->render['info'] = \"Poznámka byla úspěšně přidána k této návštěvě\";\n }\n }\n \n # navsteva zacla odchazet\n if(isSet($_POST['odchazi'])){\n\t\t\t\t$res = Detail::navstevaOdchazi($get_idn, $this->db);\n \n if($res == FALSE){\n $this->render['error'] = \"Něco se pokazilo - zkuste opakovat operaci\";\n }\n else{\n $this->render['info'] = \"Návštěva právě začala odcházet - je na cestě na vrátnici\";\n }\n }\n \n # navsteva opousti areal\n if(isSet($_POST['odesla'])){\n\t\t\t\t$res = Detail::navstevaOdesla($get_idn, $this->db);\n \n if($res == FALSE){\n $this->render['error'] = \"Něco se pokazilo - zkuste opakovat operaci\";\n }\n else{\n $this->render['info'] = \"Návštěva byla úspěšně uzavřena.\";\n }\n }\n }\n \n\t\t$detail = new Detail($this->db, idNavstevy($_GET['idn']));\n $data = $detail->tabulkaDetail();\n if($data == NULL){\n $this->render['error'] = \"Takový tiket neexistuje\"; \n }\n \n $this->render['data'] = $data; \n\t\t$this->render['poznamky'] = $detail->vypisPoznamek();\n }", "function detail_pasien($id)\n\t{\n\t\t$record['pasien'] = $this->Kesehatan_M->read('pasien',array('id'=>$id))->result();\n\t\t$this->load->view('static/header');\n\t\t$this->load->view('static/navbar');\n\t\t$this->load->view('admin/detail_pasien',$record);\n\t\t$this->load->view('static/footer');\n\t}", "function get_detail() {\n return $this->detail;\n }", "public function detailpesertadidik(){\r\n\t\t$dnss = $_GET['idnss'];\r\n\t\t$where = array('id_skolah' => $dnss );\r\n\r\n\t\t$data ['isi'] = $this->Mpeserta_didik->datapesertadidik($dnss);\r\n\t\t$data ['isiprofil'] = $this->Mpeserta_didik->profil($dnss);\r\n\t\t$this->load->view('masterdata/header',$data);\r\n\t\t$this->load->view('masterdata/Vpeserta_didik',$data);\r\n\t\t$this->load->view('masterdata/footer',$data);\r\n\t}", "public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }", "function showprodetail($iddm){\n $ssp = \"select * from sp_free_hot where idsp = \".$iddm;\n $ssp.= \" order by idsp asc\";\n\n // code show danhmuc cố định\n $conn = getConnection();\n $stmt = $conn->prepare($ssp);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n return $stmt->fetchAll(); // nguyen 1 danh sach ferchAll\n }", "public function detail()\n\t{\n $detail['data_pengurus'] = [\n\t\t\t[\n\t\t\t\t'siapa' => 'Muhammad Romli',\n\t\t\t\t'apa' => 'Pembina Komunitas'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'siapa' => 'Zulkarnain',\n\t\t\t\t'apa' => 'Ketua Komunitas '\n\t\t\t],\n\t\t\t[\n\t\t\t\t'siapa' => 'Erika Salim',\n\t\t\t\t'apa' => 'Pengembangan SDM'\n ],\n\t\t\t[\n\t\t\t\t'siapa' => 'Mela Kalina',\n\t\t\t\t'apa' => 'Media dan Informasi'\n ],\n [\n\t\t\t\t'siapa' => 'Faiz Ubadillah',\n\t\t\t\t'apa' => 'Humas dan Networking'\n ],\n [\n\t\t\t\t'siapa' => 'Wahyu Damar',\n\t\t\t\t'apa' => 'Usaha Mandir'\n ]\n\n ];\n \n // load view dengan detail\n\t\techo view(\"tucil/detail\", $detail);\n\t}", "public function detail_data_pejabat_berwenang($id_pejabat_berwenang)\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $detailhere = array('id_pejabat_berwenang' => $id_pejabat_berwenang);\n $data_detail['detail_pejabat'] = $this->m_admin->get_detail_pejabat($detailhere, 'pejabat_berwenang')->result();\n\n $data_detail['foto_ttd'] = $this->m_admin->get_foto_ttd_pejabat($id_pejabat_berwenang)->result();\n\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/detail_data_pejabat_berwenang', $data_detail);\n $this->load->view('footer');\n }", "public function show($id)\n {\n /*\n $tribunales = Estudiante::select('docente.apeMaternoDoc','docente.apePaternoDoc','docente.nombreDoc')\n ->join('proyecto_estudiante', 'estudiante.idEstudiante', '=', 'proyecto_estudiante.idEstudiante')\n ->where('proyecto_estudiante.idEstudiante' , '=', $id)\n ->join('proyecto', 'proyecto_estudiante.idProyecto', '=', 'proyecto.idProyecto')\n ->join('asignacion', 'proyecto.idProyecto', '=', 'asignacion.idProyecto')\n ->where('rol', '=' ,'tribunal')\n ->where('estado', '=' ,'Activo')\n ->join('docente', 'asignacion.idDoc', '=', 'docente.idDoc')\n ->get();\n $tutores = Estudiante::select('docente.apeMaternoDoc','docente.apePaternoDoc','docente.nombreDoc')\n ->join('proyecto_estudiante', 'estudiante.idEstudiante', '=', 'proyecto_estudiante.idEstudiante')\n ->where('proyecto_estudiante.idEstudiante' , '=', $id)\n ->join('proyecto', 'proyecto_estudiante.idProyecto', '=', 'proyecto.idProyecto')\n ->join('asignacion', 'proyecto.idProyecto', '=', 'asignacion.idProyecto')\n ->where('rol', '=' ,'tutor')\n\n ->join('docente', 'asignacion.idDoc', '=', 'docente.idDoc')\n ->get();\n $titulo = Estudiante::select('proyecto.titulo')\n ->join('proyecto_estudiante', 'estudiante.idEstudiante', '=', 'proyecto_estudiante.idEstudiante')\n ->where('proyecto_estudiante.idEstudiante' , '=', $id)\n ->join('proyecto', 'proyecto_estudiante.idProyecto', '=', 'proyecto.idProyecto')\n ->firstOrFail();\n */\n\n $estudiante = Estudiante::where('idEstudiante', $id)->firstOrFail();\n $titulo = \"\";\n $tutores = collect([]);\n $tribunales = collect([]);\n // dd($estudiante->proyecto_estudiante);\n foreach ($estudiante->proyecto_estudiante as $pe) {\n $titulo = $pe->proyecto->titulo;\n foreach ($pe->proyecto->asignacion as $asig) {\n if ($asig->rol == \"tutor\") {\n $tutores->push($asig->docente->nombreDoc.\" \".$asig->docente->apePaternoDoc.\" \".$asig->docente->apeMaternoDoc);\n }\n if ($asig->rol == \"tribunal\") {\n $tribunales->push($asig->docente->nombreDoc.\" \".$asig->docente->apePaternoDoc.\" \".$asig->docente->apeMaternoDoc);\n }\n }\n }\n return response()->json([\n 'estudiante' => $estudiante,\n 'titulo' => $titulo,//$titulo?$titulo:'NULL',\n 'tutores' => $tutores,//$tutores?$tutores:'NULL',\n 'tribunales' => $tribunales,//$tribunales?$tribunales:'NULL',\n //->where('estado', 'terminado')\n ]);\n }", "public function show()\n {\n $data['title'] = 'Siswa';\n $id = $this->input->get('id');\n $this->load->model('Absen_m', 'absen');\n $kehadiran = $this->absen->hitung_kehadiran_siswa($id, 'hadir');\n $sakit = $this->absen->hitung_kehadiran_siswa($id, 'sakit');\n $izin = $this->absen->hitung_kehadiran_siswa($id, 'izin');\n // cegat apa bila id nya tdk di isi ato langsung akses ke link \n if ($id !== null) {\n //Ambil Semua data absensi taruh dalam satu varible \n $data['siswa'] = $this->siswa->get_siswa_byId($id)->result_array();\n $data['kehadiran'] = $kehadiran;\n $data['sakit'] = $sakit;\n $data['izin'] = $izin;\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidenav');\n $this->load->view('templates/navbar', $data);\n $this->load->view('siswa/show', $data);\n $this->load->view('templates/footer');\n } else {\n show_404();\n }\n }", "public function detail($id='', $page = 'user/riwayatsewa/detail_riwayatsewa')\n\t{\n\t\t$data['admin'] = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$data['penyewa'] = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$admin = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$penyewa = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\n\t\t$data['kontenDinamis']\t=\t$page;\n\t\t$riwayatsewa\t=\t$this->M_riwayatsewa;\n\n\t\t$data['content'] = $riwayatsewa->getDetail($id);\n\n\t\t$data['total']\t=\t$riwayatsewa->getTotalById($id);\n\t\t$data['totalDP']\t=\t$riwayatsewa->getTotalDPById($id);\n\n\t\t\n\t\t/*cek user apakah ada didalam database*/\n\t\tif ($penyewa || $admin ) {\n\t\t\t$this->load->view($this->template,$data);\n\t\t} else {\n\n\t\t\t/* Pesan cek user jika email tidak terdaftar*/\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('');\n\t\t}\n\t}", "public function detail($id){\n \n $this->_contratante->_setIdTableValue($id);\n $params['rsContratante'] = $this->_contratante->getRecord();\n \\kerana\\View::showView($this->_current_module,'contratante/detail',$params);\n \n }", "public function id_fiche(){ return $this->id_fiche; }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function show($id)\n {\n $pertemuan = \n Pertemuan::with(\n 'ajar',\n 'ajar.kelas',\n 'ajar.kelas.mahasiswa',\n 'ajar.kelas.mahasiswa.user',\n 'absen',\n 'absen.mahasiswa',\n 'absen.mahasiswa.user'\n )->find($id);\n if(!$pertemuan) abort(404);\n $absen_hadir_array = $pertemuan->absen->pluck('id_mahasiswa')->toArray();\n $mahasiswa_belum_hadir = $pertemuan\n ->ajar\n ->kelas\n ->mahasiswa\n ->whereNotIn('id', $absen_hadir_array)\n ->values();\n foreach ($mahasiswa_belum_hadir as $key => $value) {\n $value->kehadiran = $pertemuan->ajar->getKehadiranMahasiswa($pertemuan, $value->id);\n }\n\n $absen_mahasiswa_berhalangan_hadir = $pertemuan->absen->where('status','<>', 1)->values();\n foreach ($absen_mahasiswa_berhalangan_hadir as $key => $value) {\n $value->mahasiswa->kehadiran = $pertemuan->ajar->getKehadiranMahasiswa($pertemuan, $value->mahasiswa->id);\n }\n\n $absen_mahasiswa_hadir = $pertemuan->absen->where('status', 1)->values();\n foreach ($absen_mahasiswa_hadir as $key => $value) {\n $value->mahasiswa->kehadiran = $pertemuan->ajar->getKehadiranMahasiswa($pertemuan, $value->mahasiswa->id);\n }\n \n $data['mahasiswa_belum_hadir'] = $mahasiswa_belum_hadir;\n $data['absen_mahasiswa_berhalangan_hadir'] = $absen_mahasiswa_berhalangan_hadir;\n $data['absen_mahasiswa_hadir'] = $absen_mahasiswa_hadir;\n $data['absen_mahasiswa_hadir_daftar'] = $absen_mahasiswa_hadir->sortByDesc('id')->take(5)->values();\n return $data;\n }", "function lihatdata()\n {\n return $this->db->get('tb_santriwati');\n }", "public function show_detail($i_id=0)\r\n {}", "public function show_detail($i_id=0)\r\n {}", "function get_detail($id_pengajuan)\n {\n $this->db->select('*');\n $this->db->from('tb_list_pengajuan_surat_izin');\n $this->db->join('tb_operator','tb_operator.id_operator = tb_list_pengajuan_surat_izin.id_operator');\n $this->db->where('id_pengajuan',$id_pengajuan);\n $data = $this->db->get();\n return $data->result();\n }", "public function listado(){\n //return view('proveedores.listado', ['proveedores' => Proveedor::all()]);\n return Provincia::find(1)->with(['Pais'])->first(); \n }", "private function get_rujukan_detail($parameter) {\n\n }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "public function actionView($id)\n {\n $model=$this->findModel($id);\n $tahunAjaran = TahunAjaran::findOne(['status'=>1]);\n $kelas= RelasiKelasSiswa::findOne(['uid_data_siswa'=> $model->uid_siswa, 'uid_tahun_ajaran'=>$tahunAjaran->uid_thn_ajaran]);\n $kelas= $kelas->uidKelas->nama_kelas;\n if(\\Yii::$app->user->can('superUser')){\n $attributes=[\n\n 'nis_siswa',\n 'nisn_siswa',\n 'nik_siswa',\n 'nama_siswa',\n 'jenis_kelamin_siswa',\n 'tempat_lahir_siswa',\n 'tanggal_lahir_siswa',\n [\n 'attribute'=>'kelas',\n 'value'=>$kelas,\n ],\n 'hobi_siswa',\n 'cita_cita_siswa',\n 'alamat_domisili',\n 'jarak_rumah_kesekolah',\n 'no_telp_orangtua',\n 'nama_ayah',\n 'nama_ibu',\n 'alamat_lengkap_orang_tua',\n\n ];\n }\n else{\n $attributes=[\n\n 'nis_siswa',\n 'nisn_siswa',\n 'nik_siswa',\n 'nama_siswa',\n 'jenis_kelamin_siswa',\n 'tempat_lahir_siswa',\n 'tanggal_lahir_siswa',\n [\n 'attribute'=>'kelas',\n 'value'=>$kelas,\n ],\n 'hobi_siswa',\n 'cita_cita_siswa',\n 'alamat_domisili',\n 'jarak_rumah_kesekolah',\n 'no_telp_orangtua',\n 'nama_ayah',\n 'nama_ibu',\n 'alamat_lengkap_orang_tua',\n\n ];\n }\n\n return $this->render('view', [\n 'model' => $model,\n 'attributes'=> $attributes,\n 'kelas'=> $kelas,\n ]);\n }", "function get_detail_lapak($idLapak) {\n $res = $this->db->query(\"SELECT * FROM pelapak INNER JOIN pasar ON pelapak.id_pasar=pasar.id_pasar WHERE id_pelapak IN ('$idLapak')\");\n if($res->num_rows() > 0){\n $data['data'] = $res->row();\n $data['message'] = \"Data Ditemukan\";\n $data['error'] = 200;\n }else{\n $data['message'] = \"Data tidak ada\";\n $data['code'] = 404;\n }\n \n print json_encode($data);\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function detail_transaksi()\n\t{\n\t\terror_reporting(0);\n\t\t$id = antiInjection(trim($this->uri->segment(3)));\n\n\t\tif (!empty($id)) {\n\n\t\t\t$this->User_model->has_login();\n\n\t\t\t$output['PAGE_TITLE'] = 'Pinjaman Mikro';\n\n\t\t\t$mainData['top_css'] = '';\n\t\t\t$mainData['top_js'] = '';\n\t\t\t$mainData['bottom_js'] = '';\n\t\t\t$mainData['bottom_js'] .= add_js('js/data/transaksi_pinjaman_mikro.js');\n\t\t\t$mainData['bottom_js'] .= add_js('js/global.js');\n\n\t\t\t$output['EDIT'] = $this->Log_transaksi_model->get_log_transaksi_pinjam($id);\n\t\t\t$output['pendana'] = $this->Log_transaksi_model->get_log_transaksi_pendana_byloan($id);\n\n\t\t\t//_d($output['EDIT']);\n\n\t\t\t$mainData['mainContent'] = $this->load->view('loan/vpinjaman_detail_mikro', $output, true);\n\n\t\t\t$this->load->view('vbase',$mainData);\n\t\t}\n\t}", "public static function data()\n {\n return DB::table('detailgaji')\n ->join('potongan', 'detailgaji.kd_potongan', '=', 'potongan.kd_potongan')\n\t \n ->select('potongan.kd_potongan', 'detailgaji.id', 'detailgaji.nomor', 'detailgaji.jumlah')\n\n ->orderBy('detailgaji.nomor', 'asc')\n\t \n ->paginate(10);\n }", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "public function detail($id)\n\t{\n\t\t$this->load->model('AnnonceModel');\n\t\t// on appelle la methode liste() du modele, qui retourne le tableau de resultat ici affecté dans la variable $adetail (un tableau)\n\t\t$detailannonce = $this->AnnonceModel->Detail($id);\n\t\t// var_dump($Annonceannonce);\n\t\t$variables_details['dtls'] = $detailannonce;\n\t\t$this->load->view('header');\n\t\t$this->load->view('details', $variables_details);\n\t\t$this->load->view('footer');\n\t}", "public function obtenerViajesplus();", "public function detail() {\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('detail', 'content');\n $client = $this->em->selectById('client', $id);\n $village = $this->em->selectById('village', $client->getIdVillage());\n $this->loadHtml($client->getId(), 'id');\n $this->loadHtml($client->getNomFamille(), 'nomFamille');\n $this->loadHtml($village->getNom(), 'village');\n $this->loadHtml($client->getTelephone(), 'telephone');\n $this->dom->getElementById('lien_client')->href .= $id;\n }", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function view_by($id){\n $this->db->where('id', $id);\n return $this->db->get('pegawai')->row();\n }", "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }", "public function getDetalle();", "public function show($id)\n {\n\n // $admin_sekolah = $this->admin_sekolah->where('admin_sekolah_id', Auth::user()->id)->first();\n // if($this->checkRole(['superadministrator'])){\n // $pendaftaran = $this->pendaftaran->findOrFail($id);\n // }else{\n // $pendaftaran = $this->pendaftaran->where('sekolah_id', $admin_sekolah->sekolah_id)->findOrFail($id);\n // }\n \n\n\n $admin_sekolah = $this->admin_sekolah->where('admin_sekolah_id', Auth::user()->id)->first();\n\n if($this->checkRole(['superadministrator'])){\n// $pendaftaran = $this->pendaftaran->findOrFail($id);\n }else{\n $data \t\t\t\t\t= $this->pendaftaran\n ->select(\n 'siswas.nama_siswa',\n 'kegiatans.label as jenis_pendaftaran',\n 'pendaftarans.id',\n 'users.name',\n 'pendaftarans.tanggal_pendaftaran',\n 'sekolahs.nama as sekolah_tujuan',\n 'master_sktms.nama as jenis_sktm',\n 'sktms.no_sktm',\n 'prestasis.nama_lomba',\n 'jenis_prestasis.nama as jenis_prestasi',\n 'master_prestasis.juara',\n 'master_prestasis.tingkat' \n )\n ->leftjoin(\n 'sekolahs',\n 'pendaftarans.sekolah_id','=','sekolahs.id'\n )\n ->leftjoin(\n 'kegiatans',\n 'pendaftarans.kegiatan_id','=','kegiatans.id'\n )\n ->leftjoin(\n 'users',\n 'pendaftarans.user_id','=','users.id'\n )\n ->leftjoin(\n 'siswas',\n 'users.name','=','siswas.nomor_un'\n )\n ->leftjoin(\n 'sktms',\n 'pendaftarans.nomor_un','=','sktms.nomor_un'\n ) \n ->leftjoin(\n 'master_sktms',\n 'sktms.master_sktm_id','=','master_sktms.id'\n ) \n ->leftjoin(\n 'prestasis',\n 'pendaftarans.nomor_un','=','prestasis.nomor_un'\n )\n ->leftjoin(\n 'master_prestasis',\n 'prestasis.master_prestasi_id','=','master_prestasis.id'\n )\n ->leftjoin(\n 'jenis_prestasis',\n 'master_prestasis.jenis_prestasi_id','=','jenis_prestasis.id'\n )\n ->where('pendaftarans.id','=',$id)\n ->first();\n // $result = array();\n // foreach((array)$data as $key => $val){\n // if($key == '*attributes'){\n // dd($val);\n // foreach($val as $key1 => $val1){\n // if($key1 == 'juara'){\n // $result['juara'] = $this->masterprestasi->prestasi_label($val1);\n // }elseif($key1 == 'tingkat'){\n // $result['tingkat'] = $this->masterprestasi->tingkat_label($val1);\n // }else{\n // $result[$key1] = $val1;\n // }\n // }\n // }\n // }\n return response()->json($data)\n ->header('Access-Control-Allow-Origin', '*')\n ->header('Access-Control-Allow-Methods', 'GET'); \n }\n\n // $response['pendaftaran'] = $pendaftaran;\n // $response['kegiatan'] = $pendaftaran->kegiatan;\n // $response['sekolah'] = $pendaftaran->sekolah;\n // $response['user'] = $pendaftaran->user;\n // $response['siswa'] = $pendaftaran->siswa;\n // /*\n // // $response['prestasi'] = $pendaftaran->sekolah;\n // // $response['sktm'] = $pendaftaran->sekolah;\n // */\n\n // $response['nama_siswa'] = $data->nama_siswa;\n // $response['jenis_pendaftaran'] = $data->label;\n // $response['sekolah_tujuan'] = $data->nama;\n // $response['tanggal_pendaftaran'] = $data->tanggal_pendaftaran;\n // $response['jenis_sktm'] = $data->nama;\n // $response['no_sktm'] = $data->no_sktm;\n // $response['prestasi'] = $data->nama_lomba;\n // $response['jenis_prestasi'] = $data->nama;\n // $response['juara'] = $data->juara;\n // $response['tingkat'] = $data->tingkat;\n // $response['status'] = true;\n // return response()->json($response);\n }", "abstract public function getDetails();", "function get_detail($student_id) {\r\n $query = \"select * from akorno_debt_list where student_id = \" . $student_id;\r\n// print($query);\r\n $res = $this->query($query);\r\n return $res;\r\n }", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "protected function detail($id)\n {\n $show = new Show(Facility::findOrFail($id));\n\n $show->id('施設ID');\n $show->facility_name('施設名');\n $show->type('タイプ');\n $show->room('部屋数');\n $show->floor('フロア数');\n $show->transaction_status('取引ステータス');\n $show->sales_status('運営状況');\n $show->postalcode('郵便番号');\n $show->prefecture('都道府県');\n $show->address('住所');\n $show->katagaki('方書');\n $show->tel('電話番号');\n $show->manager('支配人');\n $show->manager_phone_number('支配人 携帯電話');\n $show->division1('担当事業部1');\n $show->department1('部署1');\n $show->staff1('担当者名1');\n $show->staff_phone_number1('担当者携帯1');\n $show->remarks1('備考1');\n $show->division2('担当事業部2');\n $show->department2('部署2');\n $show->staff2('担当者名2');\n $show->staff_phone_number2('担当者携帯2');\n $show->remarks2('備考2');\n $show->division3('担当事業部3');\n $show->department3('部署3');\n $show->staff3('担当者名3');\n $show->staff_phone_number3('担当者携帯3');\n $show->remarks3('備考3');\n $show->customer_id('顧客ID');\n $show->wifi('WiFi販売');\n $show->fixtures('備品販売');\n $show->tv('TV販売');\n $show->tableware('食器販売');\n $show->created_at('Created at');\n $show->updated_at('Updated at');\n\n return $show;\n }", "function showUD() {\n $rows = self::$db->getRows(\"SELECT * FROM usuario where tipousuario = 2\"); \n $arrayUsuario= array(); \n foreach ($rows as $c){\n $aux = new Usuario($c{'idusuario'},$c{'usuario'},$c{'contrasenia'},$c{'tipousuario'});\n array_push($arrayUsuario, $aux);\n }\n return $arrayUsuario; \n }", "public function tambah_detail()\n {\n $id_pros = $this->uri->segment(3);\n $detail = $this->uri->segment(4);\n\n $data = ['aktif' => 'pros',\n 'data_pros' => $this->M_prospektus->get_data_id_pros($id_pros)->row_array(),\n 'data_judul' => $this->M_prospektus->get_data_judul($id_pros),\n 'id_pros' => $id_pros,\n 'detail' => $detail\n ];\n\n $this->template->load('template', 'prospektus/V_data_detail', $data);\n }", "public function show($id)\n {\n //\n try {\n //code...\n $respuesta = new RespuestaWebTO();\n $lotedto = new LoteDto();\n $ubigeodetalledto = new UbigeoDetalleDto();\n $ubigeodto = new UbigeoDto();\n\n $lote = Lote::select('lote.id', 'nombres', 'lote.codigo','precioadquisicion', 'preciocontrato',\n 'largo', 'ancho', 'habilitacionurbana.nombre', 'habilitacionurbana.siglas',\n 'ubigeo.ubigeo as nombrehabilitacionurbana', 'lote.direccion', 'lote.latitud', \n 'lote.longitud', 'descripcion', 'path', 'pathArchivos', 'lote.foto', 'lote.estado', 'contrato', \n 'estadocontrato', 'referencia', 'lote.persona_id as idpersona', 'lote.ubigeo_id as idubigeo',\n 'ubigeo.habilitacionurbana_id as idhabilitacionurbana')\n ->join('persona', 'persona.id', '=', 'lote.persona_id')\n ->join('ubigeo', 'ubigeo.id', '=', 'lote.ubigeo_id')\n ->join('habilitacionurbana', 'habilitacionurbana.id', '=', 'ubigeo.habilitacionurbana_id')\n ->where('lote.id','=',$id)->first();\n if ($lote !== null && $lote !== '') {\n $lotedto->setLote($lote);\n $persona = Persona::FindOrFail($lote->idpersona);\n $lotedto->setPersona($persona);\n\n // habilitacionurbana\n $habilitacionurbana = HabilitacionUrbana::FindOrFail($lote->idhabilitacionurbana);\n $lotedto->setHabilitacionUrbana($habilitacionurbana);\n //end habilitacionurbana\n\n // ubigeo\n $ubigeo = Ubigeo::FindOrFail($lote->idubigeo); // siempre es el ubigeo distrito\n $ubigeodto->setUbigeo($ubigeo);\n $codigo = $ubigeo->codigo;\n $subsdepartamento = substr($codigo, 0, 2).\"00000000\";\n $subsprovincia = substr($codigo, 0, 4).\"000000\";\n $subsdistrito = substr($codigo, 0, 6).\"0000\";\n\n $ubigeos = Ubigeo::whereIn('codigo', [$subsdepartamento, $subsprovincia, $subsdistrito])->get();\n\n $departamento = $ubigeos[0];\n $provincia = $ubigeos[1];\n $distrito = $ubigeos[2];\n $ubigeodetalledto->setDepartamento($departamento);\n $ubigeodetalledto->setProvincia($provincia);\n $ubigeodetalledto->setDistrito($distrito);\n $ubigeodetalledto->setUbigeo($ubigeodto);\n $lotedto->setUbigeo($ubigeodetalledto);// ingreso del ubigeo\n // end ubigeo\n\n $fotos = Foto::select('foto.id', 'foto.nombre', 'foto.foto', 'foto.detalle', 'foto.estado')\n ->join('lotefoto', 'lotefoto.foto_id', '=', 'foto.id')\n ->where('lotefoto.lote_id', $id)->get();\n $lotedto->setFotos($fotos);\n // archivos\n $archivos = LoteArchivo::select('lotearchivo.id', 'lotearchivo.lote_id', 'lotearchivo.nombre',\n 'lotearchivo.archivo', 'lotearchivo.tipoarchivo', 'lotearchivo.estado')\n ->join('lote', 'lote.id', '=', 'lotearchivo.lote_id')\n ->where('lotearchivo.lote_id', $id)->get();\n $lotedto->setArchivos($archivos); // ingreso de los archivos del lote\n $respuesta->setEstadoOperacion('EXITO');\n $respuesta->setExtraInfo($lotedto);\n } else {\n $respuesta->setEstadoOperacion('ADVERTENCIA');\n $respuesta->setOperacionMensaje('No se encontraron lotes');\n }\n } catch (Exception $e) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($e->getMessage());\n } catch (QueryException $qe) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($qe->getMessage());\n }\n return response()->json($respuesta, 200); // 201\n }", "function ambil_data(){\n\t\t$this->db->order_by($this->id_admin,$this->order);\n\t\treturn $this->db->get($this->nama_table)->result();\n\t}", "public function detail($id){\n \n $this->_estado->_setIdTableValue($id);\n $params['rsEstado'] = $this->_estado->getRecord();\n \\kerana\\View::showView($this->_current_module,'estado/detail',$params);\n \n }", "public function descripcion() {\r\n return DescripcionUsuario::where('id', '=', $this->descripcion_usuarios_id)->first();\r\n //return $this->belongs_to('DescripcionUsuario'); // indica que contiene la clave foranea de la tabla DescripcionUsuario\r\n }", "public function data()\n {\n $orders=libro::all();\n foreach ($orders as $key => $value) {\n \n if(count(autor::find($value->id_autor)))\n $value->id_autor=autor::find($value->id_autor)->nombre;\n else $value->id_autor='No asignado';\n \n }\n return \\Datatables::of($orders)->addColumn('action', 'libro.partials.vista')->make(true) ; \n }", "function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}", "function get_aut_idautor(){return $this->aut_idautor;}", "public function detail($id)\n {\n $where = array('id_isi_paket');\n $detail = $this->M_isipaket->detail_data($id);\n $data['detail'] = $this->M_isipaket->detail_data($id);\n $this->load->view('templates/header');\n $this->load->view('templates/sidebar');\n $this->load->view('admin/isipaket/detail', $data);\n $this->load->view('templates/footer');\n }", "public function awal(){\n // return $data = dosen::where('pengguna_id', 12)->with('pengguna')->get(); \n // //relasi dari pengguna ke dosen\n // return $data = pengguna::where('id', 12)->with('dosen')->get();\n return \"halo\";\n }", "private function currentJadwal($detail,$periode){\n /*$nik = array_keys($detail);\n $awalBulan = $periode.'-01';\n $akhirBulan = akhirBulan($awalBulan);\n $this->load->model('absent_detail_model','adm');\n $nikPengajuan = $this->adm->setWithHeader(TRUE)->as_array()->distinct()->fields(['absent_details.nik','absent_details.tanggalabsensi'])->where([['absent_details.nik' => $nik]])->get_many_by(['absents.status = \\'I\\' and absent_details.tanggalabsensi between \\''.$awalBulan.'\\' and \\''.$akhirBulan.'\\'']);\n if(!empty($nikPengajuan)){\n $nikJadwal = array_column($nikPengajuan,'nik');\n $tanggalJadwal = array_column($nikPengajuan,'tanggalabsensi');\n $this->load->model('jadwal_detail_model','jdm');\n $jadwalActual = convertArr2Key($this->jdm->as_array()->fields(['nik','tanggalabsensi','timetables_id'])->get_many_by(['nik' => $nikJadwal, 'tanggalabsensi' => $tanggalJadwal]),'nik','tanggalabsensi'); \n //log_message('error',json_encode($jadwalActual));\n if(!empty($jadwalActual)){\n foreach($jadwalActual as $nik => $pertanggal){\n foreach($pertanggal as $tgl => $val){\n if(isset($detail[$nik])){\n $tglSaja = explode('-',$tgl);\n $angkaTgl = intval($tglSaja[2]);\n if(isset($detail[$nik]['tanggal'][$angkaTgl])){\n $detail[$nik]['tanggal'][$angkaTgl] = $val['timetables_id'];\n } \n }\n }\n }\n }\n }\n*/\n //log_message('error',$periode);\n return $detail;\n }", "public function show($id)\n {\n if($id != 0) {\n \n $poubelle = Poubelle::find($id) ;\t\n return json_encode( $poubelle ) ;\n\n }\n return 0 ;\n \n }", "public function verifyDetail() {\n $query=\"SELECT de.id_catalogo_producto\n FROM detalle_orden de\n INNER JOIN orden_compra oc\n ON oc.id_orden_compra = de.id_orden_compra\n WHERE de.id_catalogo_producto = ? AND oc.id_cliente = ? AND oc.id_estado_orden = 5\";\n $params = array($this->id_catalogo_producto, $_SESSION['id_cliente']);\n return Database::getRow($query, $params);\n }", "public function detailData($id_laporan)\n {\n return DB::table('tbl_laporankeluar')->where('id_laporan', $id_laporan)->first();\n }", "public function getJadwalDimulai();", "function _get_data()\r\n {\r\n $model_dangtin =& m('qldangtin');\r\n $dangtin = $model_dangtin->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'thoigianup DESC',\r\n ));\r\n $this->assign('dangtin', $dangtin);\t\r\n // var_dump($dangtin);\r\n //Tin khuyen mai\r\n $value='1';\r\n $model_dangtin =& m('qldangtin');\r\n $khuyenmai = $model_dangtin->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'thoigianup DESC',\r\n\t\t'conditions' => 'khuyenmai ='.$value,\r\n ));\r\n $this->assign('khuyenmai', $khuyenmai);\r\n // var_dump($khuyenmai);\r\n //san pham moi\r\n $model_sanpham =& m('goods');\r\n $sanpham = $model_sanpham->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'add_time DESC',\r\n ));\r\n $this->assign('sanpham', $sanpham);\r\n\r\n \r\n }", "public function showAseg(){\n $ordenado = \\DB::table('Asegurado')->orderBy('Ap_paterno', 'asc')->get();\n return $ordenado;\n }", "public function getId_Entree()\n{\nreturn $this->Id_Entree;\n}", "private function listsDetails(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function detail($id) {\n\t\t$output \t\t= $this->Tabel_dokumen->detail(array('idDokumen'=> $id));\n\t\t$output['user'] = $this->Tabel_dokumen->user_get(array('idDokumen'=> $id));\n\n\t\t//* formatting the data to be view properly at the output *//\n\t\tforeach ($output['user'] as &$key) {\n\t\t\t\n\t\t\tswitch ($key['tipe']) {\n\t\t\t\tcase \"p\"\t: $key['detail']['nama'] = $this->detail_pegawai($key['userId'])['nama'];\n\t\t\t\t\t\t\t $key['detail']['id'] = $key['userId'];\n\t\t\t\t\t\t\t $key['detail']['tipe'] = $key['tipe'];break;\t \t\n\t\t\t\tdefault \t: $key['detail']['nama'] = $this->apicall->get(URL_API.'daftar/user/'.$key['userId'])[0]->nama;\n\t\t\t\t\t\t\t $key['detail']['id'] = $key['userId'];\n\t\t\t\t\t\t\t $key['detail']['tipe'] = $key['tipe'];\n\t\t\t}\n\t\t}\n\t\techo json_encode($output);\n\t}", "public function detail($id)\n {\n $data['title'] = \"Detail Pelanggan\";\n //mengambil data dari pelanggan model, dengan method pelangganByID\n $data['pelanggan'] = $this->model('pelanggan_model')->pelangganById($id);\n //mengambil tampilan\n $this->view('layouts/header', $data);\n $this->view('layouts/navbar');\n $this->view('pelanggan/detail', $data);\n $this->view('layouts/footer');\n }", "public function showAdminGizi(){\n \t// $tertutup = DB::select(\"select * from konsultasi where jenis_pertanyaan = 'tertutup'\");\n $terbuka = Konsultasi::where('jenis_pertanyaan','=','terbuka')->orderBy('id','desc')->get();\n $tertutup = Konsultasi::where('jenis_pertanyaan','=','tertutup')->orderBy('id','desc')->get();\n //return $tertutup;\n\n \treturn view('adminGizi', ['terbuka' => $terbuka, 'tertutup' => $tertutup]);\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "function dataDetail($nip) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai WHERE nip ='$nip'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "public function actionShowPutusantersangka()\n {\n \n $id_perkara = \\Yii::$app->session->get('id_perkara');\n\t\t/*$queryTersangka = new Query();\n $modelPutusan = $queryTersangka->select('a.*')->from('pidum.pdm_putusan_hakim44 a')\n ->where('a.id_tersangka=:id_tersangka AND flag<>\\'3\\'', [':id_tersangka' => $_GET['id_tersangka']])->all();\n */\n\t\t$modelPutusan = PdmPutusanHakim44::findOne(['id_perkara' => $id_perkara],['id_tersangka' => $id_tersangka]);\n\t\tif($modelPutusan == null){\n\t\t\t$modelPutusan = new PdmPutusanHakim44();\n\t\t\t//echo $_GET['id_tersangka'];exit;\n\t\t}\n\t\t$rentut = array(\"1\"=>\"Pidana Mati\",\"2\"=>\"Pidana Seumur Hidup\",\"3\"=>\"Pidana Penjara\",\"4\"=>\"Pidana Kurungan-Denda\",\"5\"=>\"Bebas\");\n\t\t$sikap_jaksa = array(array(\"id\"=>\"1\",\"nama\"=>\"Menerima\"),array(\"id\"=>\"2\",\"nama\"=>\"Banding\"),array(\"id\"=>\"3\",\"nama\"=>\"Kasasi\"));\n\t\t$sikap_tersangka = array(array(\"id\"=>\"1\",\"nama\"=>\"Menerima\"),array(\"id\"=>\"2\",\"nama\"=>\"Banding\"));\n\t\t$pengawasan = array(\"1\"=>\"Dikembalikan Kepada Orang Tua\",\"2\"=>\"Diserahkan Kepada Negara\",\"3\"=>\"Diserahkan Kepada Departemen Sosial\",\"4\"=>\"Diserahkan kepada organisasi Sosial Kemasyarakatan\");\n\t\t\n\t\tif ($modelPutusan->load(Yii::$app->request->post()) ) {\n\t\t\t$modelPutusan->id_perkara = $id_perkara;\n\t\t\t$modelPutusan->id_tersangka = $_GET['id_tersangka'];\n if(!$modelPutusan->save()){\n\t\t\t\tvar_dump($modelPutusan->getErrors());exit;\n\t\t\t}else{\n\t\t\t\treturn $this->redirect(['create']);\n\t\t\t}\n } else {\n return $this->renderAjax('_popPutusantersangka', [\n 'modelPutusan' => $modelPutusan,\n 'rentut' => $rentut,\n 'pengawasan' => $pengawasan,\n 'sikap_jaksa' => $sikap_jaksa,\n 'sikap_tersangka' => $sikap_tersangka,\n\t\t\t'id_tersangka'=>$_GET['id_tersangka'],\n ]);\n\t\t}\n }", "function index_get() {\n $id = $this->get('id'); // Mengecek apakah ada property id pada address sehingga data yang ditampilkan dapat diseleksi berdasarkan id atau ditampikan semua\n if ($id == '') {\n $kontak = $this->db->get('telepon')->result(); // Jika id tidak ada maka data ditampilkan semua\n } else {\n $this->db->where('id', $id);\n $kontak = $this->db->get('telepon')->result(); // Data ditampilkan berdasarkan id yang terdapat di property address\n }\n $this->response($kontak, 200);\n }", "function getAllFromProizvod(){\n\t\treturn $this->ime . \"&nbsp\" . $this->imeProizvođača . \"&nbsp\" \n\t\t. $this->prezimeProizvođača . \"&nbsp\" . $this->cijena;\n\t}", "public function action_detail()\n\t{\n\t\t$this->template = View::forge('template-admin');\n\n $get = Input::get();\n\t\t$id = $get[\"id\"];\n\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t//return Response::forge(View::forge('event/detail',$data));\n\t\t$this->template->title = \"イベント詳細\";\n\t\t$this->template->content = View::forge('event/detail', $data);\n\t}", "public function actionNhanVienDirectSale()\n {\n return ArrayHelper::map(User::getNhanVienTuDirectSale(), 'id', 'fullname');\n }", "public function listadoUnidadmedida(){\n \n\t\t$data= $this->Model_maestras->BuscarUmedida();\n\t\n\t\techo($data); \n\t \n\n\t}", "function get_detailpeserta($no_daftar)\n {\n return $this->db->select('\n a.id_pendaftaran,\n a.id_jurusan,\n a.no_pendaftaran,\n a.nama_pendaftar,\n a.jk,\n a.nik,\n a.foto,\n a.tempat_lahir,\n a.tanggal_lahir,\n a.agama,\n a.nama_ayah,\n a.tahun_lahir_ayah,\n a.pekerjaan_ayah,\n a.pendidikan_ayah,\n a.penghasilan_ayah,\n a.nama_ibu,\n a.tahun_lahir_ibu,\n a.pekerjaan_ibu,\n a.pendidikan_ibu,\n a.penghasilan_ibu,\n a.nama_wali,\n a.tahun_lahir_wali,\n a.pekerjaan_wali,\n a.pendidikan_wali,\n a.penghasilan_wali,\n a.jenis_tinggal,\n a.rt,\n a.rw,\n a.desa_kelurahan,\n a.kecamatan,\n a.kabupaten,\n a.provinsi,\n a.kode_pos,\n a.tinggi_badan,\n a.berat_badan,\n a.nomor_telp_rumah,\n a.no_telepon,\n a.jurusan,\n a.jarak_sekolah,\n a.alat_transportasi,\n a.prestasi,\n a.alamat_email,\n a.tanggal,\n a.konfirmasi,\n a.ta_akademik,\n a.sekolah_asal,\n a.alamat_sekolah_asal,\n a.rapor_scan,\n a.ijazah_scan,\n a.kk_scan,\n a.akta_scan,\n\n b.id_jurusan,\n b.nama_jurusan,\n b.kode_jurusan,\n\n trverifikasirapor.id,\n trverifikasirapor.tmverifikasi_id,\n trverifikasirapor.pendaftaran_id,\n trverifikasirapor.nilai,\n trverifikasirapor.date_create,\n\n tmverifikasi_rapor.id,\n tmverifikasi_rapor.mapel_uji,\n tmverifikasi_rapor.kkm,\n tmverifikasi_rapor.create_at,\n tmverifikasi_rapor.user_id, \n ')\n ->from('rn_daftar a')\n ->join('rn_jurusan b', 'a.id_jurusan=b.id_jurusan', 'left')\n ->join('trverifikasirapor', 'trverifikasirapor.pendaftaran_id=a.id_pendaftaran', 'left')\n ->join('tmverifikasi_rapor', 'tmverifikasi_rapor.id=trverifikasirapor.tmverifikasi_id', 'left')\n ->where('a.no_pendaftaran', $no_daftar)\n ->get();\n }", "private static function showIndirizzi(){\n $Magazzini=\\Singleton::DB()->query(\"SELECT indirizzi.id as id_magazzino, comuni.nome as citta,comuni.provincia as provincia, comuni.CAP as cap, indirizzi.via, indirizzi.civico FROM `magazzini`,comuni,indirizzi WHERE magazzini.id_indirizzo=indirizzi.id AND indirizzi.id_comune=comuni.id;\");\n while($r = mysqli_fetch_assoc($Magazzini)) {$rows[] = $r; }\n if(isset($rows))echo json_encode($rows);\n else self::setSuccess(\"empty\");\n }", "public function displaymahasiswa()\r\n {\r\n $query = \"select * from data_mahasiswa\";\r\n return $this->db->query($query);\r\n }", "public function detail_data_kades($id_kades)\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $detailhere = array('id_kades' => $id_kades);\n $data_detail['detail_kades'] = $this->m_admin->get_detail_kades($detailhere, 'kepala_desa')->result();\n\n $data_detail['foto_profil'] = $this->m_admin->get_foto_profil_kades($id_kades)->result();\n\n $data_detail['foto_ktp'] = $this->m_admin->get_foto_ktp_kades($id_kades)->result();\n\n $data_detail['foto_kk'] = $this->m_admin->get_foto_kk_kades($id_kades)->result();\n\n $data_detail['foto_ttd'] = $this->m_admin->get_foto_ttd_kades($id_kades)->result();\n\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/detail_data_kades', $data_detail);\n $this->load->view('footer');\n }", "public function detail($id_jadwal)\n\t\t{\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('jadwal');\n\t\t\t$this->db->where('id_jadwal', $id_jadwal);\n\t\t\t$this->db->order_by('id_jadwal', 'desc');\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->row();\n\t\t}", "public function detailAction(){\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeAd.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_updBikeAds.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBike2Ext.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_selVPic.php');\n\t\t$req = $this -> getRequest();\n\t\t$lang = $this -> lang;\n\t\t$p = $req -> getParams();\n\t\t\n\t\tif (isset($p['id'])){\t\t\t\n\t\t\t$bikeDetails = db_selBikeAd(array('bikeID' => $p['id']));\n\t\t\tif (($bikeDetails != false) && is_array($bikeDetails) && (count($bikeDetails) == 1)){\t\t\t\t\n\t\t\t\t$bikeDetails = $bikeDetails[0];\n\t\t\t\t\n\t\t\t\tif (is_array($this -> adminNS -> bikeAds) && isset($this -> adminNS -> bikeAds['bikeID'])\n\t\t\t\t\t&& ($this -> adminNS -> bikeAds['bikeID'] != $bikeDetails['bikeID'])){\n\t\t\t\t\t$this -> resetnsAction();\n\t\t\t\t}\n\t\t\t\t//Safe changes\n\t\t\t\tif (isset($p['bikeSafe'])){\n\t\t\t\t\t$p['bikeID'] = $bikeDetails['bikeID'];\n\t\t\t\t\t$p['bikeBrandID'] = $p['bikeBrand'];\n\t\t\t\t\t$p = $this -> updatebikeAction($p);\n\t\t\t\t\tif (isset($p['error'])){\n\t\t\t\t\t\t$this -> view -> error = $p['error'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$bikeDetails2 = db_selBikeAd(array('bikeID' => $p['id']));\n\t\t\t\t\t\tif (($bikeDetails2 != false) && is_array($bikeDetails2) && (count($bikeDetails2) == 1)){\n\t\t\t\t\t\t\t$bikeDetails = $bikeDetails2[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this -> view -> info = $lang['AINFO_4'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Delete advertisement\n\t\t\t\telse if (isset($p['bikeDel'])){\n\t\t\t\t\t$bikeAd = db_updBikeAds(array(System_Properties::SQL_WHERE => array('bikeID' => $bikeDetails['bikeID'])\n\t\t\t\t\t\t\t\t\t\t\t\t, System_Properties::SQL_SET => array('erased' => 1)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif ($bikeAd != false){\n\t\t\t\t\t\t$this -> _forward('index');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Load all bike extra\n\t\t\t\t$this -> loadBikeExt();\n\t\t\t\t\n\t\t\t\t//Load bike extra\n\t\t\t\t$bikeExt = db_selBike2Ext(array('bikeID' => $bikeDetails['bikeID']));\n\t\t\t\tif (($bikeExt != false) && is_array($bikeExt) && (count($bikeExt) > 0)){\n\t\t\t\t\t$bikeDetails['bikeExt'] = array();\n\t\t\t\t\tforeach ($bikeExt as $key => $val){\n\t\t\t\t\t\tarray_push($bikeDetails['bikeExt'], $val['vextID']);\n\t\t\t\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//Fetch all bike pics\n\t\t\t\tif (isset($this -> adminNS -> bikePhoto) && is_array($this -> adminNS -> bikePhoto)){\n\t\t\t\t\t$bikePhoto = $this -> adminNS -> bikePhoto;\n\t\t\t\t}\t\n\t\t\t\telse{\n\t\t\t\t\t$bikePhoto = db_selVPic(array(\t'vType' => System_Properties::BIKE_ABRV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'vID' => $bikeDetails['bikeID']));\n\t\t\t\t\t$bikeDetails['bikePhoto'] = array();\n\t\t\t\t\tforeach($bikePhoto as $key => $kVal){\n\t\t\t\t\t\t$bikeDetails['bikePhoto'][$kVal['vPicID']] = $kVal;\n\t\t\t\t\t}\n\t\t\t\t\t$bikePhoto = $bikeDetails['bikePhoto'];\n\t\t\t\t}\n\t\t\t\t$bikeDetails['bikePhoto'] = $bikePhoto;\n\t\t\t\t\n\t\t\t\t//Load brands and models\t\t\t\t\n\t\t\t\t$this -> loadBikeModelsBrands(array('bikeBrand' => $bikeDetails['bikeBrandID']));\n\t\t\t\t//Load all possible bike extra\n\t\t\t\t$this -> loadBikeExt();\n\t\t\t\t$this -> loadBikeCat();\n\t\t\t\t$this -> view -> bike = $bikeDetails;\n\t\t\t\t\n\t\t\t\t$this -> adminNS -> bikeAds = $bikeDetails;\n\t\t\t\t$this -> adminNS -> bikePhoto = $bikePhoto;\n\t\t\t}else{\n\t\t\t\t$this -> indexAction();\n\t\t\t\t$this -> render('index');\n\t\t\t}\n\t\t}else{\n\t\t\t$this -> indexAction();\n\t\t\t$this -> render('index');\n\t\t}\n\t}", "public function viewdetailsAction()\n {\n $productId = $this->_getParam('product_id');\n $product = $this->_model->setId($productId);\n $this->view->product = $product->fetch(); \n \n }", "function getTennguoidatinformation($id)\n {\n $kiemtra = Hoadon::where('id',$id)->where('idnguoidung',Auth::user()->id)->first();\n if($kiemtra)\n {\n $data['nguoidat'] = Hoadon::where('id',$id)->get();\n return view('page.Tennguoidatinformation',$data);\n }\n else\n {\n return redirect()->intended('/');\n }\n }", "public function show($id)\n {\n $laporan = Laporan::find($id);\n $penyakit = Penyakit::find($laporan->penyakit);\n $tindakan = Tindakan::find($laporan->tindakan);\n $status = Status::alias($laporan->status);\n $kecamatan = Kecamatan::where('kecamatan_id', $laporan->kecamatan)->first();\n $kelurahan = Kelurahan::where('kelurahan_id', $laporan->kelurahan)->first();\n $pelapor = User::find($laporan->pelapor);\n $tipe_pelapor = Role::find($pelapor->role_id);\n $detail_laporan = DetailLaporan::where('id_laporan', $id)->get();\n\n $detail_laporan = DB::table('detail_laporan')\n ->select('detail_laporan.status', 'detail_laporan.foto', 'tindakan.nama_tindakan as tindakan', 'detail_laporan.created_at', 'detail_laporan.keterangan', 'detail_laporan.id')\n ->leftJoin('tindakan', 'detail_laporan.tindakan', '=', 'tindakan.id')\n ->where('detail_laporan.id_laporan', '=', $id)\n ->orderByDesc('detail_laporan.created_at')\n ->get();\n\n $detail_status = [\n 'deleted' => [\n 'id' => 0,\n 'name' => 'Deleted'\n ],\n 'open' => [\n 'id' => 1,\n 'name' => 'Open'\n ],\n 'finish' => [\n 'id' => 2,\n 'name' => 'Finish'\n ],\n 'on_going' => [\n 'id' => 3,\n 'name' => 'On Going'\n ],\n 'surveyed' => [\n 'id' => 4,\n 'name' => 'Surveyed'\n ]\n ];\n\n $detail_tindakan = Tindakan::all();\n\n\n return view('penyakit/laporan/show')->with([\n 'js' => 'penyakit/detail.js',\n 'gmaps' => true,\n 'title' => 'Detail Laporan ' . $id,\n 'laporan' => [\n 'isi' => $laporan,\n 'penyakit' => $penyakit,\n 'tindakan' => $tindakan,\n 'status' => $status,\n 'kecamatan' => $kecamatan,\n 'kelurahan' => $kelurahan,\n 'pelapor' => [\n 'pelapor' => $pelapor,\n 'tipe_pelapor' => $tipe_pelapor\n ]\n ],\n 'detail_laporan' => $detail_laporan,\n 'detail_status' => $detail_status,\n 'detail_tindakan' => $detail_tindakan\n\n ]);\n }", "protected function detail($id)\n {\n $show = new Show(Procurement::findOrFail($id));\n $show->panel()\n ->tools(function ($tools) {\n $tools->disableEdit();\n //$tools->disableDelete();\n });\n $show->id('Id');\n $show->u_id('姓名/昵称')->as(function($val){\n return User::where('id',$val)->value('name');\n });\n $show->brand('品牌要求')->as(function($id){\n return Brand::find($id)->name;\n });\n $show->type('瓷砖类型')->as(function($id){\n return Category::find($id)->name;\n });\n $show->models('型号要求')->as(function($id){\n return Category::find($id)->name;\n });\n $show->material('材质要求')->as(function($id){\n return Category::find($id)->name;\n });\n $show->area('采购面积')->as(function($val){\n return $val.'平米';\n });\n $show->room_city('所在地区')->as(function($val){\n return Cities::where('area_code',$val)->value('area_name');\n });\n $show->address('详细地址');\n $show->brick_time('用砖时间')->as(function ($num) {\n switch($num){\n case '1':\n return '1周';\n break;\n case '5':\n return '1个月';\n break;\n case '10':\n return '3个月';\n break;\n }\n });\n $show->status('审核')->as(function($val){\n switch($val){\n case 0:\n return '待审核';\n break;\n case 1:\n return '审核通过';\n break;\n case 2:\n return '审核未通过';\n break;\n }\n });\n $show->images('参考图片')->unescape()->as(function($val){\n $imgs = '';\n $path = getenv('APP_URL').'/uploads/';\n foreach($val as $k=>$v){\n $imgs .=\"<a href='$path$v'target='_blank'><img style='max-width:200px;max-height:200px;' src='$path$v'></a>\";\n }\n return $imgs;\n });\n $show->ctime('创建时间');\n// $show->utime('Utime');\n\n return $show;\n }", "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }", "public function where(){\n\n $where = array(\n \"id >\" => 1,\n \"detail !=\" => \"\"\n );\n\n /*\n $rows = $this\n ->db\n ->or_where($where)\n ->get(\"personel\")\n ->result();\n\n $rows = $this\n ->db\n ->where_in(\"title\", array(\"kablosuzkedi\",\"felakettin\"))\n ->get(\"personel\")\n ->result();\n\n $rows = $this\n ->db\n ->where(\"id\", 1)\n ->or_where_in(\"title\", array(\"kablosuzkedi\",\"felakettin\"))\n ->get(\"personel\")\n ->result();\n\n $rows = $this\n ->db\n ->where_not_in(\"title\", array(\"kablosuzkedi\",\"felakettin\"))\n ->get(\"personel\")\n ->result();\n */\n\n $rows = $this\n ->db\n ->or_where_not_in(\"title\", array(\"kablosuzkedi\",\"felakettin\"))\n ->get(\"personel\")\n ->result();\n\n echo $this->db->last_query();\n\n $viewData = array(\"rows\" => $rows);\n\n $this->load->view(\"dbislem\", $viewData);\n\n }", "function getDetailContent($_MaSK){\n\t\t$sql=\"SELECT tl.TenTL, gd.TenGD, ctgd.TenCTGD, sk.MaSK, sk.TieuDe, sk.HinhSK, sk.NoiDung, sk.SoLuotXem, sk.Video, sk.created_at FROM theloai tl, giaidoan gd, chitietgiaidoan ctgd, sukien sk WHERE tl.MaTL = gd.MaTL AND gd.MaGD = ctgd.MaGD AND ctgd.MaCTGD = sk.MaCTGD AND sk.MaSK=$_MaSK\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "function readReal(){ \n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=1 LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "public function detail($id)\n {\n $this->load->helper(array('form', 'ctrl'));\n if (count($_POST) > 0) {\n $redirection = $this->session->userdata('_url_retour');\n if (!$redirection) {\n $redirection = '';\n }\n\n redirect($redirection);\n } else {\n $valeurs = $this->m_feuille_controle->detail($id);\n $cmd_globales = array();\n\n // commandes locales\n $cmd_locales = array(\n array(\"Modifier\", 'feuille_controle/modification', 'primary'),\n array(\"Archiver\", 'feuille_controle/archive', 'warning'),\n array(\"Supprimer\", 'feuille_controle/remove', 'danger'),\n );\n\n // descripteur\n $descripteur = array(\n 'champs' => array(\n 'date_du_controle' => array(\"Date du Controle\", 'VARCHAR 50', 'text', 'date_du_controle'),\n 'group_name' => array(\"Contrôle de Distribution Nom\", 'VARCHAR 50', 'text', 'group_name'),\n 'controleur_name' => array(\"Controleur\", 'VARCHAR 50', 'text', 'controleur_name'),\n 'client_name' => array(\"Client\", 'VARCHAR 50', 'text', 'client_name'),\n 'devis_name' => array(\"Devis\", 'VARCHAR 50', 'text', 'devis_name'),\n 'facture_name' => array(\"Facture\", 'VARCHAR 50', 'text', 'facture_name'),\n 'numero' => array(\"Numero\", 'VARCHAR 50', 'text', 'numero'),\n 'rue' => array(\"Rue\", 'VARCHAR 50', 'text', 'rue'),\n 'ville' => array(\"Ville\", 'VARCHAR 50', 'text', 'ville'),\n 'resultat' => array(\"Resultat\", 'VARCHAR 50', 'text', 'resultat'),\n 'commentaire' => array(\"Commentaires\", 'VARCHAR 50', 'text', 'commentaire'),\n ),\n 'onglets' => array(),\n );\n\n $data = array(\n 'title' => \"Détail of Contrôle de Distribution\",\n 'page' => \"templates/detail\",\n 'menu' => \"Extra|Feuille_controle\",\n 'id' => $id,\n 'values' => $valeurs,\n 'controleur' => 'feuille_controle',\n 'methode' => 'detail',\n 'cmd_globales' => $cmd_globales,\n 'cmd_locales' => $cmd_locales,\n 'descripteur' => $descripteur,\n );\n $layout = \"layouts/standard\";\n $this->load->view($layout, $data);\n }\n }", "public static function readOrga(){\n if(ModelBenevole::isValide($_SESSION['login'], $_GET['IDFestival'])){\n $tab_b = ModelBenevole::readAllOrga($_GET['IDFestival']); //appel au modèle pour gerer la BD\n $controller = 'benevole';\n $view = 'list';\n $pagetitle = 'Liste des organisateurs';\n require_once (File::build_path(array('view','view.php'))); //\"redirige\" vers la vue\n }else{\n $controller = 'benevole';\n $view = 'error';\n $pagetitle = 'Vous n\\'avez pas les droits ';\n }\n }", "public static function readDemandesOrga(){\n if(ModelBenevole::isOrga($_SESSION['login'], $_GET['IDFestival'])){\n $tab_b = ModelBenevole::readAllDemandesOrga($_GET['IDFestival']); //appel au modèle pour gerer la BD\n $controller = 'benevole';\n $view = 'demandesorga';\n $pagetitle = 'Liste des demandes organisateur';\n require_once (File::build_path(array('view','view.php'))); //\"redirige\" vers la vue\n }else{\n $controller = 'benevole';\n $view = 'error';\n $pagetitle = 'Vous n\\'avez pas les droits ';\n }\n }", "public function show($id)\n {\n $inovasi = inovasi::where('inovasi_id', $id)->first();\n $juri = Auth::user()->nip;\n\n $anggota = anggotaTim::where('tim_id', $inovasi->tim_id)->get();\n\n\n $kitkats = kriteraiaKategoriPenilaian::where('sub_kategori_id',$inovasi->sub_kategori_id)->get();\n $kriterias = [];\n $i=0;\n foreach ($kitkats as $kit){\n if($i==0){\n $kriterias[$i] = $kit->subKriterias->kriterias->nama_kriteria;\n $i++;\n }else{\n if($kriterias[$i-1] != $kit->subKriterias->kriterias->nama_kriteria){\n $kriterias[$i] = $kit->subKriterias->kriterias->nama_kriteria;\n $i++;\n }\n }\n }\n\n $penilaianInovasi= penilaianInovasi::where('inovasi_id', $id)\n ->where('nip_juri', Auth::user()->nip)->first();\n\n\n $penilaians = penilaianTim::where('penilaian_inovasi_id', $penilaianInovasi->penilaian_inovasi_id)->get();\n $total =0;\n foreach ($penilaians as $penilaian) {\n $total = $total + $penilaian->nilai;\n }\n\n return view('juri.inovasi_juri.show', compact('anggota','inovasi', 'kitkats','kriterias','i','juri','penilaians' ,'total','penilaianInovasi'));\n }", "public function __toString(){\n return $this->nom;\n // to show the id in the select\n // return $this->id;\n }", "public function itemDetail($id){\n\n $datadetalle = DocumentoDetalle::\n from('documentodetalle as d')\n ->join('products as p', 'p.id', '=' , 'd.id_producto')\n ->where('d.id_documentocabecera', '=', $id)\n ->select(\n 'd.id',\n 'd.id_producto as idproduct',\n 'p.descripcion as product',\n 'd.precio_unitario as price',\n 'd.cantidad',\n 'p.stock',\n \\DB::raw('4 as tipo')\n )->get();\n\n return response()->json([\n 'data' => $datadetalle\n ]);\n\n }", "public function getDetalles()\n {\n $sql = \"select z.id,z.nombre, z.identificacion, z.estado_excluido, y.descripcion, w.categoria , (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'aeo'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as 'aeo' ,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'alim'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as alim,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'pare'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as pare\n from appexamenisw2.estudiantes z, appexamenisw2.beneficios y, appexamenisw2.categorias w,\n appexamenisw2.beneficio__estudiantes v\n where z.id = v.estudiante_id\n and y.id = v.beneficio_id\n and w.id = y.categoria_id\n group by z.id,z.nombre, z.identificacion, z.id, z.estado_excluido, y.descripcion,w.categoria\n order by z.id;\";\n\n $arrayDetalles = DB::connection('mysql')->select($sql);\n $ab = array();\n $ab = $arrayDetalles;\n foreach($ab as $t){\n $t->aeo = Crypt::decrypt($t->aeo);\n $t->alim = Crypt::decrypt($t->alim);\n $t->pare = Crypt::decrypt($t->pare);\n //$t->categoria = Crypt::decrypt($t->categoria);\n //$t->monto = Crypt::decrypt($t->monto);\n //return $t->monto;\n }\n return json_encode($ab);\n }" ]
[ "0.7121118", "0.7032738", "0.66960555", "0.6680659", "0.6623892", "0.6619089", "0.65787786", "0.65642756", "0.652367", "0.6519367", "0.65161127", "0.6511925", "0.649565", "0.6463777", "0.64018697", "0.63732517", "0.6353531", "0.6333449", "0.6327856", "0.63276976", "0.63235223", "0.63162774", "0.6303735", "0.6300521", "0.6300272", "0.6300272", "0.6290618", "0.62902087", "0.628265", "0.6282549", "0.6279342", "0.6266206", "0.6260173", "0.6256603", "0.62543136", "0.62339264", "0.6233855", "0.6233709", "0.6224527", "0.622254", "0.6212642", "0.619489", "0.6188511", "0.61864305", "0.61825114", "0.617", "0.61605257", "0.6160048", "0.61534417", "0.6151557", "0.6150163", "0.61478496", "0.6143693", "0.6141663", "0.61416525", "0.6137749", "0.61369276", "0.6135247", "0.6130778", "0.6118942", "0.61183363", "0.61176443", "0.6117146", "0.6116335", "0.6114346", "0.6103915", "0.6103775", "0.60983926", "0.6091791", "0.60915077", "0.60882074", "0.6087804", "0.60870874", "0.60775584", "0.6076364", "0.6070208", "0.60695666", "0.60672003", "0.60660946", "0.606447", "0.60613424", "0.6059717", "0.6059454", "0.60585964", "0.60532415", "0.6053038", "0.6050807", "0.60504115", "0.6044644", "0.6040289", "0.6033458", "0.60284656", "0.60274595", "0.6026701", "0.6024119", "0.6023707", "0.60222054", "0.6021408", "0.6020156", "0.6019028", "0.60149056" ]
0.0
-1
nacita vse o sluzbach
private function selectServicesAll($scheduler){ $result = $scheduler->adminLoadAllService(); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valorpasaje();", "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}", "public function AggiornaPrezzi(){\n\t}", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\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 }", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "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 uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "public function obtenerViajesplus();", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "public function obtenerViajesplusAbonados();", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "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 valordelospasajesplus();", "public function masodik()\n {\n }", "abstract public function getPasiekimai();", "public static function Znevalidni_kolize_ucastnika_formulare($iducast,$formular) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and s_typ_kolize.formular='\" . $formular . \"' and uc_kolize_table.valid\" ;\r\n \r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika_formulare: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n \r\n while($zaznam_kolize = $sth->fetch()) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "public function oceniPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3);\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanje= $predvidjanjeModel->dohvati_predvidjanja_id($predvidjanjeId); \n $ocena=$_POST[$predvidjanjeId];//pretpostavljam da ce tako biti najlakse dohvatiti, slovbodno promeniti\n $oceniModel=new DajeOcenuModel();\n \n if ($oceniModel->vec_dao_ocenu($korisnik->IdK, $predvidjanje->IdP) || date(\"Y-m-d H:i:s\")>$predvidjanje->DatumEvaluacije)\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n \n \n $predvidjanjeModel->daje_ocenu($predvidjanje->IdP, $ocena);\n $posl_id=$oceniModel->poslednji_vestackiId();\n $oceniModel->daje_ocenu($korisnik->IdK, $predvidjanje->IdP, $ocena, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\n }", "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}", "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 }", "public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\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 cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "public function voliPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3); //slobodno promeniti nacin dohvatanja, poenta je da mi treba predvidjanje koje je voljeno\n $voliModel=new VoliModel();\n if ($voliModel->vec_voli($korisnik->IdK, $predvidjanjeId))\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanjeModel->voli($predvidjanjeId, true);\n $posl_id=$voliModel->poslednji_vestackiId();\n $voliModel->voli($korisnik->IdK, $predvidjanjeId, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "function cariPosisi($batas){\nif(empty($_GET['halhasillulusadministrasi'])){\n\t$posisi=0;\n\t$_GET['halhasillulusadministrasi']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasillulusadministrasi']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\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 static function odstraniArtikelIzKosarice() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function traerCualquiera()\n {\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function hitungDenda(){\n\n return 0;\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}", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "function rejestruj($nazwa_uz, $email, $haslo) {\r\n// zwraca true lub komunikat o b��dzie\r\n\r\n // po��czenie z baz� danych\r\n $lacz = lacz_bd();\r\n\r\n // sprawdzenie, czy nazwa u�ytkownika nie powtarza si�\r\n $wynik = $lacz->query(\"select * from uzytkownik where nazwa_uz='\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n throw new Exception('Wykonanie zapytania nie powiod�o si�.');\r\n }\r\n\r\n if (@ $lacz->num_rows>0) {\r\n throw new Exception('Nazwa u�ytkownika zaj�ta � prosz� wr�ci� i wybra� inn�.');\r\n }\r\n\r\n // je�eli wszystko w porz�dku, umieszczenie w bazie danych\r\n $wynik = $lacz->query(\"insert into uzytkownik values\r\n ('\".$nazwa_uz.\"', sha1('\".$haslo.\"'), '\".$email.\"')\");\r\n if (!$wynik) {\r\n throw new Exception('Rejestracja w bazie danych niemo�liwa � prosz� spr�bowa� p�niej.');\r\n }\r\n\r\n return true;\r\n}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function control_suplente($desde,$hasta,$id_desig_suplente){\n //busco todas las licencias de la designacion que ingresa\n //novedades vigentes en el periodo\n $anio=date(\"Y\", strtotime($desde)); \n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n $sql=\"SELECT distinct t_n.desde,t_n.hasta \n FROM novedad t_n\n WHERE t_n.id_designacion=$id_desig_suplente\n and t_n.tipo_nov in (2,3,5)\n and t_n.desde<='\".$udia.\"' and t_n.hasta>='\".$pdia.\"'\"\n . \" ORDER BY t_n.desde,t_n.hasta\"; \n $licencias=toba::db('designa')->consultar($sql);\n $i=0;$seguir=true;$long=count($licencias);$primera=true;\n while(($i<$long) and $seguir){\n if($primera){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n $primera=false;\n }else{\n if($desde>=$licencias[$i]['desde']){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n }\n if($hasta<=$licencias[$i]['hasta']){\n $seguir=false;\n }\n \n if(($licencias[$i]['desde']==date(\"Y-m-d\",strtotime($b.\"+ 1 days\"))) or ($licencias[$i]['desde']==$b)){\n $b=$licencias[$i]['hasta'];\n }\n }\n $i++;\n }\n if($long>0){\n if($desde>=$a and $hasta<=$b){\n return true;\n }else{\n return false;\n }\n }else{//no tiene novedades\n return false;\n }\n\n// $sql=\"select * from designacion t_d\"\n// . \" INNER JOIN novedad t_n ON (t_d.id_designacion=t_n.id_designacion and t_n.tipo_nov in (2,3,5) )\"\n// . \" where t_d.id_designacion=$id_desig_suplente\"\n// . \" and '\".$desde.\"'>=t_n.desde and '\".$hasta.\"'<=t_n.hasta\";\n// $res=toba::db('designa')->consultar($sql);\n// if(count($res)>0){\n// return true;\n// }else{\n// return false;\n// }\n }", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "public function zahtev_za_prijavu()\n {\n if(!$this->validate(['uname'=>'required|min_length[5]|max_length[30]', 'pword'=>'required|min_length[8]|max_length[20]']))\n return $this->prijava($this->validator->getErrors());\n $pwordhash = hash(\"sha256\",$this->request->getVar('pword'));\n $km = new korisnikModel();\n $korisnici = $km->pretraga_kIme($this->request->getVar('uname'));\n if(count($korisnici)==1)\n {\n if($korisnici[0]->sifra==$pwordhash)\n {\n if($korisnici[0]->tipKorisnika<3)\n {\n $tipK = ['Administrator','Predstavnik','Kupac'];\n $sessiondata=['idK'=>$korisnici[0]->idKorisnik,\n 'tipK'=>$tipK[$korisnici[0]->tipKorisnika]];\n $this->session->set($sessiondata);\n }\n if($korisnici[0]->tipKorisnika==0) return redirect()->to(site_url('Administrator/index'));\n else if($korisnici[0]->tipKorisnika==1) return redirect()->to(site_url('Predstavnik/index'));\n else if($korisnici[0]->tipKorisnika==2) return redirect()->to(site_url('Kupac/index'));\n else return $this->prijava('Administrator jos uvek nije odobrio zahtev');\n }\n return $this->prijava('Sifra nije ispravna');\n }\n return $this->prijava('Korisnik sa tim imenom ne postoji');\n }", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}", "public function correu(){\n echo \" correu !\";\n }", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "public function contrato()\r\n\t{\r\n\t}", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "public function sankcionisi_korisnika()\n {\n\n $sankcionisaniIme= $this->request->getVar('korisnik');\n $kazna=$this->request->getVar('kazna');\n // echo $sankcionisaniIme;\n //echo $kazna;\n $admin= $this->session->get(\"korisnik\");\n $sankcionisaniIme= $this->request->getVar('korisnik');//ili na bilo koji drugi nacin dohvatanje\n $kazna=$this->request->getVar('kazna');//ili na bilo koji drugi nacin dohvatanje\n $korisnikModel=new KorisnikModel();\n $sankcionisani=$korisnikModel->dohvati_korisnika($sankcionisaniIme);\n $korisnikModel->sankcionisi($sankcionisani, $kazna);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function usun() {\n\t\t$baza = polacz_z_baza();\n\n\t\tif(!isset($_POST['student_id'])) {\n\t\t\techo \"Błędnie wywołany formularz<br>\";\n\t\t\treturn;\n\t\t}\n\t\t$zapytanie = \"DELETE FROM `studenci` WHERE `id` = \".$_POST['student_id'];\n\t\t$wynik = mysqli_query($baza, $zapytanie);\n\n\t\tif($wynik)\n\t\t\techo \"Student został usunięty z bazy<br>\";\n else \n\t\t\techo \"Błąd podczas próby usunięcia studenta z bazy (\".mysql_error().\")<br>\";\n\n\t\tzakoncz_polaczenie($baza);\n\t}", "public function cortesia()\n {\n $this->costo = 0;\n }", "public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }", "function pobierz_studentow() {\n\t\t$baza = polacz_z_baza();\n\n\t\t$zapytanie = 'select * from studenci';\n\t\t$wynik = mysqli_query($baza, $zapytanie);\n\n\t\tzakoncz_polaczenie($baza);\n\n\t\treturn $wynik;\n\t}", "public static function Najdi_kolize_pro_formular ($iducast, $formular ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n //echo(\"<br>\" . $formular . \"<br>\");\r\n //var_dump ($kolize_pole);\r\n return $kolize_pole; \r\n}", "public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }", "public function getUcenike($skola){\n\t\t\t$this->db->where('skolaId',$skola);\n\t\t\t$ucenik = $this->db->get(\"ucenik\");\n\t\t\treturn $ucenik;\n\t\t}", "public function iloscMinus($id)\n\t\t{\n\t\t\t$data = array();\n\t\t\t\tif($id === NULL || $id === \"\")\n\t\t\t\t\t$data['error'] = 'Nieokreślone ID!';\n\t\t\t\telse\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$stmt2 = $this->pdo->prepare('SELECT IdTowar, ilosc FROM `koszyk` where IdTowar=:id');\n\t\t\t\t\t\t$stmt2 -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t$ilosc = $stmt2 -> execute();\n\t\t\t\t\t\t$data = $stmt2 -> fetchAll();\n\t\t\t\t\t\tforeach($data as $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilosc = $result['ilosc'];\n\t\t\t\t\t\t\t$idt = $result['IdTowar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($ilosc>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $id.'<br>towary: ';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['idtowary']);\n\t\t\t\t\t\t\t$stmt = $this->pdo->prepare('UPDATE koszyk SET ilosc=ilosc-1 WHERE IdTowar=:id');\n\t\t\t\t\t\t\t$stmt -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t\t$wynik_zapytania = $stmt -> execute();\n\n\t\t\t\t\t\t\t$stmt2 = $this->pdo->prepare(\"update towar set towar.StanMagazynowyDysponowany = towar.StanMagazynowyDysponowany+1 where IdTowar = $idt\");\n\t\t\t\t\t\t\t$stmt2 -> execute();\n\n\t\t\t\t\t\t\t$cookie2 = $_COOKIE['idtowary'];\n\t\t\t\t\t\t\t$cookie2 = stripslashes($cookie2);\n\t\t\t\t\t\t\t$ids = json_decode($cookie2, true);\n\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// echo 'nie ma';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t //echo 'jest';\n\t\t\t\t\t\t\t $indeks = array_search($idt, $ids);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cookie = $_COOKIE['ilosci'];\n\t\t\t\t\t\t\t$cookie = stripslashes($cookie);\n\t\t\t\t\t\t\t$quantity = json_decode($cookie, true);\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false){}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<br>ilosci ';\n\t\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t\t\t$ilosc=$ilosc-1;\n\t\t\t\t\t\t\t $quantity[$indeks]=$ilosc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dane = json_encode($quantity);\n\t\t\t\t\t\t\tsetcookie('ilosci', $dane,time()+60*60*24*30,'/');\n\t\t\t\t\t\t\t$_COOKIE['ilosci'] = $dane;\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(\\PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['error'] =$data['error'].'<br> Błąd wykonywania operacji usunięcia';\n\t\t\t\t\t}\n\t\t\t\t\t/*var_dump($_COOKIE['idtowary']);\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\techo '<br>';*/\n\t\t\t\treturn $data;\n\n\t\t}", "public function pasaje_abonado();", "public function nahrajUzivatele(){\t\t\t\n\t\t\t$dotaz = \"SELECT uzivatelID,uzivatelJmeno,uzivatelHeslo FROM `tabUzivatele` WHERE 1 \";\n\t\t\t\n\t\t\t\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(\"Pri nahravani dat nastala chyba!\" . 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$jmeno = $radek[\"uzivatelJmeno\"];\n\t\t\t\t$heslo = $radek[\"uzivatelHeslo\"];\n\t\t\t\t\n\t\t\t\t$uzivatel = new uzivatelObjekt($jmeno,$heslo);\n\t\t\t\t\n\t\t\t\t$uzivatel->uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$uzivatel); \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 pobierz_urle_uzyt($nazwa_uz) {\r\n // pobranie z bazy danych wszystkich URL-i danego u�ytkownika\r\n $lacz = lacz_bd();\r\n $wynik = $lacz->query(\"select URL_zak\r\n from zakladka\r\n where nazwa_uz = '\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n return false;\r\n }\r\n\r\n // tworzenie tablicy URL-i\r\n $tablica_url = array();\r\n for ($licznik = 0; $rzad = $wynik->fetch_row(); ++$licznik) {\r\n $tablica_url[$licznik] = $rzad[0];\r\n }\r\n return $tablica_url;\r\n}", "function testEntier($valeur){\r\n for($i=0;$i<laTaille($valeur);$i++){\r\n if(($valeur[$i]>=0) && !($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\")){\r\n $retour[$i] = \"vrai\";\r\n }\r\n else{\r\n $retour[$i] = \"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($valeur) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($valeur)){\r\n $retourFinal = \"vrai\";\r\n }\r\n else{\r\n $retourFinal = \"faux\";\r\n }\r\n return $retourFinal;\r\n }", "public static function vratiSve($db){\n \n \n // $result = $db->query('SELECT *,((i.datumDo - i.datumOd)*i.cenaPoDanu) as ukupnaCena FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n $result = $db->query('SELECT * FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n \n\n\n $iznajmljivanja = array();\n\n while($row = $result->fetch_assoc()) { \n // $tip = new TipVozila();\n // $tip->tipID= $row['tipID'];\n // $tip->nazivTipa= $row['nazivTipa'];\n\n\n $vozilo = new Vozilo();\n $vozilo->voziloID= $row['voziloID'];\n $vozilo->model= $row['model'];\n $vozilo->marka= $row['marka'];\n $vozilo->regBr= $row['regBr'];\n // $voziloPom->tipVozila = $tip;\n\n $korisnik= new Korisnik();\n $korisnik->korisnikID= $row['korisnikID'];\n $korisnik->ime = $row['ime'];\n $korisnik->prezime = $row['prezime'];\n\n $iznajmljivanje = new Iznajmljivanje();\n $iznajmljivanje->iznajmljivanjeID = $row['iznajmljivanjeID'];\n $iznajmljivanje->vozilo = $vozilo;\n $iznajmljivanje->korisnik = $korisnik;\n $iznajmljivanje->datumOd = $row['datumOd'];\n $iznajmljivanje->datumDo = $row['datumDo'];\n $iznajmljivanje->cenaPoDanu = $row['cenaPoDanu'];\n // $ukupnaCena = $row['ukupnaCena'];\n\n array_push($iznajmljivanja, $iznajmljivanje); \n }\n\n return $iznajmljivanja;\n}", "public function index($id){\n\t\t$po_prostu_pokaz = true;\n\t\t$user = $this->session->zalogowany;\n\t\tif($dane = $this->baza->czy_zlecenie_istnieje($id)){\n\t\t\t$dane[0]->nick = $this->baza->daj_nick($dane[0]->zlecajacy_id);\n\t\t\t$prace = $this->baza->prace();\n\t\t\t$aktualna_data = date('Y-m-d');\n\t\t\t$aktualna_godzina = date('H:i');\n\t\t\tif($this->baza->czy_zlecenie_aktualne($id,$aktualna_data,$aktualna_godzina)){\n\t\t\t\t//zlecenie aktualne\n\t\t\t\tif($user != null){\n\t\t\t\t\tif($dane[0]->zlecajacy_id != $user){\n\t\t\t\t\t\t//nie jesteś zlecającym\n\t\t\t\t\t\t$zwyciezca = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($zwyciezca)==0){\n\t\t\t\t\t\t\t//jeszcze nie wybrano zwycięzcy\n\t\t\t\t\t\t\tif(!$this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//nie zgłosiłeś się jeszcze\n\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t$zgloszenie = $this->input->post('zlecenie_zgloszenie');\n\t\t\t\t\t\t\t\tif($zgloszenie != null){\n\t\t\t\t\t\t\t\t\t//wyświetl komunikat informujący o poprawnym zgłoszeniu się\n\t\t\t\t\t\t\t\t\t$this->baza->dodaj_zgloszenie($id,$user);\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>1));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//wyswietl widok z możliwością zgłoszenia się do niego\n\t\t\t\t\t\t\t\t\t//aktualne - true,jestes_zlecajacym=false,zgloszono_sie=false\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//wybrano zwycięzcę\n\t\t\t\t\t\t\tif($this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//zgłoszono się\n\t\t\t\t\t\t\t\tif($this->baza->czy_wygrales_zlecenie($id,$user)){\n\t\t\t\t\t\t\t\t\t//jesteś zwycięzcą\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$status = $zwyciezca[0]->status;\n\t\t\t\t\t\t\t\t\tif($status == 0){\n\t\t\t\t\t\t\t\t\t\t//zostałeś wybrany przez zlecającego\n\t\t\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t\t$podjecie = $this->input->post('zlecenie_podjecie');\n\t\t\t\t\t\t\t\t\t\tif($podjecie != null){\n\t\t\t\t\t\t\t\t\t\t\t//komunikat o pomyślnym podjęciu się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->baza->potwierdz_podjecie($id);\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>1));\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//strona z możliwością potwierdzenia podjecia się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>0));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//zalogowany jest zlecajacym\n\t\t\t\t\t\t$jestes_zlecajacym = true;\n\t\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($dane_zwyciezcy)==0){\n\t\t\t\t\t\t\t//nie wybrano zwycięzcy\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$wybrany = $this->input->post('zlecenie_zwyciezca');\n\t\t\t\t\t\t\tif($wybrany != null){\n\t\t\t\t\t\t\t\t$this->baza->wybierz_zwyciezce($id,$wybrany);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//wyświetl listę zgłoszeń\n\t\t\t\t\t\t\t\t//daj możliwość wybrania jednego\n\t\t\t\t\t\t\t\t$zgloszenia = $this->baza->lista_zgloszen($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>$zgloszenia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//zlecenie po czasie wykonania\n\t\t\t\t$user = $this->session->zalogowany;\n\t\t\t\tif($dane[0]->zlecajacy_id == $user){\n\t\t\t\t\t//jesteś zleceniodawcą\n\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\tif(count($dane_zwyciezcy)>0){\n\t\t\t\t\t\t//ktoś wygrał\n\t\t\t\t\t\t$status = $dane_zwyciezcy[0]->status;\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość potwierdzenia wykonania\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$potwierdzono = $this->input->post('zlecenie_potwierdzenie');\n\t\t\t\t\t\t\tif($potwierdzono != null){\n\t\t\t\t\t\t\t\t$this->baza->potwierdz_wykonanie($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'potwierdzenie'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if($status == 2){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość ocenienia\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$ocena = $this->input->post('zlecenie_ocena');\n\t\t\t\t\t\t\t$komentarz = $this->input->post('zlecenie_komentarz');\n\t\t\t\t\t\t\tif($ocena != null && $komentarz != null){\n\t\t\t\t\t\t\t\t$this->baza->ocen($id,$dane_zwyciezcy[0]->zglaszajacy_id,$ocena,$komentarz);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($po_prostu_pokaz){\n\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->load->view('blad',array('komunikat'=>'Nie ma takiego zlecenia!'));\n\t\t}\n\t}", "public function neVoliPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3); //slobodno promeniti nacin dohvatanja, poenta je da mi treba predvidjanje koje je voljeno\n $voliModel=new VoliModel();\n if ($voliModel->vec_voli($korisnik->IdK, $predvidjanjeId))\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanjeModel->voli($predvidjanjeId, false);\n $posl_id=$voliModel->poslednji_vestackiId();\n $voliModel->voli($korisnik->IdK, $predvidjanjeId, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\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}", "function usun_potwierdz() {\n\t\tif(!isset($_POST['student_id'])) {\n\t\t\techo \"Błędnie wywołany formularz<br>\";\n\t\t\treturn;\n\t\t}\n\t\t$baza = polacz_z_baza();\n\n\t\t$zapytanie = 'SELECT * FROM studenci WHERE `id`='.$_POST['student_id'];\n\t\t$wynik = mysqli_query($baza, $zapytanie);\n\t\t$line = mysqli_fetch_array($wynik);//powinien istniec tylko tylko jeden znaleziony rekord\n\n\t\techo \"<div>Czy na pewno chcesz usunąć studenta: <i>\".\n\t\t\t$line['imie'].\" \".$line['nazwisko'].\" (nr indeksu: \".$line['nr_indeks'].\")</i> ?</div>\";\n\n\t\t//potwierdzenie\n\t\techo \"<form action='index.php?id=52' method='POST' style='display: inline-block;'>\n\t\t\t\t<input type='hidden' value='\".$_POST['student_id'].\"' name='student_id' />\n\t\t\t\t<input type='submit' value='Potwierdź usuwanie' />\n\t\t\t</form>\";\n\n\t\t//anulowanie\n\t\techo \"<form action='index.php?id=5' method='POST' style='display: inline-block;'>\n\t\t\t\t<input type='submit' value='Anuluj' />\n\t\t\t</form>\";\n\n\t\tzakoncz_polaczenie($baza);\n\t}", "public function nadar()\n {\n }", "public function elso()\n {\n }", "function fTraeAuxiliar($pTip, $pCod){\n global $db, $cla, $olEsq;\n $slDato= substr($olEsq->par_Clave,4,2);\n if ($slDato == \"CL\") { // el movimiento se asocia al Cliente\n $iAuxi = $cla->codProv;\n }\n else {\n $iAuxi = NZ(fDBValor($db, \"fistablassri\", \"tab_txtData3\", \"tab_codTabla = '\" . $pTip . \"' AND tab_codigo = '\" . $pCod . \"'\" ),0);\n }\n//echo \"<br>aux\" . $olEsq->par_Clave. \" / \" .$slDato . \" $iAuxi <br>\";\n error_log(\" aux: \" . $iAuxi. \" \\n\", 3,\"/tmp/dimm_log.err\");\t\n return $iAuxi;\n}", "public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }", "public static function prijavi($upime, $geslo)\n\t{\n\t\t$db = Db::getInstance();\n\t\t//začnemo sejo, dobimo podatke iz PB (recimo ka nemreta meti istoga imena, kak je že v večini primerov gnesden)\n\t\t//Db::sessionStart();\n\t\t$result = mysqli_query($db, \"SELECT ID, upime, geslo FROM oseba WHERE upime='$upime'\");\n\t\n\t\t$row = mysqli_fetch_array($result);\n\t\t//tu dobimo isti hash, s kerin smo koderali (ali kak se tumi pravi) geslo, zato ka ga te v if stavki ponucamo za primerjavo\n\t\t\n\t\t//primerjamo podatke keri so v bazi pa vpisani podatki, password_verify pa je kak san že prej napisao za primerjavo vpisanoga gesla pa hash_gesla iz baze\n\t\tif($row[1] == $upime && password_verify($geslo, $row[2]))\n\t\t{\n\t\t\t//če smo vpisali prave podatke, shranimo v sejo ID uporabnika (mogoče bi ime?)\n\t\t\t$_SESSION[\"id\"]=$row[0];\n\t\t\t//dobimo id, pa zovemo uspesnaPrijava.php v keroj izpišemo ka smo se prijavili, pa povezava do \"home\" je not\n\t\t\t//$oseba = Oseba::najdi($row[0]);\n\t\t\t$query = mysqli_query($db, \"INSERT INTO osebaAktivna (osebaID) VALUES ('$row[0]')\");\n\t\t\t\n\t\t\terror_reporting(E_ALL);\n\t\t require_once('views/osebe/uspesnaPrijava.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//če nejsmo vnesli pravih podatkov, zovemo stran napakaPrijava.php, v keroj je izpis o ton ka smo napačne podatki dali, pa link za nazaj (torej na stran prijavi.php)\n\t\t require_once('views/osebe/napakaPrijava.php');\n\t\t}\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "public function accueil()\n {\n }", "public static function Najdi_kolize_pro_formular_a_lokaci ($iducast, $formular, $lokacekolize ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE lokace_kolize='\" . $lokacekolize . \"' and formular='\" . $formular . \"' and valid\" ;\r\n //echo \"<br>\" . $query;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n //var_dump ($kolize_pole);\r\n \r\n return $kolize_pole; \r\n}", "public function odgovoriNaPitanje($idPitanje = null) {\n $controller = session()->get('controller');\n\n if ($idPitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // ako je nepostojeci id treba vratiti korisnika na pocetnu stranu\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n if ($pitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // koje sve poruke mogu da se prikazu korisniku\n $porukaTekstOdgovora = null;\n $porukaNemaPravaDaOdgovori = null;\n\n // provera da li je unet tekst odgovora posto je obavezno polje\n if (!$this->validate(['TekstOdgovora' => 'required'])) {\n $porukaTekstOdgovora = \"Morate da unesete tekst odgovora - to je obavezno polje!\";\n }\n\n // provera da li korisnik ima pravo da odgovori na izabrano pitanje\n // ako korisnik nije psiholog a na pitanje smeju samo psiholozi da odgovore potrebno je ispisati poruku korisniku\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n $moguSviDaOdgovore = $pitanje->moguSviDaOdgovore;\n $korisnikModel = new KorisnikModel();\n $idKategorijaKorisnika = $korisnikModel->find(session()->get('userid'))->tipKorisnika_idTipKorisnika;\n // psiholozi su idKategorijaKorisnika=2 \n if ($moguSviDaOdgovore == 0 && $idKategorijaKorisnika != 2) {\n $porukaNemaPravaDaOdgovori = \"Na ovo pitanje imaju pravo samo registrovani psiholozi da odgovore!\";\n }\n\n // ako nije unet tekst odgovora ili korisnik nema prava da odgovori ispisati mu poruke, odbacuje se unos odgovora\n if ($porukaTekstOdgovora != null || $porukaNemaPravaDaOdgovori != null) {\n echo view(\"odgovori_na_pitanje\", ['pitanje' => $pitanje, 'porukaTekstOdgovora' => $porukaTekstOdgovora, 'porukaNemaPravaDaOdgovori' => $porukaNemaPravaDaOdgovori]);\n return;\n }\n\n $odgovorModel = new OdgovorModel();\n $anonimno = $this->request->getVar('anonimus');\n $odgovorModel->save([\n 'pitanje_idPitanje' => $idPitanje,\n 'korisnik_idKorisnik_odgovorio' => session()->get('userid'),\n 'tekstOdgovora' => $this->request->getVar('TekstOdgovora'),\n 'odgovorenoAnonimno' => $anonimno == \"1\" ? true : false\n ]);\n\n $controller = session()->get('controller');\n // kada se sacuva odgovor na pitanje, redirect korisnika na prikaz svih odgovora na to pitanje\n return redirect()->to(site_url(\"$controller/pregledOdgovora?pretraga=$idPitanje\"));\n }", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "public function sortPredvidjanjeNajteze() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najteza_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "function UsunZKolejnosci($Nazwa){\n \n //unset( $this->Kolejnosc[$KolejnoscID]);\n array_pop( $this->Kolejnosc );\n //unset( $this->MapaNazw[$Nazwa]);\n \n }", "function gesuchter_wert($id,$tabelle,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\n\t\tif ($id!=0) {\n\t\t\t$abfrage=\"SELECT `$gesuchte_spalte` FROM `$tabelle` WHERE `ID`=$id\";\n\t\t\t#echo \"Funktion gesuchter_wert bildet SQL-Befehl - \".$abfrage;\n\t\t\tif ($result=$mysqli->query($abfrage)) {\n\t\t\t\twhile ($row=$result->fetch_object()) {\n\t\t\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse {\n\t\t\t$gesuchter_wert=\"N.N.\";\n\t\t}\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}", "function gehituSentsorea($Aid,$sIzena){\n\t\tinclude 'konexioa.inc';\n\t\tmysql_select_db($datuBasea,$link);\n\t\t$query=\"INSERT INTO `Sentsore` (`sid`, `idalarma`, `sizena`, `segoera`) VALUES (\\\"\\\", $Aid, \\\"$sIzena\\\", 1)\";\n\t\t$sentsOK=mysql_query($query,$link);\n \t\tif(mysql_affected_rows()==(-1 || 0)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "private function verrouPoser(){\n\t\t$verrou['etat'] = '';\n\t\tself::verrouSupprimer();\n\t\tif($this->formulaire['cle'] != ''){\n\t\t\t$verrou = self::verrouRechercher();\n\t\t\tif(empty($verrou)){\n\t\t\t\t$verrou = self::verrouInserer();\n\t\t\t\t$verrou['etat'] = 'ok';\n\t\t\t}else{\n\t\t\t\t$verrou['etat'] = 'nok';\n\t\t\t\t$verrou['message'] = \"L'enregistrement \".$verrou['ad_ve_cle'].\" est actuellement verrouillé par \".$verrou['ad_ve_nom'].\" depuis le \".$verrou['ad_ve_date'].\".\\nLes modifications, enregistrement et suppression sont donc impossibles sur cet enregistrement.\";\n\t\t\t}//end if\n\t\t}//end if\n\t\treturn $verrou;\n\t}", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\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 }", "function lupe_vagas($idt_periodo,$municipio,$idt_programa,$cod_programa)\r\n\r\n//p($municipio);\r\n// exit();\r\n\r\n\r\n{\r\n\r\n // p($idt_eve_periodo);\r\n if ($idt_periodo=='')\r\n {\r\n // erro de parâmetro\r\n // exit()\r\n }\r\n //\r\n // Montar select\r\n //\r\n $kselectw = 'select sum(qtd_vagas_turma) as qtd_vagas\r\n from periodo_let_prgr_muni_cur_turma as turma\r\n inner join periodo_letivo pelet on turma.idt_periodo=pelet.idt\r\n inner join periodo peins on pelet.idt_periodo=peins.idt\r\n left join programa pr on turma.programa=pr.codigo';\r\n $kwherew=' where peins.idt='.$idt_periodo.' and pr.codigo='.aspa($cod_programa);\r\n\r\n if ($municipio!='')\r\n {\r\n $kwherew=$kwherew.' and cod_municipio='.aspa($municipio);\r\n }\r\n if ($idt_programa!=-1)\r\n {\r\n // tom $kwherew=$kwherew.' and idt_periodo_let_programa='.$idt_programa;\r\n $kwherew=$kwherew.' and turma.programa='.aspa($cod_programa);\r\n }\r\n $korderbyw=' ';\r\n\r\n\r\n $a=$kselectw.$kwherew.$korderbyw;\r\n\r\n//p($kwherew);\r\n\r\n\r\n// p($a);\r\n// exit();\r\n\r\n $qtd_vagas=0;\r\n\r\n $ktabelaw = execsql($a);\r\n ForEach($ktabelaw->data as $row)\r\n {\r\n $qtd_vagas=$qtd_vagas+$row['qtd_vagas'];\r\n\r\n }\r\n\r\n // p($qtd_vagas);\r\n// exit();\r\n\r\n\r\n return $qtd_vagas;\r\n}", "function verMas()\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $use;\r\n\t\t\tglobal $priv;\r\n\r\n\t\t\t//NOTA: Para ver si funciona tienen que asociarle un adherente en la tabla socios, ya que en los datos de ejemplo todos son titulares\r\n\t\t\t//NOTA: Lo que hice fue: en tabla socios en numero_soc=00044 cambiar el campo soc_titula de manera que quede soc_titula=00277\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t$numero_socio = $_GET['num_soc']; //Es el número del socio titular que debe ser tomado del PASO 1\r\n\t\t\t\r\n\r\n\t\t\t\t$resultadoTitular = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t\t\t\t\t\t FROM socios,persona \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\");\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t\t\tif(!$resultadoTitular)\r\n\t\t\t{\r\n\t\t\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"verMas\",\r\n\t\t\t\t'descripcion'\t=>\"No se encuentra al titular $numero_socio\"\r\n\t\t\t\t];\r\n\t\t\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t///---FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$fecha=$resultadoTitular[0]['fecnacim'];\r\n\t\t\t$dias = explode(\"-\", $fecha, 3);\r\n\t\t\t\r\n\t\t\t// $dias[0] es el año\r\n\t\t\t// $dias[1] es el mes\r\n\t\t\t// $dias[2] es el dia\r\n\t\t\t\r\n\t\t\t// mktime toma los datos en el orden (0,0,0, mes, dia, año) \r\n\t\t\t$dias = mktime(0,0,0,$dias[1],$dias[2],$dias[0]);\r\n\t\t\t$edad = (int)((time()-$dias)/31556926 );\r\n\t\t\t$resultadoTitular[0]['edad']=$edad;\r\n\t\t\t\r\n\t\t\t///---FIN FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$estado[0]='1';\r\n\t\t\t$estado[1]='1';\r\n\t\t\t$estado[2]='1';\r\n\t\t\t$estado[3]='1';\r\n\t\t\t$estado[4]='1';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS SERVICIOS DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t//Por cuota\r\n\t\t\t$resultadoTitularServicios1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\tif(!$resultadoTitularServicios1)\r\n\t\t\t\t$estado[0]='0';\r\n\t\t\t\r\n\t\t\t//Por tarjeta\r\n\t\t\t$resultadoTitularServicios2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.soc_titula \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoTitularServicios2)\r\n\t\t\t\t$estado[1]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR CUOTA----------------\r\n\t\t\t\r\n\r\n\t\t $resultadoAdherentes1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes1)\r\n\t\t\t\t$estado[2]='0';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR TARJETA----------------\r\n\r\n\t\t\t$resultadoAdherentes2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes2)\r\n\t\t\t\t$estado[3]='0';\r\n\t\t\r\n\t\t \r\n\t\t\t//---------------CONSULTA QUE DEVUELVE EL LISTADO DE TODAS LAS ASISTENCIAS----------------\r\n\t\t\t\r\n\t\t\t//NOTA: Para que puedan ver si funciona o no hacer la prueba con el siguiente ejemplo:\r\n\t\t\t// En la tabla fme_asistencia modifiquen en cualquier lado y pongan alguno con doctitu = 06948018 (o busquen cualquier DNI de un socio titular y usen ese)\r\n\t\t\t// Cuando prueben el sistema vayan al ver más de Barrionuevo Samuel y van a ver el listado de atenciones que tiene asociado\r\n\t\t\t\r\n\t\t\t$asistencias = $GLOBALS['db']->select(\"SELECT fme_asistencia.doctitu, fme_asistencia.numdoc, fme_asistencia.nombre,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.fec_pedido, fme_asistencia.hora_pedido, fme_asistencia.dessit, fme_asistencia.fec_ate,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.sintomas, fme_asistencia.diagnostico, fme_asistencia.tratamiento, fme_asistencia.hora_aten,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.profesional\r\n\t\t\t\t\t\t\t\t\t FROM fme_asistencia, socios, persona \r\n\t\t\t\t\t\t\t\t\t WHERE soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND numero_soc = soc_titula\r\n\t\t\t\t\t\t\t\t\t AND persona.numdoc = fme_asistencia.doctitu\");\r\n\t\t\t\r\n\t\t\tif(!$asistencias)\r\n\t\t\t\t$estado[4]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\techo $GLOBALS['twig']->render('/Atenciones/perfil.html', compact('resultadoTitular', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios1', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios2', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes2',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'asistencias',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'estado','use','priv'));\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "function gesuchtes_feld($angabe,$tabelle,$gegebene_spalte,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\n\t$abfrage=\"SELECT `$gesuchte_spalte` FROM `$tabelle` WHERE `$gegebene_spalte`='$angabe'\";\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t\t}\n\t\t}\t\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}", "public function zpracuj($parametry) {\r\n $akce = \"new\";\r\n\r\n // bude-li odeslano take z formulare ma _POST prednost pred URL\r\n if (isset($_POST['akce'])&& (!empty($_POST['akce']))) {\r\n $akce = $_POST['akce'];\r\n } else {\r\n if (isset($parametry[0]) and in_array($parametry[0], ObjektKontroler::$typakce))\r\n $akce = $parametry[0];\r\n };\r\n\r\n if ((!isset($_POST['list'])) and isset($parametry[1]))\r\n $_POST['list'] = $parametry[1];\r\n\r\n\t\t//Debug::p($akce);\r\n\r\n $this->pohled = 'nabidka'; // Nastavení implicitni šablony\r\n // Hlavička stránky\r\n $this->hlavicka['titulek'] = 'Editor nabidky';\r\n $nab = new NhlavickaClass();\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka XY\";\r\n\t\t$nab->data[\"id\"] = $nab->insert($nab->data);\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka \".$nab->data[\"id\"] ;\r\n // Byl odeslán formulář\r\n if ($akce == \"new\") {\r\n\t\t\tif ( empty($_POST['list'])){\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//je to seznam objektu oddelenych carkou \"15,12,78\"\r\n\t\t\t\t$polozky = explode(\",\",$_POST['list']);\r\n\t\t\t\tforeach ($polozky as $polID){\r\n\t\t\t\t\t$obj = new ObjektClass();\r\n\t\t\t\t\t$obj->get($polID);\r\n\t\t\t\t\t$pol = new NpolozkaClass();\r\n\t\t\t\t\t$pol->setByObjekt($obj);\r\n\t\t\t\t\t$pol->insert();\r\n\t\t\t\t}\r\n\t\t\t}\r\n $this->data = $nab->data; // Proměnné pro šablonu\r\n $this->data['titulek'] = 'Nová nabídka';\r\n\t\t\t// po odeslani formulare uloz\r\n $this->data['akce'] = 'insert';\r\n\t\t\t// $akce = 'insert'; // po odeslani formulare uloz\r\n }\r\n\r\n if ($akce == \"view\") {\r\n $nab->get($parametry[1]);\r\n $nab->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $nab->data), $nab->data);\r\n $this->data = $nab->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Detail nabídky ' . $nab->data['nazev'];\r\n Zprava::zobraz('Objekt k detailu byl vybrán');\r\n $this->pohled = 'DetailObjekt';\r\n }\r\n if ($akce == \"ObnovSkryj\") {\r\n DB::proved(\"UPDATE objekt SET status = (- status) WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl zneplatněn');\r\n $this->presmeruj('/objekt/edit/' . $parametry[1]);\r\n }\r\n if ($akce == \"delete\") {\r\n DB::proved(\"DELETE FROM obr WHERE id_objekt= ? \", array($parametry[1]));\r\n\t\t\tDB::proved(\"DELETE FROM objekt WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl smazán');\r\n $this->presmeruj('/');\r\n }\r\n\r\n\r\n if ($akce == \"insert\") {\r\n\r\n $nab->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $nab->data['status'] = 1;\r\n $this->data = $nab->data;\r\n // zaloz noveho\r\n $this->data['objekt_id'] = $nab->insert($nab->data);\r\n $this->data['titulek'] = 'Editace objektu';\r\n // budu ho pak editovat\r\n $this->data['akce'] = 'edit';\r\n Zprava::zobraz('Objekt byl založen');\r\n $this->presmeruj('/nabidka/edit/' . $this->data['id']);\r\n }\r\n\r\n if ($akce == \"edit\") {\r\n //najdu objekt podle objekt_id\r\n $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $obj->data), $obj->data);\r\n $this->data = $obj->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl vybrán');\r\n }\r\n if ($akce == \"save\") {\r\n\t\t\t//najdu objekt podle objekt_id\r\n\t\t\t// $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $this->data = $obj->data;\r\n $obj->data['status'] = 2;\r\n $obj->update($obj->data);\r\n $this->data['akce'] = 'edit';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl upraven');\r\n\t\t\t// //pridam obrazky udelam to pres Ajax\r\n\t\t\t// $img = new ObrClass();\r\n\t\t\t// $img->data['id_objekt'] = $obj->data['objekt_id'];\r\n\t\t\t// $img->insertFILES();\r\n $this->presmeruj('/nabidka/edit/' . $this->data['objekt_id']);\r\n }\r\n\r\n if ($akce == \"seznam\") {\r\n //seznam vsech objektu\r\n $obj->select( ' status >= ? ', Array(0) );\r\n // Debug::p($obj);\r\n $this->data['seznam'] = $obj->data;\r\n $this->data['akce'] = 'seznam';\r\n $this->data['titulek'] = 'Seznam objektů';\r\n Zprava::zobraz('Vybráno ' . count($this->data['seznam']) . ' objektů');\r\n // $this->presmeruj('/objekt');\r\n $this->pohled = 'objekty';\r\n if (isset($parametry[1]) and $parametry[1] === 'T')\r\n $this->pohled = 'objektyTab';\r\n }\r\n }", "public function kumpul(){\r\n\t\t$no_tim=$this->session->userdata('no_tim');\r\n\t\t$soal = $this->input->post('soal');\r\n\t\tforeach ($soal as $key => $value) {\r\n\t\t\t$query = $this->Mysql->read('soal', array('no_soal'=>$value), 'no_soal', 'ASC', null, null)->row_array();\r\n\t\t\tif ($query['jawaban_benar']==$this->input->post('jawaban_'.$value)) {\r\n\t\t\t\t$isBenar = 1;\r\n\t\t\t}else{\r\n\t\t\t\t$isBenar = 0;\r\n\t\t\t}\r\n\t\t\t$data = array(\r\n\t\t\t\t\t'no_tim'=>$this->session->userdata('no_tim'),\r\n\t\t\t\t\t'no_soal'=>$value,\r\n\t\t\t\t\t'jawab'=>$this->input->post('jawaban_'.$value),\r\n\t\t\t\t\t'is_benar'=>$isBenar\r\n\t\t\t\t);\r\n\t\t\t$update = $this->Mysql->create('ljk',$data);\r\n\t\t}\r\n\t\tredirect(site_url('tim'), 'refresh');\r\n\t}", "public function existujeKolizna()\n {\n // hlada nasledovne kolizne pripady:\n // - existuje zaciatok nejakeho obdobia v nasom\n // - existuje koniec nejakeho obdobia v nasom\n // - nejake obdobie kompletne prekryva nase obbodie\n // pricom vzdy sa ignoruje nase obdobie (kvoli update ktory by bol kolizny so sebou)\n // a zaroven nie su kolizie ak bezi vaicero akcii na viacero inych semestrov\n $sql =\n \"SELECT id, \".\n DateConvert::DBTimestampToSkDateTime(\"zaciatok\"). \" AS zaciatok, \".\n DateConvert::DBTimestampToSkDateTime(\"koniec\"). \" AS koniec\n\t\t\tFROM rozvrhova_akcia\n\t\t\t WHERE \n\t\t\t \t((zaciatok>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t zaciatok<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\t\n\t\t\t \t(koniec>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\n\t\t\t \t(zaciatok<=\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec>=\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\")) AND\n\t\t\t \t id_semester=$3\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester);\n // ak je edit TREBA aj vylucit koliziu so sebou\n if (!empty($this->id))\n {\n $sql .= \" AND id<>$4\";\n $params[] = $this->id;\n }\n $this->dbh->query($sql, $params);\n\n if ($this->dbh->RowCount()>0)\n {\n $kolizia = $this->dbh->fetch_assoc();\n return \"{$kolizia[\"zaciatok\"]} - {$kolizia[\"koniec\"]}\";\n } else return null;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }" ]
[ "0.70428383", "0.6815604", "0.67527896", "0.67498994", "0.6693766", "0.6678844", "0.6621182", "0.6617279", "0.65369576", "0.65358853", "0.64657897", "0.6455418", "0.6453334", "0.64334923", "0.6391967", "0.6363233", "0.63605577", "0.631687", "0.6279471", "0.62777925", "0.6273802", "0.6255134", "0.6227293", "0.62235993", "0.62218773", "0.62173235", "0.62084687", "0.6206817", "0.61939603", "0.6177402", "0.61701745", "0.61584413", "0.615118", "0.6145622", "0.6144842", "0.61394817", "0.61253536", "0.6115478", "0.60888857", "0.60868394", "0.6086043", "0.6077943", "0.60738724", "0.60676265", "0.60598415", "0.6056837", "0.6040323", "0.6032931", "0.6032769", "0.6027275", "0.60113215", "0.6007633", "0.6007373", "0.60052353", "0.6004647", "0.6002201", "0.6001533", "0.5997689", "0.5994152", "0.5993988", "0.59890795", "0.59815", "0.5973868", "0.5973862", "0.59653336", "0.59642994", "0.5955693", "0.5942549", "0.59391487", "0.59358156", "0.59352654", "0.59352654", "0.5922445", "0.5918713", "0.59179556", "0.5914994", "0.59142894", "0.59139514", "0.5904052", "0.5902969", "0.5900606", "0.5899678", "0.589928", "0.589717", "0.58958346", "0.5892708", "0.5887724", "0.5876877", "0.58762616", "0.5872936", "0.58702374", "0.58698326", "0.5868216", "0.58681345", "0.58647007", "0.5858009", "0.5854841", "0.58497775", "0.5849172", "0.5845951", "0.58407897" ]
0.0
-1
nacita sluzby podle obyvatele
private function selectServicesObyvatele($scheduler, $id){ $result = $scheduler->adminLoadServiceObyvatel($id); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function valorpasaje();", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "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 }", "final function velcom(){\n }", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "function hitungDenda(){\n\n return 0;\n }", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "public function masodik()\n {\n }", "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 obtenerViajesplusAbonados();", "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 traerCualquiera()\n {\n }", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\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 }", "public function nadar()\n {\n }", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "public function hapus_toko(){\n\t}", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "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 static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "function control_suplente($desde,$hasta,$id_desig_suplente){\n //busco todas las licencias de la designacion que ingresa\n //novedades vigentes en el periodo\n $anio=date(\"Y\", strtotime($desde)); \n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n $sql=\"SELECT distinct t_n.desde,t_n.hasta \n FROM novedad t_n\n WHERE t_n.id_designacion=$id_desig_suplente\n and t_n.tipo_nov in (2,3,5)\n and t_n.desde<='\".$udia.\"' and t_n.hasta>='\".$pdia.\"'\"\n . \" ORDER BY t_n.desde,t_n.hasta\"; \n $licencias=toba::db('designa')->consultar($sql);\n $i=0;$seguir=true;$long=count($licencias);$primera=true;\n while(($i<$long) and $seguir){\n if($primera){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n $primera=false;\n }else{\n if($desde>=$licencias[$i]['desde']){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n }\n if($hasta<=$licencias[$i]['hasta']){\n $seguir=false;\n }\n \n if(($licencias[$i]['desde']==date(\"Y-m-d\",strtotime($b.\"+ 1 days\"))) or ($licencias[$i]['desde']==$b)){\n $b=$licencias[$i]['hasta'];\n }\n }\n $i++;\n }\n if($long>0){\n if($desde>=$a and $hasta<=$b){\n return true;\n }else{\n return false;\n }\n }else{//no tiene novedades\n return false;\n }\n\n// $sql=\"select * from designacion t_d\"\n// . \" INNER JOIN novedad t_n ON (t_d.id_designacion=t_n.id_designacion and t_n.tipo_nov in (2,3,5) )\"\n// . \" where t_d.id_designacion=$id_desig_suplente\"\n// . \" and '\".$desde.\"'>=t_n.desde and '\".$hasta.\"'<=t_n.hasta\";\n// $res=toba::db('designa')->consultar($sql);\n// if(count($res)>0){\n// return true;\n// }else{\n// return false;\n// }\n }", "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}", "public function cortesia()\n {\n $this->costo = 0;\n }", "function lupe_vagas($idt_periodo,$municipio,$idt_programa,$cod_programa)\r\n\r\n//p($municipio);\r\n// exit();\r\n\r\n\r\n{\r\n\r\n // p($idt_eve_periodo);\r\n if ($idt_periodo=='')\r\n {\r\n // erro de parâmetro\r\n // exit()\r\n }\r\n //\r\n // Montar select\r\n //\r\n $kselectw = 'select sum(qtd_vagas_turma) as qtd_vagas\r\n from periodo_let_prgr_muni_cur_turma as turma\r\n inner join periodo_letivo pelet on turma.idt_periodo=pelet.idt\r\n inner join periodo peins on pelet.idt_periodo=peins.idt\r\n left join programa pr on turma.programa=pr.codigo';\r\n $kwherew=' where peins.idt='.$idt_periodo.' and pr.codigo='.aspa($cod_programa);\r\n\r\n if ($municipio!='')\r\n {\r\n $kwherew=$kwherew.' and cod_municipio='.aspa($municipio);\r\n }\r\n if ($idt_programa!=-1)\r\n {\r\n // tom $kwherew=$kwherew.' and idt_periodo_let_programa='.$idt_programa;\r\n $kwherew=$kwherew.' and turma.programa='.aspa($cod_programa);\r\n }\r\n $korderbyw=' ';\r\n\r\n\r\n $a=$kselectw.$kwherew.$korderbyw;\r\n\r\n//p($kwherew);\r\n\r\n\r\n// p($a);\r\n// exit();\r\n\r\n $qtd_vagas=0;\r\n\r\n $ktabelaw = execsql($a);\r\n ForEach($ktabelaw->data as $row)\r\n {\r\n $qtd_vagas=$qtd_vagas+$row['qtd_vagas'];\r\n\r\n }\r\n\r\n // p($qtd_vagas);\r\n// exit();\r\n\r\n\r\n return $qtd_vagas;\r\n}", "public static function Znevalidni_kolize_ucastnika_formulare($iducast,$formular) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and s_typ_kolize.formular='\" . $formular . \"' and uc_kolize_table.valid\" ;\r\n \r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika_formulare: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n \r\n while($zaznam_kolize = $sth->fetch()) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function darLetras($solucion){ \r\n $azar = rand(0,strlen($solucion)-1);\r\n $dLetra = $solucion[$azar];\r\n $posicionLetra = $azar.strtoupper($dLetra);\r\n return $posicionLetra;\r\n }", "public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }", "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 elso()\n {\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "abstract public function getPasiekimai();", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "public function pasaje_abonado();", "function testEntier($valeur){\r\n for($i=0;$i<laTaille($valeur);$i++){\r\n if(($valeur[$i]>=0) && !($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\")){\r\n $retour[$i] = \"vrai\";\r\n }\r\n else{\r\n $retour[$i] = \"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($valeur) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($valeur)){\r\n $retourFinal = \"vrai\";\r\n }\r\n else{\r\n $retourFinal = \"faux\";\r\n }\r\n return $retourFinal;\r\n }", "public function abono();", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}", "public function obtenerViajesplus();", "public function Atak ($obronca){\n\t\t\t\n\t\t\t$agility = $obronca->getAgility();\n\t\t\t\n\t\t\tif ($obronca->getDefense()){ //warunek sprawdzający, czy gracz użył obrony\n\t\t\t\t$agility *= 1.5; //zwiększenie zręczności o 50% \n\t\t\t\t$obronca->setDefense(false); //wyłączenie obrony (w następnej turze zręczność będzie wynosiła 100% maksymalnej wartości)\n\t\t\t}\n\t//określenie współczynnika skuteczności ataku\t\t\n\t\t\t$sk = (($this->getAgility() - $agility) / $agility ) * 100;\n\t\t\t\t\n\t\t\t\tif ($sk>90) //ograniczenie skrajności (nie będzie mniej niż 10% a więcej niż 90%)\n\t\t\t\t\t$sk=90;\n\t\t\t\telse if($sk<10)\n\t\t\t\t\t$sk=10;\n\t\t\t\t\n\t//warunek odpowiedzialny za skuteczność ataku. \n //jeśli skuteczność ataku jest większa lub równa wylosowanej liczbie to atak się powiedzie \t\n\t\t\t\tif ($sk>=rand(1,100)){\n\t\t\t\t\t$obronca->setHP($obronca->getHP()-$this->getStrength());\n\t\t\t\t\techo 'Atak sie powiodl, zabral '.$this->getStrength().' HP, pozostalo zycia '.$obronca->getHP().' z '.$obronca->getMaxHP().'.', PHP_EOL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo \"Atak chybil o wlos!\", PHP_EOL;\n\t\t\t\t\n\t\t\t$this->setPunktyAkcji($this->getPunktyAkcji()-1);\t //zmniejsze punktów akcji o 1 (koszt ataku)\n\t\t}", "function f_obj($individu){\n\t\t$cluster = count($individu); //menghitung jumlah cluster berdasarkan individu\n\t\t$target = 10;\n\t\t$hasil = 0;\n\t\tfor ($i=0; $i < $cluster; $i++) { \n\t\t\t$hasil += $individu[$i];\n\t\t}\n\n\t\t$evaluasi = abs($hasil - $target);\n\t\treturn $evaluasi; //nilai fitness masih 0-10\n\t}", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function ajustecambiario($periodo,$ejer,$moneda){\n\t\t\t// le kite el periodo and p.idperiodo=\".$periodo.\"\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,c.manual_code,p.idperiodo\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\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.relacionExt!=0 and p.idperiodo<=\".$periodo.\"\n\t\t\tgroup by p.relacionExt,m.TipoMovto\n\t\t\t\");\n\t\t\tif($sql->num_rows>0){\n\t\t\t\treturn $sql;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}", "public function contrato()\r\n\t{\r\n\t}", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "public function valordelospasajesplus();", "function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}", "function SprWymiar($macierz){\n\t\t\t$wymiar=1;\n\t\t\twhile(isset($macierz[$wymiar][1])){\n\t\t\t\t$wymiar++;\n\t\t\t}\n\t\t\treturn $wymiar-1; \n\t\t}", "function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function arreglasecuord(){\n\t\t$mSQL='SELECT codigo,precio1,precio2,precio3,precio4 FROM sinv WHERE precio2>precio1 OR precio3>precio2 OR precio3>precio1 OR precio4>precio3 OR precio4>precio2 OR precio4>precio1';\n\t\t$query = $this->db->query($mSQL);\n\t\tforeach ($query->result() as $row){\n\t\t\t$dbcodigo= $this->db->escape($row->codigo);\n\t\t\t$precios = array($row->precio1,$row->precio2,$row->precio3,$row->precio4);\n\t\t\tsort($precios);\n\t\t\t$precios=array_reverse($precios);\n\n\t\t\t$data=array();\n\t\t\tforeach($precios as $i=>$prec){\n\t\t\t\t$o=$i+1;\n\t\t\t\t$ind='precio'.$o;\n\t\t\t\t$data[$ind] = $prec;\n\t\t\t}\n\n\t\t\t$where = \"codigo = ${dbcodigo}\";\n\t\t\t$sql = $this->db->update_string('sinv', $data, $where);\n\t\t\t$this->db->query($sql);\n\t\t}\n\t\t$this->arreglamarbases();\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\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 grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "function cariPosisi($batas){\nif(empty($_GET['halhasillulusadministrasi'])){\n\t$posisi=0;\n\t$_GET['halhasillulusadministrasi']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasillulusadministrasi']-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}", "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}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function gl_dijagonala_sve_jedinice($matrica)\n{\n\t// echo ( napravi_tabelu( $matrica ) );\n\t/*\t\n\tif($matrica[$r][$r] != 1)\n\t{\n\t\t$x = $matrica[$r][$r];\n\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t// exit();\n\t\t\n\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t{\n\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t{\n\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t}\n\t\t}\n\t}*/\n\t\n\t\n\tfor($r = 0; $r < count($matrica); $r++)\n\t{\n\t\tif($matrica[$r][$r] != 1)\n\t\t{\n\t\t\t$x = $matrica[$r][$r];\n\t\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t\t// exit();\n\n\t\t\t// podela citavog reda matrice sa vrednoscu njegove glavne idjagonale\n\t\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t\t{\n\t\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t\t{\n\t\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $matrica;\n}", "function moviextranjeros($ejer,$poli){\n\t\t\t$sql=$this->query(\"select m.*,c.manual_code from cont_polizas p,cont_movimientos m,cont_accounts c,cont_config con\n\t\t\twhere m.IdPoliza=p.id and m.Cuenta=c.`account_id` and c.currency_id!=1 and m.Activo=1 and c.main_father!=con.CuentaBancos\n\t\t\t and p.idejercicio=\".$ejer.\" and p.id=\".$poli);\n\t\t\t \n\t\t\treturn $sql;\n\t\t\t\n\t\t}", "public function iloscMinus($id)\n\t\t{\n\t\t\t$data = array();\n\t\t\t\tif($id === NULL || $id === \"\")\n\t\t\t\t\t$data['error'] = 'Nieokreślone ID!';\n\t\t\t\telse\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$stmt2 = $this->pdo->prepare('SELECT IdTowar, ilosc FROM `koszyk` where IdTowar=:id');\n\t\t\t\t\t\t$stmt2 -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t$ilosc = $stmt2 -> execute();\n\t\t\t\t\t\t$data = $stmt2 -> fetchAll();\n\t\t\t\t\t\tforeach($data as $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilosc = $result['ilosc'];\n\t\t\t\t\t\t\t$idt = $result['IdTowar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($ilosc>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $id.'<br>towary: ';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['idtowary']);\n\t\t\t\t\t\t\t$stmt = $this->pdo->prepare('UPDATE koszyk SET ilosc=ilosc-1 WHERE IdTowar=:id');\n\t\t\t\t\t\t\t$stmt -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t\t$wynik_zapytania = $stmt -> execute();\n\n\t\t\t\t\t\t\t$stmt2 = $this->pdo->prepare(\"update towar set towar.StanMagazynowyDysponowany = towar.StanMagazynowyDysponowany+1 where IdTowar = $idt\");\n\t\t\t\t\t\t\t$stmt2 -> execute();\n\n\t\t\t\t\t\t\t$cookie2 = $_COOKIE['idtowary'];\n\t\t\t\t\t\t\t$cookie2 = stripslashes($cookie2);\n\t\t\t\t\t\t\t$ids = json_decode($cookie2, true);\n\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// echo 'nie ma';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t //echo 'jest';\n\t\t\t\t\t\t\t $indeks = array_search($idt, $ids);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cookie = $_COOKIE['ilosci'];\n\t\t\t\t\t\t\t$cookie = stripslashes($cookie);\n\t\t\t\t\t\t\t$quantity = json_decode($cookie, true);\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false){}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<br>ilosci ';\n\t\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t\t\t$ilosc=$ilosc-1;\n\t\t\t\t\t\t\t $quantity[$indeks]=$ilosc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dane = json_encode($quantity);\n\t\t\t\t\t\t\tsetcookie('ilosci', $dane,time()+60*60*24*30,'/');\n\t\t\t\t\t\t\t$_COOKIE['ilosci'] = $dane;\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(\\PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['error'] =$data['error'].'<br> Błąd wykonywania operacji usunięcia';\n\t\t\t\t\t}\n\t\t\t\t\t/*var_dump($_COOKIE['idtowary']);\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\techo '<br>';*/\n\t\t\t\treturn $data;\n\n\t\t}", "public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\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 }", "public function engordar($quilos){\n $this->peso = $this->peso + $quilos;\n}", "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "private function generateNilaiAkhir($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n \r\n $setting = $this->M_setting->getSetting()->row();\r\n\r\n // Bobot masing masing nilai\r\n $bobot_bimbingan = $setting->bobot_bimbingan;\r\n $bobot_moderator = $setting->bobot_moderator;\r\n $bobot_penguji1 = $setting->bobot_penguji1;\r\n $bobot_penguji2 = $setting->bobot_penguji2;\r\n $kom_a = $setting->kom_a;\r\n $kom_b = $setting->kom_b;\r\n $kom_c = $setting->kom_c;\r\n $kom_d = $setting->kom_d;\r\n // Bobot masing masing nilai\r\n\r\n // nilai bimbingan\r\n $bimb = ( $bobot_bimbingan/100 ) * $dataAnggota->nilai_bimb;\r\n // nilai bimbingan\r\n\r\n // nilai moderator\r\n $kom_a_mod = ( $kom_a/100 ) * $dataAnggota->nilai_11;\r\n $kom_b_mod = ( $kom_b/100 ) * $dataAnggota->nilai_12;\r\n $kom_c_mod = ( $kom_c/100 ) * $dataAnggota->nilai_13;\r\n $kom_d_mod = ( $kom_d/100 ) * $dataAnggota->nilai_14;\r\n\r\n $tot_mod = ( $kom_a_mod + $kom_b_mod + $kom_c_mod + $kom_d_mod ) * ( $bobot_moderator/100 );\r\n // nilai moderator\r\n \r\n // nilai penguji 1\r\n $kom_a_p1 = ( $kom_a/100 ) * $dataAnggota->nilai_21;\r\n $kom_b_p1 = ( $kom_b/100 ) * $dataAnggota->nilai_22;\r\n $kom_c_p1 = ( $kom_c/100 ) * $dataAnggota->nilai_23;\r\n $kom_d_p1 = ( $kom_d/100 ) * $dataAnggota->nilai_24;\r\n\r\n $tot_p1 = ( $kom_a_p1 + $kom_b_p1 + $kom_c_p1 + $kom_d_p1 ) * ( $bobot_penguji1/100 );\r\n // nilai penguji 1\r\n \r\n // nilai penguji 2\r\n $kom_a_p2 = ( $kom_a/100 ) * $dataAnggota->nilai_31;\r\n $kom_b_p2 = ( $kom_b/100 ) * $dataAnggota->nilai_32;\r\n $kom_c_p2 = ( $kom_c/100 ) * $dataAnggota->nilai_33;\r\n $kom_d_p2 = ( $kom_d/100 ) * $dataAnggota->nilai_34;\r\n\r\n $tot_p2 = ( $kom_a_p2 + $kom_b_p2 + $kom_c_p2 + $kom_d_p2 ) * ( $bobot_penguji2/100 );\r\n // nilai penguji 2\r\n\r\n // Perhitungan nilai kahir\r\n $totalNilai = $bimb + $tot_mod + $tot_p1 + $tot_p2;\r\n // Perhitungan nilai kahir\r\n \r\n $dataUpdate = ['nilai_akhir' => $totalNilai];\r\n $updateNilaiAkhir = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateNilaiAkhir ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "function prn_wejscie() {\n global $Cuzytkownik,$db, $_GLOBAL, $L;\n \n $DD[] = \"IT_AKTYWACJA\";\n \n $query = \"select * from \" . dn('kontrahent') . \" where ko_id=\" . $Cuzytkownik->get_id() . \";\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n $A['{PANELTITLE}'] = $dane['ko_nazwa'];\n \n // <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dlaciebie/\"><div>' . $L['{T_SPECJALNIE_DLA_CIEBIE}'] . '</div></a></div>\n $A['{PANELMENU}'] = '<div class=\"steps\">\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/rabat/\"><div>' . $L['{T_TWOJ_RABAT}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/obserwowane/\"><div>' . $L['{T_OBSERWOWANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dane/\"><div>' . $L['{T_MOJE_DANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/zamowienie/\"><div>' . $L['{T_HISTORIA_ZAMOWIEN}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/koszyk/\"><div>' . $L['{T_PRZEJDZ_DO_KOSZYKA}'] . '</div></a></div>\n </div>';\n\n $query = \"select * from \" . dn('cms') . \" where st_id=72;\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n \n if ($_GLOBAL['langid'] == 2) {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc_en']);\n } else {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc']); \n }\n \n return get_template(\"user_enter\",$A,$DD);\n }", "public function plus_abonados();", "public function matricular(Aluno $a){\n $this->alunos[] = $a;\n \n }", "private function generateNilaiHuruf($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n\r\n // Perhitungan Nilai Huruf\r\n if ( $dataAnggota->nilai_akhir > 85 )\r\n $nilaiHuruf = 'A';\r\n else if ( $dataAnggota->nilai_akhir > 80 && $dataAnggota->nilai_akhir <= 85 )\r\n $nilaiHuruf = 'A-';\r\n else if ( $dataAnggota->nilai_akhir > 75 && $dataAnggota->nilai_akhir <= 80 )\r\n $nilaiHuruf = 'AB';\r\n else if ( $dataAnggota->nilai_akhir > 70 && $dataAnggota->nilai_akhir <= 75 )\r\n $nilaiHuruf = 'B+';\r\n else if ( $dataAnggota->nilai_akhir > 65 && $dataAnggota->nilai_akhir <= 70 )\r\n $nilaiHuruf = 'B';\r\n else if ( $dataAnggota->nilai_akhir > 60 && $dataAnggota->nilai_akhir <= 65 )\r\n $nilaiHuruf = 'B-';\r\n else if ( $dataAnggota->nilai_akhir > 55 && $dataAnggota->nilai_akhir <= 60 )\r\n $nilaiHuruf = 'BC';\r\n else if ( $dataAnggota->nilai_akhir > 50 && $dataAnggota->nilai_akhir <= 55 )\r\n $nilaiHuruf = 'C+';\r\n else if ( $dataAnggota->nilai_akhir > 45 && $dataAnggota->nilai_akhir <= 50 )\r\n $nilaiHuruf = 'C';\r\n else if ( $dataAnggota->nilai_akhir > 40 && $dataAnggota->nilai_akhir <= 45 )\r\n $nilaiHuruf = 'C-';\r\n else if ( $dataAnggota->nilai_akhir > 35 && $dataAnggota->nilai_akhir <= 40 )\r\n $nilaiHuruf = 'CD';\r\n else if ( $dataAnggota->nilai_akhir > 30 && $dataAnggota->nilai_akhir <= 35 )\r\n $nilaiHuruf = 'D';\r\n else if ( $dataAnggota->nilai_akhir >= 0 && $dataAnggota->nilai_akhir <=30 )\r\n $nilaiHuruf = 'E';\r\n else\r\n $nilaiHuruf = 'F';\r\n // Perhitungan Nilai Huruf\r\n\r\n $dataUpdate = ['nilai_huruf' => $nilaiHuruf];\r\n $updateHuruf = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateHuruf ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n }", "public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "public function dohvati_najaktuelnije_ideje()\n {\n $ideje= $this->findAll();\n usort($ideje,function ($i1,$i2)\n {\n //proveriti je l' ovo tranzitivno, idejno jeste, samo da li sam napravio gresku\n $dat1= strtotime($i1->DatumEvaluacije); \n $dat2= strtotime($i2->DatumEvaluacije); \n $danas= strtotime(date(\"Y-m-d H:i:s\"));\n if ($dat1==$dat2)\n {\n return 0;\n }\n if ($dat1>$danas)\n {\n if ($dat2<$danas)//dat2 nije aktuelno, jer je vec proslo, a d1 jeste te ide ispred\n {\n return -1;\n }\n else//oba tek treba da se dogode aktuelnije je ono sto ce pre da se dogodi\n {\n if ($dat1<$dat2)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }\n }\n else//dat1 nije aktuelno\n {\n if ($dat2>$danas)//dat2 ide ispred\n {\n return 1;\n }\n else//nijedan nije aktuelan zato zelimo da bude ispred onaj sa vecim datumom jer je on blizi sadasnjosti\n {\n if ($dat1<$dat2)\n {\n return 1;\n }\n else \n {\n return -1;\n \n }\n }\n \n }\n });\n return $ideje;\n \n }", "public function alimentar()\n {\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function calculer_boucle($id_boucle, &$boucles) {\n\n\t// gerer les statuts si declares pour cette table\n\t/*\n\t$table_statut[nom_table][] = array(\n\t\t'champ'=>'statut', // champ de la table sur lequel porte le filtrage par le statut\n\t\t'publie'=>'publie', // valeur ou liste de valeurs, qui definissent l'objet comme publie.\n\t\t'previsu'=>'publie,prop', // valeur ou liste de valeurs qui sont visibles en previsu\n\t\t'post_date'=>'date', // un champ de date pour la prise en compte des post_dates, ou rien sinon\n\t 'exception'=>'statut', // liste des modificateurs qui annulent le filtrage par statut\n\t // si plusieurs valeurs : array('statut','tout','lien')\n\t);\n\n\tPour 'publier' ou 'previsu', si la chaine commence par un \"!\" on exclu au lieu de filtrer sur les valeurs donnees\n\tsi la chaine est vide, on ne garde rien si elle est seulement \"!\" on n'exclu rien\n\n\tSi le statut repose sur une jointure, 'champ' est alors un tableau du format suivant :\n\t'champ'=>array(\n\t array(table1, cle1),\n\t ...\n\t array(tablen, clen),\n\t champstatut\n\t )\n\n\tchampstatut est alors le champ statut sur la tablen\n\tdans les jointures, clen peut etre un tableau pour une jointure complexe : array('id_objet','id_article','objet','article')\t \n\t*/\n\n\t$boucle = &$boucles[$id_boucle];\n\t$id_table = $boucle->id_table;\n\t$table_sql = $boucle->from[$id_table];\n\tif (isset($GLOBALS['table_statut'][$table_sql])){\n\t\tforeach($GLOBALS['table_statut'][$table_sql] as $s){\n\t\t\t// Restreindre aux elements publies si pas de {statut} ou autre dans les criteres\n\t\t\t$filtrer = true;\n\t\t\tif (isset($s['exception'])) {\n\t\t\t\tforeach(is_array($s['exception'])?$s['exception']:array($s['exception']) as $m) {\n\t\t\t\t\tif (isset($boucle->modificateur[$m]) OR isset($boucle->modificateur['criteres'][$m])) {\n\t\t\t\t\t\t$filtrer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($filtrer) {\n\t\t\t\tif (is_array($s['champ'])){\n\t\t\t\t\t$statut = preg_replace(',\\W,','',array_pop($s['champ'])); // securite\n\t\t\t\t\t$jointures = array();\n\t\t\t\t\tforeach($s['champ'] as $j) {\n\t\t\t\t\t\t$jointures[] = array('',array($id=reset($j)),end($j));\n\t\t\t\t\t}\n\t\t\t\t\t$jointures[0][0] = $id_table;\n\t\t\t\t\tif (!array_search($id, $boucle->from)){\n\t\t\t\t\t\tfabrique_jointures($boucle, $jointures, true, $boucle->show, $id_table);\n\t\t\t\t\t}\n\t\t\t\t\t// trouver l'alias de la table d'arrivee qui porte le statut\n\t\t\t\t\t$id = array_search($id, $boucle->from);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$id = $id_table;\n\t\t\t\t\t$statut = preg_replace(',\\W,','',$s['champ']); // securite\n\t\t\t\t}\n\t\t\t\t$mstatut = $id .'.'.$statut;\n\n\t\t\t\tif (!$GLOBALS['var_preview']) {\n\t\t\t\t\tif (isset($s['post_date']) AND $s['post_date']\n\t\t\t\t\t\tAND $GLOBALS['meta'][\"post_dates\"] == 'non'){\n\t\t\t\t\t\t$date = $id.'.'.preg_replace(',\\W,','',$s['post_date']); // securite\n\t\t\t\t\t\tarray_unshift($boucle->where,\"quete_condition_postdates('$date')\");\n\t\t\t\t\t}\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['publie']));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['previsu']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\t$boucles[$id_boucle] = pipeline('post_boucle', $boucles[$id_boucle]);\n\n\t// en mode debug memoriser les premiers passages dans la boucle,\n\t// mais pas tous, sinon ca pete.\n\tif (_request('var_mode_affiche') != 'resultat') \n\t\t$trace = '';\n\telse {\n\t\t$trace = $boucles[$id_boucle]->descr['nom'] . $id_boucle;\n\t\t$trace = \"if (count(@\\$GLOBALS['debug_objets']['resultat']['$trace'])<3)\n\t \\$GLOBALS['debug_objets']['resultat']['$trace'][] = \\$t0;\";\n\t}\n\treturn ($boucles[$id_boucle]->type_requete == 'boucle')\n\t? calculer_boucle_rec($id_boucle, $boucles, $trace) \n\t: calculer_boucle_nonrec($id_boucle, $boucles, $trace);\n}", "function distribuir(){\r\n\t\t$fPesq = new fachada_pesquisador();\r\n\t\t$fAtend = new fachada_atendimento();\r\n\t\t$fSelecao = new fachada_selecao();\r\n\t\t$fOferta = new fachada_oferta();\r\n\t\t$fMax = new fachada_maxbolsa();\r\n\t\t$ano = $_SESSION['sAno'];\r\n\t\t$tpSelecao = $_SESSION['sEdital'];\r\n\t\t// retorna um vetor com as bolsas ofertadas em um edital em determinado ano. (cod,codTipoEdital,codTipoBolsa,ano,prioridade,qtd)\r\n\t\t$vetOfertaBolsas = $fOferta->getOfertasAnoEdital($ano,$tpSelecao);\r\n\t\t$ofertaBolsasGeral = array();\r\n\t\t$qtdOfertaBolsasCapital = 0;\r\n\t\t$qtdOfertaBolsasAF = 0;\r\n\t\t$qtdOfertaBolsasInterior = 0;\r\n\t\t$qtdOfertaBolsasPIBITI = 0;\r\n\t\t\r\n\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 1 - CNPq, 2 - UFPA e 3- FAPESPA e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 1) OR ($vetOfertaBolsas[$i]->getPrioridade() == 2) OR ($vetOfertaBolsas[$i]->getPrioridade() == 3) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Capital\r\n\t\t\t\t$qtdOfertaBolsasCapital += $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t}\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 4 - CNPq AF e 5 - UFPA AF e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 4) OR ($vetOfertaBolsas[$i]->getPrioridade() == 5) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital AF\r\n\t\t\t\t$qtdOfertaBolsasAF += $vetOfertaBolsas[$i]->getQtd();\t\t\r\n\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 6 - Interior e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 6)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasInterior += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 7 - PIBITI e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 7)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasPIBITI += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t} //Fim do FOR\r\n\t\t\r\n\t\t// retorna um vetor com a quantidade m�xima que um pesquisador pode receber de acordo com a pontua��o m�nima. (cod,ponto,qtd,tpselecao,ano)\r\n\t\t$vetMax = $fMax->getMaxbolsaSelecao(); \r\n\r\n\t\t$oferta\t = 0;\r\n\t\t$vetAtend = array();\r\n\t\tif($vetMax and $vetOfertaBolsas ){\r\n\t\t\t$maxqtd = $vetMax[0]->getQtd();\r\n\t\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t\t$oferta \t= $oferta + $vetOfertaBolsas[$i]->getQtd(); //Soma das quantidades de bolsas ofertadas em um edital\r\n\t\t\t}\r\n\t\t\t$fSelecao->zeraNumBolsaAtend(); //zera o numero de bolsas atendidas,caso esteja redistribuindo\r\n\t\t\t$fAtend->deletaTodosAt();\t\t //deleta os atendimentos,caso esteja redistribuindo\r\n\t\t\tif($tpSelecao==1){\t\t//problema: considera q os pedidos s�o menores q o disponivel\r\n\t\t\t\t$vetProd = $fPesq->getClassificadosProd(); // retorna os pesquisadores de produtividade inscritos e ativos(nome,id,numBolsa,numBolsaAtend,unidade)\r\n\t\t\t\t\r\n\t\t\t\twhile($l = array_shift($vetProd )){ \r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoConjBolsasSolic,qtdBolsaTipoSolic\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\t\t\t\t\t$max = $maxqtd; // quantidade m�xima que um pesquisador poder� receber\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($l[numBolsa]>$max){ // se o n�mero de bolsas solicitadas for maior que o n�mero m�ximo de bolsas permitido a um pesquisador\r\n\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($max,$l[id]); // seta no banco de dados o numero de bolsas atendidas igual ao n�mero m�ximo de bolsas permitidas\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa],$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas UFPA AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital INTERIOR if($qtdOfertaBolsasINTERIOR >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t\t\t} // Fim do else ($l[numBolsa]>$max)\r\n\t\t\t\t}//FIM DO WHILE DE ARRAY DE PESQUISADORES DE PRODUTIVIDADE\r\n\t\t\t}// fim do if $tpSelecao==1\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$vetPesqPontos = $fPesq->getClassificadosPonto(); //retorna a rela��o de pesquisadores por ordem de pontua��o.\r\n\t\t\t\r\n\t\t\t// INICIO DA ORDENA��O DO VETOR DE PONTUA��O\r\n\t\t\t\r\n\t\t\tforeach($vetPesqPontos as &$vetor){\r\n \t\t\t$anoNota = $_SESSION['sAno']-1;\r\n\t\t\t\t\r\n\t\t\t\tif ($this->getSelecaoNotaPesq($vetor[id],$anoNota)){\r\n\t\t\t\t\t$notaPesquisador = $this->getSelecaoNotaPesq($vetor[id],$anoNota);\r\n\t\t\t\t}\r\n\t\t\t\telse $notaPesquisador = 0;\r\n\t\t\t\t$vetor[ponto] = $vetor[ponto] + ($notaPesquisador*0.025*$vetor[ponto]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($vetPesqPontos as $chave => $linha) { \r\n\t\t\t\t$nome[$chave] = $linha['nome']; \r\n\t\t\t\t$id[$chave] = $linha['id']; \r\n\t\t\t\t$numBolsa[$chave] = $linha['numBolsa']; \r\n\t\t\t\t$unidade[$chave] = $linha['unidade']; \r\n\t\t\t\t$ponto[$chave] = $linha['ponto']; \r\n\t\t\t} \r\n\r\n\t\t\tarray_multisort($ponto, SORT_DESC, $nome, SORT_ASC, $vetPesqPontos);\r\n\t\t\t// FIM DA ORDENA��O DO VETOR DE PONTUA��O\r\n\r\n\t\t\t//foreach ($vetPesqPontos as $vetor) { \r\n\t\t\t//\techo \"O nome do pesquisadador (ID: \".$vetor[id].\") � \".$vetor[nome].\", sua pontua��o � \".$vetor[ponto].\"<br>\";\r\n\t\t\t//}\r\n\r\n\t\t\twhile($l = array_shift($vetPesqPontos)){\r\n\t\t\t\t$valorAtendido = 0;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//verifica se ainda h� bolsa para distribuir\r\n\t\t\t\tif (($qtdOfertaBolsasCapital > 0) || ($qtdOfertaBolsasAF > 0) || ($qtdOfertaBolsasInterior > 0) || ($qtdOfertaBolsasPIBITI > 0)){\r\n\t\r\n\t\t\t\t\t$vBolsasAtivasPesq = $this->getBolsaAtivaPesqAno($l[id],2014); //verifica se determinado pesquisador possui bolsa em vigor\r\n\t\t\t\t\tif($vBolsasAtivasPesq){\r\n\t\t\t\t\t\t$numbolAtivas = count($vBolsasAtivasPesq); // quantidade de bolsas ativas de um pesquisador\r\n\t\t\t\t\t} else $numbolAtivas = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ponto = $l[ponto]; // pontua��o do pesquisador\r\n\t\t\t\t\t$maxBolsaPorPontuacao = 0;\r\n\t\t\t\t\t// verfica a quantidade m�xima que o pesquisador poder� receber comparando as pontua��es m�nima e m�xima. \r\n\t\t\t\t\t//Por exemplo, pontua��o > 300 pontos -> $max=2; pontua��o > 0 pontos -> $max=1;\r\n\t\t\t\t\tfor ($i=0;$i<count($vetMax);$i++){\r\n\t\t\t\t\t\tif($ponto >= $vetMax[$i]->getPonto()){\r\n\t\t\t\t\t\t\t$maxBolsaPorPontuacao = $vetMax[$i]->getQtd();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Caso a soma da quantidade m�xima de bolsas permitidas com o n�mero de bolsas ativas de um pesquisador exceda 2\r\n\t\t\t\t\t$BolsasPesqPodeReceber = $maxBolsaPorPontuacao;\r\n\t\t\t\t\twhile(($BolsasPesqPodeReceber+$numbolAtivas)>2){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Quantidade de bolsas que o pesquisador pode receber\t\t\t\t\r\n\t\t\t\t\tif($BolsasPesqPodeReceber>$l[numBolsa]){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber = $l[numBolsa];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoSubEdital,qtdBolsa\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\r\n\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber,$l[id]);\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim UFPA AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas Interior suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior if($qtdOfertaBolsasInterior >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t}//if (($qtdOfertaBolsasCapital) OR ($qtdOfertaBolsasAF) OR ($qtdOfertaBolsasInterior))\r\n\t\t\t}//fim while naum producao\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} //fim if($vetMax and $vetOfertaBolsas )\r\n\t}", "function publier_almanachs_tous(){\n\tif ($almanachs = sql_select('id_almanach','spip_almanachs')){\n\t\twhile ($res = sql_fetch($almanachs)){\n\t\t\t$id_almanach = $res['id_almanach'];\n\t\t\tautoriser_exception('instituer','almanach',$id_almanach);\n\t\t\tobjet_instituer('almanach',$id_almanach,array(\"statut\"=>'publie'));\n\t\t\tautoriser_exception('instituer','almanach',$id_almanach,false);\n\t\t}\n\t}\n\tsql_free($almanachs);\n}", "function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}", "public function getChapeau();", "public function ventaMayor($idcliente,$get_tcambio){\n //$sql=\"SELECT ocCab.idordenventa,ocCab.importeordencobro,CASE ovCab.IdMoneda WHEN 2 THEN ocCab.importeordencobro*\".$get_tcambio.\" WHEN 1 THEN ocCab.importeordencobro END AS total\n //FROM wc_ordenventa ovCab,wc_ordencobro ocCab\n //WHERE ovCab.idcliente=\".$idcliente.\"\n //AND ovCab.idordenventa=ocCab.idordenventa\n //AND ovCab.vbcreditos=1\n //AND ovCab.vbventas=1\n //AND ovCab.vbcobranzas=1\n //AND ovCab.estado=1\n //ORDER BY ocCab.idordenventa,ocCab.idordencobro ASC\";\n // $array_ventaMayor = $this->scriptArrayCompleto($sql);\n // $idordenventa=-1;\n // for ($i = 0; $i < count($array_ventaMayor); $i++) {\n // if($idordenventa!=$array_ventaMayor[$i]['idordenventa']){\n // $cadena[]=$array_ventaMayor[$i]['total'];\n // }\n // $idordenventa=$array_ventaMayor[$i]['idordenventa'];\n // }\n // $totalmayor=max($cadena);\n //\n // end como nacio la venta\n\n //start como esta actualmente esta la venta -- angel lo indico en el modulo vista global\n $sql=\"SELECT ovCab.idordenventa,CASE ovCab.IdMoneda WHEN 2 THEN SUM(ogCab.importegasto)*\".$get_tcambio.\" WHEN 1 THEN SUM(ogCab.importegasto) END AS total\n FROM wc_ordenventa ovCab,wc_ordengasto ogCab\n WHERE ovCab.idcliente=\".$idcliente.\"\n AND ovCab.idordenventa=ogCab.idordenventa\n AND ovCab.vbcreditos=1\n AND ovCab.vbventas=1\n AND ovCab.vbcobranzas=1\n AND ovCab.estado=1\n AND ogCab.estado=1\n GROUP BY ovCab.idordenventa ORDER BY total DESC;\";\n $array_ventaMayor = $this->scriptArrayCompleto($sql);\n //end como termino la venta\n return $array_ventaMayor[0]['total'];\n }" ]
[ "0.66892415", "0.64546406", "0.64162046", "0.63975793", "0.6335729", "0.62612176", "0.620683", "0.6202906", "0.6181131", "0.6174497", "0.6172146", "0.6156974", "0.6150868", "0.6146335", "0.6125453", "0.6120123", "0.60771805", "0.6076578", "0.6061147", "0.6058047", "0.60566556", "0.6045659", "0.60432446", "0.60357744", "0.6001527", "0.59881014", "0.59821945", "0.5941968", "0.59289473", "0.5913721", "0.59109753", "0.5903309", "0.59015894", "0.58998775", "0.5898688", "0.58720833", "0.5861855", "0.58399504", "0.58299994", "0.5820472", "0.5818247", "0.5817238", "0.58063436", "0.58037597", "0.57762074", "0.57673603", "0.5764421", "0.57628167", "0.5762814", "0.57605577", "0.5754347", "0.5752334", "0.574924", "0.57427037", "0.5716773", "0.57163155", "0.5708118", "0.5706242", "0.57046413", "0.5704392", "0.5687263", "0.5686503", "0.5685585", "0.5685362", "0.56840134", "0.5672654", "0.56694496", "0.56626993", "0.56595397", "0.56595397", "0.5656903", "0.5650559", "0.56363463", "0.5636272", "0.56242305", "0.56150454", "0.5611748", "0.56115824", "0.5611519", "0.5606965", "0.56061363", "0.56034046", "0.56024235", "0.56023526", "0.56007504", "0.56002575", "0.5597958", "0.55954534", "0.55941534", "0.55793357", "0.557882", "0.5576904", "0.5572345", "0.55656487", "0.55649", "0.55637336", "0.5556683", "0.5556189", "0.55542034", "0.5553436", "0.55478615" ]
0.0
-1
nacita sluzby podle typu
private function selectServicesType($scheduler, $id){ $result = $scheduler->adminLoadServiceType($id); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function valorpasaje();", "public function masodik()\n {\n }", "public function nadar()\n {\n }", "public function contrato()\r\n\t{\r\n\t}", "abstract public function getPasiekimai();", "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 boleta()\n\t{\n\t\t//\n\t}", "final function velcom(){\n }", "public function elso()\n {\n }", "public function accueil()\n {\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "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}", "public function hapus_toko(){\n\t}", "public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}", "function ToonFormulierAfspraak()\n{\n\n}", "public function traerCualquiera()\n {\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "public function mostra(){\n }", "public function abono();", "function truc() {\n}", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "public function pasaje_abonado();", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public static function Najdi_kolize_pro_formular ($iducast, $formular ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n //echo(\"<br>\" . $formular . \"<br>\");\r\n //var_dump ($kolize_pole);\r\n return $kolize_pole; \r\n}", "public function alimentar()\n {\n }", "function aggiungiAllegato($pratica,$documento){\n \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 }", "public function getChapeau();", "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\n }", "public function valordelospasajesplus();", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "protected function convertirMayuscula(){\n $cadena=strtoupper($this->tipo);\n $this->tipo=$cadena;\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function obtenerViajesplus();", "public static function Najdi_kolize_pro_formular_a_lokaci ($iducast, $formular, $lokacekolize ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE lokace_kolize='\" . $lokacekolize . \"' and formular='\" . $formular . \"' and valid\" ;\r\n //echo \"<br>\" . $query;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n //var_dump ($kolize_pole);\r\n \r\n return $kolize_pole; \r\n}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "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 podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\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 }", "public function leer(){\n }", "public function leer(){\n }", "public function attaqueJoueur($de){\n\n }", "function papan_catur($angka) {\r\n}", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "public function getMataPelajaran();", "protected function editar()\n {\n }", "public function truycapvao_private_cha(){\n }", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "function tampilSikap($nilai) {\nif($nilai== '1'){ \n\t$nilai = 'Kurang';\n}\nelseif($nilai== '2'){ \n\t$nilai = 'Cukup';\n}\nelseif($nilai== '3'){ \n\t$nilai = 'Baik';\n}\nelse { \n\t$nilai = 'Baik Sekali';\n}\n\treturn $nilai;\n}", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "function retorno($nombre,$apellido)\n {\n if( is_string($nombre) && is_string($apellido) )\n {\n //filter_vars()\n $dame = $nombre. \"<br>\". $apellido;\n return $dame;\n }\n else\n {\n return \"Ingresaste mal los datos. tienen que ser caractéres alfabéticos\";\n }\n\n }", "public function extra_voor_verp()\n\t{\n\t}", "public abstract function Ataca();", "function nustatome_kintamuosius ($a, $b, $c){\n $this -> modelis = $a;\n $this -> marke = $b;\n $this -> gamybosMetai = $c;\n $this -> spalva = \"Raudona\";\n $this -> duruSkaicius = 5;\n\n }", "function niveau ($niveauCode, $niveauTexte)\n{\n if ($niveauCode = 1){\n \n }\n \n }", "public function Teksti2(){\n\t\t$this->teksti2=(\"sot po mbahet provimi ne lenden\");\n\t\techo $this->teksti2;\n\t}", "function darLetras($solucion){ \r\n $azar = rand(0,strlen($solucion)-1);\r\n $dLetra = $solucion[$azar];\r\n $posicionLetra = $azar.strtoupper($dLetra);\r\n return $posicionLetra;\r\n }", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "public function getBobotNilai();", "function sikapSiswa($nilai) {\nif($nilai=='Kurang'){ \n\t$nilai = 1;\n}\nelseif($nilai=='Cukup'){ \n\t$nilai = 2;\n}\nelseif($nilai=='Baik'){ \n\t$nilai = 3;\n}\nelse { \n\t$nilai = 4;\n}\n\treturn $nilai;\n}", "function testEntier($valeur){\r\n for($i=0;$i<laTaille($valeur);$i++){\r\n if(($valeur[$i]>=0) && !($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\")){\r\n $retour[$i] = \"vrai\";\r\n }\r\n else{\r\n $retour[$i] = \"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($valeur) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($valeur)){\r\n $retourFinal = \"vrai\";\r\n }\r\n else{\r\n $retourFinal = \"faux\";\r\n }\r\n return $retourFinal;\r\n }", "public function obtenerViajesplusAbonados();", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function __($cadena) {\n return idioma::traducir($cadena);\n}", "public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }", "public function aaa() {\n\t}", "public function leer(){\n }", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}", "function filtrele($isim){\n return $isim . \" \" . 'Bayrak';\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function hitungDenda(){\n\n return 0;\n }", "public function plus_abonados();", "public function generujKod(){\n\t\t//\n\t}", "public function editar()\n {\n }", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "public function setTypes(){\n $this->var = false;\n $this->symb = false;\n $this->label = false;\n $type = '';\n \n //Ulozi postupne do jednotlivych promennych jestli dany argument odpovida nejakemu danemu vzoru a pote v podminkach rozhodneme typ argumentu (ktery na konci funkce ulozime do typu) a take jestli je argument var, symb, label nebo type\n $var = preg_match(\"/^(TF|LF|GF)@((\\p{L}|-|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n $int = preg_match(\"/^int@([\\+\\-])?([0-9])*$/u\", $this->arg);\n $bool = preg_match(\"/^bool@(true|false)$/u\", $this->arg);\n $string = preg_match(\"/^string@(\\p{L}|[^(\\w\\\\\\)]|\\d|[_]|\\\\\\\\([0-9][0-9][0-9]))*$/u\", $this->arg);\n $nil = preg_match(\"/^nil@nil$/u\", $this->arg);\n $label = preg_match(\"/^((\\p{L}|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n if($var){\n $type = \"var\";\n $this->var = true;\n $this->symb = true;\n }\n if($int){\n $type = \"int\";\n $this->symb = true;\n }\n if($bool){\n $type = \"bool\";\n $this->symb = true;\n }\n if($string){\n $type = \"string\";\n $this->symb = true;\n }\n if($nil){\n $type = \"nil\";\n $this->symb = true;\n }\n if($label){\n if(preg_match(\"/^(int|bool|string)$/u\", $this->arg)){\n $this->type_type = true;\n }\n $type = \"label\";\n $this->label = true; \n }\n if(!($var||$int||$bool||$string||$nil||$label)){\n fwrite(STDERR, \"CHYBA \".ERROR_23.\" - spatny argument\\n\");\n exit(ERROR_23);\n }\n $this->setType($type);\n }", "public function serch()\n {\n }", "public function eedijalan($bau){\n return $bau.' banget';\n }", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "public function falar(){\n\t\treturn \"Som\";\n\t}", "function saludo(){\n echo \"<hr>\";\n echo \"Buenas tardes aprendices, bienvenidos a las clases de PHP\";\n echo \"<hr>\";\n }", "public function estVivant(){\n\n }", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function teste()\n {\n\n }", "public function luu_tt_sanpham()\n\t\t{\n\t\t\t//lay du lieu tu view \n\t\t\tif (isset($_POST['tensanpham'])&& isset($_POST['tenloaisanpham'])&& isset($_POST['img'])&& isset($_POST['mota'])&& isset($_POST['baohanh'])&& isset($_POST['gia'])){\n\t\t\t\t//goi ham luu data cua model san pham\n\t\t\t\t$this->tensanpham = $_POST['tensanpham'];\n\t\t\t\t$this->id_loaisp = $_POST['tenloaisanpham'];\n\t\t\t\t$this->img = $_POST['img'];\n\t\t\t\t$this->mota = $_POST['mota'];\n\t\t\t\t$this->baohanh = $_POST['baohanh'];\n\t\t\t\t$this->gia = $_POST['gia'];\n\t\t\t\t//goi ham luu data cua model sanpham\n\t\t\t\t$kq = $this->sanpham_model->insert_sanpham($this->tensanpham,$this->id_loaisp,$this->img,$this->mota,$this->baohanh,$this->gia);\n\t\t\t\tif ($kq) {\n\t\t\t\t\techo 'luu du lieu thanh cong -- sanphamcontroller';\n\t\t\t\t} else {\n\t\t\t\t\techo'luu du lieu that bai -- sanphamcontroller';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo 'ban chua nhap du lieu -- sanphamcontroller';\n\t\t\t}\t\t\t\n\t\t}", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "function setAukstis($x) {\n $this->aukstis = $x; // privaciai reiksmei priskiriam kintamaji, kuris bus kazkuom pakeistas\n }", "function buenosDias(){\n return \"Hola! buenos días!!\".salto;\n}", "public function wrong() {\n\n }", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "public function correu(){\n echo \" correu !\";\n }", "function huruf($jenis, $papar)\n{\n \n switch ($jenis) \n {// mula - pilih $jenis\n case 'BESAR':\n $papar = strtoupper($papar);\n break;\n case 'kecil':\n $papar = strtolower($papar);\n break;\n case 'Depan':\n $papar = ucfrist($papar);\n break;\n case 'Besar_Depan':\n $papar = mb_convert_case($papar, MB_CASE_TITLE);\n break;\n }// tamat - pilih $jenis\n \n return $papar;\n}", "function mostrar($automovil){\r\n\techo \"<p> Hola soy un $automovil->marca, modelo $automovil->modelo</p>\";\r\n}" ]
[ "0.69627744", "0.65639246", "0.6440517", "0.62833834", "0.62246835", "0.62182826", "0.6182384", "0.6169467", "0.6159491", "0.6114522", "0.61074257", "0.6079935", "0.6059501", "0.60355026", "0.60133916", "0.59952754", "0.5884364", "0.5873616", "0.5855764", "0.5854049", "0.58425653", "0.58383465", "0.5825481", "0.582484", "0.58057857", "0.5799554", "0.57991266", "0.57949644", "0.5775419", "0.57675457", "0.5758245", "0.575192", "0.57213414", "0.571736", "0.5701459", "0.5695062", "0.56763124", "0.564059", "0.5623759", "0.5621989", "0.56076753", "0.56022537", "0.5599615", "0.5597428", "0.55933464", "0.55933464", "0.5587206", "0.55869454", "0.5579718", "0.556858", "0.55678105", "0.55649567", "0.5563668", "0.5563668", "0.5563345", "0.5558247", "0.55549026", "0.55455315", "0.55450624", "0.5544087", "0.55385566", "0.5535549", "0.5525828", "0.5523635", "0.55230457", "0.552011", "0.5520056", "0.5512399", "0.55117995", "0.55078596", "0.5505512", "0.5503137", "0.550131", "0.5490475", "0.5481878", "0.54809403", "0.5464299", "0.54609483", "0.545706", "0.54372406", "0.5435074", "0.5433915", "0.5431863", "0.54312086", "0.5425012", "0.5423379", "0.5417604", "0.5416726", "0.5413664", "0.5412541", "0.5410683", "0.54076153", "0.5403742", "0.5403616", "0.5398476", "0.5394902", "0.5390661", "0.53893757", "0.5382588", "0.5372777", "0.5370974" ]
0.0
-1
nacita sluzby se zaznamem (jen ty co uz probehli tedy moznost pro nacteni detailu )
private function selectServicesHistory($scheduler ){ $result = $scheduler->adminLoadHistoryService(); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNom();", "public function obtener_nombre()\n {\n echo \" el nombre es del alumno es: \" .$this -> nombre; \n }", "public function getNameLukasBodnariuc(): string{\r\n return $this->nameLukasBodnariuc . \" \" . $this->surnameLukasBodnariuc;\r\n }", "function getNombre(){\t\treturn $this->mNombre;\t}", "public function getNamaPelajaran();", "public function getNome();", "public function getNome();", "public function get_nom(){ return $this->_nom;}", "public function get_nom(){ return $this->_nom;}", "public function get_name()\n {\n }", "public function get_name()\n {\n }", "public function getArl_nombre(){\n return $this->arl_nombre;\n }", "public function getNom():string{\r\n\r\n\r\n\r\n return $this->nom;\r\n\r\n\r\n\r\n\r\n \t\t\t}", "public function getNom() { return $this->nom; }", "public function get_name();", "public function get_name();", "public function get_name();", "public function get_name(){ return $this->_name;}", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function getNom() : string{\n return $this->nom;\n }", "private function getName ()\n\t\t{\t\n\t\t\t$dbs = new DB ( $this->config['database'] );\n\t\t\t$search = $dbs->query(\"SELECT * FROM tbl_vpn_org WHERE org_id = \" . trim($this->c) );\n\t\t\tif ( count($search) ) {\n\t\t\t\t// Convert result to human code \n\t\t\t\t$this->result['data']['id'] = $search[0]['org_id'];\n\t\t\t\t$this->result['data']['name'] = $search[0]['org_name'];\n\t\t\t\t$this->result['data']['description'] = $search[0]['org_desc'];\n\t\t\t} else \n\t\t\t\t$this->result['data']['result'] = \"Not found\";\n\t\t\n\t\t\t$dbs->CloseConnection ();\t\n\t\t\treturn;\n\t\t}", "public function getNome(){\n \treturn $this->nome;\n }", "public function getNom(){\n\n }", "abstract public function get_name();", "abstract public function get_name();", "abstract public function get_name();", "public function o_nama()\n {\n $this->show('o_nama',[]);\n }", "function buscar_personalxdni($dni){\n\t$dni = textfilter_specialchars($dni);\n\t$cons_pers = \"SELECT apellidos,nombres FROM personal WHERE dni='$dni'\";\n\t$resp_pers = mysql_query($cons_pers);\n\t$name = \"\";\n\tif($row = mysql_fetch_array($resp_pers)){\n\t\t$apellidos = $row['apellidos'];\n\t\t$nombres = $row['nombres'];\n\t\t$name = $apellidos.\", \".$nombres;\n\t\t$name = mb_convert_case($name, MB_CASE_UPPER, \"UTF-8\");\n\t}else{\n\t\t$name = \"Error\";\n\t}\n\treturn $name;\n}", "public function get_name()\n {\n // TODO: Implement get_name() method.\n }", "public function getNom()\n {\n return $this->nom;\n }", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function getNombre()\r\n {\r\n return \"DVD capa simple\";\r\n }", "public function getNama()\n {\n return $this->nama;\n }", "public function percobaan()\n {\n \t$a = \"Ahmad Muhaimin\";\n \treturn \"Nama Saya Adalah \".$a;\n }", "function getNom()\n {\n return $this->_Nom;\n }", "public function getNome(){\r\n return $this->nome;\r\n }", "public function get_name(){\n\t\treturn $this->name;\n\t}", "function getName() ;", "function getName() ;", "function getName() ;", "function getName() ;", "public function get_name(){\n return $this->name;\n }", "function getNombre(){\n\t\treturn $this->nombre;\n\t}", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "function getName(){\r\n\t\t// Jesli nie zostaly pobrane dane o koalicji - pobiera je\r\n\t\tif(gettype($this->coalition) == 'boolean' && $this->coalition == false){\r\n\t\t\t$query = \"SELECT koalicja FROM \". TBL_KINGDOM\r\n\t\t\t.\" WHERE nazwa='{$this->kingdom}'\";\r\n\t\t\tif($result = mysql_query($query)){\r\n\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t$this->coalition = $row['koalicja'];\r\n\t\t\t\treturn $this->coalition;\r\n\t\t\t}else{\r\n\t\t\t\t$this->coalition = NULL;\r\n\t\t\t\treturn NULL;\r\n\t\t\t}\r\n\t\t\t// Zwraca pobrane wczesniej dane\r\n\t\t}else{\r\n\t\t\treturn $this->coalition;\r\n\t\t}\r\n\t}", "public function getOrgaName();", "public function getNomeMedico() {\n return ucwords($this->_nome); // imposta la lettera maiuscola a tutte le parole\n }", "function benutzername($id_benutzer) {\n\tkonsole(\"Suche Benutzernamen\");\n\t$mysqli=MyDatabase();\n\t\tif ($id_benutzer!=0) {\n\t\t\tkonsole(\"Ist nicht 0\");\n\t\t\t$abfrage = \"SELECT `benutzername` FROM `Benutzer` WHERE ID='$id_benutzer'\";\n\t\t\tkonsole($abfrage);\n\t\t\tif ($result=$mysqli->query($abfrage)) {\n\t\t\t\twhile ($row=$result->fetch_object()) {\n\t\t\t\t\t$benutzername = $row->benutzername;\n\t\t\t\t\tkonsole(\"Habe gefunden\".$benutzername);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t$benutzername=\"N.N.\";\n\t\tkonsole(\"Habe nichts gefunden\");\n\t\t}\n\treturn $benutzername;\n\t}", "public function getNome() {\r\n return $this->nome;\r\n }", "public function get_name() {\r\n\t\treturn '';\r\n\t}", "function getNom() {\r\n\t\treturn $this->_nom;\r\n\t}", "public function getNom() \n {\n return $this->nom;\n }", "public function formato($nom,$ape){\n\t\t\t\t\techo \"<h1>nombre :\".$nom . \" Apellido:\".$ape.\"</h1>\";\n\t\t\t\t\tvar_dump($this->nombre);\n\n\t\t}", "public function getNome(){\n return $this->nome;\n }", "public function getNom()\n { \n \n return $this->_nom;\n }", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function getName(){ return $this->getField('name'); }", "function berinama($saya){\r\n\t\t\t$this->nama_saya = $saya;\r\n\t\t}", "public function getFirstname() {}", "public function getName(){\n return $this->m_name;\n }", "public function getNombre(){\n\t\treturn $this->nombre;\n\t}", "public function getFullName2()\n {\n return \"Silvi Lila\";\n }", "public function getNom(): string\r\n {\r\n return $this->nom;\r\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "function get_name()\n\t{\n\t\treturn $this->name;\n\t}", "public function getNombre(){\n return $this->nombre;\n }", "public function getNombre(){\n return $this->nombre;\n }", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "function get_name () {\n return $this -> name;\n }", "public function getNom()\n {\n return $this->Nom;\n }", "public function getFullName()\n {\n return \"Enrisa Hasanaj\";\n }", "public function getNom()\n {\n return $this->nom;\n }", "public function getNom()\n {\n return $this->nom;\n }", "public function getNameZh():string\n {\n return $this->nameZh;\n }", "public function getNombre_sala()\n {\n return $this->nombre_sala;\n }", "function getName() {\n // Comprobamos si contiene algo la caja de texto\n if (isset($_POST['txtNewName'])) {\n // Con trim elemininamos cualquier espacio metido a más.\n $nombre = trim($_POST['txtNewName']);\n // función para pasar el nombre a minúsculas\n $nombre = strtolower($nombre);\n // función para pasar la primera letra de la palabra a mayúsculas \n $nombre = ucfirst($nombre);\n return $nombre;\n }\n}", "public function getName(){\n \treturn $this->name;\n }", "public function getName()\n {\n return _('Obrázok');\n }", "function berinama($saya){\n\t\t$this->nama_saya=$saya;\n\t}", "public function getNom()\r\n {\r\n return $this->nom;\r\n }", "public function getNom()\r\n {\r\n return $this->nom;\r\n }" ]
[ "0.6850276", "0.6742901", "0.66993076", "0.6638543", "0.6537316", "0.6462235", "0.6462235", "0.6420453", "0.6420453", "0.6416945", "0.64166665", "0.63890505", "0.6369147", "0.6349061", "0.63467467", "0.63467467", "0.63467467", "0.6335448", "0.63330793", "0.63249904", "0.63026035", "0.62922835", "0.6283278", "0.62783766", "0.62783766", "0.62783766", "0.62668306", "0.6256941", "0.6238492", "0.6237738", "0.6231352", "0.622697", "0.620804", "0.6207521", "0.6178864", "0.6169665", "0.6167345", "0.61642265", "0.61642265", "0.61642265", "0.61642265", "0.6161705", "0.61576134", "0.6155499", "0.6155499", "0.6155499", "0.615026", "0.615026", "0.61397654", "0.61335063", "0.6114512", "0.6102395", "0.6094314", "0.60923153", "0.6088178", "0.60789764", "0.6073892", "0.6069574", "0.6063163", "0.605334", "0.60438275", "0.60249996", "0.60201055", "0.60166466", "0.60148865", "0.60142744", "0.6010148", "0.60101455", "0.60101455", "0.60100716", "0.6006799", "0.6006799", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6001993", "0.6000503", "0.59929824", "0.5992542", "0.5988954", "0.5988954", "0.59861964", "0.59822077", "0.5982071", "0.5978887", "0.59654444", "0.5963007", "0.5957634", "0.5957634" ]
0.0
-1
nacita jednotlive obyvatele kteri maji naplanovanou sluzbu
private function selectObyvatelInServices($scheduler ){ $result = $scheduler->adminLoadObyvatelInService(); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function masodik()\n {\n }", "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 static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "public function valorpasaje();", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "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}", "public function dohvati_najaktuelnije_ideje()\n {\n $ideje= $this->findAll();\n usort($ideje,function ($i1,$i2)\n {\n //proveriti je l' ovo tranzitivno, idejno jeste, samo da li sam napravio gresku\n $dat1= strtotime($i1->DatumEvaluacije); \n $dat2= strtotime($i2->DatumEvaluacije); \n $danas= strtotime(date(\"Y-m-d H:i:s\"));\n if ($dat1==$dat2)\n {\n return 0;\n }\n if ($dat1>$danas)\n {\n if ($dat2<$danas)//dat2 nije aktuelno, jer je vec proslo, a d1 jeste te ide ispred\n {\n return -1;\n }\n else//oba tek treba da se dogode aktuelnije je ono sto ce pre da se dogodi\n {\n if ($dat1<$dat2)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }\n }\n else//dat1 nije aktuelno\n {\n if ($dat2>$danas)//dat2 ide ispred\n {\n return 1;\n }\n else//nijedan nije aktuelan zato zelimo da bude ispred onaj sa vecim datumom jer je on blizi sadasnjosti\n {\n if ($dat1<$dat2)\n {\n return 1;\n }\n else \n {\n return -1;\n \n }\n }\n \n }\n });\n return $ideje;\n \n }", "public function boleta()\n\t{\n\t\t//\n\t}", "abstract public function getPasiekimai();", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "public function nadar()\n {\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 sortPredvidjanjeNajteze() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najteza_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "public function nahrajUzivatele(){\t\t\t\n\t\t\t$dotaz = \"SELECT uzivatelID,uzivatelJmeno,uzivatelHeslo FROM `tabUzivatele` WHERE 1 \";\n\t\t\t\n\t\t\t\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(\"Pri nahravani dat nastala chyba!\" . 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$jmeno = $radek[\"uzivatelJmeno\"];\n\t\t\t\t$heslo = $radek[\"uzivatelHeslo\"];\n\t\t\t\t\n\t\t\t\t$uzivatel = new uzivatelObjekt($jmeno,$heslo);\n\t\t\t\t\n\t\t\t\t$uzivatel->uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$uzivatel); \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}", "public function obtenerViajesplusAbonados();", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }", "function hitungDenda(){\n\n return 0;\n }", "public static function vratiSve($db){\n \n \n // $result = $db->query('SELECT *,((i.datumDo - i.datumOd)*i.cenaPoDanu) as ukupnaCena FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n $result = $db->query('SELECT * FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n \n\n\n $iznajmljivanja = array();\n\n while($row = $result->fetch_assoc()) { \n // $tip = new TipVozila();\n // $tip->tipID= $row['tipID'];\n // $tip->nazivTipa= $row['nazivTipa'];\n\n\n $vozilo = new Vozilo();\n $vozilo->voziloID= $row['voziloID'];\n $vozilo->model= $row['model'];\n $vozilo->marka= $row['marka'];\n $vozilo->regBr= $row['regBr'];\n // $voziloPom->tipVozila = $tip;\n\n $korisnik= new Korisnik();\n $korisnik->korisnikID= $row['korisnikID'];\n $korisnik->ime = $row['ime'];\n $korisnik->prezime = $row['prezime'];\n\n $iznajmljivanje = new Iznajmljivanje();\n $iznajmljivanje->iznajmljivanjeID = $row['iznajmljivanjeID'];\n $iznajmljivanje->vozilo = $vozilo;\n $iznajmljivanje->korisnik = $korisnik;\n $iznajmljivanje->datumOd = $row['datumOd'];\n $iznajmljivanje->datumDo = $row['datumDo'];\n $iznajmljivanje->cenaPoDanu = $row['cenaPoDanu'];\n // $ukupnaCena = $row['ukupnaCena'];\n\n array_push($iznajmljivanja, $iznajmljivanje); \n }\n\n return $iznajmljivanja;\n}", "public static function odstraniArtikelIzKosarice() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\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 }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "public function existujeKolizna()\n {\n // hlada nasledovne kolizne pripady:\n // - existuje zaciatok nejakeho obdobia v nasom\n // - existuje koniec nejakeho obdobia v nasom\n // - nejake obdobie kompletne prekryva nase obbodie\n // pricom vzdy sa ignoruje nase obdobie (kvoli update ktory by bol kolizny so sebou)\n // a zaroven nie su kolizie ak bezi vaicero akcii na viacero inych semestrov\n $sql =\n \"SELECT id, \".\n DateConvert::DBTimestampToSkDateTime(\"zaciatok\"). \" AS zaciatok, \".\n DateConvert::DBTimestampToSkDateTime(\"koniec\"). \" AS koniec\n\t\t\tFROM rozvrhova_akcia\n\t\t\t WHERE \n\t\t\t \t((zaciatok>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t zaciatok<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\t\n\t\t\t \t(koniec>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\n\t\t\t \t(zaciatok<=\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec>=\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\")) AND\n\t\t\t \t id_semester=$3\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester);\n // ak je edit TREBA aj vylucit koliziu so sebou\n if (!empty($this->id))\n {\n $sql .= \" AND id<>$4\";\n $params[] = $this->id;\n }\n $this->dbh->query($sql, $params);\n\n if ($this->dbh->RowCount()>0)\n {\n $kolizia = $this->dbh->fetch_assoc();\n return \"{$kolizia[\"zaciatok\"]} - {$kolizia[\"koniec\"]}\";\n } else return null;\n }", "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 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 provjeri_oglase(){\n\t\tglobal $db;\n\t\t$oglasi = $db->query(\"SELECT * FROM jf_oglasi WHERE status=1\");\n\t\twhile($podatak = $oglasi->fetch_assoc()){\n\t\t\tif (date(\"d-m-Y\", strtotime($podatak['konkurs_end'])) < date(\"d-m-Y\")){\n\t\t\t\t$db->query(\"UPDATE jf_oglasi SET status=0 WHERE id={$podatak['id']}\");\n\t\t\t}\n\t\t}\n\t}", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \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 }", "function checkPrzygoda($who){\n\t$r = polacz();\n\t$przygoda = getFromDB($r,'players','Przy_ID','ID_Player',$who);\n\tif($przygoda) {\n\t\t$czas = date('Y-m-d H:i:s');\n\t\t$zapytanie = \"SELECT * FROM przygody INNER JOIN przygody_types ON przygody.Przy_Type_ID = przygody_types.ID_Przy_Type WHERE ID_Przy = \" . $przygoda . \";\";\n\t\t$res = $r->query($zapytanie);\n\t\t$row = $res->fetch_assoc();\n\t\tif ($row) {\n\t\t\t$end = strtotime($row['Started']) + ($row['For_Time'] * 60);\n\t\t\t$diff = ($end - strtotime($czas));\n\t\t\tif ($diff <= 0) {\n\t\t\t\t$money = floor($row['For_Time'] * (0.4 + $row['Difficulty']));\n\t\t\t\t$exp = floor($row['For_Time'] * (0.8 + $row['Difficulty']));\n\t\t\t\tif (getFromDB($r, 'users', 'PERMISSIONS_ID', 'PLAYERS_ID', $who) <= 1) {\n\t\t\t\t\t$money = floor($money * 1.5);\n\t\t\t\t\t$exp = floor($exp * 1.5);\n\t\t\t\t}\n\t\t\t\t$kasa = getFromDB($r, 'players', 'Money_Player', 'ID_Player', $who);\n\t\t\t\t$dos = getFromDB($r, 'players', 'Experience', 'ID_Player', $who);\n\t\t\t\t$kasa += $money;\n\t\t\t\t$dos += $exp;\n\t\t\t\t$dataKoniec = date('Y-m-d H:i:s', $end);\n\t\t\t\t$zapytanie = \"UPDATE players SET Experience = '\" . $dos . \"', Money_Player = '\" . $kasa . \"', Przy_ID = NULL WHERE ID_Player = \" . $who . \";\nINSERT INTO komunikaty (PLAYER_ID, Komunikat, Kom_Typ_ID, Data_Kom) VALUES ('\" . $who . \"', 'Twoja przygoda na \" . $row['Name_Przy'] . \" się zakończyła. Zysk: Haisy-\" . $money . \", Doświadczenie-\" . $exp . \".', '0', '\" . $dataKoniec . \"');\nDELETE FROM przygody WHERE ID_Przy = \" . $przygoda . \";\";\n\t\t\t\t$res = $r->multi_query($zapytanie);\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "final function velcom(){\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function sortPredvidjanjeNovo() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najnovija_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "function ispisiNotifikaciju($idNovosti){\n\t\t$autorID = nadjiAutora();\n\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From novost WHERE id = :id AND autor_id = :idAutora\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->bindValue(':idAutora', $autorID);\n\t\t$upit->execute();\n\t\t\n\t\t//autor novosti nije korisnik koji je prijavljen\n\t\tif($upit->rowCount() <= 0) return; \n\n\t\t$broj = brojNeprocitanih($idNovosti);\n\t\tif($broj > 0){\n\t\t\tprint \"<p>Broj nepročitanih komentara: \";\n\t\t\tprint $broj;\n\t\t\tprint \"</p>\";\n\t\t}\t\t\n\t}", "public function odgovoriNaPitanje($idPitanje = null) {\n $controller = session()->get('controller');\n\n if ($idPitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // ako je nepostojeci id treba vratiti korisnika na pocetnu stranu\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n if ($pitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // koje sve poruke mogu da se prikazu korisniku\n $porukaTekstOdgovora = null;\n $porukaNemaPravaDaOdgovori = null;\n\n // provera da li je unet tekst odgovora posto je obavezno polje\n if (!$this->validate(['TekstOdgovora' => 'required'])) {\n $porukaTekstOdgovora = \"Morate da unesete tekst odgovora - to je obavezno polje!\";\n }\n\n // provera da li korisnik ima pravo da odgovori na izabrano pitanje\n // ako korisnik nije psiholog a na pitanje smeju samo psiholozi da odgovore potrebno je ispisati poruku korisniku\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n $moguSviDaOdgovore = $pitanje->moguSviDaOdgovore;\n $korisnikModel = new KorisnikModel();\n $idKategorijaKorisnika = $korisnikModel->find(session()->get('userid'))->tipKorisnika_idTipKorisnika;\n // psiholozi su idKategorijaKorisnika=2 \n if ($moguSviDaOdgovore == 0 && $idKategorijaKorisnika != 2) {\n $porukaNemaPravaDaOdgovori = \"Na ovo pitanje imaju pravo samo registrovani psiholozi da odgovore!\";\n }\n\n // ako nije unet tekst odgovora ili korisnik nema prava da odgovori ispisati mu poruke, odbacuje se unos odgovora\n if ($porukaTekstOdgovora != null || $porukaNemaPravaDaOdgovori != null) {\n echo view(\"odgovori_na_pitanje\", ['pitanje' => $pitanje, 'porukaTekstOdgovora' => $porukaTekstOdgovora, 'porukaNemaPravaDaOdgovori' => $porukaNemaPravaDaOdgovori]);\n return;\n }\n\n $odgovorModel = new OdgovorModel();\n $anonimno = $this->request->getVar('anonimus');\n $odgovorModel->save([\n 'pitanje_idPitanje' => $idPitanje,\n 'korisnik_idKorisnik_odgovorio' => session()->get('userid'),\n 'tekstOdgovora' => $this->request->getVar('TekstOdgovora'),\n 'odgovorenoAnonimno' => $anonimno == \"1\" ? true : false\n ]);\n\n $controller = session()->get('controller');\n // kada se sacuva odgovor na pitanje, redirect korisnika na prikaz svih odgovora na to pitanje\n return redirect()->to(site_url(\"$controller/pregledOdgovora?pretraga=$idPitanje\"));\n }", "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}", "public function hapus_toko(){\n\t}", "public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "public function prijavaDogadjaj($idObj){\n $objavaModel = new ObjavaModel();\n $korisnik=$this->session->get('korisnik');\n $brPotrebnihClanova = $objavaModel->dohvatiBrPotrebnihClanova($idObj);\n $brPrijavljenihClanova = $objavaModel->dohvatiBrPrijavljenihClanova($idObj);\n //if(($objavaModel->dohvatiBrPotrebnihClanova($idObj)>$objavaModel->dohvatiBrPrijavljenihClanova($idObj)) && (!$this->proveraPostoji($idObj, $korisnik->idKor))){\n if(($brPotrebnihClanova>$brPrijavljenihClanova) && (!$this->proveraPostoji($idObj, $korisnik->idKor))){\n $objavaModel->povecajBrPrijavljenih($idObj); \n $this->upisiPrijavu($idObj, $korisnik->idKor); \n $this->objava($idObj);\n }\n //else if(!($objavaModel->dohvatiBrPotrebnihClanova($idObj)>$objavaModel->dohvatiBrPrijavljenihClanova($idObj))){\n else if(!($brPotrebnihClanova>$brPrijavljenihClanova)){\n $this->session->set(\"porukaGreska\", \"Sva mesta popunjena!\");\n $this->objava($idObj);\n }\n else{\n $this->session->set(\"porukaGreska\", \"Vec si prijavljen!\");\n $this->objava($idObj);\n }\n }", "public function index($id){\n\t\t$po_prostu_pokaz = true;\n\t\t$user = $this->session->zalogowany;\n\t\tif($dane = $this->baza->czy_zlecenie_istnieje($id)){\n\t\t\t$dane[0]->nick = $this->baza->daj_nick($dane[0]->zlecajacy_id);\n\t\t\t$prace = $this->baza->prace();\n\t\t\t$aktualna_data = date('Y-m-d');\n\t\t\t$aktualna_godzina = date('H:i');\n\t\t\tif($this->baza->czy_zlecenie_aktualne($id,$aktualna_data,$aktualna_godzina)){\n\t\t\t\t//zlecenie aktualne\n\t\t\t\tif($user != null){\n\t\t\t\t\tif($dane[0]->zlecajacy_id != $user){\n\t\t\t\t\t\t//nie jesteś zlecającym\n\t\t\t\t\t\t$zwyciezca = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($zwyciezca)==0){\n\t\t\t\t\t\t\t//jeszcze nie wybrano zwycięzcy\n\t\t\t\t\t\t\tif(!$this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//nie zgłosiłeś się jeszcze\n\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t$zgloszenie = $this->input->post('zlecenie_zgloszenie');\n\t\t\t\t\t\t\t\tif($zgloszenie != null){\n\t\t\t\t\t\t\t\t\t//wyświetl komunikat informujący o poprawnym zgłoszeniu się\n\t\t\t\t\t\t\t\t\t$this->baza->dodaj_zgloszenie($id,$user);\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>1));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//wyswietl widok z możliwością zgłoszenia się do niego\n\t\t\t\t\t\t\t\t\t//aktualne - true,jestes_zlecajacym=false,zgloszono_sie=false\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//wybrano zwycięzcę\n\t\t\t\t\t\t\tif($this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//zgłoszono się\n\t\t\t\t\t\t\t\tif($this->baza->czy_wygrales_zlecenie($id,$user)){\n\t\t\t\t\t\t\t\t\t//jesteś zwycięzcą\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$status = $zwyciezca[0]->status;\n\t\t\t\t\t\t\t\t\tif($status == 0){\n\t\t\t\t\t\t\t\t\t\t//zostałeś wybrany przez zlecającego\n\t\t\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t\t$podjecie = $this->input->post('zlecenie_podjecie');\n\t\t\t\t\t\t\t\t\t\tif($podjecie != null){\n\t\t\t\t\t\t\t\t\t\t\t//komunikat o pomyślnym podjęciu się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->baza->potwierdz_podjecie($id);\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>1));\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//strona z możliwością potwierdzenia podjecia się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>0));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//zalogowany jest zlecajacym\n\t\t\t\t\t\t$jestes_zlecajacym = true;\n\t\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($dane_zwyciezcy)==0){\n\t\t\t\t\t\t\t//nie wybrano zwycięzcy\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$wybrany = $this->input->post('zlecenie_zwyciezca');\n\t\t\t\t\t\t\tif($wybrany != null){\n\t\t\t\t\t\t\t\t$this->baza->wybierz_zwyciezce($id,$wybrany);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//wyświetl listę zgłoszeń\n\t\t\t\t\t\t\t\t//daj możliwość wybrania jednego\n\t\t\t\t\t\t\t\t$zgloszenia = $this->baza->lista_zgloszen($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>$zgloszenia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//zlecenie po czasie wykonania\n\t\t\t\t$user = $this->session->zalogowany;\n\t\t\t\tif($dane[0]->zlecajacy_id == $user){\n\t\t\t\t\t//jesteś zleceniodawcą\n\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\tif(count($dane_zwyciezcy)>0){\n\t\t\t\t\t\t//ktoś wygrał\n\t\t\t\t\t\t$status = $dane_zwyciezcy[0]->status;\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość potwierdzenia wykonania\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$potwierdzono = $this->input->post('zlecenie_potwierdzenie');\n\t\t\t\t\t\t\tif($potwierdzono != null){\n\t\t\t\t\t\t\t\t$this->baza->potwierdz_wykonanie($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'potwierdzenie'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if($status == 2){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość ocenienia\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$ocena = $this->input->post('zlecenie_ocena');\n\t\t\t\t\t\t\t$komentarz = $this->input->post('zlecenie_komentarz');\n\t\t\t\t\t\t\tif($ocena != null && $komentarz != null){\n\t\t\t\t\t\t\t\t$this->baza->ocen($id,$dane_zwyciezcy[0]->zglaszajacy_id,$ocena,$komentarz);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($po_prostu_pokaz){\n\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->load->view('blad',array('komunikat'=>'Nie ma takiego zlecenia!'));\n\t\t}\n\t}", "public function cortesia()\n {\n $this->costo = 0;\n }", "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}", "public function obtenerViajesplus();", "function prn_wejscie() {\n global $Cuzytkownik,$db, $_GLOBAL, $L;\n \n $DD[] = \"IT_AKTYWACJA\";\n \n $query = \"select * from \" . dn('kontrahent') . \" where ko_id=\" . $Cuzytkownik->get_id() . \";\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n $A['{PANELTITLE}'] = $dane['ko_nazwa'];\n \n // <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dlaciebie/\"><div>' . $L['{T_SPECJALNIE_DLA_CIEBIE}'] . '</div></a></div>\n $A['{PANELMENU}'] = '<div class=\"steps\">\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/rabat/\"><div>' . $L['{T_TWOJ_RABAT}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/obserwowane/\"><div>' . $L['{T_OBSERWOWANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dane/\"><div>' . $L['{T_MOJE_DANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/zamowienie/\"><div>' . $L['{T_HISTORIA_ZAMOWIEN}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/koszyk/\"><div>' . $L['{T_PRZEJDZ_DO_KOSZYKA}'] . '</div></a></div>\n </div>';\n\n $query = \"select * from \" . dn('cms') . \" where st_id=72;\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n \n if ($_GLOBAL['langid'] == 2) {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc_en']);\n } else {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc']); \n }\n \n return get_template(\"user_enter\",$A,$DD);\n }", "public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "public function sortPredvidjanjePopularno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najpopularnija_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public function testKojiPreskacem()\n {\n $this->markTestSkipped(\"ovaj test je namjerno prekocen\");\n }", "function pobierz_urle_uzyt($nazwa_uz) {\r\n // pobranie z bazy danych wszystkich URL-i danego u�ytkownika\r\n $lacz = lacz_bd();\r\n $wynik = $lacz->query(\"select URL_zak\r\n from zakladka\r\n where nazwa_uz = '\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n return false;\r\n }\r\n\r\n // tworzenie tablicy URL-i\r\n $tablica_url = array();\r\n for ($licznik = 0; $rzad = $wynik->fetch_row(); ++$licznik) {\r\n $tablica_url[$licznik] = $rzad[0];\r\n }\r\n return $tablica_url;\r\n}", "public function Atak ($obronca){\n\t\t\t\n\t\t\t$agility = $obronca->getAgility();\n\t\t\t\n\t\t\tif ($obronca->getDefense()){ //warunek sprawdzający, czy gracz użył obrony\n\t\t\t\t$agility *= 1.5; //zwiększenie zręczności o 50% \n\t\t\t\t$obronca->setDefense(false); //wyłączenie obrony (w następnej turze zręczność będzie wynosiła 100% maksymalnej wartości)\n\t\t\t}\n\t//określenie współczynnika skuteczności ataku\t\t\n\t\t\t$sk = (($this->getAgility() - $agility) / $agility ) * 100;\n\t\t\t\t\n\t\t\t\tif ($sk>90) //ograniczenie skrajności (nie będzie mniej niż 10% a więcej niż 90%)\n\t\t\t\t\t$sk=90;\n\t\t\t\telse if($sk<10)\n\t\t\t\t\t$sk=10;\n\t\t\t\t\n\t//warunek odpowiedzialny za skuteczność ataku. \n //jeśli skuteczność ataku jest większa lub równa wylosowanej liczbie to atak się powiedzie \t\n\t\t\t\tif ($sk>=rand(1,100)){\n\t\t\t\t\t$obronca->setHP($obronca->getHP()-$this->getStrength());\n\t\t\t\t\techo 'Atak sie powiodl, zabral '.$this->getStrength().' HP, pozostalo zycia '.$obronca->getHP().' z '.$obronca->getMaxHP().'.', PHP_EOL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo \"Atak chybil o wlos!\", PHP_EOL;\n\t\t\t\t\n\t\t\t$this->setPunktyAkcji($this->getPunktyAkcji()-1);\t //zmniejsze punktów akcji o 1 (koszt ataku)\n\t\t}", "public static function Znevalidni_kolize_ucastnika_formulare($iducast,$formular) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and s_typ_kolize.formular='\" . $formular . \"' and uc_kolize_table.valid\" ;\r\n \r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika_formulare: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n \r\n while($zaznam_kolize = $sth->fetch()) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function uprav_pretek ($NAZOV, $DATUM, $DEADLINE,$POZNAMKA){\r\n if(!$this->ID){\r\n return false;\r\n }\r\n $NAZOV2 = htmlentities($NAZOV, ENT_QUOTES, 'UTF-8');\r\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\r\n $text = $POZNAMKA;\r\n\r\n if(preg_match($reg_exUrl, $text, $url) && !strpos($text, \"</a>\") && !strpos($text, \"</A>\") && !strpos($text, \"HREF\") && !strpos($text, \"href\")) {\r\n\r\n // make the urls hyper links\r\n $text = preg_replace($reg_exUrl, \"<a href=\".$url[0].\">{$url[0]}</a> \", $text);\r\n\r\n}\r\n\r\n $POZNAMKA2 = htmlentities($text, ENT_QUOTES, 'UTF-8');\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n UPDATE PRETEKY set NAZOV = \"$NAZOV2\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DATUM = \"$DATUM\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DEADLINE = \"$DEADLINE\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set POZNAMKA = \"$POZNAMKA2\" where ID=\"$this->ID\";\r\n DELETE FROM KATEGORIE_PRE_$this->ID;\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n } else {\r\n \r\n }\r\n $db->close();\r\n }", "function isNaikGaji($conn,$idpegawai,$tglkgb){\n\t\t\t$tglkgb = Cstr::formatDate($tglkgb);\n\t\t\t$bln = substr($tglkgb,5,2);\n\t\t\t$isnaik = true;\n\t\t\t//cek apakah pegawai sudah diproses naik pangkat\n\t\t\t$kgb = $conn->GetOne(\"select idpegawai from \".self::table('pe_kgb').\" \n\t\t\t\t\twhere idpegawai = $idpegawai and datepart(month,tglkgb)='$bln'\");\n\t\t\t\t\t\n\t\t\n\t\t\tif(!empty($kgb))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t//mendapatkan next pangkat\n\t\t\t$rown = mKenaikan::getNaikGaji($conn,$idpegawai,$tglkgb);\n\t\t\t\n\t\t\t//cek untuk status pegawai yang naik pangkat\n\t\t\t$sql = \"select p.idpegawai,coalesce(p.nik+' - ','')+\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as pegawai,\n\t\t\t\t\tu.kodeunit+' - '+u.namaunit as namaunit,pl.golongan as golonganlama,p.tmtpangkat as tmtpangkatlama,cast(p.masakerjathngol as varchar)+' tahun '+cast(p.masakerjablngol as varchar)+' bulan' as mklama,\n\t\t\t\t\t'\".$rown['idpangkat'].\"' as pangkatbaru,'\".$rown['tmtpangkat'].\"' as tmtpangkat,substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),1,2) as mkthn, substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),3,2) as mkbln\n\t\t\t\t\tfrom \".self::table('ms_pegawai').\" p\n\t\t\t\t\tleft join \".self::table('ms_unit').\" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pl on pl.idpangkat=p.idpangkat\n\t\t\t\t\tleft join \".self::table('pe_kgb').\" k on k.idpegawai=p.idpegawai and k.tglkgb = '$tglkgb'\n\t\t\t\t\twhere p.idpegawai = $idpegawai and p.idstatusaktif = 'AA'\";\n\t\t\t$row = $conn->GetRow($sql);\t\n\t\t\t\t\t\t\n\t\t\tif(empty($row))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t$a_data = array('kgb' => $kgb, 'row' => $rown, 'isnaik' => $isnaik, 'sql' => $sql);\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "public function neVoliPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3); //slobodno promeniti nacin dohvatanja, poenta je da mi treba predvidjanje koje je voljeno\n $voliModel=new VoliModel();\n if ($voliModel->vec_voli($korisnik->IdK, $predvidjanjeId))\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanjeModel->voli($predvidjanjeId, false);\n $posl_id=$voliModel->poslednji_vestackiId();\n $voliModel->voli($korisnik->IdK, $predvidjanjeId, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "public function oceniPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3);\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanje= $predvidjanjeModel->dohvati_predvidjanja_id($predvidjanjeId); \n $ocena=$_POST[$predvidjanjeId];//pretpostavljam da ce tako biti najlakse dohvatiti, slovbodno promeniti\n $oceniModel=new DajeOcenuModel();\n \n if ($oceniModel->vec_dao_ocenu($korisnik->IdK, $predvidjanje->IdP) || date(\"Y-m-d H:i:s\")>$predvidjanje->DatumEvaluacije)\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n \n \n $predvidjanjeModel->daje_ocenu($predvidjanje->IdP, $ocena);\n $posl_id=$oceniModel->poslednji_vestackiId();\n $oceniModel->daje_ocenu($korisnik->IdK, $predvidjanje->IdP, $ocena, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "public function nahrajObrazky(){\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 1 \";\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}", "public function getBanyakSoal();", "public static function prijavi($upime, $geslo)\n\t{\n\t\t$db = Db::getInstance();\n\t\t//začnemo sejo, dobimo podatke iz PB (recimo ka nemreta meti istoga imena, kak je že v večini primerov gnesden)\n\t\t//Db::sessionStart();\n\t\t$result = mysqli_query($db, \"SELECT ID, upime, geslo FROM oseba WHERE upime='$upime'\");\n\t\n\t\t$row = mysqli_fetch_array($result);\n\t\t//tu dobimo isti hash, s kerin smo koderali (ali kak se tumi pravi) geslo, zato ka ga te v if stavki ponucamo za primerjavo\n\t\t\n\t\t//primerjamo podatke keri so v bazi pa vpisani podatki, password_verify pa je kak san že prej napisao za primerjavo vpisanoga gesla pa hash_gesla iz baze\n\t\tif($row[1] == $upime && password_verify($geslo, $row[2]))\n\t\t{\n\t\t\t//če smo vpisali prave podatke, shranimo v sejo ID uporabnika (mogoče bi ime?)\n\t\t\t$_SESSION[\"id\"]=$row[0];\n\t\t\t//dobimo id, pa zovemo uspesnaPrijava.php v keroj izpišemo ka smo se prijavili, pa povezava do \"home\" je not\n\t\t\t//$oseba = Oseba::najdi($row[0]);\n\t\t\t$query = mysqli_query($db, \"INSERT INTO osebaAktivna (osebaID) VALUES ('$row[0]')\");\n\t\t\t\n\t\t\terror_reporting(E_ALL);\n\t\t require_once('views/osebe/uspesnaPrijava.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//če nejsmo vnesli pravih podatkov, zovemo stran napakaPrijava.php, v keroj je izpis o ton ka smo napačne podatki dali, pa link za nazaj (torej na stran prijavi.php)\n\t\t require_once('views/osebe/napakaPrijava.php');\n\t\t}\n\t}", "public function nuevap5()\n {\n \t$sitios=request('pois');\n $mod=session('mod');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx\n from poi where poi.id_poi in('.$sitios.')');\n $poi=explode(\",\",$sitios);\n $cd=[];\n $pois=array();\n $ban=9999999;\n $vmin=[];\n for ($i=0; $i <count($poi); $i++) { \n foreach ($consult as $key) {\n if ($poi[$i]==$key->id_poi) {\n $cd[]=$key->cy.','.$key->cx;\n $this->pn[$key->id_poi]=$key->pn.\" \";\n }\n }\n }\n for($a=0;$a<count($cd);$a++){\n for ($b=0;$b<count($cd);$b++) { \n if ($a==$b) {\n $pois[$a][$b]=-1;\n }else{\n // se arma la tabla de distancias con todos los puntos de interes que pasaron los filtros anteriores\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$cd[$a].';'.$cd[$b].'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $pois[$a][$b]=$data->trips[0]->distance; \n }\n }\n \n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($i!=$j) {\n if (bccomp($pois[$i][$j],$ban,10)==-1) {\n $min=($pois[$i][$j]);\n $ban=($pois[$i][$j]);\n }\n }\n }\n \n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) {\n if ($i!=$j) {\n $pois[$i][$j]=($pois[$i][$j])-$vmin[$i];\n }\n\n }}\n $vmin=[];\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n if (bccomp($pois[$j][$i],$ban,10)==-1) {\n $min=($pois[$j][$i]);\n $ban=($pois[$j][$i]);\n }\n }\n }\n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n $pois[$j][$i]=($pois[$j][$i])-$vmin[$i];\n }\n }\n } \n\n $a=0;\n // Luego de eliminar de la tabla de distancias los caminos mas largos,se envia la matriz al metodo formar_posi\n $this->lista_rutas[] = new route();\n $this->n_poi=count($poi);\n $this->poi=$poi;\n $this->matriz=$pois; \n $this->poi_conectados[] = new Conexion(); \n for($i = 0; $i < count($this->matriz); $i++) {\n $poi_c = new Conexion();\n for ($j = 0; $j < count($this->matriz); $j++) {\n if ($this->matriz[$i][$j]!=\"-1\") { \n $poi_c->setConexiones($j);\n $poi_c->setValor($this->matriz[$i][$j]);\n \n }\n }\n $this->poi_conectados[]=($poi_c);\n \n }\n \n $this->formar_posi($x=Array(),$y=Array(), 0, \"0\");\n //Finalmente envia al recorrido a la siguiente vista\n $result=$this->rutas_aptas();\n return view('guardarr')->with('rt',$result)->with('p',$this->pn);\n\n }", "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 zpracuj($parametry) {\r\n $akce = \"new\";\r\n\r\n // bude-li odeslano take z formulare ma _POST prednost pred URL\r\n if (isset($_POST['akce'])&& (!empty($_POST['akce']))) {\r\n $akce = $_POST['akce'];\r\n } else {\r\n if (isset($parametry[0]) and in_array($parametry[0], ObjektKontroler::$typakce))\r\n $akce = $parametry[0];\r\n };\r\n\r\n if ((!isset($_POST['list'])) and isset($parametry[1]))\r\n $_POST['list'] = $parametry[1];\r\n\r\n\t\t//Debug::p($akce);\r\n\r\n $this->pohled = 'nabidka'; // Nastavení implicitni šablony\r\n // Hlavička stránky\r\n $this->hlavicka['titulek'] = 'Editor nabidky';\r\n $nab = new NhlavickaClass();\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka XY\";\r\n\t\t$nab->data[\"id\"] = $nab->insert($nab->data);\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka \".$nab->data[\"id\"] ;\r\n // Byl odeslán formulář\r\n if ($akce == \"new\") {\r\n\t\t\tif ( empty($_POST['list'])){\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//je to seznam objektu oddelenych carkou \"15,12,78\"\r\n\t\t\t\t$polozky = explode(\",\",$_POST['list']);\r\n\t\t\t\tforeach ($polozky as $polID){\r\n\t\t\t\t\t$obj = new ObjektClass();\r\n\t\t\t\t\t$obj->get($polID);\r\n\t\t\t\t\t$pol = new NpolozkaClass();\r\n\t\t\t\t\t$pol->setByObjekt($obj);\r\n\t\t\t\t\t$pol->insert();\r\n\t\t\t\t}\r\n\t\t\t}\r\n $this->data = $nab->data; // Proměnné pro šablonu\r\n $this->data['titulek'] = 'Nová nabídka';\r\n\t\t\t// po odeslani formulare uloz\r\n $this->data['akce'] = 'insert';\r\n\t\t\t// $akce = 'insert'; // po odeslani formulare uloz\r\n }\r\n\r\n if ($akce == \"view\") {\r\n $nab->get($parametry[1]);\r\n $nab->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $nab->data), $nab->data);\r\n $this->data = $nab->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Detail nabídky ' . $nab->data['nazev'];\r\n Zprava::zobraz('Objekt k detailu byl vybrán');\r\n $this->pohled = 'DetailObjekt';\r\n }\r\n if ($akce == \"ObnovSkryj\") {\r\n DB::proved(\"UPDATE objekt SET status = (- status) WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl zneplatněn');\r\n $this->presmeruj('/objekt/edit/' . $parametry[1]);\r\n }\r\n if ($akce == \"delete\") {\r\n DB::proved(\"DELETE FROM obr WHERE id_objekt= ? \", array($parametry[1]));\r\n\t\t\tDB::proved(\"DELETE FROM objekt WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl smazán');\r\n $this->presmeruj('/');\r\n }\r\n\r\n\r\n if ($akce == \"insert\") {\r\n\r\n $nab->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $nab->data['status'] = 1;\r\n $this->data = $nab->data;\r\n // zaloz noveho\r\n $this->data['objekt_id'] = $nab->insert($nab->data);\r\n $this->data['titulek'] = 'Editace objektu';\r\n // budu ho pak editovat\r\n $this->data['akce'] = 'edit';\r\n Zprava::zobraz('Objekt byl založen');\r\n $this->presmeruj('/nabidka/edit/' . $this->data['id']);\r\n }\r\n\r\n if ($akce == \"edit\") {\r\n //najdu objekt podle objekt_id\r\n $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $obj->data), $obj->data);\r\n $this->data = $obj->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl vybrán');\r\n }\r\n if ($akce == \"save\") {\r\n\t\t\t//najdu objekt podle objekt_id\r\n\t\t\t// $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $this->data = $obj->data;\r\n $obj->data['status'] = 2;\r\n $obj->update($obj->data);\r\n $this->data['akce'] = 'edit';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl upraven');\r\n\t\t\t// //pridam obrazky udelam to pres Ajax\r\n\t\t\t// $img = new ObrClass();\r\n\t\t\t// $img->data['id_objekt'] = $obj->data['objekt_id'];\r\n\t\t\t// $img->insertFILES();\r\n $this->presmeruj('/nabidka/edit/' . $this->data['objekt_id']);\r\n }\r\n\r\n if ($akce == \"seznam\") {\r\n //seznam vsech objektu\r\n $obj->select( ' status >= ? ', Array(0) );\r\n // Debug::p($obj);\r\n $this->data['seznam'] = $obj->data;\r\n $this->data['akce'] = 'seznam';\r\n $this->data['titulek'] = 'Seznam objektů';\r\n Zprava::zobraz('Vybráno ' . count($this->data['seznam']) . ' objektů');\r\n // $this->presmeruj('/objekt');\r\n $this->pohled = 'objekty';\r\n if (isset($parametry[1]) and $parametry[1] === 'T')\r\n $this->pohled = 'objektyTab';\r\n }\r\n }", "public function sortIdejaAktuelno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $ideje=$idejaModel->dohvati_najaktuelnije_ideje(); \n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data); \n }", "function f_obj($individu){\n\t\t$cluster = count($individu); //menghitung jumlah cluster berdasarkan individu\n\t\t$target = 10;\n\t\t$hasil = 0;\n\t\tfor ($i=0; $i < $cluster; $i++) { \n\t\t\t$hasil += $individu[$i];\n\t\t}\n\n\t\t$evaluasi = abs($hasil - $target);\n\t\treturn $evaluasi; //nilai fitness masih 0-10\n\t}", "public function zahtev_za_prijavu()\n {\n if(!$this->validate(['uname'=>'required|min_length[5]|max_length[30]', 'pword'=>'required|min_length[8]|max_length[20]']))\n return $this->prijava($this->validator->getErrors());\n $pwordhash = hash(\"sha256\",$this->request->getVar('pword'));\n $km = new korisnikModel();\n $korisnici = $km->pretraga_kIme($this->request->getVar('uname'));\n if(count($korisnici)==1)\n {\n if($korisnici[0]->sifra==$pwordhash)\n {\n if($korisnici[0]->tipKorisnika<3)\n {\n $tipK = ['Administrator','Predstavnik','Kupac'];\n $sessiondata=['idK'=>$korisnici[0]->idKorisnik,\n 'tipK'=>$tipK[$korisnici[0]->tipKorisnika]];\n $this->session->set($sessiondata);\n }\n if($korisnici[0]->tipKorisnika==0) return redirect()->to(site_url('Administrator/index'));\n else if($korisnici[0]->tipKorisnika==1) return redirect()->to(site_url('Predstavnik/index'));\n else if($korisnici[0]->tipKorisnika==2) return redirect()->to(site_url('Kupac/index'));\n else return $this->prijava('Administrator jos uvek nije odobrio zahtev');\n }\n return $this->prijava('Sifra nije ispravna');\n }\n return $this->prijava('Korisnik sa tim imenom ne postoji');\n }", "function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }", "function dodajKorisnika(Korisnik $k);", "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\n }", "function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }", "public function pasaje_abonado();", "public function sortIdejaPopularno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $ideje=$idejaModel->dohvati_najpopularnije_ideje(); \n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }", "public function traerCualquiera()\n {\n }", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}", "public function extra_voor_verp()\n\t{\n\t}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function verMas()\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $use;\r\n\t\t\tglobal $priv;\r\n\r\n\t\t\t//NOTA: Para ver si funciona tienen que asociarle un adherente en la tabla socios, ya que en los datos de ejemplo todos son titulares\r\n\t\t\t//NOTA: Lo que hice fue: en tabla socios en numero_soc=00044 cambiar el campo soc_titula de manera que quede soc_titula=00277\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t$numero_socio = $_GET['num_soc']; //Es el número del socio titular que debe ser tomado del PASO 1\r\n\t\t\t\r\n\r\n\t\t\t\t$resultadoTitular = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t\t\t\t\t\t FROM socios,persona \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\");\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t\t\tif(!$resultadoTitular)\r\n\t\t\t{\r\n\t\t\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"verMas\",\r\n\t\t\t\t'descripcion'\t=>\"No se encuentra al titular $numero_socio\"\r\n\t\t\t\t];\r\n\t\t\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t///---FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$fecha=$resultadoTitular[0]['fecnacim'];\r\n\t\t\t$dias = explode(\"-\", $fecha, 3);\r\n\t\t\t\r\n\t\t\t// $dias[0] es el año\r\n\t\t\t// $dias[1] es el mes\r\n\t\t\t// $dias[2] es el dia\r\n\t\t\t\r\n\t\t\t// mktime toma los datos en el orden (0,0,0, mes, dia, año) \r\n\t\t\t$dias = mktime(0,0,0,$dias[1],$dias[2],$dias[0]);\r\n\t\t\t$edad = (int)((time()-$dias)/31556926 );\r\n\t\t\t$resultadoTitular[0]['edad']=$edad;\r\n\t\t\t\r\n\t\t\t///---FIN FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$estado[0]='1';\r\n\t\t\t$estado[1]='1';\r\n\t\t\t$estado[2]='1';\r\n\t\t\t$estado[3]='1';\r\n\t\t\t$estado[4]='1';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS SERVICIOS DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t//Por cuota\r\n\t\t\t$resultadoTitularServicios1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\tif(!$resultadoTitularServicios1)\r\n\t\t\t\t$estado[0]='0';\r\n\t\t\t\r\n\t\t\t//Por tarjeta\r\n\t\t\t$resultadoTitularServicios2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.soc_titula \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoTitularServicios2)\r\n\t\t\t\t$estado[1]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR CUOTA----------------\r\n\t\t\t\r\n\r\n\t\t $resultadoAdherentes1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes1)\r\n\t\t\t\t$estado[2]='0';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR TARJETA----------------\r\n\r\n\t\t\t$resultadoAdherentes2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes2)\r\n\t\t\t\t$estado[3]='0';\r\n\t\t\r\n\t\t \r\n\t\t\t//---------------CONSULTA QUE DEVUELVE EL LISTADO DE TODAS LAS ASISTENCIAS----------------\r\n\t\t\t\r\n\t\t\t//NOTA: Para que puedan ver si funciona o no hacer la prueba con el siguiente ejemplo:\r\n\t\t\t// En la tabla fme_asistencia modifiquen en cualquier lado y pongan alguno con doctitu = 06948018 (o busquen cualquier DNI de un socio titular y usen ese)\r\n\t\t\t// Cuando prueben el sistema vayan al ver más de Barrionuevo Samuel y van a ver el listado de atenciones que tiene asociado\r\n\t\t\t\r\n\t\t\t$asistencias = $GLOBALS['db']->select(\"SELECT fme_asistencia.doctitu, fme_asistencia.numdoc, fme_asistencia.nombre,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.fec_pedido, fme_asistencia.hora_pedido, fme_asistencia.dessit, fme_asistencia.fec_ate,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.sintomas, fme_asistencia.diagnostico, fme_asistencia.tratamiento, fme_asistencia.hora_aten,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.profesional\r\n\t\t\t\t\t\t\t\t\t FROM fme_asistencia, socios, persona \r\n\t\t\t\t\t\t\t\t\t WHERE soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND numero_soc = soc_titula\r\n\t\t\t\t\t\t\t\t\t AND persona.numdoc = fme_asistencia.doctitu\");\r\n\t\t\t\r\n\t\t\tif(!$asistencias)\r\n\t\t\t\t$estado[4]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\techo $GLOBALS['twig']->render('/Atenciones/perfil.html', compact('resultadoTitular', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios1', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios2', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes2',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'asistencias',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'estado','use','priv'));\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public function berekenInkoopWaarde() {\n //var_dump(['aantal'=>$this->aantal, 'waarde'=>$this->artikel->verkoopprijs]);\n return $this->aantal * $this->artikel->inkoopprijs;\n }", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "public function elso()\n {\n }", "function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}", "public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "public function iloscMinus($id)\n\t\t{\n\t\t\t$data = array();\n\t\t\t\tif($id === NULL || $id === \"\")\n\t\t\t\t\t$data['error'] = 'Nieokreślone ID!';\n\t\t\t\telse\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$stmt2 = $this->pdo->prepare('SELECT IdTowar, ilosc FROM `koszyk` where IdTowar=:id');\n\t\t\t\t\t\t$stmt2 -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t$ilosc = $stmt2 -> execute();\n\t\t\t\t\t\t$data = $stmt2 -> fetchAll();\n\t\t\t\t\t\tforeach($data as $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilosc = $result['ilosc'];\n\t\t\t\t\t\t\t$idt = $result['IdTowar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($ilosc>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $id.'<br>towary: ';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['idtowary']);\n\t\t\t\t\t\t\t$stmt = $this->pdo->prepare('UPDATE koszyk SET ilosc=ilosc-1 WHERE IdTowar=:id');\n\t\t\t\t\t\t\t$stmt -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t\t$wynik_zapytania = $stmt -> execute();\n\n\t\t\t\t\t\t\t$stmt2 = $this->pdo->prepare(\"update towar set towar.StanMagazynowyDysponowany = towar.StanMagazynowyDysponowany+1 where IdTowar = $idt\");\n\t\t\t\t\t\t\t$stmt2 -> execute();\n\n\t\t\t\t\t\t\t$cookie2 = $_COOKIE['idtowary'];\n\t\t\t\t\t\t\t$cookie2 = stripslashes($cookie2);\n\t\t\t\t\t\t\t$ids = json_decode($cookie2, true);\n\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// echo 'nie ma';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t //echo 'jest';\n\t\t\t\t\t\t\t $indeks = array_search($idt, $ids);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cookie = $_COOKIE['ilosci'];\n\t\t\t\t\t\t\t$cookie = stripslashes($cookie);\n\t\t\t\t\t\t\t$quantity = json_decode($cookie, true);\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false){}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<br>ilosci ';\n\t\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t\t\t$ilosc=$ilosc-1;\n\t\t\t\t\t\t\t $quantity[$indeks]=$ilosc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dane = json_encode($quantity);\n\t\t\t\t\t\t\tsetcookie('ilosci', $dane,time()+60*60*24*30,'/');\n\t\t\t\t\t\t\t$_COOKIE['ilosci'] = $dane;\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(\\PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['error'] =$data['error'].'<br> Błąd wykonywania operacji usunięcia';\n\t\t\t\t\t}\n\t\t\t\t\t/*var_dump($_COOKIE['idtowary']);\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\techo '<br>';*/\n\t\t\t\treturn $data;\n\n\t\t}", "function nbr_auteurs_enligne() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n// nombre d_auteurs depuis 15 mn ()\r\n# inc/auth.php update-set en_ligne => NOW() : \"moment\" de session !\r\n# voir ecrire/action:logout.php\r\n# spip update-set 'en_ligne' datetime -15 mn au logout de session !!??!!\r\n# aff' nbr corresp aux auteurs affiches par spip en bandeau sup !\r\n\r\n\t$q = sql_select(\"COUNT(DISTINCT id_auteur) AS nb, statut \" .\r\n\t\t\"FROM spip_auteurs \" .\r\n\t\t\"WHERE en_ligne > DATE_SUB( NOW(), INTERVAL 15 MINUTE) \" .\r\n\t\t\"AND statut IN ('0minirezo', '1comite', '6forum') \" . // limite statuts spip (autres!)\r\n\t\t\"AND id_auteur != $connect_id_auteur \" .\r\n\t\t\"GROUP BY statut\"\r\n\t);\r\n\r\n\tif (sql_count($q)) {\r\n\t\t$aff .= _T(\"actijour:auteurs_en_ligne\") . \"<br />\\n\";\r\n\t\tWhile ($r = sql_fetch($q)) {\r\n\t\t\tif ($r['statut'] == '0minirezo') {\r\n\t\t\t\t$stat = _T('actijour:abrv_administrateur');\r\n\t\t\t} elseif ($r['statut'] == '1comite') {\r\n\t\t\t\t$stat = _T('actijour:abrv_redacteur');\r\n\t\t\t} elseif ($r['statut'] == '6forum') {\r\n\t\t\t\t$stat = _T('actijour:abrv_visiteur');\r\n\t\t\t}\r\n\t\t\t$aff .= $r['nb'] . \" $stat<br />\\n\";\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t$aff .= _T(\"actijour:aucun_auteur_en_ligne\") . \"\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function noviKorisnik($data) {\n\t\t// kreiranje konekcije\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\n// filtrira i sredjuje string iz json formata\n\t\t$ime = mysqli_real_escape_string($mysqli,$data['imePrezime']);\n\t\t$username = mysqli_real_escape_string($mysqli,$data['username']);\n\t\t$password = mysqli_real_escape_string($mysqli,$data['password']);\n\n\t\t$values = \"('\".$ime.\"','\".$username.\"','\".$password.\"',0)\";\n\n\t\t// upit koji dodaje podatke o novom korisniku\n\t\t$query = 'INSERT into korisnik (imePrezime, username, password, admin) VALUES '.$values;\n\n\t\t// ako je upit vratio true rezultat je true\n\t\tif($mysqli->query($query))\n\t\t{\n\t\t\t$this ->result = true;\n\t\t}\n\t\telse // u suprotnom ako se upit nije lepo izvrsio vrati false\n\t\t{\n\t\t\t$this->result = false;\n\t\t}\n\t\t$mysqli->close(); // zatvaranje konekcije\n\t}", "function nustatome_kintamuosius ($a, $b, $c){\n $this -> modelis = $a;\n $this -> marke = $b;\n $this -> gamybosMetai = $c;\n $this -> spalva = \"Raudona\";\n $this -> duruSkaicius = 5;\n\n }", "function zwrocPytanieZKategorii($ID)\r\n\t{\r\n\t require(\"config.php\");\r\n\t require(\"Pytania.php\");\r\n\t $dbConnect1=new mysqli($Serwer,$DBUser,$DBPassword,$DBName);\r\n $zapytanie1=\"SELECT * FROM pytania WHERE IDKategorii='\".$ID.\"'\";\r\n $wynik =$dbConnect1->query($zapytanie1);\r\n $ile=$wynik->num_rows;\r\n\r\n $tablicaPytan=array();\r\n if($ile<1)\r\n {\r\n $idPytania=0;\r\n }\r\n else\r\n {\r\n for($a=0;$a<$ile;$a++)\r\n {\r\n $Pytanie = new Pytania(); \r\n $wiersz=$wynik->fetch_assoc(); \r\n $Pytanie->ID=$wiersz['IDPytania'];\r\n $Pytanie->Pytanie=$wiersz['Pytanie'];\r\n $Pytanie->OdpowiedzA=$wiersz['OdpowiedzA']; \r\n $Pytanie->OdpowiedzB=$wiersz['OdpowiedzB']; \r\n $Pytanie->OdpowiedzC=$wiersz['OdpowiedzC']; \r\n $Pytanie->OdpowiedzD=$wiersz['OdpowiedzD']; \r\n $Pytanie->Prawidlowa=$wiersz['Prawidlowa'];\r\n $tablicaPytan[$a]=$Pytanie;\r\n }\r\n $wynik->free();\r\n $dbConnect1->close();\r\n $idPytania=$Pytanie->losuj($ile);\r\n for($a=0;$a<count($tablicaPytan);$a++)\r\n {\r\n if($tablicaPytan[$a]->ID==$idPytania)\r\n {\r\n $tablicaPytan[$a]->Pytanie;\r\n return $tablicaPytan[$a];\r\n }\r\n }\r\n }\r\n\t}", "public function testTarjetita() {\n\t\tprint (\"--Cargando 100:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(100);\n\t\t$this->assertEquals(100, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando cargar la tarjeta con un monto especial\n\t\tprint (\"--Cargando 290:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(290);\n\t\t$this->assertEquals(340, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando cargar la tarjeta con otro monto especial\n\t\tprint (\"--Cargando 544:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(544);\n\t\t$this->assertEquals(680, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando un boleto comun\n\t\tprint (\"--Normal:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->colectivo, \"21-09-2016 16:00\");\n\t\t$this->assertEquals($saldoInicial-8.5, $this->tarjeta->getSaldo());\n\n\t\t// probando un trasbordo\n\t\tprint (\"--Trasbordo:\\n\");\n\t\t$this->colectivo = new Colectivo(\"129 Rojo\", \"Rosario Bus\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->colectivo, \"21-09-2016 16:21\");\n\t\t$this->assertEquals($saldoInicial-2.81, $this->tarjeta->getSaldo());\n\n\t\t// probando una bicicleta\n\t\tprint (\"--Bicicleta:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->bicicleta, \"21-09-2016 16:50\");\n\t\t$this->assertEquals($saldoInicial-12, $this->tarjeta->getSaldo());\n\n\t\t// probando el pase libre\n\t\tprint (\"--Libre:\\n\");\n\t\t$this->tarjetaAlternativa = new PaseLibre();\n\t\t$this->tarjetaAlternativa->recargar(50);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:32\");\n\t\t$this->assertEquals($saldoInicial, $this->tarjetaAlternativa->getSaldo());\n\n\t\t// probando el medio\n\t\tprint (\"--Medio:\\n\");\n\t\t$this->tarjetaAlternativa = new MedioBoleto();\n\t\t$this->tarjetaAlternativa->recargar(50);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:32\");\n\t\t$this->assertEquals($saldoInicial-4.25, $this->tarjetaAlternativa->getSaldo());\n\n\t\t// probando los plus\n\t\tprint (\"--Viaje PLUS 2:\\n\");\n\t\t$this->tarjetaAlternativa = new Tarjetita();\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\t$this->tarjetaAlternativa->recargar(4);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:12\");\n\t\t$this->assertEquals($saldoInicial, $this->tarjetaAlternativa->getSaldo());\n\t\t$this->assertEquals(1, $this->tarjetaAlternativa->getPlus());\n\n\t\t// probando que la bici no funcione sin saldo suficiente\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\tprint (\"--Pagando bici sin saldo:\\n\");\n\t\t$viajesIniciales = $this->tarjetaAlternativa->getViajesRealizados();\n\t\t$this->tarjetaAlternativa->pagar($this->bicicleta, \"12-03-2016 20:22\");\n\t\t$this->assertEquals($viajesIniciales, $this->tarjetaAlternativa->getViajesRealizados());\n\n\t\t// probando que no se pueda seguir pagando colectivo luego de 2 plus\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\tprint (\"--Viaje PLUS #1:\\n\");\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 22:39\");\n\t\t$this->assertEquals(0, $this->tarjetaAlternativa->getPlus());\n\t\tprint (\"--Viaje Negado:\\n\");\n\t\t$viajesIniciales = $this->tarjetaAlternativa->getViajesRealizados();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-04-2016 12:18\");\n\t\t$this->assertEquals($viajesIniciales, $this->tarjetaAlternativa->getViajesRealizados());\n\t}", "function brojNeprocitanih($idNovosti){\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From KOMENTAR WHERE novost_id = :id AND PROCITAN = 0\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->execute();\n\t\treturn $upit->rowCount();\n\t}", "public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }" ]
[ "0.6763633", "0.6498896", "0.6435336", "0.6400117", "0.6338507", "0.63028884", "0.62764853", "0.62628025", "0.6261086", "0.6244401", "0.6238245", "0.6198853", "0.6178986", "0.61770964", "0.6174095", "0.61623126", "0.61380106", "0.6130095", "0.61041707", "0.61007035", "0.6079316", "0.6071909", "0.60695654", "0.6045806", "0.60385615", "0.6015563", "0.60145384", "0.6003233", "0.59868884", "0.59849286", "0.5982253", "0.59754336", "0.5963392", "0.59507203", "0.5917997", "0.5912549", "0.58990115", "0.5898559", "0.58809173", "0.58559215", "0.5853144", "0.58501214", "0.58337194", "0.58207273", "0.581547", "0.5809326", "0.5809003", "0.5806984", "0.580093", "0.5800221", "0.5784049", "0.57597244", "0.574139", "0.5735573", "0.5725671", "0.5715565", "0.57153994", "0.5713678", "0.5710417", "0.57058394", "0.5703074", "0.56984246", "0.569679", "0.5695536", "0.5692101", "0.5682383", "0.5674757", "0.5671963", "0.5653954", "0.5651744", "0.5650865", "0.5640259", "0.5639455", "0.56359154", "0.56299657", "0.5623966", "0.561947", "0.56148183", "0.5614463", "0.56089014", "0.56040204", "0.5603871", "0.5599158", "0.55951965", "0.5594604", "0.55918103", "0.5588874", "0.55888474", "0.55886734", "0.55858743", "0.55856925", "0.55770475", "0.5576513", "0.5573688", "0.5571591", "0.55710095", "0.5570472", "0.55698204", "0.5569435", "0.5560121", "0.5551498" ]
0.0
-1
nacita jednotlive uzivatele s naplanovanou sluzbou
private function selectServicesUsers($scheduler ){ $result = $scheduler->adminLoadServiceUsers(); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "public function AggiornaPrezzi(){\n\t}", "function uprav_pretek ($NAZOV, $DATUM, $DEADLINE,$POZNAMKA){\r\n if(!$this->ID){\r\n return false;\r\n }\r\n $NAZOV2 = htmlentities($NAZOV, ENT_QUOTES, 'UTF-8');\r\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\r\n $text = $POZNAMKA;\r\n\r\n if(preg_match($reg_exUrl, $text, $url) && !strpos($text, \"</a>\") && !strpos($text, \"</A>\") && !strpos($text, \"HREF\") && !strpos($text, \"href\")) {\r\n\r\n // make the urls hyper links\r\n $text = preg_replace($reg_exUrl, \"<a href=\".$url[0].\">{$url[0]}</a> \", $text);\r\n\r\n}\r\n\r\n $POZNAMKA2 = htmlentities($text, ENT_QUOTES, 'UTF-8');\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n UPDATE PRETEKY set NAZOV = \"$NAZOV2\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DATUM = \"$DATUM\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set DEADLINE = \"$DEADLINE\" where ID=\"$this->ID\";\r\n UPDATE PRETEKY set POZNAMKA = \"$POZNAMKA2\" where ID=\"$this->ID\";\r\n DELETE FROM KATEGORIE_PRE_$this->ID;\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n } else {\r\n \r\n }\r\n $db->close();\r\n }", "function ispisiNotifikaciju($idNovosti){\n\t\t$autorID = nadjiAutora();\n\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From novost WHERE id = :id AND autor_id = :idAutora\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->bindValue(':idAutora', $autorID);\n\t\t$upit->execute();\n\t\t\n\t\t//autor novosti nije korisnik koji je prijavljen\n\t\tif($upit->rowCount() <= 0) return; \n\n\t\t$broj = brojNeprocitanih($idNovosti);\n\t\tif($broj > 0){\n\t\t\tprint \"<p>Broj nepročitanih komentara: \";\n\t\t\tprint $broj;\n\t\t\tprint \"</p>\";\n\t\t}\t\t\n\t}", "public function nahrajUzivatele(){\t\t\t\n\t\t\t$dotaz = \"SELECT uzivatelID,uzivatelJmeno,uzivatelHeslo FROM `tabUzivatele` WHERE 1 \";\n\t\t\t\n\t\t\t\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(\"Pri nahravani dat nastala chyba!\" . 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$jmeno = $radek[\"uzivatelJmeno\"];\n\t\t\t\t$heslo = $radek[\"uzivatelHeslo\"];\n\t\t\t\t\n\t\t\t\t$uzivatel = new uzivatelObjekt($jmeno,$heslo);\n\t\t\t\t\n\t\t\t\t$uzivatel->uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$uzivatel); \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 Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\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$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "public function neVoliPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3); //slobodno promeniti nacin dohvatanja, poenta je da mi treba predvidjanje koje je voljeno\n $voliModel=new VoliModel();\n if ($voliModel->vec_voli($korisnik->IdK, $predvidjanjeId))\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanjeModel->voli($predvidjanjeId, false);\n $posl_id=$voliModel->poslednji_vestackiId();\n $voliModel->voli($korisnik->IdK, $predvidjanjeId, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "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}", "function provjeri_oglase(){\n\t\tglobal $db;\n\t\t$oglasi = $db->query(\"SELECT * FROM jf_oglasi WHERE status=1\");\n\t\twhile($podatak = $oglasi->fetch_assoc()){\n\t\t\tif (date(\"d-m-Y\", strtotime($podatak['konkurs_end'])) < date(\"d-m-Y\")){\n\t\t\t\t$db->query(\"UPDATE jf_oglasi SET status=0 WHERE id={$podatak['id']}\");\n\t\t\t}\n\t\t}\n\t}", "function pobierz_urle_uzyt($nazwa_uz) {\r\n // pobranie z bazy danych wszystkich URL-i danego u�ytkownika\r\n $lacz = lacz_bd();\r\n $wynik = $lacz->query(\"select URL_zak\r\n from zakladka\r\n where nazwa_uz = '\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n return false;\r\n }\r\n\r\n // tworzenie tablicy URL-i\r\n $tablica_url = array();\r\n for ($licznik = 0; $rzad = $wynik->fetch_row(); ++$licznik) {\r\n $tablica_url[$licznik] = $rzad[0];\r\n }\r\n return $tablica_url;\r\n}", "public static function odstraniArtikelIzKosarice() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }", "public function dohvati_najaktuelnije_ideje()\n {\n $ideje= $this->findAll();\n usort($ideje,function ($i1,$i2)\n {\n //proveriti je l' ovo tranzitivno, idejno jeste, samo da li sam napravio gresku\n $dat1= strtotime($i1->DatumEvaluacije); \n $dat2= strtotime($i2->DatumEvaluacije); \n $danas= strtotime(date(\"Y-m-d H:i:s\"));\n if ($dat1==$dat2)\n {\n return 0;\n }\n if ($dat1>$danas)\n {\n if ($dat2<$danas)//dat2 nije aktuelno, jer je vec proslo, a d1 jeste te ide ispred\n {\n return -1;\n }\n else//oba tek treba da se dogode aktuelnije je ono sto ce pre da se dogodi\n {\n if ($dat1<$dat2)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }\n }\n else//dat1 nije aktuelno\n {\n if ($dat2>$danas)//dat2 ide ispred\n {\n return 1;\n }\n else//nijedan nije aktuelan zato zelimo da bude ispred onaj sa vecim datumom jer je on blizi sadasnjosti\n {\n if ($dat1<$dat2)\n {\n return 1;\n }\n else \n {\n return -1;\n \n }\n }\n \n }\n });\n return $ideje;\n \n }", "public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }", "function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "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 }", "public function extra_voor_verp()\n\t{\n\t}", "public function sortPredvidjanjeNajteze() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najteza_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }", "function nbr_auteurs_enligne() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n// nombre d_auteurs depuis 15 mn ()\r\n# inc/auth.php update-set en_ligne => NOW() : \"moment\" de session !\r\n# voir ecrire/action:logout.php\r\n# spip update-set 'en_ligne' datetime -15 mn au logout de session !!??!!\r\n# aff' nbr corresp aux auteurs affiches par spip en bandeau sup !\r\n\r\n\t$q = sql_select(\"COUNT(DISTINCT id_auteur) AS nb, statut \" .\r\n\t\t\"FROM spip_auteurs \" .\r\n\t\t\"WHERE en_ligne > DATE_SUB( NOW(), INTERVAL 15 MINUTE) \" .\r\n\t\t\"AND statut IN ('0minirezo', '1comite', '6forum') \" . // limite statuts spip (autres!)\r\n\t\t\"AND id_auteur != $connect_id_auteur \" .\r\n\t\t\"GROUP BY statut\"\r\n\t);\r\n\r\n\tif (sql_count($q)) {\r\n\t\t$aff .= _T(\"actijour:auteurs_en_ligne\") . \"<br />\\n\";\r\n\t\tWhile ($r = sql_fetch($q)) {\r\n\t\t\tif ($r['statut'] == '0minirezo') {\r\n\t\t\t\t$stat = _T('actijour:abrv_administrateur');\r\n\t\t\t} elseif ($r['statut'] == '1comite') {\r\n\t\t\t\t$stat = _T('actijour:abrv_redacteur');\r\n\t\t\t} elseif ($r['statut'] == '6forum') {\r\n\t\t\t\t$stat = _T('actijour:abrv_visiteur');\r\n\t\t\t}\r\n\t\t\t$aff .= $r['nb'] . \" $stat<br />\\n\";\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t$aff .= _T(\"actijour:aucun_auteur_en_ligne\") . \"\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "abstract public function getPasiekimai();", "function brojNeprocitanih($idNovosti){\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From KOMENTAR WHERE novost_id = :id AND PROCITAN = 0\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->execute();\n\t\treturn $upit->rowCount();\n\t}", "final function velcom(){\n }", "public function sortPredvidjanjeNovo() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najnovija_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public function voliPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3); //slobodno promeniti nacin dohvatanja, poenta je da mi treba predvidjanje koje je voljeno\n $voliModel=new VoliModel();\n if ($voliModel->vec_voli($korisnik->IdK, $predvidjanjeId))\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanjeModel->voli($predvidjanjeId, true);\n $posl_id=$voliModel->poslednji_vestackiId();\n $voliModel->voli($korisnik->IdK, $predvidjanjeId, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "public function isVisitante(){ return false; }", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "public function getNaziv()\n {\n return $this->naziv;\n }", "public function erAktiv() : bool {\n if(!$this->getHome()->erFerdig()) {\n return true;\n }\n\n // Alle innslag før 2020 er ikke aktive\n if ($this->getSesong() < 2020) {\n return false;\n }\n\n // Sjekker alle arrangementer hvor dette innslaget ble sendt videre (inkludering home arrangement)\n $query = new Query(\n \"SELECT `arrangement_id`\n FROM `ukm_rel_arrangement_innslag`\n WHERE `innslag_id` = '#innslag'\",\n [\n 'innslag' => $this->getId()\n ]\n );\n\n $res = $query->run();\n // Det må finnes mer enn 1 arrangement (nummer 1 er home arrangement) \n if($res->num_rows > 1) {\n while ($arrangementId = Query::fetch($res)) {\n $arrangement = new Arrangement($arrangementId['arrangement_id']);\n \n // Arrangementet er ikke ferdig derfor dette innslaget er aktivt.\n if(!$arrangement->erFerdig()) {\n return true;\n }\n }\n }\n\n // Det ble ikke funnet at innslaget er aktivt\n return false;\n }", "public function NonAktif($nik) {\r\n $query = mysql_query(\"UPDATE pemilih SET aktif = '0' where nik = '$nik'\");\r\n if ($query) {\r\n return \"Success\";\r\n } else {\r\n return \"Failed\";\r\n }\r\n }", "function noviKorisnik($data) {\n\t\t// kreiranje konekcije\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\n// filtrira i sredjuje string iz json formata\n\t\t$ime = mysqli_real_escape_string($mysqli,$data['imePrezime']);\n\t\t$username = mysqli_real_escape_string($mysqli,$data['username']);\n\t\t$password = mysqli_real_escape_string($mysqli,$data['password']);\n\n\t\t$values = \"('\".$ime.\"','\".$username.\"','\".$password.\"',0)\";\n\n\t\t// upit koji dodaje podatke o novom korisniku\n\t\t$query = 'INSERT into korisnik (imePrezime, username, password, admin) VALUES '.$values;\n\n\t\t// ako je upit vratio true rezultat je true\n\t\tif($mysqli->query($query))\n\t\t{\n\t\t\t$this ->result = true;\n\t\t}\n\t\telse // u suprotnom ako se upit nije lepo izvrsio vrati false\n\t\t{\n\t\t\t$this->result = false;\n\t\t}\n\t\t$mysqli->close(); // zatvaranje konekcije\n\t}", "public function testAbreLivroDepoisQueEleEFechado()\n {\n $this->livro->abreLivro();\n $this->livro->viraPagina();\n $this->livro->fechaLivro();\n\n $this->livro->abreLivro();\n\n $this->assertEquals(1, $this->livro->getPaginaAtual());\n }", "public function nadar()\n {\n }", "public function sortPredvidjanjePopularno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najpopularnija_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "public function odgovoriNaPitanje($idPitanje = null) {\n $controller = session()->get('controller');\n\n if ($idPitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // ako je nepostojeci id treba vratiti korisnika na pocetnu stranu\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n if ($pitanje == null) {\n return redirect()->to(site_url(\"$controller/\"));\n }\n\n // koje sve poruke mogu da se prikazu korisniku\n $porukaTekstOdgovora = null;\n $porukaNemaPravaDaOdgovori = null;\n\n // provera da li je unet tekst odgovora posto je obavezno polje\n if (!$this->validate(['TekstOdgovora' => 'required'])) {\n $porukaTekstOdgovora = \"Morate da unesete tekst odgovora - to je obavezno polje!\";\n }\n\n // provera da li korisnik ima pravo da odgovori na izabrano pitanje\n // ako korisnik nije psiholog a na pitanje smeju samo psiholozi da odgovore potrebno je ispisati poruku korisniku\n $pitanjeModel = new PitanjeModel();\n $pitanje = $pitanjeModel->find($idPitanje);\n $moguSviDaOdgovore = $pitanje->moguSviDaOdgovore;\n $korisnikModel = new KorisnikModel();\n $idKategorijaKorisnika = $korisnikModel->find(session()->get('userid'))->tipKorisnika_idTipKorisnika;\n // psiholozi su idKategorijaKorisnika=2 \n if ($moguSviDaOdgovore == 0 && $idKategorijaKorisnika != 2) {\n $porukaNemaPravaDaOdgovori = \"Na ovo pitanje imaju pravo samo registrovani psiholozi da odgovore!\";\n }\n\n // ako nije unet tekst odgovora ili korisnik nema prava da odgovori ispisati mu poruke, odbacuje se unos odgovora\n if ($porukaTekstOdgovora != null || $porukaNemaPravaDaOdgovori != null) {\n echo view(\"odgovori_na_pitanje\", ['pitanje' => $pitanje, 'porukaTekstOdgovora' => $porukaTekstOdgovora, 'porukaNemaPravaDaOdgovori' => $porukaNemaPravaDaOdgovori]);\n return;\n }\n\n $odgovorModel = new OdgovorModel();\n $anonimno = $this->request->getVar('anonimus');\n $odgovorModel->save([\n 'pitanje_idPitanje' => $idPitanje,\n 'korisnik_idKorisnik_odgovorio' => session()->get('userid'),\n 'tekstOdgovora' => $this->request->getVar('TekstOdgovora'),\n 'odgovorenoAnonimno' => $anonimno == \"1\" ? true : false\n ]);\n\n $controller = session()->get('controller');\n // kada se sacuva odgovor na pitanje, redirect korisnika na prikaz svih odgovora na to pitanje\n return redirect()->to(site_url(\"$controller/pregledOdgovora?pretraga=$idPitanje\"));\n }", "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 tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function uklon ($to)\r\n {\r\n $id = is_player ($to);\r\n if ($id)\r\n {\r\n $q = do_mysql (\"SELECT name, location FROM players WHERE id_player = '\".$id.\"';\");\r\n $p = mysql_fetch_assoc ($q);\r\n add_journal ($p['name'].' уклонился!', 'l.'.$p['location']);\r\n }\r\n else\r\n {\r\n $id = is_npc ($to);\r\n $q = do_mysql (\"SELECT name, location FROM npc WHERE id_npc = '\".$id.\"';\");\r\n $n = mysql_fetch_assoc ($q);\r\n add_journal ($n['name'].' уклонился!', 'l.'.$n['location']);\r\n }\r\n return 1;\r\n }", "public function pracovniSila($idProjektu, $uzivatele)\n {\n //jiz prirazeni uzivatele\n $projektUzivatele = $this->database->table(\"projekt_uzivatel\")\n ->where('fk_p = ?', $idProjektu)\n ->fetchAll();\n\n if($uzivatele) {\n\n for ($i = 1; $i<=20; $i++) {\n\n if(array_key_exists($i, $uzivatele)) {\n try { //form se odesle s uz prirazenymi uzivateli - chyta chybu duplicate\n $this->database->table(\"projekt_uzivatel\")\n ->insert([\"fk_p\" => $idProjektu, \"fk_u\" => $uzivatele[$i]]);\n\n } catch (\\Exception $e) {}\n\n }\n\n else {\n foreach ($projektUzivatele as $pu) {\n if($i == $pu['fk_u']) { //uzivatel byl prirazen, ale byl odstranen\n $this->database->table(\"projekt_uzivatel\")\n ->where('fk_u = ?', $pu['fk_u'])\n ->where('fk_p = ?', $idProjektu)\n ->delete();\n }\n }\n }\n\n }\n\n }\n\n else { // nebyly prirazeni zadni uzivatele\n $this->database->table(\"projekt_uzivatel\")\n ->where('fk_p = ?', $idProjektu)\n ->delete();\n }\n }", "static function vypis_zoznam(){\r\n \r\n $db = napoj_db();\r\n\r\n $sql =<<<EOF\r\n SELECT * from Preteky WHERE AKTIV = 1 ORDER BY DEADLINE DESC;\r\nEOF;\r\n\r\n $ret = $db->query($sql);\r\n while($row = $ret->fetchArray(SQLITE3_ASSOC) ){\r\n $d1 = $row['DEADLINE'];\r\n $d2 = $row['DATUM'];\r\n $d3 = new DateTime(date(\"Y-m-d H:i:s\"));\r\n \r\n if(strtotime($d1) < strtotime('1 days') && strtotime($d1) > strtotime('0 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='red'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n if(strtotime($d1) < strtotime('0 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='grey'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n if(strtotime($d1) > strtotime('1 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='green'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n echo \"<td>\".$row['DATUM'].\"</td>\";\r\n echo \"<td>\".$row['DEADLINE'].\"</td>\";\r\n //echo \"<td><a href='uprav_preteky.php?id=\".$row['ID'].\"'>Uprav</a></td>\";\r\n if(new DateTime($d2) < $d3){\r\n ?>\r\n <td><a href='vykon.php?id=<?php echo $row['ID'];?>'>Osobný výkon</a></td>\r\n <td><a href='zhodnotenie.php?id=<?php echo $row['ID']?>'>Celkové hodnotenie</a></td>\r\n <?php\r\n }\r\n echo \"</tr>\";\r\n }\r\n //echo \"Operation done successfully\".\"<br>\"; ////////////////////////////////\r\n $db->close();\r\n}", "public static function prijavi($upime, $geslo)\n\t{\n\t\t$db = Db::getInstance();\n\t\t//začnemo sejo, dobimo podatke iz PB (recimo ka nemreta meti istoga imena, kak je že v večini primerov gnesden)\n\t\t//Db::sessionStart();\n\t\t$result = mysqli_query($db, \"SELECT ID, upime, geslo FROM oseba WHERE upime='$upime'\");\n\t\n\t\t$row = mysqli_fetch_array($result);\n\t\t//tu dobimo isti hash, s kerin smo koderali (ali kak se tumi pravi) geslo, zato ka ga te v if stavki ponucamo za primerjavo\n\t\t\n\t\t//primerjamo podatke keri so v bazi pa vpisani podatki, password_verify pa je kak san že prej napisao za primerjavo vpisanoga gesla pa hash_gesla iz baze\n\t\tif($row[1] == $upime && password_verify($geslo, $row[2]))\n\t\t{\n\t\t\t//če smo vpisali prave podatke, shranimo v sejo ID uporabnika (mogoče bi ime?)\n\t\t\t$_SESSION[\"id\"]=$row[0];\n\t\t\t//dobimo id, pa zovemo uspesnaPrijava.php v keroj izpišemo ka smo se prijavili, pa povezava do \"home\" je not\n\t\t\t//$oseba = Oseba::najdi($row[0]);\n\t\t\t$query = mysqli_query($db, \"INSERT INTO osebaAktivna (osebaID) VALUES ('$row[0]')\");\n\t\t\t\n\t\t\terror_reporting(E_ALL);\n\t\t require_once('views/osebe/uspesnaPrijava.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//če nejsmo vnesli pravih podatkov, zovemo stran napakaPrijava.php, v keroj je izpis o ton ka smo napačne podatki dali, pa link za nazaj (torej na stran prijavi.php)\n\t\t require_once('views/osebe/napakaPrijava.php');\n\t\t}\n\t}", "public function valorpasaje();", "function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \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 }", "private function novaNavsteva(){\n $this->tpl = \"nova-navsteva\";\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $navsteva = new Navsteva($this->db);\n $res = $navsteva->pridatNavstevu($_POST);\n \n if($res['idn'] >= 1){ \n if(isSet($_POST['poznamka'])){\n\t\t\t\t\tNavsteva::pridatPoznamku($_POST['poznamka'], $_SESSION['idz'], $res['idn'], $this->db);\n\t\t\t\t}\n \n header(\"Location: index.php?page=detail-navstevy&idn=\".$res['idn']);\n }\n else{\n $this->render['error'] = $res['mess'];\n }\n }\n }", "public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }", "public function index($id){\n\t\t$po_prostu_pokaz = true;\n\t\t$user = $this->session->zalogowany;\n\t\tif($dane = $this->baza->czy_zlecenie_istnieje($id)){\n\t\t\t$dane[0]->nick = $this->baza->daj_nick($dane[0]->zlecajacy_id);\n\t\t\t$prace = $this->baza->prace();\n\t\t\t$aktualna_data = date('Y-m-d');\n\t\t\t$aktualna_godzina = date('H:i');\n\t\t\tif($this->baza->czy_zlecenie_aktualne($id,$aktualna_data,$aktualna_godzina)){\n\t\t\t\t//zlecenie aktualne\n\t\t\t\tif($user != null){\n\t\t\t\t\tif($dane[0]->zlecajacy_id != $user){\n\t\t\t\t\t\t//nie jesteś zlecającym\n\t\t\t\t\t\t$zwyciezca = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($zwyciezca)==0){\n\t\t\t\t\t\t\t//jeszcze nie wybrano zwycięzcy\n\t\t\t\t\t\t\tif(!$this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//nie zgłosiłeś się jeszcze\n\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t$zgloszenie = $this->input->post('zlecenie_zgloszenie');\n\t\t\t\t\t\t\t\tif($zgloszenie != null){\n\t\t\t\t\t\t\t\t\t//wyświetl komunikat informujący o poprawnym zgłoszeniu się\n\t\t\t\t\t\t\t\t\t$this->baza->dodaj_zgloszenie($id,$user);\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>1));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//wyswietl widok z możliwością zgłoszenia się do niego\n\t\t\t\t\t\t\t\t\t//aktualne - true,jestes_zlecajacym=false,zgloszono_sie=false\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//wybrano zwycięzcę\n\t\t\t\t\t\t\tif($this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//zgłoszono się\n\t\t\t\t\t\t\t\tif($this->baza->czy_wygrales_zlecenie($id,$user)){\n\t\t\t\t\t\t\t\t\t//jesteś zwycięzcą\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$status = $zwyciezca[0]->status;\n\t\t\t\t\t\t\t\t\tif($status == 0){\n\t\t\t\t\t\t\t\t\t\t//zostałeś wybrany przez zlecającego\n\t\t\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t\t$podjecie = $this->input->post('zlecenie_podjecie');\n\t\t\t\t\t\t\t\t\t\tif($podjecie != null){\n\t\t\t\t\t\t\t\t\t\t\t//komunikat o pomyślnym podjęciu się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->baza->potwierdz_podjecie($id);\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>1));\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//strona z możliwością potwierdzenia podjecia się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>0));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//zalogowany jest zlecajacym\n\t\t\t\t\t\t$jestes_zlecajacym = true;\n\t\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($dane_zwyciezcy)==0){\n\t\t\t\t\t\t\t//nie wybrano zwycięzcy\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$wybrany = $this->input->post('zlecenie_zwyciezca');\n\t\t\t\t\t\t\tif($wybrany != null){\n\t\t\t\t\t\t\t\t$this->baza->wybierz_zwyciezce($id,$wybrany);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//wyświetl listę zgłoszeń\n\t\t\t\t\t\t\t\t//daj możliwość wybrania jednego\n\t\t\t\t\t\t\t\t$zgloszenia = $this->baza->lista_zgloszen($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>$zgloszenia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//zlecenie po czasie wykonania\n\t\t\t\t$user = $this->session->zalogowany;\n\t\t\t\tif($dane[0]->zlecajacy_id == $user){\n\t\t\t\t\t//jesteś zleceniodawcą\n\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\tif(count($dane_zwyciezcy)>0){\n\t\t\t\t\t\t//ktoś wygrał\n\t\t\t\t\t\t$status = $dane_zwyciezcy[0]->status;\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość potwierdzenia wykonania\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$potwierdzono = $this->input->post('zlecenie_potwierdzenie');\n\t\t\t\t\t\t\tif($potwierdzono != null){\n\t\t\t\t\t\t\t\t$this->baza->potwierdz_wykonanie($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'potwierdzenie'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if($status == 2){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość ocenienia\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$ocena = $this->input->post('zlecenie_ocena');\n\t\t\t\t\t\t\t$komentarz = $this->input->post('zlecenie_komentarz');\n\t\t\t\t\t\t\tif($ocena != null && $komentarz != null){\n\t\t\t\t\t\t\t\t$this->baza->ocen($id,$dane_zwyciezcy[0]->zglaszajacy_id,$ocena,$komentarz);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($po_prostu_pokaz){\n\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->load->view('blad',array('komunikat'=>'Nie ma takiego zlecenia!'));\n\t\t}\n\t}", "public function mort()\n\t{\n\t\tif ( $this->vie <= 0 ) {\n\t\t\techo $this->nom . \" est mort <br>\";\n\t\t} else {\n\t\t\techo $this->nom . \" est vivant ! <br>\";\n\t\t}\n\t}", "public function existujeKolizna()\n {\n // hlada nasledovne kolizne pripady:\n // - existuje zaciatok nejakeho obdobia v nasom\n // - existuje koniec nejakeho obdobia v nasom\n // - nejake obdobie kompletne prekryva nase obbodie\n // pricom vzdy sa ignoruje nase obdobie (kvoli update ktory by bol kolizny so sebou)\n // a zaroven nie su kolizie ak bezi vaicero akcii na viacero inych semestrov\n $sql =\n \"SELECT id, \".\n DateConvert::DBTimestampToSkDateTime(\"zaciatok\"). \" AS zaciatok, \".\n DateConvert::DBTimestampToSkDateTime(\"koniec\"). \" AS koniec\n\t\t\tFROM rozvrhova_akcia\n\t\t\t WHERE \n\t\t\t \t((zaciatok>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t zaciatok<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\t\n\t\t\t \t(koniec>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\n\t\t\t \t(zaciatok<=\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec>=\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\")) AND\n\t\t\t \t id_semester=$3\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester);\n // ak je edit TREBA aj vylucit koliziu so sebou\n if (!empty($this->id))\n {\n $sql .= \" AND id<>$4\";\n $params[] = $this->id;\n }\n $this->dbh->query($sql, $params);\n\n if ($this->dbh->RowCount()>0)\n {\n $kolizia = $this->dbh->fetch_assoc();\n return \"{$kolizia[\"zaciatok\"]} - {$kolizia[\"koniec\"]}\";\n } else return null;\n }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "function afficherListeUtis() {\r\n\r\n\t $result=mysql_query(\"SELECT numuti FROM if_utilisateur ORDER BY nom,prenom\"); \r\n\t while ($row=mysql_fetch_row($result)) {\r\n\t \t$unUti=new Utilisateur();\t \r\n\t\t$unUti->numuti=$row[0]; \r\n\t\t$unUti->infosUti();\r\n\t\t$this->utis[]=$unUti;\r\n\t } \r\n\t if (count($this->utis)>=1) return true;\r\n }", "function getVisita($conexion,$ip,$fecha){\r\n $var = \"numeroTransacciones\";\r\n $consu = \"select count(*) as $var from visitas where ip_cliente ='$ip'\r\n and fecha ='$fecha'\";\r\n if(consulta($conexion,$consu,$var)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public function obtenerViajesplusAbonados();", "public function oceniPredvidjanje()\n {\n $korisnik= $this->session->get(\"korisnik\");\n $predvidjanjeId= $this->request->uri->getSegment(3);\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanje= $predvidjanjeModel->dohvati_predvidjanja_id($predvidjanjeId); \n $ocena=$_POST[$predvidjanjeId];//pretpostavljam da ce tako biti najlakse dohvatiti, slovbodno promeniti\n $oceniModel=new DajeOcenuModel();\n \n if ($oceniModel->vec_dao_ocenu($korisnik->IdK, $predvidjanje->IdP) || date(\"Y-m-d H:i:s\")>$predvidjanje->DatumEvaluacije)\n {\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n else\n {\n \n \n $predvidjanjeModel->daje_ocenu($predvidjanje->IdP, $ocena);\n $posl_id=$oceniModel->poslednji_vestackiId();\n $oceniModel->daje_ocenu($korisnik->IdK, $predvidjanje->IdP, $ocena, $posl_id+1);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }", "public function pregledprofilapredvidjanja() {\n $data['user']=$this->session->get('korisnik');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('profilkorisnikpredvidjanja', $data);\n }", "private function prehledNavstev(){\n $this->tpl = \"historie-navstev\";\n \n \t$prehled = new HlavniPrehled($this->db);\n \n $this->render = array(\n\t\t\t'navstevy' => $prehled->vypis(@$_POST), \n\t\t);\t\n }", "public function partirAuTravail(): void\n\t{\n\t}", "public static function vratiSve($db){\n \n \n // $result = $db->query('SELECT *,((i.datumDo - i.datumOd)*i.cenaPoDanu) as ukupnaCena FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n $result = $db->query('SELECT * FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n \n\n\n $iznajmljivanja = array();\n\n while($row = $result->fetch_assoc()) { \n // $tip = new TipVozila();\n // $tip->tipID= $row['tipID'];\n // $tip->nazivTipa= $row['nazivTipa'];\n\n\n $vozilo = new Vozilo();\n $vozilo->voziloID= $row['voziloID'];\n $vozilo->model= $row['model'];\n $vozilo->marka= $row['marka'];\n $vozilo->regBr= $row['regBr'];\n // $voziloPom->tipVozila = $tip;\n\n $korisnik= new Korisnik();\n $korisnik->korisnikID= $row['korisnikID'];\n $korisnik->ime = $row['ime'];\n $korisnik->prezime = $row['prezime'];\n\n $iznajmljivanje = new Iznajmljivanje();\n $iznajmljivanje->iznajmljivanjeID = $row['iznajmljivanjeID'];\n $iznajmljivanje->vozilo = $vozilo;\n $iznajmljivanje->korisnik = $korisnik;\n $iznajmljivanje->datumOd = $row['datumOd'];\n $iznajmljivanje->datumDo = $row['datumDo'];\n $iznajmljivanje->cenaPoDanu = $row['cenaPoDanu'];\n // $ukupnaCena = $row['ukupnaCena'];\n\n array_push($iznajmljivanja, $iznajmljivanje); \n }\n\n return $iznajmljivanja;\n}", "public function azuriranjeJela($promenljive){\n $this->db->set('Naziv', $promenljive['naziv']);\n $this->db->set('Opis', $promenljive['opisjela']);\n if (isset($promenljive['idSlika'])){\n $this->db->set('IdSlika', $promenljive['idSlika']);\n }\n $this->db->where('IdJelo', $promenljive['id']);\n $this->db->update('jelo');\n }", "public function napraviJelo($uneto) {\n $this->db->set('IdJelo', $uneto['idJela']);\n $this->db->set('IdKorisnik', $uneto['idKorisnik']);\n $this->db->set('Naziv', $uneto['naziv']);\n $this->db->set('Opis', $uneto['opisjela']);\n $this->db->set('Pregledano', 'N');\n if (isset($uneto['idSlika'])) {\n $this->db->set('IdSlika', $uneto['idSlika']);\n } else {\n $this->db->set('IdSlika', 3);\n }\n $this->db->insert('jelo');\n }", "function UsunZKolejnosci($Nazwa){\n \n //unset( $this->Kolejnosc[$KolejnoscID]);\n array_pop( $this->Kolejnosc );\n //unset( $this->MapaNazw[$Nazwa]);\n \n }", "public function masodik()\n {\n }", "function motivoDeAnulacionDesin(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "public static function vsi() {\n $list = [];\n //dobimo objekt, ki predstavlja povezavo z bazo\n $db = Db::getInstance();\n //izvedemo query\n $result = mysqli_query($db,'SELECT * FROM nabiralnik');\n //v zanki ustvarjamo nove objekte in jih dajemo v seznam\n while($row = mysqli_fetch_assoc($result)){\n $list[] = new Nabiralnik($row['id'], $row['id_uporabnik'], $row['ime']);\n }\n\n //vrnemo list objektov/nabiralnikov\n return $list;\n }", "public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }", "function motivoDeAnulacionDev(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDV' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "private function verrouPoser(){\n\t\t$verrou['etat'] = '';\n\t\tself::verrouSupprimer();\n\t\tif($this->formulaire['cle'] != ''){\n\t\t\t$verrou = self::verrouRechercher();\n\t\t\tif(empty($verrou)){\n\t\t\t\t$verrou = self::verrouInserer();\n\t\t\t\t$verrou['etat'] = 'ok';\n\t\t\t}else{\n\t\t\t\t$verrou['etat'] = 'nok';\n\t\t\t\t$verrou['message'] = \"L'enregistrement \".$verrou['ad_ve_cle'].\" est actuellement verrouillé par \".$verrou['ad_ve_nom'].\" depuis le \".$verrou['ad_ve_date'].\".\\nLes modifications, enregistrement et suppression sont donc impossibles sur cet enregistrement.\";\n\t\t\t}//end if\n\t\t}//end if\n\t\treturn $verrou;\n\t}", "public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "function pretvaranjeDatuma($datumZaUpis){\r\n\t\t\t\t$nizDatum = explode(\".\", $datumZaUpis);\r\n\t\t\t\t$datumZaUpis = $nizDatum[2].\"-\".$nizDatum[1].\"-\".$nizDatum[0];\r\n\t\t\t\treturn $datumZaUpis;\r\n\t\t\t}", "function checkPrzygoda($who){\n\t$r = polacz();\n\t$przygoda = getFromDB($r,'players','Przy_ID','ID_Player',$who);\n\tif($przygoda) {\n\t\t$czas = date('Y-m-d H:i:s');\n\t\t$zapytanie = \"SELECT * FROM przygody INNER JOIN przygody_types ON przygody.Przy_Type_ID = przygody_types.ID_Przy_Type WHERE ID_Przy = \" . $przygoda . \";\";\n\t\t$res = $r->query($zapytanie);\n\t\t$row = $res->fetch_assoc();\n\t\tif ($row) {\n\t\t\t$end = strtotime($row['Started']) + ($row['For_Time'] * 60);\n\t\t\t$diff = ($end - strtotime($czas));\n\t\t\tif ($diff <= 0) {\n\t\t\t\t$money = floor($row['For_Time'] * (0.4 + $row['Difficulty']));\n\t\t\t\t$exp = floor($row['For_Time'] * (0.8 + $row['Difficulty']));\n\t\t\t\tif (getFromDB($r, 'users', 'PERMISSIONS_ID', 'PLAYERS_ID', $who) <= 1) {\n\t\t\t\t\t$money = floor($money * 1.5);\n\t\t\t\t\t$exp = floor($exp * 1.5);\n\t\t\t\t}\n\t\t\t\t$kasa = getFromDB($r, 'players', 'Money_Player', 'ID_Player', $who);\n\t\t\t\t$dos = getFromDB($r, 'players', 'Experience', 'ID_Player', $who);\n\t\t\t\t$kasa += $money;\n\t\t\t\t$dos += $exp;\n\t\t\t\t$dataKoniec = date('Y-m-d H:i:s', $end);\n\t\t\t\t$zapytanie = \"UPDATE players SET Experience = '\" . $dos . \"', Money_Player = '\" . $kasa . \"', Przy_ID = NULL WHERE ID_Player = \" . $who . \";\nINSERT INTO komunikaty (PLAYER_ID, Komunikat, Kom_Typ_ID, Data_Kom) VALUES ('\" . $who . \"', 'Twoja przygoda na \" . $row['Name_Przy'] . \" się zakończyła. Zysk: Haisy-\" . $money . \", Doświadczenie-\" . $exp . \".', '0', '\" . $dataKoniec . \"');\nDELETE FROM przygody WHERE ID_Przy = \" . $przygoda . \";\";\n\t\t\t\t$res = $r->multi_query($zapytanie);\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "public function esPublica()\n {\n return false;\n }", "public function cortesia()\n {\n $this->costo = 0;\n }", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "public static function Vypis_kolize_formulare_dosud_nezavolane($iducast, $formular, $pole_id_volanych) {\r\n $kolize_pole = self::Najdi_kolize_pro_formular_dosud_nezavolane($iducast, $formular, $pole_id_volanych);\r\n \r\n // zobrazeni hlaseni a policek kolizi ve formulari\r\n foreach ($kolize_pole as $kprvek) {\r\n //var_dump($kprvek);\r\n if ($kprvek->kolize_nastala) {\r\n self::Vypis_jednu_kolizi_do_formulare($kprvek);\r\n } \r\n } \r\n\r\n}", "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}", "public function proveriNazivJela($uneto) {\n $this->db->select('jelo.IdJelo as IdJelo');\n $this->db->from('jelo');\n $this->db->where('Naziv', $uneto['naziv']);\n $this->db->where('IdKorisnik', $uneto['idKorisnik']);\n\n return $this->db->get()->row();\n }", "function prevenir_auteurs($auteur, $email_auteur, $id_forum, $id_article, $texte, $titre, $statut, $nom_site_forum, $url_site) {\n\tinclude_spip('inc/texte');\n\tinclude_spip('inc/filtres');\n\tinclude_spip('inc/mail');\n\tcharger_generer_url();\n\n\tif ($statut == 'prop') # forum modere\n\t $url = generer_url_ecrire('controle_forum', \"debut_id_forum=$id_forum\");\n\telse if (function_exists('generer_url_forum'))\n\t\t$url = generer_url_forum($id_forum);\n\telse {\n\t\tspip_log('inc-urls personnalise : ajoutez generer_url_forum() !');\n\t\t$url = generer_url_article($id_article);\n\t}\n\n\t$sujet = \"[\" .\n\t entites_html(textebrut(typo($GLOBALS['meta'][\"nom_site\"]))) .\n\t \"] [\"._T('forum_forum').\"] $titre\";\n\n\t$parauteur = (strlen($auteur) <= 2) ? '' :\n\t (\" \" ._T('forum_par_auteur', array('auteur' => $auteur)) . \n\t ($email_auteur ? \"\" : (' <' . $email_auteur . '>')));\n\n\t$corps = _T('form_forum_message_auto') .\n\t\t\"\\n\\n\" .\n\t\t_T('forum_poste_par', array('parauteur' => $parauteur)).\n\t\t\"\\n\"\n\t\t. _T('forum_ne_repondez_pas')\n\t\t. \"\\n\"\n\t\t. url_absolue($url)\n\t\t. \"\\n\\n\\n\".$titre.\"\\n\\n\".textebrut(propre($texte))\n\t\t. \"\\n\\n$nom_site_forum\\n$url_site\\n\";\n\n\t$old_lang = $GLOBALS['spip_lang'];\n\n\t$result = spip_query(\"SELECT auteurs.email, auteurs.lang FROM spip_auteurs AS auteurs, spip_auteurs_articles AS lien WHERE lien.id_article='$id_article' AND auteurs.id_auteur=lien.id_auteur\");\nprevenir_auteurs_forums($id_article, $id_forum, $sujet, $corps, $parauteur);// ajouté par [email protected] \n\twhile ($row = spip_fetch_array($result)) {\n\t\t$email = trim($row['email']);\n\t\tif (strlen($email) < 3) continue;\n\t\t$GLOBALS['spip_lang'] = ($row['lang'] ? $row['lang'] : $old_lang);\n\t\tenvoyer_mail($email, $sujet, $corps) ;\n\t}\n\t$GLOBALS['spip_lang'] = $old_lang;\t\n}", "function isVacia($palabra)\n{\n\t$palabrasVacias = array(\"&\",\"^^\",\"www\", \"http\",\"com\",\"\",\"-\",\"I\",\"a\",\"about\",\"above\",\"after\",\"again\",\"against\",\"all\",\"am\",\"an\",\"and\",\"any\",\"are\",\"aren't\",\"as\",\"at\",\"be\",\"because\",\"been\",\"before\",\"being\",\"below\",\"between\",\"both\",\"but\",\"by\",\"can't\",\"cannot\",\"could\",\"couldn't\",\"did\",\"didn't\",\"do\",\"does\",\"doesn't\",\"doing\",\"don't\",\"down\",\"during\",\"each\",\"few\",\"for\",\"from\",\"further\",\"had\",\"hadn't\",\"has\",\"hasn't\",\"have\",\"haven't\",\"having\",\"he\",\"he'd\",\"he'll\",\"he's\",\"her\",\"here\",\"here's\",\"hers\",\"herself\",\"him\",\"himself\",\"his\",\"how\",\"how's\",\"i\",\"i'd\",\"i'll\",\"i'm\",\"i've\",\"if\",\"in\",\"into\",\"is\",\"isn't\",\"it\",\"it's\",\"its\",\"itself\",\"let's\",\"me\",\"more\",\"most\",\"mustn't\",\"my\",\"myself\",\"no\",\"nor\",\"not\",\"of\",\"off\",\"on\",\"once\",\"only\",\"or\",\"other\",\"ought\",\"our\",\"ours\",\"ourselves\",\"out\",\"over\",\"own\",\"same\",\"shan't\",\"she\",\"she'd\",\"she'll\",\"she's\",\"should\",\"shouldn't\",\"so\",\"some\",\"such\",\"than\",\"that\",\"that's\",\"the\",\"their\",\"theirs\",\"them\",\"themselves\",\"then\",\"there\",\"there's\",\"these\",\"they\",\"they'd\",\"they'll\",\"they're\",\"they've\",\"this\",\"those\",\"through\",\"to\",\"too\",\"under\",\"until\",\"up\",\"very\",\"was\",\"wasn't\",\"we\",\"we'd\",\"we'll\",\"we're\",\"we've\",\"were\",\"weren't\",\"what\",\"what's\",\"when\",\"when's\",\"where\",\"where's\",\"which\",\"while\",\"who\",\"who's\",\"whom\",\"why\",\"why's\",\"with\",\"won't\",\"would\",\"wouldn't\",\"you\",\"you'd\",\"you'll\",\"you're\",\"you've\",\"your\",\"yours\",\"yourself\",\"yourselves\");\n\tforeach ($palabrasVacias as $vacia){\n\t\tif($palabra==$vacia){\n\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}", "public function sortIdejaAktuelno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $ideje=$idejaModel->dohvati_najaktuelnije_ideje(); \n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data); \n }", "public function getNegocio();", "function exec_visiteurs_dist()\n{\n\t$tri = preg_replace('/\\W/', '', _request('tri'));\n\tif (!$tri) $tri='nom'; \n\t$statut = _request('statut');\n\tif (!$statut) $statut = \"!\" . AUTEURS_MIN_REDAC;\n\t$debut = intval(_request('debut'));\n\n\t$recherche = NULL;\n\tif ($cherche = _request('recherche')) {\n\t\tinclude_spip('inc/rechercher');\n\t\t$tables = liste_des_champs();\n\t\t$tables = array('auteur'=>$tables['auteur']);\n\t\t$recherche = recherche_en_base($cherche, $tables,array('toutvoir'=>true));\n\t\tif ($recherche['auteur'])\n\t\t\t$recherche = sql_in('aut.id_auteur', array_keys($recherche['auteur']));\n\t\telse {\n\t\t\t$recherche = \"aut.id_auteur=0\"; // rien trouve !\n\t\t}\n\t}\n\t$form = formulaire_recherche(\"auteurs\",(($s=_request('statut'))?\"<input type='hidden' name='statut' value='$s' />\":\"\"));\n\texec_auteurs_args($statut, $tri, $debut, $recherche,$form, $cherche);\n}", "public function getNaziv()\n {\n return $this->naziv;\n }", "function retrieve_users_fftt()\n\t{\n\t\tglobal $gCms;\n\t\t$adherents = new adherents();\n\t\t$ping = cms_utils::get_module('Ping');\n\t\t$saison = $ping->GetPreference ('saison_en_cours');\n\t\t$ping_ops = new ping_admin_ops();\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$aujourdhui = date('Y-m-d');\n\t\t$club_number = $adherents->GetPreference('club_number');\n\t\t//echo $club_number;\n\t\t\n\t\t\n\t\t\t$page = \"xml_liste_joueur\";\n\t\t\t$service = new Servicen();\n\t\t\t//paramètres nécessaires \n\t\t\t\n\t\t\t$var = \"club=\".$club_number;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$array = 0;\n\t\t\t\t$lignes = 0;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t$lignes = count($array['joueur']);\n\t\t\t}\n\t\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t\tif($lignes == 0)\n\t\t\t{\n\t\t\t\t$message = \"Pas de lignes à récupérer !\";\n\t\t\t\t//$this->SetMessage(\"$message\");\n\t\t\t\t//$this->RedirectToAdminTab('joueurs');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//on supprime tt\n\t\t\t\t$query = \"TRUNCATE TABLE \".cms_db_prefix().\"module_ping_joueurs\";\n\t\t\t\t$dbresult = $db->Execute($query);\n\t\t\t\tif($dbresult)\n\t\t\t\t{\n\t\t\t\t\t$i =0;//compteur pour les nouvelles inclusions\n\t\t\t\t\t$a = 0;//compteur pour les mises à jour\n\t\t\t\t\t$joueurs_ops = new ping_admin_ops();\n\t\t\t\t\tforeach($xml as $tab)\n\t\t\t\t\t{\n\t\t\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t\t\t$nclub = (isset($tab->nclub)?\"$tab->nclub\":\"\");\n\t\t\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\t\t$actif = 1;\n\n\t\t\t\t\t\t$insert = $joueurs_ops->add_joueur($actif, $licence, $nom, $prenom, $club, $nclub, $clast);\n\t\t\t\t\t\t$player_exists = $joueurs_ops->player_exists($licence);\n\t\t\t\t\t//\tvar_dump($player_exists);\n\t\t\t\t\t\tif($insert === TRUE && $player_exists === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_recup_parties (saison, datemaj, licence, sit_mens, fftt, maj_fftt, spid, maj_spid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t$dbresult = $db->Execute($query, array($saison,$aujourdhui,$licence,'Janvier 2000', '0', '1970-01-01', '0', '1970-01-01'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}//$a++;\n\t\t\t\t\t \t\n\n\t\t\t\t\t}// fin du foreach\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//on redirige sur l'onglet joueurs\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public function TieneCobranzasVigentes()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t->from('CobranzaLiquidacion cl')\n\t\t->innerJoin('cl.Factura f')\n\t\t->andWhere('f.FechaAnulacion IS NULL')\n\t\t->where('cl.FacturaId = ?', $this->Id);\n\t\t \n\t\t$liquidaciones\t=\t $q->execute();\n\t\t\n\t\tif(count($liquidaciones) > 0)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ov01_sequencial = ($this->ov01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_sequencial\"]:$this->ov01_sequencial);\n $this->ov01_situacaoouvidoriaatendimento = ($this->ov01_situacaoouvidoriaatendimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_situacaoouvidoriaatendimento\"]:$this->ov01_situacaoouvidoriaatendimento);\n $this->ov01_tipoprocesso = ($this->ov01_tipoprocesso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_tipoprocesso\"]:$this->ov01_tipoprocesso);\n $this->ov01_formareclamacao = ($this->ov01_formareclamacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_formareclamacao\"]:$this->ov01_formareclamacao);\n $this->ov01_tipoidentificacao = ($this->ov01_tipoidentificacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_tipoidentificacao\"]:$this->ov01_tipoidentificacao);\n $this->ov01_usuario = ($this->ov01_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_usuario\"]:$this->ov01_usuario);\n $this->ov01_depart = ($this->ov01_depart == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_depart\"]:$this->ov01_depart);\n $this->ov01_instit = ($this->ov01_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_instit\"]:$this->ov01_instit);\n $this->ov01_numero = ($this->ov01_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_numero\"]:$this->ov01_numero);\n $this->ov01_anousu = ($this->ov01_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_anousu\"]:$this->ov01_anousu);\n if($this->ov01_dataatend == \"\"){\n $this->ov01_dataatend_dia = ($this->ov01_dataatend_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_dia\"]:$this->ov01_dataatend_dia);\n $this->ov01_dataatend_mes = ($this->ov01_dataatend_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_mes\"]:$this->ov01_dataatend_mes);\n $this->ov01_dataatend_ano = ($this->ov01_dataatend_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_dataatend_ano\"]:$this->ov01_dataatend_ano);\n if($this->ov01_dataatend_dia != \"\"){\n $this->ov01_dataatend = $this->ov01_dataatend_ano.\"-\".$this->ov01_dataatend_mes.\"-\".$this->ov01_dataatend_dia;\n }\n }\n $this->ov01_horaatend = ($this->ov01_horaatend == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_horaatend\"]:$this->ov01_horaatend);\n $this->ov01_requerente = ($this->ov01_requerente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_requerente\"]:$this->ov01_requerente);\n $this->ov01_solicitacao = ($this->ov01_solicitacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_solicitacao\"]:$this->ov01_solicitacao);\n $this->ov01_executado = ($this->ov01_executado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_executado\"]:$this->ov01_executado);\n }else{\n $this->ov01_sequencial = ($this->ov01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov01_sequencial\"]:$this->ov01_sequencial);\n }\n }", "public function zahtev_za_prijavu()\n {\n if(!$this->validate(['uname'=>'required|min_length[5]|max_length[30]', 'pword'=>'required|min_length[8]|max_length[20]']))\n return $this->prijava($this->validator->getErrors());\n $pwordhash = hash(\"sha256\",$this->request->getVar('pword'));\n $km = new korisnikModel();\n $korisnici = $km->pretraga_kIme($this->request->getVar('uname'));\n if(count($korisnici)==1)\n {\n if($korisnici[0]->sifra==$pwordhash)\n {\n if($korisnici[0]->tipKorisnika<3)\n {\n $tipK = ['Administrator','Predstavnik','Kupac'];\n $sessiondata=['idK'=>$korisnici[0]->idKorisnik,\n 'tipK'=>$tipK[$korisnici[0]->tipKorisnika]];\n $this->session->set($sessiondata);\n }\n if($korisnici[0]->tipKorisnika==0) return redirect()->to(site_url('Administrator/index'));\n else if($korisnici[0]->tipKorisnika==1) return redirect()->to(site_url('Predstavnik/index'));\n else if($korisnici[0]->tipKorisnika==2) return redirect()->to(site_url('Kupac/index'));\n else return $this->prijava('Administrator jos uvek nije odobrio zahtev');\n }\n return $this->prijava('Sifra nije ispravna');\n }\n return $this->prijava('Korisnik sa tim imenom ne postoji');\n }", "public function truycapvao_private_cha(){\n }", "public function ouvrir()\n {\n // On enregistre l'ouverture\n if ($this->set('mission_statut', 1)) {\n return true;\n } else {\n return false;\n }\n }", "public function attaquerAdversaire() {\n\n }", "public function ubaci_novu_ideju($Id_autor,$username,$naslov,$datum,$sadrzaj)\n {\n $data=[\"IdK\"=>$Id_autor,\"Username\"=>$username,\"Naslov\"=>$naslov,\"DatumEvaluacije\"=>$datum,\"Sadrzaj\"=>$sadrzaj,\"Popularnost\"=>0];\n $this->insert($data);\n }", "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}", "public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}", "function rejestruj($nazwa_uz, $email, $haslo) {\r\n// zwraca true lub komunikat o b��dzie\r\n\r\n // po��czenie z baz� danych\r\n $lacz = lacz_bd();\r\n\r\n // sprawdzenie, czy nazwa u�ytkownika nie powtarza si�\r\n $wynik = $lacz->query(\"select * from uzytkownik where nazwa_uz='\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n throw new Exception('Wykonanie zapytania nie powiod�o si�.');\r\n }\r\n\r\n if (@ $lacz->num_rows>0) {\r\n throw new Exception('Nazwa u�ytkownika zaj�ta � prosz� wr�ci� i wybra� inn�.');\r\n }\r\n\r\n // je�eli wszystko w porz�dku, umieszczenie w bazie danych\r\n $wynik = $lacz->query(\"insert into uzytkownik values\r\n ('\".$nazwa_uz.\"', sha1('\".$haslo.\"'), '\".$email.\"')\");\r\n if (!$wynik) {\r\n throw new Exception('Rejestracja w bazie danych niemo�liwa � prosz� spr�bowa� p�niej.');\r\n }\r\n\r\n return true;\r\n}", "public function checkVerrouille()\n {\n $this->ligne->checkVerrouille();\n }" ]
[ "0.6261769", "0.6206415", "0.6167502", "0.61146504", "0.6073522", "0.606679", "0.6055197", "0.59345776", "0.5902912", "0.58943695", "0.58661616", "0.5826666", "0.57695", "0.57505834", "0.5731802", "0.5712274", "0.5703575", "0.569372", "0.5684364", "0.5673018", "0.5661475", "0.5641509", "0.5624382", "0.56042606", "0.55385363", "0.5536668", "0.5528685", "0.5527528", "0.55063653", "0.54961956", "0.54839015", "0.5476434", "0.5474794", "0.5470642", "0.5445709", "0.54455036", "0.54338884", "0.54271954", "0.54262626", "0.5418778", "0.54168195", "0.54066885", "0.54057604", "0.53927606", "0.5391139", "0.5390899", "0.53622216", "0.5362117", "0.5357273", "0.53531265", "0.5346019", "0.53336495", "0.5328312", "0.5327769", "0.5323402", "0.53168863", "0.53083676", "0.530779", "0.5305108", "0.52955717", "0.5294911", "0.52892923", "0.52831006", "0.5279713", "0.527915", "0.52718085", "0.5267099", "0.52580285", "0.52486837", "0.5246392", "0.5241814", "0.52412045", "0.52396095", "0.5237628", "0.52241015", "0.52231896", "0.52231205", "0.5217142", "0.51965344", "0.5187405", "0.518604", "0.51743805", "0.51635987", "0.5162167", "0.51555115", "0.5154844", "0.5154751", "0.5153248", "0.5152294", "0.51469445", "0.51463515", "0.51442873", "0.5143884", "0.51368827", "0.5136662", "0.5135452", "0.51341826", "0.5133983", "0.51323545", "0.5128006", "0.5123474" ]
0.0
-1
nacita sluzbu podle jejiho ID
private function selectSpecificService($scheduler, $id ){ $result = $scheduler->adminLoadServiceSpecific($id); return $this->transformToJSON($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getID();", "public function getID();", "public function getID();", "public function get_id();", "public function get_id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function getID(){\n \treturn $this->id;\n }", "function get_id(){\n return $this -> id;\n }", "function get_id(){\n return $this -> id;\n }", "public function get_id(){\n\t\treturn $this->id;\n\t}", "public function get_id(){\n return $this->id;\n }", "public function getId() ;", "public function getID(){\r\n $this->ID;\r\n }", "public function get_id()\t{return $this->id;}", "function get_id()\r\n {\r\n return $this->id;\r\n }", "public function get_Id(){\n return $this->id;\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function getId();", "abstract public function get_id();", "function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function ID();", "public function get_id()\n {\n }", "abstract public function getId();", "function get_id()\n {\n return $this->id;\n }", "public function getIdfa();", "function get_id() {\n\t\treturn $this->id;\n\t}", "abstract function getId();", "function get_id() {\n\t\treturn $this->id;\n\n\t}", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "public function getid(){\r\n return $this->_id;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "public function getid(){\n\t\t\treturn $this->id;\n\t\t}", "public function getID(): string;", "public function ID(): int;", "public function getID() : string;", "public function getId() : int{\n return $this->id;\n }", "public function get_id(){\n\t\treturn $this->_id;\n\t}", "function get_id() {\n return $this->id;\n }", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();" ]
[ "0.7739128", "0.7739128", "0.7739128", "0.7633263", "0.7633263", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7601631", "0.7561888", "0.75478244", "0.75478244", "0.75325245", "0.75201696", "0.7520006", "0.7516258", "0.7509322", "0.74949193", "0.7483411", "0.7472995", "0.7471298", "0.74555206", "0.74415517", "0.74409634", "0.743433", "0.74316657", "0.74307543", "0.7426776", "0.7416672", "0.7412558", "0.7402661", "0.737056", "0.73544055", "0.73466235", "0.73466235", "0.73466235", "0.73466235", "0.73466235", "0.73466235", "0.73466235", "0.7339429", "0.7338767", "0.7333058", "0.7328292", "0.7324988", "0.7319821", "0.7316339", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565", "0.73129565" ]
0.0
-1
transformuje vysledky z DB do JSONu
private function transformToJSON ($result) { $data_for_response = array(); if ($result){ $data_for_response["msg"] = "ok"; foreach ($result as $service) { $data_for_response["results"][] = $service; } }else { $data_for_response["msg"] = "fail - no data found!"; } return new JsonResponse($data_for_response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toJson();", "public function toJson();", "public function jsonSerialize()\n {\n return $this->tinydb_get_serializable_data();\n }", "public function toJSON() {\n\n $oServidor = ServidorRepository::getInstanciaByCodigo(\n $this->getMatricula(),\n DBPessoal::getAnoFolha(),\n DBPessoal::getMesFolha()\n );\n\n $aRetorno = array();\n $aRetorno[\"codigo\"] = $this->getCodigo();\n $aRetorno[\"tipo\"] = $this->getTipoAssentamento();\n $aRetorno[\"natureza\"] = \"padrao\";\n $aRetorno[\"cgm_servidor\"] = $oServidor->getCgm()->getCodigo();\n $aRetorno[\"nome_servidor\"] = utf8_encode($oServidor->getCgm()->getNome());\n\n $aRetorno[\"matricula\"] = $this->getMatricula();\n $aRetorno[\"dataConcessao\"] = ($this->getDataConcessao() instanceof DBDate ? $this->getDataConcessao()->getDate(DBDate::DATA_PTBR) : $this->getDataConcessao());\n $aRetorno[\"historico\"] = $this->getHistorico();\n $aRetorno[\"codigoPortaria\"] = $this->getCodigoPortaria();\n $aRetorno[\"descricaoAto\"] = $this->getDescricaoAto();\n $aRetorno[\"dias\"] = $this->getDias();\n $aRetorno[\"percentual\"] = $this->getPercentual();\n $aRetorno[\"dataTermino\"] = ($this->getDataTermino() instanceof DBDate ? $this->getDataTermino()->getDate(DBDate::DATA_PTBR) : $this->getDataTermino());\n $aRetorno[\"segundoHistorico\"] = $this->getSegundoHistorico();\n $aRetorno[\"loginUsuario\"] = $this->getLoginUsuario();\n $aRetorno[\"dataLancamento\"] = ($this->getDataLancamento() instanceof DBDate ? $this->getDataLancamento()->getDate(DBDate::DATA_PTBR) : $this->getDataLancamento());\n $aRetorno[\"convertido\"] = (int)$this->isConvertido();\n $aRetorno[\"anoPortaria\"] = $this->getAnoPortaria();\n $aRetorno[\"hora\"] = $this->getHora();\n\n return json_encode((object)$aRetorno);\n }", "function __construct(){\n // Mapping con la tabla de EJEDISTANCIA\n $mappingString = '{ \n \"dbConnectionClass\":\"AvalesConnection\",\n \"dbTable\" : \"AVALES\",\n \"attributes\" : {\n \"idAval\" : {\"fiedlName\" : \"ID_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"nroAval\" : {\"fiedlName\" : \"NRO_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroExpediente\" : {\"fiedlName\" : \"NRO_EXPEDIENTE\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroRegistro\" : {\"fiedlName\" : \"REGISTRO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idIngeniero\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idTitular\" : {\"fiedlName\" : \"ID_TITULAR\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idVehiculo\" : {\"fiedlName\" : \"ID_VEHICULO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaAlta\" : {\"fiedlName\" : \"FECHA_ALTA\", \"type\" : \"DATE\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"pendiente\" : {\"fiedlName\" : \"PENDIENTE\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"esAlta\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"tipoAlta\" : {\"fiedlName\" : \"TIPO_ALTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"codPlanta\" : {\"fiedlName\" : \"COD_PLANTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaFinalizacion\" : {\"fiedlName\" : \"FECHA_FINALIZACION\", \"type\" : \"DATE\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"estadoActual\" : {\"fiedlName\" : \"ESTADO_ACTUAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fotos\" : {\"fiedlName\" : \"FOTOS\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"porAntiguedad\" : {\"fiedlName\" : \"POR_ANTIGUEDAD\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idUsuarioFinalizacion\" : {\"fiedlName\" : \"USUARIO_FINALIZACION\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"}\n }\n }';\n\n # Initial Values...\n \n parent::__construct(json_decode($mappingString));\n }", "public function json(){\n $data = pinjamkbl::all();\n return DataTables::of($data)\n\n ->addColumn('buku',function($data){\n return $data->Buku->judul;\n })\n \n ->addColumn('anggota',function($data){\n return $data->Anggota->namaagt;\n })\n ->rawColumns(['buku','anggota'])->make(true);\n }", "function save_nodes_json_to_db($db, $json_nodes, $modul_db_id) {\n //pomocne pole pro prevod indexu uzlu (node_id je primarni klic pro vschny uzly vsech modulu)\n $nodes_id = array();\n \n //prubezna kontrola chyby\n $error = false;\n \n //pruchod jsonu uzlu\n foreach($json_nodes as $key => $node) {\n //echo $key . \"<br>\";\n //kontrola vyskytu povinnych atributu\n if(isset($node['id']) && is_numeric($node['id']) &&\n isset($node['name']) &&\n isset($node['region']) &&\n isset($node['country']) &&\n isset($node['lng']) && is_numeric($node['lng']) &&\n isset($node['lat']) && is_numeric($node['lat']) &&\n isset($node['type']) && is_numeric($node['type'])) {\n\n //vlozeni uzlu do db\n $result2 = $db->prepare('INSERT INTO node (id_original, name, type, modul_id, longitude, latitude, country, region) VALUES (:id_original, :name, :type, :modul_id, :lng, :lat, :country, :region)');\n $params = array(':id_original' => $node['id'], ':name' => $node['name'], ':type' => $node['type'], ':modul_id' => $modul_db_id, ':lng' => $node['lng'], ':lat' => $node['lat'], ':country' => $node['country'], ':region' => $node['region']);\n if(!$result2->execute($params)) { exit(\"db4 chyba\"); }\n\n echo \"uloženo<br>\";\n //zjisteni skutecneho node_id v db\n $node_db_id = $db->lastInsertId();\n\n //pridani nepovinneho atributu info\n\n //vlozeni do pomocneho pole prevodu indexu\n $nodes_id[$node['id']] = $node_db_id;\n }\n else {\n $error = true;\n break;\n }\n }\n \n if($error) {\n header(\"Location: settings.php?status=upload_data_format#upload\");\n die();\n }\n \n return $nodes_id;\n}", "public function toDB()\n {\n return json_encode([\n 'template' => $this->template->getName(),\n 'options' => $this->options\n ]);\n }", "function convertJson($str){\n $str = str_replace(\"idPersonne\",'\"idPersonne\"',$str);\n $str = str_replace(\"{nom\",'{\"nom\"',$str);\n $str = str_replace(\"prenom\",'\"prenom\"',$str);\n $str = str_replace(\"'\",'\"',$str);\n return $str;\n }", "public function saveJson()\n {\n $myFile = \"barang.json\";\n $sqlQuery = \"select * from barang\";\n $json = null;\n try {\n $prepare = parent::prepare($sqlQuery);\n $prepare->execute();\n $result = $prepare->fetchAll(PDO::FETCH_ASSOC);\n\n $json = json_encode($result);\n //print_r($json);\n } catch (Exception $ex) {\n //echo 'Error : ' . $ex->getMessage();\n echo \"sistem dalam perbaikan, coba beberapa saat lagi\";\n }\n return file_put_contents($myFile, $json);\n }", "public function JsonDioceses() {\n $o_data = new Db();\n $qr_result = $o_data->query(\"select grandsparents.idno, CASE objects.status WHEN 0 THEN \\\"en attente\\\" WHEN 1 THEN \\\"en cours\\\" WHEN 2 THEN \\\"à valider\\\" WHEN 3 THEN \\\"validé\\\" ELSE \\\"valeur incohérente\\\" END as statut, count(*) as nombre from ca_objects as objects left join ca_objects as parents on parents.object_id=objects.parent_id left join ca_objects as grandsparents on parents.parent_id=grandsparents.object_id and grandsparents.type_id=261 where objects.type_id = 262 and objects.deleted=0 and parents.type_id=23 and parents.parent_id is not null and grandsparents.object_id is not null group by parents.parent_id, objects.status;\");\n $first=1;\n print \"[\";\n while($qr_result->nextRow()) {\n if(!$first) print \",\";\n print \"{\\\"idno\\\":\\\"\".$qr_result->get('idno').\"\\\",\\n\";\n print \"\\\"statut\\\":\\\"\".$qr_result->get('statut').\"\\\",\\n\";\n print \"\\\"nombre\\\":\\\"\".$qr_result->get('nombre').\"\\\"}\\n\";\n $first=0;\n }\n print \"]\\n\";\n exit;\n }", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "function getJsonObjFromResult(&$result){\n // by reference doorgeven, waardoor deze niet gekopieerd word\n // naar een nieuwe variabele voor deze functie.\n\n $fixed = array();\n \n $typeArray = array(\n MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_INT24, \n MYSQLI_TYPE_LONG, MYSQLI_TYPE_LONGLONG,\n MYSQLI_TYPE_DECIMAL, \n MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE );\n $fieldList = array();\n // haal de veldinformatie van de velden in deze resultset op\n while($info = $result->fetch_field()){\n $fieldList[] = $info;\n }\n // haal de data uit de result en pas deze aan als het veld een\n // getaltype zou moeten bevatten\n while ($row = $result -> fetch_assoc()) {\n $fixedRow = array();\n $teller = 0;\n\n foreach ($row as $key => $value) {\n if (in_array($fieldList[$teller] -> type, $typeArray )) {\n $fixedRow[$key] = 0 + $value;\n } else {\n $fixedRow[$key] = $value;\n }\n $teller++;\n }\n $fixed[] = $fixedRow;\n }\n\n // geef een json object terug\n return '{\"data\":'.json_encode($fixed).'}';\n}", "function getDatos(){\n $res = $this->Consulta('SELECT C.*, P.id_planta FROM '.$this->Table .' C\n INNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\n INNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\n INNER JOIN\n plantas P ON P.id_planta = S.id_planta\n \n WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n $resultado = $res[0];\n // $resultado = array_map('utf8_encode',$resultado);\n \n print_r( json_encode( $resultado ) );\n }", "public function dbSerialize(): string;", "function sqlData($sql){\n // \n $result = $this->query($sql);\n //\n //\n if (!$result) {\n print \"<p>Could not retrieve data: </p>\";\n }\n while ($row = $result->fetchAll()) {\n $data = $row;\n return json_encode($data);\n }\n }", "public function converterJsonfile(){\n try {\n\n /**\n * Algoritmo para consumir a API e receber em $planets os dados dos planetas\n */\n $flag = 1;\n do{\n $cl = curl_init();\n curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($cl, CURLOPT_URL, \"https://swapi.co/api/planets/?page=$flag\");\n curl_setopt($cl, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json;\") );\n $compare = json_decode( curl_exec($cl) );\n foreach( $compare->results as $value ){\n $planets[] = $value;\n }\n $flag++;\n curl_close($cl);\n }while( NULL != $compare->next );\n\n //Com todos os planetas agora monto meus dados conforme o banco de dados e insiro no final.\n foreach( $planets as $planet ){\n\n $data_planet[] = array( \n 'nome' => $planet->name , \n 'clima' => $planet->climate, \n 'terreno' => $planet->terrain, \n 'cnt_aparicoes' => count($planet->films), \n );\n }\n\n //Insert com todos os dados\n $response = $this->model->insert( $data_planet );\n\n return response()->json( $response . ', todos os dados foram carregados e inseridos corretamente!', Response::HTTP_OK );\n \n } catch (Exception $e) {\n return response()->json( [ 'Error' => $e ], Response::HTTP_INTERNAL_SERVER_ERROR );\n }\n\n }", "private function prepareForDB(&$bindings) { //$this ndak berubah, cuma $bindings untuk preparedStatements yang berubah isinyo.\n foreach ($bindings as $k=>$v) if (gettype($v) == \"boolean\") $bindings[$k] = ($v) ? 'true' : '0';\n foreach (static::jsonColumns() as $col) { if (isset($bindings[$col])) $bindings[$col] = json_encode($bindings[$col]); }\n }", "public function toJson(): string;", "public function toJson(): string;", "function resultToJSON($result,$parameters,$allFields=null)\r\n\t{\r\n\t\t$array=resultToArray($result,extractFields($parameters));\r\n\t\treturn arrayToDBGridJSON($array,$parameters,$allFields);\r\n\t}", "protected function prepareJsonStructure(){\n\t\t\n\t}", "function enviadadosDB_personagems(){\n //conecta com o obj\n include_once 'mariadb/conectar_obj.php';\n //\n //url se a imagem nao existe\n $image_not_found = \"http://i.annihil.us/u/prod/marvel/i/mg/b/40/image_not_available.jpg\";\n //\n //query sql\n $query = \"SELECT * FROM marvel WHERE thumbnail != '$image_not_found' AND description != '' AND items != '' LIMIT 6 OFFSET 0\";\n //\n //conecta ao db \n if ($result = $mysqli->query($query)) {\n //cria o objeto\n $object = (object)[];\n //\n //incremento\n $i = 0;\n //\n //correr o retorno\n while ($obj = mysqli_fetch_object($result)) {\n //adicionar o valor do sql ao object\n $object->character[$i] = $obj;\n //\n //incrementa\n $i++;\n //\n }\n //fecha conexao sql\n $result->close();\n //\n }\n //fecha conexao sql\n $mysqli->close();\n //\n //codifica json\n $json = json_encode($object);\n //\n echo $json ;\n}", "public function getJsonBroDeployOverseas(){\n\t\t$query = \"Select BroDeployOverseas.post, Sum(bandwidth.capacity) as capacity, BroDeployOverseas.regularworkstation, BroDeployOverseas.regworkdeployed, BroDeployOverseas.regworkremaining,\n\t\t\tBroDeployOverseas.latitude, BroDeployOverseas.longitude, BroDeployOverseas.regworkpercentcompleted, BroDeployOverseas.vsenpercentcompleted,\n\t\t\tBroDeployOverseas.region, BroDeployOverseas.vsencompatableworkstation, BroDeployOverseas.vsendeployed, BroDeployOverseas.vsenremaining\n\t\t\tFrom public.BroDeployOverseas, public.bandwidth\n\t\t\tWhere BroDeployOverseas.post = bandwidth.post\n\t\t\tGroup By BroDeployOverseas.post, BroDeployOverseas.region, \n\t\t\tBroDeployOverseas.regworkpercentcompleted, BroDeployOverseas.vsenpercentcompleted, \n\t\t\tBroDeployOverseas.regularworkstation, BroDeployOverseas.regworkdeployed, BroDeployOverseas.regworkremaining,\n\t\t\tBroDeployOverseas.vsencompatableworkstation,\n\t\t\tBroDeployOverseas.vsendeployed, BroDeployOverseas.vsenremaining,\n\t\t\tBroDeployOverseas.latitude, BroDeployOverseas.longitude; \n\t\t\"; // There might be a better way to do this.\n\t\t$result = $this->connectPG($query);\t\t\t\n\t\t$rows = pg_fetch_all($result);\t\n\n\t\t$jsonArrayOfObjs = \"[\";\n\t\tforeach($rows as $keys => $datums){\n\t\t\t//Build JSON string\n\t\t\t$rows2 = array_keys($rows);\n\t\t\tif(end($rows2) == $keys){\n\t\t\t\t//This will be the last element in the array of objects\n\t\t\t\t$jsonArrayOfObjs .= \"{\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"region\\\":\\\"\".trim($datums['region']).\"\\\", \\\"post\\\":\\\"\".trim($datums['post']).\"\\\",\"; \n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regularworkstation\\\":\".$datums['regularworkstation'].\", \\\"regworkdeployed\\\":\".$datums['regworkdeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regworkremaining\\\":\".$datums['regworkremaining'].\", \\\"regworkpercentcompleted\\\":\".$datums['regworkpercentcompleted'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsencompatableworkstation\\\":\".$datums['vsencompatableworkstation'].\", \\\"vsendeployed\\\":\".$datums['vsendeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsenremaining\\\":\".$datums['vsenremaining'].\", \\\"vsenpercentcompleted\\\":\".$datums['vsenpercentcompleted'].\", \\\"capacity\\\":\".$datums['capacity'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"latitude\\\":\".$datums['latitude'].\", \\\"longitude\\\":\".$datums['longitude'].\"\";\n\t\t \t$jsonArrayOfObjs .= \"}\";\n\t\t\t}else{\n\t\t\t\t$jsonArrayOfObjs .= \"{\";\n\t\t\t \t\t$jsonArrayOfObjs .= \"\\\"region\\\":\\\"\".trim($datums['region']).\"\\\", \\\"post\\\":\\\"\".trim($datums['post']).\"\\\",\"; \n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regularworkstation\\\":\".$datums['regularworkstation'].\", \\\"regworkdeployed\\\":\".$datums['regworkdeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"regworkremaining\\\":\".$datums['regworkremaining'].\", \\\"regworkpercentcompleted\\\":\".$datums['regworkpercentcompleted'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsencompatableworkstation\\\":\".$datums['vsencompatableworkstation'].\", \\\"vsendeployed\\\":\".$datums['vsendeployed'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"vsenremaining\\\":\".$datums['vsenremaining'].\", \\\"vsenpercentcompleted\\\":\".$datums['vsenpercentcompleted'].\", \\\"capacity\\\":\".$datums['capacity'].\",\";\n\t\t\t \t$jsonArrayOfObjs .= \"\\\"latitude\\\":\".$datums['latitude'].\", \\\"longitude\\\":\".$datums['longitude'].\"\";\n\t\t \t$jsonArrayOfObjs .= \"},\";\n\t\t\t}\n\n\t\t} \n\t\t$jsonArrayOfObjs .= \"]\"; \n\t\t//error_log($jsonArrayOfObjs);\n\n\t\t$cleanJsonStr = json_decode($jsonArrayOfObjs);\n\n\t\t//Validate the JSON\n\t\tif($cleanJsonStr === NULL){error_log(\"Error in JSON in getJsonBroDeployOverseas() method.\"); }else{return $jsonArrayOfObjs;}\n\t}", "public function serialize() {\n\n // pega o mapeamentp\n $mapping = $this->mapping;\n\n // verifica se existe\n if ( !$mapping ) return;\n\n // seta os dados\n $data = [];\n foreach( $mapping as $atributo => $colunaTabela ) {\n $data[$colunaTabela] = $this->$atributo;\n }\n\n // volta os dados\n return $data;\n }", "private function convertirJson($data){\n\t\treturn json_encode($data);\n\t}", "private function mapSqlToObject($rs)\n {\n $temp_prod = new temp_prod();\n $temp_prod->_id = $rs[\"id\"];\n $temp_prod->_session_id = $rs[\"session_id\"];\n $temp_prod->_base64_image = $rs[\"base64_image\"];\n $temp_prod->_bonrepli = $rs[\"bonrepli\"];\n $temp_prod->_commentaire = $rs[\"commentaire\"];\n $temp_prod->_dimension = $rs[\"dimension\"];\n $temp_prod->_escargot = $rs[\"escargot\"];\n $temp_prod->_idn_key = $rs[\"idn_key\"];\n $temp_prod->_idmodelmetier = $rs[\"idmodelmetier\"];\n $temp_prod->_idproduit = $rs[\"idproduit\"];\n $temp_prod->_opt = $rs[\"opt\"];\n $temp_prod->_prix = $rs[\"prix\"];\n $temp_prod->_unitprix = $rs[\"unitprix\"];\n $temp_prod->_idsupport = $rs[\"idsupport\"];\n $temp_prod->_support = $rs[\"idsupport\"];\n $temp_prod->_qte = $rs[\"qte\"];\n $temp_prod->_title = $rs[\"title\"];\n $temp_prod->_data = ($rs[\"data\"]);\n $temp_prod->_random_str = json_decode($rs[\"random_str\"]);\n $temp_prod->_escargot_val = json_decode($rs[\"escargot_val\"]);\n $temp_prod->_contours = json_decode($rs[\"contours\"]);\n $temp_prod->_liserai = json_decode($rs[\"liserai\"]);\n $temp_prod->_id_dimension = $rs[\"id_dimension\"];\n $temp_prod->_id_qte = $rs[\"id_qte\"];\n return $temp_prod;\n }", "public function json(){ return json_encode( $this->objectify() ); }", "function fire_query_get_json() {\n $res = $this->fire_query();\n $res_arr = array();\n while($row = $res->fetch_array(MYSQL_ASSOC)) {\n $res_arr[] = $row;\n }\n return json_encode($res_arr);\n }", "function save_data_json_to_db($db, $json_data, $nodes_id, $modul_db_id) {\n var_dump($json_data);\n \n //pruchod jsonu dat - nadscenare\n foreach($json_data as $key => $upscenario) {\n $load_structure = explode(\",\", $upscenario['struktura']);\n \n //ulozeni nadscenare\n $result = $db->prepare('INSERT INTO upscenario (modul_id, name, user_id, load_structure) VALUES (:modul_id, :name, :user_id, :load_structure)');\n $params = array(':modul_id' => $modul_db_id, ':name' => $upscenario['nadscenar'], ':user_id' => $_SESSION['UID'], ':load_structure' => $upscenario['struktura']);\n if(!$result->execute($params)) { exit(\"db3 chyba\"); }\n\n //zjisteni upscenario_id\n $upscenario_db_id = $db->lastInsertId();\n \n //pomocne pole pro ulozeni agregace (celkovy soucet vsech hran v nadscenari)\n $load_total = array();\n\n //pruchod scenarem\n foreach($upscenario['scenare'] as $scenario) {\n //ulozeni scenare\n $result = $db->prepare('INSERT INTO scenario (upscenario_id, name, user_id) VALUES (:upscenario_id, :name, :user_id)');\n $params = array(':upscenario_id' => $upscenario_db_id, ':name' => $scenario['scenar'], ':user_id' => $_SESSION['UID']);\n if(!$result->execute($params)) { exit(\"db2 chyba\"); }\n \n //zjisteni scenario_id\n $scenario_db_id = $db->lastInsertId();\n \n //pomocne pole pro ulozeni vsech hran\n $load_scenario = array();\n \n //zpracovani kazde komodity - naplneni pomocnych poli pro scenar a pro agregaci\n foreach($load_structure as $i => $commodity) {\n //zpracovani kazde hrany (pokud je scenar neprazdny)\n if(is_array($scenario[$commodity])) {\n foreach($scenario[$commodity] as $n => $edge) {\n //pridani hodnoty hrany dane komodity do pomocneho pole\n $load_scenario[$edge[0]][$edge[1]][$i] = $edge[2];\n $load_total[$edge[0]][$edge[1]][$i] += $edge[2];\n }\n //doplneni chybejich hran hodnotou 0\n foreach($load_scenario as $j => $node_a) {\n foreach($load_scenario[$j] as $k => $node_b) {\n if(count($load_scenario[$j][$k]) < $i + 1) {\n for($m = 0; $m <= $i; $m++) {\n if(!isset($load_scenario[$j][$k][$m])) {\n $load_scenario[$j][$k][$m] = 0;\n }\n if(!isset($load_total[$j][$k][$m])) {\n $load_total[$j][$k][$m] = 0;\n }\n }\n }\n }\n }\n }\n }\n \n //vytvoreni sql prikazu pro hromadne (po kazdem celem scenari) ulozeni hran\n $query = 'INSERT INTO edge (node_a, node_b, scenario_id, load_ab) VALUES ';\n foreach($load_scenario as $node_a => $item) {\n foreach($load_scenario[$node_a] as $node_b => $item) {\n $query .= '(' . $nodes_id[$node_a] . ',' . ($node_b>213?$nodes_id[$node_a]:$nodes_id[$node_b]) . ',' . $scenario_db_id . ',\"'; // !!!!!\n for($m = 0; $m < count($load_structure); $m++){\n $query .= $load_scenario[$node_a][$node_b][$m];\n if($m + 1 < count($load_structure)) $query .= ',';\n }\n $query .= '\"),';\n }\n }\n $query = rtrim($query, ',');\n //echo $query;\n\n //ulozeni do db\n $result = $db->prepare($query);\n $params = array();\n if(!$result->execute($params)) { exit(\"db1 chyba\"); }\n }\n \n //vytvoreni sql prikazu pro hromadne (po kazdem celem nadscenari) ulozeni agregaci hran\n $query = 'INSERT INTO edge_upscenario (node_a, node_b, upscenario_id, load_ab) VALUES ';\n foreach($load_total as $node_a => $item) {\n foreach($load_total[$node_a] as $node_b => $item) {\n $query .= '(' . $nodes_id[$node_a] . ',' . ($node_b>213?$nodes_id[$node_a]:$nodes_id[$node_b]) . ',' . $upscenario_db_id . ',\"'; // !!!!!\n for($m = 0; $m < count($load_structure); $m++){\n $query .= $load_total[$node_a][$node_b][$m];\n if($m + 1 < count($load_structure)) $query .= ',';\n }\n $query .= '\"),';\n }\n }\n $query = rtrim($query, ',');\n //echo $query;\n\n //ulozeni do db\n $result = $db->prepare($query);\n $params = array();\n if(!$result->execute($params)) { exit(\"db6 chyba\"); }\n \n echo \"UPSCENARIO: \" . $db->lastInsertId() . \"<br>\";\n \n print \"<pre>\";\n print_r($load_total);\n print \"</pre>\";\n \n }\n}", "function _convert_to_table_data($entity)\n {\n $data = (array) $entity;\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $data[$key] = $this->object->serialize($value);\n }\n }\n return $data;\n }", "public function transformAll(){\n $genres = $this->entityManager->getRepository(Genre::class)->findAll();\n $genreArray = [];\n\n foreach ($genres as $genre){\n $genreArray[$genre->getId()]= $this->transformSingleGenre($genre);\n }\n\n return new JsonResponse($genreArray);\n\n }", "public function _jsonSerialize();", "public function insertJson() {\r\n\t\t$this->prepareDb();\r\n\t\t$json = $this->expJson();\r\n\t\tif (!$this->getFileContent()) {\r\n\t\t\tfile_put_contents($this->_path_db, json_encode([[\"id\"=>0, \"json\"=>$json, \"class\"=>get_class($this)]], JSON_PRETTY_PRINT));\r\n\t\t\t$this->_jsonId = 0;\r\n\t\t} else {\r\n\t\t\t$this->_jsonFc = json_decode($this->_jsonFc, true);\r\n\t\t\tif (is_array($this->_jsonFc)) {\r\n\t\t\t\t$this->_jsonId = $this->getDispId();\r\n\t\t\t\tarray_push($this->_jsonFc, [\"id\"=>$this->_jsonId, \"json\"=>$json, \"class\"=>get_class($this)]);\r\n\t\t\t\t$this->_jsonFc = json_encode($this->_jsonFc, JSON_PRETTY_PRINT);\r\n\t\t\t\tfile_put_contents($this->_path_db, $this->_jsonFc);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->clearDump();\r\n\t}", "public function annonceJson(){\n $db = $this->getPDO();\n $sql = \"SELECT * FROM annonces INNER JOIN utilisateurs ON annonces.utilisateur_id = utilisateurs.id_utilisateur INNER JOIN categories ON annonces.categorie_id = categories.id_categorie INNER JOIN regions ON annonces.regions_id = regions.id_regions\";\n $json = $db->query($sql);\n return $json;\n }", "public static function getjson($id) {\n try {\n $conexion = ConexionDB::conectar(\"cryptoMonedas\");\n $monedas = $conexion->monedas->findOne(['id' => intval($id)]);\n if ($monedas == null) {\n } else { \n $result = json_decode($monedas);\n } \n } catch(Exception $e) {\n echo $e;\n } \n $conexion = null;\n return $result;\n}", "function table_pelanggan_json(){\n $data = $this->pelanggan->ambil_data()->result_array();\n // $data = $this->data->detail(\"pelanggan\",\"*\");\n ob_start(\"ob_gzhandler\");\n echo json_encode($data); \n }", "private function tableJson() {\n $json = DB::table('products')\n ->leftjoin('categories', 'products.cid', '=', 'categories.id')\n ->leftjoin('sub_categories', 'products.scid', '=', 'sub_categories.id')\n ->select('products.*', 'categories.name as cname', 'sub_categories.name as sname')\n ->orderBy('products.id', 'DESC')\n ->get();\n\n return $json;\n }", "public function json();", "function retornaUsuarios()\n{\n $PDO = db_connect();\n $sql = \"SELECT id,nome_completo,RA,semestre, usuario, img \n FROM sistema.users \n order by nome_completo ASC;\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute();\n $users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $usersKeyName = array();\n foreach ($users as $user) {\n $usersKeyName[trim($user['nome_completo'])] = $user;\n }\n $dadosCodificados = json_encode($usersKeyName);\n $objData = json_decode($dadosCodificados);\n return $objData;\n}", "public function saveToJson($result)\n {\n $data = [];\n foreach ($result as $one) {\n $data['invoice'] = $one['invoice_id'];\n $data['Invoice Date'] = $one['date'];\n $data['Customer Name'] = $one['customer_name'];\n $data['Customer Address'] = $one['address'];\n $data['Product Name'] = $one['product_name'];\n $data['Quantity'] = $one['quantity'];\n $data['Price'] = $one['price'];\n $data['Total'] = $one['total'];\n $data['Grand Total'] = $one['grand_total'];\n }\n //write to json file\n $fp = fopen(__DIR__.'/../storage/json/invoices.json', 'w');\n fwrite($fp, json_encode($data));\n fclose($fp);\n }", "function vetrinaJson($con) {\n $compArray = [];\n $resultComp = mysqli_query($con, \"SELECT * FROM composizioni\");\n while ($rowComp = mysqli_fetch_array($resultComp)) {\n $rowComp_array['i'] = (int)$rowComp['cmp_id'];\n $rowComp_array['c'] = $rowComp['cmp_nome'];\n $rowComp_array['m'] = (int)$rowComp['cmp_mark_id'];\n $rowComp_array['l'] = (int)$rowComp['cmp_line_id'];\n $rowComp_array['v'] = (int)$rowComp['cmp_show'];\n $rowComp_array['y'] = (int)$rowComp['cmp_pos'];\n $rowComp_array['n'] = $rowComp['cmp_title'];\n $rowComp_array['o'] = $rowComp['cmp_note'];\n $rowComp_array['h'] = json_decode($rowComp['cmp_array']);\n\n array_push($compArray, $rowComp_array);\n }\n $fp = fopen('../json/vetrine.json', 'w');\n $out = array_values($compArray);\n fwrite($fp, json_encode($out));\n fclose($fp);\n}", "function toJson($object);", "private function convertSerializedData()\n {\n $layoutUpdateQueryModifier = $this->queryModifierFactory->create(\n 'like',\n [\n 'values' => [\n 'xml' => '%conditions_encoded%'\n ]\n ]\n );\n $this->aggregatedFieldDataConverter->convert(\n [\n new FieldToConvert(\n SerializedToJson::class,\n $this->moduleDataSetup->getTable('widget_instance'),\n 'instance_id',\n 'widget_parameters'\n ),\n new FieldToConvert(\n LayoutUpdateConverter::class,\n $this->moduleDataSetup->getTable('layout_update'),\n 'layout_update_id',\n 'xml',\n $layoutUpdateQueryModifier\n ),\n ],\n $this->moduleDataSetup->getConnection()\n );\n }", "public function json() {\n\t\t$this->datatables->select('\n\t\t\ttb_jadwal_latihan.id,\n\t\t\ttb_jadwal_latihan.id_pelatih,\n\t\t\ttb_jadwal_latihan.hari,\n\t\t\tCONCAT(tb_jadwal_latihan.jam_mulai,\" s/d \",tb_jadwal_latihan.jam_selesai) as jam,\n\t\t\ttb_pelatih.nama');\n\t\t$this->datatables->from($this->table);\n\t\t$this->datatables->join('tb_pelatih', 'tb_jadwal_latihan.id_pelatih=tb_pelatih.id');\t\t\n\t\t$this->datatables->add_column('view', '<div align=\"center\">\n\t\t\t<a class=\"btn btn-warning btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit($1)\"> <span class=\"fa fa-edit\"></span></a>\n\t\t\t<a class=\"btn btn-danger btn-rounded btn-sm\" href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus($1)\" > <span class=\"fa fa-trash\"></span></a>\n\t\t\t</div>', 'id');\n\t\treturn $this->datatables->generate();\n\t}", "function encodeData($data)\n {\n if (is_array($data)) {\n /*\n * Traitement des tableaux\n */\n foreach ($data as $key => $value) {\n $data[$key] = $this->encodeData($value);\n }\n } else {\n /*\n * Traitement des chaines individuelles\n */\n if ($this->typeDatabase == 'pgsql') {\n if ($this->UTF8 && mb_detect_encoding($data) != \"UTF-8\") {\n $data = mb_convert_encoding($data, 'UTF-8');\n }\n $data = pg_escape_string($data);\n } else {\n $data = addslashes($data);\n }\n }\n return $data;\n }", "function documentoxgenerarjson($datas){\n\n\t\tinclude(\"application/config/conexdb_db2.php\");\n\t\t$codcia=$this->session->userdata('codcia');\n\t\t$usuaper= $this->session->userdata('usuaper');\n\t\t$codcia=$datap['codcia'];\n\t\t$fecha=$datas['fecha'];\n\t\t$serie=$datas['serie'];\n\t\t$correl=$datas['correl'];\n\t\t$nropdc=$datas['nropdc'];\t\t\n\t\t$tipodoc=$datas['tipdoc'];\n\t\t$stsdoct=$datas['stsdoct'];\n\t\t$docref=$datas['docref'];\n\t\t$data='';\n\t\t$sql='';\n\t\tif($fecha!=''){\t\n\t\t\tif(($serie!='')||($correl!='')||($nropdc!='')||($tipodoc=='01')){\n\t\t\t\t$query=\" and a.SCTESERI='\".$serie.\"' and a.SCTECORR='\".$correl.\"' and a.SCTEPDCA='\".$nropdc.\"' and a.SCTETDOC='\".$tipodoc.\"' and a.SCTCSTST='\".$stsdoct.\"'\";\t \n\t\t\t}else if(($tipodoc=='03')&&($docref=='0')){\n\t\t\t\t$query=\" and a.SCTETDOC='\".$tipodoc.\"' and a.SCTCSTST='\".$stsdoct.\"'\";\t \n\t\t\t}else if((($tipodoc=='07')&&($docref=='3'))||(($tipodoc=='08')&&($docref=='3'))){\n\t\t\t\t$query=\" and a.SCTETDOC='\".$tipodoc.\"' and a.SCTCSTST='\".$stsdoct.\"'\";\t \n\t\t\t}\n\t\t\telse{\n\t\t\t\t$query=\"\";\n\t\t\t}\t\n\t\t\t$sql =\"select a.SCTEFEC,a.SCTCTMON,a.SCTESERI,a.SCTECORR,a.SCTETDOC,a.SCTETPDO,a.SCTCNRUC,a.SCTGNETO,a.SCTCCIMP,a.SCTMTIMP,a.SCTGTOTA,a.SCTTDREF,a.SCTCSTST,a.SCTEALMA,a.SCTEPDCA,a.SCTFECEM FROM LIBPRDDAT.SNT_CTRAM a where a.SCTECIAA='\".$codcia.\"' and a.SCTCSTS IN ('I','A') and a.SCTFECEM='\".$fecha.\"' \".$query;\n\n\t\t\t$dato = odbc_exec($dbconect, $sql)or die(\"<p>\" . odbc_errormsg());\n\t\t\tif (!$dato) {\n\t\t\t\t$data = false;\n\t\t\t} else { \n\t\t\t\t$data = $dato; \n\t\t\t} \n\t\t}else{\n\t\t\t$data=false;\t\n\t\t} \n\n\t\treturn $data; \n\n\t}", "function jsonSerialize();", "public static function TraerAlumno($id){\n $obj = AlumnoDAO::GetById($id); \n return json_encode($obj);\n }", "public function buildJson();", "protected function jsonEncode($data) : string {\r\n return $this->getServicingSqlInstance()->jsonEncode($data);\r\n }", "public function updateJson() {\r\n\t\t$this->prepareDb();\r\n\t\tif (!$this->getFileContent()) {\r\n\t\t\t$this->log(\"empty db\", 0);\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t\t$this->_jsonFc = json_decode($this->_jsonFc, true);\r\n\t\tif (is_array($this->_jsonFc)) {\r\n\t\t\t$found = false;\r\n\t\t\tforeach ($this->_jsonFc as $key => $fc) {\r\n\t\t\t\tif (isset($fc[\"id\"]) && $fc[\"id\"] == $this->_jsonId) {\r\n\t\t\t\t\t$this->_jsonFc[$key][\"json\"] = $this->expJson();\r\n\t\t\t\t\t$found = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($found) {\r\n\t\t\t\tfile_put_contents($this->_path_db, json_encode($this->_jsonFc, JSON_PRETTY_PRINT));\r\n\t\t\t} else {\r\n\t\t\t\t$this->log(\"id not found in db\", 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->clearDump();\r\n\t}", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "public function to_json()\n {\n }", "function generateJSON(){\n\t\t $metadata = array();\n\t\t $metadata[\"tableID\"] = $this->tableID;\n\t\t $metadata[\"tableGroupID\"] = $this->tableGroupID;\n\t\t $metadata[\"tablePage\"] = $this->tablePage +0 ;\n\t\t $metadata[\"title\"] = $this->tableName;\n\t\t $metadata[\"description\"] = $this->tableDesciption;\n\t\t $metadata[\"tags\"] = $this->tableTags;\n\t\t $metadata[\"doi\"] = $this->tableDOI;\n\t\t $metadata[\"ark\"] = $this->tableARK;\n\t\t $metadata[\"versionControl\"] = $this->versionControl;\n\t\t $metadata[\"license\"] = $this->license;\n\t\t $metadata[\"recordCount\"] = $this->recordCount+0;\n\t\t $metadata[\"rawCreators\"] = $this->rawCreators;\n\t\t $metadata[\"rawContributors\"] = $this->rawContributors;\n\t\t $metadata[\"rawLinkedPersons\"] = $this->rawLinkedPersons;\n\t\t $metadata[\"projects\"] = $this->projects;\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $this->tableFields;\n\t\t $this->metadata = $metadata;\n\t\t return Zend_Json::encode($metadata);\n\t }", "public function initContent()\n {\n /**\n * !!! Do not call parent::initContent().\n * Use it only for collections.\n * Custom output do not have an id and will generate error.\n */\n\n foreach ($this->sql as $key => $query) {\n try {\n $result = Db::getInstance()->executeS($query);\n if (isset($result)) {\n $this->jsonContent[$key] = $result[0][$key];\n }\n } catch (PrestaShopDatabaseException $exception) {\n ClaroLogger::errorLog(__METHOD__ . ' : DBException: ' . $exception->getMessage()\n . ' at line ' . $exception->getLine());\n\n $this->jsonContent = [\n 'status' => 'error',\n 'error' => $exception->getMessage()\n ];\n die(json_encode($this->jsonContent));\n }\n }\n die(json_encode($this->jsonContent));\n }", "function convert_from_sql_row($row)\n\t{\n $this->SignupId = (int)$row->SignupId;\n $this->UserId = (int)$row->UserId;\n $this->RunId = (int)$row->RunId;\n $this->State = (string)$row->State;\n $this->PrevState = (string)$row->PrevState;\n $this->Gender = (string)$row->Gender;\n $this->Counted = (string)$row->Counted;\n $this->UpdatedById = (int)$row->UpdatedById;\n $this->TimeStamp = (string)$row->TimeStamp;\n\t}", "public function jsonOrcamentos($tipo){\n $table = 'orcamento';\n\n // Table's primary key\n $primaryKey = 'cdnOrcamento';\n\n $columns = array();\n\n $extras = array();\n\n $extras[] = 'p.nomPaciente';\n $extras[] = 'p.cdnPaciente';\n if(ControleCampo::campoExiste('nomSobrenome'))\n $extras[] = 'p.nomSobrenome';\n\n // Id\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 0\n );\n\n\n $this->tipo = $tipo;\n\n // Nome\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 1,\n 'formatter' =>\n function($d, $row){\n $d = $row['nomPaciente'];\n if(isset($row['nomSobrenome']))\n $d = utf8_encode($d.' '.$row['nomSobrenome']);\n else\n $d = utf8_encode($d);\n return $d;\n }\n );\n\n // Prontuário\n $columns[] = array(\n 'db' => 'cdnOrcamento',\n 'dt' => 2,\n 'formatter' =>\n function($d, $row){\n $d = $row['cdnPaciente'];\n return $d;\n }\n );\n\n $join = 'inner join paciente p on orcamento.cdnPaciente = p.cdnPaciente';\n\n return $this->jsonFinalizar($table, $primaryKey, $columns, 'indAprovado = 1', $extras, $join);\n }", "public function json()\n {\n //\n return Laratables::recordsOf(Record::class, function ($query) {\n return $query->where('user_id', Auth::id());\n });\n }", "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}", "public function get_data_geojson($d,$tbl){\n $siz =!empty(sizeof($d['a']))?sizeof($d['a']):0;\n for($i=0; $siz >$i; $i++){\n //$this->db->select($d['a'][$i]['col'].' AS '. $d['a'][$i]['name']);\n $this->db->select($d['a'][$i]['col'].' AS '. pg_escape_string(str_replace(\".\",\"\",$d['a'][$i]['name'])));\n }\n $this->db->select('ST_AsGeoJSON(the_geom)');\n $this->db->order_by('id','ASC');\n $q=$this->db->get($tbl);\n return $q;\n }", "private function prepare_data(){\r\n\t\t\t$this->data_table['cols'] = array();\r\n\t\t\t\r\n\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\tswitch($column_info['type']){\r\n\t\t\t\t\tcase 'number':\r\n\t\t\t\t\tcase 'float':\r\n\t\t\t\t\tcase 'currency':\r\n\t\t\t\t\t\t$column_info['type'] = 'number';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$column_info['type'] = 'string';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['cols'][] = array_merge(array('id' => $column_id), $column_info);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rows_count = sizeof(reset($this->data));\r\n\t\t\t\r\n\t\t\tfor($i = 0; $i < $rows_count; $i++){\r\n\t\t\t\t$c = array();\r\n\t\t\t\t\r\n\t\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\t\t$value = $this->data[$column_id][$i];\r\n\t\t\t\t\t$c[] = array('v' => $value);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['rows'][] = array('c' => $c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->data_table = json_encode($this->data_table);\r\n\t\t}", "public function toDatabase($value, Driver $driver)\n {\n $value = json_encode($value, JSON_UNESCAPED_UNICODE);\n return parent::toDatabase($value, $driver);\n }", "function to_json(tSerializable $object){\r\n return json_encode($object->jsonData());\r\n}", "public function jsonTo($json){\n\t\t$array = json_decode($json, true);\n\t\t$this->arrayTo($array);\n\t}", "public function insertFormat(): string\n {\n return 'JSONEachRow';\n }", "public function toJson(){\n\t\t$array = $this->toArray();\n\t\treturn json_encode($array);\n\t}", "public function jsonize()\n {\n return json_encode($this->toArray());\n }", "function return_json($sqlresult) {\n header(\"Content-type:application/json;charset=utf-8\");\n echo json_encode($sqlresult);\n }", "private function mapSqlToObject($rs) {\n $langue = new langue();\n $langue->_id = $rs[\"id\"];\n $langue->_key_identifier = $rs[\"key_identifier\"];\n $langue->_english = $rs[\"english\"];\n $langue->_french = $rs[\"french\"];\n $langue->_spanish = $rs[\"spanish\"];\n $langue->_german = $rs[\"german\"];\n $langue->_italien = $rs[\"italien\"];\n return $langue;\n }", "public function transform($array) {\n//\t\t\tld(\"transform\");\n//\t\t\tld(json_encode($array));\n\t\t\treturn json_encode($array);\n\t\t}", "public function json_table() {\n\t\t\techo json_encode($this->populate_rows());\n\t\t}", "public function jsonOwner() {\n $transaksi = DB::table('transaksis')\n ->join('detail_orders', 'transaksis.id_detail_order', '=', 'detail_orders.id_detail_order')\n ->join('orders', 'detail_orders.id_order', '=', 'orders.id_order')\n ->join('masakans', 'detail_orders.id_masakan', '=', 'masakans.id_masakan')\n ->select('transaksis.*', 'detail_orders.*', 'orders.no_meja', 'masakans.nama_masakan', 'masakans.harga')\n ->get();\n return Datatables::of($transaksi)\n ->make(true);\n }", "public function testCursorJsonEncode() {\n\t\t// If we are in CURSOR mode, there is probably no point in json_encoding the result.\n\t\t/*$this->tdbmService->setFetchMode(TDBMService::MODE_CURSOR);\n\t\t$results = $this->tdbmService->getObjects('departements');\n\t\t$jsonEncoded = json_encode($results);\n\t\t$count = count(json_decode($jsonEncoded, true));\n\n\t\t$this->assertEquals(95, $count);\n\t\t*/\n\t}", "public function func_json_builder () {\n return json_encode ($this -> raw_data);\n }", "function FUNC_RETORNA_JSON_DESCRICAO_BAIRRO($pdo, $cod_bairro) {\r\n echo json_encode(FUNC_RETORNA_DESCRICAO_BAIRRO($pdo, $cod_bairro));\r\n}", "function queryToJson($t_mysqli, $t_query){\n $query_res = array('errors' => array(), 'query_data' => NULL);\n \n $queryarray_res = queryToArray($t_mysqli, $t_query);\n \n $query_res['errors'] = $queryarray_res['errors'];\n $query_res['query_data'] = json_encode($queryarray_res['query_data']);\n \n return $query_res;\n}", "public function toLDJSON()\n {\n }", "public function jsonSerialize()\n\t{\n\t\treturn array(\n\t\t\t'count' => $this->count, \n\t\t\t'objects' => $this->tableObjects\n\t\t\t);\n }", "public function toPhp();", "public function toSql(){\n global $wpdb;\n $table_name = $wpdb->prefix.static::$_table;\n \n $data = [];\n $pk = $this->getPk();\n foreach($this->_datas as $key => $value){\n if($key!=$pk && in_array($key, static::$_fields)){\n $data[$key] = $value.'';\n }\n }\n\n $data = $this->process_fields($table_name, $data, null );\n if (false === $data) {\n return false;\n }\n \n if( isset( $this->$pk ) ){\n $where = [$pk=>$this->$pk];\n $where = $this->process_fields($table_name, $where, null);\n if ( false === $where ) {\n return false;\n }\n \n $fields = $conditions = $values = array();\n foreach ( $data as $field => $value ) {\n if ( is_null( $value['value'] ) ) {\n $fields[] = \"`$field` = NULL\";\n continue;\n }\n\n $fields[] = \"`$field` = \" . $value['format'];\n $values[] = $value['value'];\n }\n \n foreach ( $where as $field => $value ) {\n if ( is_null( $value['value'] ) ) {\n $conditions[] = \"`$field` IS NULL\";\n continue;\n }\n\n $conditions[] = \"`$field` = \" . $value['format'];\n $values[] = $value['value'];\n }\n\n $fields = implode( ', ', $fields );\n $conditions = implode( ' AND ', $conditions );\n \n $sql = \"UPDATE `$table_name` SET $fields WHERE $conditions;\";\n return $wpdb->prepare($sql, $values);\n }else{\n $formats = $values = array();\n foreach ( $data as $value ) {\n if (is_null($value['value'])) {\n $formats[] = 'NULL';\n continue;\n }\n\n $formats[] = $value['format'];\n $values[] = $value['value'];\n }\n\n $fields = '`'.implode( '`, `', array_keys($data)).'`';\n $formats = implode( ', ', $formats);\n\n $sql = \"INSERT INTO `$table_name` ($fields) VALUES ($formats);\";\n return $wpdb->prepare($sql, $values);\n }\n \n return false;\n }", "function objectToSQL($object,$table,$field=\"\",$update=\"add\") {\n if (is_array($object)) {\n while(list($k,$v) = each($object)) {\n if (!is_numeric($k)) {\n $array[$k] = $v;\n }\n }\n } else {\n $array = get_object_vars($object);\n }\n while(list($key,$val) = @each($array)) {\n if (substr($key,0,1)!=\"_\") {\n if ($k1) { $k1 .= \",\"; }\n if ($v1) { $v1 .= \",\"; }\n if ($k2) { $k2 .= \",\"; }\n $q = \"'\";\n if (is_numeric($val)) {\n $q=\"\";\n }\n if (is_array($val) || is_object($val)) {\n $val = @serialize($val);\n } else { \n\t\t\t$val = addslashes(stripslashes($val));\n\t\t}\n $k1 .= $key;\n $v1 .= \"$q$val$q\";\n $k2 .= \"$key=$q$val$q\";\n if ($key==$field) {\n $fieldval=\"$q$val$q\";\n }\n }\n }\n if ($update==\"add\") {\n $sql = \"insert into $table ($k1) values ($v1)\";\n }\n if ($update==\"update\") {\n $sql = \"update $table set $k2 where $field=$fieldval\";\n }\n return $sql;\n}", "public function json_transform($js = true)\n\t\t{\n\t\t\t\n\t\t\twhile($this->row = mysqli_fetch_array($this->result, MYSQL_ASSOC))\n\t\t\t{\n\t\t\t\t // Set Variables Data from DB\n\t\t\t\t $event_id = $this->row['id'];\n\t\t\t\t $event_title = $this->row['title'];\n\t\t\t\t $event_description = $this->row['description'];\n\t\t\t\t $event_start = $this->row['start'];\n\t\t\t\t $event_end = $this->row['end'];\n\t\t\t\t $event_allDay = $this->row['allDay'];\n\t\t\t\t $event_color = $this->row['color'];\n\t\t\t\t $event_url = $this->row['url'];\n\t\t\t\t \n\t\t\t\t if($js == true) \n\t\t\t\t {\n\t\t\t\t \t // JS MODE\n\t\t\t\t\t\n\t\t\t\t\t // When allDay = false the allDay options appears on the script, when its true it doesnot appear \n\t\t\t\t\t if($event_url == 'false' && $event_allDay == 'false')\n\t\t\t\t\t {\n\t\t\t\t\t\t // Build it Without URL & allDay\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Stores Each Database Record To An Array (Without URL)\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color);\n\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\n\t\t\t\t\t } elseif($event_url == 'false' && $event_allDay == 'true') {\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Build it Without URL \n\t\t\t\t\t\t \n\t\t\t\t\t\t // Stores Each Database Record To An Array (Without URL)\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'color' => $event_color);\n\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t \n\t\t\t\t\t } elseif($event_url == 'true' && $event_allDay == 'false') {\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Built it Without URL & allDay True\n\t\t\t\t\t\t \n\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\n\t\t\t\t\t } else {\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($event_allDay == 'false') {\n\t\t\t\t\t\t\t// Built it With URL & allDay false\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t// Built it With URL & allDay True\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t \n\t\t\t\t } else {\n\t\t\t\t\t\t\n\t\t\t\t\t// PHP MODE\n\t\t\t\t\t\n\t\t\t\t\t// When allDay = false the allDay options appears on the script, when its true it doesnot appear \n\t\t\t\t\t if($event_url == 'false' && $event_allDay == 'false')\n\t\t\t\t\t {\n\t\t\t\t\t\t // Build it Without URL & allDay\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Stores Each Database Record To An Array (Without URL)\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color);\n\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\n\t\t\t\t\t } elseif($event_url == 'false' && $event_allDay == 'true') {\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Build it Without URL \n\t\t\t\t\t\t \n\t\t\t\t\t\t // Stores Each Database Record To An Array (Without URL)\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'color' => $event_color);\n\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t \n\t\t\t\t\t } elseif($event_url == 'true' && $event_allDay == 'false') {\n\t\t\t\t\t\t \n\t\t\t\t\t\t // Built it Without URL & allDay True\n\t\t\t\t\t\t \n\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\n\t\t\t\t\t } else {\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($event_allDay == 'false' && substr($event_url, -4, 1) == '.' || substr($event_url, -3, 1) == '.') { // domain top level checking\n\t\t\t\t\t\t\t// Built it With URL & allDay false\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t } elseif($event_allDay == 'true' && substr($event_url, -4, 1) == '.' || substr($event_url, -3, 1) == '.') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Built it With URL & allDay true\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'color' => $event_color, 'url' => $event_url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t } elseif($event_allDay == 'false' && isset($event_url)) {\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t// Built it With any URL and allDay false\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'allDay' => $event_allDay, 'color' => $event_color, 'url' => $event_url . $event_id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \t } else {\n\t\t\t\t\t\t\t// Built it With URL & allDay True\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Stores Each Database Record To An Array\n\t\t\t\t\t\t\t$build_json = array('id' => $event_id, 'title' => $event_title, 'description' => $event_description, 'start' => $event_start, 'end' => $event_end, 'color' => $event_color, 'url' => $event_url . $event_id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Adds Each Array Into The Container Array\n\t\t\t\t\t\t\tarray_push($this->json_array, $build_json);\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \t \n\t\t\t} // end while loop\n\t\t\t\n\t\t\t// Output The Json Formatted Data So That The jQuery Call Can Read It\n\t\t\treturn json_encode($this->json_array);\t\n\t\t}", "function json($id)\n{\n\t$query=$GLOBALS['GCMS_SAFESQL']->query(\n \t\"\n \tSELECT pg_title as name , id , pg_excerpt , date_modified\n\t\t\tFROM `gcms_page`\n\t\t\tWHERE pg_type = 'page' AND pg_status = 'publish'\n \t\t\t[ AND gcms_page.`parent_id` = %N ]\n \t\",array(\n \t\t\t$id ));\n\n $list = $GLOBALS['GCMS_DB']->get_results($query);\n \tusort($list, \"sort_compare\" );\n die (print_r($list));\n\tforeach ($list as $row)\n\t{\n\t\t\n\t\t$img = Image::get(array(\"im_type\"=>\"page\"),false, array(), $row->id );\n\t\t\n\t\t$page[] = $row->id ;\n\t\t$page[] = $row->name ;\n\t\t$page[] = $img->im_path . $img->im_name;\n\t\t$page[] = clean($row->pg_excerpt) ;\n\t\t$page[] = $row->date_modified ;\n\t\t$jsonExp[] = $page;\n\t\t$page = null;\n\t\t\n\t}\n\t\n\theader('Content-type: application/json');\n\tdie ( json_encode(array('posts'=>$jsonExp)));\n\n}", "public function change()\n {\n $query = <<<'EOD'\n \ndrop FUNCTION paging_dbnamespace_column_prop_ext(text);\ndrop FUNCTION paging_dbnamespace_column_prop_ext(text,boolean);\ndrop FUNCTION paging_dbnamespace_column_prop_save(jsonb,text);\ndrop FUNCTION paging_table_cond(jsonb);\n\ncreate or replace function paging_objectdb(a_js jsonb) returns SETOF jsonb\nLANGUAGE plpgsql\nAS $$\nDECLARE\n val_timestart TIMESTAMP = clock_timestamp();\n\n val_draw INTEGER = coalesce(($1 ->> 'draw') :: INTEGER, 0 :: INTEGER);\n val_table TEXT;\n\n val_order TEXT = (SELECT 'order by ' || string_agg((r ->> 'column') || ' ' || (r ->> 'dir'), ',')\n FROM (\n SELECT jsonb_array_elements(a_js -> 'order') AS r\n ) AS r);\n val_offlim TEXT = ' limit ' || COALESCE($1 ->> 'length', '0') || ' offset ' ||\n COALESCE($1 ->> 'start', '0');\n val_condition TEXT ;\n\n val_query TEXT;\n val_result JSONB = '{}';\n val_query_result_jsonb JSONB = '{}';\n val_query_result_integer INTEGER;\n val_debug JSONB = '[]';\n val_mat_mode BOOLEAN;\n val_m_count_total INTEGER;\n val_m_columns TEXT;\n val_condition_arg JSONB = a_js -> 'columns';\n val_paging boolean;\nBEGIN\n\n SELECT\n p.m_column,\n ptm.m_count,\n is_materialize,\n p.name,\n is_paging_full\n FROM paging_table AS p\n left JOIN paging_table_materialize_info AS ptm ON ptm.id = p.last_paging_table_materialize_info_id\n WHERE p.name = $1 ->> 'objdb'\n INTO val_m_columns, val_m_count_total, val_mat_mode, val_table,val_paging;\n\n IF (val_condition_arg IS NOT NULL)\n THEN\n WITH getcolumns AS\n (\n SELECT jsonb_array_elements(val_condition_arg) AS r\n ), normalize AS\n (\n SELECT\n r ->> 'col' AS f_data,\n r ->> 'fc' AS f_cd,\n r ->> 'fv' AS f_value,\n r ->> 'ft' AS f_type\n FROM getcolumns AS t\n )\n SELECT ' where ' || string_agg(CASE WHEN (f_type ~ 'timestamp|date')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n quote_literal(split_part(f_value, ' - ', 1)),\n 'and',\n quote_literal(split_part(f_value, ' - ', 2)))\n WHEN (f_cd = 'in' AND f_type ~ 'int')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n '(' || f_value) || ')'\n WHEN (f_cd = 'in')\n THEN concat_ws(' ',\n f_data,\n f_cd,\n '(' || (SELECT string_agg(quote_literal(r), ',')\n FROM regexp_split_to_table(f_value, ',') AS r)) || ')'\n ELSE concat_ws(' ',\n f_data,\n f_cd,\n quote_literal(f_value)) END, ' and ')\n FROM normalize AS n\n INTO val_condition;\n END IF;\n\n -- if materialize\n val_table = CASE WHEN val_mat_mode\n THEN replace(val_table, 'vw', 'mv')\n ELSE val_table END;\n\n SELECT concat_ws(' ', 'WITH objdb as (',\n 'select', val_m_columns,\n 'FROM', val_table,\n val_condition, val_order, val_offlim\n , ')', 'SELECT ', 'json_agg(row_to_json(objdb)) from objdb')\n INTO val_query;\n\n EXECUTE val_query\n INTO val_query_result_jsonb;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('data',val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('data', coalesce(val_query_result_jsonb,'[]'));\n\n val_timestart = clock_timestamp();\n\n\n IF (val_mat_mode IS TRUE\n AND val_condition IS NULL\n AND val_m_count_total IS NOT NULL)\n THEN\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_m_count_total);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n\n ELSEIF (val_condition IS NOT NULL\n AND val_m_count_total IS NOT NULL)\n THEN\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n ELSEIF (val_condition is not null AND\n val_m_count_total IS NOT NULL)\n THEN\n RAISE EXCEPTION 'asd';\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal',val_query_result_integer, 'time',null));\n val_result = val_result || jsonb_build_object('recordsTotal', val_m_count_total);\n\n ELSEif (val_condition is null)\n then\n\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_timestart = clock_timestamp();\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', null, 'time',null));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsTotal', val_query_result_integer);\n else\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table, val_condition);\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsFiltered', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsFiltered', val_query_result_integer);\n\n val_query = concat_ws(' ', 'select count(*)', 'from', val_table);\n\n val_timestart = clock_timestamp();\n\n EXECUTE val_query\n INTO val_query_result_integer;\n\n val_debug = val_debug || jsonb_build_array(jsonb_build_object('recordsTotal', val_query, 'time', round(\n (EXTRACT(SECOND FROM clock_timestamp()) - EXTRACT(SECOND FROM val_timestart)) :: NUMERIC, 4)));\n val_result = val_result || jsonb_build_object('recordsTotal', val_query_result_integer);\n END IF;\n\n RETURN QUERY\n SELECT val_result || jsonb_build_object('debug', val_debug);\n\nEND;\n$$;\n\nupdate paging_table\nset last_paging_table_materialize_info_id = null\nwhere id in\n (select p.id\nfrom paging_table as p\nLEFT JOIN paging_table_materialize_info as pp on p.last_paging_table_materialize_info_id = pp.id\nwhere is_materialize is false);\n\nEOD;\n $this->execute($query);\n }", "public function getAllJson()\n { \n $estaciones = $this->mibiciDAO->getAllMibici();\n return $estaciones;\n }", "public function toJSON(){\n $jsondata = array();\n $jsondata[\"idCliente\"]=$this->getIdCliente();\n $jsondata[\"idPedido\"]=$this->getIdPedido();\n \n return $jsondata;\n }" ]
[ "0.6133322", "0.6133322", "0.60462767", "0.60450554", "0.5973576", "0.5928447", "0.592475", "0.59096986", "0.59087414", "0.58941096", "0.58303803", "0.58032423", "0.58032423", "0.58032423", "0.58032423", "0.58032423", "0.58032423", "0.58032423", "0.58032423", "0.5780656", "0.57673264", "0.5756176", "0.5755309", "0.57512915", "0.5750409", "0.5724219", "0.5724219", "0.57136786", "0.57085544", "0.57037765", "0.56932575", "0.5685752", "0.56677705", "0.5664434", "0.5638363", "0.5634788", "0.56346166", "0.56273365", "0.56273234", "0.5626373", "0.5578963", "0.55664307", "0.5544815", "0.5507582", "0.54771966", "0.5463362", "0.54243004", "0.5420877", "0.5406051", "0.5403932", "0.540167", "0.53980017", "0.5385388", "0.53766197", "0.537654", "0.53710705", "0.53699535", "0.53644943", "0.5356833", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5350063", "0.5340336", "0.53379524", "0.5335517", "0.53348136", "0.53305715", "0.53254247", "0.53179055", "0.53115135", "0.5307648", "0.5300714", "0.5291432", "0.528897", "0.5286928", "0.5281809", "0.5274421", "0.5274267", "0.5272315", "0.52718735", "0.52574146", "0.5253661", "0.5251847", "0.5251109", "0.52389234", "0.52344024", "0.5225292", "0.5224254", "0.52206326", "0.52168506", "0.52099866", "0.52056414", "0.5197005", "0.5196897", "0.5191232" ]
0.0
-1
Returns path to image. Gallery is define by ID.
abstract public function getPathImage($id, $filename);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImagePath () {\n return luxbum::getImage($this->dir, $this->file);\n }", "function ImageFile()\n\t{\treturn $this->imagedir . (int)$this->id . \".jpg\";\n\t}", "public function getImagePath()\n {\n return $this->getImagesFolder() . '/' . $this->getRootImagePath();\n }", "public function path()\n {\n return $this->image->path;\n }", "protected function getImagePath()\n {\n return Yii::getAlias('@data/image.jpg');\n }", "public function getImagePath()\n {\n return $this->imagepath;\n }", "public function getPhoto($id);", "abstract public function get_thumbnail_source_path();", "public function getImagePath(){\r\n\t\t\treturn $this->imagePath;\r\n\t\t}", "public static function galleryUrl($id) {\n\t\treturn strtr(self::URLPATTERN_GALLERY, array('{id}' => $id));\n\t}", "function image($id) {\n\t\t\t$image = $id;\n\t\t\tif ( -1 == $image ) {\n\t\t\t\t$image = get_template_directory_uri(). '/img/promo-placeholder.jpg';\n\t\t\t} else {\n\t\t\t\t$image = wp_get_attachment_image_src($id, 'carousel');\n\t\t\t\t$image = $image[0];\n\t\t\t}\n\t\t\techo($image);\n\t}", "public function getPhoto() {\n return DATADIR . 'alumni/' . $this->shortName . '.jpg';\n }", "function tp_get_img_dir() {\n\t$file = new ElggFile();\n\t$file->setFilename('image/');\n\treturn $file->getFilenameOnFilestore();\n}", "private function _getAlbumImage($id, $type)\n\t{\n\t\treturn _PS_BASE_URL_.__PS_BASE_URI__.'modules/'.$this->name.'/images/c/'.$id.'-'.$type.'.jpg';\n\t}", "public function getImageFile()\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? null : \\Yii::getAlias(\n '@storage/' . $this->directory . '/' . $this->owner->$link\n );\n }", "public function getMainImage( $id ) {\n\t\t$db = $this->getDb();\n\t\t$cmd = $db->where('post_id', $id)\n\t\t\t->where('main', 1)\n\t\t\t->get();\n\t\t$rs = $cmd->first_row();\n\t\tforeach( $this->paths as $path ) {\n\t\t\t$fpath = FCPATH . $path . $rs->image;\n\t\t\tif( file_exists($fpath) and is_file($fpath) ) {\n\t\t\t\treturn str_replace(FCPATH, Core::getBaseUrl(), $fpath);\n\t\t\t}\n\t\t}\n\t\treturn Core::getBaseUrl() . 'assets/front_end/images/no_image_available.jpg';\n\t}", "function cpo_image_url( $id, $size = 'full' ) {\n\t$url = '';\n\tif ( is_numeric( $id ) ) {\n\t\t$url = wp_get_attachment_image_src( $id, $size );\n\t\t$url = $url[0];\n\t} else {\n\t\t$url = $id;\n\t}\n\n\treturn $url;\n}", "public function photoURL($ID) {\n\t\t\t\t$image = File::get_by_id($ID);\n\t\t\t\t$url = $image->getAbsoluteURL();\n\t\t\t\treturn $url;\n\t\t}", "function getFirstImage($id) {\n global $DB;\n $stmt = $DB->prepare(\"SELECT image FROM hotel_image WHERE hotel_id = ?\");\n $stmt->bindParam(1, $id);\n $stmt->execute();\n if ($row = $stmt->fetch()) {\n return \"./uploads/\".$row[\"image\"];\n }\n return \"./images/default-image.png\";\n}", "function gallery($id = null){\r\n\t\t$this->Album->id = $id;\r\n\t\t$album = $this->Album->read();\r\n\t\t$this->set('album',$album);\r\n\t\t$this->set('path',$this->Admin->siteVar('imagepath'));\r\n\t\t$this->set('baseurl',$this->Admin->siteVar('absoluteimgurl'));\r\n\t\t\r\n\t\t$this->render('gallery','ajax');\r\n\t}", "public function getImage() {\n if ($this->item_image == null) {\n return Yii::app()->request->baseUrl . \"/images/box/default.jpg\";\n } else {\n return Yii::app()->request->baseUrl . \"/images/box/\" . $this->item_image;\n }\n }", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "function getImageId();", "function image($imgId,$type='thumbs') {\n if(is_file($this->core->_SYS['CONF']['FTP_QUOTATIONS'].\"/\".$type.\"/\".$imgId)) {\n $imgUrl = $this->core->_SYS['CONF']['URL_IMAGES_QUOTATIONS'].\"/\".$type.\"/\".$imgId;\n }\n\n return $imgUrl;\n }", "function getPhotoPath()\n\t{\n\t\treturn file_exists(\"img/portrait/user$this->id.jpg\") ? \"/img/portrait/user$this->id.jpg\" : \"/img/unavailable.jpg\";\n\t}", "public function get($id)\n\t{\n\t\t$query = $this->db\n\t\t\t->select('gallery_images.*, files.name, files.filename, files.extension, files.description, files.name as title, galleries.folder_id, galleries.slug as gallery_slug')\n\t\t\t->join('galleries', 'gallery_images.gallery_id = galleries.id', 'left')\n\t\t\t->join('files', 'files.id = gallery_images.file_id', 'left')\n\t\t\t->where('gallery_images.id', $id)\n\t\t\t->get('gallery_images');\n\t\t\t\t\n\t\tif ( $query->num_rows() > 0 )\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function imagePath(){\n return $this->upload_directory.DS.$this->filename;\n }", "public function getImgPath()\n {\n return $this->imgPath;\n }", "public function get_image_path($id, $size = 'min')\n {\n $id = abs(intval($id));\n $id = sprintf('%\\'09d', $id);\n $dir1 = substr($id, 0, 3);\n $dir2 = substr($id, 3, 2);\n $dir3 = substr($id, 5, 2);\n\n return $dir1 . '/' . $dir2 . '/' . $dir3 . '/' . substr($id, -2) . '_topic_' . $size . '.jpg';\n }", "protected function getImageWithId($id){\n $conn = static::connect();\n $stmt = $conn->prepare(\"SELECT * FROM images where id=:id\");\n $stmt->bindValue('id', $id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function getImagePathAttribute()\n {\n $defaultFileStorage= Config::get('filesystems.default');\n $imagefolderUrl= Config::get('filesystems.disks.' . $defaultFileStorage . '.folderUrl') ;\n return $imagefolderUrl . '/' . $this->image;\n }", "public function getImagePathAttribute()\n {\n return public_path($this->imageDirectory);\n }", "function ImageSRC()\n\t{\treturn $this->imagelocation . (int)$this->id . \".jpg\";\n\t}", "public function getPath(Image $image);", "public function thumbnail($id)\n {\n return $this->getThumbnailPath($this->load($id));\n }", "public function getGalleryid()\n {\n return $this->galleryid;\n }", "public function getImageSrc($imgId): string\n {\n $sql = 'SELECT ImgFolder, ImgName FROM Images WHERE Id = :imgId';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':imgId', $imgId);\n $stmt->execute();\n $row = $stmt->fetch();\n\n return $row['ImgFolder'].'/'.$row['ImgName'];\n }", "public function path()\n {\n return \"/storage/{$this->picture}\";\n }", "public function getRootImagePath()\n {\n return \"{$this->filename}\";\n }", "function get_image_url ($type = null, $id = null){\n\n if(file_exists('uploads/' . $type . '_image/' . $id . '.jpg'))\n $image_url = base_url(). 'uploads/' . $type . '_image/' . $id . '.jpg';\n else\n $image_url = base_url(). 'uploads/default_image.jpg';\n\n return $image_url;\n }", "function faculty_get_photo( $id = null ) {\n $thumbnail_id = get_post_thumbnail_id( $id );\n\n if ( $thumbnail_id ) {\n return wp_get_attachment_url( $thumbnail_id );\n }\n\n return get_stylesheet_directory_uri() . '/static/img/knight.png';\n}", "public function getThumbnailPath()\n {\n return $this->getThumbnailsFolder() . '/' . $this->getRootThumbnailPath();\n }", "public function get_image_dir($id)\n {\n $id = abs(intval($id));\n $id = sprintf('%\\'09d', $id);\n $dir1 = substr($id, 0, 3);\n $dir2 = substr($id, 3, 2);\n $dir3 = substr($id, 5, 2);\n\n return $dir1 . '/' . $dir2 . '/' . $dir3 . '/';\n }", "protected function _getPhotoPath()\n {\n if($this->photo_dir){\n return str_replace(\"\\\\\", \"/\", str_replace(\"webroot\\img\\\\\",\"\", str_replace(\"webroot/img/\",\"\",$this->photo_dir)));\n }\n }", "public function getId()\n {\n return $this->_imageId;\n }", "public function getGalleryId(): string {\n\t\treturn ($this->galleryId);\n\t}", "private function _getImageLink($id, $type)\n\t{\n\t\treturn _PS_BASE_URL_.__PS_BASE_URI__.'modules/'.$this->name.'/images/'.$id.'-'.$type.'.jpg';\n\t}", "public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "public function myImage($id = NULL) {\n // formatted data:\n $ruta = $this->webroot . 'img/';\n switch ($id) {\n \tcase 1:\n \t\t$img = '<img src=\"'.$ruta.'checked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n \t\n \tdefault:\n \t\t$img = '<img src=\"'.$ruta.'unchecked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n }\n \t \n return $img;\n }", "public function imageUrl()\n\t{\n\t\treturn \"/storage/$this->image\";\n\t}", "public function get_image_id() {\r\n return $this->image_id;\r\n }", "function wp_get_original_image_path($attachment_id, $unfiltered = \\false)\n {\n }", "public function getImageid()\n {\n return $this->imageid;\n }", "public function getPath($id);", "public static function getGalleryInfo(int $id) {\n $thumbURL = ImageGalleryController::getThumbnailUploadURL();\n return self::select(DB::raw(\"`id`, `name`,\" . self::_getImageSelectString($thumbURL, 'thumbnail') . \", `gallery_type`,`image_description`,`created_at`\"))\n ->where('id', $id)\n ->first();\n }", "public function getRootThumbnailPath()\n {\n return \"{$this->thumbnail}\";\n }", "public function GetImageFile($size = 'default')\n\t{\treturn $this->ImageFileDirectory($size) . '/' . (int)$this->id .'.png';\n\t}", "public function getImage()\n {\n return $this->get('image');\n }", "public function get_image_path($image)\n{\n\treturn \"data/\". $image. \".jpg\";\n}", "public function get_image()\n {\n // cache?\n if ($this->folder_image !== null) return $this->folder_image;\n\n $this->folder_image = false;\n $dir = $this->path;\n\n // simply pick the first image inside this folder\n // search subdirectories if first directory have no images\n while ($dir !== false)\n {\n $dh = self::get_dh($dir);\n $ds = false;\n\n // search folder\n while (($file = readdir($dh)) !== false)\n {\n if ($file == \".\" || $file == \"..\") continue;\n $p = $dir . \"/\" . $file;\n\n if (is_file($p) && image::is_image_type($p))\n {\n $f = new file($p);\n $this->folder_image = $f->image;\n closedir($dh);\n break 2;\n }\n\n elseif (is_dir($p) && $ds === false) {\n $ds = $p;\n }\n }\n\n closedir($dh);\n $dir = $ds;\n }\n\n return $this->folder_image;\n }", "function get_image_url( $id, $width=false, $height=false ) {\n\t\t\n\t\t/**/\n\t\t// Get attachment and resize but return attachment path (needs to return url)\n\t\t$attachment = wp_get_attachment_metadata( $id );\n\t\t$attachment_url = wp_get_attachment_url( $id );\n\t\tif (isset($attachment_url)) {\n\t\t\tif ($width && $height) {\n\t\t\t\t$uploads = wp_upload_dir();\n\t\t\t\t$imgpath = $uploads['basedir'].'/'.$attachment['file'];\n\t\t\t\terror_log($imgpath);\n\t\t\t\t$image = image_resize( $imgpath, $width, $height );\n\t\t\t\tif ( $image && !is_wp_error( $image ) ) {\n\t\t\t\t\terror_log( is_wp_error($image) );\n\t\t\t\t\t$image = path_join( dirname($attachment_url), basename($image) );\n\t\t\t\t} else {\n\t\t\t\t\t$image = $attachment_url;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$image = $attachment_url;\n\t\t\t}\n\t\t\tif (isset($image)) {\n\t\t\t\treturn $image;\n\t\t\t}\n\t\t}\n\t}", "public function getImageFile() \n {\n return isset($this->imagen) ? Yii::$app->basePath . '/web/img/producto/'. $this->imagen : null;\n }", "public function getImageId()\n {\n return $this->_imageId;\n }", "public function getImage($id){\n $id = strip_tags($id);\n\n $sql = \"SELECT * FROM image WHERE id = :id LIMIT 1\";\n $query = $this->db->prepare($sql);\n $parameters = array(':id' => $id);\n\n $query->execute($parameters);\n\n return $query->fetchAll();\n }", "function getImageByImageId() {\n if($this->image_id == '') return;\n\n $sql = \"SELECT * FROM \".$this->tableImages().\" WHERE image_id = \".$this->image_id;\n return $this->db->query($sql)->row_array();\n\t}", "public function get_image() {\n\n return $this->image_id !== null ? $this->image->full_src() : null;\n }", "private function getImageForCarId($id)\n {\n $this->db->setQuery(\"SELECT * FROM #__djcf_images WHERE item_id='\" . (int)$id . \"' ORDER BY ordering ASC LIMIT 1\");\n $row = $this->db->loadObject();\n\n // replace incorrect double //\n return JUri::base() . substr($row->path, 1, strlen($row->path) - 1) . $row->name . '.' . $row->ext;\n }", "public function getImage( $post_id ) {}", "function ThumbSRC()\n\t{\treturn $this->imagelocation . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}", "public function getImgs(){\n \n if ( is_null($this->getId()) ){\n return null;\n }\n\n $d = APPLICATION_PATH . '/../storage/category_pictures/' . $this->getId().'/';\n\n $pics = array();\n\n $dir = opendir($d);\n\n while($file = readdir($dir)){\n if ( $file != \".\" && $file != \"..\" && $file != \".svn\" && $file != \".DS_Store\" ) {\n $pics[] = '/../storage/category_pictures/' . $this->getId() . '/' . $file;\n }\n }\n\n return $pics;\n }", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "function getImageDir () {\n return $this->dir;\n }", "public function getPath(){\n $ext = $this->getExt();\n $filename = $this->id.'.'.$ext;\n return str_replace( $filename, '', $this->filename ); \n }", "public function getMainImagePath() {\n $mainImage = $this->getMainImage();\n if ($mainImage != null) {\n return $mainImage->path;\n }\n else {\n return \"\";\n }\n }", "function getImageByFilename() {\n\t\tif($this->file_name == '') return ;\n\t\t\n\t\t$sql = \"SELECT * FROM \".$this->tableImages().\" WHERE path_image = '$this->file_name'\";\n\t\treturn $this->db->query($sql)->row_array();\n\t}", "public function selectImage($id) {\n $sql = \"SELECT * FROM `images` WHERE `id` = :id\"; \n $stmt = $this->pdo->prepare($sql); \n $stmt->bindValue('id', $id); \n $stmt->execute(); \n return $stmt->fetch(PDO::FETCH_ASSOC); \n }", "public static function GetPath($id){\n\t\treturn Yii::getPathOfAlias('application.GBlocks.'.$id);\n\t}", "protected static function getPath($id) {\n\t\treturn self::FILES_DIR.DIRECTORY_SEPARATOR.$id;\n\t}", "public function getImageUrl();", "public function show($id)\n {\n return Image::find($id);\n }", "public function get_gallery_detail($id) {\n $this->db->select('business_gallery.*');\n $this->db->from('business_gallery');\n $this->db->where('id', $id);\n $query = $this->db->get();\n $query_result = $query->result();\n if (count($query_result) == 0) {\n $details = $query_result;\n } else {\n $details = $query_result[0];\n }\n\n return $details;\n }", "protected function GetImageFromDivisionTable()\n {\n $imageID = null;\n $activePage = $this->getActivePageService()->getActivePage();\n $oDivision = $activePage->getDivision();\n\n if (null !== $oDivision && is_array($oDivision->sqlData) && array_key_exists('images', $oDivision->sqlData)) {\n $oDivisionImages = $oDivision->GetImages('images');\n\n if ($oDivisionImages->Length() > 0) {\n /** @var $oImage TCMSImage */\n if ($this->bPickRandomImage) {\n $oImage = $oDivisionImages->Random();\n } else {\n $oImage = $oDivisionImages->Current();\n }\n $imageID = $oImage->id;\n }\n }\n\n return $imageID;\n }", "public function edit_gallery_image_display($id)\n\t{\n\t\t\t$all_p=$this->db->query(\"SELECT *FROM `product_gallery` where `p_g_id`='\".$id.\"'\");\n\t\t\tif($all_p->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $all_p;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public static function getPath($id) {\n\t\treturn self::$defaultInstance->getPath($id);\n\t}", "public static function getImagePath($plot);", "public function get_image_link()\n {\n }", "protected function getUploadRootDirImg() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/uploads/portafolios/' . $this->getId() . '/img';\n }", "public static function getPath($id);", "public function getThumbnailUrl();", "public function getPath() {\n return FILES_LOCATION . DS . $this->getType() . DS . $this->getId();\n }", "public function getPathFile($id){\n $sql = \"SELECT pathFile FROM fanart WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $path = mysqli_fetch_all($res)[0][0];\n return $path;\n }", "function _load_image_to_edit_path($attachment_id, $size = 'full')\n {\n }", "public function getAbsolutePath()\n {\n return null === $this->photoId\n ? null\n : $this->getUploadRootDir().'/'.$this->photoId;\n }", "function fn_get_public_files_path($company_id = null)\n{\n $path = Storage::instance('images')->getAbsolutePath('');\n if ($company_id === null) {\n $company_id = Registry::get('runtime.simple_ultimate') ? Registry::get('runtime.forced_company_id') : Registry::get('runtime.company_id');\n }\n\n if (!empty($company_id)) {\n $path .= 'companies/' . $company_id . '/';\n }\n\n return $path;\n}", "public function imageFile()\n {\n $file = substr($this->path(), strrpos($this->path(), '/') + 1);\n return storage_path() . '/app/public/' . $file;\n }", "function ThumbFile()\n\t{\treturn $this->imagedir . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}" ]
[ "0.70817566", "0.6955634", "0.67909914", "0.67677885", "0.67656475", "0.6746698", "0.67443603", "0.67343765", "0.6726124", "0.6713007", "0.66791016", "0.6635203", "0.66279024", "0.6602257", "0.65997326", "0.65807176", "0.6576765", "0.65731096", "0.6536184", "0.65257263", "0.6507066", "0.65001816", "0.64995503", "0.6474724", "0.64699554", "0.6454293", "0.64354485", "0.6433963", "0.6433419", "0.6428148", "0.64166176", "0.64087933", "0.64009416", "0.637753", "0.6374885", "0.6369787", "0.63672316", "0.6365065", "0.63617456", "0.6348534", "0.634197", "0.6337244", "0.63362694", "0.63323945", "0.63252515", "0.6309859", "0.6303298", "0.6295381", "0.6289779", "0.6280766", "0.62757325", "0.62666404", "0.62629133", "0.62620324", "0.6253881", "0.62490857", "0.6240269", "0.6238178", "0.6222899", "0.62193316", "0.62060344", "0.62053806", "0.6188195", "0.6180091", "0.61800104", "0.61764634", "0.6162821", "0.6162416", "0.61439335", "0.61424184", "0.6140585", "0.6137643", "0.6137643", "0.6137643", "0.6137643", "0.6132625", "0.61323744", "0.6131043", "0.6130154", "0.6125579", "0.61192334", "0.61172783", "0.61087596", "0.6108663", "0.6104266", "0.6097641", "0.6096972", "0.60875684", "0.608649", "0.6083624", "0.6078663", "0.60758865", "0.6074578", "0.6074275", "0.6072925", "0.607155", "0.60643524", "0.60611856", "0.60598797", "0.60582197" ]
0.7338167
0
Changes ordering of file to left.
abstract public function moveLeft($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveLeft()\n {\n $this->position--;\n if ($this->position < 0) {\n $this->position++;\n array_unshift($this->line, '_');\n }\n }", "function orderdown() {\n\t\torder(-1);\n\t}", "public function rotateLeft();", "function moveRight()\n {\n $this->position++;\n if ($this->position >= count($this->line)) {\n array_push($this->line, '_');\n }\n }", "function sortFilesAscending($thisFiles) {\n \tusort($thisFiles, \"cmpFA\");\n \treturn $thisFiles;\n }", "function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\n }", "function orderup() {\n\t\torder(1);\n\t}", "public function reorder_onMove()\n {\n $sourceNode = Page::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Page::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }", "protected function externalSort() {\n\t\t$this->chunk();\n\n\t\t// To be confirmed/implemented\n\t\t// After file split put them back together in the right order\n\t\techo \"External sort TBC\\n\";\n\t}", "function filesOrder( $uid, $inc, $option, $cat_id ) {\n\tglobal $mainframe;\n $database = &JFactory::getDBO();\n\n\t$row = new jlist_files( $database );\n\t$row->load( $uid );\n $row->move( $inc );\n\n\t$mainframe->redirect( 'index.php?option=com_jdownloads&task=files.list&cat_id='.$cat_id );\n}", "protected function decksOrderAsc()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_condition', $request['decks_order_asc'])\n ->changeRequest('decks_current_order', 'ASC')\n ->setCurrent('Decks_shared');\n }", "public function setOnlyLeft()\n {\n $this->value['text-align'] = 'left';\n $this->_onlyLeft = true;\n }", "function decrementFile() {\n \treturn $this->adjustPosition(-1);\n }", "function incrementFile() {\n \treturn $this->adjustPosition(1);\n }", "function languagelesson_reorder_pages($lessonid) {\n global $DB;\n $startpage = $DB->get_record(\"languagelesson_pages\", array('lessonid'=> $lessonid, 'prevpageid'=>0));\n $order = 0;\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$startpage->id));\n $order++;\n $nextpageid = $DB->get_field(\"languagelesson_pages\", 'id', array('id'=>$startpage->nextpageid));\n\n for (; $nextpageid != 0; $order++) {\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$nextpageid));\n $nextpageid = (int)$DB->get_field(\"languagelesson_pages\", 'nextpageid', array('id'=>$nextpageid));\n }\n}", "public function orderedMove() {\n\t\t$modelName = $this->Controller->modelClass;\n\t\t$this->Controller->{$modelName}->transaction();\n\n\t\tif (!$this->Controller->{$modelName}->Behaviors->attached('Sequence')) {\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('infinitas', 'A problem occured moving the ordered record.'),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => true\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$fields = array_values($this->Controller->{$modelName}->sequenceGroupFields());\n\t\t$fields[] = $this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey;\n\t\t$data = $this->Controller->{$modelName}->find('first', array(\n\t\t\t'fields' => $fields,\n\t\t\t'conditions' => array(\n\t\t\t\t$this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey => $this->Controller->request->data[$modelName][$this->Controller->{$modelName}->primaryKey]\n\t\t\t),\n\t\t\t'callbacks' => false\n\t\t));\n\t\t$data[$modelName]['ordering'] = $this->Controller->request->params['named']['position'];\n\n\t\ttry {\n\t\t\tif ($this->Controller->{$modelName}->save($data, array('validate' => false))) {\n\t\t\t\t$this->Controller->{$modelName}->transaction(true);\n\t\t\t\t$this->Controller->notice(\n\t\t\t\t\t__d('infinitas', 'The record was moved'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'redirect' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->Controller->{$modelName}->transaction(false);\n\t\t\t$this->Controller->notice(\n\t\t\t\t$e->getMessage(),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => false\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function reorder()\n {\n $node = $this->page->find($this->request->get('nodeToChangeParent'));\n\n if ($this->request->get('parent') === '#') {\n $node->makeRoot();\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n } else {\n $parent = $this->page->find($this->request->get('parent'));\n $node->makeChildOf($parent);\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n }\n\n return [\n 'Position changed' => true,\n ];\n }", "public function toLeft($right);", "public function Low_reorder()\n {\n\t\t$this->__construct();\n\t}", "function cms_reOrder() {\r\n\t\tforeach ($this->data[\"Categoria\"] as $id => $posicion) {\r\n\t\t\t$this -> Categoria -> id = $id;\r\n\t\t\t$this -> Categoria -> saveField(\"posicion\", $posicion);\r\n\t\t}\r\n\r\n\t\techo \"yes\";\r\n\t\tConfigure::write('debug', 0);\r\n\t\t$this -> autoRender = false;\r\n\t\texit();\r\n\t}", "private function rotate() {\n\t\t/* @var $f1 File */\n\t\t/* @var $f2 File */\n\t\t$oldLevel = $this->getLevel();\n\t\t$this->setLevel( Level::$OFF );\n\t\t\n\t\tparent::close();\n\t\tfor($i = $this->count - 2; $i >= 0; $i--) {\n\t\t\t$f1 = $this->files[$i];\n\t\t\t$f2 = $this->files[$i + 1];\n\t\t\tif ($f1->exists()) {\n\t\t\t\tif ($f2->exists()) {\n\t\t\t\t\t$f2->delete();\n\t\t\t\t}\n\t\t\t\t$f1->renameTo( $f2 );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t$this->open( $this->files[0], false );\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// We don't want to throw an exception here, but we report the exception to any\n\t\t\t// registered ErrorManager.\n\t\t\t$this->reportError( null, $e, ErrorManager::OPEN_FAILURE );\n\t\t}\n\t\t$this->setLevel( $oldLevel );\n\t}", "function fm_reorder_folders_list($obj1, $obj2) {\r\n\t$size1 = explode(\"/\",$obj1['stored_filename']);\r\n\t$size2 = explode(\"/\",$obj2['stored_filename']);\r\n\r\n\tif (count($size1) == count($size2)) {\r\n\t\treturn 0;\r\n\t}\r\n\tif (count($size1) > count($size2)) {\r\n\t\treturn 1;\r\n\t}\r\n\tif (count($size1) < count($size2)) {\r\n\t\treturn -1;\r\n\t}\r\n}", "public function panLeftCamaraPresidencia() {\n\n self::$presidencia->moverALaIzquierda();\n }", "public function reorder()\n {\n // Ensure the correct sidemenu is active\n BackendMenu::setContext('Uit.Page', 'page', 'reorder');\n\n $this->pageTitle = 'Изменить структуру категории';\n $defaultButtons = null;\n $defaultButtons = '@/plugins/uit/page/controllers/pages/_reorder_toolbar.htm';\n $defaultConfig['buttons'] = $this->getConfig('view[toolbarPartial]', $defaultButtons);\n /*\n * Make config\n */\n $toolbarConfig = $this->makeConfig($this->getConfig('toolbar', $defaultConfig));\n $toolbarConfig->alias = $this->alias . 'Toolbar';\n\n\n $this->vars['toolbar'] = $this->makeWidget('Backend\\Widgets\\Toolbar', $toolbarConfig);\n $this->vars['records'] = \\Uit\\Page\\Models\\Page::make()->getEagerRoot();\n // dump($this->vars['toolbar']);\n }", "public function forceSortAndSavePackageStates() {}", "public function incrItemsLeft($increment) {\n $this->setItemsLeft($this->getItemsLeft() + $increment);\n }", "function sortSizeAscending($thisFiles) {\n \tusort($thisFiles, \"cmpSA\");\n \treturn $thisFiles;\n }", "function _reorder_fields(){\n\t\t$f = $this->fields[\"order_status_note\"];\n\t\tunset($this->fields[\"order_status_note\"]);\n\t\t$this->fields[\"order_status_note\"] = $f;\n\t}", "function sortDateAscending($thisFiles) {\n \tusort($thisFiles, \"cmpDA\");\n \treturn $thisFiles;\n }", "public function colReorderFixedColumnsLeft(int $value = 0)\n {\n $this->attributes['colReorder']['fixedColumnsLeft'] = $value;\n\n return $this;\n }", "function reOrderColumnHeaders() {\n\n }", "function newItemBefore()\r\n\t{\r\n\t\t$this->content_obj->newItemBefore();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "public function testExistedNodeFirstSiblingsMovePrependTo()\n {\n $model8 = Animal::findOne(8);\n $model9 = Animal::findOne(9);\n \n $this->assertTrue($model8->prependTo($model8->parent()));\n $this->assertEquals(1, $model8->weight);\n $model9->refresh();\n $this->assertEquals(2, $model9->weight);\n }", "public function panLeftCamaraAlumnos2() {\n\n self::$alumnos2->moverALaIzquierda();\n }", "public function forward() : void {\n $this->seek(0, SEEK_END);\n }", "function reorder_pages($arr)\n\t{\n\t\t$db = new db;\n\t\tforeach ($arr as $key=>$value )\n\t\t{\n\t\t\t$order = $key+1;\n\t\t\t$query_str = \"UPDATE pages SET `order` = $order WHERE id=$value\";\n\t\t\t$db->set_query_str($query_str);\n\t\t\t$db->db_query();\n\t\t\t\n\t\t\t$query_str = \"UPDATE pages_published SET `order` = $order WHERE id=$value\";\n\t\t\t$db->set_query_str($query_str);\n\t\t\t$db->db_query();\n\t\t}\n\t}", "public function reorder($ids)\n {\n foreach ($ids as $position => $id) {\n DB::table('menu_page')\n ->where('menu_id', '=', $this->id)\n ->where('page_id', '=', $id)\n ->update(['position' => $position]);\n }\n }", "function cognitivefactory_tree_left($cognitivefactoryid, $userid, $groupid, $id) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n $sql = \"\n SELECT \n itemdest, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n id = $id\n \";\n $res = $DB->get_record_sql($sql);\n $ordering = $res->intvalue;\n $fatherid = $res->itemdest;\n\n $sql = \"\n SELECT \n id,\n itemdest\n FROM \n {cognitivefactory_opdata} as od\n WHERE \n id = $fatherid\n \";\n $resfatherid = $DB->get_record_sql($sql);\n if (!$resfatherid) return; // this protects against bouncing left request\n $fatheridbis = $resfatherid->itemdest; //id grandpa...\n\n $sql = \"\n SELECT \n id,\n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > $ordering AND \n itemdest = $fatherid\n {$accessClause}\n ORDER BY \n intvalue\n \";\n $newbrotherordering = $ordering;\n\n if ($ress = $DB->get_records_sql($sql)) {\n foreach ($ress as $res) {\n $opdata = new StdClass();\n $opdata->id = $res->id;\n $opdata->intvalue = $newbrotherordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $newbrotherordering = $newbrotherordering + 1;\n }\n }\n\n // getting father's ordering\n $sql = \"\n SELECT\n id, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n id = $fatherid\n {$accessClause}\n \";\n $resorderingfather = $DB->get_record_sql($sql);\n $orderingfather = $resorderingfather->intvalue;\n\n // reordering uncles\n $select = \"\n cognitivefactoryid = ? AND\n operatorid = 'hierarchize' AND\n intvalue > ? AND \n itemdest = ?\n {$accessClause}\n \";\n if ($resbrotherfathers = $DB->get_records_select('cognitivefactory_opdata', $select, array($cognitivefactoryid, $orderingfather, $fatheridbis), 'id, intvalue', 'intvalue')) {\n foreach ($resbrotherfathers as $resbrotherfather) {\n $idbrotherfather = $resbrotherfather->id;\n $nextordering = $resbrotherfather->intvalue + 1;\n\n $opdata = new StdClass();\n $opdata->id = $idbrotherfather;\n $opdata->intvalue = $nextordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n }\n\n // reordering\n $newordering = $orderingfather + 1;\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $opdata->itemdest = $fatheridbis;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n}", "function inline_archive_left_column_start() {\n\n\techo '<div class=\"left\">';\n\t\n}", "function itemOrderAction(DocumentParser $modx, DatabaseUtils $db)\n{\n $DIR_UP = 1;\n $DIR_DOWN = 2;\n\n $tableName = $db->getTableName('menu_items');\n $itemId = getIntParam('id');\n $parentId = getIntParam('parentId', 0);\n $menuId = getIntParam('menuId');\n $dir = getIntParam('dir');\n\n if (!$itemId) sendError(__FUNCTION__ . ': itemId undefined');\n if (!$menuId) sendError(__FUNCTION__ . ': menuId undefined');\n if (!$dir) sendError(__FUNCTION__ . ': direction order undefined');\n\n $parentIdWhereCondition = is_null($parentId) ? \"`parent_id` IS NULL\" : \"`parent_id`={$parentId}\";\n\n $result = $modx->db->select(\n '*',\n $tableName,\n \"`menu_id`={$menuId} AND {$parentIdWhereCondition}\",\n \"`order_index`, `id` ASC\"\n );\n\n // check indexes\n $items = [];\n $orderCounter = 1;\n $moveItem = null;\n while ($row = $modx->db->getRow($result)) {\n $item = $db->castTypes('menu_items', $row, true);\n $item['orderIndex'] = $orderCounter;\n $items[$orderCounter] = $item;\n if ($item['id'] == $itemId) $moveItem = $orderCounter;\n $orderCounter++;\n }\n\n if ($dir == $DIR_DOWN and $items[$moveItem]['orderIndex'] < count($items)) {\n $items[$moveItem]['orderIndex']++;\n $items[$moveItem + 1]['orderIndex']--;\n }\n\n if ($dir == $DIR_UP and $items[$moveItem]['orderIndex'] > 1) {\n $items[$moveItem]['orderIndex']--;\n $items[$moveItem - 1]['orderIndex']++;\n }\n\n foreach ($items as $_item) {\n $modx->db->update(['order_index' => $_item['orderIndex']], $tableName, \"`id` = {$_item['id']}\");\n }\n// $forUp = array_splice($items, $moveItem['order_index']-1, 1);\n\n// $nextDecrement = false;\n// foreach ($items as &$_item) {\n// if ($_item['id'] == $itemId && $dir==$DIR_DOWN) {\n// $_item['orderIndex']++;\n// $nextDecrement = true;\n// continue;\n// }\n// if ($nextDecrement && $dir==$DIR_DOWN) {\n// $_item['orderIndex']--;\n// break;\n// }\n// }\n\n// if (!$itemData['id']) {\n//\n// $itemData['id'] = $modx->db->insert($itemData, $tableName);\n// if (!$itemData['id']) sendError(__FUNCTION__ . ': пункт меню не создан');\n//\n// } else {\n//\n// if (!$modx->db->update($itemData, $tableName, \"id = {$itemData['id']}\")) {\n// sendError(__FUNCTION__ . ': menu item is not saved');\n// }\n//\n// }\n\n sendResponse([\n 'itemId' => $itemId,\n // 'forUp' => $forUp,\n 'items' => $items,\n // 'item' => $db->keysConvertToCamelCase($itemData),\n ], 'Пункт меню создан/обновлен');\n}", "public function panLeftCamaraAlumnos1() {\n\n self::$alumnos1->moverALaIzquierda();\n\n }", "public function updateReorderFeaturedContent()\n\t\t{\n\t\t\tforeach($_POST as $post=>$value)\n\t\t\t\t{\n\t\t\t\t\tif($post=='left')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$inc=1;\n\t\t\t\t\t\t\t$glider_arr = explode(',',$value);\n\t\t\t\t\t\t\tforeach($glider_arr as $glider_id)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sql ='UPDATE '.$this->CFG['db']['tbl']['index_root_featured_glider_details'].\n\t\t\t\t\t\t\t\t\t\t\t' SET featured_order='.$this->dbObj->Param('featured_order').\n\t\t\t\t\t\t\t\t\t\t\t' WHERE index_glider_id='.$this->dbObj->Param('glider_id');\n\t\t\t\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt, array($inc,$glider_id));\n\t\t\t\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t\t\t\t\t$inc++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}", "public function reorderChildren()\n {\n $sql = \"select ID_PAGE from \" . $this->mode . \"PAGE where PAG_IDPERE=\" . $this->getID() . \" order by PAG_POIDS\";\n $stmt = $this->dbh->prepare(\"update \" . $this->mode . \"PAGE set PAG_POIDS=:PAG_POIDS where ID_PAGE=:ID_PAGE\");\n $PAG_POIDS = 1;\n $stmt->bindParam(':PAG_POIDS', $PAG_POIDS, PDO::PARAM_INT);\n foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN) as $ID_PAGE) {\n $stmt->bindValue(':ID_PAGE', $ID_PAGE, PDO::PARAM_INT);\n $stmt->execute();\n $PAG_POIDS ++;\n }\n }", "public abstract function moveToPrevious($referenceId = null);", "public function rewind(): void\n {\n $this->key = 0;\n $this->current = $this->start;\n }", "function tideways_prepend_overwritten()\n{\n}", "public function onAfterSkippedWrite()\n {\n $this->updateChildFilesystem();\n }", "function cognitivefactory_tree_updateordering($cognitivefactoryid, $groupid, $userid, $id, $istree) {\n\n // getting ordering value of the current node\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n // getting subsequent nodes that have same father\n $sql = \"\n SELECT \n id \n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > {$res->intvalue}\n {$treeClause}\n {$accessClause}\n ORDER BY \n intvalue\n \";\n\n // reordering subsequent nodes using an object\n if ( $nextsubs = $DB->get_record_sql($sql)) {\n $ordering = $res->intvalue + 1;\n foreach ($nextsubs as $asub) {\n $opdata = new StdClass();\n $opdata->id = $asub->id;\n $opdata->intvalue = $ordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $ordering++;\n }\n }\n}", "protected function setOrderAsc(): self\r\n {\r\n $this->getBread()->setOrderAsc();\r\n return $this;\r\n }", "function reorder()\n\t{\n\t\t$ids = $this->params['form']['people'];\n\t\t\n\t\t// Save the new orderings to the database (1st review gets highest number)\n\t\t$i = 0;\n\t\tforeach($ids as $id)\n\t\t{\n\t\t\t$this->Person->id = $id;\n\t\t\t$this->Person->saveField('ordering', $i++);\n\t\t}\n\t\t\n\t\t// Re-render the list of reviews to show that we have succeeded\n\t\t$contact_id = $this->Person->field('contact_id', \"Person.id = '\".$ids[0].\"'\");\n\t\t\n\t\t$this->setAction('listFromContact', $contact_id);\n\t}", "function albums_reorder_images($album) {\n\t$images = albums_get_images($album);\n\n\t//Only reorder if album contains images.\n\tif ($images != FALSE) {\n\t\t$number = 1;\n\t\tforeach ($images as $image) {\n\t\t\t$parts = explode('.', $image['filename']);\n\t\t\tif (isset($parts[3])) {\n\t\t\t\trename(ALBUMS_DIR.'/'.$album.'/'.$image['filename'], ALBUMS_DIR.'/'.$album.'/'.$number.'.'.$parts[1].'.'.$parts[2].'.'.$parts[3]);\n\t\t\t\t$number++;\n\t\t\t}\n\t\t}\n\t}\n}", "function MoveFirst() {}", "private function setMenuOrder() {\n $this->product->set_menu_order($this->wcData->getMenuOrder());\n }", "private function moveParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = 1; $i <= $this->index; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $source = sys_get_temp_dir().'/'.$indexed_filename;\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (!rename($source, $target)) {\n throw FileAccessException::failedOverwrite($source, $target);\n }\n }\n }", "public function moveLeft() : Tetris {\n // check if the block can be moved to the left\n if ($this->block->canMove('left')) {\n // move the block to the left\n $this->block->setX($this->block->getX() - 1);\n }\n\n // return the game for chained method calling\n return $this;\n }", "public function updateMenuOrder() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\n\t\t\t$errors = FALSE;\n\t\t\t$subjects_abc = array();\n\t\t\t// Get current order (structure_id)\n\t\t\t$query = \"SELECT structure_id FROM webmatrix_structure WHERE structure_parent = \".$this->subjects_structure_id.\" ORDER BY structure_text ASC\";\n\t\t\t$sql->query($query, $this->debug);\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$subjects_abc[] = $sql->Record['structure_id'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update menu to be ordered alphabetical\n\t\t\t$no_subjects = (count($subjects_abc) - 1);\n\t\t\tfor ($i=0; $i<=$no_subjects; $i++) {\n\t\t\t\t$structure_id = $subjects_abc[$i];\n\t\t\t\t$query = \"UPDATE webmatrix_structure SET structure_order = $i, structure_flag = 2 WHERE structure_id = $structure_id\";\n\t\t\t\t$sql->query($query, $this->debug);\n\t\t\t\tif ($sql->num_rows_affected() == 0) {\n\t\t\t\t\t$errors = TRUE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $errors;\n\n\t\t}", "function maker_4ym_change_menu_order() {\n return array(\n 'index.php',\n 'edit.php',\n 'edit.php?post_type=story',\n\t'upload.php'\n );\n}", "final public function rewind(): void\n {\n $this->sort();\n\n reset($this->index);\n }", "function moveItemUp()\r\n\t{\r\n\t\t$this->content_obj->moveItemUp();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "function _buildContentOrderByPending()\n\t{\n\t\t$field = $this->getField();\n\n\t\tif (!$field || !$field->item_id)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$upload_context = 'fc_upload_history.item_' . $field->item_id . '_field_' . $field->id;\n\t\t$session_files = JFactory::getSession()->get($upload_context, array());\n\n\t\t$file_ids = isset($session_files['ids_pending'])\n\t\t\t? $session_files['ids_pending']\n\t\t\t: array();\n\n\t\t$orderby = $file_ids\n\t\t\t? ' ORDER BY FIELD(a.id, ' . implode(', ', ArrayHelper::toInteger($file_ids)) . ')'\n\t\t\t: '';\n\t\treturn $orderby;\n\t}", "function orderup() {\n\t\t\n\t\t$this->_order(-1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "public function sortDirection();", "protected function _moveNext()\n {\n if ($nextRow = $this->_getNextRow()) {\n $this->_currentRow = $this->_formatRow($nextRow);\n } else {\n $this->_currentRow = array();\n }\n \n if (!$this->_currentRow) {\n fclose($this->_handle);\n $this->_valid = false;\n $this->_handle = null;\n }\n }", "function swapFiles() {\r\n\t\tglobal $file;\r\n\r\n\t\trename($file, $file.\".tmp\");\r\n\t\trename($file.\".bak\", $file);\r\n\t\trename($file.\".tmp\", $file.\".bak\");\r\n\t}", "protected function get_sort_order() {\n return 111;\n }", "public function rewind() : void {\n $this->seek(0, SEEK_SET);\n }", "public function reordered( $order_id ) {\n\n\t\t$this->api_record_event( $this->event_name['reordered'], array( $this->property_name['order_id'] => $order_id ) );\n\t}", "function _modsort($a,$b){\n if($a['mtime'] < $b['mtime']) return -1;\n if($a['mtime'] > $b['mtime']) return 1;\n return strcmp($a['file'],$b['file']);\n }", "function rewind (){ $this->key = -1; }", "public function testPrependExistingStorages()\n {\n file_put_contents(self::$temp.DS.'file.txt', 'World');\n\n Storage::prepend(self::$temp.DS.'file.txt', 'Hello ');\n $this->assertStringEqualsFile(self::$temp.DS.'file.txt', 'Hello World');\n }", "public function fastForward()\n {\n $this->current = $this->top();\n }", "public function flipHorizontal(): void\n {\n $this->flip(['direction' => 'h']);\n }", "function getLeft() ;", "function _fillLeft()\n {\n return $this->_left + $this->_padding['left'];\n }", "public function rewind() {\n\t\t// Set the line pointer to 1 as that is the first entry in the data array\n\t\t$this->setFilePos(1);\n\t}", "public function inOrder(): void\n {\n $this->_inOrder($this->root);\n }", "public function setLeftField($name) {\n $this->_left = $name;\n return $this;\n }", "function cognitivefactory_tree_right($cognitivefactoryid, $userid, $groupid, $id) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n /// get ordering and parent for the moving node\n $sql = \"\n SELECT \n itemdest, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n id = $id\n \";\n $res = $DB->get_record_sql($sql);\n $ordering = $res->intvalue;\n $fatherid = $res->itemdest;\n\n /// get previous record if not first. It will become our parent.\n if ($ordering > 1) {\n $orderingbis = $ordering - 1;\n\n $sql = \"\n SELECT \n id,\n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue = $orderingbis AND \n itemdest = $fatherid\n {$accessClause}\n \";\n $resid = $DB->get_record_sql($sql);\n $newfatherid = $resid->id;\n\n /// get our upward brothers. They should be ordered back from ordering\n $sql = \"\n SELECT \n id, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > $ordering AND \n itemdest = $fatherid \n {$accessClause}\n ORDER BY \n intvalue\n \";\n $newbrotherordering = $ordering;\n\n /// order back all upward brothers\n if ($resbrothers = $DB->get_records_sql($sql)) {\n foreach ($resbrothers as $resbrother) {\n $opdata = new StdClass();\n $opdata->id = $resbrother->id;\n $opdata->intvalue = $newbrotherordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $newbrotherordering = $newbrotherordering + 1;\n }\n }\n\n $maxordering = cognitivefactory_tree_get_max_ordering($cognitivefactoryid, null, $groupid, true, $newfatherid);\n $newordering = $maxordering + 1;\n\n // assigning father's id\n $object = new StdClass();\n $opdata->id = $id;\n $opdata->itemdest = $newfatherid;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "public function prev(): void {\n // current position and then store its location\n if (fseek($this->fileHandle,\n ($this->position - $this->blockSize)) === 0) {\n // Set new location\n $this->updatePosition();\n $this->readBlock();\n } else {\n // Otherwise mark the position invalid and throw an exception\n $this->isValid = false;\n throw new OutOfBoundsException();\n }\n }", "public function writeRecords_pages_order() {}", "public function changeOrder (array $order)\n {\n /*\n * exemple de tableau order (retourné par jquery nestedSortable)\n * 0\t=>\troot\n * 1\t=>\troot\n * 2\t=>\t1\n * 3\t=> \t1\n * 4\t=>\troot\n * \n * */\n\n \t$this->_order = array();\n \tforeach ($order as $pageid => $value) {\n \t\tif ($value == 'root') {\n $this->_order[$pageid] = array();\n \t\t} else {\n if (isset($this->_order[$value])) {\n $this->_order[$value][$pageid] = array();\n } else {\n foreach($this->_order as $i => $elem) {\n if (is_array($elem) && isset($this->_order[$i][$value])) {\n $this->_order[$i][$value][$pageid] = array();\n }\n }\n }\n \t\t}\n \t}\n }", "function move_module($from_module_id, $to_parent_id)\n\t{\n\t\tglobal $db;\n\n\t\t$moved_modules = $this->get_module_branch($from_module_id, 'children', 'descending');\n\t\t$from_data = $moved_modules[0];\n\t\t$diff = sizeof($moved_modules) * 2;\n\n\t\t$moved_ids = array();\n\t\tfor ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i)\n\t\t{\n\t\t\t$moved_ids[] = $moved_modules[$i]['module_id'];\n\t\t}\n\n\t\t// Resync parents\n\t\t$sql = 'UPDATE ' . MODULES_TABLE . \"\n\t\t\tSET right_id = right_id - $diff\n\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\tAND left_id < \" . (int) $from_data['right_id'] . '\n\t\t\t\tAND right_id > ' . (int) $from_data['right_id'];\n\t\t$db->sql_query($sql);\n\n\t\t// Resync righthand side of tree\n\t\t$sql = 'UPDATE ' . MODULES_TABLE . \"\n\t\t\tSET left_id = left_id - $diff, right_id = right_id - $diff\n\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\tAND left_id > \" . (int) $from_data['right_id'];\n\t\t$db->sql_query($sql);\n\n\t\tif ($to_parent_id > 0)\n\t\t{\n\t\t\t$to_data = $this->get_module_row($to_parent_id);\n\n\t\t\t// Resync new parents\n\t\t\t$sql = 'UPDATE ' . MODULES_TABLE . \"\n\t\t\t\tSET right_id = right_id + $diff\n\t\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\t\tAND \" . (int) $to_data['right_id'] . ' BETWEEN left_id AND right_id\n\t\t\t\t\tAND ' . $db->sql_in_set('module_id', $moved_ids, true);\n\t\t\t$db->sql_query($sql);\n\n\t\t\t// Resync the righthand side of the tree\n\t\t\t$sql = 'UPDATE ' . MODULES_TABLE . \"\n\t\t\t\tSET left_id = left_id + $diff, right_id = right_id + $diff\n\t\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\t\tAND left_id > \" . (int) $to_data['right_id'] . '\n\t\t\t\t\tAND ' . $db->sql_in_set('module_id', $moved_ids, true);\n\t\t\t$db->sql_query($sql);\n\n\t\t\t// Resync moved branch\n\t\t\t$to_data['right_id'] += $diff;\n\t\t\tif ($to_data['right_id'] > $from_data['right_id'])\n\t\t\t{\n\t\t\t\t$diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = 'SELECT MAX(right_id) AS right_id\n\t\t\t\tFROM ' . MODULES_TABLE . \"\n\t\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\t\tAND \" . $db->sql_in_set('module_id', $moved_ids, true);\n\t\t\t$result = $db->sql_query($sql);\n\t\t\t$row = $db->sql_fetchrow($result);\n\t\t\t$db->sql_freeresult($result);\n\n\t\t\t$diff = '+ ' . (int) ($row['right_id'] - $from_data['left_id'] + 1);\n\t\t}\n\n\t\t$sql = 'UPDATE ' . MODULES_TABLE . \"\n\t\t\tSET left_id = left_id $diff, right_id = right_id $diff\n\t\t\tWHERE module_class = '\" . $db->sql_escape($this->module_class) . \"'\n\t\t\t\tAND \" . $db->sql_in_set('module_id', $moved_ids);\n\t\t$db->sql_query($sql);\n\t}", "public function moveAsPrevSiblingOf(Doctrine_Record $dest);", "public function getLeft() {}", "private function writeMarginLeft(): void\n {\n $record = 0x0026; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }", "protected function rewindRefactoredNodes()\n {\n $this->refactoredNodes = 0;\n }", "function update_sort_order()\n\t{\n\t\t$page_id = $this->input->post('sort_id');\n\t\t$row_sort_order = $this->input->post('row_sort_order');\n\t\t$this->Text_image_slider_model->update_sort_order($page_id, $row_sort_order);\n\t}", "public function reorder()\n {\n $this->Lesson_Model->reorder($this->input->post(\"lesson\"));\n }", "abstract public function moveRight($id);", "function movefirst() {\n\t\tif(mysql_data_seek($this->rstemp,0)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function left ( $count = 0 ) {\n $this->_currentPosition = array(\n $this->_currentPosition[0] - $count,\n $this->_currentPosition[1],\n );\n return $this;\n }", "public function sort($num = null) {\n\n if(!$num and $num !== 0) return $this->num();\n if($num === $this->num()) return true;\n\n $dir = $num . '-' . $this->uid();\n $root = dirname($this->root()) . DS . $dir;\n\n if(!dir::move($this->root(), $root)) {\n throw new Exception('The directory could not be moved');\n }\n\n $this->dirname = $dir;\n $this->num = $num;\n $this->root = $root;\n $this->kirby->cache()->flush();\n $this->reset();\n return true;\n\n }", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "private function resetfile_pointer()\n {\n $this->file_pointer = 0;\n }", "private function _swapOrdering($tableName, $idA, $idB)\n {\n //get table\n $table = &$this->getTable($tableName, 'VWKTable');\n if ($table != null)\n {\n //load record B\n $table->load($idB);\n $orderingB = $table->ordering;\n //load record A\n $table->load($idA);\n $orderingA = $table->ordering;\n\n //check both \"ordering values\" for being not null\n if (($orderingA != null) && ($orderingB != null))\n {\n //set ordering of record A to value of record B\n $table->ordering = $orderingB;\n //store data\n $table->store();\n\n //load record B (once again)\n $table->load($idB);\n //set ordering of record B to value of record A\n $table->ordering = $orderingA;\n //store data\n $table->store();\n }\n }\n }", "function sync_file_move($old, $new)\n{\n require_code('files2');\n _sync_file_move($old, $new);\n}", "public function setLeft(?RedBlackNode $left): void\n {\n $this->left = $left;\n }", "function setRightToLeft($right_to_left) {\n $this->fields['right_to_left'] = $right_to_left;\n return $this;\n }", "public function rewind(): void\n {\n $this->position = 0;\n }", "function admin_reorder()\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['delta']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Delta'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['delta']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Delta'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node_id = $this->params['form']['node'];\n\t\t$delta = $this->params['form']['delta'];\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('success' => 1);\n\n\t\tif($delta > 0)\n\t\t{\n\t\t\tif($this->Navigation->movedown($node_id, abs($delta)))\n\t\t\t{\n\t\t\t\t$response = array('success' => 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->cakeError('internal_error', array('action' => 'Reorder', 'resource' => 'Navigation'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if($delta < 0)\n\t\t{\n\t\t\tif($this->Navigation->moveup($node_id, abs($delta)))\n\t\t\t{\n\t\t\t\t$response = array('success' => 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->cakeError('internal_error', array('action' => 'Reorder', 'resource' => 'Navigation'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->set('response', $response);\n\t}" ]
[ "0.67862177", "0.55442137", "0.55202234", "0.5433197", "0.54241836", "0.541454", "0.5405853", "0.53767693", "0.5365945", "0.53263277", "0.5319033", "0.5267803", "0.52632487", "0.5222855", "0.5182751", "0.51150364", "0.50972545", "0.50861746", "0.50426984", "0.5036923", "0.50286186", "0.5006093", "0.49547175", "0.4951981", "0.4947753", "0.49427712", "0.49386472", "0.4918731", "0.4916427", "0.49043453", "0.48744607", "0.48661125", "0.48584002", "0.48426357", "0.48322403", "0.4824707", "0.4812598", "0.4811761", "0.48075193", "0.47969842", "0.47911096", "0.47702253", "0.4747436", "0.47445002", "0.47377953", "0.47307244", "0.4721416", "0.47168848", "0.47129914", "0.47091937", "0.47084588", "0.46822658", "0.46666896", "0.46638334", "0.4656517", "0.4650736", "0.46454483", "0.46454224", "0.46230784", "0.46228227", "0.46188408", "0.46110523", "0.46058455", "0.46031636", "0.4596128", "0.4587674", "0.45872292", "0.45767063", "0.4575884", "0.45684263", "0.4567437", "0.45643172", "0.45630333", "0.45562324", "0.45503926", "0.4547932", "0.45456108", "0.45454037", "0.45389232", "0.45362696", "0.45351368", "0.45263818", "0.45132414", "0.45124212", "0.45124167", "0.4511261", "0.45107862", "0.4510665", "0.45017937", "0.45016", "0.45013314", "0.4499376", "0.4496419", "0.44921625", "0.4491546", "0.4490376", "0.44849294", "0.44842732", "0.4483646", "0.4483482" ]
0.56322354
1
Changes ordering of file to right.
abstract public function moveRight($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveRight()\n {\n $this->position++;\n if ($this->position >= count($this->line)) {\n array_push($this->line, '_');\n }\n }", "function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\n }", "private function rotate() {\n\t\t/* @var $f1 File */\n\t\t/* @var $f2 File */\n\t\t$oldLevel = $this->getLevel();\n\t\t$this->setLevel( Level::$OFF );\n\t\t\n\t\tparent::close();\n\t\tfor($i = $this->count - 2; $i >= 0; $i--) {\n\t\t\t$f1 = $this->files[$i];\n\t\t\t$f2 = $this->files[$i + 1];\n\t\t\tif ($f1->exists()) {\n\t\t\t\tif ($f2->exists()) {\n\t\t\t\t\t$f2->delete();\n\t\t\t\t}\n\t\t\t\t$f1->renameTo( $f2 );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t$this->open( $this->files[0], false );\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// We don't want to throw an exception here, but we report the exception to any\n\t\t\t// registered ErrorManager.\n\t\t\t$this->reportError( null, $e, ErrorManager::OPEN_FAILURE );\n\t\t}\n\t\t$this->setLevel( $oldLevel );\n\t}", "function filesOrder( $uid, $inc, $option, $cat_id ) {\n\tglobal $mainframe;\n $database = &JFactory::getDBO();\n\n\t$row = new jlist_files( $database );\n\t$row->load( $uid );\n $row->move( $inc );\n\n\t$mainframe->redirect( 'index.php?option=com_jdownloads&task=files.list&cat_id='.$cat_id );\n}", "function decrementFile() {\n \treturn $this->adjustPosition(-1);\n }", "function incrementFile() {\n \treturn $this->adjustPosition(1);\n }", "public function rotateRight();", "function orderdown() {\n\t\torder(-1);\n\t}", "function orderup() {\n\t\torder(1);\n\t}", "protected function externalSort() {\n\t\t$this->chunk();\n\n\t\t// To be confirmed/implemented\n\t\t// After file split put them back together in the right order\n\t\techo \"External sort TBC\\n\";\n\t}", "function swapFiles() {\r\n\t\tglobal $file;\r\n\r\n\t\trename($file, $file.\".tmp\");\r\n\t\trename($file.\".bak\", $file);\r\n\t\trename($file.\".tmp\", $file.\".bak\");\r\n\t}", "private function moveParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = 1; $i <= $this->index; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $source = sys_get_temp_dir().'/'.$indexed_filename;\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (!rename($source, $target)) {\n throw FileAccessException::failedOverwrite($source, $target);\n }\n }\n }", "public function sortDirection();", "function sortFilesDescending($thisFiles) {\n \tusort($thisFiles, \"cmpFD\");\n \treturn $thisFiles;\n }", "public function reorder()\n {\n // Ensure the correct sidemenu is active\n BackendMenu::setContext('Uit.Page', 'page', 'reorder');\n\n $this->pageTitle = 'Изменить структуру категории';\n $defaultButtons = null;\n $defaultButtons = '@/plugins/uit/page/controllers/pages/_reorder_toolbar.htm';\n $defaultConfig['buttons'] = $this->getConfig('view[toolbarPartial]', $defaultButtons);\n /*\n * Make config\n */\n $toolbarConfig = $this->makeConfig($this->getConfig('toolbar', $defaultConfig));\n $toolbarConfig->alias = $this->alias . 'Toolbar';\n\n\n $this->vars['toolbar'] = $this->makeWidget('Backend\\Widgets\\Toolbar', $toolbarConfig);\n $this->vars['records'] = \\Uit\\Page\\Models\\Page::make()->getEagerRoot();\n // dump($this->vars['toolbar']);\n }", "function maker_4ym_change_menu_order() {\n return array(\n 'index.php',\n 'edit.php',\n 'edit.php?post_type=story',\n\t'upload.php'\n );\n}", "protected function _moveNext()\n {\n if ($nextRow = $this->_getNextRow()) {\n $this->_currentRow = $this->_formatRow($nextRow);\n } else {\n $this->_currentRow = array();\n }\n \n if (!$this->_currentRow) {\n fclose($this->_handle);\n $this->_valid = false;\n $this->_handle = null;\n }\n }", "function languagelesson_reorder_pages($lessonid) {\n global $DB;\n $startpage = $DB->get_record(\"languagelesson_pages\", array('lessonid'=> $lessonid, 'prevpageid'=>0));\n $order = 0;\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$startpage->id));\n $order++;\n $nextpageid = $DB->get_field(\"languagelesson_pages\", 'id', array('id'=>$startpage->nextpageid));\n\n for (; $nextpageid != 0; $order++) {\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$nextpageid));\n $nextpageid = (int)$DB->get_field(\"languagelesson_pages\", 'nextpageid', array('id'=>$nextpageid));\n }\n}", "function reOrderColumnHeaders() {\n\n }", "function moveLeft()\n {\n $this->position--;\n if ($this->position < 0) {\n $this->position++;\n array_unshift($this->line, '_');\n }\n }", "function cms_reOrder() {\r\n\t\tforeach ($this->data[\"Categoria\"] as $id => $posicion) {\r\n\t\t\t$this -> Categoria -> id = $id;\r\n\t\t\t$this -> Categoria -> saveField(\"posicion\", $posicion);\r\n\t\t}\r\n\r\n\t\techo \"yes\";\r\n\t\tConfigure::write('debug', 0);\r\n\t\t$this -> autoRender = false;\r\n\t\texit();\r\n\t}", "function _reorder_fields(){\n\t\t$f = $this->fields[\"order_status_note\"];\n\t\tunset($this->fields[\"order_status_note\"]);\n\t\t$this->fields[\"order_status_note\"] = $f;\n\t}", "function update_sort_order()\n\t{\n\t\t$page_id = $this->input->post('sort_id');\n\t\t$row_sort_order = $this->input->post('row_sort_order');\n\t\t$this->Text_image_slider_model->update_sort_order($page_id, $row_sort_order);\n\t}", "function albums_reorder_images($album) {\n\t$images = albums_get_images($album);\n\n\t//Only reorder if album contains images.\n\tif ($images != FALSE) {\n\t\t$number = 1;\n\t\tforeach ($images as $image) {\n\t\t\t$parts = explode('.', $image['filename']);\n\t\t\tif (isset($parts[3])) {\n\t\t\t\trename(ALBUMS_DIR.'/'.$album.'/'.$image['filename'], ALBUMS_DIR.'/'.$album.'/'.$number.'.'.$parts[1].'.'.$parts[2].'.'.$parts[3]);\n\t\t\t\t$number++;\n\t\t\t}\n\t\t}\n\t}\n}", "function reorder_pages($arr)\n\t{\n\t\t$db = new db;\n\t\tforeach ($arr as $key=>$value )\n\t\t{\n\t\t\t$order = $key+1;\n\t\t\t$query_str = \"UPDATE pages SET `order` = $order WHERE id=$value\";\n\t\t\t$db->set_query_str($query_str);\n\t\t\t$db->db_query();\n\t\t\t\n\t\t\t$query_str = \"UPDATE pages_published SET `order` = $order WHERE id=$value\";\n\t\t\t$db->set_query_str($query_str);\n\t\t\t$db->db_query();\n\t\t}\n\t}", "public function reverse(): void\n {\n $ranks = $this->ranks;\n\n $this->commit(array_values(collect($ranks)->reverse()->all()));\n }", "function update_text_image_sort_order()\n {\n $vertical_tab_id = $this->input->post('sort_id');\n $row_sort_order = $this->input->post('row_sort_order');\n $this->Vertical_tab->update_text_image_sort_order($vertical_tab_id, $row_sort_order);\n }", "function reorder()\n\t{\n\t\t$ids = $this->params['form']['people'];\n\t\t\n\t\t// Save the new orderings to the database (1st review gets highest number)\n\t\t$i = 0;\n\t\tforeach($ids as $id)\n\t\t{\n\t\t\t$this->Person->id = $id;\n\t\t\t$this->Person->saveField('ordering', $i++);\n\t\t}\n\t\t\n\t\t// Re-render the list of reviews to show that we have succeeded\n\t\t$contact_id = $this->Person->field('contact_id', \"Person.id = '\".$ids[0].\"'\");\n\t\t\n\t\t$this->setAction('listFromContact', $contact_id);\n\t}", "private function moveDepToRight(array & $depsList, $pos, $pivot)\n {\n $extractedModule = array_splice($depsList, $pos, 1);\n array_splice($depsList, $pivot, 0, $extractedModule);\n }", "public function reorder_onMove()\n {\n $sourceNode = Page::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Page::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }", "public function writeRecords_pages_order() {}", "function setReverseMode(){\n\t\t$this->mode = SUSHEE_DEP_REVERSE_MODE;\n\t}", "private function _swapOrdering($tableName, $idA, $idB)\n {\n //get table\n $table = &$this->getTable($tableName, 'VWKTable');\n if ($table != null)\n {\n //load record B\n $table->load($idB);\n $orderingB = $table->ordering;\n //load record A\n $table->load($idA);\n $orderingA = $table->ordering;\n\n //check both \"ordering values\" for being not null\n if (($orderingA != null) && ($orderingB != null))\n {\n //set ordering of record A to value of record B\n $table->ordering = $orderingB;\n //store data\n $table->store();\n\n //load record B (once again)\n $table->load($idB);\n //set ordering of record B to value of record A\n $table->ordering = $orderingA;\n //store data\n $table->store();\n }\n }\n }", "function reverse()\n {\n }", "function _modsort($a,$b){\n if($a['mtime'] < $b['mtime']) return -1;\n if($a['mtime'] > $b['mtime']) return 1;\n return strcmp($a['file'],$b['file']);\n }", "public function turnRight();", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function reversal()\n {\n }", "function _order($inc) {\n\t\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\t\n\t\t// Instanz der Tabelle\n\t\t$row = JTable::getInstance( 'turniere', 'TableCLM' );\n\t\t$row->load( $this->id ); // Daten zu dieser ID laden\n\n\t $clmAccess = clm_core::$access; \n\t\tif (($row->tl != clm_core::$access->getJid() AND $clmAccess->access('BE_tournament_edit_detail') !== true) OR $clmAccess->access('BE_tournament_edit_detail') === false) {\n\t\t\t$this->app->enqueueMessage( JText::_('TOURNAMENT_NO_ACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$cid = clm_core::$load->request_array_int('cid');\n\t\t$rundenid = $cid[0];\n\t\n\t\t$row =JTable::getInstance( 'turnier_runden', 'TableCLM' );\n\t\tif ( !$row->load( $rundenid ) ) {\n\t\t\t$this->app->enqueueMessage( CLMText::errorText('ROUND', 'NOTEXISTING'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\t$row->move( $inc, '' );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->app->enqueueMessage( $row->name.\": \".JText::_('ORDERING_CHANGED') );\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public function Admin_Action_UpdateBlocksOrder() {\n $blockIds = $this->_getPOSTRequest ( 'blockid', array() );\n foreach ($blockIds as $order => $blockid) {\n $query = \"UPDATE\" . \" [|PREFIX|]dynamic_content_block \" . \" SET sortorder = '$order' WHERE blockid = '\" . intval($blockid) . \"'\";\n $this->db->Query ( $query );\n }\n return;\n }", "function saveOrderingAndIndentObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\t$this->object->saveOrderingAndIndentation($_POST[\"ord\"], $_POST[\"indent\"]);\n\t\tilUtil::sendSuccess($lng->txt(\"wiki_ordering_and_indent_saved\"), true);\n\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t}", "function categoriesOrder( $uid, $inc, $option ) {\n\tglobal $mainframe;\n $database = &JFactory::getDBO();\n\t$row = new jlist_cats( $database );\n\t$row->load( $uid );\n $row->move( $inc );\n\t$mainframe->redirect( \"index.php?option=com_jdownloads&task=categories.list\" );\n}", "private function writeMarginRight(): void\n {\n $record = 0x0027; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }", "protected function get_sort_order() {\n return 111;\n }", "function orderup() {\n\t\t\n\t\t$this->_order(-1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function colReorderFixedColumnsRight(int $value = 0)\n {\n $this->attributes['colReorder']['fixedColumnsRight'] = $value;\n\n return $this;\n }", "function sortFilesAscending($thisFiles) {\n \tusort($thisFiles, \"cmpFA\");\n \treturn $thisFiles;\n }", "protected function getSortOrderPhp( $file1, $file2 )\r\n\t{\r\n\t\t$fileSettings = $this->configuration['phpcompiler']['filesettings'];\r\n\t\t$tsOptions1 = $fileSettings[substr( $file1, 0, -37 )];\r\n\t\t$tsOptions2 = $fileSettings[substr( $file2, 0, -37 )];\r\n\t\t$sortOrder1 = isset($tsOptions1['sortOrder']) ? $tsOptions1['sortOrder'] : 0;\r\n\t\t$sortOrder2 = isset($tsOptions2['sortOrder']) ? $tsOptions2['sortOrder'] : 0;\r\n\t\t$forceOnTop1 = isset($tsOptions1['forceOnTop']) ? $tsOptions1['forceOnTop'] : FALSE;\r\n\t\t$forceOnTop2 = isset($tsOptions2['forceOnTop']) ? $tsOptions2['forceOnTop'] : FALSE;\r\n\t\t$sortDirection = 1;\r\n\t\tif( $forceOnTop1 || $forceOnTop2 )\r\n\t\t{\r\n\t\t\t$sortDirection = -1;\r\n\t\t}\r\n\r\n\t\tif( $sortOrder1 == $sortOrder2 )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn $sortDirection * (($sortOrder1 < $sortOrder2) ? -1 : 1);\r\n\t}", "public function orderedMove() {\n\t\t$modelName = $this->Controller->modelClass;\n\t\t$this->Controller->{$modelName}->transaction();\n\n\t\tif (!$this->Controller->{$modelName}->Behaviors->attached('Sequence')) {\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('infinitas', 'A problem occured moving the ordered record.'),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => true\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$fields = array_values($this->Controller->{$modelName}->sequenceGroupFields());\n\t\t$fields[] = $this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey;\n\t\t$data = $this->Controller->{$modelName}->find('first', array(\n\t\t\t'fields' => $fields,\n\t\t\t'conditions' => array(\n\t\t\t\t$this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey => $this->Controller->request->data[$modelName][$this->Controller->{$modelName}->primaryKey]\n\t\t\t),\n\t\t\t'callbacks' => false\n\t\t));\n\t\t$data[$modelName]['ordering'] = $this->Controller->request->params['named']['position'];\n\n\t\ttry {\n\t\t\tif ($this->Controller->{$modelName}->save($data, array('validate' => false))) {\n\t\t\t\t$this->Controller->{$modelName}->transaction(true);\n\t\t\t\t$this->Controller->notice(\n\t\t\t\t\t__d('infinitas', 'The record was moved'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'redirect' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->Controller->{$modelName}->transaction(false);\n\t\t\t$this->Controller->notice(\n\t\t\t\t$e->getMessage(),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => false\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "protected function fixFiles()\n {\n\n \tforeach (glob(base_path($this->passport_path) . '*.php') as $filename)\n \t{\n \t $file = file_get_contents($filename);\n \t file_put_contents($filename, str_replace($this->laravel_model, $this->mongo_model, $file));\n \t //$this->info($filename . \" has been Checked/Modified\");\n \t}\n\n }", "function itemOrderAction(DocumentParser $modx, DatabaseUtils $db)\n{\n $DIR_UP = 1;\n $DIR_DOWN = 2;\n\n $tableName = $db->getTableName('menu_items');\n $itemId = getIntParam('id');\n $parentId = getIntParam('parentId', 0);\n $menuId = getIntParam('menuId');\n $dir = getIntParam('dir');\n\n if (!$itemId) sendError(__FUNCTION__ . ': itemId undefined');\n if (!$menuId) sendError(__FUNCTION__ . ': menuId undefined');\n if (!$dir) sendError(__FUNCTION__ . ': direction order undefined');\n\n $parentIdWhereCondition = is_null($parentId) ? \"`parent_id` IS NULL\" : \"`parent_id`={$parentId}\";\n\n $result = $modx->db->select(\n '*',\n $tableName,\n \"`menu_id`={$menuId} AND {$parentIdWhereCondition}\",\n \"`order_index`, `id` ASC\"\n );\n\n // check indexes\n $items = [];\n $orderCounter = 1;\n $moveItem = null;\n while ($row = $modx->db->getRow($result)) {\n $item = $db->castTypes('menu_items', $row, true);\n $item['orderIndex'] = $orderCounter;\n $items[$orderCounter] = $item;\n if ($item['id'] == $itemId) $moveItem = $orderCounter;\n $orderCounter++;\n }\n\n if ($dir == $DIR_DOWN and $items[$moveItem]['orderIndex'] < count($items)) {\n $items[$moveItem]['orderIndex']++;\n $items[$moveItem + 1]['orderIndex']--;\n }\n\n if ($dir == $DIR_UP and $items[$moveItem]['orderIndex'] > 1) {\n $items[$moveItem]['orderIndex']--;\n $items[$moveItem - 1]['orderIndex']++;\n }\n\n foreach ($items as $_item) {\n $modx->db->update(['order_index' => $_item['orderIndex']], $tableName, \"`id` = {$_item['id']}\");\n }\n// $forUp = array_splice($items, $moveItem['order_index']-1, 1);\n\n// $nextDecrement = false;\n// foreach ($items as &$_item) {\n// if ($_item['id'] == $itemId && $dir==$DIR_DOWN) {\n// $_item['orderIndex']++;\n// $nextDecrement = true;\n// continue;\n// }\n// if ($nextDecrement && $dir==$DIR_DOWN) {\n// $_item['orderIndex']--;\n// break;\n// }\n// }\n\n// if (!$itemData['id']) {\n//\n// $itemData['id'] = $modx->db->insert($itemData, $tableName);\n// if (!$itemData['id']) sendError(__FUNCTION__ . ': пункт меню не создан');\n//\n// } else {\n//\n// if (!$modx->db->update($itemData, $tableName, \"id = {$itemData['id']}\")) {\n// sendError(__FUNCTION__ . ': menu item is not saved');\n// }\n//\n// }\n\n sendResponse([\n 'itemId' => $itemId,\n // 'forUp' => $forUp,\n 'items' => $items,\n // 'item' => $db->keysConvertToCamelCase($itemData),\n ], 'Пункт меню создан/обновлен');\n}", "function sync_file_move($old, $new)\n{\n require_code('files2');\n _sync_file_move($old, $new);\n}", "public function action_reorder(){\n\t\t$this->auto_render = false;\n\t\tif (HTTP_Request::POST == $this->request->method()) \n\t\t{\n\t\t\t$i = '0';\n\t\t\tforeach($this->request->post('item') as $tag_id){\n\t\t\t\t$task = ORM::factory('tag', $tag_id);\n\t\t\t\t$task->order = $i;\n\t\t\t\t$task->save();\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "public function toRight($left);", "public function changeOrder (array $order)\n {\n /*\n * exemple de tableau order (retourné par jquery nestedSortable)\n * 0\t=>\troot\n * 1\t=>\troot\n * 2\t=>\t1\n * 3\t=> \t1\n * 4\t=>\troot\n * \n * */\n\n \t$this->_order = array();\n \tforeach ($order as $pageid => $value) {\n \t\tif ($value == 'root') {\n $this->_order[$pageid] = array();\n \t\t} else {\n if (isset($this->_order[$value])) {\n $this->_order[$value][$pageid] = array();\n } else {\n foreach($this->_order as $i => $elem) {\n if (is_array($elem) && isset($this->_order[$i][$value])) {\n $this->_order[$i][$value][$pageid] = array();\n }\n }\n }\n \t\t}\n \t}\n }", "function setRightToLeft($right_to_left) {\n $this->fields['right_to_left'] = $right_to_left;\n return $this;\n }", "function orderdown() {\n\t\t\n\t\t$this->_order(1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "public function setElementSortOrder($attribte, $direction);", "function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function reorder()\n {\n $this->Lesson_Model->reorder($this->input->post(\"lesson\"));\n }", "public function reorder($ids)\n {\n foreach ($ids as $position => $id) {\n DB::table('menu_page')\n ->where('menu_id', '=', $this->id)\n ->where('page_id', '=', $id)\n ->update(['position' => $position]);\n }\n }", "public function rotateLogs()\n\t{\n\t\t$arrFiles = preg_grep('/\\.log$/', scan(TL_ROOT . '/system/logs'));\n\n\t\tforeach ($arrFiles as $strFile)\n\t\t{\n\t\t\t$objFile = new \\File('system/logs/' . $strFile . '.9', true);\n\n\t\t\t// Delete the oldest file\n\t\t\tif ($objFile->exists())\n\t\t\t{\n\t\t\t\t$objFile->delete();\n\t\t\t}\n\n\t\t\t// Rotate the files (e.g. error.log.4 becomes error.log.5)\n\t\t\tfor ($i=8; $i>0; $i--)\n\t\t\t{\n\t\t\t\t$strGzName = 'system/logs/' . $strFile . '.' . $i;\n\n\t\t\t\tif (file_exists(TL_ROOT . '/' . $strGzName))\n\t\t\t\t{\n\t\t\t\t\t$objFile = new \\File($strGzName, true);\n\t\t\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.' . ($i+1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add .1 to the latest file\n\t\t\t$objFile = new \\File('system/logs/' . $strFile, true);\n\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.1');\n\t\t}\n\t}", "function rovoko_archive_sidebar_position(){\n return apply_filters('rovoko_archive_sidebar_position','right');\n}", "public function updateReorderFeaturedContent()\n\t\t{\n\t\t\tforeach($_POST as $post=>$value)\n\t\t\t\t{\n\t\t\t\t\tif($post=='left')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$inc=1;\n\t\t\t\t\t\t\t$glider_arr = explode(',',$value);\n\t\t\t\t\t\t\tforeach($glider_arr as $glider_id)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sql ='UPDATE '.$this->CFG['db']['tbl']['index_root_featured_glider_details'].\n\t\t\t\t\t\t\t\t\t\t\t' SET featured_order='.$this->dbObj->Param('featured_order').\n\t\t\t\t\t\t\t\t\t\t\t' WHERE index_glider_id='.$this->dbObj->Param('glider_id');\n\t\t\t\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt, array($inc,$glider_id));\n\t\t\t\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t\t\t\t\t$inc++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}", "function fm_reorder_folders_list($obj1, $obj2) {\r\n\t$size1 = explode(\"/\",$obj1['stored_filename']);\r\n\t$size2 = explode(\"/\",$obj2['stored_filename']);\r\n\r\n\tif (count($size1) == count($size2)) {\r\n\t\treturn 0;\r\n\t}\r\n\tif (count($size1) > count($size2)) {\r\n\t\treturn 1;\r\n\t}\r\n\tif (count($size1) < count($size2)) {\r\n\t\treturn -1;\r\n\t}\r\n}", "public function next()\n \t{\n \t\t$handle = $this->getHandle();\n \t\t$handle->current = readdir($handle->resource);\n \t}", "public function updateMenuOrder() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\n\t\t\t$errors = FALSE;\n\t\t\t$subjects_abc = array();\n\t\t\t// Get current order (structure_id)\n\t\t\t$query = \"SELECT structure_id FROM webmatrix_structure WHERE structure_parent = \".$this->subjects_structure_id.\" ORDER BY structure_text ASC\";\n\t\t\t$sql->query($query, $this->debug);\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$subjects_abc[] = $sql->Record['structure_id'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update menu to be ordered alphabetical\n\t\t\t$no_subjects = (count($subjects_abc) - 1);\n\t\t\tfor ($i=0; $i<=$no_subjects; $i++) {\n\t\t\t\t$structure_id = $subjects_abc[$i];\n\t\t\t\t$query = \"UPDATE webmatrix_structure SET structure_order = $i, structure_flag = 2 WHERE structure_id = $structure_id\";\n\t\t\t\t$sql->query($query, $this->debug);\n\t\t\t\tif ($sql->num_rows_affected() == 0) {\n\t\t\t\t\t$errors = TRUE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $errors;\n\n\t\t}", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id, $bCtrl); // id\n\t\t\t$this->UpdateSort($this->detail_jenis_spp, $bCtrl); // detail_jenis_spp\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->tgl_spp, $bCtrl); // tgl_spp\n\t\t\t$this->UpdateSort($this->keterangan, $bCtrl); // keterangan\n\t\t\t$this->UpdateSort($this->no_spm, $bCtrl); // no_spm\n\t\t\t$this->UpdateSort($this->tgl_spm, $bCtrl); // tgl_spm\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetUpSortOrder() {\n\t\tglobal $t_tinbai_mainsite;\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$t_tinbai_mainsite->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$t_tinbai_mainsite->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_CONGTY_ID, $bCtrl); // FK_CONGTY_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMGIOITHIEU_ID, $bCtrl); // FK_DMGIOITHIEU_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMTUYENSINH_ID, $bCtrl); // FK_DMTUYENSINH_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, $bCtrl); // FK_DTSVTUONGLAI_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVDANGHOC_ID, $bCtrl); // FK_DTSVDANGHOC_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTCUUSV_ID, $bCtrl); // FK_DTCUUSV_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, $bCtrl); // FK_DTDOANHNGHIEP_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TITLE, $bCtrl); // C_TITLE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_HIT_MAINSITE, $bCtrl); // C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NEW_MYSEFLT, $bCtrl); // C_NEW_MYSEFLT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_COMMENT_MAINSITE, $bCtrl); // C_COMMENT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ORDER_MAINSITE, $bCtrl); // C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_STATUS_MAINSITE, $bCtrl); // C_STATUS_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_VISITOR_MAINSITE, $bCtrl); // C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ACTIVE_MAINSITE, $bCtrl); // C_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, $bCtrl); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, $bCtrl); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NOTE, $bCtrl); // C_NOTE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_ADD, $bCtrl); // C_USER_ADD\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ADD_TIME, $bCtrl); // C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_EDIT, $bCtrl); // C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_EDIT_TIME, $bCtrl); // C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_EDITOR_ID, $bCtrl); // FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function moving_file_to_back_up_place()\r\n\t{\r\n\t\t$moved_file = array();\r\n\t\t$original_place = $this->get_original_upload_path();\r\n\t\t$back_up_place = $this->get_back_up_path();\r\n\t\t\r\n\t\tif($files = $this->get_folder_file_list($original_place))\r\n\t\t{\r\n\t\t\tforeach($files as $file)\r\n\t\t\t{\r\n\t\t\t\t$new_name = pathinfo($file, PATHINFO_FILENAME) . '_' . date(\"YmdHis\"). '.' . pathinfo($file, PATHINFO_EXTENSION);\r\n\t\t\t\tif(copy($original_place.$file, $back_up_place.$new_name))\r\n\t\t\t\t{\r\n\t\t\t\t\tunlink($original_place.$file);\r\n\t\t\t\t\t$moved_file[] = $back_up_place.$new_name;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $moved_file;\r\n\t}", "function orderRecord()\t{\n\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to reorder\n\t\t\t//on instancie la tce_main\n\t\t\t$tce_main=t3lib_div::makeInstance('t3lib_TCEmain');\n\t\t\t//recup de l'ordre dans lequel on trie\n\t\t\tif ($this->conf['inputvar.']['orderDir.']['dir']=='up') {\n\t\t\t\t$toUp = true;\n\t\t\t}\n\t\t\telse $toUp = false;\n\n\t\t\t//recup de l'uid a modifier\n\t\t\t$rU = $this->conf['inputvar.']['orderDir.']['rU'];\n\n\t\t\t//recup de la colonne de delete si existe et de la colonne de hidden si existe.\n\t\t\t$deletedField = isset($this->conf['TCAN'][$this->theTable]['ctrl']['delete'])?$this->conf['TCAN'][$this->theTable]['ctrl']['delete']:'';\n\t\t\t$hiddenField = isset($this->conf['TCAN'][$this->theTable]['ctrl']['enablecolumns']['disabled'])?$this->conf['TCAN'][$this->theTable]['ctrl']['enablecolumns']['disabled']:'';\n\n\t\t\t// on recupere l'enregistrement suivant dans l'ordre du sorting\n\t\t\t$fields = $this->theTable.'1.'.$this->conf['uidField'].\" as `nextUid`\";\n\t\t\t$tables = $this->theTable.' as '.$this->theTable.'1, '.$this->theTable.' as '.$this->theTable.'2';\n\t\t\t$where = '1';\n\t\t\t$where.= ($deletedField!=''?' and '.$this->theTable.'1.deleted=0 and '.$this->theTable.'2.deleted=0':''); //deleted clause\n\t\t\t$where.= ($hiddenField!=''?' and '.$this->theTable.'1.hidden=0 and '.$this->theTable.'2.hidden=0':''); //hidden clause\n\t\t\t$where.= ' and '.$this->theTable.'1.sorting '.($toUp?'<':'>').' '.$this->theTable.'2.sorting';\n\t\t\t$where.= ' and '.$this->theTable.'2.'.$this->conf['uidField'].'='.$rU;\n\t\t\t$where.= ($this->conf['edit.']['menuLockPid'] && $this->conf['pid'])?' and '.$this->theTable.'1.pid='.$this->conf['pid'].' and '.$this->theTable.'2.pid='.$this->conf['pid']:'';\n\t\t\t$order = $this->theTable.'1.sorting '.($toUp?'DESC':'ASC');\n\t\t\t$limit = ($toUp?'1':'0').',1';\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $where, '', $order, $limit);\n\t\t\t//si on trouve un resultat (on est donc pas sur le premier second enregistrement ni sur le dernier)\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {\n\t\t\t\t$occ = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t\t//recherche du nouveau sorting\n\t\t\t\t$arrSort = $tce_main->getSortNumber($this->theTable, $rU, '-'.$occ['nextUid']);\n\t\t\t\t//on met a jour\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->theTable, $this->conf['uidField'].'='.$rU, array('sorting' => $arrSort['sortNumber']));\n\t\t\t} elseif ($toUp) {\n\t\t\t\t//si on cherche a faire monter l'enregistrement et qu'on est pas au milieu de la liste\n\t\t\t\t//on change les limites\n\t\t\t\t$limit = '0,1';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $where, '', $order, $limit);\n\t\t\t\t//si on a une line on est sur le second enregistrement\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {\n\t\t\t\t\t//recherche du nouveau sorting\n\t\t\t\t\t$arrSort = $tce_main->getSortNumber($this->theTable, $rU, $this->conf['pid']);\n\t\t\t\t\t//on met a jour\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->theTable, $this->conf['uidField'].'='.$rU, array('sorting' => $arrSort['sortNumber']));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t}\n\t}", "public function rsort()\n {\n $a = $this->toArray();\n $success = rsort($a);\n if ($success) {\n $this->clear();\n $this->putAll($a);\n return true;\n }\n return false;\n }", "public function forceSortAndSavePackageStates() {}", "function usort_reorder($a,$b){\r\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'chat_date'; //If no sort, default to title\r\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\r\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\r\r\n }", "function ccategories_order()\n\t{\n\t\tlusers_require(\"categories/order\");\n\n\t\t$post_data = linput_post();\n\t\t$order = $post_data[\"order\"];\n\n\t\t$order = split(\"\\|\", $order);\n\n\t\tfor ($i = 0; $i < count($order); $i++)\n\t\t{\n\t\t\tlcrud_update(lconf_get(\"lang\") . \"_categories\", array(\"id\" => $order[$i]), array(\"orderid\" => $i));\n\t\t}\n\n\t\tlcache_delete_all();\n\t}", "function narrative_move_xml($id, $new_narrative_dir)\n{\n $CI =& get_instance();\n $base_dir = $CI->config->item('site_data_dir') . '/' . $id . '/';\n $file_scan = scandir($base_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n // Finding the XML file to be moved\n if ($file_extension == \"xml\" && $filecheck != 'AudioTimes.xml')\n {\n rename($base_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function reoderPages($order) {\r\n\t$newOrder = array();\r\n\tforeach ($order as $value) {\r\n\t $newOrder[$value] = $this->pages[$value];\r\n\t}\r\n\t$this->pages = $newOrder;\r\n\treturn $this->save();\r\n }", "function cognitivefactory_tree_updateordering($cognitivefactoryid, $groupid, $userid, $id, $istree) {\n\n // getting ordering value of the current node\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n // getting subsequent nodes that have same father\n $sql = \"\n SELECT \n id \n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > {$res->intvalue}\n {$treeClause}\n {$accessClause}\n ORDER BY \n intvalue\n \";\n\n // reordering subsequent nodes using an object\n if ( $nextsubs = $DB->get_record_sql($sql)) {\n $ordering = $res->intvalue + 1;\n foreach ($nextsubs as $asub) {\n $opdata = new StdClass();\n $opdata->id = $asub->id;\n $opdata->intvalue = $ordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $ordering++;\n }\n }\n}", "public function reorder()\n {\n $node = $this->page->find($this->request->get('nodeToChangeParent'));\n\n if ($this->request->get('parent') === '#') {\n $node->makeRoot();\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n } else {\n $parent = $this->page->find($this->request->get('parent'));\n $node->makeChildOf($parent);\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n }\n\n return [\n 'Position changed' => true,\n ];\n }", "protected function fix_image_orientation( $filename, $filecontent ) {\r\n\t\t\t$data = exif_read_data( $filename );\r\n\t\t\tif ( !empty( $data['Orientation'] ) ) {\r\n\t\t\t\tswitch( $data['Orientation'] ) {\r\n\t\t\t\t\tcase 3: { $newAngle = 180; } break;\r\n\t\t\t\t\tcase 6: { $newAngle = -90; } break;\r\n\t\t\t\t\tcase 8: { $newAngle = 90; } break;\r\n\t\t\t\t\tdefault: $newAngle = false;\r\n\t\t\t\t}\r\n\t\t\t\tif ( $newAngle ) {\r\n\t\t\t\t\t$image = imagecreatefromstring( $filecontent );\r\n\t\t\t\t\t$image = imagerotate( $image, $newAngle, 0 );\r\n\t\t\t\t\t$this->save_image( $image, $filename );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function reorder_admin_bar() {\n\t\t\tglobal $wp_admin_bar;\n\n\t\t\t// The desired order of identifiers (items).\n\t\t\t$ids = array(\n\t\t\t\t'woocart-dashboard',\n\t\t\t\t'themes',\n\t\t\t\t'widgets',\n\t\t\t\t'menus',\n\t\t\t);\n\n\t\t\t// Get an array of all the toolbar items on the current page.\n\t\t\t$nodes = $wp_admin_bar->get_nodes();\n\n\t\t\t// Perform recognized identifiers.\n\t\t\tforeach ( $ids as $id ) {\n\t\t\t\tif ( ! isset( $nodes[ $id ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// This will cause the identifier to act as the last menu item.\n\t\t\t\t$wp_admin_bar->remove_menu( $id );\n\t\t\t\t$wp_admin_bar->add_node( $nodes[ $id ] );\n\n\t\t\t\t// Remove the identifier from the list of nodes.\n\t\t\t\tunset( $nodes[ $id ] );\n\t\t\t}\n\n\t\t\t// Unknown identifiers will be moved to appear after known identifiers.\n\t\t\tforeach ( $nodes as $id => &$obj ) {\n\t\t\t\t// There is no need to organize unknown children identifiers (sub items).\n\t\t\t\tif ( ! empty( $obj->parent ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// This will cause the identifier to act as the last menu item.\n\t\t\t\t$wp_admin_bar->remove_menu( $id );\n\t\t\t\t$wp_admin_bar->add_node( $obj );\n\t\t\t}\n\n\t\t}", "function inline_archive_right_column_start() {\n\n\techo '<div class=\"right\">';\n\t\n}", "public function order();", "public function save_items_order() {\n\t\n\t\t\tparse_str( $_REQUEST[ 'order' ], $order );\n\t\n\t\t\techo update_post_meta( intval( $_REQUEST[ 'gallery_id' ] ), 'items_order', $order );\n\t\n\t\t\texit;\n\t\t}", "private function updateNamespace(): void\n {\n //now path is totally sorted, update namespace based on path\n foreach ($this->filesCreated as $filePath) {\n $this->findAndReplaceHelper->setNamespaceFromPath(\n $filePath,\n $this->srcSubFolderName,\n $this->projectRootNamespace\n );\n }\n }", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function inline_archive_right_column_end() {\n\n\techo '</div><!--end .right-->';\n\t\n}", "public function onAfterSkippedWrite()\n {\n $this->updateChildFilesystem();\n }", "public function sort() {\n\t\tif ($this->request->is('post')) {\n\t\t\t$order = explode(\",\", $_POST['order']);\n\t\t\t$i = 1;\n\t\t\tforeach ($order as $photo) {\n\t\t\t\t$this->Picture->read(null, $photo);\n\t\t\t\t$this->Picture->set('order', $i);\n\t\t\t\t$this->Picture->save();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t$this->render(false, false);\n\t}", "public function saveReorder($data, $parentId=0)\n\t{\n\t\t$menuOrder = 0;\n\n\t\tforeach($data as $post) {\n\t\t\t$id = (int) str_replace('listItem_', '', $post['id']);\n\n\t\t\tif(is_numeric($id)) {\n\t\t\t\t$args = [\n\t\t\t\t\t'ID' => $id,\n\t\t\t\t\t'menu_order' => $menuOrder,\n\t\t\t\t\t'post_parent' => $parentId\n\t\t\t\t];\n\t\t\t\twp_update_post($args);\n\n\t\t\t\tif(!empty($post['children'])) {\n\t\t\t\t\t$this->saveReorder($post['children'], $id);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo $id . ',';\n\t\t\t}\n\n\t\t\t$menuOrder++;\n\t\t}\n\t}", "function cognitivefactory_tree_right($cognitivefactoryid, $userid, $groupid, $id) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n /// get ordering and parent for the moving node\n $sql = \"\n SELECT \n itemdest, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n id = $id\n \";\n $res = $DB->get_record_sql($sql);\n $ordering = $res->intvalue;\n $fatherid = $res->itemdest;\n\n /// get previous record if not first. It will become our parent.\n if ($ordering > 1) {\n $orderingbis = $ordering - 1;\n\n $sql = \"\n SELECT \n id,\n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue = $orderingbis AND \n itemdest = $fatherid\n {$accessClause}\n \";\n $resid = $DB->get_record_sql($sql);\n $newfatherid = $resid->id;\n\n /// get our upward brothers. They should be ordered back from ordering\n $sql = \"\n SELECT \n id, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > $ordering AND \n itemdest = $fatherid \n {$accessClause}\n ORDER BY \n intvalue\n \";\n $newbrotherordering = $ordering;\n\n /// order back all upward brothers\n if ($resbrothers = $DB->get_records_sql($sql)) {\n foreach ($resbrothers as $resbrother) {\n $opdata = new StdClass();\n $opdata->id = $resbrother->id;\n $opdata->intvalue = $newbrotherordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $newbrotherordering = $newbrotherordering + 1;\n }\n }\n\n $maxordering = cognitivefactory_tree_get_max_ordering($cognitivefactoryid, null, $groupid, true, $newfatherid);\n $newordering = $maxordering + 1;\n\n // assigning father's id\n $object = new StdClass();\n $opdata->id = $id;\n $opdata->itemdest = $newfatherid;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "function saveValuesOrder() {\r\n $cid = JRequest::getVar('cid', '', '', 'array');\r\n $total = count($cid);\r\n $order = JRequest::getVar('order', '', '', 'array');\r\n $value = & JTable::getInstance('cpvalue', 'Table');\r\n\r\n // update ordering values\r\n for ($i = 0; $i < $total; $i++) {\r\n $value->load((int) $cid[$i]);\r\n if ($value->ordering != $order[$i]) {\r\n $value->ordering = $order[$i];\r\n if (!$value->store()) {\r\n JError::raiseError(500, JText::_('Error saving values order.'));\r\n }\r\n }\r\n }\r\n $value->reorder();\r\n }", "function medialab_custom_menu_order() {\n\t\treturn array( 'index.php', 'separator1', 'edit.php?post_type=page' );\n}", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "function usort_reorder($a, $b) {\n\t$orderby = (!empty($_GET['orderby']) ) ? $_GET['orderby'] : 'booktitle';\n\t// If no order, default to asc\n\t$order = (!empty($_GET['order']) ) ? $_GET['order'] : 'asc';\n\t// Determine sort order\n\t$result = strcmp($a[$orderby], $b[$orderby]);\n\t// Send final sort direction to usort\n\treturn ( $order === 'asc' ) ? $result : -$result;\n }", "final public function rewind(): void\n {\n $this->sort();\n\n reset($this->index);\n }", "abstract protected function encodingTablesOrder();", "function orderChildValue($direction) {\r\n $cid = JRequest::getVar('cid', '', '', 'array');\r\n $val_id = JRequest::getVar('val_id', '', '', 'array');\r\n $field_id = $cid[0];\r\n $value_id = $val_id[0];\r\n\r\n if (!empty ($field_id) && !empty ($value_id)) {\r\n $value = & JTable::getInstance('cpvalue', 'Table');\r\n $value->load($value_id);\r\n $value->move($direction, \" field_id = '$field_id' \");\r\n $value->reorder(\" field_id = '$field_id' \");\r\n }\r\n }", "public function panRightCamaraAlumnos2() {\n\n self::$alumnos2->moverALaDerecha();\n\n }" ]
[ "0.63709867", "0.601009", "0.56289303", "0.5619757", "0.54461527", "0.52787673", "0.52694744", "0.5219468", "0.51456875", "0.51101816", "0.5086046", "0.5073166", "0.5055275", "0.5033563", "0.5004794", "0.49952954", "0.49535945", "0.4952535", "0.49372664", "0.4907106", "0.490275", "0.49018732", "0.48951873", "0.48694086", "0.4842101", "0.4817349", "0.481212", "0.4810792", "0.47965062", "0.47931358", "0.47896904", "0.47883987", "0.47861004", "0.47730353", "0.4762945", "0.47596085", "0.47416872", "0.46854675", "0.46851808", "0.468491", "0.46845704", "0.46740475", "0.4670019", "0.4666788", "0.46582493", "0.46553755", "0.46477464", "0.46473372", "0.46471658", "0.46440595", "0.46359134", "0.4623645", "0.46233815", "0.46218982", "0.46187884", "0.4615622", "0.4607914", "0.4602237", "0.45992273", "0.45858452", "0.45809463", "0.45674068", "0.4567286", "0.45632508", "0.4557234", "0.4550597", "0.45422286", "0.45416588", "0.45396993", "0.4537931", "0.45370513", "0.45299414", "0.45284152", "0.45274988", "0.45243576", "0.45195028", "0.45121768", "0.45118734", "0.45023847", "0.45007423", "0.4500292", "0.4486074", "0.4484247", "0.44802067", "0.44783068", "0.44655785", "0.44642878", "0.44589818", "0.44558194", "0.44552258", "0.44537836", "0.4446643", "0.4441231", "0.44373867", "0.4437302", "0.44304594", "0.44280392", "0.4427675", "0.44272014", "0.44261146" ]
0.5144927
9
Returns all photos in gallery. If admin is true returns invisible photos too.
abstract public function getByGallery($id, $admin = false);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGallery()\n {\n return $this->getItems()->getItems()->andWhere(['type' => 'gallery']);\n\n }", "public function get_all_gallery_images() {\n\n\t\tcheck_ajax_referer( 'daylife-gallery-add-nonce', 'nonce' );\n\t\trequire_once( dirname( __FILE__ ) . '/class-wp-daylife-api.php' );\n\t\t$daylife = new WP_Daylife_API( get_option( 'daylife' ) );\n\n\t\t// Should be int but santize value as id can be bigger than maximum int value\n\t\t$gallery_id = sanitize_text_field( $_POST['gallery_id'] );\n\t\tif ( $gallery_id > 0 ) {\n\t\t\t$args['gallery_id'] = $gallery_id;\n\n\t\t\t$images = $daylife->get_gallery_by_id( $args );\n\n\t\t\tforeach ( $images as $image ) {\n\t\t\t\t$image_data[] = $image->url . '|' . $image->caption;\n\t\t\t}\n\t\t\techo json_encode( $image_data );\n\t\t}\n\t\tdie;\n\n\t}", "public function getMediaGalleryImages()\n {\n if(!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {\n $images = new Varien_Data_Collection();\n foreach ($this->getMediaGallery('images') as $image) {\n if ($image['disabled']) {\n continue;\n }\n $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);\n $image['id'] = isset($image['value_id']) ? $image['value_id'] : null;\n $image['path'] = $this->getMediaConfig()->getMediaPath($image['file']);\n $images->addItem(new Varien_Object($image));\n }\n $this->setData('media_gallery_images', $images);\n }\n\n return $this->getData('media_gallery_images');\n }", "public function galleries(){\n\n $parameters = [\n 'sort' => 'position',\n 'sort_direction' => 'asc',\n 'page' => 1,\n 'cover_size' => 4,\n 'rpp' => 40\n ];\n\n $data = $this->api->get_galleries($parameters);\n\n return $data['galleries'];\n }", "public function getAllPhotos();", "public function getPhotos();", "private function images()\n {\n return File::allFiles(public_path('img/gallery'));\n }", "public function getGallery()\n {\n return $this->gallery;\n }", "public function getGallery()\n {\n return $this->morphMany(Media::class, 'mediable', ['type' => Media::TYPE_GALLERY], 'mediable', 'media_id');\n }", "private function getImagesForAdmin() {\n global $wpdb;\n $query = \"select * from `\" . $wpdb->prefix . \"roni_images`;\";\n $results = $wpdb->get_results( $query );\n if( !empty( $results ) ) {\n return $results;\n }\n\n return false;\n }", "public function getGalleryImages()\n {\n $user_id = Auth::user()->user_id;\n\n $images = Azure::getImageThumbnailFiles($user_id);\n $imageOrder = DB::table(\"users\")\n ->select(\"gallery_order\")\n ->where(\"user_id\", $user_id)\n ->first();\n\n return array(\"success\" => true, \"data\" => array(\n \"images\" => $images,\n \"order\" => $imageOrder->gallery_order\n ));\n }", "public function getImages()\n {\n return GalleryImage::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function all_gallery_images($id)\n\t{\n\t\t$gal=$this->db->query(\"SELECT *FROM `product_gallery` where `product_id`='\".$id.\"'\");\n\t\tif($gal->num_rows()>0)\n\t\t{\n\t\t\treturn $gal;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "public function actionGalleryImages() {\n\n // # Cache result forever\n $cached = Cache::rememberForever( 'actionGalleryImages', function () {\n\n // # Conatiner init\n $container = [];\n\n // # Directory iterator\n $iterator = new \\DirectoryIterator( \"./images/gallery/images\" );\n\n // # Loop through files and dir\n foreach( $iterator as $item ) {\n\n // # Avoid dirs\n if( is_dir( $item ) ) {\n continue;\n }\n\n // # Get pathname\n $path = ltrim( $item->getPathname(), \".\" );\n $tmp[ 'src' ] = $path;\n $tmp[ 'thumb' ] = $path;\n $container[] = $tmp;\n }\n\n // # toJson\n return json_encode($container);\n });\n\n return response()->make( $cached );\n\n }", "public function gallery()\n {\n $photos = User::find(Auth::id())->photos()->latest()->paginate(10);\n// dd($photos);\n return view('user.gallery', compact('photos'));\n }", "public function findAllPhoto(){\n $query= $this->getEntityManager()\n ->createQuery(\"Select p FROM PidevFrontOfficeBundle:Galerie p ORDER BY p.idEvennement ASC\");\n return $query->getResult();\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public static function all()\n {\n $query = new Query([\n 'post_type' => 'galleries',\n 'posts_per_page' => -1,\n 'post_status' => 'publish'\n ]);\n\n return $query->get();\n }", "public function getAll(){\n\t\t$respond = array();\n\t\t$gallery = Gallery::all();\n\t\tif (count($gallery) == 0)\n\t\t{\n\t\t\t$respond = array('code'=>'404','status' => 'Not Found');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$respond = array('code'=>'200','status' => 'OK','messages'=>$gallery);\n\t\t}\n\t\treturn Response::json($respond);\n\t}", "function hw_gallery_get_galleries() {\r\n // Load the metabox class.\r\n if(class_exists('HW_Gallery')) {\r\n $gallery = HW_Gallery::get_instance();\r\n\r\n }\r\n elseif(class_exists('HW__Gallery_Lite')) {\r\n $gallery = HW__Gallery_Lite::get_instance();\r\n }\r\n\r\n return !empty($gallery)? $gallery->gallery->get_galleries() : null;\r\n}", "function rusticmodern_get_gallery_images() {\n\t$images = array();\n\n\tif ( function_exists( 'get_post_galleries' ) ) {\n\t\t$galleries = get_post_galleries( get_the_ID(), false );\n\t\tif ( isset( $galleries[0]['ids'] ) )\n\t\t \t$images = explode( ',', $galleries[0]['ids'] );\n\t} else {\n\t\t$pattern = get_shortcode_regex();\n\t\tpreg_match( \"/$pattern/s\", get_the_content(), $match );\n\t\t$atts = shortcode_parse_atts( $match[3] );\n\t\tif ( isset( $atts['ids'] ) )\n\t\t\t$images = explode( ',', $atts['ids'] );\n\t}\n\n\tif ( ! $images ) {\n\t\t$images = get_posts( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => 999,\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'menu_order',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'post_parent' => get_the_ID(),\n\t\t\t'post_type' => 'attachment',\n\t\t) );\n\t}\n\n\treturn $images;\n}", "function twentyten_get_gallery_images() {\n\t$images = array();\n\n\tif ( function_exists( 'get_post_galleries' ) ) {\n\t\t$galleries = get_post_galleries( get_the_ID(), false );\n\t\tif ( isset( $galleries[0]['ids'] ) ) {\n\t\t\t$images = explode( ',', $galleries[0]['ids'] );\n\t\t}\n\t} else {\n\t\t$pattern = get_shortcode_regex();\n\t\tpreg_match( \"/$pattern/s\", get_the_content(), $match );\n\t\t$atts = shortcode_parse_atts( $match[3] );\n\t\tif ( isset( $atts['ids'] ) ) {\n\t\t\t$images = explode( ',', $atts['ids'] );\n\t\t}\n\t}\n\n\tif ( ! $images ) {\n\t\t$images = get_posts(\n\t\t\tarray(\n\t\t\t\t'fields' => 'ids',\n\t\t\t\t'numberposts' => 999,\n\t\t\t\t'order' => 'ASC',\n\t\t\t\t'orderby' => 'menu_order',\n\t\t\t\t'post_mime_type' => 'image',\n\t\t\t\t'post_parent' => get_the_ID(),\n\t\t\t\t'post_type' => 'attachment',\n\t\t\t)\n\t\t);\n\t}\n\n\treturn $images;\n}", "public function listGall()\n {\n $gall = Gallery::latest()->get();\n return view('gallery.list', compact('gall'));\n }", "public function galleries()\n {\n return $this->morphToMany('TypiCMS\\Modules\\Galleries\\Models\\Gallery', 'galleryable')\n ->withPivot('position')\n ->orderBy('position')\n ->withTimestamps();\n }", "public function lists()\n {\n $data['id'] = Input::get('gallery_id');\n $data['gallery'] = PhotoGallery::where('id', '=', $data['id'])->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $data['photos'] = $this->photo->listByGallery($data['id']);\n\n return view('cms.modules.multicms.photos_listall', $data);\n }", "public function galleries()\n {\n return $this->hasMany(Gallery::class);\n }", "public function index()\n {\n $gallery = gallery::get();\n \n return view('back-office.gallery')->with('gallery',$gallery);\n }", "public function getPhotos()\n {\n return $this->hasMany(Photo::className(), ['owner_id' => 'id']);\n }", "public function index()\n {\n \t$galleries = $this->userRepository->getData(['role'=>'gallery'],'get',[],0);\n return view('backend/galleries', compact('galleries'));\n }", "public function index()\n {\n $images = Gallery::orderBy('created_at', 'desc')->paginate(12);\n\n return view('gallery', compact('images'));\n }", "public function photos()\n {\n return $this->morphMany(Photo::class, \"viewable\");\n }", "public function index()\n {\n $galleries = Gallery::orderByDesc('created_at')->paginate(20);\n return view('admin_area.gallery.index', compact('galleries'));\n }", "function album_gallery_get_page_content_all($GUID_USER)\n{\n //Take entities from user\n $entita = elgg_get_entities(array(\n 'types' => 'object',\n 'subtypes' => 'album-gallery',\n 'owner_guid' => $GUID_USER,\n 'limit' => 0,\n 'order_by' => 'e.time_created asc'\n ));\n\n if(count($entita) > 0)\n foreach ($entita as $key)\n $immagine .= elgg_view('elgg-album-gallery/all',array(\n 'title' => $key->title,\n 'descr' => $key->description,\n 'album_guid' => $key->guid,\n 'guid_user' => $GUID_USER\n ));\n else\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imagegallery')));\n\n $return = array(\n 'title' => elgg_echo('gallery:title:showall'),\n 'content' => $immagine);\n\n return $return;\n}", "public function index()\n {\n $galleries = Gallery::with('images','user','comments')->paginate(10);\n\n return response()->json($galleries);\n }", "public function galleries(): MorphMany\n {\n return $this->morphMany(Gallery::class, 'gallery');\n }", "public function getUserGalleries() {\n\t\tif (!self::COOKIES_ENABLED) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t/* load form database */\n\t\t$galleries = array();\n\t\t$delete_code = $this->getDeleteCode();\n\t\t$result = $this->db->query('\n\t\t\tSELECT gallery_id, delete_time, delete_code, COUNT(*) as num_images\n\t\t\tFROM image\n\t\t\tWHERE delete_code = \"'.SQLite3::escapeString($delete_code).'\"\n\t\t\t\tAND gallery_id != \"\"\n\t\t\tGROUP BY gallery_id\n\t\t\tORDER BY ROWID DESC');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t\t$galleries[$entry['gallery_id']] = $entry;\n\t\t\t}\n\t\t}\n\t\treturn $galleries;\n\t}", "public function index()\n {\n $galleryImages = GalleryImage::with(['category.album'])->get();\n return view('admin_dashboard.gallery.image.index', compact(['galleryImages']));\n }", "public function index()\n {\n $data =Gallery::latest()->paginate(5);\n return view('content/admin/gallery/gallery', compact('data'));\n }", "public function gallery()\n {\n $album = DB::table('albums')->get();\n return view('backends.gallery')->with('album', $album);\n }", "public function index()\n {\n $galleries = Gallery::all();\n return view('admin.gallery.index' , compact('galleries'));\n }", "public function getImages() {\n\t\tif($this->images === null) {\n\t\t\t$this->images = $this->getObjectManager()->get('Qinx\\Qxgallery\\Domain\\Repository\\ImageRepository')->findAll(array(\n\t\t\t\t'category' => $this\n\t\t\t));\n\t\t}\n\n\t\treturn $this->images;\n\t}", "function get_all_gallery(){\n global $conn, $start_pos, $items_per_page ;\n\n pagination();\n $sql = \"SELECT * FROM gallery LIMIT $start_pos, $items_per_page\";\n\n $result = mysqli_query($conn, $sql);\n\n $galleries = [];\n // $galleries = array();\n\n if(mysqli_num_rows($result)> 0){\n\n while($row = mysqli_fetch_assoc($result)){\n array_push($galleries, $row);\n }\n return $galleries;\n } else {\n return false;\n }\n}", "private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }", "function image_gallery_admin() {\r\n _image_check_settings();\r\n\r\n $tree = taxonomy_get_tree(_image_gallery_get_vid());\r\n if ($tree) {\r\n $header = array(t('Name'), t('Operations'));\r\n foreach ($tree as $term) {\r\n $rows[] = array(str_repeat(' -- ', $term->depth) . ' ' . l($term->name, \"image/tid/$term->tid\"), l(t('edit gallery'), \"admin/content/image/edit/$term->tid\"));\r\n }\r\n return theme('table', $header, $rows);\r\n }\r\n else {\r\n return t('No galleries available');\r\n }\r\n}", "public function index()\n {\n $galleries = Gallery::orderBy('id', 'DESC')->get();\n return view('admin.gallery.index', compact('galleries'));\n }", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "public function images()\n {\n return get_field('images');\n }", "public static function printGallery() {\r\n\t\t$elts = Acid::mod('Photo')->dbList(array(array('active','=',1)),array('pos'=>'ASC'));\r\n\t\treturn Acid::tpl('pages/gallery.tpl',array('elts'=>$elts),Acid::mod('Photo'));\r\n\t}", "function tmt_gallery_get()\n\t{\n\t\t$galleries = $this->gallery_model->display_one_gallery();\n\t\t\n\t\t//$data = array('returned: '. $this->get('id'));\n\t\t$this->response($galleries);\n\t\t\n\t}", "protected function setGallery(){\n if(! $this->product->ImageGallery){\n return $this->gallery = $this->create_gallery();\n }\n\n return $this->product->ImageGallery;\n }", "public function index()\n {\n\n $galleries = Image::all();\n $data['images']=Image::all();\n return view(\"admin.gallery.gallery\",$data, compact('galleries'));\n// return view(\"gallery\");\n }", "public function getPictureGallery()\n {\n if ($this->_aPicGallery === null) {\n //get picture gallery\n $this->_aPicGallery = $this->getPicturesProduct()->getPictureGallery();\n }\n\n return $this->_aPicGallery;\n }", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "function get_post_gallery_images($post = 0)\n {\n }", "function DNUI_getInfoImageFormPostsWithGallery($without=false) {\r\n global $wpdb;\r\n \r\n if($without){\r\n $sql = \"SELECT id FROM \" . $wpdb->prefix . \"posts WHERE post_content is not null and post_content!='' and post_type not in ('attachment','nav_menu_item','revision') and post_status !='draft' AND post_content LIKE '%[gallery%'; \";\r\n }else{\r\n $sql = \"SELECT id FROM \" . $wpdb->prefix . \"posts WHERE post_content is not null and post_content!='' and post_type not in ('attachment','nav_menu_item') and post_content LIKE '%[gallery%'\";\r\n }\r\n \r\n //$sql = \"SELECT id FROM \" . $wpdb->prefix . \"posts WHERE post_content LIKE '%[gallery%' and post_type='post'; \";\r\n $result=$wpdb->get_results($sql, \"ARRAY_A\");\r\n $info=array();\r\n foreach ($result as $id) {\r\n $galleries= get_post_galleries($id['id'],false);\r\n foreach ($galleries as $gallery) {\r\n $idsImage= explode(',',$gallery['ids']);\r\n foreach($idsImage as $idImage){\r\n if(!array_key_exists($idImage, $info)){\r\n $info[$idImage]=array('sizes'=>array());\r\n }\r\n $size=\"original\";\r\n if(array_key_exists('size', $gallery)){\r\n $size= $gallery['size'];\r\n }\r\n if(!in_array($size, $info[$idImage]['sizes'])){\r\n $info[$idImage]['sizes'][]=$size;\r\n }\r\n }\r\n \r\n }\r\n \r\n \r\n }\r\n\r\n return $info;\r\n}", "public function index()\n {\n $rootParent = $this->photoGallery->rootParentList();\n $dash = \"\";\n $recurArray = [ ];\n $galleryList = collect([ ]);\n $recurList = $this->recur($rootParent, $dash, $recurArray);\n\n //generate full list of rows from recursive list of array of rootParentList\n foreach ($recurList as $key => $value) {\n $gallery = $this->photoGallery->getDataById($key);\n $gallery[\"title\"] = $value;\n $galleryList->push($gallery);\n }\n\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $data['galleryData'] = $galleryList;\n $data['toggleUrl'] = URL::to(PREFIX.'/multicms/pages/gallery/toggleStatus');\n\n return view('cms.modules.multicms.photoGallery_listall', $data);\n }", "public function photos() {\n \treturn $this->morphMany('App\\Photo', 'imageable');\n }", "public function galleryList(Request $request)\n {\n $data['pageTitle'] = __('Gallery Image List');\n $data['menu'] = 'gallery';\n if ($request->ajax()) {\n $items = Gallery::select('*');\n return datatables($items)\n ->addColumn('status', function ($item) {\n return status($item->status);\n })\n ->addColumn('category_id', function ($item) {\n return $item->category->name;\n })\n ->addColumn('image', function ($item) {\n if($item->image) {\n return '<img class=\"lists-img\" src=\"' . $item->image . '\">';\n } else {\n return '';\n }\n })\n ->editColumn('created_at', function ($item) {\n return $item->created_at ? with(new Carbon($item->created_at))->format('d M Y') : '';\n })\n ->filterColumn('created_at', function ($query, $keyword) {\n $query->whereRaw(\"DATE_FORMAT(created_at,'%d %M %Y') like ?\", [\"%$keyword%\"]);\n })\n ->addColumn('actions', function ($item) {\n $html = '<ul class=\"d-flex activity-menu\">';\n $html .= edit_html('galleryEdit', $item->id);\n $html .= delete_html('galleryDelete', $item->id);\n $html .= '</ul>';\n return $html;\n })\n ->rawColumns(['actions', 'image'])\n ->make(true);\n }\n\n return view('admin.gallery.list', $data);\n }", "public function get_images(){\n\t\treturn $this->images;\n\t}", "public function photos(){\n return $this->morphMany('cms\\Photo', 'imageable');\n }", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function index()\n {\n $model = new GalleryModel();\n $gallery = $model->getAllGallery();\n $this->data['adminGallery'] = $gallery;\n return view('admin.pages.gallery_admin',$this->data);\n }", "public function get_images_by_gallery($id, $options = array())\n\t{\n\t\t// Find new images on files\n\t\t$this->set_new_image_files($id);\t\n\n\t\t// Clear old files on images\n\t\t$this->unset_old_image_files($id);\n\n\t\tif (isset($options['offset']))\n\t\t{\n\t\t\t$this->db->offset($options['offset']);\n\t\t}\n\n\t\tif (isset($options['limit']))\n\t\t{\n\t\t\t$this->db->limit($options['limit']);\n\t\t}\n\n\t\t// Grand finale, do what you gotta do!!\n\t\t$images = $this->db\n\t\t\t\t// Select fields on gallery images table\n\t\t\t\t->select('gallery_images.*, files.name, files.filename, files.extension, files.description, files.name as title, galleries.folder_id, galleries.slug as gallery_slug, galleries.title as gallery_title')\n\t\t\t\t// Set my gallery by id\n\t\t\t\t->where('galleries.id', $id)\n\t\t\t\t// Filter images from my gallery\n\t\t\t\t->join('galleries', 'galleries.id = gallery_images.gallery_id', 'left')\n\t\t\t\t// Filter from my images\n\t\t\t\t->join('files', 'files.id = gallery_images.file_id', 'left')\n\t\t\t\t// Filter files type image\n\t\t\t\t->where('files.type', 'i')\n\t\t\t\t// Order by user order\n\t\t\t\t->order_by('`order`', 'asc')\n\t\t\t\t// Get all!\n\t\t\t\t->get('gallery_images')\n\t\t\t\t->result();\n\n\t\treturn $images;\n\t}", "public function index($id)\n {\n auth()->user()->can('master-policy.perform',['gallery','view']);\n $gallery = $this->gallery->find($id);\n $images = $this->image->where('gallery_id', $id)->get();\n return view('admin.gallery.image')->withGallery($gallery)->withImages($images);\n }", "public function index() {\n $images = Gallery::all();\n // $images = Gallery::all();\n require_once('views/gallery/index.php');\n }", "public function photos()\n {\n return $this->morphedByMany(Photo::class, 'taggable');\n }", "public function index()\n {\n $today = date('Y-m-d');\n $this->data['photos'] = DB::table('gallery')->where('show_from', '<=', $today)->where('show_until', '>', $today)->get();\n return view('gallery.index', $this->data);\n }", "public static function find_all_photos(){\n global $db;\n $sql = \"SELECT * FROM photos\";\n try {\n $result = $db->query($sql);\n $rows=$result->fetchall();\n return $rows;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function allPhotosAction() {\r\n $this->view->photo_id = $photo_id = $this->getRequest()->getParam('photo_id', '0');\r\n $this->view->chanel_id = $album_id = $this->getRequest()->getParam('chanel_id', '0');\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $params = array();\r\n // send extra params to view for extra URL parameters\r\n $this->view->params = $params;\r\n $page = isset($_POST['page']) ? $_POST['page'] : 1;\r\n $is_ajax = isset($_POST['is_ajax']) ? $_POST['is_ajax'] : 0;\r\n $params['paginator'] = true;\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n //FETCH photos\r\n $paginator = $this->view->allPhotos = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getPhotoCustom($photo, $params, '', true);\r\n $paginator->setItemCountPerPage(30);\r\n $this->view->limit = ($page - 1) * 30;\r\n $this->view->page = $page;\r\n $this->view->is_ajax = $is_ajax;\r\n $paginator->setCurrentPageNumber($page);\r\n }", "function get_post_galleries_images($post = 0)\n {\n }", "public static function getGallery(array $data)\n {\n $response = self::send('web/get_galeria/' . $data['galleryId'], [], self::METHOD_GET);\n\n return $response;\n }", "public function imagesAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n \n \n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\") || $logedUser[\"idCompany\"] == 1) {\n $request = $this->getRequest();\n }\n \n $images = $this->getImageTable()->fetchAll($logedUser[\"idWebsite\"]);\n $this->layout(\"layout/images.phtml\");\n return array(\n \"images\" => $images,\n \"idWebsite\" => $logedUser[\"idWebsite\"]\n );\n } else {\n return $this->redirect()->toRoute(\"noPermission\");\n }\n }", "public function get_all_image_uploaded(){\n if($this->username && $this->id){\n if(file_exists($this->image_path . DS . $this->username)){\n $images = scandir($this->image_path . DS . $this->username);\n if(!empty($images)){\n $images = array_diff($images,array('.','..'));\n $allowed_ex = array(\"jpg\",\"jpeg\",\"png\"); \n foreach($images as $image){\n $exArr = explode('.',$image);\n $ex = end($exArr);\n $ex = strtolower($ex);\n if(!in_array($ex,$allowed_ex)){\n $images = array_diff($images,array($image));\n }\n }\n sort($images);\n return $images;\n }else{\n return false;\n }\n }\n }else{\n return false;\n }\n }", "public function getPictures()\n {\n\n return $this->pictures;\n }", "public function getModelGalleries($id) {\n\n return GalleryModel::select('galleries.id', 'galleries.name', 'galleries.slug', DB::raw(\"IF(galleries.price, galleries.price, 0) as galleryPrice\"), DB::raw(\"(SELECT a1.mediaMeta FROM attachment a1 WHERE a1.parent_id=galleries.id AND a1.main='yes' AND a1.media_type='\" . GalleryModel::IMAGE . \"' LIMIT 1) as previewMeta\"), DB::raw(\"(SELECT a2.mediaMeta FROM attachment a2 WHERE a2.parent_id=galleries.id AND a2.media_type='\" . GalleryModel::IMAGE . \"' AND a2.status='\".AttachmentModel::ACTIVE.\"' LIMIT 1 ) as subImage\"), 'galleries.type')\n ->where('galleries.ownerId', $id)\n ->where('galleries.status', '!=', GalleryModel::INVISIBLESTATUS)\n ->where('galleries.type', GalleryModel::IMAGE)\n ->paginate(6);\n }", "public function PhotosPublic() {\n return $this->hasMany(Photo::class, 'user_uid', 'uid')\n ->orderBy('photos.moment', 'desc')\n ->whereRaw('datediff(now(), photos.moment) <= 10')\n ->where('status_id', 1);\n }", "public function getImages()\r\n {\r\n return $this->images;\r\n }", "public function getImages() : array\n\t{\n\t\treturn $this->images_list;\n\t}", "public function index()\n {\n return view('admin.list.images', [\n 'pageImages' => Image::where('imageType', '=', 'page')->get(),\n 'backgroundImages' => Image::where('imageType', '=', 'background')->get()\n ]);\n }", "public function index()\n {\n return view('gallery');\n }", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function getImages(){\n return $this->images;\n }", "public function getAllWithoutFolders()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table)\n ->where('folder_id', '=', 0);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n $photos[$index] = $this->extend($photo);\n }\n }\n\n return $photos;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function index()\n {\n // Get galleries\n $galleries = Gallery::orderBy('created_at', 'desc')->get();\n\n // Return collection of galleries as a resource\n return GalleryResource::collection($galleries);\n }", "public function photos() {\n return $this->morphMany('App\\Models\\Photo', 'imageable'); //'imageable' - method in Photos model\n }", "public function index()\n {\n $galleries = Gallery::all()->toArray();\n $latest_update = Gallery::latest('updated_at')->get();\n return view('adminlte::gallery.index', compact('galleries', 'latest_update'));\n }", "function admin_gallery()\n {\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n redirect_to('/');\n\n $this->load_outer_template('admin');\n\n if(!isset($this->params[2]) || (!is_numeric($this->params[2])))\n throw new exception(\"No set specified\");\n\n $item = $this->params[2];\n\n $m_gallery = instance_model('gallery');\n $m_set = instance_model('gallery_set');\n $m_member = instance_model('members');\n\n $set = $m_set->get_by_id($item);\n if($set == array())\n throw new exception('Set does not exist');\n\n $member = $m_member->get_by_id($set[0]['Owner']);\n\n if($member == array())\n throw new exception('Member does not exist');\n\n $gallery = $m_gallery->get_in_set($item);\n\n $list = array();\n foreach($gallery as $image)\n {\n $list []= array(\n 'name' => make_url('res', 'gallery', $member[0]['Clean_title'], 'thumbs', $image['File']),\n 'options' => array(\n 'Delete' => make_url('members', 'admin_gallery_delete', $item, $image['ID']))\n );\n }\n\n $view = instance_view('admin/index_generic');\n $view = $view->parse_to_variable(array(\n 'image_mode' => true,\n 'back_url' => make_url('members', 'admin_gallery_set', $set[0]['Owner']),\n 'sortable' => false,\n 'title' => 'Group: ' . $set[0]['Title'],\n 'new_url' => make_url('members', 'admin_gallery_create', $item),\n 'new_name' => 'Upload image',\n 'list' => $list\n ));\n\n\n $this->set_template_paramiters(array(\n 'content' => $view\n ));\n }", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "public function getAll()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n $photos[$index] = $this->extend($photo);\n }\n }\n\n return $photos;\n }", "public function all()\n {\n return DogsGallery::where(\"found_by\", null)\n ->get()\n ->map->format();\n }", "public function allImages()\n {\n $query = \"SELECT DISTINCT image from blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $images = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $images;\n\n }", "public function index()\n {\n $items = Gallery::latest()->paginate(10);\n return view('pages.gallery.index', compact('items'));\n }" ]
[ "0.7446688", "0.71433467", "0.7114587", "0.70431155", "0.70430017", "0.70332485", "0.6920346", "0.687838", "0.6803603", "0.67782533", "0.6724931", "0.671263", "0.6689347", "0.6680222", "0.6662867", "0.66008234", "0.6572055", "0.65330446", "0.65083766", "0.6475394", "0.647224", "0.6443901", "0.64377975", "0.6414635", "0.63810986", "0.6377095", "0.6364274", "0.6356784", "0.63250005", "0.6319261", "0.6318088", "0.63133585", "0.630303", "0.63011503", "0.6300254", "0.62918186", "0.62831193", "0.6266895", "0.62559545", "0.6243863", "0.6242501", "0.62400836", "0.6239555", "0.6228996", "0.6225278", "0.6224184", "0.62241316", "0.62118185", "0.62082577", "0.6204348", "0.61923724", "0.618498", "0.61621195", "0.61611444", "0.61440873", "0.6139224", "0.612786", "0.61193806", "0.6108456", "0.61067295", "0.6098583", "0.6098427", "0.6098283", "0.60959715", "0.6095872", "0.6093519", "0.60909724", "0.6085862", "0.60852706", "0.60843307", "0.6073475", "0.60628", "0.6053214", "0.604794", "0.6043114", "0.6037958", "0.6035465", "0.6033582", "0.60317755", "0.6031412", "0.60297287", "0.60297126", "0.60296136", "0.602511", "0.60247576", "0.60216844", "0.60216844", "0.60216844", "0.60216844", "0.60216844", "0.60216844", "0.60144895", "0.60119295", "0.60069734", "0.6003661", "0.60026515", "0.59996325", "0.5995433", "0.59883505", "0.59874004" ]
0.65843785
16
Returns information for photo by given id.
abstract public function getById($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhoto($id);", "function getPhotoInfo($photoId);", "public function getPhoto($id)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizePhoto($res->body->SelectResult->Item);\n else\n return false;\n }", "public function getPictureById($id)\n\t{\n\t\t$sql = \"SELECT id,file FROM photo WHERE id=:id LIMIT 1\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute(array(\":id\"=>$id));\n\t\treturn $query->fetchAll();\n\t}", "public static function find_photo($id){\n global $db;\n $message = null;\n $sql = \"SELECT * FROM photos WHERE photo_id = '\".$id.\"' LIMIT 1\";\n try {\n $result = $db->query($sql);\n $row = $result->fetch();\n return $row;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function getPhoto($id){\n $sql=\"SELECT from_url FROM people WHERE id_people=?\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($id));\n return $rs->fetch(PDO::FETCH_OBJ);\n }", "protected function getImageWithId($id){\n $conn = static::connect();\n $stmt = $conn->prepare(\"SELECT * FROM images where id=:id\");\n $stmt->bindValue('id', $id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function getImageDetails($id)\n {\n \tif(!$this->token)\n \t{\n \t\treturn parent::getImageDetails($id);\n \t}\n \t\n static $method = 'flickr.photos.getSizes';\n\n if (empty($id)) {\n /**\n * @see Zend_Service_Exception\n */\n require_once 'Zend/Service/Exception.php';\n throw new Zend_Service_Exception('You must supply a photo ID');\n }\n $options = array(\n \t'api_key' => $this->apiKey,\n \t'auth_token' => $this->token, \n \t'method' => $method, \n \t'photo_id' => $id\n );\n $options = $this->signOptions($this->secret, $options);\n\n $restClient = $this->getRestClient();\n $restClient->getHttpClient()->resetParameters();\n $response = $restClient->restGet('/services/rest/', $options);\n\n $dom = new DOMDocument();\n $dom->loadXML($response->getBody());\n $xpath = new DOMXPath($dom);\n self::_checkErrors($dom);\n $retval = array();\n /**\n * @see Zend_Service_Flickr_Image\n */\n require_once 'Zend/Service/Flickr/Image.php';\n foreach ($xpath->query('//size') as $size) {\n $label = (string) $size->getAttribute('label');\n $retval[$label] = new Zend_Service_Flickr_Image($size);\n }\n\n return $retval;\n }", "function getSpecificPhoto($id) {\r\n App::import('Vendor', 'phpFlickr/phpFlickr');\r\n $flickr =& new phpFlickr(Configure::read('Flickr.settings.key'));\r\n return $flickr->photos_getSizes($id);\r\n }", "public function show($id)\n {\n return Image::find($id);\n }", "function photos_getInfo ($photo_id, $secret = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getInfo';\n\t\t$params['photo_id'] = $photo_id;\n\t\tif ($secret) $params['secret'] = $secret;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function getPhoto($photo_id, $secret){\n\n\t\t/* Get Photo */\n\t\t$photo = $this->askFlickr('photos.getInfo','&photo_id='.$photo_id.'&secret='.$secret);\n\n\t\t/* Return Photo */\n\t\treturn $photo;\n\t}", "public function getImage($id){\n $id = strip_tags($id);\n\n $sql = \"SELECT * FROM image WHERE id = :id LIMIT 1\";\n $query = $this->db->prepare($sql);\n $parameters = array(':id' => $id);\n\n $query->execute($parameters);\n\n return $query->fetchAll();\n }", "public function show($id)\n {\n return $this->get('/images/' . $this->encodePath($id));\n }", "public function photoShow($id)\n {\n //\n }", "protected function getPhoto($id){\n try{\n $query = \"Select users.photo From users Where users.id = ?\";\n $stmt = $this->getConnection($query);\n $stmt -> bind_param('i', $id);\n $stmt -> execute();\n $stmt -> bind_result($photo);\n $stmt->fetch();\n $userPhoto[] = array(\n 'photo' => $photo\n );\n $stmt -> close();\n\n return $userPhoto;\n }catch (Exception $e){\n die('Error - cannot get user photo: ' . $e -> getMessage());\n }\n }", "public function photo($id)\n {\n $post = Post::where('id', $id)->first();\n\n return response()->file(storage_path() .'/app/'. $post->image_path);\n }", "public function getImage($id)\n\t{\n\t\t$object = Image::read($id);\n\t\t\n\t\tif (!$object) {\n\t\t\treturn $this->error(404);\n\t\t}\n\t\t\n\t\t$response = Api::transform($object);\n\n\t\treturn $this->response($response, 'image');\n\t}", "public function selectImage($id) {\n $sql = \"SELECT * FROM `images` WHERE `id` = :id\"; \n $stmt = $this->pdo->prepare($sql); \n $stmt->bindValue('id', $id); \n $stmt->execute(); \n return $stmt->fetch(PDO::FETCH_ASSOC); \n }", "public static function getGalleryInfo(int $id) {\n $thumbURL = ImageGalleryController::getThumbnailUploadURL();\n return self::select(DB::raw(\"`id`, `name`,\" . self::_getImageSelectString($thumbURL, 'thumbnail') . \", `gallery_type`,`image_description`,`created_at`\"))\n ->where('id', $id)\n ->first();\n }", "public function get_foto_file($id)\n\t{\n\t\tif (!$this->is_allowed('m_ads_update', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Image not loaded, you do not have permission to access'\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$m_ads = $this->model_m_ads->find($id);\n\n\t\techo $this->get_file([\n 'uuid' => $id, \n 'delete_by' => 'id', \n 'field_name' => 'foto', \n 'table_name' => 'm_ads',\n 'primary_key' => 'id',\n 'upload_path' => 'uploads/m_ads/',\n 'delete_endpoint' => 'administrator/m_ads/delete_foto_file'\n ]);\n\t}", "public function load($id)\n\t{\n\t\treturn Image::model()->findByPk($id);\n\t}", "public function view($id) {\n if($id == 0){\n redirect(base_url('assets/img/no_image_available.png'));\n }\n // load the photo indexed by id\n $this->load->model('photos_model');\n $photo_data = $this->photos_model->get_photo($id);\n\n // make sure it exists - otherwise terminate with 404 message\n if (!isset($photo_data))\n show_404();\n\n // returned data was good, load data for the view handler\n $data['header'] = \"Content-type: image/$photo_data->content_type\";\n $data['photo'] = $photo_data->photo;\n\n // let the view do what it does - send an image to the client\n $this->load->view('templates/photo', $data);\n }", "public static function find($id)\n {\n $photo = json_decode(self::get(\"/photos/{$id}\")->getBody(), true);\n\n return new self($photo);\n }", "function getPhoto()\n\t{\n\t\t$id = $this->input->post('id');\n\t\t$response = $this->mapi->getPhoto($id);\n\n\t\techo json_encode($response);\n\t}", "function findPhoto($photo_id){\n\t\n}", "public function getPhotoWithActions($id)\n {\n $queue = $this->getBatchRequest();\n $this->db->batch($queue)->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->db->batch($queue)->select(\"SELECT * FROM `{$this->domainAction}` WHERE targetType='photo' AND targetId='{$id}'\", array('ConsistentRead' => 'true'));\n $responses = $this->db->batch($queue)->send();\n $this->logErrors($responses);\n if(!$responses->areOk())\n return false;\n\n\n if(isset($responses[0]->body->SelectResult->Item))\n $photo = self::normalizePhoto($responses[0]->body->SelectResult->Item);\n\n $photo['actions'] = array();\n foreach($responses[1]->body->SelectResult->Item as $action)\n $photo['actions'][] = $this->normalizeAction($action);\n\n return $photo;\n }", "public function get_gallery_detail($id) {\n $this->db->select('business_gallery.*');\n $this->db->from('business_gallery');\n $this->db->where('id', $id);\n $query = $this->db->get();\n $query_result = $query->result();\n if (count($query_result) == 0) {\n $details = $query_result;\n } else {\n $details = $query_result[0];\n }\n\n return $details;\n }", "public function resolveById($id)\n {\n Picture::find($id);\n }", "public function find(string $id): Image\n {\n return $this->single(Image::class, \"2.0/product_images/$id\");\n }", "function getPhotoDetail($photo_id=null){\r\n\t\tif($photo_id==null) return array();\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('id'=>$photo_id));\r\n\t\t$recordSet = $this->db->get(TBL_ALBUM_HAS_PHOTOS);\r\n\t\t$data=$recordSet->result() ;\r\n \t\treturn $data;\r\n\t}", "public function get_file_detail( $id ) {\n global $wpdb;\n\n // check if id is not empty\n if ( empty( $id ) ) {\n return false;\n }\n\n $sql = <<<__SQL\nSELECT\n ID\n , title\n , content\n , date_data as date\n , tag\n , file\n , image_id\n , dtcreate\n , dtupdate\n , deleteflg\nFROM\n hc_file\nWHERE\n ID = %d\n AND deleteflg = %d\n__SQL;\n // get the param for the sql\n $param = array( (int)$id, 0 );\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $param );\n\n // get the result\n $res = $wpdb->get_results( $prepare );\n\n // check if result is empty\n if ( empty( $res ) ) {\n return false;\n }\n\n return $res[0];\n }", "public static function getById($id) {\n\t\t$conn = new PDO (DB_DSN, DB_USERNAME, DB_PASSWORD);\n\t\t$sql = \"SELECT *, UNIX_TIMESTAMP(uploadDate) as uploadDate FROM images WHERE ID = :id\";\n\t\t$st = $conn->prepare($sql);\n\t\t$st->bindValue(\":id\", $id, PDO::PARAM_INT);\n\t\t$st->execute();\n\t\t$row = $st->fetch();\n\t\t$conn = null;\n\n\t\tif ($row) return new Image($row);\n\t}", "public function show($id)\n {\n return Gallery::with('user', 'images', 'comments.user')->findOrFail($id);\n }", "function showPhoto($sid)\n {\n $result = $this->getPhoto($sid);\n return $result;\n }", "public function show($id)\n {\n $bag = Bag::with('photo')->find($id);\n return response()->json(['success' => true, 'message' => '查询成功', 'bag' => $bag]);\n }", "public function getImage(string $id) : string {\n return file_get_contents($this->end_point, false, stream_context_create([\n 'http' => [\n 'method' => 'POST',\n 'header' => \"Content-Type: application/json\\r\\n\",\n 'content' => json_encode([\n 'action' => 'image_file_by_id',\n 'id' => $id,\n 'session' => $this->session\n ])\n ]\n ]));\n }", "public function loadPhoto($id)\n {\n $image=DB::table('uploaded_photos')\n ->where('userID','=',$id)\n ->get();\n\n return view('ajax.LoadPhotos')->with('image',$image);\n\n }", "public function get($id)\n\t{\n\t\t$query = $this->db\n\t\t\t->select('gallery_images.*, files.name, files.filename, files.extension, files.description, files.name as title, galleries.folder_id, galleries.slug as gallery_slug')\n\t\t\t->join('galleries', 'gallery_images.gallery_id = galleries.id', 'left')\n\t\t\t->join('files', 'files.id = gallery_images.file_id', 'left')\n\t\t\t->where('gallery_images.id', $id)\n\t\t\t->get('gallery_images');\n\t\t\t\t\n\t\tif ( $query->num_rows() > 0 )\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "static function getPhotoTemp($id)\r\n\t{\r\n\t\t$id = funcs::check_input($id);\r\n\r\n\t\t$sql = \"select p.*,\r\n\t\t\t\tm.username as username\r\n\t\t\t\tfrom phototemp as p,member as m\r\n\t\t\t\tWHERE m.id=p.userid\r\n\t\t\t\torder by p.id desc\";\r\n\t\t$result = DBconnect::assoc_query_2D($sql);\r\n\t\t$photoresult = $returnResult = array();\r\n\t\tif(count($result)>0){\r\n\t\t\tforeach($result as $key=>$value){\r\n\t\t\t\t$photoresult[\"id\"] = $value[\"id\"];\r\n\t\t\t\t$photoresult[\"userid\"] = $value[\"userid\"];\r\n\t\t\t\t$photoresult[\"username\"] = $value[\"username\"];\r\n\t\t\t\t$photoresult[\"picturepath\"] = $value[\"picturepath\"];\r\n\t\t\t\t$photoresult[\"datetime\"] = $value[\"datetime\"];\r\n\t\t\t\t$photoresult[\"status\"] = $value[\"status\"];\r\n\t\t\t\t$photoresult[\"site\"] = $id;\r\n\t\t\t\t$returnResult[] = $photoresult;\r\n\t\t\t}//end foreach\r\n\t\t}//end if\r\n\t\treturn $returnResult;\r\n\t}", "public function getCover($id){\n $album = Album::find($id);\n return strval($album->image);\n }", "public function show($id)\n {\n //\n\n try {\n $gallery = Gallery::find($id);\n if (!$gallery) {\n return response()->notFound(\"gallery does not exist\");\n }\n $image = new Image();\n $results = $image->getImages($id);\n return response()->success($results);\n } catch (Exception $e) {\n return response()->exception($e->getMessage(), $e->getCode());\n }\n }", "public function getPhotoInfoAction()\n {\n \t$params = $this->getRequest()->getParams();\n \t//Zend_Debug::dump($params); die();\n \n \t$result = \\Extended\\socialise_photo::getPhotoInfo( $params['photo_id'] );\n \t \n \tif( $result ):\n \techo Zend_Json::encode( $result );\n \telse:\n \t//Wallpost doesnot exist anymore.\n \techo Zend_Json::encode( 2 );\n \tendif;\n \tdie;\n }", "function getPhotoSetInfo($photoset_id){\n\n\t\t/* Get Photoset Name and Description */\n\t\t$photoset_info = $this->askFlickr('photosets.getInfo','&photoset_id='.$photoset_id);\n\n\t\t/* Return Photo Info Object */\n\t\treturn $photoset_info;\n\t}", "public function getUserPhoto($iduser){\n //convert the $id to integer\n $iduser = intval($iduser);\n\n $userinfo = DB::connection('mongodb')->collection('userinformations')\n ->project(['_id' => 0])\n ->select('profilephoto')\n ->where('iduser', '=', $iduser)\n ->get();\n if($userinfo) {\n foreach($userinfo as $new){\n return $new;\n }\n \n } else {\n return 'no photo';\n }\n \n }", "public function get_file_details($img_id){\n\t\t$this->db->select('images.img_id,images.img_name')->from('images');\t\t\n\t\t$this->db->where('img_id', $img_id);\n\t\treturn $this->db->get()->row_array();\n\t}", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "private function getPicture($id)\n\t{\n\t\t$url = 'https://graph.facebook.com/' . $id . '/picture?type=normal';\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$a = curl_exec($ch);\n\t\t$url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\t\tcurl_close($ch);\n\t\treturn $url;\n\t}", "public function apiShow($id)\n {\n $photos = PhotoManager::getPhotos($id);\n return json_encode($photos);\n }", "public function show($id)\n\t{\n\t\t//\n\t\t// return Images::all()->toJson();\n\t\tdd(\"Bạn đang đứng thứ $id\");\n\t}", "public function findById($id)\n {\n return DogsGallery::where(\"id\", $id)\n ->first()\n ->format();\n }", "public function single($photo_id) {\n\t\t$params = array(\n\t\t\t'api_key'\t=> $this->api_key,\n\t\t\t'method'\t=> 'flickr.photos.getSizes',\n\t\t\t'photo_id'\t=> $id,\n\t\t\t'format'\t=> 'php_serial',\n\t\t);\n\t\t\n\t\t$encoded_params = array();\n\t\t\n\t\tforeach ($params as $k => $v){\n\t\t\t$encoded_params[] = urlencode($k).'='.urlencode($v);\n\t\t}\n\t\t\n\t\t$res = curl_init($this->url.implode('&', $encoded_params));\n\t\t\n\t\tcurl_setopt($res, CURLOPT_RETURNTRANSFER, true);\n\t\t\n\t\treturn $response = curl_exec($res);\n\t}", "public function show($id)\n {\n $photo = Photo::findOrFail($id);\n\n return view('backEnd.photos.show', compact('photo'));\n }", "function photos_getExif ($photo_id, $secret = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getExif';\n\t\t$params['photo_id'] = $photo_id;\n\t\tif ($secret) $params['secret'] = $secret;\n $response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function show($id)\n {\n return albumdetail::findOrFail($id);\n }", "function getImageByImageId() {\n if($this->image_id == '') return;\n\n $sql = \"SELECT * FROM \".$this->tableImages().\" WHERE image_id = \".$this->image_id;\n return $this->db->query($sql)->row_array();\n\t}", "public function show($id) {\n $photo = Photo::find($id);\n return view('photos.show')->with('photo', $photo);\n }", "public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}", "function get_photo_date_by_id($id)\n{\n\t$result=$GLOBALS['db']->Execute(\"SELECT date FROM \".PREFIX.\"photos WHERE id='\".linpha_addslashes($id).\"'\");\n\t$row=$result->FetchRow();\n\treturn $row[0];\n}", "public function loadproductimagebyid($id){\n\t\t$this->db->where('Product_Id', $id);\n\t\t$query=$this->db->get('tbl_product_images');\n\t\treturn $query->result();\n\t}", "public function show($id)\n {\n\n $post = $this->post->with('tags')->find($id);\n //dd($post);// = unserialize($post->photo);\n return $post;\n //return $this->post->with('tags')->find($id);\n }", "public function show($id)\n {\n $record = Record::with('user')->findOrFail($id);\n $content = Storage::get('public/' . $record->image);\n $record['image_code'] = base64_encode($content);\n\n return response()->json([\n 'record' => $record,\n ], 200);\n }", "public function show($id)\n\t{\n\t\t$json = [];\n\t\t$json = $this->vehicle->with('vehicle_address', 'vehicle_photos')->find($id);\n\t\t\n\t\tif (!empty($json)) {\n\t\t\t$statusCode = 200;\n\t\t} else {\n\t\t\t$statusCode = 400;\n\t\t\t$json['Error'][] = 'vehicle does not exist!';\n\t\t}\n\n\t\treturn $this->response->setContent($json, $statusCode);\n\t}", "public function viewOne($image_id){\n $image = Image::find($image_id);\n \n if(empty($image)){\n return $this->jsonResponse(\"error\", \"Cannot find image\", Input::get('callback'));\n }\n \n return $this->jsonResponse(\"ok\", \"Image found\", Input::get('callback'), $image->first());\n }", "public function apartmentPhotos($id){\n\n $photos = DB::table('apartament_photos')\n ->where('apartament_id', $id)\n ->get();\n\n return $photos;\n }", "function photosets_getInfo ($photoset_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.getInfo', 'photoset_id' => $photoset_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "protected function getFile($id) {\n\t\t/* load from database */\n\t\t$data = $this->db->querySingle('SELECT * FROM image WHERE id = \"'.SQLite3::escapeString($id).'\"', true);\n\t\t$path = self::getPath($id);\n\t\tif (!$data || !is_file($path)) {\n\t\t\t/* delete leftovers */\n\t\t\t$this->delete($id);\n\t\t\tthrow new QuicksandException(\"The file you are looking for does not exist (anymore).\");\n\t\t}\n\t\treturn $data + array('path' => $path);\n\t}", "function fetch_user_info($id){\n\t\t$id = (int)$id;\n\t\t\n\t\t$sql = \"SELECT * FROM users WHERE id = {$id}\";\n\t\t$result = mysql_query($sql);\n\t\t\n\t\t$info = mysql_fetch_assoc($result);\n\t\t$info['avatar'] = (file_exists(\"{$GLOBALS['path']}/user_avatars/{$info['id']}.jpg\")) ? \"core/user_avatars/{$info['id']}.jpg\" : \"core/user_avatars/default.jpg\";\n\t\t\n\t\treturn $info;\n\t}", "private function getImageForCarId($id)\n {\n $this->db->setQuery(\"SELECT * FROM #__djcf_images WHERE item_id='\" . (int)$id . \"' ORDER BY ordering ASC LIMIT 1\");\n $row = $this->db->loadObject();\n\n // replace incorrect double //\n return JUri::base() . substr($row->path, 1, strlen($row->path) - 1) . $row->name . '.' . $row->ext;\n }", "public function details($id){\n return new JsonResponse([\n 'media' => Media::find($id)\n ]);\n }", "public function thumbnail($id) {\n if($id == 0){\n redirect(base_url('assets/img/no_image_thumbnail.jpg'));\n }\n // load the thumbnail indexed by id\n $this->load->model('photos_model');\n $photo_data = $this->photos_model->get_thumbnail($id);\n\n // make sure it exists - otherwise terminate with 404 message\n if (!isset($photo_data))\n show_404();\n\n // returned data was good, load data for the view handler\n $data['header'] = \"Content-type: image/$photo_data->content_type\";\n $data['photo'] = $photo_data->photo;\n\n // let the view do what it does - send an image to the client\n $this->load->view('templates/photo', $data);\n }", "public function _get($id)\n {\n $this->db->where('id', (int) $id);\n $query = $this->db->get('images');\n return $query->row_array();\n }", "public function show($photo_id)\n {\n try\n {\n\n $photo = $this->dispatchFromArray(ReadPhotoMediaCommand::class, ['photo_id'=> $photo_id]);\n\n\n return $this->respond([\n 'data' => $this->leaguePhotoTransformer->transform($photo)\n ]);\n\n } catch (LeaguePhotoNotFound $e) {\n return $this->respondNotFound($e->getMessage());\n\n }\n }", "public function show($id)\n {\n try\n {\n if (preg_match(\"/[A-Za-z]/\", $id)) throw new Exception(\"Invalid Data\", 0);\n $data = DB::table('clients')\n ->join('users', 'clients.c_u_id', '=', 'users.u_id')\n ->leftJoin('user_photos', 'clients.c_u_id', '=', 'user_photos.up_u_id')\n ->select('clients.*', 'users.u_username', 'user_photos.up_id', 'user_photos.up_filename', 'user_photos.up_photo')\n ->where('clients.c_u_id', '=', $id, 'and')\n ->where('clients.c_rec_status', '=', 1)\n ->get();\n \n $data[0]->up_photo = base64_encode($data[0]->up_photo);\n $data[0]->u_username = str_replace('@','',$data[0]->u_username);\n return response()->json($data);\n }\n catch (Exception $ex)\n {\n return response()->json([\n 'code' => $ex->getCode(),\n 'message' => $ex->getMessage()\n ]);\n }\n }", "private function getProfileImage($id)\n\t{\n\t\t$url = 'https://graph.facebook.com/' . $id . '/picture';\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$a = curl_exec($ch);\n\t\t$url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\t\tcurl_close($ch);\n\t\treturn $url;\n\t}", "public function getImage( $post_id ) {}", "public function id($id)\n\t{\n\t\treturn $this->media($id);\n\t}", "public function getById($id)\n {\n $sql = \"SELECT * FROM product_color_imgs WHERE id=:id\";\n\n $this->db->query($sql);\n $this->db->bind(':id', $id);\n\n return $this->db->single();\n }", "public function get_all_img_byID($id) {\n $sql = \"select * from advertisement_image where AdsID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->result();\n }", "public function fetchById($id)\n {\n return $this->prepareResult($this->galleryMapper->fetchById($id));\n }", "public function product_get_images_id($id)\n {\n \n $query = \"SELECT * FROM \" . $this->db_table_prefix. \"images where product_id = '\" . $id . \"' order by id DESC\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "private function _file_info($file_id)\n\t{\n\t\tee()->load->model('file_model');\n\n\t\t$file_info = ee()->file_model->get_files_by_id($file_id);\n\t\t$file_info = $file_info->row_array();\n\n\t\t$file_info['is_image'] = (strncmp('image', $file_info['mime_type'], '5') == 0) ? TRUE : FALSE;\n\n\t\t$thumb_info = $this->get_thumb($file_info['file_name'], $file_info['upload_location_id']);\n\t\t$file_info['thumb'] = $thumb_info['thumb'];\n\n\t\treturn $file_info;\n\t}", "public function getFileById(int $id)\n {\n $sql = \"SELECT files.*, users.name as user_name, users.avatar as user_avatar FROM files LEFT JOIN users on files.user_id = users.id WHERE files.id=:id_bind\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_STR);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_CLASS, 'Filehosting\\Entity\\File');\n return !empty($result) ? $result[0] : null;\n }", "protected function _getDescription($id) {\r\n return $this->_createRequest([\r\n 'method' => 'flickr.photos.getInfo',\r\n 'photo_id' => $id\r\n ])->then(function($data) {\r\n return $data['photo']['description']['_content'];\r\n });\r\n }", "public function get_avatar($id = \"\") {\n $this->db->select('id,avatar');\n $this->db->from($this->admin_table);\n $this->db->where('id', $id);\n $result = $this->db->get();\n return $result->row_array();\n }", "public function show(){\n\t\t // Default size is preview\n if(!empty($_GET['size'])) $size = $_GET['size'];\n else $size = 'preview';\n\n /** @var Photo $pobj */\n $pobj = Photo::fetch($_GET['id']);\n if($pobj !== false && !$pobj->temporary && $pobj->data->status == 'saved') $pobj->show($size);\n else $this->zajlib->reroute('__error', ['system_api_photo_show', []]);\n\t\t}", "function memberNameAndPicture($id)\r\n {\r\n\r\n $select = 'SELECT firstname, lastname, image FROM atlas_members WHERE member_id=:id';\r\n \r\n $statement = $this->_pdo->prepare($select);\r\n $statement->bindValue(':id', $id, PDO::PARAM_INT);\r\n $statement->execute();\r\n \r\n return $statement->fetch(PDO::FETCH_ASSOC);\r\n }", "public function show($id)\n {\n //\n\n $photos=[];\n $pages=$this->getPage($id);\n $photo_name=$pages->img;\n $photo_name=json_decode($photo_name);\n array_push($photos, $photo_name);\n\n //dd($photos);\n\n $epifs=$this->getEpifs();\n $candles=$this->getCandles();\n $events=$this->getEvents();\n\t$roles = $this->getRoles();\n\t//dd($events);\n\n return view('test')->with(array( 'pages'=>$pages,'roles'=>$roles, 'photos'=>$photos, 'epifs'=>$epifs, 'candles'=>$candles, 'events'=>$events));\n }", "public function get_images_byID($id) {\n $sql = \"select * from advertisement_image where AdsID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->result();\n }", "function get_image($image_id)\n\t{\n\t\t// global variables from config/db_config.php\n\t\tglobal $idea_db;\n\t\tglobal $images_db_table;\n\t\tglobal $db_hostname;\n\t\tglobal $db_user;\n\t\tglobal $db_password;\n\n\t\t$query = \"SELECT * FROM $images_db_table WHERE id='$image_id';\";\n\n\t\tif ($result = receive_query($query, $db_hostname, $db_user,\n\t\t$db_password,$idea_db))\n\t\t{\n\t\t\t// extract record from query\n\t\t\t$row = $result->fetch_array();\n\t\t\treturn $row['filename'];\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function show($id)\n\t{\n\t\tif (Request::ajax()) {\n\t\t\t$album = Album::with('images')->find($id);\n\t\t\treturn $album;\n\t\t}\n\t}", "function getImageId();", "public function getPhotos($id)\n {\n $gallery = Gallery::with('photos')->find($id);\n\n $photos = $gallery->photos;\n\n $photoarr = [];\n\n foreach($photos as $photo) {\n $photoarr[] = [\n 'server' => $photo->filename,\n 'size' => app('files')->size(public_path('uploads/photos/' . $photo->filename)),\n 'imageurl' => asset('uploads/photos/thumbs/' . $photo->filename)\n ];\n }\n return response()->json([\n 'photos' => $photoarr\n ]);\n }", "public function getImageByID ($id_image = 0) {\n $this->connection->where('id_image', $id_image);\n $result = $this->connection->select('base64', 'images');\n\n if ($result && $result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n $image = array(\n 'base64' => $row['base64'],\n );\n\n // if (file_exists('./images/' . $row['filename'])) {\n // $image['base64'] = base64_encode(file_get_contents('./images/' . $row['filename']));\n // }\n break;\n }\n\n return $image;\n }\n\n return null;\n }", "public function getMediaItem($id);", "public function getPhotoId()\n {\n return $this->photoId;\n }", "public function apartmentMainPhoto($id){\n\n $mainPhoto = DB::table('apartament_photos')\n ->select('id')\n ->where('apartament_id', $id)\n ->where('main_photo', 1)\n ->first();\n\n return $mainPhoto->id;\n }", "public function show($id)\n {\n $galleryModel = new GalleryModel();\n $one = $galleryModel->getOneGallery($id);\n return Json::encode($one);\n }", "public function getId() {\n\t\treturn (string) $this->photo['id'];\n\t}", "public function show($id)\n {\n $album = Albums::find($id);\n\n $date = new Date('now', 'Europe/Brussels');\n\n $date->month = $album->mois+1;\n\n $album->mois = $date->format('F');\n\n $proprietaire = User::find($album->ID_proprietaire);\n\n $album->proprietaire_nom = $proprietaire->first_name. ' ' .$proprietaire->last_name. ' (Propriétaire)';\n\n\n $picturesData = $album->pictures;\n\n $pictures = array();\n $i=0;\n foreach($picturesData as $picture){\n\n $pictures[$i]['big'] = $picture->directory.'/'.$picture->name;\n $pictures[$i]['thumb'] = $picture->directory.'/thumb2_'.$picture->name;\n $i++;\n }\n return view('albums.show',compact('album','pictures'));\n }", "public function get_photo(){\n $id = $this->input->post('id');\n if(is_numeric($id)){\n $data = $this->base_model->get_data('deal_pic' , '*' , 'row' , array('id'=>$id));\n echo json_encode($data);\n }else{\n show_404();\n }\n }" ]
[ "0.86148846", "0.82478034", "0.7939101", "0.78117687", "0.76279664", "0.7617161", "0.7611939", "0.7607837", "0.755626", "0.7458441", "0.7366674", "0.7341912", "0.7276771", "0.7253216", "0.72277224", "0.7226098", "0.72216177", "0.70732707", "0.70658284", "0.70450896", "0.70434314", "0.69812936", "0.6977493", "0.69535285", "0.69170696", "0.6901188", "0.6898447", "0.68854123", "0.6874597", "0.6867983", "0.6864843", "0.6853312", "0.6802517", "0.6799119", "0.67958164", "0.6760497", "0.67591214", "0.67410374", "0.67100316", "0.670102", "0.6656932", "0.665472", "0.66196775", "0.66079086", "0.66076994", "0.66052645", "0.6590534", "0.658488", "0.6583253", "0.6580299", "0.65642804", "0.6563722", "0.65575445", "0.6530664", "0.6526418", "0.6518822", "0.6515839", "0.6514793", "0.65074563", "0.6503157", "0.64865816", "0.64856565", "0.64808935", "0.64750034", "0.646481", "0.64605796", "0.6448058", "0.64458686", "0.6443327", "0.64359564", "0.6422411", "0.6416952", "0.6413216", "0.6407463", "0.6404864", "0.6404327", "0.63968563", "0.63955104", "0.6390435", "0.63898045", "0.63865227", "0.6386281", "0.63732576", "0.63673943", "0.6361023", "0.63491994", "0.6348032", "0.63431066", "0.63392264", "0.6336861", "0.63354236", "0.63215774", "0.63203144", "0.631868", "0.63158715", "0.630859", "0.63085705", "0.62994933", "0.6299064", "0.6296424", "0.6295611" ]
0.0
-1
get name of currently active menu
private function getCurrentMenuName(){ if(!$this->currentmenuname) $this->setCurrentMenuName(); return $this->currentmenuname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function menu_get_active_title()\n {\n return menu_get_active_title();\n }", "protected function _getMenuName()\n\t{\n\t\treturn self::$_sMenuName;\n\t}", "private function setCurrentMenuName(){\n \n $currentmenuname = NULL;\n \n foreach(array_keys(menu_ui_get_menus()) as $menuname){\n \n $activelink = \\Drupal::service('menu.active_trail')->getActiveLink($menuname);\n \n if(!empty($activelink))\n $currentmenuname = $menuname;\n \n }\n \n $this->currentmenuname = $currentmenuname;\n \n }", "private function getMenuName() {\n $menu_name = FALSE;\n $menu_links = $this->menuLinkManager->loadLinksByRoute($this->currentRouteMatch->getRouteName(), $this->currentRouteMatch->getRawParameters()->all());\n if ($menu_links) {\n // Get the deepest link to this page and use that for the subnav.\n // @todo Consider a better approach like excluding utility nav links or\n // sorting them by main menu then footer then utility nav.\n $menu_link = end($menu_links);\n $menu_name = $menu_link->getMenuName();\n }\n\n return $menu_name;\n }", "protected function getActiveMenu() {\n return $this->activeMenu;\n }", "public function getName()\n {\n return \"menu\";\n }", "function getMenuTitle();", "public function MenuTitle() {\n\t\treturn $this->Name();\n\t}", "public function MenuCurrentItem() {\n return $this->MainMenu()->find('Code', 'KapostAdmin');\n }", "public function menu_get_active_menu_names()\n {\n return menu_get_active_menu_names();\n }", "public function menu_get_active_help()\n {\n return menu_get_active_help();\n }", "public function get_name()\n {\n return 'akash-menu';\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "function check_current_menu($page_name, $current_page) {\n\tif ($page_name === $current_page) return \"current\";\n\telse return \"\";\n}", "function wp_get_nav_menu_name($location)\n {\n }", "public function current() {\n\t\t$f = parent::current();\n\t\treturn $f->getBasename();\n\t}", "public function currentRouteName()\n {\n return $this->current() ? $this->current()->getName() : null;\n }", "public function get_name() {\n return 'Alita_nav_menu_element';\n }", "protected function getCurrentDashbaordItem() {\n\t\t\n\t\treturn \"home\";\n\t}", "function mf_get_menu_name($location){\n if(!has_nav_menu($location)) return false;\n $menus = get_nav_menu_locations();\n $menu_title = wp_get_nav_menu_object($menus[$location])->name;\n return $menu_title;\n}", "public function getActiveMenuEntry()\n {\n return $this->activeMenuEntry;\n }", "public static function getMenu()\n\t{\n\t\treturn self::$menu;\n\t}", "function getMenu()\n {\n return $this->getAttribute(\"menu\");\n }", "public function getMenuTitle(): string;", "public function current_title()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" current_title ?\");\n\t}", "public static function getMenu()\n {\n $svalue = SessionManager::get(self::SESSION_NAME);\n return $svalue ? unserialize($svalue) : self::$menu;\n }", "public function getActive() {\n\t\tif ($this->_active === null) {\n\t\t\tif ($menu = $this->app->system->application->getMenu('site') and $menu instanceof JMenu) {\n\t\t\t\t$this->_active = $menu->getActive();\n\t\t\t}\n\t\t}\n\t\treturn $this->_active;\n\t}", "private function currentlyActiveTab(): string\n {\n static $activeTab;\n if ($activeTab === null) {\n $tab = (string)$this->request->bodyValue(self::QUERY_ARG_TAB, INPUT_GET);\n $activeTab = $tab && array_key_exists($tab, $this->tabs)\n ? $tab\n : key($this->tabs);\n }\n\n return $activeTab;\n }", "protected function getTopmenuActiveItem() {\n return 0;\n }", "public function menu()\n {\n return $this->menu;\n }", "public function menu()\n {\n return $this->menu;\n }", "function ActiveMenu($requestUri)\n{\n $current_file_name = basename($_SERVER['REQUEST_URI'], \".php\");\n\n if ($current_file_name == $requestUri)\n echo 'class=\"active\"';\n}", "function isCurrent($pageName){\n\tglobal $NAV_PAGE;\n\t//If the global matches the argument set as current\n\tif ($NAV_PAGE == $pageName){\n\t\techo \"currentNavItem\";\n\t}\n}", "static function getUserMenu()\r\n {\r\n if(isset($_SESSION[Session::MENU]))\r\n return $_SESSION[Session::MENU];\r\n else return null;\r\n }", "public function getMenu();", "static function get_nav_menu_name( $location ) {\n\t\t$locations = get_nav_menu_locations();\n\t\t$menu_id = $locations[ $location ];\n\n\t\t$nav_menu = wp_get_nav_menu_object( $menu_id );\n\t\treturn $nav_menu->name;\n\t}", "function getMenuSubTitle();", "function activate_menu($controller) {\n $CI = get_instance();\n // Getting router class to active.\n $class = $CI->router->fetch_class();\n return ($class == $controller) ? 'active' : '';\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "public function getMenuLabel(): ?string;", "function get_current_list_name ()\r\n {\r\n return $_SESSION[\"current_list_name\"];\r\n }", "public function getCurrent()\n {\n if ($this->currentCache !== null) {\n return $this->currentCache;\n }\n /* @var $active MenuItem */\n $active = null;\n do {\n /* @var MenuItem[] $children */\n $children = $this->getChildren($active);\n $foundActiveChild = false;\n foreach ($children as $child) {\n if ($child->getActive()) {\n $foundActiveChild = true;\n $active = $child;\n\n break;\n }\n }\n } while ($foundActiveChild);\n $this->currentCache = $active;\n\n return $active;\n }", "public function get_title()\n {\n return __('Primary Menu', 'akash-hp');\n }", "public function menu_get_active_breadcrumb()\n {\n return menu_get_active_breadcrumb();\n }", "public function getMenuOn( ) {\n return $this->menu;\n }", "public function getHeaderMenu($active='') {\n return htcms_get_header_menu($active);\n }", "public function get_title() {\n return esc_html__( 'Nav menu', 'Alita-extensions' );\n }", "public function getLiActiveClass(): string;", "private function _get_nav_text($navitem_name,$active_page)\n {\n $navitem_name = trim(preg_replace('/\\s+/',' ',$navitem_name));# Remove extra whitespace\n $navitem_name = str_replace(' ','_',$navitem_name);# Replace spaces with undescores\n $navitem_name = strtolower($navitem_name);\n \n // * 'Home page ' would now be 'home_page' (CI view naming convention)\n\n $active_page = strtolower($active_page);\n\n return ($navitem_name == $active_page) ? 'active' : '';\n }", "public function getMenu()\n\t{\n\t\treturn $this->menu;\n\t}", "function get_active_page() {\n $basename = basename( $_SERVER['PHP_SELF'], \".php\" );\n\n if ( $basename == 'index') {\n $basename = 'home';\n }\n\n return $basename;\n}", "public function get_menu()\n\t{\n\t\treturn $this->get_session('admin_menu_html');\n\t}", "public function getId()\n\t{\n\t\treturn $this->get(self::$menuId);\n\t}", "function is_sidebar_menu_active($current)\n{\n $CI =& get_instance();\n if ($CI->uri->segment(1) == $current) {\n return 'active';\n }\n return '';\n}", "public static function label()\n {\n return __('Menus');\n }", "public function menu_main_menu()\n {\n return menu_main_menu();\n }", "function get_menu_name($menu_id)\n\t\t\t {\n\t\t\t \n\t\t\t \t$this->db->select('*');\n\t\t\t\t\t\n\t\t\t\t$this->db->where('id',$menu_id);\n\n\t\t\t\t$query\t=\t\t$this->db->get('oxm_menu');\n\t\t\t\t\n\t\t\t\t$temp=$query->row();\n\t\t\t\t\n\t\t\t\treturn $temp->menu_name;\n\t\t\t\t\n\t\t\t}", "public function getMenu() {\n\t\treturn $this->menu;\n\t}", "public static function currentRouteName()\n {\n $uri = explode('?', $_SERVER['REQUEST_URI'])[0];\n\n foreach (self::$routes as $key => $val) \n {\n if ($uri === $val['url']) \n {\n return $key;\n }\n }\n }", "public function get_menu()\r\n {\r\n return '';\r\n }", "protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }", "protected function filename()\n {\n return 'menu_' . time();\n }", "public abstract function getPrevMenu();", "public function getBuyableName($options = null)\n {\n return $this->menu_name;\n }", "public function getMenu( string $name )\n {\n return (isset($this->menus[$name])) ? $this->menus[$name] : null;\n }", "public function menu_get_active_trail()\n {\n return menu_get_active_trail();\n }", "public function activate_menu_item($name)\n\t{\n\t\t$this->_active_item = $name;\n\t}", "public function getCurrentContext()\n\t{\n\t\treturn $this->context_name;\n\t}", "function get_menu_items($title) {\n\t$items['home.php'] = \"Home\";\n\t$items['play_trivia.php'] = \"Play Trivia\";\n\t$items['view_leaders.php'] = \"View Leader Board\";\n\t$items['rank_question.php'] = \"Rank Questions\";\n\t$items['insert_question.php'] = \"Insert Question\";\n\t\n\tif ($_SESSION['admin']) {\t\n\t\t$items['insert_user.php'] = \"Delete User\";\n\t\t$items['delete_question.php'] = \"Delete Question\";\n\t}\t\t\n\t$items['logout.php'] = \"Logout\";\n\t\t\n\tforeach ($items as $key=>$value) {\n\t\t$active = '';\n\t\tif ($value==$title) $active = \"active\";\n\t\t$menu_items .= '\n\t\t <li class=\"nav-item\">\n\t\t <a class=\"nav-link '.$active.'\" href=\"'.$key.'\">'.$value.'</a>\n\t\t </li>\n\t\t';\n\t}\n\treturn $menu_items;\n}", "public static function current() {\r\n $help_name = strtolower(str_replace('HW_HELP_','', get_called_class()));\r\n return self::get($help_name)->plugin_help;\r\n }", "public static function get_current_name_space()\n\t{\n\t\treturn self::$s_name_space;\n\t}", "public function menu_label()\n\t{\n\t\t$label = $this->p('menu_label')->text();\n\t\t$label = $this->render($label);\n\n\t\tif ( ! $label && $p = $this->p('title') ) {\n\t\t\t$label = $p->text();\n\t\t}\n\n\t\tif ( ! $label && $p = $this->p('name') ) {\n\t\t\t$label = $p->text();\n\t\t}\n\n\t\treturn $label;\n\t}", "public function getParentMenuItem() {}", "public function getName()\n {\n return $this->getLocales()[$this->getCurrent()]->name;\n }", "function get_menu_name_by_location( $location ) {\n\t$locations = get_nav_menu_locations();\n\n\t$menu = isset( $locations[ $location ] ) ? wp_get_nav_menu_object( $locations[ $location ] ) : '';\n\n\treturn $menu->name ?? '';\n}", "function _title()\n {\n return _(\"Menu\");\n }", "function roots_cpt_active_menu($menu) {\n if ('base_service' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-services', 'menu-services active', $menu);\n }\n if ('base_portfolio' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-portfolio', 'menu-portfolio active', $menu);\n }\n return $menu;\n}", "public function getName()\n {\n return 'login_nav_bar';\n }", "protected function getName()\r\n {\r\n return app::values()->page();\r\n }", "public function getMenuSlug(): string;", "public function getDefaultMenu()\n\t{\n\t\treturn 'base';\n\t}", "function activeLink($name=null,$tree=false)\n {\n\n\n\n if ( $tree and $name == 'setup' )\n {\n\n $setupArray = ['client-types','resources','teams','costs'];\n\n if ( in_array(request()->segment(1) ,$setupArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( $tree and $name == 'reports' )\n {\n $reportArray = ['opportunity-report','activity-report','proposal-report','invoice-report'];\n\n if ( in_array(request()->segment(1) ,$reportArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( !is_null($name) and request()->segment(1) == $name )\n {\n if ( $tree )\n {\n return 'current-page';\n }\n\n return 'active selected';\n }\n\n\n }", "public function current(): string\n {\n return parent::current();\n }", "function current_to_active($text)\n{\n $replace = array(\n //List of menu item classes that should be changed to \"active\"\n 'current-menu-item' => 'active',\n 'current_page_parent' => 'active',\n 'current_page_ancestor' => 'active',\n 'current_page_item' => 'active',\n );\n $text = str_replace(array_keys($replace), $replace, $text);\n return $text;\n}", "public function getSource()\n {\n return 'wx_menu';\n }", "function showMenu()\n {\n $menu = config('app.menu') ;\n\n $text = '' ;\n \n\n foreach ($menu as $name => $item)\n {\n $active = false ;\n \n if(isset($item['dropdown']))\n {\n $text .= '<li class=\"dropdown menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> '. PHP_EOL;\n }\n else \n {\n $text .= '<li class=\"menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($item['action']) ? route($item['action']) : '' ).'\">' . PHP_EOL;\n }\n\n $text .= '<i class=\"'. $item['icon'] .'\"></i>'. PHP_EOL;\n $text .= '<span>'. $item['title'] .'</span>'. PHP_EOL;\n \n if(isset($item['dropdown']))\n {\n $text .= '<b class=\"caret\"></b>';\n $text .= '</a>'. PHP_EOL;\n $text .= '<ul class=\"dropdown-menu\">' ;\n foreach ($item['dropdown'] as $subName => $subItem) \n {\n $text .= '<li>' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($subItem['action']) ? route($subItem['action']) : '' ).'\">' . PHP_EOL;\n $text .= '<span>'. $subItem['title'] .'</span>'. PHP_EOL;\n $text .= '</a>'. PHP_EOL; \n $text .= '</li>'. PHP_EOL;\n\n $active = (!$active && isset($subItem['action'])) \n ? $subItem['action'] == Request::route()->getName() : $active ; \n }\n $text .= '</ul>' ;\n }\n else \n {\n $text .= '</a>'. PHP_EOL;\n $active = (!$active && isset($item['action'])) \n ? $item['action'] == Request::route()->getName() : $active ;\n }\n\n $text .= '</li>'. PHP_EOL;\n\n if($active)\n {\n $text = str_replace('menu-'. $name , 'active', $text);\n }\n }\n\n return $text ;\n }", "function active_menu($controller) {\n\t\t$CI =& get_instance();\n\n\t\t$query = $CI->db->query(\"\n\t\t\tSELECT *\n\t\t\tFROM \tmenu\n\t\t\tWHERE\n\t\t\t\t\tcontroller = '$controller'\n\t\t\");\n\t\t$active_menu = array();\n\t\tif ($query->num_rows()) {\n\t\t\t$active_menu = $query->row_array();\n\t\t}\n\t\treturn $active_menu;\n\t}", "static public function getMenu() {\n $query = mysql_query(\"SELECT `menu` FROM `info` WHERE `id` = '0'\");\n return mysql_result($query, 0, 'menu');\n }", "function active_menu()\n{\n $CI =& get_instance();\n\n $class = '';\n if($CI->router->fetch_class() == 'blog') {\n $class = 'class=\"navbar-item-active\"';\n }\n return $class;\n}", "public function get()\r\n {\r\n return $this->current() ? $this->current()->name : '';\r\n }", "public function getDefaultTitle()\n {\n if ($this->getMenu()) {\n return $this->getMenu()->getName();\n }\n\n return __('Menu');\n }", "public function prefsMenu()\n {\n return Beatnik::getMenu();\n }", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "public static function singularLabel()\n {\n return __('Menu');\n }", "public function dokan_get_bookings_menu_title( $current_page ) {\n $menus = apply_filters( 'dokan_booking_menu', '' );\n\n foreach ( $menus as $key => $value ) {\n // @codingStandardsIgnoreLine\n if ( $current_page == $key ) {\n $title = $value['title'];\n }\n }\n return $title;\n }", "public static function getCurrentMacroName()\n {\n return static::$currentMacroName;\n }", "public function getCurrentRoute(){\n\n\t\t$route = $this->getRouter()->match();\n\t\tif($route){\n\t\t\treturn $route['name'];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function get_active_nav($value)\n{\n\treturn ($value === TRUE) ? 'active' : '';\n}", "public function navigableIn()\n {\n return Navigable::MENU_TOOLS;\n }" ]
[ "0.8192552", "0.7741272", "0.74787724", "0.7426227", "0.7187578", "0.70964164", "0.70712155", "0.70094985", "0.69799507", "0.69750637", "0.6937813", "0.6934306", "0.69078887", "0.676227", "0.67540586", "0.6704641", "0.66280884", "0.66134053", "0.65600723", "0.6549534", "0.6538188", "0.65249103", "0.64969534", "0.6456348", "0.6439468", "0.6399117", "0.6396449", "0.63707995", "0.6365093", "0.63595414", "0.63595414", "0.6334728", "0.63285947", "0.6328225", "0.6324429", "0.6304108", "0.6254819", "0.62231684", "0.62188905", "0.62188905", "0.61935073", "0.6190927", "0.6186866", "0.61855066", "0.61722815", "0.61703616", "0.6159797", "0.61451614", "0.61295855", "0.6119559", "0.6114422", "0.6113685", "0.6110099", "0.6092622", "0.60865563", "0.60645586", "0.60599387", "0.60453933", "0.6044294", "0.60276544", "0.6027188", "0.60262585", "0.6025324", "0.60157585", "0.60155475", "0.59932745", "0.5992443", "0.5988244", "0.59857875", "0.59709656", "0.5965518", "0.59601676", "0.5958098", "0.595777", "0.5949044", "0.59440327", "0.59409165", "0.59371674", "0.59368235", "0.59334564", "0.59321016", "0.5916885", "0.5916658", "0.5899905", "0.58974", "0.58972937", "0.58960503", "0.5891467", "0.58867544", "0.58712953", "0.58530664", "0.5836491", "0.58334315", "0.58230704", "0.580755", "0.5803197", "0.58011717", "0.5800943", "0.5796177", "0.5792926" ]
0.844474
0
get menu tree output
public function getTreeOutput(){ if(!$this->treeoutput) $this->setTreeOutput(); return $this->treeoutput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getMenuTree();", "private function setTreeOutput(){\n \n $item = $this->item;\n \n $treeoutput = NULL;\n $menuname = NULL;\n $parameters = NULL;\n \n $menutree = \\Drupal::menuTree();\n \n if($item->menu_name == 'active-menu'){\n \n $menuname = $this->getCurrentMenuName();\n \n if($menuname)\n $parameters = $menutree->getCurrentRouteMenuTreeParameters($menuname);\n \n }else{\n $parameters = new MenuTreeParameters();\n $parameters->root = $item->menu_plid;\n $menuname = $item->menu_name;\n }\n \n \n if($parameters && $menuname){\n \n $parameters->setMaxDepth($item->menu_level);\n\n $tree = $menutree->load($menuname, $parameters);\n $treeoutput = $menutree->build($tree);\n \n }\n \n $this->treeoutput = $treeoutput;\n }", "public function menu_tree_output($tree)\n {\n return menu_tree_output($tree);\n }", "function v2_mumm_menu_tree__menu_doormat(&$variables) {\n return $variables['tree'];\n}", "function susy_menu_tree__main_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "function minorite_menu_tree($variables) {\n return '<ul class=\"nav meganav\">' . $variables['tree'] . '</ul>';\n}", "function show_tree(){\n\t\t\t\t\tswitch(LINK_TYPE){\n\t\t\t\t\t\tcase \"static\":\n\t\t\t\t\t\t\treturn $this->show_tree_static();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"burc\":\n\t\t\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn $this->show_tree_dynamic();\n\t\t\t\t\t}\n\t\t\t\t}", "function soho_menu_tree__header_menu($variables){\n return '<ul class=\"menu\" id=\"menu-main-menu\">' . $variables['tree'] . '</ul>';\n \n}", "protected function printTestTree(): void\n {\n echo ' Menu Structure '.\"\\n\";\n echo ' rt '.\"\\n\";\n echo ' / \\ '.\"\\n\";\n echo ' pt1 pt2 '.\"\\n\";\n echo ' / | \\ | '.\"\\n\";\n echo ' ch1 ch2 ch3 ch4 '.\"\\n\";\n echo ' | '.\"\\n\";\n echo ' gc1 '.\"\\n\";\n }", "function tree_browser() {\n\t $cat = GetReq('cat'); \n\t \n\t if ($this->notreebrowser)\n\t return null;\n\t \n\t $out = $this->show_submenu('klist',1,null,null,1); //submenu only\n\t \n\t return ($out);\n\t \n\t}", "function printrightMenu($tree,$level=0) {\n\tif(!is_null($tree) && count($tree) > 0) {\n\tif($level==0){\n\techo '<ul class=\"dropdown-menu rightClickMenu\">';\n\t}\n\t\tforeach($tree as $node) {\n\t\techo \"\\n\";\n\t\t\t// Top level\n\t\t\tif ( empty($node['children']) ) {\n\t\t\t\tif ( !empty($node['value']['menu_type']) AND ($node['value']['menu_type']== \"inlineForm\") ) {\n\t\t\t\t\techo '<li><a class=\"trigger right-caret '.$node['value']['action_type'].' '.$node['value']['icon'].' '.$node['value']['menu_type'].' '.$node['value']['action_type'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\"><li>'. $node['value']['custom'] . '</li></ul></li>';\n\t\t\t\t}else{\n\t\t\t\techo '<li><a class=\"iconItemSelection '.$node['value']['action_type'].' '.$node['value']['icon'].' MenuActionItem '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" type=\"button\" data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>'. (!empty($node[\"value\"][\"code\"]) ? '<span data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" style=\"position:absolute; right:15px; top:9px; text-size=16px;\" class=\"addKeyframeMenu fa fa-plus-square-o fa-lg pull-right\"></span>' : ''). '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !empty($node['children']) AND !empty($node['children']['0']['children'] )) {\n\t\t\t\techo '<li class=\"dropdown-submenu\">\n\t\t\t\t<a class=\"trigger right-caret '.$node['value']['icon'].' '.$node['value']['action_type'].' '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\">';\n\t\t\t}\n\t\t\tif ( !empty($node['children']) AND empty($node['children']['0']['children']) ) {\n\t\t\t\techo '<li class=\"dropdown-submenu\">\n\t\t\t\t<a class=\"trigger right-caret '.$node['value']['action_type'].' '.$node['value']['icon'].' '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\" style=\"max-height:400px;overflow:auto;\">';\n\t\t\t}\n\t\t\tprintrightMenu($node['children'], $level+1);\n\t\t\tif (!empty($node['children']) ) {echo '</li></ul>';}\n\t\t} // end foreach\n\t} // end if\n\tif($level==0){\n\techo '<div class=\"currentAnimations\"></div>';\n\t}\n}", "public function menu_tree($menu_name)\n {\n return menu_tree($menu_name);\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "function get_menu_tree($parent_id) \n\t\t{\n\t\t\tinclude_once('connection.php');\n \t$obj=new connection();\n \t$obj->connect();\n\t\t\t$menu='';\n\t\t\t$obj->sql=\"SELECT * FROM register where referral_code='\".$parent_id.\"'\";\n\t\t\t$obj->select($obj->sql);\n\t\t\t//$no1=mysqli_num_rows($obj->res);\n\t\t\twhile($rows1=mysqli_fetch_array($obj->res))\n\t\t\t{\n\t\t\t\t//$rows1=mysqli_fetch_array($obj->res);\n\t\t\t\t$menu.=\"<li>\". $rows1['name'];\n\t\t\t\t$menu.=\"<ul>\".get_menu_tree($rows1['rid']).\"</ul>\";\n\t\t\t\t$menu.=\"</li>\";\n\t\t\t}\n\t\t\treturn $menu;\n\t\t}", "public function renderMenu()\n {\n echo \"<ul class=\\\"sidebar-menu\\\">\\n\";\n foreach ($this->_menus as $menu) {\n if (count($menu->subMenu()) == 0) {\n echo \"<li \".$this->is_li_class_active($menu->getLinks()).\">\\n\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \"<i class=\\\"\".$menu->getIcon().\"\\\"></i> <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \"</a>\\n\";\n echo \"</li>\\n\";\n } else {// we are in the case of a treeview\n echo \"<li class=\\\"treeview\".$this->is_treeview_Opened($menu->getLinks()).\"\\\">\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \" <i class=\\\"\".$menu->getIcon().\"\\\"></i>\\n\";\n echo \" <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \" <i class=\\\"fa fa-angle-left pull-right\\\"></i>\\n\";\n if (count($menu->getBadges()) > 0) {\n foreach ($menu->getBadges() as $badge) {\n if ($badge['id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" id=\\\"\".$badge['id'].\"\\\">\".$badge['value'].\"</small>\\n\";\n } else if ($badge['data-id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" data-id=\\\"\".$badge['data-id'].\"\\\">\".$badge['value'].\"</small>\\n\"; \n } else {\n echo \"<small class=\\\"\".$badge['class'].\"\\\">\".$badge['value'].\"</small>\\n\";\n }\n }\n }\n echo \"</a>\\n\";\n echo \"<ul \".$this->is_treeview_menu_open($menu->getLinks()).\">\\n\";\n $this->addSubMenu($menu->subMenu());\n echo \"</ul>\\n\";\n echo \"</li>\\n\";\n } \n }\n echo \"</ul>\\n\";\n }", "function v2_mumm_menu_tree__menu_header(&$variables) {\n return $variables['tree'];\n}", "function latto_menu_tree__menu_block__1($vars) { \n return '<ul class=\"main-menu nav nav-inline\">' . $vars['tree'] . '</ul>';\n}", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "public function getMenu();", "public function buildMenuTree()\n {\n $menu = new Menu\\Menu('menuTree');\n\n // Top level.\n $this->p1 = $menu->addItem(new Menu\\Item('p.1'));\n $this->p2 = $menu->addItem(new Menu\\Item('p.2'));\n\n // First level (p1).\n $this->c11 = $this->p1->addChild(new Menu\\Item('c.1.1'));\n $this->c12 = $this->p1->addChild(new Menu\\Item('c.1.2'));\n\n // First level (p2).\n $this->c21 = $this->p2->addChild(new Menu\\Item('c.2.1'));\n $this->c22 = $this->p2->addChild(new Menu\\Item('c.2.2'));\n $this->c23 = $this->p2->addChild(new Menu\\Item('c.2.3'));\n\n // Second level (c.1.1).\n $this->c111 = $this->c11->addChild(new Menu\\Item('c.1.1'));\n }", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function v2_mumm_menu_tree__menu_new_main_menu(&$variables) {\n return '<ul>' . $variables['tree'] . '</ul>';\n}", "public function getTreeHtml()\n {\n if ($this->getMenu()) {\n return $this->_getTreeHtmlLevel(0, $this->getMenu()->getMenuTreeObjects());\n }\n\n return '';\n }", "public function getTree() {\n\t\t// Affichage de la page\n\t\t$html = '<div id=\"tal_box\">';\n\t\t$html .= '<p>You can still use <span id=\"skillPoints\">23</span> points.</p>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div id=\"tal_linkBox\">';\n\t\t$html .= '<button onClick=\"createLink()\">Create a link</button>';\n\t\t$html .= '<p id=\"tal_buildLink\"></p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "function soho_menu_tree__header_menu_below($variables){\n return '<ul class=\"sub-menu\">' . $variables['tree'] . '</ul>';\n}", "protected function generateModuleMenu() {}", "function renderTree($arvore) {\n $lastLevel = 0;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore->fetchTree() as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "function get_menu($kode_menu, $level){\n $sql = 'SELECT user_menu.* FROM `user_akses` INNER JOIN `user_level` ON (`user_akses`.`level` = `user_level`.`level`) \n INNER JOIN `user_menu` ON (`user_akses`.`kode_menu` = `user_menu`.`kode_menu`) WHERE user_akses.`level`=\"'.$level.'\" \n GROUP BY `user_menu`.`parent` ORDER BY user_menu.`parent` ASC';\n $result=$this->db->query($sql);\n $parent_kode_menu = $this->get_parent_menu($kode_menu);\n \n $menu = '';\n \n if($result->num_rows()>0){\n foreach ($result->result() as $temp){\n if(empty($temp->parent)){\n $parent = $this->get_menu_detail($temp->kode_menu)->row();\n \n $parent_active='';\n if($parent->kode_menu==$parent_kode_menu){\n \t\t\t\t\t$parent_active=' active ';\n \t\t\t\t}\n }else{\n $parent = $this->get_menu_detail($temp->parent)->row();\n \n $parent_active='';\n if($parent->kode_menu==$parent_kode_menu){\n \t\t\t\t\t$parent_active=' active ';\n \t\t\t\t}\n }\n \n $sql_child = 'SELECT user_menu.* FROM `user_akses` INNER JOIN `user_level` ON (`user_akses`.`level` = `user_level`.`level`) \n INNER JOIN `user_menu` ON (`user_akses`.`kode_menu` = `user_menu`.`kode_menu`) WHERE user_akses.`level`=\"'.$level.'\" \n AND user_menu.`tipe`=1 AND user_menu.parent=\"'.$parent->kode_menu.'\" ORDER BY user_menu.`urutan` ASC';\n $result_child = $this->db->query($sql_child);\n \n $menu_child = '';\n $menu_child_count = 0;\n if($result_child->num_rows()>0){\n $menu_child = $menu_child.'<ul class=\"treeview-menu\">';\n foreach ($result_child->result() as $child){\n $child_active='';\n if($kode_menu==$child->kode_menu){\n $child_active='active';\n }\n $menu_child = $menu_child.'\n <li class=\"'.$child_active.'\"><a href=\"'.site_url().'/'.$child->url.'\"><i class=\"fa fa-circle-o\"></i> '.$child->nama_menu.'</a></li>\n ';\n \n $menu_child_count++;\n }\n $menu_child = $menu_child.'</ul>';\n }\n \n $menu = $menu.'\n <li class=\"treeview '.$parent_active.'\">\n <a href=\"'.site_url().'/'.$parent->url.'\">\n \t\t\t\t\t<i class=\"'.$parent->icon.'\"></i>\n \t\t\t\t\t<span>'.$parent->nama_menu.'</span>';\n if($menu_child_count>0){\n $menu = $menu.'<i class=\"fa fa-angle-left pull-right\"></i>';\n }\n \n $menu = $menu.'</a>';\n \n $menu = $menu.'\n '.$menu_child;\n \n $menu = $menu.'</li>';\n }\n }\n \n return $menu;\n }", "function createMenu($data, $htmlOptions = array()) {\r\n $this->htmlTree .= Html::beginTag('ul', $htmlOptions);\r\n foreach ($data as $item) {\r\n $this->htmlTree .= Html::beginTag('li') . Html::a($item['title'], $item['url']);\r\n if (isset($item['children']) AND !empty($item['children']))\r\n $this->createMenu($item['children']);\r\n $this->htmlTree .= Html::endTag('li');\r\n }\r\n $this->htmlTree .= Html::endTag('ul');\r\n return $this->htmlTree;\r\n }", "function menu() {\n\t\tob_start();\n\t\tinclude('templates/menu.php');\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}", "function cms_frontend_menu_tree__menu_front_end_footer_menu(&$variables) {\n return '<ul class=\"menu nav\">' . $variables['tree'] . '</ul>';\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n $indent = str_repeat(\"\\t\", $depth);\n $output .= \"\\n$indent<ul class=\\\"vertical menu\\\" data-submenu>\\n\";\n }", "public function menustoreAction() {\n $panel_pages = array();\n $menut = Model_Menu::getInstance();\n $panel_names = $menut->panels();\n $pages = array();\n // at this point have selected all the menus of all active modules\n // return a tree of pages from each top level page sorted by sort_by and label\n foreach($panel_names as $panel):\n $panel_data = array('id' => $panel, 'label' => ucwords(str_replace('_', ' ', $panel)),\n 'children' => array());\n foreach($menut->find(array('panel' => $panel, 'parent' => 0), 'sort_by') as $menu):\n $panel_data['children'][] = $menu->pages_tree();\n endforeach;\n $pages[] = $panel_data;\n endforeach;\n $this->view->data = new Zend_Dojo_Data('id', $pages, 'label');\n $this->_helper->layout->disableLayout();\n }", "public function getmenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n 'Page.is_menu' => 1,\n 'Page.is_active' => 1\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t 'Page.is_menu' => 1,\n\t 'Page.is_active' => 1\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "function susy_menu_tree__secondary_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t$output .= \"\\n$indent<ul class=\\\"vertical menu\\\" data-submenu>\\n\";\n\t}", "function renderTreeOrgaos($arvore) {\n $lastLevel = 1;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "public function tree()\n {\n// try {\n $root = $this->model->root();\n if ($root) {\n $items = $root->getDescendants();\n }\n\n $items = $this->recursiveNestable($items->toArray(), $root->id);\n\n return view('admin.menus.tree', compact('items', 'root'))->with('parentId', $root->id);\n// } catch (Exception $e) {\n// return $this->returnWithError($e->getMessage());\n// }\n }", "function _gwt_drupal_mega_menu_formatted(){\n // dependent on gwt_drupal_helper module\n if(!module_exists('gwt_drupal_helper')){\n return;\n }\n $output = '';\n \n $mega_menu = gwt_drupal_mega_menu_load_all();\n // $output .= '<pre>'.print_r($mega_menu, 1).'</pre>';\n // print_r($mega_menu);\n // $output .= '<div id=\"nav-megamenu\">';\n foreach($mega_menu as $mlid => $item){\n $attr = array();\n // TODO: load the node content\n // TODO: also load sub menu for loading of sub mega menu\n $nid = $item->nid;\n $mlid = $item->mlid;\n // $menu_link = menu_link_load($mlid);\n // $output .= '<pre>'.print_r($menu_link, 1).'</pre>';\n // $sub_items = menu_tree_all_data('main-menu', $menu_link, 2);\n\n $node = node_load($nid);\n $node_view = node_view($node);\n\n $node_view['#theme'] = 'mega_menu';\n // drupal_render($node_view['#node']->title);\n\n $rendered_node = drupal_render($node_view);\n $attr['class'] = array(\n 'mega-menu-item',\n 'mega-menu-item-'.$mlid,\n 'row',\n 'fullwidth',\n 'collapse',\n );\n $attr['data-menu-item'] = $mlid;\n\n $output .= \"<div \".drupal_attributes($attr).\">\\n\";\n if(!empty($item->children)){\n $mega_menu_sub_items = \"\";\n $mega_menu_sub_items .= \"<li class=\\\"tab-title active\\\">\";\n $mega_menu_sub_items .= '<a href=\"#mega-menu-item-'.$mlid.'\" data-tab-link=\"'.$mlid.'\">'.$node_view['#node']->title.'</a>';\n $mega_menu_sub_items .= \"</li>\\n\";\n \n $mega_menu_sub_items_content = '';\n $mega_menu_sub_items_content .= \"<div class=\\\"mega-sub-content active\\\" id=\\\"mega-menu-item-\".$mlid.\"\\\" data-tab-item=\\\"\".$mlid.\"\\\">\\n\";\n $mega_menu_sub_items_content .= '<h3 class=\"mega-menu-title\">'.$node_view['#node']->title.'</h3>';\n $mega_menu_sub_items_content .= $rendered_node;\n $mega_menu_sub_items_content .= \"</div>\\n\";\n\n $output .= \"<div class=\\\"mega-sub-menu large-3 columns\\\">\\n\";\n $output .= \"<h3 class=\\\"mega-menu-title\\\">\".$node_view['#node']->title.'</h3>';\n foreach($item->children as $child_mlid => $child_item){\n $child_nid = $child_item->nid;\n $child_node = node_load($child_nid);\n $child_node_view = node_view($child_node);\n $child_node_view['#theme'] = 'mega_menu';\n $child_rendered_node = drupal_render($child_node_view);\n\n $mega_menu_sub_items .= '<li class=\"tab-title\">';\n $mega_menu_sub_items .= '<a href=\"#mega-menu-item-'.$child_mlid.'\" data-tab-link=\"'.$child_mlid.'\">'.$child_node_view['#node']->title.'</a>';\n $mega_menu_sub_items .= \"</li>\\n\";\n\n $mega_menu_sub_items_content .= \"<div class=\\\"mega-sub-content\\\" id=\\\"mega-menu-item-\".$child_mlid.\"\\\" data-tab-item=\\\"\".$child_mlid.\"\\\">\\n\";\n $mega_menu_sub_items_content .= '<h3 class=\"mega-menu-title\">'.$child_node_view['#node']->title.'</h3>';\n $mega_menu_sub_items_content .= $child_rendered_node;\n $mega_menu_sub_items_content .= \"</div>\\n\";\n }\n $output .= \"<ul class=\\\"mega-sub-items tabs\\\" data-tab>\\n\";\n $output .= $mega_menu_sub_items;\n $output .= \"</ul>\\n\";\n $output .= \"</div>\\n\";\n\n $output .= \"<div class=\\\"mega-sub-contents large-9 columns\\\">\\n\";\n $output .= $mega_menu_sub_items_content;\n $output .= \"</div>\\n\";\n }\n else{\n $output .= \"<div class=\\\"mega-menu-contents row\\\">\\n\";\n $output .= \"<h2 class=\\\"mega-menu-title\\\">\".$node_view['#node']->title.\"</h2>\\n\";\n $output .= $rendered_node;\n $output .= \"</div>\\n\";\n }\n\n $output .= \"</div>\\n\";\n }\n // $output .= \"</div>\\n\";\n return $output;\n}", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "public function menu()\n\t{\n\t\t$this->db->order_by(\"urutan\",\"asc\");\n\t\t$hasil = $this->db->get_where(\"mainmenu\",array(\"aktif\"=>\"Y\"));\n\t\t$output = new myObject();\n\t\tif($hasil->num_rows() > 0){\n\t\t\t$data = $hasil->result();\n\t\t\t$menu = array();\n\t\t\tforeach ($data as $item) {\n\t\t\t\t$row = array();\n\t\t\t\t$row =$item;\n\t\t\t\t$row->submenu = $this->submenu($item->id_main);\n\t\t\t\t$menu[] = $row;\n\t\t\t}\n\t\t\t$output->data = $menu;\n\t\t\t$output->status = true;\n\t\t}else{\n\t\t\t$output->status = false;\n\t\t}\n\t\treturn $output;\n\t}", "function cms_frontend_menu_tree__menu_frontend_main_menu(&$variables) {\n return '<div class=\"container\"><ul class=\"global-menu menu nav navbar-nav\">' . $variables['tree'] . '</ul></div>';\n}", "public function run()\n {\n $menus = [\n\n /*\n * Admin\n */\n [\n 'name' => 'Заявки и запросы',\n 'link' => '/admin/',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Заявки OSS',\n 'link' => '/admin/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Запросы SIB',\n 'link' => '/admin/be-partner-requests',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Пользователи',\n 'link' => '/admin/users',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/admin/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Абонементы',\n 'link' => '/admin/oss/subscriptions',\n 'icon' => 'fa fa-fw fa-ticket',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Смена куратора',\n 'link' => '/admin/oss/change-curator',\n 'icon' => 'fa fa-lg fa-fw fa-refresh',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Новости',\n 'link' => '/admin/oss/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/admin/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/admin/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'SIB',\n 'link' => '/admin/sib',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/admin/sib/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/admin/sib/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/admin/sib/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Документация',\n 'link' => '/admin/sib/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Отчеты',\n 'link' => '/admin/reports',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Финансовая аналитика',\n 'link' => '/admin/reports/financial-analytics',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Рейтинг чеков',\n 'link' => '/admin/reports/check-ratings',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ за период',\n 'link' => '/admin/reports/fc-per-period',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ по фин. периодам',\n 'link' => '/admin/reports/fc-per-fp',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История ББС',\n 'link' => '/admin/reports/bbs-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История выплат',\n 'link' => '/admin/reports/payment-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Баллы по бинару',\n 'link' => '/admin/reports/binary-points',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Настройки',\n 'link' => '/admin/settings',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Журнал',\n 'link' => '/admin/journal',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Тестирование',\n 'link' => '/admin/test',\n 'icon' => 'fa fa-lg fa-fw fa-cogs',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n\n\n /*\n * SIB\n */\n [\n 'name' => 'Финансы',\n 'link' => '/finance',\n 'icon' => 'fa fa-lg fa-fw fa-money',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Активность',\n 'link' => '/finance/activity',\n 'icon' => 'fa fa-lg fa-fw fa-clock-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/finance/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Платежный календарь',\n 'link' => '/finance/payment-calendar',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Лично приглашенные',\n 'link' => '/personal-invited',\n 'icon' => 'fa fa-lg fa-fw fa-share-alt fa-rotate-90',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Классическая схема',\n 'link' => '/classic',\n 'icon' => 'fa fa-lg fa-fw fa-chain',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Я и моя команда',\n 'link' => '/me-and-my-team',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости OSS',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение OSS',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы OSS',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования OSS',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки OSS',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Команда OSS',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк OSS',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Образование',\n 'link' => '/education',\n 'icon' => 'fa fa-lg fa-fw fa-book',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Партнёрское',\n 'link' => '/education/partners',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Школа ERA',\n 'link' => '/education/school-era',\n 'icon' => 'fa fa-lg fa-fw fa-heart-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/info/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/info/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Документы (файлы)',\n 'link' => '/info/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n\n\n /*\n * OSS\n */\n [\n 'name' => 'Новости',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpEra',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Команда',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/oss/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 3,\n 'children' => [\n// [\n// 'name' => 'Документация',\n// 'link' => '/oss/info/documents',\n// 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n// 'cabinet_id' => 3,\n// 'children' => [],\n// ],\n [\n 'name' => 'Контакты',\n 'link' => '/oss/info/contacts',\n 'icon' => 'fa fa-lg fa-fw fa-phone',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n ],\n ],\n\n /*\n * Common\n */\n [\n 'name' => 'Мой профиль',\n 'link' => '/profile',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => null,\n 'children' => [],\n ],\n ];\n\n foreach ($menus as $menu) {\n $this->menuCreate($menu);\n }\n }", "public function getMenus() {}", "protected function createMenu(){\n $menu_name = static::MENU_NAME;\n $menu_tree = \\Drupal::menuTree();\n $parameters = $menu_tree->getCurrentRouteMenuTreeParameters($menu_name);\n \n // if tree is not empty, create the menu\n if ($tree = $menu_tree->load($menu_name, $parameters)){\n $manipulators = [ // Only show links that are accessible for the current user.\n ['callable' => 'menu.default_tree_manipulators:checkAccess'],\n // Use the default sorting of menu links.\n ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],\n ];\n\n $tree = $menu_tree->transform($tree, $manipulators);\n return $menu_tree->build($tree);\n }\n\n // return false if tree is empty\n return false;\n }", "function render_multi_level_menu($menu_source, $start_node, $start_link, $level = 0, $anc_destination)\n {\n \n// if($level==0)DebugBreak();\n \n global $TMS, $_PATH, $REQUEST_ASSOC, $REQUEST_VARS;\n static $branches;\n\n if ($REQUEST_VARS[0] == 'show' && ($level === 0))\n {\n $objid =$this->get_requested_basic_id($anc_destination);\n $this->menu_selected_obj_id=$objid;\n $this->menu_selected_id =$this->_tree->GetAncestor($objid);\n $this->menu_selected_id3 =$this->_tree->GetAncestor($this->menu_selected_id);\n }\n elseif ($REQUEST_VARS[0] == 'showobj' && $objid && ($level === 0))\n {\n $this->menu_selected_obj_id=$objid;\n $this->menu_selected_id =$this->_tree->GetAncestor($objid);\n }\n elseif ($level === 0&&$objid)\n {\n $this->menu_selected_id=$objid;\n }\n\n \n if (!$branches && $objid)\n {\n $this->_tree->BonesMas=null;\n $this->_tree->GetBones($objid, 1);\n $branches= $this->_tree->BonesMas;\n \n }\n \n if (($menu_source) && ($menu_source[$start_node]))\n {\n foreach ($menu_source[$start_node] as $key => $menuitem)\n {\n if ($menuitem['params']['Disable'])\n unset ($menu_source[$start_node][$key]);\n }\n\n $xtr_count=count($menu_source[$start_node]);\n\n $i =0;\n\n foreach ($menu_source[$start_node] as $menuitem)\n {\n $itembasic = $menuitem['basic'];\n\n $menuitem =$this->_common_obj->property_set_to_properties($menuitem['params']['Property_set'],$menuitem,'',true,$this);\n\n if (is_array($menuitem['props']))$menuitem=array_merge($menuitem, $menuitem['props']);\n\n unset ($menuitem['props']);\n\n $menuitem['_num'] =$i++;\n $menuitem['Ancestor']=$start_node;\n\n if ($menuitem['obj_type'] == '_CATGROUP')\n {\n\n $menuitem['subcount']=count($menu_source[$menuitem['id']]);\n }\n\n $rpath =$this->_tree->calculate_r_path($menuitem['id'], $anc_destination, $this->_sel_arr,\n 2);\n $menuitem['Link'] =$start_link . '/' . $rpath;\n\n $menuitem['submenu']='';\n\n \n if (is_array($menu_source[$menuitem['id']]))\n {\n\n $menuitem['submenu']=$this->render_multi_level_menu($menu_source, $menuitem['id'], $start_link,\n $level + 1, $anc_destination);\n }\n\n $selected=false;\n\n if (in_array($menuitem['id'], array\n (\n $this->menu_selected_id,\n $this->menu_selected_obj_id\n )))\n {\n $selected =true;\n $selected_item=$menuitem;\n }\n\n $branch_detected=false;\n\n\n if (!$selected && $branches && in_array($menuitem['id'], $branches))\n {\n \n $branch_detected=true;\n }\n\n if (($menuitem['obj_type'] == '_CATGROUP') && is_array($menu_source[$menuitem['id']])\n && ($TMS->isSectionDefined('_menu_item_nested_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_nested_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_nested_level' . $level);\n $TMS->clear_section_fields('_menu_item_nested_level' . $level);\n }\n elseif ($branch_detected && ($TMS->isSectionDefined('_menu_item_branch_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_branch_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_branch_level' . $level);\n }\n elseif (($i == 1) && ($selected) && ($TMS->isSectionDefined(\n '_menu_item_first_selected_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_first_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_first_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_first_selected_level' . $level);\n }\n elseif (($i == 1) && ($TMS->isSectionDefined('_menu_item_first_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_first_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_first_level' . $level);\n $TMS->clear_section_fields('_menu_item_first_level' . $level);\n }\n elseif (($i == $xtr_count) and ($selected) && ($TMS->isSectionDefined(\n '_menu_item_last_selected_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_last_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_last_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_last_selected_level' . $level);\n }\n elseif ($i == $xtr_count && $TMS->isSectionDefined('_menu_item_last_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_last_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_last_level' . $level);\n $TMS->clear_section_fields('_menu_item_last_level' . $level);\n }\n elseif ($selected && $TMS->isSectionDefined('_menu_item_middle_selected_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_middle_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_middle_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_middle_selected_level' . $level);\n }\n elseif ($TMS->isSectionDefined('_menu_item_middle_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_middle_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_middle_level' . $level);\n $TMS->clear_section_fields('_menu_item_middle_level' . $level);\n }\n\n if ($level == 0)\n {\n $anc_node=$this->menu_ancestor;\n $TMS->AddMassReplace('_menu_main_level' . $level, $anc_node['params']);\n }\n\n if (($this->devide_by_rows) && ($i % (int)$this->devide_by_rows == 0))\n {\n $levnum++;\n $TMS->AddReplace('_menu_main_level' . $level, 'id', $start_node);\n $TMS->AddReplace('_menu_main_level' . $level, 'menu_buff', $menu_buff);\n $TMS->AddReplace('_menu_main_level' . $level, '__divnum', $levnum);\n\n $menu_buff='';\n $menu_dbuff.=$TMS->parseSection('_menu_main_level' . $level);\n $exit_section='_menu_divide_container' . $level;\n $TMS->KillField('_menu_main_level' . $level, 'menu_buff');\n }\n }\n\n if (($this->devide_by_rows) && (($i % (int)$this->devide_by_rows != 0)))\n {\n $levnum++;\n $TMS->AddReplace('_menu_main_level' . $level, 'menu_buff', $menu_buff);\n $TMS->AddReplace('_menu_main_level' . $level, '__divnum', $levnum);\n\n $menu_dbuff.=$TMS->parseSection('_menu_main_level' . $level);\n $exit_section='_menu_divide_container' . $level;\n $menu_buff =$menu_dbuff;\n }\n elseif (!$this->devide_by_rows)\n {\n $exit_section='_menu_main_level' . $level;\n }\n else\n {\n $menu_buff=$menu_dbuff;\n }\n\n $TMS->AddReplace($exit_section, 'menu_buff', $menu_buff);\n\n $TMS->AddReplace('_menu_main_level' . $level, 'id', $start_node);\n $TMS->AddReplace($exit_section, 'ancestor', $this->menu_ancestor['params']['Name']);\n $TMS->AddReplace($exit_section, 'id', $start_node);\n $TMS->AddMassReplace($exit_section, $branch_item);\n\n $main=$TMS->parseSection($exit_section);\n\n $TMS->KillField($exit_section, 'menu_buff');\n\n return $main;\n }\n }", "function minorite_menu_tree__primary($variables) {\n return '<ul class=\"nav\" id=\"nav-primary\">' . $variables['tree'] . '</ul>';\n}", "public function run() {\n $menus = [\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '0',\n 'body' => 'Main Navigation',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '1',\n 'icon' => 'home',\n 'name' => 'dashboard',\n 'uri' => 'admin',\n 'title' => 'Go to Dashboard',\n 'body' => 'Dashboard'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '5.1',\n 'icon' => 'group',\n 'name' => 'user',\n 'uri' => 'admin/user',\n 'title' => 'User Management',\n 'body' => 'Users'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9',\n 'body' => 'Settings',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1',\n 'name' => 'setting',\n 'icon' => 'gear',\n 'uri' => '',\n 'title' => 'Pengaturan Website',\n 'body' => 'Pengaturan',\n 'type' => 'parent'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.2',\n 'name' => 'menu',\n 'icon' => 'bars',\n 'uri' => 'admin/menu',\n 'title' => 'Pengaturan Menu',\n 'body' => 'Menus'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.3',\n 'icon' => 'key',\n 'name' => 'permission',\n 'uri' => 'admin/permission',\n 'title' => 'Roles & Permissions',\n 'body' => 'Permissions'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1-1',\n 'name' => 'setting',\n 'icon' => '',\n 'uri' => 'admin/setting/global/update',\n 'title' => 'Pengaturan Global',\n 'body' => 'Global'\n ]\n ];\n\n for ($i = 0; $i < count($menus); $i++) {\n $menus[$i] = factory(\\App\\Menu::class)->create($menus[$i]);\n }\n\n $menus[0]->roles()->attach(3);\n $menus[1]->roles()->attach(3);\n $menus[2]->roles()->attach(2);\n $menus[3]->roles()->attach(2);\n $menus[4]->roles()->attach(2);\n $menus[5]->roles()->attach(1);\n $menus[6]->roles()->attach(1);\n $menus[7]->roles()->attach(1);\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t\t$output .= \"\\n$indent<ul class=\\\"menu vertical\\\">\\n\";\n\t\t}", "function captogov_childtree($nid,$menu='main-menu') {\n $tree = menu_tree_all_data($menu);\n $mlid = db_select('menu_links' , 'ml')\n ->condition('ml.link_path', 'node/'.$nid)\n ->condition('ml.menu_name', $menu)\n ->fields('ml' , array())\n ->range(0, 1)\n ->execute()\n ->fetchAll();\n $mlidValue = $mlid[0]->mlid;\n $children = check_menu_array($tree, $mlidValue);\n $rendered_teasers = \"\";\n if(isset($children) && gettype($children) == \"array\") {\n foreach($children as $child){\n $nid = str_replace(\"node/\", \"\", drupal_get_normal_path($child['link']['link_path']));\n $child_nodes = node_view(node_load($nid), 'compact');\n $rendered_teasers .= render($child_nodes);\n }\n }\n return $rendered_teasers;\n}", "public function getMenuPermiso() {\n $query = \"\n EXEC SP_GEN_MENU\n @in_id_usuario = '$this->id_usuario',\t \t \n @in_operacion = 'QMU'\n \";\n\n $parametros = array(\n 'query' => $query\n );\n\n $result = ClaseBaseDatos::query($parametros);\n //print_r($result);\n if ($result['error'] == 'N') {\n $tree = array();\n\n $data = $result['data'];\n\n //print_r($data);\n\n foreach ($data as $key => $rows) {\n $leaf = true;\n $expanded = false;\n if ($rows['tipo'] == 'P') {\n $leaf = false;\n }\n\n $arr = array(\n 'id_menu' => $rows['id_menu'],\n 'id_menu_padre' => $rows['id_menu_padre'],\n 'text' => $rows['nombre_menu'],\n //'nombre_menu' => $rows['nombre_menu'],\n 'tipo' => $rows['tipo'],\n 'iconCls' => trim($rows['icono']),\n //'MN_ICONO' => trim($rows['MN_ICONO']),\n //'mn_clase' => trim($rows['mn_clase']),\n 'routerLink' => trim($rows['ruta']),\n 'leaf' => $leaf,\n 'expanded' => $expanded,\n );\n\n if (($rows['tipo'] == 'P')) {\n //$arr = $arr + array('children' => array());\n }\n\n $this->adj_tree($tree, $arr);\n }\n $nodes = $tree[1];\n\n //$nodes = $this->str_replace_once('\"children\"', \"data\", $nodes);\n //$nodes = str_replace(\"c\", \"children\", $nodes);\n //echo $nodes;\n //return json_encode($nodes);\n\n $aux = 1;\n $nodes = json_encode($nodes);\n //$nodes = str_replace(\"children\", \"data\", $nodes, $aux);\n $nodes = $this->str_replace_once(\"children\", \"data\", $nodes);\n\n return $nodes;\n }\n }", "public function topMenuNavigation() {\n\t\t$out = '';\n\t\tif($modules = DataObject::get('WorkflowCategory', '', 'priority ASC')) {\n\t\t\tforeach ($modules as $module) {\n\t\t\t\tif (Permission::check(strtoupper(str_replace(\" \", \"_\", $module->name)))) {\n\t\t\t\t\t$icon = '';\n\t\t\t\t\tif($image = DataObject::get_by_id('Image', $module->imageID)) {\n\t\t\t\t\t\tif($smImage = $image->setSize(16,16)) {\n\t\t\t\t\t\t\t$icon = $smImage->URL;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= \"\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: '{$module->name}', \n\t\t\t\t\t\ticon: '{$icon}',\n\t\t\t\t\t\tmenu: {$this->moduleItems($module->ID)}\n\t\t\t\t\t},\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "function Output () {\n \t$CI =& get_instance();\n \t$return = '';\n \twhile (list(,$link) = each($this->elements)) {\n \t\t$classes = array();\n \t\tif (strstr($CI->router->fetch_class() . '/',$link['link'])) {\n \t\t\t$classes[] = 'active';\n \t\t}\n \t\tif (isset($this->children[$link['link']])) {\n \t\t\t$classes[] = 'submenu';\n \t\t}\n \t\t$displaylink = ($link['external'] == false) ? site_url($link['link']) : $link['link'];\n \t\t$return .= '<li ' . $this->ArrayToClass($classes) . '> \n\t\t\t\t\t\t\t<span><a href=\"' . $displaylink . '\">' . $link['name'] . '</span></a>';\n \t\tif (isset($this->children[$link['link']])) {\n \t\t\t$return .= '<ul class=\"submenu\">';\n \t\t\twhile (list(,$child) = each($this->children[$link['link']])) {\n \t\t\t\t$displaylink = ($child['external'] == false) ? site_url($child['link']) : $child['link'];\n \t\t\t\t$return .= '<li><a href=\"' . $displaylink . '\">' . $child['name'] . '</a></li>';\n \t\t\t}\n \t\t\t$return .= '<div style=\"clear:both\"></div></ul>';\n \t\t}\n \t\t$return .= '</li>';\n \t}\n \treturn $return;\n }", "protected function _getTree(){\n\t\tif (!$this->_tree) {\n\t\t\t$this->_tree = Mage::getResourceModel('megamenu2/menuitem_tree')->load();\n\t\t}\n\t\treturn $this->_tree;\n\t}", "public function get_menu()\r\n {\r\n return '';\r\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$c = count($this->children);\n\n\t\tif ($this->link)\n\t\t{\n\t\t\t$title = \"<a href='{$this->link}' target='{$this->target}'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = \"<a href='#' onclick='\";\n\t\t\t\n\t\t\tif ($_activeTree->onSelect)\n\t\t\t{\n\t\t\t\t$title .= \"{$_activeTree->onSelect}(\\\"{$this->value}\\\");\";\n\t\t\t}\n\t\t\t\n\t\t\t$title .= \"; return false'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\t\n\t\tif ($c == 0 && !$this->onDemand)\n\t\t{\n\t\t\t// Leaf node\n\t\t\techo \"<div class='{$this->leafStyle}'>\";\n\n\t\t\tif (isset($this->value) && $this->value !== \"\" && $_activeTree->selectMode != 'navigation')\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\"<? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n\t\t\n\t\t\techo \"$title</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->open)\n\t\t\t{\n\t\t\t\t$style = $this->openStyle;\n\t\t\t\t$display = \"block\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = $this->closedStyle;\n\t\t\t\t$display = \"none\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($this->onDemand)\n\t\t\t{\n\t\t\t\t$cmd = \"Tree.loadOnDemand('{$this->id}', '{$this->onDemand}');\";\n\t\t\t\t\n\t\t\t\tif ($this->open)\n\t\t\t\t{\n?>\n<script type=\"text/javascript\">\n\twindow.addEvent('domready', function() {Tree.loadOnDemand('<?echo $this->id?>', '<?echo $this->onDemand?>');});\n</script>\n<?\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$cmd .= \"Tree.toggleFolder('{$this->id}', '{$this->openStyle}', '{$this->closedStyle}');\";\n?>\n\t\t<div id='<?echo $this->id?>' class='<?echo $style?>' onclick=\"<?echo $cmd ?>\">\n<?\n\t\t\tif (isset($this->value) && $this->value !== \"\")\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\" <? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n?>\n\t\t<?echo $title?></div>\n\t\t<div id='<?echo $this->id?>_contents' style='padding-left: <?echo $_activeTree->indent ?>; display: <? echo $display?>'>\n\t\t\t\n<?\t\t\t\n\t\t\tfor($i = 0; $i < $c; ++$i)\n\t\t\t{\n\t\t\t\t$this->children[$i]->writeHTML();\n\t\t\t}\n?>\n\t\t</div>\n<?\n\t\t}\n\t}", "public function getOutput(){\n\t\t$aMenu = $this->mountBar();\n\t\t$aMenu->getOutput();\n\t}", "function getMenuNodeHTML(&$data, $page_name = null, $id = \"\")\n {\n $html = \"<div id='site_menu_node$id'><ul>\";\n\n $last = count($data) - 1;\n for ($i = 0; $i <= $last; $i++) {\n $item =& $data[$i];\n\n if ($item[\"visible\"] == \"0\" || ($item[\"access_mode\"] == \"admin\" && $this->dialog->usertype < USERTYPE_ADMIN)) continue;\n\n // li\n $css_classes = array();\n if ($item[\"url\"] == $page_name) {\n $css_classes[] = \"active\";\n }\n if (count($item[\"childs\"])) {\n $css_classes[] = \"parent\";\n }\n if ($i == 0) {\n $css_classes[] = \"first\";\n } else if ($i == $last) {\n $css_classes[] = \"last\";\n }\n\n if (count($css_classes)) {\n $css_classes = \"class='\" . implode(\" \", $css_classes) . \"'\";\n } else {\n $css_classes = \"\";\n }\n\n\n $url = $this->formatItemURL($item);\n $target = $item[\"blank_page\"] == 1 ? \" target='_blank'\" : \"\";\n\n $html .= \"<li $css_classes id='site_menu_li\" . $item[\"id\"] . \"'><a href='$url' $target>\" . $item[\"title\"];\n if ($item[\"hint\"]) {\n $html .= \"<span>\" . $item[\"hint\"] . \"</span>\";\n }\n $html .= \"</a>\";\n\n\n // submenu\n if (count($item[\"childs\"])) {\n $html .= $this->getMenuNodeHTML($item[\"childs\"], $page_name, $item[\"id\"]);\n }\n\n // li\n $html .= \"</li>\";\n }\n return $html . \"</ul></div>\";\n }", "public function menu()\n {\n $menu_raw = $this->db->select('fs_department.id as de_id, fs_department.name as de_name, fs_category.*')\n ->from('fs_department')\n ->join('fs_category', 'fs_department.id = fs_category.department_id', 'left')\n ->get()->result_array();\n\n $menu_good = array();\n foreach ($menu_raw as $k => $v) {\n $menu_good[$v['de_name']][$k] = $v;// short array menu\n }\n return $menu_good;\n\n }", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t\t$output .= \"\\n$indent<ul class=\\\"menu vertical sublevel-2\\\">\\n\";\n\t\t}", "function minorite_menu_tree__menu_footer(array $variables) {\n return '<ul class=\"nav\">' . $variables['tree'] . '</ul>';\n}", "public function getMenus()\n\t{\n\n\t}", "function rootMenu()\r\n{\r\n echo \"\\n========= ROOT MENU ============\\n\";\r\n echo \"1.ADD ADMIN\\n2.UPDATE COMPANY ADDRESS\\n3.UPADTE ABOUT\\n\";\r\n}", "function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}", "public static function menu(){\n $sql = \"select * from pageweb where id_parent = 1 AND menu = 1 ORDER BY ordre\";\n $parents = DB::get_sql_tab($sql);\n for($i=0;$i<count($parents);$i++) {\n $sql2 = \"select * from pageweb where id_parent = '\".$parents[$i][\"id\"].\"'AND menu = 1\";\n $enfants = DB::get_sql_tab($sql2);\n $parents[$i][\"enfants\"] = $enfants;\n }\n return $parents;\n }", "public function getMenu()\n {\n $sql = \"select a.*, ifnull(count(b.id_sub),0) as havesub from mainmenu a left outer join submenu b on a.id_main = b.id_main GROUP BY a.id_main ORDER BY a.urutan asc\";\n $hasil = $this->db->query($sql)->result();\n $menu = array();\n $no = 1;\n $total = count($hasil);\n foreach($hasil as $item){\n $row = array();\n $row['id_main'] = $item->id_main;\n $row['text'] = $item->nama_menu;\n $row['link'] = $item->link;\n $row['aktif'] = $item->aktif;\n $row['urutan'] = $item->urutan;\n $row['isChild'] = 0;\n $row['position'] = $no == 1 ? \"first\" : ($no == $total ? \"last\" : \"\");\n if($item->havesub > 0){\n $row['children'] = $this->getSubMenu($item->id_main);\n }\n $menu[] = $row;\n $no++;\n }\n return $menu;\n }", "function view()\n\t{\n\t\tglobal $tree, $ilUser, $ilCtrl, $lng;\n\n\t\t$this->showHierarchy();\n\t}", "function renderChildrenOf($pa, $root = null, $output = '', $level = 0) {\n if(!$root) $root = wire(\"pages\")->get(1);\n $output = '';\n $level++;\n foreach($pa as $child) {\n $class = '';\n $has_children = ($child->id == \"1018\" || $child->id == \"1263\" || count($child->children('include=all'))) ? true : false;\n\n if($has_children && $child !== $root) {\n if($level == 1){\n $class .= 'parent'; // first level boostrap dropdown li class\n //$atoggle .= ' class=\"dropdown-toggle\" data-toggle=\"dropdown\"'; // first level anchor attributes\n }\n }\n\n // make the current page and only its first level parent have an active class\n if($child === wire(\"page\") && $child !== $root){\n $class .= ' active';\n } else if($level == 1 && $child !== $root){\n if($child === wire(\"page\")->rootParent || wire(\"page\")->parents->has($child)){\n $class .= ' active';\n }\n }\n\n $class = strlen($class) ? \" class='\".trim($class).\"'\" : '';\n if($child->menu_item_url) {$childlink = $child->menu_item_url; } else { $childlink = $child->url; }\n $output .= \"<li$class><a href='$childlink'>$child->title</a>\";\n\n // If this child is itself a parent and not the root page, then render its children in their own menu too...\n \n if($has_children && $child !== $root) {\n \n // check for special menu items\n if ($child->id == \"1263\") { //services main item\n\n $output .= '<div class=\"megamenu\"><div class=\"megamenu-row\">';\n \n // promo\n $output .= '<div class=\"col3\">';\n $output .= '<h4 class=\"megamenu-col-title\">Promotional Offer:</h4>';\n $output .= '<a href=\"#\"><img src=\"http://placehold.it/270x244\" alt=\"\"></a>';\n $output .= '</div>';\n // end promo\n \n // first column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuServicesList('General');\n $output .= '</div>';\n // end first column\n\n // second column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuServicesList('Cosmetic Dentistry');\n $output .= megaMenuServicesList('Dental Restorations');\n $output .= '</div>';\n // end second column\n\n // third column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuServicesList('Specialty');\n $output .= '</div>';\n // end third column\n\n $output .= '</div></div>';\n }elseif ($child->id == \"1018\") {// blog main menu item\n \n $output .= '<div class=\"megamenu\"><div class=\"megamenu-row\">';\n\n // first column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuBlogCatList('general-dentistry');\n $output .= megaMenuBlogCatList('sleep-apnea-snoring');\n $output .= '</div>';\n // end first column\n\n // second column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuBlogCatList('cosmetic-dentistry');\n $output .= '</div>';\n // end second column\n\n // third column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuBlogCatList('childrens-dentistry');\n $output .= '</div>';\n // end third column\n\n // dourth column\n $output .= '<div class=\"col3\">';\n $output .= megaMenuBlogCatList('sedation-dentistry'); \n $output .= megaMenuBlogCatList('restorations');\n $output .= '</div>';\n // end dourth column\n\n $output .= '</div></div>';\n \n }else {// default case for all other menu items\n\n $output .= renderChildrenOf($child->children('include=all'), $root, $output, $level);\n\n }\n }\n $output .= '</li>';\n\n\n }\n $outerclass = ($level == 1) ? \"menuzord-menu\" : 'dropdown';\n return \"<ul class='$outerclass'>$output</ul>\";\n}", "public function renderNestedMenu()\n\t{\n\t\tif ($this->nested)\n\t\t{\n\t\t\treturn $this->nested->render();\n\t\t}\n\t}", "function wimbase_menu_tree__primary(&$variables) {\n return '<ul class=\"menu nav navbar-nav primary\">' . $variables['tree'] . '</ul>';\n}", "function ShowVerMenu111()\n{\n\tif (getPara('vermenu','value1')==1)\n\t{\t\n\t\tinclude(\"dbconnect.php\");\n\t\t$str1=\"select * from menu where vermenu=1 order by menuorder \";\n\t\t$result=mysql_query($str1) or\n\t\t\tdie(mysql_error());\n\t\t$id=intval(mysql_real_escape_string($_REQUEST['id'])) ;\n\t\t$pr=intval(mysql_real_escape_string($_REQUEST['pr'])) ;\t\n\t\t\n\t\techo('<tr><td height=\"28\" valign=\"top\"><DIV class=glossymenu>');\n\t\t$submenucount=0;\n\t\twhile($row=mysql_fetch_array($result))\n\t\t{\n\t\n\t\t\tswitch ($row['menutype'])\n\t\t\t{\n\t\t\t\tcase 0: //Muc chinh, trang chu, lien ket den trang index.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"index.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase 1://Muc con, chua tin tuc con 1 newsgroup, lien ket den trang newsgroup.php\n\t\t\t\t\t$submenucount++;\n\t\t\t\t\techo('<LI><A href=\"newsgroup.php?id='.$row['menuid'].'&pr='.$row['parent'].'\">&nbsp;&nbsp;&nbsp;&nbsp;'.$row['menutitle'].'</A>'); \n\t\t\t\t\tbreak; \n\t\t\t\tcase 2://Muc con, lien ket den trang noi dung cuc bo content.php\n\t\t\t\t\t$submenucount++;\n\t\t\t\t\techo('<LI><A href=\"content.php?id='.$row['menuid'].'&pr='.$row['parent'].'\">&nbsp;&nbsp;&nbsp;&nbsp;'.$row['menutitle'].'</A>'); \n\t\t\t\t\tbreak; \t\t\t\t\t\t\n\t\t\t\tcase 3://Muc CHINH, khong co lien ket\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo(' submenuheader\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"\">'.$row['menutitle'].'</a></EM><DIV class=submenu><UL>'); \n\t\t\t\t\tbreak;\n\t\t\t\tcase 4://Muc CHINH, lien ket ngoai\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"'.$row['link'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase 5://Muc CHINH, lien ket den trang noi dung cuc bo content.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"content.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6://Muc CHINH, lien ket den trang van ban phap luat lawdocument.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"lawdocument.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7://Muc CHINH, lien ket den trang hoi dap faq.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"faq.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8://Muc CHINH, lien ket den trang lien he contact.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"contact.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 9://Muc CHINH, lien ket den trang so do website webstruct.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"webstruct.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 10://Muc CHINH, trang danh muc cac lien ket, lien ket den trang list.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"list.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tcase 11://Muc CHINH, trang lich cong tac, lien ket den trang timetable.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"timetable.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tcase 12://Muc CHINH, trang danh ba doanh nghiep, lien ket den trang orglist.php\n\t\t\t\t\tif ($submenucount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$submenucount=0;\n\t\t\t\t\t\techo('</UL></DIV>');\n\t\t\t\t\t}\n\t\t\t\t\techo('<EM class=\"menuitem');echo(template());echo('\"><img src=\"image/point.jpg\" />&nbsp;&nbsp;<a class=\"mainnav\" href=\"orglist.php?id='.$row['menuid'].'\">'.$row['menutitle'].'</a></EM>');\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 13://Muc con, chua tin tuc rss, lien ket den trang rssnews.php\n\t\t\t\t\t$submenucount++;\n\t\t\t\t\techo('<LI><A href=\"rssnews.php?id='.$row['menuid'].'&pr='.$row['parent'].'\">&nbsp;&nbsp;&nbsp;&nbsp;'.$row['menutitle'].'</A>');\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\techo('</DIV></td></tr>');\n\t\n\t\tmysql_free_result($result);\n\t}\t\t\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n if( !$this->mega_menu_active ) {\n\n\n $indent = str_repeat(\"\\t\", $depth);\n\n $output .= \"\\n$indent<ul class=\\\"sub-menu\\\">\\n\";\n }\n }", "function echo_menu($menu_array,$level=0,$style='') {\n\t\t $html = $liststyleclass = $anchorstyleclass = '';\n\t\t foreach($menu_array as $menu) {\n\t\t \tif(empty($style)) {\n\t\t \t\t//if(isset($menu->children) && !empty($menu->children)){\n\t\t \t\t//\t$liststyleclass = 'nav-item dropdown';\t\n\t\t \t\t//}\n\t\t \t\tif($level==0 && !empty($menu->children)){\n\t\t \t\t\t$liststyleclass = 'nav-item dropdown';\n\t\t \t\t} else {\n\t\t \t\t\t$liststyleclass = ''; \n\t\t \t\t}\n\t\t \t} \n\t\t \telse {\n\t\t \t\tif($level==0){\n\t\t \t\t\t$anchorstyleclass = \"main-categories\";\n\t\t \t\t} else if($level==1){\n\t\t \t\t\t$anchorstyleclass = \"sub-categories\";\n\t\t \t\t} else {\t\t\t\t\t\t\t\t\t\t\t\n\t\t \t\t\t$anchorstyleclass = \"sub-categories\";\n\t\t \t\t}\n\t\t \t}\n\t\t $html .= '<li class=\"'.$liststyleclass.'\">';\n\t\t $html .= '<a href=\"'.$menu->slug.'\" class=\"'.$anchorstyleclass.'\">'.$menu->name.'</a>';\n\t\t //see if this menu has children\n\t\t if(isset($menu->children) && !empty($menu->children) && $menu->level < 2){\n\t\t \tif($menu->level < 1) {\n\t\t\t $html .= '<div class=\"dropdown-menu '.$menu->level.'\">';\n\t\t\t $html .= '<ul class=\"main-ul\">';\n\t\t\t $html .= '<li>';\n\t\t\t $html .= '<ul>';\n\t\t\t }\n\t\t\t //echo the child menu\n\t\t\t //if($menu->level< 2){\n\t\t\t \t$html .= echo_menu($menu->children,$menu->level,\"sub-categories\");\t\n\t\t\t //}\n\t\t\t\t\tif($menu->level < 1) {\t\t \t\n\t\t\t $html .= '</ul>';\n\t\t\t $html .= '</li>';\n\t\t\t $html .= '</ul>';\n\t\t\t $html .= '</div>';\n\t\t\t }\n\t\t }\n\t\t $html .= '</li>';\n\t\t }\n\t\t return $html;\n\t}", "public function actionIndex()\n {\n $cat=new MenuTree('',array('id','parent_id','name','fullname'));\n $data=$cat->getTree(Menu::get_menus(true));//获取分类结构\n $this->getView()->title = '菜单管理';\n return $this->render('index', [\n 'data' => $data\n ]);\n }", "function ShowCurrentPath()\n{\n\n echo('<div align=\"left\">');\n\t$id=intval(mysql_real_escape_string($_REQUEST['id'] ));\n\t\n\tif ($id==999999)\n\t{\n\t\techo(\"<div class='hormenu'>&nbsp;&nbsp;TRANG CHỦ \");\n\t\techo(\"<img src='image/arrow\");echo(template());echo(\".jpg' />\");\n\t\techo(\" KẾT QUẢ TÌM KIẾM\");\n\t}\n\telse\n\t{\n\t\t$str0=\"select menutitle,parent from menu where menuid=\".$id;\n\t\t$result0=mysql_query($str0) or\n\t\t\tdie(mysql_error());\n\t\t$row0=mysql_fetch_array($result0);\n\t\techo(\"<div class='hormenu'>&nbsp;&nbsp;TRANG CHỦ&nbsp;&nbsp;\");\n\t\techo(\"<img src='image/arrow\");echo(template());echo(\".jpg' />&nbsp;&nbsp;\");\n\t\n\t\tif ($row0['parent']>0)\n\t\t{\n\t\t\t$str2=\"select menutitle from menu where menuid=\".$row0['parent'];\n\t\t\t$result2=mysql_query($str2) or\n\t\t\t\tdie(mysql_error());\n\t\t\t$row2=mysql_fetch_array($result2);\n\t\t\techo($row2['menutitle']);\n\t\t\techo(\"&nbsp;&nbsp;<img src='image/arrow\");echo(template());echo(\".jpg' />&nbsp;&nbsp;\");\n\t\t}\t\n\t\techo($row0['menutitle'].\"</div>\");\n\t\n\t\t//mysql_free_result($result2);\n\t\tmysql_free_result($result0);\n\t}\n echo('</div>');\n}", "public function getMenuForEdit()\n {\n $root = $this->findRoot();\n $result = $this->findChildren($root);\n return $result;\n }", "function buildMenu($parent, $menu)\n {\n $html = \"\";\n if (isset($menu['parents'][$parent])) {\n foreach ($menu['parents'][$parent] as $itemId) {\n $href = '';\n $title_text = '';\n $active = '';\n if (!isset($menu['parents'][$itemId])) {\n $href = $this->url . $menu['items'][$itemId][$this->link_Column];\n $title_text = stripslashes($menu['items'][$itemId][$this->title_Column]);\n if ($this->active_link == $menu['items'][$itemId][$this->link_Column]) {\n $active = $this->active_class;\n }\n\n $parent_html = str_replace(array('{href}', '{link_text}', '{title}', '{has_child}', '{active_class}'), array($href, $title_text, $title_text, $this->has_child_html, $active), $this->parent_li_start);\n\n if (count($this->search) > 0) {\n foreach ($this->search as $k => $s) {\n $parent_html = str_replace($s, $menu['items'][$itemId][$this->replace[$k]], $parent_html);\n }\n }\n $html .= $parent_html;\n\n if (!empty($this->call_func)) {\n $html .= call_user_func($this->call_func, $menu['items'][$itemId], $this->selected);\n }\n $html .= $this->parent_li_end;\n\n }\n if (isset($menu['parents'][$itemId])) {\n $href = $this->url . $menu['items'][$itemId][$this->link_Column];\n $title_text = stripslashes($menu['items'][$itemId][$this->title_Column]);\n if ($this->active_link == $menu['items'][$itemId][$this->link_Column]) {\n $active = $this->active_class;\n }\n\n $parent_html = str_replace(array('{href}', '{link_text}', '{title}', '{has_child}', '{active_class}'), array($href, $title_text, $title_text, $this->has_child_html,$active), $this->child_li_start);\n if (count($this->search) > 0) {\n foreach ($this->search as $k => $s) {\n $parent_html = str_replace($s, $menu['items'][$itemId][$this->replace[$k]], $parent_html);\n }\n }\n $html .= $parent_html;\n if (!empty($this->call_func)) {\n $html .= call_user_func($this->call_func, $menu['items'][$itemId], $this->selected);\n }\n\n $html .= $this->child_ul_start;\n $html .= $this->buildMenu($itemId, $menu);\n $html .= $this->child_ul_end;\n $html .= $this->child_li_end;\n\n }\n }\n }\n return $html;\n }", "public function getAllMenuItems()\n\t{\n\t\t$out = array();\n\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t`menu`.`link_id`,\n\t\t\t\t\t`menu_tree`.`parent_id`,\n\t\t\t\t\t`menu`.`redirect_url`,\n\t\t\t\t\t`menu_tree`.`sequence_no`,\n\t\t\t\t\t`menu`.`title_menu`,\n\t\t\t\t\t`menu`.`title_page`,\n\t\t\t\t\t`menu`.`template_name`,\n\t\t\t\t\t`menu`.`module_id`,\n\t\t\t\t\t`menu`.`security_level_id`,\n\t\t\t\t\t`menu`.`group_id`,\n\t\t\t\t\t`menu_tree`.`main_link`,\n\t\t\t\t\t`menu_tree`.`quick_link`,\n\t\t\t\t\t`menu_tree`.`bottom_link`,\n\t\t\t\t\t`menu`.`sitemap`,\n\t\t\t\t\t`menu`.`status`\n\t\t\t\tFROM\n\t\t\t\t\t`menu_tree`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`menu`\n\t\t\t\tON\n\t\t\t\t\t`menu`.`link_id` = `menu_tree`.`link_id`\n\t\t\t\tORDER BY \n\t\t\t\t\t`menu_tree`.`parent_id`,`menu_tree`.`sequence_no`\n\t\t\t\t\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bind_result($link_id,$parent_id,$redirect_url,$sequence_no,$title_menu,$title_page,$template_name,$module_id,$security_level_id,$group_id,$main_link,$quick_link,$bottom_link,$sitemap,$status);\n\n\t\t$stmt->execute();\n\t\twhile($stmt->fetch())\n\t\t{\n\t\t\t$out[] = array(\n\t\t\t\t'link_id' => $link_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t\t'redirect_url' => $redirect_url,\n\t\t\t\t'sequence_no' => $sequence_no,\n\t\t\t\t'title_menu' => $title_menu,\n\t\t\t\t'title_page' => $title_page,\n\t\t\t\t'template_name' => $template_name,\n\t\t\t\t'module_id' => $module_id,\n\t\t\t\t'security_level_id' => $security_level_id,\n\t\t\t\t'group_id' => $group_id,\n\t\t\t\t'main_link' => $main_link,\n\t\t\t\t'quick_link' => $quick_link,\n\t\t\t\t'bottom_link' => $bottom_link,\n\t\t\t\t'sitemap' => $sitemap,\n\t\t\t\t'status' => $status\n\t\t\t);\n\t\t}\n\t\t$stmt->close();\n\t\t\n\t\treturn $out;\n\t}", "function mainMenu()\r\n{\r\n echo \"\\n========= MAIN MENU ============\\n\";\r\n echo \"1.root\\n2.Admin\\n3.customer\\n\";\r\n}", "public function run()\n {\n $menus=[\n [\"parent_menu\" => 0,\"nombre\" => \"Catalogo\",\"url\" => \"javascript:;\",\"orden\" => 1,\"icono\" => \"fas fa-clipboard-list\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ventas\",\"url\" => \"javascript:;\",\"orden\" => 2,\"icono\" => \"fas fa-cart-plus\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Reportes\",\"url\" => \"javascript:;\",\"orden\" => 3,\"icono\" => \"fas fa-chart-pie\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Acceso\",\"url\" => \"javascript:;\",\"orden\" => 4,\"icono\" => \"fas fa-users\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ayuda\",\"url\" => \"ayuda\",\"orden\" => 5,\"icono\" => \"fas fa-exclamation-circle\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Productos\",\"url\" => \"producto\",\"orden\" => 1,\"icono\" => \"fab fa-product-hunt\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Categorías\",\"url\" => \"categoria\",\"orden\" => 2,\"icono\" => \"fas fa-clipboard-check\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Sabores\",\"url\" => \"sabor\",\"orden\" => 3,\"icono\" => \"fas fa-ice-cream\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Tamaños\",\"url\" => \"tamano\",\"orden\" => 4,\"icono\" => \"fas fa-ruler\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Ordenes\",\"url\" => \"orden\",\"orden\" => 1,\"icono\" => \"fas fa-cart-arrow-down\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Clientes\",\"url\" => \"cliente\",\"orden\" => 2,\"icono\" => \"fas fa-user-tie\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ingresos\",\"url\" => \"ventarango\",\"orden\" => 1,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ventas por Mes\",\"url\" => \"venta-mes\",\"orden\" => 2,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Usuarios\",\"url\" => \"usuario\",\"orden\" => 1,\"icono\" => \"fas fa-user\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Roles\",\"url\" => \"rol\",\"orden\" => 2,\"icono\" => \"fas fa-scroll\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Permisos\",\"url\" => \"permiso\",\"orden\" => 3,\"icono\" => \"fas fa-user-tag\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Menus\",\"url\" => \"menu\",\"orden\" => 4,\"icono\" => \"fas fa-bars\"]\n\n ];\n foreach($menus as $menu){\n DB::table('menu')->insert([\n 'parent_menu' => $menu[\"parent_menu\"],\n 'nombre' => $menu[\"nombre\"],\n 'url' => $menu[\"url\"],\n 'orden' => $menu[\"orden\"],\n 'icono' => $menu[\"icono\"], \n 'created_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }\n }", "function startgreensockListTree($treelist,$menutype=\"standardlist\") {\n\t\n\t\t\n\techo '<div '. (($menutype == \"active\") ? \"class='col-md-5' style='left:35px'\" :\"class='col-md-6'\") .' >\n\t\t\t<div id=\"usersidediv\">\n\t\t\t\t<div class=\"panel panel-info panel-dark\">\n\t\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t\t\t<span class=\"panel-title\">'. (($menutype == \"active\") ? \"Currently applied to target\" :\"Select Options from Below\") .'</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"panel-body\">';\n}", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "function echo_footercategorymenu($menu_array,$level=0) {\n\t\t//pr($menu_array);die;\n\t $html = $liststyleclass = $anchorstyleclass = '';\n\t foreach($menu_array as $menu) {\n\t \tif($menu->level > 0){\n\t\t\t\t$html .= '<li>';\n\t $html .= '<a href=\"'.$menu->slug.'\">'.$menu->name.'</a>';\n\t $html .= '</li>'; \n }\n if(isset($menu->children) && !empty($menu->children) && $menu->level==0){\n \t$html .= '\n<div class=\"col-lg-12 col-md-12 col-sm-12 sub-categories\">\n<ul><a href=\"'.$menu->slug.'\" class=\"label\">'.$menu->name.' : </a>';\t \t\n \t$html .= echo_footercategorymenu($menu->children,$menu->level);\n\t\t $html .= '</ul>\n</div>'; \n \t\t} else if($menu->level==0) {\n \t\t\t$html .= '\n<div class=\"col-lg-12 col-md-12 col-sm-12 sub-categories\">\n<ul><a href=\"'.$menu->slug.'\" class=\"label\">'.$menu->name.' : </a>';\t\n\t\t $html .= '</ul>\n</div>'; \n \t\t}\n\t }\n\t return $html;\n\t}", "function select_idxmenu(){\n $query = $this->db->query(\"\n select title, file_path\n from sys_menu \n where is_parent = 0 order by id\n \");\n return $query;\n }", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "public function get_list() {\n\t\t$this->db->select('mnu.*, icon.nama AS nama_icon, mnu_parent.nama AS nama_parent');\n\t\t$this->db->from('menu AS mnu');\n\t\t$this->db->join('icon AS icon', 'icon.id = mnu.id_icon', 'LEFT');\n\t\t$this->db->join('menu AS mnu_parent', 'mnu_parent.id = mnu.parent_id', 'LEFT');\n\n\t\treturn parent::get_list();\n\t}" ]
[ "0.82591563", "0.7686194", "0.7588158", "0.74582005", "0.71252334", "0.70664406", "0.7011994", "0.7001981", "0.6976187", "0.6924417", "0.6894052", "0.68812627", "0.6881028", "0.68802756", "0.6879682", "0.6879682", "0.6877606", "0.6877606", "0.6877606", "0.6877606", "0.6877606", "0.6877606", "0.67524326", "0.67490566", "0.67282045", "0.67225003", "0.6706784", "0.66910636", "0.66664654", "0.66465056", "0.66447634", "0.65964067", "0.65919304", "0.6579896", "0.65722644", "0.65381783", "0.653611", "0.65250117", "0.6525001", "0.6520094", "0.6505776", "0.65030456", "0.65025777", "0.64925563", "0.64917964", "0.64743984", "0.6462222", "0.64492714", "0.6443564", "0.6417418", "0.64151424", "0.6399794", "0.6394857", "0.6394497", "0.6393255", "0.6392706", "0.6384336", "0.6383594", "0.6362109", "0.6361918", "0.63437355", "0.6338562", "0.63379765", "0.63138133", "0.63111514", "0.63000965", "0.6297041", "0.6291722", "0.62906724", "0.6271263", "0.6271263", "0.627081", "0.6269184", "0.6268787", "0.62647337", "0.62611526", "0.62592983", "0.6248899", "0.62384135", "0.62376845", "0.6231253", "0.62287617", "0.62131166", "0.62130207", "0.6201784", "0.62006223", "0.6199505", "0.61975884", "0.6196248", "0.61950606", "0.6187032", "0.61833733", "0.61829084", "0.6180527", "0.6179795", "0.6178702", "0.6173228", "0.61725706", "0.61681837", "0.6165652" ]
0.62787104
69
set name of currently active menu
private function setCurrentMenuName(){ $currentmenuname = NULL; foreach(array_keys(menu_ui_get_menus()) as $menuname){ $activelink = \Drupal::service('menu.active_trail')->getActiveLink($menuname); if(!empty($activelink)) $currentmenuname = $menuname; } $this->currentmenuname = $currentmenuname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activate_menu_item($name)\n\t{\n\t\t$this->_active_item = $name;\n\t}", "private function getCurrentMenuName(){\n \n if(!$this->currentmenuname)\n $this->setCurrentMenuName();\n \n return $this->currentmenuname;\n \n }", "public function setNameMenu( $name = NULL ){\n\t\t$this->nameMenu = $name ? $name : $this->name;\n\t}", "public function menu_get_active_title()\n {\n return menu_get_active_title();\n }", "public function getName()\n {\n return \"menu\";\n }", "public function get_name()\n {\n return 'akash-menu';\n }", "protected function _getMenuName()\n\t{\n\t\treturn self::$_sMenuName;\n\t}", "public function setMenuName($menuName){\n $this->menuName = $menuName;\n }", "function set_active_nav_class ($classes, $item) {\n if (in_array('current-menu-item', $classes) ){\n $classes[] = 'activemenu ';\n }\n return $classes;\n}", "public function setNameMenuSingular( $name = NULL ){\n\t\t$this->nameMenuSingular = $name ? $name : $this->name;\n\t}", "public function get_name() {\n return 'Alita_nav_menu_element';\n }", "abstract protected function setMainActionName();", "function getMenuTitle();", "function current_to_active($text)\n{\n $replace = array(\n //List of menu item classes that should be changed to \"active\"\n 'current-menu-item' => 'active',\n 'current_page_parent' => 'active',\n 'current_page_ancestor' => 'active',\n 'current_page_item' => 'active',\n );\n $text = str_replace(array_keys($replace), $replace, $text);\n return $text;\n}", "function setActive() ;", "public function setActiveController($name)\n {\n $this->_active_controller = $name;\n }", "public function MenuTitle() {\n\t\treturn $this->Name();\n\t}", "function uk_active_nav_class( $class, $item ) {\n if (in_array( 'current-menu-item', $class )) {\n $class[] = 'uk-active';\n }\n return $class;\n}", "function set_current_list_name ($list_name)\r\n {\r\n $_SESSION[\"current_list_name\"] = $list_name;\r\n }", "public static function setSelected($menu_name, $selected)\n {\n self::$selected[$menu_name] = $selected;\n }", "public function set_booking_menu_as_active( $active_menu ) {\n return 'booking';\n }", "public function menu_set_active_item($path)\n {\n return menu_set_active_item($path);\n }", "function special_nav_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function ActiveMenu($requestUri)\n{\n $current_file_name = basename($_SERVER['REQUEST_URI'], \".php\");\n\n if ($current_file_name == $requestUri)\n echo 'class=\"active\"';\n}", "function check_current_menu($page_name, $current_page) {\n\tif ($page_name === $current_page) return \"current\";\n\telse return \"\";\n}", "protected function getActiveMenu() {\n return $this->activeMenu;\n }", "public function selectTab($name) {\n\t\t$this->selectedTab = $name;\n\t}", "function isCurrent($pageName){\n\tglobal $NAV_PAGE;\n\t//If the global matches the argument set as current\n\tif ($NAV_PAGE == $pageName){\n\t\techo \"currentNavItem\";\n\t}\n}", "function glass_change_post_menu_label() {\n\tglobal $menu;\n\tglobal $submenu;\n\t$menu[5][0] = 'News';\n\t$submenu['edit.php'][5][0] = 'News';\n\t$submenu['edit.php'][10][0] = 'Add News';\n\t$submenu['edit.php'][16][0] = 'News Tags';\n\techo '';\n}", "function foundation_active_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function simple_bootstrap_add_active_class($classes, $item) {\n if( in_array('current-menu-item', $classes) ) {\n $classes[] = \"active\";\n }\n \n return $classes;\n}", "function activate_menu($controller) {\n $CI = get_instance();\n // Getting router class to active.\n $class = $CI->router->fetch_class();\n return ($class == $controller) ? 'active' : '';\n }", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "function activeLink($name=null,$tree=false)\n {\n\n\n\n if ( $tree and $name == 'setup' )\n {\n\n $setupArray = ['client-types','resources','teams','costs'];\n\n if ( in_array(request()->segment(1) ,$setupArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( $tree and $name == 'reports' )\n {\n $reportArray = ['opportunity-report','activity-report','proposal-report','invoice-report'];\n\n if ( in_array(request()->segment(1) ,$reportArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( !is_null($name) and request()->segment(1) == $name )\n {\n if ( $tree )\n {\n return 'current-page';\n }\n\n return 'active selected';\n }\n\n\n }", "function roots_cpt_active_menu($menu) {\n if ('base_service' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-services', 'menu-services active', $menu);\n }\n if ('base_portfolio' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-portfolio', 'menu-portfolio active', $menu);\n }\n return $menu;\n}", "public function getName()\n {\n return 'login_nav_bar';\n }", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "function active_nav_class($classes, $item){\n\tif (in_array('current-menu-item', $classes)) {\n\t\t$classes[] = 'active';\n\t}\n\treturn $classes;\n}", "function _title()\n {\n return _(\"Menu\");\n }", "public static function setCurrentName($name) {\n Session::put(Privilege::SESSION_NAME_NAME, $name);\n }", "function wp_get_nav_menu_name($location)\n {\n }", "function change_post_menu_label() {\n global $menu;\n $menu[5][0] = 'Blog';\n echo '';\n}", "public function getMenuTitle(): string;", "private function getMenuName() {\n $menu_name = FALSE;\n $menu_links = $this->menuLinkManager->loadLinksByRoute($this->currentRouteMatch->getRouteName(), $this->currentRouteMatch->getRawParameters()->all());\n if ($menu_links) {\n // Get the deepest link to this page and use that for the subnav.\n // @todo Consider a better approach like excluding utility nav links or\n // sorting them by main menu then footer then utility nav.\n $menu_link = end($menu_links);\n $menu_name = $menu_link->getMenuName();\n }\n\n return $menu_name;\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "function wp_nav_menu_update_menu_items($nav_menu_selected_id, $nav_menu_selected_title)\n {\n }", "function profile_tab_testname() {\n\tglobal $bp;\n\tbp_core_new_nav_item(\n\t\tarray( \n\t\t\t'name' => 'Test', \n\t\t\t'slug' => 'test', \n\t\t\t'screen_function' => 'test_screen', \n\t\t\t'position' => 40,\n\t\t\t'parent_url' => bp_loggedin_user_domain() . '/test/',\n\t\t\t'parent_slug' => $bp->profile->slug,\n\t\t\t'default_subnav_slug' => 'test',\n\t\t) \n\t);\n}", "protected function getTopmenuActiveItem() {\n return 0;\n }", "protected function _setMenuName($sMenuName)\n\t{\n\t\tself::$_sMenuName = $sMenuName;\n\t}", "public function getDefaultMenu()\n\t{\n\t\treturn 'base';\n\t}", "public function MenuCurrentItem() {\n return $this->MainMenu()->find('Code', 'KapostAdmin');\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "public function getLiActiveClass(): string;", "function trucking_filter_active_class_menu( $classes){\n if(in_array('current-menu-item', $classes)) {\n $classes[] = 'active';\n }\n return $classes;\n}", "function change_post_menu_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = 'News';\n $submenu['edit.php'][5][0] = 'News';\n $submenu['edit.php'][10][0] = 'Add News Item';\n //$submenu['edit.php'][15][0] = 'Status'; // Change name for categories\n //$submenu['edit.php'][16][0] = 'Labels'; // Change name for tags\n echo '';\n}", "protected function getCurrentDashbaordItem() {\n\t\t\n\t\treturn \"home\";\n\t}", "function rwbs_add_active_class_to_nav_menu($classes) {\n if (in_array('current-menu-item', $classes, true) || in_array('current_page_item', $classes, true)) {\n $classes = array_diff($classes, array('current-menu-item', 'current_page_item', 'active'));\n $classes[] = 'active';\n }\n return $classes;\n}", "public function get_title() {\n return esc_html__( 'Nav menu', 'Alita-extensions' );\n }", "public function selected()\n {\n parent::selected();\n $this->name = '';\n }", "function change_post_menu_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = 'News';\n $submenu['edit.php'][5][0] = 'News';\n $submenu['edit.php'][10][0] = 'Add News Item';\n $submenu['edit.php'][15][0] = 'News Category'; // Change name for categories\n //$submenu['edit.php'][16][0] = 'Labels'; // Change name for tags\n echo '';\n}", "function maker_4ym_menu_posts_label() {\n global $menu;\n global $submenu;\n\n $menu[5][0] = 'Blog 4YM';\n $submenu['edit.php'][5][0] = 'Artículos del Blog';\n $submenu['edit.php'][10][0] = 'Agregar un Nuevo Artículo'; \n}", "function my_change_post_menu_label() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n global $menu;\n $menu[70][0] = 'Il mio Profilo';\n }\n}", "public function loadMenuName($name=null)\n\t{\n\t\t$theme = wed_getSystemValue('THEME');\n\t\t$pairs = array('theme' => $theme, 'code' => $name);\n\t\t$data = $this->selectByPairs($pairs,null,false);\n\t\t$this->addValues_Data($data);\t\n\t\treturn (!$data) ? false : true ; // let caller know\n\t}", "public function get_title()\n {\n return __('Primary Menu', 'akash-hp');\n }", "function set_current_screen($hook_name = '')\n {\n }", "public function get($name) {\n\n\t\tif (isset(self::$_menus[$name])) {\n\t\t\treturn self::$_menus[$name];\n\t\t}\n\n\t\tself::$_menus[$name] = $this->app->object->create('ZlMenu', array($name));\n\n\t\treturn self::$_menus[$name];\n\t}", "function opanda_change_menu_title( $title ) {\r\n if ( !BizPanda::isSinglePlugin() ) return $title;\r\n return __('Opt-In Panda', 'opanda');\r\n}", "public function menu_get_active_menu_names()\n {\n return menu_get_active_menu_names();\n }", "public function makeMenu() {}", "public function setLiActiveClass(string $liActiveClass);", "function active_link($active)\n {\n return $active ? 'active' : '';\n }", "function cardMenu($name)\n\t\t{\n\t\t\techo \"\n\t\t\t<div class=menu onclick=this.parentNode.classList.toggle('folded')>\n\t\t\t\t<button></button>\n\t\t\t\t$name\n\t\t\t</div>\n\t\t\t\";\n\t\t}", "public function setActive() {}", "function greenfields_add_active_class($classes, $item)\n{\n if (in_array('current-menu-item', $classes)) {\n $classes[] = \"active\";\n }\n\n return $classes;\n}", "function change_post_menu_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = \"Blog\";\n $submenu['edit.php'][5][0] = \"Blog\";\n // $submenu['edit.php'][10][0] = 'Add Contacts';\n // $submenu['edit.php'][15][0] = 'Status'; // Change name for categories\n // $submenu['edit.php'][16][0] = 'Labels'; // Change name for tags\n echo '';\n}", "public function menu_set_active_menu_names($menu_names = NULL)\n {\n return menu_set_active_menu_names($menu_names);\n }", "public function setCurrentUser($name);", "public function setControllerName()\n {\n $this->name = \"tagui\";\n }", "public function activate() {\n MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'menu',\n 'labelKey' => $this->_plugin . '.menu-title',\n 'icon' => 'git-square',\n 'action' => 'h-gitter-index'\n ));\n\n $htracker = PLugin::get('h-tracker');\n if($htracker && !$htracker->isActive()) {\n $htracker->activate();\n\n $items = MenuItem::getPluginMenuItems('h-tracker');\n\n foreach($items as $item) {\n $item->delete();\n }\n }\n }", "public function current_to_active( $nav_menu, $args ){\n\t\t$replace = array(\n\t\t\t//List of menu item classes that should be changed to \"active\"\n\t\t\t'current_page_item' \t=> 'active',\n\t\t\t'current_page_parent' \t=> 'active',\n\t\t\t'current_page_ancestor' => 'active',\n\t\t\t'current-menu-item' \t=> 'active',\n\t\t\t'current-menu-parent' \t=> 'active',\n\t\t\t'current-menu-ancestor' => 'active',\n\t\t);\n\t\t$nav_menu = str_replace(array_keys($replace), $replace, $nav_menu);\n\n\t\treturn $nav_menu;\n\t}", "function setActive($a_active)\n\t{\n\t\t$this->active = $a_active;\n\t}", "function active_menu()\n{\n $CI =& get_instance();\n\n $class = '';\n if($CI->router->fetch_class() == 'blog') {\n $class = 'class=\"navbar-item-active\"';\n }\n return $class;\n}", "public function getMenu();", "function setActiveNavTab($path)\n{\n return Request::is($path) ? 'nav-link active' : 'nav-link';\n}", "function change_post_menu_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = 'Articles';\n $submenu['edit.php'][5][0] = 'Articles';\n $submenu['edit.php'][10][0] = 'Add Article';\n echo '';\n}", "public function setMenuAttribute($value)\n {\n $this->attributes['menu']=mb_strtoupper($value);\n }", "public static function label()\n {\n return __('Menus');\n }", "function showMenu()\n {\n $menu = config('app.menu') ;\n\n $text = '' ;\n \n\n foreach ($menu as $name => $item)\n {\n $active = false ;\n \n if(isset($item['dropdown']))\n {\n $text .= '<li class=\"dropdown menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> '. PHP_EOL;\n }\n else \n {\n $text .= '<li class=\"menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($item['action']) ? route($item['action']) : '' ).'\">' . PHP_EOL;\n }\n\n $text .= '<i class=\"'. $item['icon'] .'\"></i>'. PHP_EOL;\n $text .= '<span>'. $item['title'] .'</span>'. PHP_EOL;\n \n if(isset($item['dropdown']))\n {\n $text .= '<b class=\"caret\"></b>';\n $text .= '</a>'. PHP_EOL;\n $text .= '<ul class=\"dropdown-menu\">' ;\n foreach ($item['dropdown'] as $subName => $subItem) \n {\n $text .= '<li>' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($subItem['action']) ? route($subItem['action']) : '' ).'\">' . PHP_EOL;\n $text .= '<span>'. $subItem['title'] .'</span>'. PHP_EOL;\n $text .= '</a>'. PHP_EOL; \n $text .= '</li>'. PHP_EOL;\n\n $active = (!$active && isset($subItem['action'])) \n ? $subItem['action'] == Request::route()->getName() : $active ; \n }\n $text .= '</ul>' ;\n }\n else \n {\n $text .= '</a>'. PHP_EOL;\n $active = (!$active && isset($item['action'])) \n ? $item['action'] == Request::route()->getName() : $active ;\n }\n\n $text .= '</li>'. PHP_EOL;\n\n if($active)\n {\n $text = str_replace('menu-'. $name , 'active', $text);\n }\n }\n\n return $text ;\n }", "function get_menu_items($title) {\n\t$items['home.php'] = \"Home\";\n\t$items['play_trivia.php'] = \"Play Trivia\";\n\t$items['view_leaders.php'] = \"View Leader Board\";\n\t$items['rank_question.php'] = \"Rank Questions\";\n\t$items['insert_question.php'] = \"Insert Question\";\n\t\n\tif ($_SESSION['admin']) {\t\n\t\t$items['insert_user.php'] = \"Delete User\";\n\t\t$items['delete_question.php'] = \"Delete Question\";\n\t}\t\t\n\t$items['logout.php'] = \"Logout\";\n\t\t\n\tforeach ($items as $key=>$value) {\n\t\t$active = '';\n\t\tif ($value==$title) $active = \"active\";\n\t\t$menu_items .= '\n\t\t <li class=\"nav-item\">\n\t\t <a class=\"nav-link '.$active.'\" href=\"'.$key.'\">'.$value.'</a>\n\t\t </li>\n\t\t';\n\t}\n\treturn $menu_items;\n}", "function getMenuSubTitle();", "protected function filename()\n {\n return 'menu_' . time();\n }", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "public function current() {\n\t\t$f = parent::current();\n\t\treturn $f->getBasename();\n\t}" ]
[ "0.73577625", "0.72689193", "0.72062", "0.6825129", "0.6769948", "0.66666394", "0.63398755", "0.62708247", "0.6180183", "0.6150929", "0.61056125", "0.6017139", "0.6016042", "0.600131", "0.5976361", "0.59685475", "0.5942405", "0.5936161", "0.5909389", "0.59001833", "0.5896184", "0.5891162", "0.5854528", "0.5837728", "0.58100486", "0.57886815", "0.5780641", "0.5773775", "0.5769764", "0.5768786", "0.5733369", "0.5731127", "0.5727025", "0.57176614", "0.5716671", "0.57059646", "0.5699569", "0.5679708", "0.5628733", "0.56248266", "0.56223863", "0.5614121", "0.55666083", "0.55659443", "0.5562705", "0.55557775", "0.5555052", "0.5555052", "0.55536413", "0.55496305", "0.5540509", "0.5538033", "0.55335075", "0.5527773", "0.55241334", "0.552393", "0.552393", "0.55229634", "0.5504283", "0.55015665", "0.5496963", "0.5492118", "0.54911494", "0.5485198", "0.54832053", "0.5476672", "0.54716444", "0.547058", "0.54612017", "0.5456937", "0.5454828", "0.54539335", "0.5453904", "0.54500854", "0.5450022", "0.54309", "0.5426056", "0.5415727", "0.5413522", "0.5410727", "0.54105824", "0.53988475", "0.5395707", "0.5390161", "0.5384139", "0.5382244", "0.5382033", "0.5375354", "0.53699064", "0.5368867", "0.53602743", "0.5358818", "0.5358533", "0.5335696", "0.53220797", "0.53200155", "0.53178686", "0.53162616", "0.53098243", "0.53096044" ]
0.83405966
0
set tree menu output
private function setTreeOutput(){ $item = $this->item; $treeoutput = NULL; $menuname = NULL; $parameters = NULL; $menutree = \Drupal::menuTree(); if($item->menu_name == 'active-menu'){ $menuname = $this->getCurrentMenuName(); if($menuname) $parameters = $menutree->getCurrentRouteMenuTreeParameters($menuname); }else{ $parameters = new MenuTreeParameters(); $parameters->root = $item->menu_plid; $menuname = $item->menu_name; } if($parameters && $menuname){ $parameters->setMaxDepth($item->menu_level); $tree = $menutree->load($menuname, $parameters); $treeoutput = $menutree->build($tree); } $this->treeoutput = $treeoutput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function menu_tree_output($tree)\n {\n return menu_tree_output($tree);\n }", "abstract protected function getMenuTree();", "function show_tree(){\n\t\t\t\t\tswitch(LINK_TYPE){\n\t\t\t\t\t\tcase \"static\":\n\t\t\t\t\t\t\treturn $this->show_tree_static();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"burc\":\n\t\t\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn $this->show_tree_dynamic();\n\t\t\t\t\t}\n\t\t\t\t}", "function v2_mumm_menu_tree__menu_doormat(&$variables) {\n return $variables['tree'];\n}", "protected function printTestTree(): void\n {\n echo ' Menu Structure '.\"\\n\";\n echo ' rt '.\"\\n\";\n echo ' / \\ '.\"\\n\";\n echo ' pt1 pt2 '.\"\\n\";\n echo ' / | \\ | '.\"\\n\";\n echo ' ch1 ch2 ch3 ch4 '.\"\\n\";\n echo ' | '.\"\\n\";\n echo ' gc1 '.\"\\n\";\n }", "function minorite_menu_tree($variables) {\n return '<ul class=\"nav meganav\">' . $variables['tree'] . '</ul>';\n}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "function susy_menu_tree__main_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$c = count($this->children);\n\n\t\tif ($this->link)\n\t\t{\n\t\t\t$title = \"<a href='{$this->link}' target='{$this->target}'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = \"<a href='#' onclick='\";\n\t\t\t\n\t\t\tif ($_activeTree->onSelect)\n\t\t\t{\n\t\t\t\t$title .= \"{$_activeTree->onSelect}(\\\"{$this->value}\\\");\";\n\t\t\t}\n\t\t\t\n\t\t\t$title .= \"; return false'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\t\n\t\tif ($c == 0 && !$this->onDemand)\n\t\t{\n\t\t\t// Leaf node\n\t\t\techo \"<div class='{$this->leafStyle}'>\";\n\n\t\t\tif (isset($this->value) && $this->value !== \"\" && $_activeTree->selectMode != 'navigation')\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\"<? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n\t\t\n\t\t\techo \"$title</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->open)\n\t\t\t{\n\t\t\t\t$style = $this->openStyle;\n\t\t\t\t$display = \"block\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = $this->closedStyle;\n\t\t\t\t$display = \"none\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($this->onDemand)\n\t\t\t{\n\t\t\t\t$cmd = \"Tree.loadOnDemand('{$this->id}', '{$this->onDemand}');\";\n\t\t\t\t\n\t\t\t\tif ($this->open)\n\t\t\t\t{\n?>\n<script type=\"text/javascript\">\n\twindow.addEvent('domready', function() {Tree.loadOnDemand('<?echo $this->id?>', '<?echo $this->onDemand?>');});\n</script>\n<?\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$cmd .= \"Tree.toggleFolder('{$this->id}', '{$this->openStyle}', '{$this->closedStyle}');\";\n?>\n\t\t<div id='<?echo $this->id?>' class='<?echo $style?>' onclick=\"<?echo $cmd ?>\">\n<?\n\t\t\tif (isset($this->value) && $this->value !== \"\")\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\" <? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n?>\n\t\t<?echo $title?></div>\n\t\t<div id='<?echo $this->id?>_contents' style='padding-left: <?echo $_activeTree->indent ?>; display: <? echo $display?>'>\n\t\t\t\n<?\t\t\t\n\t\t\tfor($i = 0; $i < $c; ++$i)\n\t\t\t{\n\t\t\t\t$this->children[$i]->writeHTML();\n\t\t\t}\n?>\n\t\t</div>\n<?\n\t\t}\n\t}", "function tree_browser() {\n\t $cat = GetReq('cat'); \n\t \n\t if ($this->notreebrowser)\n\t return null;\n\t \n\t $out = $this->show_submenu('klist',1,null,null,1); //submenu only\n\t \n\t return ($out);\n\t \n\t}", "function soho_menu_tree__header_menu($variables){\n return '<ul class=\"menu\" id=\"menu-main-menu\">' . $variables['tree'] . '</ul>';\n \n}", "function view()\n\t{\n\t\tglobal $tree, $ilUser, $ilCtrl, $lng;\n\n\t\t$this->showHierarchy();\n\t}", "function startgreensockListTree($treelist,$menutype=\"standardlist\") {\n\t\n\t\t\n\techo '<div '. (($menutype == \"active\") ? \"class='col-md-5' style='left:35px'\" :\"class='col-md-6'\") .' >\n\t\t\t<div id=\"usersidediv\">\n\t\t\t\t<div class=\"panel panel-info panel-dark\">\n\t\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t\t\t<span class=\"panel-title\">'. (($menutype == \"active\") ? \"Currently applied to target\" :\"Select Options from Below\") .'</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"panel-body\">';\n}", "function renderTree($arvore) {\n $lastLevel = 0;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore->fetchTree() as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "function printrightMenu($tree,$level=0) {\n\tif(!is_null($tree) && count($tree) > 0) {\n\tif($level==0){\n\techo '<ul class=\"dropdown-menu rightClickMenu\">';\n\t}\n\t\tforeach($tree as $node) {\n\t\techo \"\\n\";\n\t\t\t// Top level\n\t\t\tif ( empty($node['children']) ) {\n\t\t\t\tif ( !empty($node['value']['menu_type']) AND ($node['value']['menu_type']== \"inlineForm\") ) {\n\t\t\t\t\techo '<li><a class=\"trigger right-caret '.$node['value']['action_type'].' '.$node['value']['icon'].' '.$node['value']['menu_type'].' '.$node['value']['action_type'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\"><li>'. $node['value']['custom'] . '</li></ul></li>';\n\t\t\t\t}else{\n\t\t\t\techo '<li><a class=\"iconItemSelection '.$node['value']['action_type'].' '.$node['value']['icon'].' MenuActionItem '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" type=\"button\" data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>'. (!empty($node[\"value\"][\"code\"]) ? '<span data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" style=\"position:absolute; right:15px; top:9px; text-size=16px;\" class=\"addKeyframeMenu fa fa-plus-square-o fa-lg pull-right\"></span>' : ''). '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !empty($node['children']) AND !empty($node['children']['0']['children'] )) {\n\t\t\t\techo '<li class=\"dropdown-submenu\">\n\t\t\t\t<a class=\"trigger right-caret '.$node['value']['icon'].' '.$node['value']['action_type'].' '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" data-animationui=\"'.$node['value']['code'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\">';\n\t\t\t}\n\t\t\tif ( !empty($node['children']) AND empty($node['children']['0']['children']) ) {\n\t\t\t\techo '<li class=\"dropdown-submenu\">\n\t\t\t\t<a class=\"trigger right-caret '.$node['value']['action_type'].' '.$node['value']['icon'].' '.$node['value']['menu_type'].' '.$node['value']['code'].' '.$node['value']['action_type'].'\" data-menu_type=\"'.$node['value']['menu_type'].'\" data-code=\"'.$node['value']['code'].'\" data-action_type=\"'.$node['value']['action_type'].'\" data-id=\"'.$node['value']['id'].'\">'. (!empty($node[\"value\"][\"image\"]) ? '<img class=\"rightClickIcon\" height=\"15\" src=\"'.$node['value']['image'].'\">' : ''). '&nbsp;'.$node['value']['name'].'</a>\n\t\t\t\t<ul class=\"dropdown-menu sub-menu\" style=\"max-height:400px;overflow:auto;\">';\n\t\t\t}\n\t\t\tprintrightMenu($node['children'], $level+1);\n\t\t\tif (!empty($node['children']) ) {echo '</li></ul>';}\n\t\t} // end foreach\n\t} // end if\n\tif($level==0){\n\techo '<div class=\"currentAnimations\"></div>';\n\t}\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n $indent = str_repeat(\"\\t\", $depth);\n $output .= \"\\n$indent<ul class=\\\"vertical menu\\\" data-submenu>\\n\";\n }", "function latto_menu_tree__menu_block__1($vars) { \n return '<ul class=\"main-menu nav nav-inline\">' . $vars['tree'] . '</ul>';\n}", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t$output .= \"\\n$indent<ul class=\\\"vertical menu\\\" data-submenu>\\n\";\n\t}", "function XmlControlOnRender(&$xmlWriter) {\n $xmlWriter->WriteStartElement(\"menu\");\n $xmlWriter->WriteElementString(\"value\",$this->data[\"selected_value\"]);\n\t if($this->data[\"selected_value\"]!=0 || $this->root){\n \t$_list=array();\n DataManipulator::BuildTreeFromBottom($this->_list, $this->data[\"selected_value\"],$this->key_field_name,$this->parent_field_name,$_list);\n if (!$this->root) $root_node=array_pop($_list);\n //write image node\n\t $_list=array();\n\t DataManipulator::GetRecursiveNodeList($this->_list,$root_node[$this->key_field_name], $this->key_field_name, $this->parent_field_name,$_list);\n\n //--one level menu\n if ($this->onelevel) {\n\t\t\t foreach($_list as $key => $item)\t{\n \t $item[$this->parent_field_name]=0;\n \t $_newlist[]= $item;\n\t }\n } else {\n $_newlist=$_list;\n }\n $xmlWriter->WriteElementString(\"image\",$root_node[\"image\"]);\n\t\t\t$xmlWriter->WriteElementString(\"caption\",$root_node[\"caption\"]);\n $xmlWriter->WriteElementString(\"url\",$root_node[\"url\"]);\n $xmlWriter->WriteStartElement(\"categories\");\n\t $xmlWriter->WriteStartElement(\"sub_node_list\");\n \t $this->BuildRecursiveTree($_list, 0, $xmlWriter);\n \t$xmlWriter->WriteEndElement();\n\t }\n $xmlWriter->WriteEndElement(\"menu\");\n }", "function v2_mumm_menu_tree__menu_new_main_menu(&$variables) {\n return '<ul>' . $variables['tree'] . '</ul>';\n}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "function renderTreeOrgaos($arvore) {\n $lastLevel = 1;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "function renderTree($tree, $options)\n {\n $current_depth = 0;\n $counter = 0;\n $result = '';\n $folders = isset($options['folders']);\n $plans = isset($options['plans']);\n\n foreach($tree as $node)\n {\n $curr = $node['Category'];\n $node_depth = $curr['level'];\n $node_name = $curr['title'];\n $node_id = $curr['cat_id'];\n $node_count = $curr['listing_count'];\n\n if($node_depth == $current_depth)\n {\n if($counter > 0) $result .= '</li>';\n }\n elseif($node_depth > $current_depth)\n {\n $result .= '<ul'.($folders ? ' class=\"filetree\"' : '').'>';\n $current_depth = $current_depth + ($node_depth - $current_depth);\n }\n elseif($node_depth < $current_depth)\n {\n $result .= str_repeat('</li></ul>',$current_depth - $node_depth).'</li>';\n $current_depth = $current_depth - ($current_depth - $node_depth);\n }\n $result .= '<li class=\"jr-tree-cat-'.$node_id.' closed\"';\n $result .= '>';\n $folders and $result .= '<span class=\"folder\">&nbsp;';\n $result .= !$plans ?\n $this->Routes->category($node)\n :\n $this->Routes->category($node,array(\"onclick\"=>\"JRPaid.Plans.load({'cat_id':\".$node_id.\"});return false;\"))\n ;\n $this->Config->dir_cat_num_entries and $result .= ' (' .$node_count . ')';\n $folders and $result .= '</span>';\n ++$counter;\n }\n\n $result .= str_repeat('</li></ul>',$node_depth);\n\n return $result;\n }", "function soho_menu_tree__header_menu_below($variables){\n return '<ul class=\"sub-menu\">' . $variables['tree'] . '</ul>';\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t\t$output .= \"\\n$indent<ul class=\\\"menu vertical\\\">\\n\";\n\t\t}", "function minorite_menu_tree__primary($variables) {\n return '<ul class=\"nav\" id=\"nav-primary\">' . $variables['tree'] . '</ul>';\n}", "public function actionAreaTree()\n {\n $html = $this->renderPartial('tree', array(), true);\n Yii::app()->getClientScript()->renderBodyBegin($html);\n Yii::app()->getClientScript()->renderBodyEnd($html);\n echo $html;\n Yii::app()->end();\n }", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "public function init()\n\t{\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$id=$this->htmlOptions['id']=$this->getId();\n\t\tif($this->url!==null)\n\t\t\t$this->url=CHtml::normalizeUrl($this->url);\n\t\t$cs=Yii::app()->getClientScript();\n\t\t$cs->registerCoreScript('treeview');\n\t\t$options=$this->getClientOptions();\n\t\t$options=$options===array()?'{}' : CJavaScript::encode($options);\n\t\t$cs->registerScript('Yii.CTreeView#'.$id,\"jQuery(\\\"#{$id}\\\").treeview($options);\");\n\t\tif($this->cssFile===null)\n\t\t\t$cs->registerCssFile($cs->getCoreScriptUrl().'/treeview/jquery.treeview.css');\n\t\telseif($this->cssFile!==false)\n\t\t\t$cs->registerCssFile($this->cssFile);\n\n\t\techo CHtml::tag('ul',$this->htmlOptions,false,false).\"\\n\";\n\t\techo self::saveDataAsHtml($this->data);\n\t}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t\t$output .= \"\\n$indent<ul class=\\\"menu vertical sublevel-2\\\">\\n\";\n\t\t}", "function display_children($parent, $level) {\n $result = mysql_query('SELECT * FROM treeview_items WHERE parent_id=\"'.$parent.'\";'); \n while ($row = mysql_fetch_array($result)) { \n echo \"<option value='\".$row['id'].\"'>\".str_repeat('--',$level).$row['name'].\"</option>\" .\"<br>\"; \n display_children($row['id'], $level+1); \n\n } \n\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n if( !$this->mega_menu_active ) {\n\n\n $indent = str_repeat(\"\\t\", $depth);\n\n $output .= \"\\n$indent<ul class=\\\"sub-menu\\\">\\n\";\n }\n }", "function render_multi_level_menu($menu_source, $start_node, $start_link, $level = 0, $anc_destination)\n {\n \n// if($level==0)DebugBreak();\n \n global $TMS, $_PATH, $REQUEST_ASSOC, $REQUEST_VARS;\n static $branches;\n\n if ($REQUEST_VARS[0] == 'show' && ($level === 0))\n {\n $objid =$this->get_requested_basic_id($anc_destination);\n $this->menu_selected_obj_id=$objid;\n $this->menu_selected_id =$this->_tree->GetAncestor($objid);\n $this->menu_selected_id3 =$this->_tree->GetAncestor($this->menu_selected_id);\n }\n elseif ($REQUEST_VARS[0] == 'showobj' && $objid && ($level === 0))\n {\n $this->menu_selected_obj_id=$objid;\n $this->menu_selected_id =$this->_tree->GetAncestor($objid);\n }\n elseif ($level === 0&&$objid)\n {\n $this->menu_selected_id=$objid;\n }\n\n \n if (!$branches && $objid)\n {\n $this->_tree->BonesMas=null;\n $this->_tree->GetBones($objid, 1);\n $branches= $this->_tree->BonesMas;\n \n }\n \n if (($menu_source) && ($menu_source[$start_node]))\n {\n foreach ($menu_source[$start_node] as $key => $menuitem)\n {\n if ($menuitem['params']['Disable'])\n unset ($menu_source[$start_node][$key]);\n }\n\n $xtr_count=count($menu_source[$start_node]);\n\n $i =0;\n\n foreach ($menu_source[$start_node] as $menuitem)\n {\n $itembasic = $menuitem['basic'];\n\n $menuitem =$this->_common_obj->property_set_to_properties($menuitem['params']['Property_set'],$menuitem,'',true,$this);\n\n if (is_array($menuitem['props']))$menuitem=array_merge($menuitem, $menuitem['props']);\n\n unset ($menuitem['props']);\n\n $menuitem['_num'] =$i++;\n $menuitem['Ancestor']=$start_node;\n\n if ($menuitem['obj_type'] == '_CATGROUP')\n {\n\n $menuitem['subcount']=count($menu_source[$menuitem['id']]);\n }\n\n $rpath =$this->_tree->calculate_r_path($menuitem['id'], $anc_destination, $this->_sel_arr,\n 2);\n $menuitem['Link'] =$start_link . '/' . $rpath;\n\n $menuitem['submenu']='';\n\n \n if (is_array($menu_source[$menuitem['id']]))\n {\n\n $menuitem['submenu']=$this->render_multi_level_menu($menu_source, $menuitem['id'], $start_link,\n $level + 1, $anc_destination);\n }\n\n $selected=false;\n\n if (in_array($menuitem['id'], array\n (\n $this->menu_selected_id,\n $this->menu_selected_obj_id\n )))\n {\n $selected =true;\n $selected_item=$menuitem;\n }\n\n $branch_detected=false;\n\n\n if (!$selected && $branches && in_array($menuitem['id'], $branches))\n {\n \n $branch_detected=true;\n }\n\n if (($menuitem['obj_type'] == '_CATGROUP') && is_array($menu_source[$menuitem['id']])\n && ($TMS->isSectionDefined('_menu_item_nested_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_nested_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_nested_level' . $level);\n $TMS->clear_section_fields('_menu_item_nested_level' . $level);\n }\n elseif ($branch_detected && ($TMS->isSectionDefined('_menu_item_branch_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_branch_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_branch_level' . $level);\n }\n elseif (($i == 1) && ($selected) && ($TMS->isSectionDefined(\n '_menu_item_first_selected_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_first_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_first_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_first_selected_level' . $level);\n }\n elseif (($i == 1) && ($TMS->isSectionDefined('_menu_item_first_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_first_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_first_level' . $level);\n $TMS->clear_section_fields('_menu_item_first_level' . $level);\n }\n elseif (($i == $xtr_count) and ($selected) && ($TMS->isSectionDefined(\n '_menu_item_last_selected_level' . $level)))\n {\n $TMS->AddMassReplace('_menu_item_last_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_last_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_last_selected_level' . $level);\n }\n elseif ($i == $xtr_count && $TMS->isSectionDefined('_menu_item_last_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_last_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_last_level' . $level);\n $TMS->clear_section_fields('_menu_item_last_level' . $level);\n }\n elseif ($selected && $TMS->isSectionDefined('_menu_item_middle_selected_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_middle_selected_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_middle_selected_level' . $level);\n $TMS->clear_section_fields('_menu_item_middle_selected_level' . $level);\n }\n elseif ($TMS->isSectionDefined('_menu_item_middle_level' . $level))\n {\n $TMS->AddMassReplace('_menu_item_middle_level' . $level, $menuitem);\n $menu_buff.=$TMS->parseSection('_menu_item_middle_level' . $level);\n $TMS->clear_section_fields('_menu_item_middle_level' . $level);\n }\n\n if ($level == 0)\n {\n $anc_node=$this->menu_ancestor;\n $TMS->AddMassReplace('_menu_main_level' . $level, $anc_node['params']);\n }\n\n if (($this->devide_by_rows) && ($i % (int)$this->devide_by_rows == 0))\n {\n $levnum++;\n $TMS->AddReplace('_menu_main_level' . $level, 'id', $start_node);\n $TMS->AddReplace('_menu_main_level' . $level, 'menu_buff', $menu_buff);\n $TMS->AddReplace('_menu_main_level' . $level, '__divnum', $levnum);\n\n $menu_buff='';\n $menu_dbuff.=$TMS->parseSection('_menu_main_level' . $level);\n $exit_section='_menu_divide_container' . $level;\n $TMS->KillField('_menu_main_level' . $level, 'menu_buff');\n }\n }\n\n if (($this->devide_by_rows) && (($i % (int)$this->devide_by_rows != 0)))\n {\n $levnum++;\n $TMS->AddReplace('_menu_main_level' . $level, 'menu_buff', $menu_buff);\n $TMS->AddReplace('_menu_main_level' . $level, '__divnum', $levnum);\n\n $menu_dbuff.=$TMS->parseSection('_menu_main_level' . $level);\n $exit_section='_menu_divide_container' . $level;\n $menu_buff =$menu_dbuff;\n }\n elseif (!$this->devide_by_rows)\n {\n $exit_section='_menu_main_level' . $level;\n }\n else\n {\n $menu_buff=$menu_dbuff;\n }\n\n $TMS->AddReplace($exit_section, 'menu_buff', $menu_buff);\n\n $TMS->AddReplace('_menu_main_level' . $level, 'id', $start_node);\n $TMS->AddReplace($exit_section, 'ancestor', $this->menu_ancestor['params']['Name']);\n $TMS->AddReplace($exit_section, 'id', $start_node);\n $TMS->AddMassReplace($exit_section, $branch_item);\n\n $main=$TMS->parseSection($exit_section);\n\n $TMS->KillField($exit_section, 'menu_buff');\n\n return $main;\n }\n }", "function display_node($parent, $level) {\n global $tam1;\n $tam2=array();\n global $leafnodes; \n global $responce;\n if($parent >0) {\n foreach ($tam1 as $row){\n\t if($row['ID_Parent']==$parent){\n\t\t $tam2[]=$row;\n\t }\n }\n } else {\n \n\t foreach ($tam1 as $row){\n\t if($row['ID_Parent']==''){\n\t\t $tam2[]=$row;\n\t }\n }\n }\n\n foreach ($tam2 as $row) {\n\tif(!$row['ID_Parent']) $valp = 'NULL'; else $valp = $row['ID_Parent'];\t\n\t//kiem tra node co phai lead\n\tif(array_key_exists($row['ID_Control'], $leafnodes)) $leaf='true'; else $leaf = 'false';\t\n\t$responce[] = array('ID_Control' => $row[\"ID_Control\"], 'ID_Parent' => $row[\"ID_Parent\"], 'Caption' => $row[\"Caption\"],'KieuControl' => $row[\"KieuControl\"],'IsBarButton' => $row[\"IsBarButton\"] ,'Icon' =>$row[\"Icon\"],'Active' =>$row[\"Active\"],'STT' =>$row[\"STT\"],'PageOpen' =>$row[\"PageOpen\"],'OpenType' =>$row[\"OpenType\"],'TenControl' =>$row[\"TenControl\"] , 'level' => $level, 'parent' => $valp, 'isLeaf' => $leaf, 'expanded' => \"true\", 'loaded' => \"true\");\n\t\n\t display_node($row['ID_Control'],$level+1);\n\t \n\t} \n \n return $responce;\n \n}", "function putInTree()\n\t{\n//echo \"st:putInTree\";\n\t\t// chapters should be behind pages in the tree\n\t\t// so if target is first node, the target is substituted with\n\t\t// the last child of type pg\n\t\tif ($_GET[\"target\"] == IL_FIRST_NODE)\n\t\t{\n\t\t\t$tree = new ilTree($this->content_object->getId());\n\t\t\t$tree->setTableNames('lm_tree','lm_data');\n\t\t\t$tree->setTreeTablePK(\"lm_id\");\n\n\t\t\t// determine parent node id\n\t\t\t$parent_id = (!empty($_GET[\"obj_id\"]))\n\t\t\t\t? $_GET[\"obj_id\"]\n\t\t\t\t: $tree->getRootId();\n\t\t\t// determine last child of type pg\n\t\t\t$childs =& $tree->getChildsByType($parent_id, \"pg\");\n\t\t\tif (count($childs) != 0)\n\t\t\t{\n\t\t\t\t$_GET[\"target\"] = $childs[count($childs) - 1][\"obj_id\"];\n\t\t\t}\n\t\t}\n\t\tif (empty($_GET[\"target\"]))\n\t\t{\n\t\t\t$_GET[\"target\"] = IL_LAST_NODE;\n\t\t}\n\n\t\tparent::putInTree();\n\t}", "function start_lvl(&$output, $depth = 0, $args = array()) {\n\t\t $output .= \"<span class='subcategories'>\";\n\t\t}", "function cms_frontend_menu_tree__menu_front_end_footer_menu(&$variables) {\n return '<ul class=\"menu nav\">' . $variables['tree'] . '</ul>';\n}", "function doDisplay()\n {\n parent :: doDisplay();\n\n $criteria = new lmbSQLCriteria('is_branch >= 0');//lmbSQLFieldCriteria('is_branch', 1);\n $this->tree_items = lmbActiveRecord :: find('TreeItem', $criteria);\n }", "function minorite_menu_tree__menu_footer(array $variables) {\n return '<ul class=\"nav\">' . $variables['tree'] . '</ul>';\n}", "public function visitor()\n {\n $this->template = 'display';\n $menu = [];\n $this->set('menu', $menu);\n }", "function susy_menu_tree__secondary_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "function showCategoryList(&$category_tree, $type_text, $level = 0) {\n\t$row_idx = 1;\n\t\n foreach ($category_tree as $category) {\n?>\n <tr class=\"row_style_<?php echo $row_idx; ?>\">\n\t\t\t<td></td>\n \t<td class=\"left\"><?php echo str_repeat('&nbsp;--', $level).'&nbsp;'.$category->name; ?></td>\n \t<td>\n \t <a href=\"#\" onclick=\"select_for_menu_item('<?php echo $type_text.' - '.$category->name; ?>', '<?php echo $category->id; ?>'); return false;\">\n \t <?php _e('Select'); ?></a>\n \t</td>\n </tr>\n<?php\n $row_idx = 1 - $row_idx;\n \n if (sizeof($category->slaves['ProductCategory']) > 0) {\n $level++;\n showCategoryList($category->slaves['ProductCategory'], $type_text, $level);\n $level--;\n }\n }\n}", "function rootMenu()\r\n{\r\n echo \"\\n========= ROOT MENU ============\\n\";\r\n echo \"1.ADD ADMIN\\n2.UPDATE COMPANY ADDRESS\\n3.UPADTE ABOUT\\n\";\r\n}", "function v2_mumm_menu_tree__menu_header(&$variables) {\n return $variables['tree'];\n}", "private function setTrees()\n {\n if (empty($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS]) === false) {\n foreach ($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS] as $propKey => $propVal) {\n if (is_array($propVal) && empty($this->generator->types[ucfirst($propKey)]) === false) {\n // ensure that there is a type of propKey ex.: Menu with parent_id field set\n $this->openEntity(ConfigInterface::TREES);\n $this->setParamDefault($propKey, $propVal[ApiInterface::RAML_KEY_DEFAULT]);\n $this->closeEntities();\n }\n }\n }\n }", "function wimbase_menu_tree__primary(&$variables) {\n return '<ul class=\"menu nav navbar-nav primary\">' . $variables['tree'] . '</ul>';\n}", "public function menustoreAction() {\n $panel_pages = array();\n $menut = Model_Menu::getInstance();\n $panel_names = $menut->panels();\n $pages = array();\n // at this point have selected all the menus of all active modules\n // return a tree of pages from each top level page sorted by sort_by and label\n foreach($panel_names as $panel):\n $panel_data = array('id' => $panel, 'label' => ucwords(str_replace('_', ' ', $panel)),\n 'children' => array());\n foreach($menut->find(array('panel' => $panel, 'parent' => 0), 'sort_by') as $menu):\n $panel_data['children'][] = $menu->pages_tree();\n endforeach;\n $pages[] = $panel_data;\n endforeach;\n $this->view->data = new Zend_Dojo_Data('id', $pages, 'label');\n $this->_helper->layout->disableLayout();\n }", "public function tree()\n {\n// try {\n $root = $this->model->root();\n if ($root) {\n $items = $root->getDescendants();\n }\n\n $items = $this->recursiveNestable($items->toArray(), $root->id);\n\n return view('admin.menus.tree', compact('items', 'root'))->with('parentId', $root->id);\n// } catch (Exception $e) {\n// return $this->returnWithError($e->getMessage());\n// }\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\tif ( $depth == 0 ) {\n\t\t\tif ( $this->is_mega ) {\n\t\t\t\t$output .= '';\n\t\t\t} else {\n\t\t\t\t$output .= '<ul class=\"sub-menu\" ' . $this->style . '>';\n\t\t\t}\n\t\t} else if ( $this->is_mega ) {\n\t\t\t$output .= '';\n\t\t} else {\n\t\t\t$output .= '<ul class=\"sub-menu\">';\n\t\t}\n\t}", "function showHierarchy()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$this->setTabs();\n\t\t\n\t\t$ilCtrl->setParameter($this, \"backcmd\", \"showHierarchy\");\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php\");\n\t\t$form_gui = new ilChapterHierarchyFormGUI($this->content_object->getType(), $_GET[\"transl\"]);\n\t\t$form_gui->setFormAction($ilCtrl->getFormAction($this));\n\t\t$form_gui->setTitle($this->obj->getTitle());\n\t\t$form_gui->setIcon(ilUtil::getImagePath(\"icon_st.svg\"));\n\t\t$form_gui->setTree($this->tree);\n\t\t$form_gui->setCurrentTopNodeId($this->obj->getId());\n\t\t$form_gui->addMultiCommand($lng->txt(\"delete\"), \"delete\");\n\t\t$form_gui->addMultiCommand($lng->txt(\"cut\"), \"cutItems\");\n\t\t$form_gui->addMultiCommand($lng->txt(\"copy\"), \"copyItems\");\n\t\t$form_gui->addMultiCommand($lng->txt(\"cont_de_activate\"), \"activatePages\");\n\t\tif ($this->content_object->getLayoutPerPage())\n\t\t{\t\n\t\t\t$form_gui->addMultiCommand($lng->txt(\"cont_set_layout\"), \"setPageLayout\");\n\t\t}\n\t\t$form_gui->setDragIcon(ilUtil::getImagePath(\"icon_pg.svg\"));\n\t\t$form_gui->addCommand($lng->txt(\"cont_save_all_titles\"), \"saveAllTitles\");\n\t\t$form_gui->addHelpItem($lng->txt(\"cont_chapters_after_pages\"));\n\t\t$up_gui = ($this->content_object->getType() == \"dbk\")\n\t\t\t? \"ilobjdlbookgui\"\n\t\t\t: \"ilobjlearningmodulegui\";\n\t\t$ilCtrl->setParameterByClass($up_gui, \"active_node\", $this->obj->getId());\n\t\t$ilCtrl->setParameterByClass($up_gui, \"active_node\", \"\");\n\n\t\t$ctpl = new ilTemplate(\"tpl.chap_and_pages.html\", true, true, \"Modules/LearningModule\");\n\t\t$ctpl->setVariable(\"HIERARCHY_FORM\", $form_gui->getHTML());\n\t\t$ilCtrl->setParameter($this, \"obj_id\", $_GET[\"obj_id\"]);\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php\");\n\t\t$ml_head = ilObjContentObjectGUI::getMultiLangHeader($this->content_object->getId(), $this);\n\t\t\n\t\t$this->tpl->setContent($ml_head.$ctpl->get());\n\t}", "public function add_menu($node)\n {\n }", "public function buildMenuTree()\n {\n $menu = new Menu\\Menu('menuTree');\n\n // Top level.\n $this->p1 = $menu->addItem(new Menu\\Item('p.1'));\n $this->p2 = $menu->addItem(new Menu\\Item('p.2'));\n\n // First level (p1).\n $this->c11 = $this->p1->addChild(new Menu\\Item('c.1.1'));\n $this->c12 = $this->p1->addChild(new Menu\\Item('c.1.2'));\n\n // First level (p2).\n $this->c21 = $this->p2->addChild(new Menu\\Item('c.2.1'));\n $this->c22 = $this->p2->addChild(new Menu\\Item('c.2.2'));\n $this->c23 = $this->p2->addChild(new Menu\\Item('c.2.3'));\n\n // Second level (c.1.1).\n $this->c111 = $this->c11->addChild(new Menu\\Item('c.1.1'));\n }", "public function draw_tree()\n\t\t{\n\t\t\t// First step\n\t\t\t$this->clear_variable();\t\t\t\n\t\t\t//==================================================================\t\t\n\t\t\t// Set of action in display\n\t\t\t//==================================================================\t\t\n\t\t\tswitch ($this->action)\n\t\t\t{\n\t\t\t\tcase 0: // No action\n\t\t\t\t\t$this->build_full_array_expansion();\n\t\t\t\tbreak;\t\n\t\t\t\tcase 1: // Do search\n\t\t\t\t\t$this->search_items();\n\t\t\t\tbreak;\n\t\t\t\tcase 2: // Clear search\n\t\t\t\t\t$this->listexpand = ''; \n\t\t\t\t\t$this->listhighlight = '';\n\t\t\t\t\t$this->message = $_SESSION[$this->ssid]['MT']['global_text'][7]['LT'];\n\t\t\t\tbreak;\n\t\t\t\tcase 3: // No more in use available\n\t\t\t\tbreak;\t\n\t\t\t\tcase 4: // Refresh display\n\t\t\t\t\tif ($this->listhighlight != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->listexpand = $this->listhighlight;\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// No search\n\t\t\t\t\t\t// Keep current listexpand\n\t\t\t\t\t}\n\t\t\t\t\t$this->build_full_array_expansion();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//==================================================================\t\t\n\t\t\t// Build tree\n\t\t\t$this->build_tree();\n\n\t\t\t//==================================================================\n\t\t\t// Manage number of item found in search\n\t\t\t//==================================================================\n\t\t\tif($this->count_item_found != 'none')\n\t\t\t{\n\t\t\t\tif($this->count_item_found == 'NoItemFound')\n\t\t\t\t{\n\t\t\t\t\t$this->message = str_replace('$s',htmlentities($this->inputsearch,ENT_QUOTES,'UTF-8'),$_SESSION[$this->ssid]['MT']['global_text'][5]['LT']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->message = str_replace('$s',htmlentities($this->inputsearch,ENT_QUOTES,'UTF-8'),str_replace('$i',$this->count_item_found,$_SESSION[$this->ssid]['MT']['global_text'][6]['LT']));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t\n\t\t\t//==================================================================\n\t\t\t// Catch mouse event on body div\n\t\t\t//==================================================================\n\t\t\tif(!$this->edit_mode)\n\t\t\t{\n\t\t\t\t$flying_popup = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$flying_popup = ' onmousemove=\"node_move(\\''.$this->internal_id.'\\',event);\" ';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t// Define HTML Div structure\n\t\t\techo '\n\t\t\t<div id=\"'.$this->internal_id.'main\" class=\"'.$this->style.'\">\n\t\t\t\t\n\t\t\t\t<div id=\"'.$this->internal_id.'headbar\" class=\"'.$this->style.'_headbar\">';\n\t\t\t\tif($this->display_version)\n\t\t\t\t{\n\t\t\t\t\techo '\t<div id=\"'.$this->internal_id.'_version\" class=\"'.$this->style.'_version\"';\n\t\t\t\t\tif ($this->enable_ticket_link)\n\t\t\t\t\t{\n\t\t\t\t\t\techo ' style=\"cursor: pointer;\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][27]['LT']).'\\')\" onClick=\"window.open(\\''.$this->application_release.'/bugs\\');\"';\n\t\t\t\t\t}\n\t\t\t\t\techo '>'.$this->application_release.'</div>';\n\t\t\t\t}\t\n\t\t\t\t\techo '<div id=\"'.$this->internal_id.'_search\" class=\"'.$this->style.'_search\">'.$this->search_name.' <input id=\"'.$this->internal_id.'_searchinput\" onkeydown=\"return mt_key_manager(event,\\''.$this->internal_id.'\\')\" type=\"text\" value=\"'.htmlentities($this->inputsearch,ENT_QUOTES,'UTF-8').'\" size=30 maxlength=50></div>\n\t\t\t\t\t<div id=\"'.$this->internal_id.'_bar_button\" class=\"'.$this->style.'_bar_button\">\n\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_search\" class=\"'.$this->style.'_button_search\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][3]['LT']).'\\')\" onClick=\"search_on_tree(\\''.$this->internal_id.'\\')\"></div>\n\t\t\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_bar_navigation\" class=\"'.$this->style.'_bar_navigation\" ';\n\t\t\tif($this->listhighlight != '')\n\t\t\t{\n\t\t\t\t// Always display navigation bar if some items highlighted \n\t\t\t\techo 'style=\"display:block;\"';\t\t\n\t\t\t}\n\t\t\techo '>\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_navigation_first\" class=\"'.$this->style.'_button_navigation_first\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][20]['LT']).'\\')\" onClick=\"navigation_focus(\\''.$this->internal_id.'\\',\\'first\\')\"></div>\n\t\t\t\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_navigation_before\" class=\"'.$this->style.'_button_navigation_before\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][21]['LT']).'\\')\" onClick=\"navigation_focus(\\''.$this->internal_id.'\\',\\'before\\')\"></div>\n\t\t\t\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_navigation_next\" class=\"'.$this->style.'_button_navigation_next\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][22]['LT']).'\\')\" onClick=\"navigation_focus(\\''.$this->internal_id.'\\',\\'next\\')\"></div>\n\t\t\t\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_navigation_last\" class=\"'.$this->style.'_button_navigation_last\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][23]['LT']).'\\')\" onClick=\"navigation_focus(\\''.$this->internal_id.'\\',\\'last\\')\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_off\" class=\"'.$this->style.'_button_collapse\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][2]['LT']).'\\')\" onClick=\"reduce_expand_all(\\''.$this->internal_id.'\\',false)\"></div>\n\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_on\" class=\"'.$this->style.'_button_expand\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][1]['LT']).'\\')\" onClick=\"reduce_expand_all(\\''.$this->internal_id.'\\',true)\"></div>\n\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_refresh\" class=\"'.$this->style.'_button_refresh\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][13]['LT']).'\\')\" onClick=\"refresh_display(\\''.$this->internal_id.'\\',\\''.$this->myfocus.'\\')\"></div>\n\t\t\t\t\t\t';\n\t\t\t\tif($this->doc_user)\n\t\t\t\t{\n\t\t\t\t\techo '<div id=\"'.$this->internal_id.'_button_doc_user\" class=\"'.$this->style.'_button_doc_user\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][28]['ST']).'\\')\" onClick=\"window.open(\\''.$this->application_release.'\\')\"></div>';\n\t\t\t\t}\n\t\t\t\tif($this->doc_tech)\n\t\t\t\t{\n\t\t\t\t\techo '<div id=\"'.$this->internal_id.'_button_doc_tech\" class=\"'.$this->style.'_button_doc_tech\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.$this->javascript_protect($_SESSION[$this->ssid]['MT']['global_text'][29]['ST']).'\\')\" onClick=\"window.open(\\''.$this->application_release.'/indextech.php\\')\"></div>';\n\t\t\t\t}\n\t\t\t\techo ' </div>';\t\t\t\n\t\t\t// Add specific toolbar in update mode\n\t\t\t/*if ($this->edit_mode)\n\t\t\t{\n\t\t\techo '\t\t\t\n\t\t\t\t\t<div id=\"'.$this->internal_id.'_bar_edit\" class=\"'.$this->style.'_bar_edit\">\n\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_add_brother_item\" class=\"'.$this->style.'_button_add_brother_item\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.str_replace(\"'\",\"\\'\",$_SESSION[$this->ssid]['MT']['global_text'][11]['LT']).'\\')\" onClick=\"reduce_expand_all(\\''.$this->internal_id.'\\',true)\"></div>\n\t\t\t\t\t\t<div id=\"'.$this->internal_id.'_button_add_child_item\" class=\"'.$this->style.'_button_add_child_item\" onmouseout=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\'\\')\" onmouseover=\"display_message_tree(\\''.$this->internal_id.'_message\\',\\''.str_replace(\"'\",\"\\'\",$_SESSION[$this->ssid]['MT']['global_text'][12]['LT']).'\\')\" onClick=\"reduce_expand_all(\\''.$this->internal_id.'\\',true)\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t';\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t\techo '\t\n\t\t\t\t<div id=\"'.$this->internal_id.'_message\" class=\"'.$this->style.'_message\">'.$this->message.'</div>\n\t\t\t\t<div id=\"'.$this->internal_id.'search_focus_last\" style=\"display:none;\">'.$this->count_item_found.'</div>\n\t\t\t\t\t\n\t\t\t\t</div>\t\n\t\t\t\t<div id=\"'.$this->internal_id.'head\" '.$flying_popup.' class=\"'.$this->style.'_overflow'.'\">'.$this->html_result.'</div>\n\t\t\t\t<div id=\"'.$this->internal_id.'mask\" class=\"'.$this->style.'_mask\"></div>\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"'.$this->internal_id.'infobulle\" class=\"'.$this->style.'_infobulle\"></div>\n\t\t\t\t\t<div tabindex=1 id=\"'.$this->internal_id.'infobulle_cancel\" class=\"'.$this->style.'_infobulle_cancel\" onclick=\"infobulle_display(\\''.$this->internal_id.'\\')\" onkeydown=\"return input_key_button_infobulle(event,\\''.$this->internal_id.'\\',\\'cancel\\')\"></div>\n\t\t\t\t\t<div tabindex=2 id=\"'.$this->internal_id.'infobulle_ok\" class=\"'.$this->style.'_infobulle_ok\"></div>\n\t\t\t\t\n\t\t\t\t<div id=\"'.$this->internal_id.'main_wait_ajax\" class=\"'.$this->style.'_main_wait_ajax\"></div>\n\t\t\t\t<div id=\"'.$this->internal_id.'wait_ajax\" class=\"'.$this->style.'_wait_ajax\"></div>\n\t\t\t\t\n\t\t\t\t<div id=\"'.$this->internal_id.'move_item\" '.$flying_popup.' class=\"'.$this->style.'_move_item\"></div>\n\t\t\t\t\n\t\t\t</div>';\n\t\t\t\n\t\t}", "function categoryTree($id_parent= 0,$sub_mark =''){\n global $db;\n $query = $db->query(\"SELECT * FROM category WHERE id_parent = $id_parent ORDER BY name DESC \" );\n \n if ($query->num_rows > 0){\n while ($row = $query-> fetch_assoc()){\n \n echo '<option value=\"'.$row['id_c'].'\">'.$sub_mark.$row['name'].'</option>';\n \n categoryTree($row['id_c'],$sub_mark.'---');\n }\n \n }\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\r\n\t\t$indent = str_repeat(\"\\t\", $depth);\r\n\t\t$output .= \"$indent<ul class='children'>\\n\";\r\n\t}", "public function run()\n\t{\n\t\tlist($name,$id)=$this->resolveNameID();\n\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\t\telse\n\t\t\t$this->htmlOptions['name']=$name;\n\t\t\n\t\t//$items = $this->data->roots()->findAll($this->dataCondition, $this->paramsCondition);\n\t\t$items = $this->listRoots;\n\t\t$html = '';\n\t\t$html .= CHtml::openTag('div', array('class' => 'jlb_tree_drop_down_list'));\n\t\t$html .= CHtml::openTag('select', $this->htmlOptions);\n\t\tif (count($items)) {\n\t\t\tforeach($items as $item) {\n\t\t\t\t$htmlOptions = array();\n\t\t\t\t$htmlOptions['value'] = $item->id;\n\t\t\t\tif ($this->model->parent_id == $item->id)\n\t\t\t\t\t$htmlOptions['selected'] = 'selected';\n\t\t\t\t$html .= CHtml::openTag('option', $htmlOptions);\n\t\t\t\t$html .= CHtml::encode($item->name);\n\t\t\t\t$html .= CHtml::closeTag('option');\n\t\t\t\t$descendants = $item->descendants()->findAllByAttributes($this->findByAttributes);\n\t\t\t\t$trees = $item->toArray($descendants);\n\t\t\t\t$html .= $this->renderDropDownList($trees);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$html .= CHtml::tag('option', array('value'=>'root'), 'Root', false);\n\t\t}\n\t\t$html .= CHtml::closeTag('select');\n\t\t$html .= CHtml::closeTag('div');\n\t\techo $html;\n\t\t//Yii::app()->clientScript->registerScript(__CLASS__.'#'.$this->htmlOptions['id'], $this->_getScript(), CClientScript::POS_READY);\n\t}", "public function menu_tree($menu_name)\n {\n return menu_tree($menu_name);\n }", "protected function prepareMenuItemsForRootlineMenu() {}", "function menuPrinter ($file, $list)\n{\n global $mainlist;\n \n // cycle through all the items in the $mainlist array\n \n for ($i = 0; $i < count($mainlist[url]); $i++)\n {\n // we use a 'name' value of \"hidden\" so that certain menu items cause\n // the menu to appear but don't show up themselves -- see the\n // \"CreatureList\" array for an example $mainlist currently doesn't use\n // any but you never know...\n \n if ($mainlist[name][$i] != \"hidden\")\n {\n // $list is empty if no submenu needs to be displayed (see function\n // findFile), so we only create a submenu if $list has a value\n \n if ($list != \"\")\n {\n // knowing that we have to create a submenu, we look for\n // the first item in the sublist ($list)\n \n if ($mainlist[url][$i] == $list[url][0])\n {\n // we print the first item in $list, using printSelected if\n // it matches $file and printBoldUnselected if not\n \n if ($file == $list[url][0]) \n { printSelected ($list[url][0], $list[name][0]); }\n else \n { printBoldUnselected ($list[url][0], $list[name][0]); }\n \n // now we begin to cycle through the items in $list\n \n for ($j = 1; $j < count($list[url]); $j++)\n {\n // again with the \"hidden\" trick\n \n if ($list[name][$j] != \"hidden\") \n {\n if ($file == $list[url][$j]) \n { printSubSelected ($list[url][$j], $list[name][$j]); } // if $file matches\n else \n { printSubUnselected ($list[url][$j], $list[name][$j]); } // if not\n }\n }\n }\n \n //otherwise just print everything as a list item\n \n elseif ($file != $mainlist[\"url\"][$i])\n { printUnselected ($mainlist[url][$i], $mainlist[name][$i]); }\n }\n \n // if $list is empty then we just print the contents of $mainlist\n \n else\n {\n // when we get to the filename that matches our current file,\n // mark it as \"selected\"\n \n if ($file == $mainlist[url][$i])\n { printSelected ($mainlist[url][$i], $mainlist[name][$i]); }\n \n // otherwise just print it as a list item\n \n elseif ($file != $mainlist[url][$i])\n { printUnselected ($mainlist[url][$i], $mainlist[name][$i]); }\n }\n }\n }\n}", "function get_menu_tree($parent_id) \n\t\t{\n\t\t\tinclude_once('connection.php');\n \t$obj=new connection();\n \t$obj->connect();\n\t\t\t$menu='';\n\t\t\t$obj->sql=\"SELECT * FROM register where referral_code='\".$parent_id.\"'\";\n\t\t\t$obj->select($obj->sql);\n\t\t\t//$no1=mysqli_num_rows($obj->res);\n\t\t\twhile($rows1=mysqli_fetch_array($obj->res))\n\t\t\t{\n\t\t\t\t//$rows1=mysqli_fetch_array($obj->res);\n\t\t\t\t$menu.=\"<li>\". $rows1['name'];\n\t\t\t\t$menu.=\"<ul>\".get_menu_tree($rows1['rid']).\"</ul>\";\n\t\t\t\t$menu.=\"</li>\";\n\t\t\t}\n\t\t\treturn $menu;\n\t\t}", "function cms_frontend_menu_tree__menu_frontend_main_menu(&$variables) {\n return '<div class=\"container\"><ul class=\"global-menu menu nav navbar-nav\">' . $variables['tree'] . '</ul></div>';\n}", "protected function generateModuleMenu() {}", "public function run() {\n $menus = [\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '0',\n 'body' => 'Main Navigation',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '1',\n 'icon' => 'home',\n 'name' => 'dashboard',\n 'uri' => 'admin',\n 'title' => 'Go to Dashboard',\n 'body' => 'Dashboard'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '5.1',\n 'icon' => 'group',\n 'name' => 'user',\n 'uri' => 'admin/user',\n 'title' => 'User Management',\n 'body' => 'Users'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9',\n 'body' => 'Settings',\n 'type' => 'separator'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1',\n 'name' => 'setting',\n 'icon' => 'gear',\n 'uri' => '',\n 'title' => 'Pengaturan Website',\n 'body' => 'Pengaturan',\n 'type' => 'parent'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.2',\n 'name' => 'menu',\n 'icon' => 'bars',\n 'uri' => 'admin/menu',\n 'title' => 'Pengaturan Menu',\n 'body' => 'Menus'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.3',\n 'icon' => 'key',\n 'name' => 'permission',\n 'uri' => 'admin/permission',\n 'title' => 'Roles & Permissions',\n 'body' => 'Permissions'\n ],\n [\n 'module_target' => 'sidebar-admin',\n 'position' => '9.1-1',\n 'name' => 'setting',\n 'icon' => '',\n 'uri' => 'admin/setting/global/update',\n 'title' => 'Pengaturan Global',\n 'body' => 'Global'\n ]\n ];\n\n for ($i = 0; $i < count($menus); $i++) {\n $menus[$i] = factory(\\App\\Menu::class)->create($menus[$i]);\n }\n\n $menus[0]->roles()->attach(3);\n $menus[1]->roles()->attach(3);\n $menus[2]->roles()->attach(2);\n $menus[3]->roles()->attach(2);\n $menus[4]->roles()->attach(2);\n $menus[5]->roles()->attach(1);\n $menus[6]->roles()->attach(1);\n $menus[7]->roles()->attach(1);\n }", "protected function menus()\n {\n\n }", "function minorite_menu_tree__secondary($variables) {\n return '<ul class=\"nav\" id=\"nav-secondary\">' . $variables['tree'] . '</ul>';\n}", "function start_lvl(&$output, $depth){\n\t\t// depth dependent classes\n\t\t$indent = ($depth > 0 ? str_repeat( \"\\t\", $depth ) : ''); // code indent\n\t\t$display_depth = ( $depth + 1); // because it counts the first submenu as 0\n\t\t$classes = array(\n\t\t\t'sub-menu',\n\t\t\t($display_depth >=2 ? 'sub-sub-menu' : '')\n\t\t);\n\t\t$class_names = implode(' ', $classes);\n\t \n\t\t// build html\n\t\t$output .= \"\\n\" . $indent . '<ul class=\"'.$class_names.'\">' . \"\\n\";\n\t}", "function captogov_childtree($nid,$menu='main-menu') {\n $tree = menu_tree_all_data($menu);\n $mlid = db_select('menu_links' , 'ml')\n ->condition('ml.link_path', 'node/'.$nid)\n ->condition('ml.menu_name', $menu)\n ->fields('ml' , array())\n ->range(0, 1)\n ->execute()\n ->fetchAll();\n $mlidValue = $mlid[0]->mlid;\n $children = check_menu_array($tree, $mlidValue);\n $rendered_teasers = \"\";\n if(isset($children) && gettype($children) == \"array\") {\n foreach($children as $child){\n $nid = str_replace(\"node/\", \"\", drupal_get_normal_path($child['link']['link_path']));\n $child_nodes = node_view(node_load($nid), 'compact');\n $rendered_teasers .= render($child_nodes);\n }\n }\n return $rendered_teasers;\n}", "function createMenu($data, $htmlOptions = array()) {\r\n $this->htmlTree .= Html::beginTag('ul', $htmlOptions);\r\n foreach ($data as $item) {\r\n $this->htmlTree .= Html::beginTag('li') . Html::a($item['title'], $item['url']);\r\n if (isset($item['children']) AND !empty($item['children']))\r\n $this->createMenu($item['children']);\r\n $this->htmlTree .= Html::endTag('li');\r\n }\r\n $this->htmlTree .= Html::endTag('ul');\r\n return $this->htmlTree;\r\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\n\t\t$indent = str_repeat( \"\\t\", $depth );\n\t\t$submenu = ($depth > 0) ? ' sub-menu' : '';\n\t\t$output\t .= \"\\n$indent<ul class=\\\"dropdown-menu$submenu depth_$depth\\\">\\n\";\n\n\t}", "public function renderMenu()\n {\n echo \"<ul class=\\\"sidebar-menu\\\">\\n\";\n foreach ($this->_menus as $menu) {\n if (count($menu->subMenu()) == 0) {\n echo \"<li \".$this->is_li_class_active($menu->getLinks()).\">\\n\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \"<i class=\\\"\".$menu->getIcon().\"\\\"></i> <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \"</a>\\n\";\n echo \"</li>\\n\";\n } else {// we are in the case of a treeview\n echo \"<li class=\\\"treeview\".$this->is_treeview_Opened($menu->getLinks()).\"\\\">\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \" <i class=\\\"\".$menu->getIcon().\"\\\"></i>\\n\";\n echo \" <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \" <i class=\\\"fa fa-angle-left pull-right\\\"></i>\\n\";\n if (count($menu->getBadges()) > 0) {\n foreach ($menu->getBadges() as $badge) {\n if ($badge['id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" id=\\\"\".$badge['id'].\"\\\">\".$badge['value'].\"</small>\\n\";\n } else if ($badge['data-id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" data-id=\\\"\".$badge['data-id'].\"\\\">\".$badge['value'].\"</small>\\n\"; \n } else {\n echo \"<small class=\\\"\".$badge['class'].\"\\\">\".$badge['value'].\"</small>\\n\";\n }\n }\n }\n echo \"</a>\\n\";\n echo \"<ul \".$this->is_treeview_menu_open($menu->getLinks()).\">\\n\";\n $this->addSubMenu($menu->subMenu());\n echo \"</ul>\\n\";\n echo \"</li>\\n\";\n } \n }\n echo \"</ul>\\n\";\n }", "function get_menu($kode_menu, $level){\n $sql = 'SELECT user_menu.* FROM `user_akses` INNER JOIN `user_level` ON (`user_akses`.`level` = `user_level`.`level`) \n INNER JOIN `user_menu` ON (`user_akses`.`kode_menu` = `user_menu`.`kode_menu`) WHERE user_akses.`level`=\"'.$level.'\" \n GROUP BY `user_menu`.`parent` ORDER BY user_menu.`parent` ASC';\n $result=$this->db->query($sql);\n $parent_kode_menu = $this->get_parent_menu($kode_menu);\n \n $menu = '';\n \n if($result->num_rows()>0){\n foreach ($result->result() as $temp){\n if(empty($temp->parent)){\n $parent = $this->get_menu_detail($temp->kode_menu)->row();\n \n $parent_active='';\n if($parent->kode_menu==$parent_kode_menu){\n \t\t\t\t\t$parent_active=' active ';\n \t\t\t\t}\n }else{\n $parent = $this->get_menu_detail($temp->parent)->row();\n \n $parent_active='';\n if($parent->kode_menu==$parent_kode_menu){\n \t\t\t\t\t$parent_active=' active ';\n \t\t\t\t}\n }\n \n $sql_child = 'SELECT user_menu.* FROM `user_akses` INNER JOIN `user_level` ON (`user_akses`.`level` = `user_level`.`level`) \n INNER JOIN `user_menu` ON (`user_akses`.`kode_menu` = `user_menu`.`kode_menu`) WHERE user_akses.`level`=\"'.$level.'\" \n AND user_menu.`tipe`=1 AND user_menu.parent=\"'.$parent->kode_menu.'\" ORDER BY user_menu.`urutan` ASC';\n $result_child = $this->db->query($sql_child);\n \n $menu_child = '';\n $menu_child_count = 0;\n if($result_child->num_rows()>0){\n $menu_child = $menu_child.'<ul class=\"treeview-menu\">';\n foreach ($result_child->result() as $child){\n $child_active='';\n if($kode_menu==$child->kode_menu){\n $child_active='active';\n }\n $menu_child = $menu_child.'\n <li class=\"'.$child_active.'\"><a href=\"'.site_url().'/'.$child->url.'\"><i class=\"fa fa-circle-o\"></i> '.$child->nama_menu.'</a></li>\n ';\n \n $menu_child_count++;\n }\n $menu_child = $menu_child.'</ul>';\n }\n \n $menu = $menu.'\n <li class=\"treeview '.$parent_active.'\">\n <a href=\"'.site_url().'/'.$parent->url.'\">\n \t\t\t\t\t<i class=\"'.$parent->icon.'\"></i>\n \t\t\t\t\t<span>'.$parent->nama_menu.'</span>';\n if($menu_child_count>0){\n $menu = $menu.'<i class=\"fa fa-angle-left pull-right\"></i>';\n }\n \n $menu = $menu.'</a>';\n \n $menu = $menu.'\n '.$menu_child;\n \n $menu = $menu.'</li>';\n }\n }\n \n return $menu;\n }", "function wimbase_menu_tree__menu_top_tasks($variables) {\n return '<div class=\"menu-wrapper\"><ul class=\"menu nav\">' . $variables['tree'] . '</ul></div>';\n}", "function start_lvl( &$output, $depth ) {\n\t\t// depth dependent classes\n\t\t$indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n\t\t$display_depth = ( $depth + 1); // because it counts the first submenu as 0\n\t\t$classes = array('child');\n\t\t$class_names = implode( ' ', $classes );\n\t\n\t\t// build html\n\t\t$output .= \"\\n\" . $indent . '<ul class=\"' . $class_names . '\">' . \"\\n\";\n\t}", "function start_lvl(&$output, $depth) {\n // depth dependent classes\n $indent = ( $depth > 0 ? str_repeat(\"\\t\", $depth) : '' ); // code indent\n\n // build html\n $output .= \"\\n\" . $indent . '<ul class=\"dropdown\">' . \"\\n\";\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n // depth dependent classes\n $indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n $display_depth = ( $depth + 1); // because it counts the first submenu as 0\n $classes = array(\n 'sub-menu',\n ( $display_depth % 2 ? 'menu-odd' : 'menu-even' ),\n ( $display_depth >=2 ? 'sub-sub-menu' : '' ),\n 'menu-depth-' . $display_depth\n );\n $class_names = implode( ' ', $classes );\n \n // build html\n $output .= \"\\n\" . $indent . '<ul class=\"' . $class_names . '\">' . \"\\n\";\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n // depth dependent classes\n $indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n $display_depth = ( $depth + 1); // because it counts the first submenu as 0\n $classes = array(\n 'sub-menu',\n ( $display_depth % 2 ? 'menu-odd' : 'menu-even' ),\n ( $display_depth >=2 ? 'sub-sub-menu' : '' ),\n 'menu-depth-' . $display_depth\n );\n $class_names = implode( ' ', $classes );\n \n // build html\n $output .= \"\\n\" . $indent . '<ul class=\"' . $class_names . '\">' . \"\\n\";\n}", "public function mostrarMenu( ) {\n $this->setMenuOn(true);\n $this->enviarMenu();\n\n }", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->id() == $this->current->id() ) {\n $this->menu[]=$item;\n $this->appendChildren();\n } else if ( $item->parent_id() == $this->current->parent_id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "function SetTreeData($data){\n $this->InitControl($data);\n\n }", "function doDisplay()\n {\n $criteria = new lmbSQLCriteria('is_branch = 1');//lmbSQLFieldCriteria('is_branch', 1);\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n }", "public function output()\n {\n echo \"<{$this->container} class='{$this->class}'>\";\n echo $this->menuHtml;\n echo \"</{$this->container}>\";\n }", "function wp_print_plugin_file_tree($tree, $label = '', $level = 2, $size = 1, $index = 1)\n {\n }", "public function getTreeOutput(){\n \n if(!$this->treeoutput)\n $this->setTreeOutput();\n \n return $this->treeoutput;\n }", "function mainMenu()\r\n{\r\n echo \"\\n========= MAIN MENU ============\\n\";\r\n echo \"1.root\\n2.Admin\\n3.customer\\n\";\r\n}", "function start_lvl( &$output, $depth ) {\n\t\t// depth dependent classes\n\t\t$indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n\t\t$display_depth = ( $depth + 1); // because it counts the first submenu as 0\n\t\t$classes = array('child');\n\t\t$class_names = implode( ' ', $classes );\n\n\t\t// build html\n\t\t$output .= \"\\n\" . $indent . '<ul class=\"' . $class_names . '\">' . \"\\n\";\n\t}", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t// depth dependent classes\n\t\t$indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n\t\t$display_depth = ( $depth + 1); // because it counts the first submenu as 0\n\t\t$classes = array(\n\t\t\t'sub-menu',\n\t\t\t( $display_depth % 2 ? 'menu-odd' : 'menu-even' ),\n\t\t\t( $display_depth >=2 ? 'sub-sub-menu' : '' ),\n\t\t\t'menu-depth-' . $display_depth\n\t\t\t);\n\t\t$class_names = implode( ' ', $classes );\n\t \n\t\t// build html\n\t\t$output .= \"\\n\" . $indent . '<ul class=\"' . $class_names . '\">' . \"\\n\";\n\t}", "function setMenu($kode_jabatan){\r\n\t\t \r\n\t\t \r\n\t\t$sql = \" SELECT M.KODE_MENU , M.NAMA_MENU, M.KODE_MENU_INDUK, MJ.KODE_MENU as KODE_MENU_MJ FROM EP_MS_MENU M \r\n\t\t\t\t\tLEFT JOIN (SELECT KODE_MENU FROM EP_MS_MENU_JABATAN WHERE KODE_JABATAN = \".$kode_jabatan.\" ) MJ ON M.KODE_MENU = MJ.KODE_MENU\t\r\n\t\t\t\t\tSTART WITH M.KODE_MENU = 0 \r\n\t\t\t\t\tCONNECT BY PRIOR M.KODE_MENU = M.KODE_MENU_INDUK \r\n\t\t\t\t\tORDER BY M.URUT \";\r\n \t\t\r\n \t\t$query = $this->db->query($sql);\r\n \t\t\r\n\t\t$arrModule = array(); \r\n\t\t$xml = new DOMDocument( \"1.0\", \"ISO-8859-15\" );\t \r\n\t\t// $this->addLi($xml, 0,\"\", \"T\" , \"Menu Management\",\"\",\"\");\r\n\t\tforeach ($query->result_array() as $row)\r\n\t\t{\r\n\t\t\t // $arrModule[$row['KODE_MENU']] = $row['NAMA_MENU'];\r\n\t\t\t \r\n\t\t\t if ( $row['KODE_MENU_INDUK'] == 0 ) {\r\n\t\t\t\t$this->addLi($xml, $row['KODE_MENU'] ,$row['KODE_MENU_INDUK'], \"F\" , $row['NAMA_MENU'],\"\" . \"href\" , $row['KODE_MENU_MJ'] );\r\n\t\t\t } else {\r\n\t\t\t\t//$this->addLi($xml, $row['KODE_MENU'] ,'00000000', \"D\" , $row['NAMA_MENU'],\"\" . \"href\");\r\n\t\t\t\t$this->addLi($xml, $row['KODE_MENU'] , $row['KODE_MENU_INDUK'] , \"D\" , $row['NAMA_MENU'], \"\" , $row['KODE_MENU_MJ']);\r\n\t\t\t\t//$this->addLi($xml, $row['mod_code'], substr($row['mod_code'],0,2) . '000000' , \"D\" , $row['mod_name'], base_url() .\"index.php/\" . $row['mod_url']);\r\n\t\t\t }\r\n\t\t}\r\n\t\t$str = $xml->saveXML();\r\n\t\t\r\n\t\treturn $str;\t\r\n\t\t \r\n \r\n\t}", "function wp_print_theme_file_tree($tree, $level = 2, $size = 1, $index = 1)\n {\n }", "function start_el(&$output, $item, $depth, $args){\n $item->title = str_repeat(\"&nbsp;\", $depth * 4).$item->title;\n\n\n\n $output .= $indent . ' id=\"menu-item-'. $item->ID . '\"' . $value . $class_names .'>'; \n $attributes = ! empty( $item->attr_title ) ? ' title=\"' . esc_attr( $item->attr_title ) .'\"' : ''; \n $attributes .= ! empty( $item->target ) ? ' target=\"' . esc_attr( $item->target ) .'\"' : ''; \n $attributes .= ! empty( $item->xfn ) ? ' rel=\"' . esc_attr( $item->xfn ) .'\"' : ''; \n $attributes .= ! empty( $item->url ) ? ' value=\"' . esc_attr( $item->url ) .'\"' : ''; \n \n $item_output .= '<option'. $attributes .'>'; \n $item_output .= $args->link_before .apply_filters( 'the_title', $item->title, $item->ID ); \n $item_output .= '</option>'; \n \n $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); \n\n\n\n // no point redefining this method too, we just replace the li tag...\n $output = str_replace('<li', '<option', $output);\n }" ]
[ "0.74459684", "0.73401934", "0.7000974", "0.6971639", "0.687586", "0.67948323", "0.67288136", "0.67284083", "0.6727923", "0.6727923", "0.66981566", "0.666226", "0.66375524", "0.6573268", "0.65616155", "0.65614253", "0.65428555", "0.65063876", "0.649541", "0.6465559", "0.6420596", "0.64198804", "0.64183354", "0.6390742", "0.63579136", "0.6342816", "0.6342816", "0.6342816", "0.6342816", "0.6342816", "0.6342816", "0.6340675", "0.6334587", "0.6318454", "0.63171965", "0.63124114", "0.6309968", "0.62944704", "0.62497216", "0.6239139", "0.62155366", "0.6202629", "0.62003654", "0.6196797", "0.6196247", "0.61909956", "0.61656404", "0.61650664", "0.61197555", "0.6117604", "0.61080176", "0.61077935", "0.6102626", "0.6081578", "0.607512", "0.606128", "0.605948", "0.60537565", "0.6052416", "0.60471886", "0.60306436", "0.60191286", "0.60114497", "0.60114175", "0.60079604", "0.6007238", "0.60007536", "0.60006547", "0.59970534", "0.5995053", "0.59637016", "0.5963606", "0.5955254", "0.59456706", "0.59301597", "0.5922306", "0.5920986", "0.59132296", "0.5910525", "0.5902167", "0.58841634", "0.5882354", "0.58769387", "0.5872824", "0.5865245", "0.58627117", "0.58627117", "0.5859118", "0.58590394", "0.5856678", "0.58547306", "0.5853424", "0.5853362", "0.58439505", "0.5839049", "0.5831786", "0.58286494", "0.58281714", "0.58142334", "0.58102447" ]
0.8216575
0
Display a listing of the usuario. GET|HEAD /usuarios
public function index(Request $request) { $usuarios = $this->usuarioRepository->all( $request->except(['skip', 'limit']), $request->get('skip'), $request->get('limit') ); return $this->sendResponse($usuarios->toArray(), 'Usuarios retrieved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listarUsuariosAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$usuario = $em->getRepository('TheClickCmsAdminBundle:Usuarios')->findAll();\n\t\treturn $this->render('TheClickCmsAdminBundle:Default:listarUsuarios.html.twig', array('usuario' => $usuario));\n\t}", "public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }", "public function listausuarios(){\n $user = Usuario::with('rol')->paginate(15);\n $lista_usuarios = compact('user'); \n\n return $this->sendResponse($lista_usuarios, 'Listado de usuarios devueltos con éxito');\n\n }", "public function indexUsuarioAction() {\n $em = $this->getDoctrine()->getManager();\n $query = 'SELECT * FROM usuario;';\n $statement = $em->getConnection()->prepare($query);\n $statement->execute();\n $usuarios = $statement->fetchAll();\n\n return $this->render(\"BcBundle:Usuario:indexUsuario.html.twig\", array(\n \"usuarios\" => $usuarios\n ));\n }", "public function index()\n {\n $user = User::all();\n return $this->sendResponse($user, 'Lista de usuarios', 200);\n }", "public function generate_users_list()\n {\n $this->get('/usuarios')->assertStatus(200)->assertSee('Pedro');\n }", "public function index()\n {\n $users = $this->repository->all($columns = ['*']);\n return $this->success($users, trans('messages.users.getListSuccess'));\n }", "function loadUsersListPage()\n {\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Listado de usuarios')\n ->assertSee('Javier')\n ->assertSee('Francisco');\n }", "public function index()\n {\n $usuarios = User::simplePaginate(10);\n return view('admin.usuarios', compact(\"usuarios\"));\n }", "public function index()\n {\n $users = User::all();\n\n return view('documents::usuarios.listarUsuarios', compact('users'));\n }", "public function index()\n {\n $usuarios = dev_Usuario::get();\n return $usuarios;\n }", "public function index()\n {\n $tiposUsuarios = TipoUsuario::all();\n\n return $this->showAll($tiposUsuarios);\n }", "public function index()\n {\n $users = User::paginate();\n\n return view('automotores.usuarios.index', compact('users'));\n }", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $usuarios = $em->getRepository('RegistroEventosCoreBundle:Usuario')->findAll();\n\n return $this->render('RegistroEventosCoreBundle:Usuario:index.html.twig', array(\n 'usuarios' => $usuarios\n ));\n }", "public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "public function listAction(){\n $r=$this->getRequest();\n $query=Doctrine_Query::create()\n ->select(\"uo.orgid, u.ID, u.nome,u.cognome,u.user,u.active,u.data_iscrizione,r.role\")\n ->from(\"Users u\")\n ->leftJoin(\"u.Role r\")\n ->leftJoin(\"u.UsersOrganizations uo\")\n ->where(\"uo.orgid=\".$r->getParam('orgid'))\n ->addWhere(\"uo.active=\".Constants::UTENTE_ATTIVO);\n list($users,$total)=DBUtils::pageQuery($query,array(),$this->getLimit(),$this->getOffset());\n $this->emitTableResult($users,$total);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Usuarios::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function lista() { // Aqui define o ação: /users/lista\n $usuarios = new Users(); // Aqui carrega o model: Users\n $dados['usuarios'] = $usuarios->getUsuarios();\t\n if(isset($_GET['id']) && !empty($_GET['id'])) {\t\n $this->loadTemplate('user_contact', $dados);\n }else { $this->loadTemplate('users_list', $dados);\n }\n }", "public function index()\n {\n $repository = new UsuarioRepository; \n return $repository->findAll();\n }", "public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render('users_list.html.twig', array('users' => $users));\n }", "public function index()\n {\n $query = User::all();\n\n //con resources api\n return UsersResource::collection($query)->additional([\n 'response' => true,\n 'message' => 'Los usuarios fueron listados.'\n ]);\n }", "public function lista2() { // Aqui define o ação: /users/lista\n $usuarios = new Users(); // Aqui carrega o model: Users\n $dados['usuarios'] = $usuarios->getUsuarios();\t\n if(isset($_GET['id']) && !empty($_GET['id'])) {\t\n $this->loadTemplate('usuario', $dados);\n }\n }", "public function index()\n {\n // show list user\n }", "public function showUsers()\n {\n $userRepo = $this->getDoctrine()->getRepository(User::class);\n $users = $userRepo->getUsersOrderByAsc();\n\n return $this->render('admin/list-of-users.html.twig', [\n 'users' => $users\n ]);\n }", "public function index()\n {\n $usuarios = Usuario::all();\n $config = Configuracion::all()->first();\n return (view('usuario.listadoUsuarios')->with('usuarios', $usuarios)->with('config', $config));\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index(){\n\t\t$usuarios = $this->User->find('all');\n\t\t$this->set('usuarios', $usuarios);\n\t}", "public function index()\n {\n\n if (Auth::user()->administrador) {\n $usuarios = User::all();\n }\n return $this->enviarRespuesta($usuarios, 'usuarios recuperados con exito');\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'titulo_sin' => $this->titulo_sin,\n 'titulo_plu' => $this->titulo_plu,\n ]);\n }", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function showUsers()\n {\n $title = 'Usuários';\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $users = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $users,\n ]);\n }\n\n return view('users.list-users', compact('title', 'users'));\n }", "public function show(User $usuarios)\n {\n //\n }", "public function index() //mostra usuários\n {\n $users = $this->repository->paginate(); //usa paginação, sem nenhum param, a paginação tem no max 15 elementos\n return view('admin.users.index', compact('users'));\n //compact acessa todas as variaveis de users, seria o mesmo de ['users' => $users]\n\n }", "public function index()\n {\n return $this->respond(User::_(User::all()->toArray()));\n }", "public function indexAction()\n {\n $userLogIn = $this->getUser();\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render(\n 'Ums/user/index.html.twig', \n array(\n 'users' => $users,\n 'sec' => array(\n 'role' => $userLogIn->getPru()->getPruName(),\n 'name' => $userLogIn->getUsrFullName(),\n 'grant' => $userLogIn->getUsrGrantList(),\n 'id' => $userLogIn->getUsrId(),\n )\n ));\n }", "public function index()\n\t{\n\t\t$usuarios = User::paginate(10);\n\n\t\treturn view('backend.modules.usuarios.manage.index', compact('usuarios'));\n\t}", "public function index() {\n $usuarios = User::orderBy('nome')->get();\n foreach ($usuarios as $key => $value) {\n $value->situacao = Situacao::getDescricao($value->situacao);\n }\n return view('fuse.cadastros.usuarios.index', compact('usuarios'));\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioQuery();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "function getIndex($usuarios)\n {\n $html = new HTML();\n $tpl = new IUGOTemplate(\"admin/user/index.html\");//ubicacion del html con el contenido\n $tpl = $this->generateCommonAssigns($tpl,$html);\n $tpl->assign(\"js_usuario\", $html->includeJs('views/admin/user/index'));\n $tpl->assign(\"msg_error\", Session::instance()->getAndClearFlash());\n \n\n foreach ($usuarios as $usuario)\n {\n $tpl->newBlock(\"listado\");\n $tpl->assign(\n array(\"id\"=>$usuario['User']['id'],\n \"usuario\"=>$usuario['User']['usuario'],\n \"nombre\"=>$usuario['User']['nombre'],\n \"edit\"=>$html->link($html->image('admin/16x16/new.png','Edit User'),'admin/user/add/'.$usuario['User']['id']),\n \"img_delete\"=>$html->image('admin/16x16/delete.png','Delete User')\n ));\n }\n\n $tpl->gotoBlock(\"_ROOT\");\n\n return $tpl;\n }", "public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }", "public function index()\n\t{\n\t\t$users = \\App\\User::All();\n\t\treturn view('usuario.index',compact('users'));\n\t\n\t}", "public function index()\n {\n $this->user_list();\n }", "public function index(Request $request) {\n \n\n $listusu = UsuarioModel::get();\n $data['listusu'] = $listusu;\n\n $data['list'] = array();\n $html = view('usuario.index', $data);\n return Authenticate::logged($request, $html);\n }", "public function index()\n {\n $user = Usuario::with('aparelhos')->paginate(5);\n\n return view('usuarios', compact('user'));\n }", "public function actionIndex()\n {\n\n $roles = Yii::$app->session['rol-exito'];\n\n $usuarios = Usuario::find()->orderBy(['apellidos' => SORT_ASC])->all();\n\n return $this->render('index', [\n 'usuarios' => $usuarios,\n\n ]);\n }", "public function index()\n {\n //\n $lista_usuarios = Usuario::paginate(3);\n return view('admin.lista_usuarios',['usuarios'=>$lista_usuarios]);\n }", "public function index()\n {\n\t\t$subtitulo = 'Lista de Usuarios Activos';\n\t\t$usuarios = User::with('roles')->get();\n\t\t\n\t\t//se retorna la vista \"listaUsuarios\" \n\t\treturn view('administracion.listaUsuarios', ['subtitulo' => $subtitulo, 'usuarios' => $usuarios, 'estado' => $estado]);\n }", "public function index()\n {\n $users = User::orderBy('full_nombre', 'ASC')->paginate(10);\n $roles = Rol::orderBy('rol', 'ASC')->pluck('rol', 'id')->toArray();\n\n return view('administrador.usuarios.index', compact('users', 'roles'));\n }", "public function index()\n {\n $usuarios = User::with('role','perfiles','notas')->get();\n\n return view('usuarios.index',compact('usuarios'));\n }", "public function usuarios() \r\n {\r\n $rolController = new App\\Controllers\\RolController;\r\n $roles = $rolController->getAllRoles();\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n $users = $userController->getAllUsers();\r\n\r\n require_once 'view/users/index.php';\r\n }", "public function index()\n {\n if (Gate::check('crear-usuario') || Gate::check('editar-usuario')) {\n $usuarios = User::whereHas('roles', function ($query) {\n $query->where('slug', '!=', 'aprendiz');\n })->get();\n\n $tipoRol = 'otros';\n\n return view('panel_administracion.users.listar', compact('usuarios', 'tipoRol'));\n } else {\n return redirect('/');\n }\n }", "public function index() /*Este metodo me ayuda a buscar los usuarios que hay en la base de datos y los listara*/\n {\n $empresas = DB::table('empresas')\n ->orderBy('id','ASC')\n ->paginate(100);\n\n return view('buscar_usuario')->with('empresas', $empresas);\n\n\n }", "public function index()\n {\n $usuarios = User::select('users.id', 'users.rut', 'users.dv', 'users.nombre', 'users.apellido_paterno', 'users.email', 'users.estado', 'users.nombre_usuario', 'perfil_usuarios.perfil')->join('perfil_usuarios', 'users.perfil_id', '=', 'perfil_usuarios.id')->orderBy('users.id')\n ->paginate(17);\n // dd($usuarios);\n $request = new Request;\n return view('administrador_usuario.administrador_usuario', compact('usuarios', 'request'));\n }", "public function index()\n {\n $usuarios=User::all();\n return view('panel.usuario.usuarios',compact('usuarios'));\n }", "public function list() {\n $users = User::orderBy('name')->paginate(10);\n $repository = new Repository(compact('users'));\n \n $layout = Layout::blank([\n Layout::view('vendor.platform.users.list')\n ]);\n \n return $layout->build($repository);\n }", "public function index(){\r\n if($_SESSION[\"inicio\"] == true){\r\n $usuarios = User::all();\r\n return Vista::crear(\"admin.usuario.listado\",array(\r\n \"usuarios\"=>$usuarios\r\n ));\r\n }else{\r\n return redirecciona()->to(\"/\");\r\n }\r\n }", "public function index(Request $request) {\n \n // Permissao\n $this->repository->authorize('listing');\n \n // Breadcrumb\n $this->bc->addItem('Listagem');\n \n // Filtro da listagem\n if (!$filtro = $this->getFiltro()) {\n $filtro = [\n 'filtros' => [\n 'inativo' => 1,\n ],\n 'order' => [[\n 'column' => 3, \n 'dir' => 'ASC'\n ]],\n ];\n }\n \n // retorna View\n return view('usuario.index', ['bc'=>$this->bc, 'filtro'=>$filtro]);\n }", "public function index()\n {\n $this->checkPermission('listar_usuarios');\n $users = $this->user->all();\n //$this->authorize('listar_usuarios', $users);\n //auth()->user()->can('listar_usuarios', $users);\n// if(Gate::denies('listar_usuarios', $users))\n// abort(403,'acesso não autorizado');\n \n// if(Gate::denies('listar_usuarios', $users))\n// return redirect()->back();\n \n return view('user.index', compact('users'));\n }", "public function listAction()\n {\n /* Get User logged */\n $user = $this->get('security.context')->getToken()->getUser();\n\n /* Get List of users */\n $users = $this->container->get('theseus.user_manager')->getList();\n\n $array = [];\n $datas = array();\n foreach($users as $user)\n {\n $data['id'] = $user->getId();\n $data['firstname'] = $user->getFirstname();\n $data['lastname'] = $user->getLastname();\n if($user->getBirthday() != null) {\n $data['birthday'] = $user->getBirthday()->format('Y-m-d');\n } else {\n $data['birthday'] = '';\n }\n $data['phone'] = $user->getPhone();\n $data['created_at'] = $user->getCreatedAt()->format('Y-m-d H:i:s');\n $address = $user->getAddress();\n\n if($address != null) {\n\n $userAdddress['address'] = $address->getAddress();\n $userAdddress['city'] = $address->getCity();\n $userAdddress['country'] = $address->getCountry();\n $userAdddress['additionalAddress'] = $address->getAdditionalAddress();\n \n $data['address'] = $userAdddress;\n } else {\n $data['address'] = null;\n }\n $groups = array();\n foreach($user->getGroups() as $group) {\n $role = $group->getRoles();\n $groups[] = $role[0];\n $data['group'][] = $role;\n }\n $data['group'] = $groups;\n $datas[] = $data;\n }\n \n $array['data'] = $datas;\n \n return new JsonResponse($array);\n }", "public function list ()\n {\n if (User::isLoggedIn() && User::getLoggedInUser()->is_admin === true) {\n\n // Alle User aus der DB laden\n $users = User::all();\n\n // Passenden View laden und User übergeben\n View::load('admin/users', [\n 'users' => $users\n ]);\n } else {\n \n // Wenn kein User eingeloggt ist, dann leider wir auf die Login Seite \n header(\"Location: login\");\n }\n }", "public function usersListAction()\n\t{\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\n\t\t$users = $em->getRepository('McmsUserBundle:User')->findAll();\n\n\t\treturn array('users' => $users);\n\t}", "public function index()\n {\n $this->userlist();\n }", "public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }", "public function indexAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t\n\t\t\t$user = Zend_Auth::getInstance()->getIdentity();\n\t\t\tif($user->role == 'user') {\n\t\t\t\t$this->view->lista = $db->fetchAll($db->select()->from('inwestycje')->order('sort ASC')->where('id IN('.$user->inwestycje.')'));\n\t\t\t} else {\n\t\t\t\t$this->view->lista = $db->fetchAll($db->select()->from('inwestycje')->order('sort ASC'));\n\t\t\t}\n\t\t}", "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "public function show(Usuarios $usuarios) {\n//\n }", "public function showAllUsers()\n {\n // añadir condicion de if para admins y clients\n $tipo = request()->get('tipo');\n if (isset($tipo))\n {\n if ($tipo == 'administradores') {\n $users = User::all()->where('is_admin', 1);\n } else {\n $users = User::all()->where('is_admin', 0);\n }\n } else {\n $users = User::all();\n }\n return view('users.list', compact('users'));\n }", "public function listUsers() {\n \t$data['users'] = User::all();\n \treturn view('backend.users.index', $data);\n }", "public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}", "public function indexAction()\n {\n $listing = $this->listing( 'Panel\\Listing\\Users');\n\n return array( 'listing' => $listing );\n }", "public function listAction()\n {\n $users = $this->container->get( 'wg.openid.user_manager' )->findUsers();\n return $this->container->get('templating')->renderResponse(\n 'WGOpenIdUserBundle:Profile:list.html.twig', array(\n 'users' => $users,\n ));\n }", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index', compact('usuarios'));\n }", "public function index()\n {\n $usuarios = User::get();\n return view('users.index', compact('usuarios'));\n }", "public function listarUsua(){\n\t\t$sql=\"SELECT USUARI_ID, USUARI_NOMBRES, USUARI_USUARIO\n\t\t FROM usuario ORDER BY USUARI_NOMBRES\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index')->with('usuarios',$usuarios);\n }", "public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }", "public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "public function index()\n {\n //\n $_users = User::all();\n return view('admin.users.list', ['users' => $_users ]);\n }", "public function index()\n {\n $users= User::All();\n return view('usuario.index', compact('users'));\n }", "function index(){\n // o objeto a ser utilizado posteriormente na view \n $dados['usuarios'] = $this->UsuarioModel->listarUsuarios();\n \n // Carregando o header\n $this->load->view('templates/header', $dados);\n\n // Carrega a view e mostra os dados da tabela usuario\n $this->load->view('lista_usuarios', $dados);\n\n }", "public function index()\n {\n $this->authorize('view_users_content', User::class);\n $users = User::all();\n return response([ 'users' => USERResource::collection($users), 'message' => 'Retrieved successfully'], 200);\n \n }", "public function index()\n {\n return view('admin.users.index', ['users' => $this->repository->getSortableListViaPagination()]);\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $utilisateurs = $em->getRepository('UserBundle:Utilisateur')->findAll();\n\n return $this->render('utilisateur/index.html.twig', array(\n 'utilisateurs' => $utilisateurs,\n ));\n }", "private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}", "function ListaUsuario() {\n\t\n\t\t\t$sql = \"SELECT usu.*, CONCAT_WS(' ', per.primer_nombre, per.primer_apellido) as nombre_completo, usu.nombre_usuario, rol.descripcion FROM usuario usu\n\t\t\t\t\tINNER JOIN rol rol ON rol.id = usu.rol_id\n\t\t\t\t\tINNER JOIN persona per ON per.id = usu.persona_id\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen registros de roles.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}", "public function index()\n {\n $usuarios = User::orderBy('id', 'DESC')->paginate(6);\n\n return View::make('usuario.index', compact('usuarios'));\n }", "public function index()\n {\n\t\tif(Auth::user()->rol->permisos->contains(4))\n\t\t{\n\t\t\t$prmUsuario = Usuario::paginate(5);\t\t\n\t\t\treturn view('admin.usuario.index',compact('prmUsuario'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn abort(401);\n\t\t}\n }", "public function index()\n {\n $users = User::all();\n return view('usuario.index',compact('users'));\n }", "public function index(){\n\t\treturn view(Config::get('boxtar.viewUsers'))->with('users', User::latest()->get());\n\t}", "public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}", "public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}", "public function index()\n {\n return UsuarioResource::collection(Usuario::all());\n }", "function listuser(){\n\t\t\tif(!empty($_GET['paginado'])){\n\t\t\t\t$pag = $_GET['paginado'];\n\t\t\t\t$list = $this -> model -> selectuser($pag);\n\t\t\t}else{\n\t\t\t\t$list = $this -> model -> selectuser();\n\t\t\t}\n\t\t\t$this -> ajax_set($list);\n\t\t}", "public function index(){\n // Listar a todos los usuarios agregando paginacion\n $users=User::orderBy('id','ASC')->paginate(5);\n // Devolvemos la vista con los usuarios\n return view('admin.user.index')->with('users', $users);\n }" ]
[ "0.8237987", "0.7894338", "0.779039", "0.77085334", "0.77069235", "0.76667064", "0.7635397", "0.7629959", "0.7616057", "0.7614678", "0.7600047", "0.75940025", "0.7577003", "0.7568033", "0.7568033", "0.75564915", "0.7545871", "0.7543463", "0.7524099", "0.75187844", "0.7504789", "0.7497443", "0.74958915", "0.74887836", "0.74708986", "0.74693626", "0.74634707", "0.74620837", "0.7456648", "0.74453497", "0.74453497", "0.7439219", "0.7437507", "0.7434552", "0.74193156", "0.7410491", "0.74056363", "0.7384443", "0.7379217", "0.7369973", "0.73658764", "0.7365256", "0.7361281", "0.73595303", "0.7353183", "0.7342288", "0.73324364", "0.7328102", "0.7320426", "0.73170614", "0.731271", "0.7311604", "0.73095536", "0.730576", "0.73038644", "0.7292009", "0.72893757", "0.7284553", "0.7283012", "0.7282201", "0.7280995", "0.7277624", "0.7272469", "0.727136", "0.7271318", "0.72618693", "0.7250129", "0.724947", "0.72490054", "0.7248684", "0.7245899", "0.724053", "0.72375387", "0.72299355", "0.7222708", "0.72193086", "0.7214496", "0.7200393", "0.7198189", "0.7197581", "0.71914643", "0.7186135", "0.71774805", "0.7176305", "0.7173402", "0.71722513", "0.7168973", "0.71669436", "0.7166401", "0.7163054", "0.7162948", "0.7158854", "0.71525884", "0.7152575", "0.7150748", "0.71495694", "0.71488124", "0.71481514", "0.71455723", "0.71450967", "0.714402" ]
0.0
-1
Store a newly created usuario in storage. POST /usuarios
public function store(CreateusuarioAPIRequest $request) { $input = $request->all(); //TODO: error_log(json_encode($input)); $input["rol"] = $this->loadRol($input["rol"]); $input["fecha_nacimiento"] = $this->loadFechaNacimiento($input); $input['password'] = Hash::make($input['password']); $usuario = $this->usuarioRepository->create($input); return $this->sendResponse($usuario->toArray(), 'Usuario saved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(CreateUsuarioRequest $request)\n {\n $empresa_id = $request->EMPRESA_ID;\n $codigoProveedorSap = $request->codigoProveedorSap;\n //dd($request->all());\n\n $usuario = new User();\n\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->tel_codpais = $request->tel_codpais;\n $usuario->telefono = $request->telefono;\n //$usuario->usersap_id = $request->usersap_id;\n $usuario->activo = $request->activo;\n $usuario->anulado = $request->anulado;\n\n if ($usuario->anulado === null) {\n $usuario->anulado = 0;\n }\n\n $usuario->save();\n\n /** Esto debe ser reubicado queda pendiete\n UsuarioEmpresa::insert( ['USER_ID' => $usuario->id, 'EMPRESA_ID' => $empresa_id, 'CODIGO_PROVEEDOR_SAP' => $codigoProveedorSap, 'ANULADO' => 0] );\n **/\n\n return redirect::to('usuarios');\n\n }", "public function store(StoreUsuarioRequest $request)\n {\n $usuario = new Usuario;\n\n $existe = Usuario::find($request->usuario_id);\n\n if ($existe == null)\n {\n $usuario->nombre = $request->nombre;\n $usuario->id = $request->usuario_id;\n $usuario->save();\n }\n else\n {\n return redirect(route('usuarios.index'));\n }\n return redirect(route('usuarios.index'));\n }", "public function store(UsuarioRequest $request)\n {\n //\n $usuario = new User;\n $usuario->nombre=$request->get('nombre');\n $usuario->apellido=$request->get('apellido');\n $usuario->rut=$request->get('rut');\n $usuario->rol='Vendedor';\n $usuario->telefono=$request->get('telefono');\n $usuario->email=$request->get('email');\n $usuario->password=bcrypt($request->get('password'));\n \n $usuario->save();\n return Redirect::to('local/usuario');\n }", "public function store(Request $request) {\n //Creamos variable tipo usuario y gurdamos lo enviado desde el cliente\n $usu = new Usuario();\n $usu->nombre = $request->nombre;\n $usu->usuario = $request->usuario;\n $usu->contraseña = $request->contraseña;\n $usu->edad = $request->edad;\n $usu->mostrar = $request->mostrar;\n $usu->foto = $request->foto;\n //Guardamos en bd\n $usu->save();\n\n //Guardamos en array las necesidades del usuario\n $id = $request->necesidades;\n $a = array();\n foreach ($id as $value) {\n $a[] = $value[\"idNecesidad\"];\n }\n //Añadimos en la tabla entre usuarios y necesidades ('usuario_has_necesidad'), las necesidades enviadas por cliente\n for($i=0; $i<count($a); $i++) {\n $usu->necesidades()->attach($a[$i]);\n }\n //Devolvemos el usuario creado\n $usua=new Usuario();\n $usua->idUsuario = $usu->idUsuario;\n $usua->nombre = $usu->nombre;\n $usua->usuario = $usu->usuario;\n $usua->contraseña = $usu->contraseña;\n $usua->mostrar = $usu->mostrar;\n $usua->edad = $usu->edad;\n return Response::json($usua, 201);\n\n }", "public function store(UsuarioCreateRequest $request)\n {\n User::create($request->all());\n return redirect('/usuario')->with('mensaje', 'Usuario creado exitosamente');\n }", "public function store(CreateusuarioRequest $request)\n {\n PermissionController::temPermissao('usuarios.update');\n $input = $request->all();\n\n $input['password'] = Hash::make($input['password']);\n\n $usuario = $this->usuarioRepository->create($input);\n\n DB::insert('insert into role_user (role_id, user_id, created_at, updated_at) values (?, ?, ?, ?)', [$request->nivelAcesso, $usuario->id, date(\"Y-m-d H:i:s\"), date(\"Y-m-d H:i:s\")]);\n\n Flash::success('Usuario salvo com sucesso.');\n\n return redirect(route('usuarios.index'));\n }", "public function store(Request $request)\n {\n $request->validate([\n 'usuario' => 'required',\n 'legajo' => 'required'\n ]);\n $usuarios = new Usuario([\n 'nom_user'=> $request->get('usuario'),\n 'leg_user'=> $request->get('legajo'),\n 'id_subarea'=> 1\n ]);\n $usuarios->save();\n return redirect('/usuarios')->with('success', 'Se ha guardado un nuevo usuario');\n }", "public function store(UserNuevoRequest $request)\n {\n $user = new User();\n $user->name = $request->input('name');\n $user->lastname = $request->input('lastname');\n $user->email = $request->input('email');\n $user->password = Hash::make($request->input('password'));\n $user->remember_token = str_random(100);\n $user->save();\n /**\n * El Metodo attachRole Guarda el Rol_id en la tabla role_user con el user_id\n */\n $user->attachRole(Role::find(Input::get('rol')));\n flash('El registro ha sido agregado')->success()->important();\n return redirect()->route('users.index');\n }", "public function store(Createregistro_usuariosRequest $request)\n {\n\n $input = $request->all();\n\n $registroUsuarios = $this->registroUsuariosRepository->create($input);\n\n Flash::success('Registro Usuarios saved successfully.');\n\n return redirect(route('registroUsuarios.index'));\n }", "public function store(UserCreateRequest $request)\n {\n $user=$request['nombre'];\n $u=strtoupper($user[0]).strtolower($request['apellido']);\n User::create([\n 'nombre' => trim(strtoupper($request['nombre'])),\n 'apellido' => trim(strtoupper($request['apellido'])),\n 'ci' => $request['ci'],\n 'telef1' => $request['telef1'],\n 'telef2' => $request['telef2'],\n 'direccion' => trim(strtoupper($request['direccion'])),\n 'email' => trim(strtoupper($request['email'])),\n 'password' => bcrypt($u),\n 'name_user' => $u,\n 'rol' => $request['rol'],\n ]);\n Session::flash('message', 'Los datos se guardaron exitosamente');\n return Redirect::to('/usuario');\n }", "public function store(CrearUsuarioRequest $request)\n {\n \\App\\Usuario::create([\n 'nombre'=>$request['nombre'],\n 'id_ciudad'=>$request['ciudad'],\n 'correo'=>$request['correo']\n ]);\n\n return redirect('/usuario');\n }", "public function store(Request $request)\n {\n $usuario = new Usuario();\n $usuario->usuario = $request->usuario;\n $usuario->password = bcrypt($request->password);\n $usuario->nombre = $request->nombre;\n $usuario->apellido = $request->apellido;\n $usuario->tipoDocumento = $request->tipoDocumento;\n $usuario->numeroDocumento = $request->numeroDocumento;\n $usuario->email = $request->email;\n $usuario->telefono = $request->telefono;\n $usuario->rol_id = $request->rol;\n $usuario->ubicacion_id = $request->ubicacion;\n $usuario->habilitado = $request->habilitado;\n $usuario->save();\n Flash::success('Usuario creado con éxito!');\n return (redirect()->route('usuarios'));\n }", "public function store(UsuarioRequest $request)\n {\n $persona=new Persona();\n $persona->nombre= $request->nombre;\n $persona->apellido1= $request->apellido1;\n $persona->apellido2= $request->apellido2;\n $persona->cedula= $request->cedula;\n $persona->genero= $request->genero; \n $persona->telefono= $request->telefono;\n $persona->domicilio= $request->domicilio;\n $persona->save();\n\n\n $usuario=new Usuario();\n $usuario->rol_id=$request->rol_id;\n $usuario->email=$request->email;\n $usuario->password=bcrypt($request->password);\n $usuario->persona_id=persona::get()->max('id');\n \n $usuario->save();\n return back()->with('info','El usuario se registro exitosamente');\n }", "public function store(){\n //comprueba que llegur el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $usuario= new Usuario();\n //guardar la info del formulario\n \n //user, pass, nombre, apellidos, email, direccion, poblacion, provincia, cp\n $usuario->user= $_POST['user'];\n $usuario->pass= $_POST['pass'];\n $usuario->nombre= $_POST['nombre'];\n $usuario->apellidos= $_POST['apellidos'];\n $usuario->email= $_POST['email'];\n $usuario->direccion= $_POST['direccion'];\n $usuario->poblacion= $_POST['poblacion'];\n $usuario->provincia= $_POST['provincia'];\n $usuario->cp= $_POST['cp'];\n \n if(!$usuario->guardar()) //guarda el usuario en la bdd\n throw new Exception(\"No se pudo guardar $usuario->nombre\");\n \n // preparar un mensaje global\n $GLOBALS['mensaje']= \"Guardado del usuario $usuario->user correcto.\";\n \n //llevar a los detalles del usuario\n $this->show($usuario->id); \n }", "public function store(UserRequest $request)\n {\n $lineasInvestigacion = $request->get('lineaInvestigacion');\n\n $usuario = new User();\n $usuario->nombre = $request->get('nombre');\n $usuario->email = $request->get('email');\n $usuario->tipoDocumento = $request->get('tipoDocumento');\n $usuario->numeroDocumento = $request->get('numeroDocumento');\n $usuario->numeroCelular = $request->get('numeroCelular');\n $usuario->tipoVinculacion = $request->get('tipoVinculacion');\n $usuario->profesion = $request->get('profesion');\n $usuario->lineaInvestigacion()->associate($lineasInvestigacion);\n // Subir foto\n if ($request->hasFile('foto')) {\n $foto = $request->file('foto');\n Storage::putFileAs(\n 'public/fotos-usuarios', $foto, $foto->getClientOriginalName()\n );\n $usuario->foto = 'fotos-usuarios/'.$foto->getClientOriginalName();\n }\n // $usuario->password = bcrypt('admin123'); // Eliminar\n if ($request->get('tipoContrasena') == 'contrasenaNumeroDocumento') {\n $usuario->password = bcrypt($request->input('numeroDocumento')); // Encriptar número de cédula\n } elseif ($request->get('tipoContrasena') == 'contrasenaManual') {\n $usuario->password = bcrypt($request->get('password'));\n }\n\n $idRol = $request->get('rol_user');\n $usuario->save();\n\n $usuario->roles()->attach($idRol);\n\n return redirect()->route('usuarios.index')\n ->with('status', \"El usuario {$usuario->nombre} fue agregado con éxito\");\n }", "public function store(Request $request)\n {\n $usuario = new Usuario;\n $usuario->cpf = $request->cpf;\n $usuario->ativo = $request->ativo;\n $usuario->tipoAcesso = $request->tipoAcesso;\n $usuario->nome = $request->nome;\n $usuario->fone = $request->fone;\n $usuario->celular = $request->celular;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n// $usuario->created_at = $request->created_at;\n// $usuario->updated_at = $request->updated_at;\n $usuario->remember_token = $request->remember_token;\n// dd($usuario);\n $usuario-> save();\n return redirect()->route('usuarios.index')->with('message', 'Usuário Criado Com Sucesso');\n }", "public function store()\n {\n //registrar\n //dd(request()->all()); ver que reciba\n // $u=$request->usuario;\n // return $u;\n $usuario=new Usuario;\n \t$usuario->usuario=request()->usuario;\n \t$usuario->password=bcrypt(request()->contrasena);\n $usuario->rol_id=request()->rol;\n $usuario->save();\n return back();\n // return view('docentes.docente_registro');\n }", "public function store(Request $request)\n {\n $user = new Usuario();\n $user->nome_usuario = $request->input('nome_usuario');\n $user->login = $request->input('login_usuario');\n $user->email = $request->input('email_usuario');\n $user->senha = $request->input('senha_usuario');\n $user->tempo_expiracao_senha = $request->input('validade_senha_usuario');\n $user->cod_autorizacao = $request->input('codg_auth');\n $user->status_usuario = $request->input('status_usuario');\n $user->save();\n return redirect('/');\n }", "public function store(SalvarUsuarioRequest $request)\n {\n // Se for dentista preciso validar se foi selecionado ao menos uma especialidade\n if ($request->fk_tipo_usuario == 3) {\n if (!isset($request->clinico_geral) && !isset($request->implantodontia) && !isset($request->odontopediatria) && !isset($request->orofacial) && !isset($request->ortodontia)) {\n return redirect()->back()->with('especialidade', 'Por favor, selecione ao menos uma especialidade')->withInput();\n }\n }\n\n $usuario = new Usuario();\n $usuario->fk_empresa = Auth::user()->fk_empresa;\n $usuario->fk_tipo_usuario = $request->fk_tipo_usuario;\n $usuario->nome = $request->nome;\n $usuario->cpf = Helper::deixaApenasNumeros($request->cpf);\n $usuario->data_nascimento = $request->data_nascimento;\n $usuario->email = $request->email;\n $usuario->celular = $request->celular;\n $usuario->login = $request->login;\n $usuario->senha = Hash::make($request->senha);\n $usuario->save();\n LogSistemaController::logSistemaTipoInsert('usuarios', $usuario);\n\n $endereco = new Endereco_usuario();\n $endereco->fk_empresa = Auth::user()->fk_empresa;\n $endereco->fk_usuario = $usuario->id;\n $endereco->fk_cidade = $request->cidade;\n $endereco->cep = $request->cep;\n $endereco->logradouro = $request->logradouro;\n $endereco->numero = $request->numero;\n $endereco->bairro = $request->bairro;\n $endereco->complemento = $request->complemento;\n $endereco->save();\n LogSistemaController::logSistemaTipoInsert('endereco_usuarios', $endereco);\n\n $usuario_mm_empresa = new Usuario_mm_empresa();\n $usuario_mm_empresa->fk_usuario = $usuario->id;\n $usuario_mm_empresa->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_empresa->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_empresas', $usuario_mm_empresa);\n\n if ($request->fk_tipo_usuario == 3) {\n $usuario_mm_esp = new Usuario_mm_especialidade();\n $usuario_mm_esp->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_esp->fk_usuario = $usuario->id;\n $usuario_mm_esp->fk_especialidade = 1;\n\n if (isset($request->clinico_geral)) {\n $usuario_mm_esp['ativo'] = 1;\n } else {\n $usuario_mm_esp['ativo'] = 0;\n }\n\n $usuario_mm_esp->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_especialidade', $usuario_mm_esp);\n }\n if ($request->fk_tipo_usuario == 3) {\n $usuario_mm_esp = new Usuario_mm_especialidade();\n $usuario_mm_esp->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_esp->fk_usuario = $usuario->id;\n $usuario_mm_esp->fk_especialidade = 2;\n\n if (isset($request->ortodontia)) {\n $usuario_mm_esp['ativo'] = 1;\n } else {\n $usuario_mm_esp['ativo'] = 0;\n }\n\n $usuario_mm_esp->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_especialidade', $usuario_mm_esp);\n }\n if ($request->fk_tipo_usuario == 3) {\n $usuario_mm_esp = new Usuario_mm_especialidade();\n $usuario_mm_esp->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_esp->fk_usuario = $usuario->id;\n $usuario_mm_esp->fk_especialidade = 3;\n\n if (isset($request->implantodontia)) {\n $usuario_mm_esp['ativo'] = 1;\n } else {\n $usuario_mm_esp['ativo'] = 0;\n }\n\n $usuario_mm_esp->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_especialidade', $usuario_mm_esp);\n }\n if ($request->fk_tipo_usuario == 3) {\n $usuario_mm_esp = new Usuario_mm_especialidade();\n $usuario_mm_esp->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_esp->fk_usuario = $usuario->id;\n $usuario_mm_esp->fk_especialidade = 4;\n\n if (isset($request->odontopediatria)) {\n $usuario_mm_esp['ativo'] = 1;\n } else {\n $usuario_mm_esp['ativo'] = 0;\n }\n\n $usuario_mm_esp->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_especialidade', $usuario_mm_esp);\n }\n if ($request->fk_tipo_usuario == 3) {\n $usuario_mm_esp = new Usuario_mm_especialidade();\n $usuario_mm_esp->fk_empresa = Auth::user()->fk_empresa;\n $usuario_mm_esp->fk_usuario = $usuario->id;\n $usuario_mm_esp->fk_especialidade = 5;\n \n if (isset($request->orofacial)) {\n $usuario_mm_esp['ativo'] = 1;\n } else {\n $usuario_mm_esp['ativo'] = 0;\n }\n\n $usuario_mm_esp->save();\n LogSistemaController::logSistemaTipoInsert('usuario_mm_especialidade', $usuario_mm_esp);\n }\n\n return redirect('/usuarios')->with('success', 'Sucesso!');\n }", "public function store()\n {\n $this->authorize('create', User::class);\n\n $validated = request()->validate([\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:255|min:5|unique:users',\n 'email' => 'nullable|string|max:255|email|unique:users',\n 'password' => 'required|string|min:8',\n 'roles' => 'required|array',\n 'roles.*' => 'exists:roles,id',\n 'projects' => 'required|array|min:1',\n 'projects.*' => 'nullable|exists:projects,id',\n 'timezone' => 'required|timezone',\n 'phone' => 'nullable|string',\n ]);\n\n $user = User::make($validated);\n\n $user->password = Hash::make($validated['password']);\n $user->save();\n\n $user->roles()->sync($validated['roles']);\n $user->projects()->sync($validated['projects']);\n\n return redirect()->route('users.index')->with('message', 'Новый пользователь успешно создан!');\n }", "public function store(Request $request){\n $usuarios = new Usuario();\n\n $usuarios->nombre = $request->nombre;\n $usuarios->apellido_pat = $request->apell_pat;\n $usuarios->apellido_mat = $request->apell_mat;\n $usuarios->edad = $request->edad;\n $usuarios->pais = $request->pais;\n $usuarios->cod_postal = $request->codigo_postal;\n $usuarios->direccion = $request->direccion;\n\n $usuarios->save();\n\n return redirect()->route('usuarios.show', $usuarios);\n\n }", "public function store( UserRequest $request )\n {\n $data = $request->except('_token');\n //encripgrafa a senha\n $data['password'] = Hash::make($data['password']);\n //cria um user e ja instancia ele\n $user = User::create($data);\n //flash mensagem top\n $request->session()->flash('mensagemAlerta', \"Usuario \". $user->name .\" cadastrado com sucesso!\" );\n\n return redirect()->route('usuarios.index');\n }", "public function store(Request $request)\n {\n $owner = Auth:: User()->id;\n $data = $request->all();\n\n $usuario = new User;\n $usuario -> name = $data['name'];\n $usuario -> lastname = $data['lastname'];\n $usuario -> email = $data['email'];\n $usuario -> password = Hash::make($data['password']);\n $usuario -> rol = $data['rol'];\n $usuario -> estado = 'Activo';\n $usuario -> user_id_creacion = $owner;\n $usuario -> save();\n\n return redirect('/usuarios');\n }", "public function store()\n {\n $datos = Input::all();\n\n $reglas = [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required',\n 'type' => 'required|in:admin,user',\n ];\n\n $validar = Validator::make($datos, $reglas);\n\n if ($validar->passes()) {\n $usuario = new User($datos);\n $usuario->save();\n\n return Redirect::route('usuario.index')->with('exito', 'El usuario fue creado');\n } else {\n return Redirect::back()->withInput()->withErrors($validar);\n }\n }", "public function store(Request $request) {\n $usuario = new Usuario();\n $usuario->nome = $request->nome;\n $usuario->email = $request->email;\n $usuario->telefone = $request->telefone;\n\n $usuario->save();\n return redirect()->route(\"user.create\");\n }", "public function store(CreateUsuariosRequest $request)\n\t{\n $input = $request->all();\n\n\t\t$usuarios = $this->usuariosRepository->store($input);\n\n\t\tFlash::message('Usuarios saved successfully.');\n\n\t\treturn redirect(route('usuarios.index'));\n\t}", "public function store(CreateUserRequest $request)\n {\n $data = $request->except('_token');\n\n $usuario = User::create($data);\n\n foreach ($data['perfiles'] as $perfil)\n {\n $usuario->perfiles()->attach($perfil);\n }\n\n return redirect()->route('usuarios.index')\n ->with('info','el usuario fue creado correctamente :)');\n }", "public function store(Request $request)\n {\n $validacion = $request->validate([\n 'usu_username'=>'required|min:2|max:50',\n 'usu_password'=>'required|min:2|max:50',\n 'usu_email'=>'required|min:2|max:50',\n 'usu_nombres'=>'required|min:2|max:50',\n 'usu_apellidos'=>'required|min:2|max:50',\n ]);\n\n //CON MODELO\n $usuario = new Usuario();\n $usuario->usu_username = $request->input('usu_username');\n $usuario->password = Hash::make($request->input('usu_password'));\n $usuario->usu_email = $request->input('usu_email');\n $usuario->usu_nombres = $request->input('usu_nombres');\n $usuario->usu_apellidos = $request->input('usu_apellidos');\n $usuario->usu_foto = '/storage/foto_usuarios/default_foto_usuarios.jpg';\n $usuario->usu_rol = 2;\n $usuario->save();\n //return redirect('/categorias');\n return view('publico.registro_usuario_ok', ['usuario'=>$request->input('usu_username'), 'password'=>$request->input('usu_password')]);\n }", "public function store(UserRequest $request)\n {\n $this->repository->create($request->all());\n\n //manter o usuário na anterior\n $url = $request->get('redirect_to',route('codeeduuser.users.index'));\n $request->session()->flash('message','Usuário cadastrado com sucesso');\n return redirect()->to($url);\n }", "public function store(FormUserCreateRequest $request)\n {\n $user = new User();\n $user->name = $request->name;\n $user->surname = $request->surname;\n $user->email = $request->email;\n $user->role = $request->role;\n $user->department_id = $request->department;\n $user->active = $request->active;\n $user->password = Hash::make($request->password);\n $saved = $user->save();\n if($saved)\n return response()->json(['success' => true, 'message' => 'Usuario registrado exitosamente.'], 200);\n }", "public function store(UsuariosRequest $request)\n {\n $usuario = $this->usuarios->create($request->all());\n $this->usuarios->save($usuario);\n return redirect()->route('usuarios.index')->with(['msg' => 'Usuário criado com sucesso!']);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'string|max:191',\n 'email' => 'required|string|email|max:191|unique:users',\n 'password' => 'required|string|min:6'\n ]);\n\n $user = User::create([\n 'name' => $request->nome.' '.$request->apelido,\n 'email' => $request->email,\n 'tipo' => \"Gestor\",\n 'password' => Hash::make($request['password'])\n ]);\n\n if ($user) {\n $endereco = endereco::create([\n 'pais' => $request->nacionalidade,\n 'provincia' => $request->naturalidade,\n 'distrito' => $request->naturalidade,\n 'bairro' => $request->bairro,\n 'avenida' => $request->avenida,\n 'quarteirao' => $request->quarteirao,\n 'numero' => $request->numero\n ]);\n $contacto = contacto::create([\n 'email' => $request->email,\n 'celular' => $request->celular\n ]);\n $utilizador = utilizador::create([\n 'nome' => $request->nome,\n 'apelido' => $request->apelido,\n 'data_nascimento' => $request->d_nasc,\n 'tipo_utilizador_idtipo_utilizador' => 2,\n 'users_id' => $user->id,\n 'contacto_idcontacto' => $contacto->idcontacto,\n 'foto_idfoto' => 1,\n 'endereco_idendereco' => $endereco->idendereco\n ]);\n }\n\n return $utilizador;\n \n }", "public function store(Request $request)\n {\n $correoUsuario = $request->input('correoUsuario');\n\n $users = User::where(\"email\", \"=\", $correoUsuario)->get();\n\n if($users->count() > 0)\n {\n return back()->with('errorCrearUsuario', 'El Usuario Ya Existe!');\n }\n else\n {\n $user = new User;\n $user->name = $request->input('nombreUsuario');\n $user->email = $request->input('correoUsuario');\n $user->password = bcrypt($request->input('claveUsuario'));\n $user->id_perfil = $request->input('perfil');\n $user->save();\n return redirect()->route('Usuarios.index')->with('creacionUsuario', 'El Usuario Se Creo Con Exito!');\n }\n }", "public function store(EmpresaFormRequest $request)\n {\n $user = new User;\n $user->email = $request->input('mail');\n $user->password = bcrypt( $request->input('password') );\n $user->rol = \"coordinador\";\n $user->save();\n $user = User::where('email', $request->input('mail'))->first();\n\n $empresa=new Empresa;\n //'nombre' es obj creado del request\n $empresa->Nombre=$request->get('Nombre');\n $empresa->Giro=$request->get('Giro');\n $empresa->Direccion=$request->get('Direccion');\n $empresa->Telefono=$request->get('Telefono');\n $empresa->condicion='1';\n $empresa->users_id = $user->id;\n $empresa->save();\n //Después de guardar nos redireccionamos a la carpeta coordinador\n return Redirect::to('revolution/empresa'); \n }", "public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required',\n ]);\n $user = User::create($attributes);\n\n // Auth facades\n auth()->login($user);\n }", "public function store(UsuarioFormRequest $request){\n \n $usuario = new User;\n $usuario->nombre=$request->get('nombre');\n $usuario->email=$request->get('email');\n $usuario->password=bcrypt($request->get('password'));\n $usuario->estado=\"Activo\";\n $usuario->rol=$request->get('rol');\n $usuario->save();\n \n \n return Redirect::to('sispazysalvos/usuario');\n }", "public function store(userCreateRequest $request)\n {\n //return $request->all();\n //User::create($request->all());\n User::create([\n 'usuario'=>$request['usuario'],\n 'name'=>$request['name'],\n 'email'=>$request['email'],\n 'password'=>$request['password'],\n 'admin'=>$request['admin']\n ]);\n return redirect('/usuario')->with('message', 'Usuario creado correctamente');\n }", "public function store(EstudianteCreateRequest $request)\n {\n $request->validate();\n\n try\n {\n DB::beginTransaction();\n\n /**\n * Registrar el acudiente\n */\n if ($request->has('acudiente_id'))\n {\n $acudiente_id = $request->acudiente_id;\n }\n else\n {\n /**\n * Registrar el usuario acudiente\n */\n $usuarioAcudiente = User::create([\n 'nombre' => trim(\"{$request->nomb_acud} {$request->pape_acud} {$request->sape_acud}\"),\n 'email' => $request->corr_acud,\n 'password' => $request->docu_acud,\n 'estado' => Estado::activo(),\n ]);\n\n /**\n * Obtener el rol acudiente\n */\n $roleAcudiente = Role::where('slug', SpecialRole::acudiente())->value('id');\n\n /**\n * Asignar rol al usuario acudiente\n */\n $usuarioAcudiente->syncRoles([$roleAcudiente]);\n\n $request->merge([\n 'user_id' => $usuarioAcudiente->id,\n ]);\n\n $acudiente = Acudiente::create($request->only('tipo_docu', 'docu_acud', 'nomb_acud', 'pape_acud', 'sape_acud', 'sexo_acud', 'dire_acud', 'barr_acud', 'corr_acud', 'tele_acud', 'prof_acud', 'user_id'));\n\n $acudiente_id = $acudiente->id;\n }\n\n /**\n * Registrar el usuario estudiante\n */\n $usuarioEstudiante = User::create([\n 'nombre' => trim(\"{$request->nomb_estu} {$request->pape_estu} {$request->sape_estu}\"),\n 'email' => $request->corr_estu,\n 'password' => $request->docu_estu,\n 'estado' => Estado::activo(),\n ]);\n\n /**\n * Obtener el rol estudiante\n */\n $roleEstudiante = Role::where('slug', SpecialRole::estudiante())->value('id');\n\n /**\n * Asignar rol al usuario estudiante\n */\n $usuarioEstudiante->syncRoles([$roleEstudiante]);\n\n /**\n * Registrar el estudiante\n */\n $estudiante = new Estudiante;\n $estudiante->tipo_docu = $request->tipo_docu_estu;\n $estudiante->docu_estu = $request->docu_estu;\n $estudiante->nomb_estu = $request->nomb_estu;\n $estudiante->pape_estu = $request->pape_estu;\n $estudiante->sape_estu = $request->sape_estu;\n $estudiante->sexo_estu = $request->sexo_estu;\n $estudiante->fech_naci = $request->fech_naci;\n $estudiante->dire_estu = $request->dire_estu;\n $estudiante->barr_estu = $request->barr_estu;\n $estudiante->corr_estu = $request->corr_estu;\n $estudiante->tele_estu = $request->tele_estu;\n $estudiante->padr_estu = $request->padr_estu;\n $estudiante->madr_estu = $request->madr_estu;\n $estudiante->pare_acud = $request->pare_acud;\n $estudiante->cole_prov = $request->cole_prov;\n $estudiante->eps_estu = $request->eps_estu;\n $estudiante->copi_docu = $request->file('copi_docu')->store('', 'estudiante');\n\n if ($request->hasFile('copi_grad'))\n {\n $estudiante->copi_grad = $request->file('copi_grad')->store('', 'estudiante');\n }\n\n $estudiante->tipo_estu = $request->tipo_estu;\n\n if ($request->hasFile('carn_vacu'))\n {\n $estudiante->carn_vacu = $request->file('carn_vacu')->store('', 'estudiante');\n }\n\n $estudiante->foto_estu = $request->file('foto_estu')->store('', 'estudiante.foto');\n $estudiante->obse_estu = $request->obse_estu;\n $estudiante->acudiente_id = $acudiente_id;\n $estudiante->sub_grado_id = $request->sub_grado_id;\n $estudiante->user_id = $usuarioEstudiante->id;\n $estudiante->save();\n\n DB::commit();\n\n toast('¡El estudiante ha sido registrado correctamente!', 'success', 'top-right');\n\n return redirect()->route('estudiantes.edit', $estudiante->id);\n\n }\n catch (\\Symfony\\Component\\HttpKernel\\Exception\\HttpException $e)\n {\n DB::rollback();\n\n toast('¡Se ha producido un error al registrar el estudiante!', 'error', 'top-right');\n\n return redirect()->back()->withInput();\n\n }\n catch (\\Exception $e)\n {\n DB::rollback();\n\n toast('¡Se ha producido un error al registrar el estudiante!', 'error', 'top-right');\n\n return redirect()->back()->withInput();\n }\n }", "public function store(Request $request)\n {\n $request['status'] = \"ativo\";\n\n Usuário::create($request->all());\n return redirect('/admin/usuario/cadastro')->with('success', 'O usuário');\n }", "public function store()\n\t{\n\n\t\t$campos['nombres'] = Input::get('nombres');\n $campos['apellidos'] = Input::get('apellidos');\n $campos['email'] = Input::get('email');\n $campos['telefono'] = Input::get('telefono');\n $campos['password'] = Input::get('password');\n $campos['password_confirmation'] = Input::get('password_confirmation');\n\n\t\t$validacion=Validator::make($campos,\n [\n 'nombres'=>'required',\n 'apellidos'=>'required',\n 'email'=>'required',\n 'telefono'=>'required',\n 'password'=>'required',\n 'password_confirmation'=>'required'\n \n\n ]);\n if($validacion->fails()){\n\n return Redirect::back()->withInput()->withErrors($validacion);\n }\n\n\t\tValidaAccesoController::validarAcceso('usuarios','escritura');\n\t\t$usuario = new Usuarios;\n\t\t$_POST['perfil'] = null;\n\t\t$perfil = Perfiles::where('perfil','=','administrador')->get();\n\t\tif(is_null($perfil)){\n\t\t\treturn Redirect::route('ErrorIndex','default');\n\t\t}\n\t\t$perfil = $perfil->toArray();\n\t\t\n\t\t$inputs = Input::all();\n\t\t#se guarda el perfil del administrador\n\t\t$inputs['perfil'] = $perfil[0]['id'];\n\t\n\t\tif( $usuario->validSave($inputs)){\n\t\t\treturn Redirect::route('usuarios.index');\n\t\t}else{\n\t\t\treturn Redirect::route('usuarios.create')->withInput()->withErrors($usuario->errores);\n\t\t}\n\t}", "public function store(UserRequest $request)\n {\n $user = new User();\n $user->name = $request->get('name');\n $user->lastname = $request->get('lastname');\n $user->email = $request->get('email');\n $user->password = bcrypt($request->get('password'));\n $user->id_estado = $request->get('id_estado');\n $user->save();\n\n $sedes = $request->input('sedes')? $request->input('sedes') : [];\n $user->sedes()->sync($sedes);\n\n $roles = $request->input('roles') ? $request->input('roles') : [];\n $user->assignRole($roles);\n\n return response([\n 'msg' => 'Usuario registrado correctamente.',\n 'title' => '¡Registro exitoso!'\n ], 200)// 200 Status Code: Standard response for successful HTTP request\n ->header('Content-Type', 'application/json');\n }", "public function store(UserCreateRequest $request)\n {\n $this->checkAdmin();\n\n $this->userRepository->store($request->all());\n\n return redirect()->route('users.index')->withOk(\"L'utilisateur a été créer.\");\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'nome' => 'required|min:2|max:60',\n 'email' => 'required|email|unique:usuario',\n 'password' => 'required|min:6',\n 'telefone' => 'required|min:8'\n ]);\n \n $usuario = Usuario::create([\n 'nome' => $request->nome,\n 'email' => $request->email,\n 'password' => bcrypt($request->password),\n 'telefone' => $request->telefone,\n 'ativo' => 1\n ]);\n \n if ($usuario) {\n \n $dados = ['email' => $request->email, 'password' => $request->password];\n \n if (Auth()->guard('usuario')->attempt($dados)) {\n return redirect('/usuario');\n }\n }\n }", "public function store(Request $request)\n {\n request()->validate([\n 'name' => 'required|string|max:60',\n 'nameUsuario' => 'required|string|max:15',\n 'type' => 'required',\n 'email' => 'required|email|unique:users',\n 'telefono' => 'required|digits:9',\n 'password' => 'required|min:5',\n ]);\n User::create($request->all());\n return redirect()->route('usuarios.index');\n }", "public function store(Request $request)\n {\n $toquen = NULL;\n $enviar = $request->invitacion;\n $estado = 1;\n $idrol = 2;\n $clave = $request->password;\n $hora = date('d/m/Y h:i:s');\n if(isset($enviar)){\n $request->validate([\n 'name' => 'required',\n 'email' => 'required|unique:users'\n ]);\n //crear toquen para usuario\n $toquen = substr(Crypt::encryptString($hora),0,20);\n $estado = 0;\n $clave = 123456;\n }else{\n if($request->idrol==1){\n $idrol = 1;\n }\n $request->validate([\n 'name' => 'required',\n 'email' => 'required|unique:users',\n 'idrol' => 'required|integer|min:1',\n 'password' => 'required',\n ]);\n }\n if(isset($request->foto)){\n $foto = $request->file('foto')->store('fotoperfil');\n }else{\n $foto = \"fotoperfil/perfilDefault.jpg\";\n }\n\n $usuario = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' =>Crypt::encryptString($clave),\n 'remember_token' => $toquen,\n 'foto' => $foto,\n 'idrol' => $idrol,\n 'idempleado' => $request->idempleado,\n 'estado' => $estado\n ]);\n if(isset($enviar)){\n //Enviara correo de notificacion de usuario creado para validar cuenta\n Mail::to($usuario->email)->send(new Registro($usuario->id));\n }\n return redirect()->route('usuarios.index')->with('mensaje','Datos guardados correctamente');\n }", "public function store(Request $request)\n {\n $data = $request->request->all();\n\n $validator = Validator::make($data, [\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|max:255|same:password_confirm',\n 'password_confirm' => 'required|string|max:255',\n ]);\n\n if($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $data['ativo'] = !empty($data['ativo']) ? (boolean)$data['ativo'] : false;\n\n $data['password'] = bcrypt($data['password']);\n\n $user = User::create($data);\n\n if($data['role_id'] == 1) {\n $userRole = Role::where('name', '=', 'Admin')->first();\n } elseif($data['role_id'] == 2) {\n $userRole = Role::where('name', '=', 'User')->first();\n } elseif($data['role_id'] == 3) {\n $userRole = Role::where('name', '=', 'User Lite')->first();\n }\n\n //$user->detachAllRoles();\n $user->attachRole($userRole);\n\n flash('Usuário adicionado com sucesso!')->success()->important();\n\n $params = [];\n\n if(!empty($user->empresa_id)) {\n $params = [\n 'empresa' => $user->empresa_id\n ];\n }\n\n return redirect()->action('UsersController@index', $params);\n }", "public function store(UserCreateRequest $request)\n {\n \n $datos = $request->all();\n $user = new User($request->all());\n $user->tipo = \"docente\";\n $password = str_replace('-', '', $user->fecha_nacimiento); \n $user->password = bcrypt($password);\n $user->save();\n $docente = new Docente();\n $user->docente()->save($docente);\n \n Flash::success(\"Se ha registado el usuario \" . $user->nombres . \" de forma exitosa!\");\n \n return redirect()->route('docentes.index');\n \n }", "public function store(Request $request)\n {\n $Nombre=$request->input('Nombre');\n $Apellido_Paterno=$request->input('Apellido_Paterno');\n $Apellido_Materno=$request->input('Apellido_Materno');\n $Edad=$request->input('Edad');\n $Tipo_Documento=$request->input('Tipo_Documento');\n $Numero_Documento=$request->input('Numero_Documento');\n $Direccion=$request->input('Direccion');\n $Celular=$request->input('Celular');\n $Gestion=$request->input('Gestion');\n $Contrasena=$request->input('Contrasena');\n $usuario = new Usuario;\n $usuario->Nombre=$Nombre;\n $usuario->Apellido_Paterno=$Apellido_Paterno;\n $usuario->Apellido_Materno=$Apellido_Materno;\n $usuario->Edad=$Edad;\n $usuario->Tipo_Documento=$Tipo_Documento;\n $usuario->Numero_Documento=$Numero_Documento;\n $usuario->Direccion=$Direccion;\n $usuario->Celular=$Celular;\n $usuario->Gestion=$Gestion;\n $usuario->Contrasena=$Contrasena;\n $usuario->save();\n return redirect('/Usuario');\n }", "public function store(Request $request)\n {\n $idLogueado = Auth::user()->users_id;\n $carpetaUser = $request->txtUsuario;\n $imgStore = $request->nuevaFoto->store('public/img/avatar/'.$carpetaUser);\n $urlimg = Storage::url( $imgStore);\n $usuario = new User();\n $usuario->name = $request->txtNombres;\n $usuario->aPaterno = $request->txtApaterno;\n $usuario->aMaterno = $request->txtAmaterno;\n $usuario->direccion = $request->txtDireccion;\n $usuario->dni = $request->txtDni;\n $usuario->nCelular = $request->txtCelular;\n $usuario->fIngreso = $request->txtFecha;\n $usuario->user = $request->txtUsuario;\n $usuario->password = Hash::make($request->txtPass);\n $usuario->email = $request->txtCorreo;\n $usuario->cargos_id = $request->txtTipo;\n $usuario->avatar = $urlimg;\n $usuario->users_id = $idLogueado;\n $usuario->save();\n $paginacion = User::paginate(6);\n return $paginacion->lastPage();\n }", "public function store(Request $request)\n {\n\n \n Usuario::create([\n 'nome' => $request->input('nome'),\n 'email' => $request->input('email'),\n 'senha' => \\Hash::make($request->input('senha')),\n 'id_papel' => $request->input('papel_id')\n ]);\n \n return redirect('/usuario');\n }", "public function store(Request $request) {\n User::create([\n 'nome' => $request->nome,\n 'login' => strtoupper($request->login),\n 'perfil' => $request->perfil,\n 'password' => Hash::make($request->password),\n ]);\n return redirect()->route('usuarios.index')->with('success','Usuário Cadastrado com Sucesso!');\n }", "public function store(UserRequest $request){\n // Recuperar todos los datos del formulario en un ojbeto User\n $user=new User($request->all());\n // Usar bcrypt para encriptar password\n $user->password=bcrypt($user->password);\n // Persistir usuario\n $user->save();\n // Preparar el mensaje ha mostrar\n flash('Se ha guardado '.$user->name.' exitosamente.')->success();\n // Redireccionar al listado de usuarios\n return redirect()->route('admin.user.index');\n }", "public function store(Request $request)\n {\n // 'Num_documento', 'Direccion', 'Telefono', 'Email', 'Password_hash','Password_salt', 'Condicion'];\n\n try {\n $usuario = new Usuario;\n \n $usuario->rol = $request->rol;\n $usuario->nombre = $request->nombre;\n $usuario->tipo_documento = $request->tipo_documento;\n $usuario->num_documento = $request->num_documento;\n $usuario->direccion = $request->direccion;\n $usuario->telefono = $request->telefono;\n $usuario->email = $request->email;\n $usuario->condicion = 1;\n $usuario->password_salt = md5($request->nombre.$request->password);\n $usuario->password_hash = hash_hmac('sha512',$request->password,$usuario->password_salt);\n \n $usuario->save();\n return response()->json(['Message'=>'Usuario creado correctamente',$usuario],200);\n } catch (Exception $e) {\n return response()->json(['Message'=>'Error interno','Error'=>$e->getMessage()],500);\n }\n }", "public function store(Request $request)\n {\n $usuario = new User();\n $rsp = $request->all();\n\n $usuario->cedula = $rsp['cedula'];\n $usuario->nombre = $rsp['nombre'];\n $usuario->correo = $rsp['correo'];\n $usuario->telefono = $rsp['telefono'];\n $usuario->password = Hash::make($rsp['password']);\n\n $usuario->save();\n\n return Redirect('usuarios')->with('message','Guardado Satisfactoriamente !');\n }", "public function store(Request $request)\n {\n $usuario = new dev_Usuario();\n $usuario->email = $request->input('email');\n $usuario->senha = $request->input('senha');\n $usuario->cpf = $request->input('cpf');\n $usuario->nome = $request->input('nome');\n $usuario->telefone = $request->input('telefone');\n $usuario->telefone_secundario = $request->input('telefone_secundario'); \n $usuario->endereco = $request->input('endereco');\n $usuario->latitude = $request->input('latitude');\n $usuario->longitude = $request->input('longitude');\n $usuario->numero = $request->input('numero');\n $usuario->complemento = $request->input('complemento');\n $usuario->pontos = $request->input('pontos');\n $usuario->save();\n return response()->json($usuario);\n }", "public function store(Request $request)\n {\n $usuari = new Usuari();\n $usuari->username = $request->input('username');\n $findUsuari = Usuari::where('username', $usuari->username)->get()->first();\n if(empty($findUsuari)){\n $usuari->contrasenya = Hash::make($request->input('contrasenya'));\n $usuari->email = $request->input('email');\n $usuari->nom = $request->input('nom');\n $usuari->cognoms = $request->input('cognoms');\n $usuari->rols_id = $request->input('rol');\n $usuari->save();\n }\n else{\n // Control errores\n }\n\n return redirect('login'); //Change redirect to home/?? for admin\n }", "public function store(Request $request)\n {\n \n \n $pedido = \\App\\User::find($request->input('usuario_id'));\n if(count($pedido) == 0){\n // Devolvemos un código 409 Conflict. \n return response()->json(['error'=>'este usuario ya tiene un registro.'], 409);\n }\n\n //Calificar el pedido\n if($Registro=\\App\\Registro::create($request->all())){\n\n $Repartidor= \\App\\Repartidor::where('usuario_id',$Registro->usuario_id)->first();\n $Repartidor->activo=4;\n $Repartidor->save();\n\n $usuario = \\App\\User::find($Registro->usuario_id);\n\n $usuario->imagen=$Registro->foto;\n\n $usuario->save();\n\n $establecimiento= \\App\\Establecimiento::where('usuario_id',$Registro->usuario_id)->first();\n return response()->json(['message'=>'Registro éxito.',\n 'Registro'=>$Registro,\n 'Repartidor'=>$Repartidor,\n 'establecimiento'=>$establecimiento,\n ], 200);\n }else{\n return response()->json(['error'=>'Error al crear Registro.'], 500);\n }\n\n }", "public function store(UserCreateRequest $request)\n {\n User::create($request->all());\n Session::flash('mensaje','Usuario Creado correctamente');\n return Redirect()->route('users.automotores.usuarios.create');\n }", "public function store(Request $request)\n {\n\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n $user = $this->repository->create([\n 'name' => $request['name'],\n 'cpf' => $request['cpf'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['password']),\n 'endereco' => $request['endereco'],\n 'telefone' => $request['telefone'],\n 'status' => $request['status'],\n ]);\n $dataform = $request['tipousuario'];\n\n $user->tipoUsuario()->sync($dataform);\n\n\n $response = [\n 'message' => 'Usuário cadastrado.',\n 'data' => $user->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "public function store(Request $request) {\n Authenticate::logged($request);\n //\n UsuarioModel::create($this->process_form($request));\n $request->session()->flash('message', ' cadatrado com sucesso');\n return redirect()->to('usuarios');\n }", "public function store(UserRequest $request)\n {\n $user = User::create($request->getValues());\n\n $user->roles()->sync($request->getRoles());\n\n flash('Uživatel úspěšně vytvořen.', 'success');\n return redirect()->route('admin.users');\n }", "public function store(Request $request)\n {\n $data = $request->all();\n\n //return $data;\n\n $validacao = Validator::make($data, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:6', 'confirmed'],\n ]);\n \n if ($validacao->fails()) {\n return ['status'=> false, 'validacao' => true, 'erros' => $validacao->errors()];\n }\n \n \n $user = User::create(\n [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'imagem' => 'perfis/semfoto.png'\n ]\n );\n //criar o token do usuário com base no email(unique)\n $user->token = $user->createToken($user->email)->accessToken;\n \n if ($user->id > 0){\n return ['status'=> true, 'usuario' => $user];\n \n }else{\n return ['status'=> false, 'validacao' => false];\n }\n\n \n }", "public function store(UserStoreRequest $request)\n {\n $users = User::create($request->all());\n return redirect()->route('users.index')\n ->with('success', 'Usuario guardado con exito');\n //return redirect()->action('EncuestaController@index');\n }", "public function store(Request $request)\n {\n $sucursales = $request->get('sucursales');\n $sucursales = json_encode($sucursales);\n\n $this->validate($request, [\n 'nombre' => 'required',\n 'email' => 'required|unique:users',\n 'sucursales' => 'required',\n ]);\n try {\n $usuario = Auth::user();\n if (!is_null($usuario)) {\n User::create([\n 'name' => $request->get('nombre'),\n 'email' => $request->get('email'),\n 'password' => Hash::make($request->get('contrasena')),\n 'tipo' => 1,\n ]);\n Ejecutivo::create([\n 'nombre' => $request->get('nombre'),\n 'email' => $request->get('email'),\n 'sucursales' => $sucursales,\n ]);\n } else {\n $msg_error = 'You are probably NOT LOGGED into the system yet. Please login and try again.';\n return back()->with('msg_error', $msg_error);\n }\n } catch (\\Throwable $th) {\n $msg_error = $th->getMessage();\n if (strpos($msg_error, 'non-object') !== false) {\n $msg_error = $msg_error . '. You are probably NOT LOGGED into the system yet. Please login and try again.';\n }\n return back()->with('msg_error', $msg_error);\n }\n return back()->with('msg_success', 'El ejecutivo fue creado correctamente');\n }", "public function store(Request $request)\n {\n $this->authorize('usuarios_insert');\n $dados = $request->input();\n $dados['ativo'] = $dados['ativo'] == 'true' ? true : false;\n\n\n $dadosValidados = \\Validator::make($dados, [\n 'nome' => 'required|min:3',\n 'login' => 'unique:users,login',\n 'password' => 'required|confirmed|min:3',\n 'grupo_id' => 'required|numeric',\n 'ativo' => 'required|boolean',\n ]);\n if ($dadosValidados->fails()) { // se o array de erros contem 1 ou mais erros..\n return response()->json([\n 'msg' => 'Erro ao cadastrar usuário',\n 'erros' => $dadosValidados->errors()\n ], 400);\n } else {\n\n $dados['tipo'] = Papel::find($dados['grupo_id'])->nome;\n $dados['password'] = bcrypt($dados['password']);\n $dados['cadastrou'] = auth()->id();\n\n User::create($dados);\n return response()->json([], 201);\n }\n }", "public function store(Request $request)\n {\n //CREA USUARIO\n $user = \\PruebaHotel\\User::create([\n //consulta variales en app/User.php\n 'name' => $request['nombres'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['clave'])\n ]);\n if($user){\n Session::flash('registro-exitoso', 'Te has registrado con exito. Ahora inicia sesion.');\n return redirect('iniciar-sesion');\n }\n else{\n return 'Algo salio mal.';\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n 'nom' => ['required', 'string', 'max:255'],\n 'prenom' => ['required', 'string', 'max:255'],\n 'telephone' => ['required', 'digits:10'],\n 'dateNaissance' => ['required', 'date'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users']\n ]);\n\n $user = new User();\n\n $user->nom = $request->nom;\n $user->prenom = $request->prenom;\n $user->dateNaissance = $request->dateNaissance;\n $user->telephone = $request->telephone;\n $user->filiere = $request->filiere;\n $user->email = $request->email;\n $user->password = Hash::make($request->nom . '_2021');\n\n $user->save();\n\n return redirect()->back()->with('success', 'L\\'étudiant a été bien ajouté !!');\n }", "public function store()\n\t{\n\t\t// save the new user\n\t\t// TODO : limit the admin to 3 accounts only\n\t\t$this->user->create(array(\n\t\t\t\t\t\t\t\t\t'user_username' =>\tInput::get('user_username'),\n\t\t\t\t\t\t\t\t\t'user_password_md5' => \tmd5(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'password' => \tHash::make(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'user_role' \t=>\tInput::get('user_role')\n\t\t\t\t\t\t\t));\n\n\t\t$users = $this->user->all();\n\t\treturn Redirect::to('settings/system-users')\n\t\t\t\t\t\t->with('users',$users)\n\t\t\t\t\t\t->with('flash_msg','User has been successfully created !');\n\t}", "public function store(Request $request) // almacena los datos que son pasados por el form\n {\n $credentials = Request()->validate([ //validar los datos\n 'name' => ['required'],\n 'carnet' => ['required'],\n 'email' => ['required'],\n 'password' => ['required'],\n\n ]);\n $tipo_vendedor = $request['tipo_vendedor'];\n $tipo_visita = $request['tipo_visita'];\n $tipo_cliente = $request['tipo_cliente'];\n $tipo_administrador = $request['tipo_administrador'];\n if($tipo_vendedor==null)\n $tipo_vendedor=0;\n else\n $tipo_vendedor=1;\n if($tipo_visita==null)\n $tipo_visita=0;\n else\n $tipo_visita=1;\n if($tipo_cliente==null)\n $tipo_cliente=0;\n else\n $tipo_cliente=1;\n if($tipo_administrador==null)\n $tipo_administrador=0;\n else\n $tipo_administrador=1;\n\n $user= User::create([\n 'name'=>request('name'),\n 'carnet'=>request('carnet'),\n 'email'=>request('email'),\n 'password'=> bcrypt(request('password')),\n 'tipo_vendedor'=>$tipo_vendedor,\n 'tipo_visita'=>$tipo_visita,\n 'tipo_cliente'=>$tipo_cliente,\n 'tipo_administrador'=>$tipo_administrador,\n 'url_foto'=>null,\n 'estado'=>1,\n ]);\n BitacoraController::store($user->id);\n NotaController::store(Auth::user()->id,'El administrador creo un nuevo usuario');\n //NotaController::store($user->id,'El usuario fue creado correctamente');\n // NotaUsuario::crear($user,'Usuario creado');\n\n return redirect()->route('user.index');\n }", "public function store(Request $request)\n {\n $validateur = \\Validator::make($request->all(),[\n 'nom'=>'required',\n 'email'=> 'required|email|max:255'\n ]);\n if($validateur->fails()){\n return redirect()->back()->withErrors($validateur->errors());\n }else{\n \n $administrateurs = $this->create($request);\n $administrateurs->save();\n $user = new UsersController();\n $user = $user->create($request);\n var_dump($user);\n $user->save();\n $user->role->attach($request->roles);\n $administrateurs->projets()->attach($request->projets);\n return redirect(route('affiche-administrateur'));\n }\n }", "public function store(Request $request)\n {\n $data = $request->all();\n \n if($request->has('e_usuario_id')){\n $usuario = User::find($data['e_usuario_id']);\n $usuario->name = $data['e_usuario_nome'];\n $usuario->email = $data['e_usuario_email'];\n $usuario->password = Hash::make($data['e_usuario_senha']);\n $usuario->updated_at = date(\"Y-m-d H:m:s\");\n $usuario->nivel = $data['e_usuario_nivel'];\n $usuario->status = $data['e_usuario_status'];\n $usuario->save();\n return \"2\";\n }else{ \n $usuario = new User();\n $usuario->name = $data['usuario_nome'];\n $usuario->email = $data['usuario_email'];\n $usuario->password = Hash::make($data['usuario_senha']);\n $usuario->created_at = date(\"Y-m-d H:m:s\");\n $usuario->updated_at = date(\"Y-m-d H:m:s\");\n $usuario->nivel = $data['usuario_nivel'];\n $usuario->status = $data['usuario_status'];\n $usuario->save();\n return \"1\";\n }\n }", "public function store(Request $request)\n {\n $usuario = new Usuario($request->all());\n \n $run = str_replace('.','',$request->run);\n $run = str_replace('-','',$request->run);\n\n $dv = substr($run, -1);\n $id = substr($run, 0, -1);\n\n $usuario->id=$id;\n $usuario->dv= $dv;\n $usuario->nombres=strtolower($usuario->nombres);\n $usuario->apellidop=strtolower($usuario->apellidop);\n $usuario->apellidom=strtolower($usuario->apellidom);\n $usuario->password= bcrypt($usuario->id);\n $usuario->save();\n flash('Usuario Registrado')->success();\n\n return redirect()->route('registro.index');\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $user = $this->userRepository->create($input);\n \n Flash::success('Usuario creado con &eacute;xito.');\n\n return redirect(route('users.index'));\n }", "public function store(Request $request)\n {\n $validateData = $request->validate([\n 'nombre'=>'required',\n 'apellido'=>'required',\n 'usuario'=>'required|unique:usuarios,usuario',\n 'email'=>'required|unique:usuarios,email'\n ]);\n try {\n DB::beginTransaction();\n $us = Usuario::create($request->all());\n DB::commit();\n return response()->json([\n 'usuario'=>$us\n ],200);\n } catch (\\Throwable $th) {\n DB::rollback();\n return response()->json([\n 'error'=>\"No se pudo guardar el registro \".$th->getMessage()\n ],500);\n }\n }", "public function store()\n\t {\n $newUserInfo = Input::all();\n\n $newUserInfo['username'] = $newUserInfo['name'];\n $newUserInfo['email'] = $newUserInfo['email'];\n $newUserInfo['password'] = Hash::make(\"password\");\n\n $user = User::create($newUserInfo);\n\n return Response::json(array(\n \"id\" => $user->id\n ));\n }", "public function store(Request $request)\n {\n $data = $request->all();\n\n // definir o user_id\n $data['user_id'] = Auth::user()->id;\n\n // cria o novo utente\n $utente = Utente::create($data);\n\n return redirect()->route('utente.show', $utente->id);\n }", "public function store(UserRequest $request)\n {\n $return = ['message' => 'Usuário criado'];\n $statusCode = 201;\n try {\n $this->user->create($request->all());\n } catch (\\Exception $e) {\n $return = ['message' => $e->getMessage()];\n $statusCode = 422;\n }\n\n return response()->json($return, $statusCode);\n }", "public function store(Request $request)\n {\n //\n $conditions = array(\n 'nombres'=>'required',\n 'apellidos'=>'required',\n 'email'=>'required|unique:usuarios',\n 'clave'=>'required'\n );\n $validator = Validator::make($request->all(),$conditions);\n\n if($validator->fails()){\n return redirect('usuario/create')\n ->withErrors($validator)\n ->withInput();\n }\n\n $usuario = new User();\n $usuario->nombres = $request->nombres;\n $usuario->apellidos = $request->apellidos;\n $usuario->email = $request->email;\n $usuario->clave = bcrypt($request->clave);\n $usuario->save();\n\n redirect::to('login');\n }", "public function store(Request $request)\r\n {\r\n Users::create($request->json());\r\n }", "public function store(Request $request)\n {\n auth('api')->user()->authorizeRoles(['admin']);\n\n $userData = $request->all();\n\n if (!$request->has('password') || !$request->get('password')) {\n return response()->json(ApiError::errorMessage('Senha obrigatória', 4010), 401);\n }\n\n Validator::make($userData, [\n 'razao_social' => 'required',\n 'nome_fantasia' => 'required',\n 'cnpj' => 'required'\n ])->validate();\n\n try {\n $role_admin = Role::where('name', 'admin')->first();\n\n $userData['password'] = bcrypt($userData['password']);\n $user = $this->user->create($userData);\n $user->roles()->attach($role_admin);\n\n $user = $user->distribuidor()->create(\n [\n 'razao_social' => $userData['razao_social'],\n 'nome_fantasia' => $userData['nome_fantasia'],\n 'cnpj' => $userData['cnpj']\n ]\n );\n\n $data = ['data' => $user];\n return response()->json($data, 201);\n } catch (\\Exception $e) {\n if (config('app.debug')) {\n return response()->json(ApiError::errorMessage($e->getMessage(), 5000), 500);\n }\n return response()->json(ApiError::errorMessage('Houve um erro ao tentar salvar o user', 5000), 500);\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n \n 'nome' => 'required|max:255',\n 'status' => 'required',\n \n ]);\n \n try{\n $error = \"\";\n $usuario = \"\";\n $data = $request->all();\n $usuario = new Usuario;\n $usuario->fill($data);\n $usuario->save();\n } catch(\\Exception $e) {\n $error='Erro ao salvar o Usuario' . $e;\n }\n return response()->json([\n 'error' => $error,\n 'data' => $usuario\n ]);\n }", "public function store(CreateUserRequest $request)\n {\n $user = Usuario::create([\n\n 'active' => $request->active\n ]);\n\n $request->session()->flash('message', 'El Usuario se registro correctamente.');\n return redirect()->route('usuario.listar');\n\n }", "public function store(Request $request)\n {\n if (!$request->ajax()) return redirect('/');\n try {\n DB::beginTransaction();\n $usuario = new User();\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = Hash::make($request->password);\n $usuario->activo = $request->activo;\n $usuario->id_rol = $request->idRol;\n $usuario->save();\n\n DB::commit();\n }catch (\\Exception $exception){\n DB::rollBack();\n }\n }", "public function store(Request $request)\n {\n $data = request()->except('_token');\n\n $request->validate([\n 'name' => 'required|string|max:100',\n 'firstLastName' => 'required|string|max:100',\n 'secondLastName' => 'required|string|max:100',\n 'rol' => 'required',\n 'email' => 'required|email',\n 'password'=> 'required|confirmed|min:8',\n ]);\n\n $rol = request()->rol;\n \n if ($rol == \"administrador\") {\n $rol = 1;\n } elseif($rol == \"jefe\") {\n $rol = 0;\n }\n \n $user = new User();\n $user->name = $request->name;\n $user->firstLastName = $request->firstLastName;\n $user->secondLastName = $request->secondLastName;\n $user->rol = $rol;\n $user->email = $request->email;\n $user->password = bcrypt($request->password);\n $user->save();\n\n return redirect()->action('UserController@index')->with('saveUser', 'Usuario agregado');\n }", "public function store(Request $request)\n {\n $usuario=new Usuario();\n $usuario->fill($request->all());\n $usuario->setAttribute(\"admin\",0);\n $usuario->save();\n\n return redirect()->route('eventos.index');\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$input['password']=Hash::make($input['password']);\n\n\t\t$validation = Validator::make($input, User::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$user = new User();\t\t\t\n\t\t\t$user->username = Input::get('username');\n\t\t\t$user->desusuario = Input::get('desusuario');\t\t\n\t\t\t$user->rolusuario = Input::get('rolusuario');\t\t\n\t\t\t$user->estado = 'ACT';\t\t\n\t\t\t$user->password = Hash::make(Input::get('password'));\t\t\n\t\t\t//$user->usuario_id = Input::get('usuario_id');\n\t\t\t$user->usuario_id = 1;\n\t\t\t$user->save();\n\n\t\t\t//$this->user->create($input); obviar el modo automatico\n\n\t\t\treturn Redirect::route('users.index');\n\t\t}\n\n\t\treturn Redirect::route('users.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function store(Request $request)\n {\n $user = new User;\n $user->id = $request->input('id');\n $user->name = $request->input('nombre');\n $user->apellido = $request->input('apellido');\n $user->email = $request->input('email');\n $user->usuario = ucwords($user->name) . \"\". ucwords($user->apellido[0]);\n $user->password = Hash::make($request->input('password'));\n $user->rol = $request->input('rol');\n $user->save();\n\n $correo = new newusuario($user);\n Mail::to('[email protected]')->send($correo);\n \n if($user->rol == 0){\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $user->id;\n $superAdministrador->save();\n }\n if($user->rol == 1){\n $administrador = new administrador;\n $administrador->id = $user->id;\n $administrador->save();\n }\n if($user->rol == 2){\n $asesor = new asesor;\n $asesor->id = $user->id;\n $asesor->save();\n }\n if($user->rol == 3){\n $tutor = new tutor;\n $tutor->id = $user->id;\n $tutor->save();\n }\n\n \n return redirect('logged_in');\n /*\n if (isset($_POST[\"usu\"])) {\n echo \"LLEGO\";\n $array = json_decode($_POST[\"usu\"]);\n echo \"LLEGO\";\n $usuario = new User;\n $usuario->usuario = $array->user;\n $usuario->rol = $array->rol;\n $usuario->password = $array->contrasena;\n $usuario->id = $array->id;\n $usuario->name = $array->name;\n $usuario->apellido = $array->apellido;\n $usuario->email = $array->email;\n $usuario->save();\n\n if ($usuario->rol == 0) {\n $superAdministrador = new super_administrador();\n $superAdministrador->id = $usuario->id;\n $superAdministrador->save();\n }\n if ($usuario->rol == 1) {\n $administrador = new administrador;\n $administrador->id = $usuario->id;\n $administrador->save();\n }\n if ($usuario->rol == 2) {\n $asesor = new asesor;\n $asesor->id = $usuario->id;\n $asesor->save();\n }\n if ($usuario->rol == 3) {\n $tutor = new tutor;\n $tutor->id = $usuario->id;\n $tutor->save();\n }\n\n\n if ($usuario->id != \"\") {\n $message = \"No Funciono\";\n redirect('logged_in');\n return response()->json([\n 'status' => 'Error',\n 'message' => $message,\n ]);\n }\n } else {\n echo \"something went wrong\";\n }\n return redirect('logged_in');\n */\n }", "public function store(Request $request)\n {\n parent::store($request);\n \n // Mensagem de registro criado\n Session::flash('flash_create', 'Usuário criado!');\n \n // redireciona para o view\n return redirect(\"usuario/{$this->repository->model->codusuario}\");\n }", "public function store(Request $request)\n {\n $this->validate($request, array(\n 'name' => 'required|max:255',\n 'username' => 'required|max:255|unique:users',\n 'email' => \"required|email|unique:users\",\n ));\n $password = '';\n if ($request->has('password') && !empty($request->password))\n {\n $this->validate($request, array(\n 'password' => 'confirmed',\n ));\n $password = trim($request->password);\n }\n else\n {\n $length = 10;\n $keyspace = '123456789abcdefghijkmnopqrstuvwyxzABCDEFGHJKLMNPQRSTUVWXYZ';\n $max = mb_strlen($keyspace, '8bit') - 1;\n for ($i = 0; $i < $length; $i++)\n {\n $password .= $keyspace[random_int(0, $max)];\n }\n }\n $user = new User();\n $user->name = $request->name;\n $user->username = $request->username;\n $user->email = $request->email;\n $user->password = Hash::make($password);\n $admins = User::wherePermissionIs('read_users')->get()->except(auth()->user()->id);\n /*TODO: [notification] into event listener! */\n Notification::send($admins, new NewUserAdded($user));\n if ($user->save())\n {\n Session::flash(\"success\", \"You successfully create this user.\");\n Session::flash(\"success_autohide\", \"4500\");\n return redirect()->route('users.show', $user->id);\n }\n else\n {\n Session::flash(\"error\", \"An error occured while creating the user. (ErrCode: 142)\");\n Session::flash(\"error_autohide\", \"4500\");\n return redirect()->back();\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n \n 'name'=>'required',\n 'email'=>'required',\n 'descripcion_usuario'=>'required',\n 'password'=>'required'\n ]);\n \n $passAux=$request->get('password');\n $emailAux=$request->get('email');\n \n $user = new user([\n \n 'name' => $request->get('name'),\n 'email' => $request->get('email'),\n 'descripcion_usuario' => $request->get('descripcion_usuario'),\n 'password' => Hash::make($passAux)\n ]);\n $user->save();\n $idRol=$request->get('rol');\n $idAux = DB::table('users')->where('email', $emailAux)->first();\n \n DB::table('role_user')->insert(['user_id' => $idAux->id, 'role_id' =>$idRol]);\n \n return redirect('/usuarios')->with('success', '¡Usuario Guardado!');\n \n }", "public function store(UserRequest $request)\n {\n $data = new User();\n $data->username = $request->username;\n $data->nama = $request->nama;\n $data->email = $request->email;\n $data->password = Hash::make($request->password);\n $data->role = $request->role;\n $data->save();\n return response()->json($data);\n }", "public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'identificacion' => 'required',\n 'telefono' => 'required|max:10|min:7',\n 'direccion' => 'required',\n ]);\n\n $id = auth()->user()->id;\n\n $userdato = Userdato::where('userdatos.user_id','=',$id)->first();\n\n if($userdato == null){\n \n $userdato = new Userdato(array( \n 'identificacion'=> $request->get('identificacion'),\n 'telefono'=> $request->get('telefono'),\n 'direccion' => $request->get('direccion'),\n 'user_id' => $id,\n ));\n }else {\n\n $userdato->identificacion = $request->get('identificacion');\n $userdato->telefono = $request->get('telefono');\n $userdato->direccion = $request->get('direccion');\n } \n\n $userdato->save();\n alert()->success('Datos actualizados');\n return redirect('/actualizardatos')->with('status','Datos actualizados correctamente');\n }", "public function store(Request $request)\n {\n //\n $user = new users;\n $user->dni = $request->dni;\n $user->nombre = $request->nombre;\n $user->apellidos = $request->apellidos;\n $user->password = Hash::make($request->password);\n $user->telefono = $request->telefono;\n $user->tipo = 2;\n\n $docente = new docente;\n $docente->dni_docente = $request->dni;\n $docente->titulo = $request->titulo;\n\n $user->save();\n $docente->save();\n\n return response()->json(['succes'=>true]);\n }", "public function store(Request $request)\n {\n //\n try{\n $user = new User();\n $user->cedula = $request->cedula_usuario;\n $user->nombres = $request->nombres_usuario;\n $user->apellidos = $request->apellidos_usuario;\n $user->iniciales = strtoupper( $request->iniciales_usuario );\n $user->telefono = $request->telefono_usuario;\n if($request->hasFile('foto_usuario')){\n $user->foto = $request->file('foto_usuario')->store('public');\n }else{\n $user->foto = 'default-user.jpg';\n }\n $user->email = $request->email_usuario;\n $user->permisos = array([\n 'crear_clientes' => isset($request->crear_clientes) ? 'true' : 'false',\n 'ver_clientes' => isset($request->ver_clientes) ? 'true' : 'false',\n 'crear_docs' => isset($request->crear_docs) ? 'true' : 'false',\n 'asignar_metas' => isset($request->asignar_metas) ? 'true' : 'false',\n 'ver_progresos' => isset($request->ver_progresos) ? 'true' : 'false',\n 'ver_comisiones' => isset($request->ver_comisiones) ? 'true' : 'false',\n 'resumen_comisiones' => isset($request->resumen_comisiones) ? 'true' : 'false',\n 'clientes_cerrados' => isset($request->clientes_cerrados) ? 'true' : 'false',\n 'asignar_facturas' => isset($request->asignar_facturas) ? 'true' : 'false',\n 'control_pagos' => isset($request->control_pagos) ? 'true' : 'false',\n 'agendar_servicios' => isset($request->agendar_servicios) ? 'true' : 'false',\n 'horarios_tecnicos' => isset($request->horarios_tecnicos) ? 'true' : 'false',\n 'listado_servicios' => isset($request->listado_servicios) ? 'true' : 'false',\n 'recepcion_docs' => isset($request->recepcion_docs) ? 'true' : 'false',\n 'inventario_docs' => isset($request->inventario_docs) ? 'true' : 'false',\n 'reporte_docs' => isset($request->reporte_docs) ? 'true' : 'false',\n 'crear_novedades' => isset($request->crear_novedades) ? 'true' : 'false',\n 'crear_tecnicos' => isset($request->crear_tecnicos) ? 'true' : 'false',\n 'crear_usuarios' => isset($request->crear_usuarios) ? 'true' : 'false',\n 'reporte_ganancias' => isset($request->reporte_ganancias) ? 'true' : 'false',\n 'gestion_productos' => isset($request->gestion_productos) ? 'true' : 'false',\n 'gastos' => isset($request->gastos) ? 'true' : 'false'\n ]);\n \n $user->password = bcrypt($request->contrasena_user);\n $user->cargo_id = $request->cargo_usuario;\n switch ($request->cargo_usuario) {\n case '1':\n $user->area_id = '1';\n break;\n case '2':\n $user->area_id = '2';\n break;\n case '3':\n $user->area_id = '3';\n break;\n case '4':\n $user->area_id = '1';\n break;\n case '5':\n $user->area_id = '4';\n break;\n case '6':\n $user->area_id = '5';\n break;\n default:\n $user->area_id = '6';\n break;\n }\n $user->save();\n \n \\Flash::success('Usuario creado correctamente.')->important();\n return Redirect::to('/users/create');\n } catch(\\Exception $e){\n \\Flash::error('Ha ocurrido un error inesperado, intentelo nuevamente.')->important();\n return Redirect::to('/users/create');\n }\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username' => 'required|between:3,20',\n\t\t\t'email' => 'required|email|confirmed|unique:users,email',\n\t\t\t'password' => 'required|min:6|alpha_num|confirmed'\n\t\t);\n\n\t\t$validation = Validator::make(Input::all(), $rules);\n\n\t\tif($validation->fails()) {\n\t\t\treturn Redirect::back()->withErrors($validation);\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = Hash::make(Input::get('password'));\n\n\t\tif($user->save()){\n\t\t\tAuth::login($user);\n\t\t\tif(Auth::check()) {\n\t\t\t\treturn Redirect::to('user/'.$user->id);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Redirect::back()->with('flash_error', \"Impossible de connecter l'utilisateur\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::back()->with('flash_error', \"Impossible d'enregistrer l'utilisateur\");\n\t\t}\n\t}", "public function store(Requests\\UsersRequest $request)\n {\n $this->checkAccess('create');\n $input = $request->only([\n 'username','name','email','photo','group_id'\n ]);\n\n $input['password'] = bcrypt($request->get['password']);\n\n if ($request->hasFile('photo')) {\n $input['photo'] = (new \\ImageUpload($request))->upload();\n }\n\n $query = $this->model->create($input);\n\n $result = $query->id;\n $save_continue = \\Input::get('save_continue');\n $redirect = empty($save_continue) ? $this->url : \n $this->url.'/'.$result.'/edit';\n\n return redirect()->to($redirect)->with('message', \n $this->title.' berhasil dibuat.'\n );\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n \n $user = $this->userRepository->create($input);\n\n foreach($request->roles as $role){\n $user->assignRole($role);\n }\n\n Flash::success('Usuario guardado con éxito.');\n\n return redirect(route('users.index'));\n }", "public function store(UserCreateRequest $request)\n {\n $user = $this->userRepository->store($request->all());\n\n return redirect('user')->withOk(\"L'utilisateur \" . $user->name . \" a été créé.\");\n }", "public function store(Request $request)\n {\n \n $validated = $request->validate([\n 'name' => 'required',\n 'email'=>'required',\n 'password'=>'required',\n ]);\n\n $usuario= User::create([\n 'name' => $request['name'],\n 'email'=>$request['email'],\n 'password'=>bcrypt($request['password']),]\n );\n \n $usuario->roles()->sync($request->roles);\n\n return redirect()->route('admin.usuarios.index')->with('info','El usuario se agrego correctamente');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => ['required', 'string', 'min:3', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n\n $user = User::create([\n 'name' => $request->get('name'),\n 'role' => IUser::ROLE_USER,\n 'email' => $request->get('email'),\n 'password' => Hash::make($request->get('password')),\n ]);\n\n $message = sprintf(\"Usuario '%s' creado con éxito\", $user->name);\n\n return redirect(route('users.index'))->with('success', $message);\n }", "public function store(Request $request)\n {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|min:6|confirmed',// Enviar siempre el password confirmation\n 'tipo_usuario' => 'required',\n 'dni' => 'required',\n ];\n\n $this->validate($request, $rules);\n\n $campos = $request->all();\n $campos['password'] = bcrypt($request->password);\n $campos['verified'] = User::USUARIO_NO_VERIFICADO;\n $campos['verification_token'] = User::generarVerificationToken();\n $campos['admin'] = User::USUARIO_REGULAR;\n\n $usuario = User::create($campos);\n\n //return response()->json(['data' => $usuario], 201);\n return $this->showOne($usuario); \n }" ]
[ "0.77160746", "0.7660578", "0.7599462", "0.75670785", "0.75288874", "0.74884486", "0.74745804", "0.74569935", "0.7447692", "0.74243057", "0.7417932", "0.7398573", "0.7395772", "0.7393412", "0.7382085", "0.7382073", "0.73697007", "0.7320803", "0.73194784", "0.7308013", "0.72805935", "0.72804606", "0.7278307", "0.7256725", "0.72399205", "0.7236299", "0.7228539", "0.7227775", "0.7223764", "0.7205989", "0.7205882", "0.7198098", "0.71883416", "0.7176886", "0.71759605", "0.7166739", "0.7153712", "0.71498", "0.7145736", "0.7145474", "0.71419233", "0.7134153", "0.7134022", "0.71284246", "0.71265775", "0.71104336", "0.7109075", "0.71076113", "0.7099503", "0.709676", "0.7096723", "0.7088546", "0.7082614", "0.70730287", "0.7069479", "0.7067537", "0.7064103", "0.70628273", "0.7058447", "0.7052312", "0.7051745", "0.7049333", "0.7033994", "0.70339566", "0.7027724", "0.70263064", "0.70254904", "0.7024303", "0.7023964", "0.70160973", "0.7006815", "0.69986653", "0.69927996", "0.6986763", "0.69866455", "0.6981095", "0.6981085", "0.6979392", "0.69784576", "0.69750804", "0.6975046", "0.6972139", "0.6968561", "0.6957784", "0.6953132", "0.6951737", "0.69516057", "0.6949877", "0.6948529", "0.6946748", "0.69375736", "0.69371384", "0.69363797", "0.693585", "0.6934322", "0.69329965", "0.6932681", "0.691995", "0.6912744", "0.6908543", "0.6907462" ]
0.0
-1
Display a listing of the resource.
public function index() { $admin = Admin::orderBy('nia')->get(); return view('admin.index', compact('admin')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &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) { $rules = array( 'nia' => 'required|min:3|numeric', 'nama' => 'required', 'password' => 'required' ); $error = Validator::make($request->all(), $rules); if ($error->fails()) { return response()->json(['errors' => $error->errors()->all()]); } if (Hash::needsRehash($request->password)) { $password = Hash::make($request->password); } $id = rand(1000,9000).rand(10,99).date("y"); $data = array( 'id' => $id, 'nia' => $request->nia, 'nama' => $request->nama, 'password' => $password ); Admin::create($data); return response()->json(['success' => 'Data Berhasil Ditambahkan']); }
{ "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(Admin $admin) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Admin $admin) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Admin $admin) { $request->validate([ 'id' => 'required', 'nia' => 'required', 'nama' => 'required' ]); $id = $request->id; $data = Admin::where('id',$admin->id)->first(); $pass = $data->password; $password = $request->password; if ($pass == $password) { Admin::where('id',$admin->id)->update([ 'nia' => $request->nia, 'nama' => $request->nama ]); }else{ if (Hash::needsRehash($request->password)) { $password = Hash::make($request->password); } Admin::where('id',$admin->id)->update([ 'nia' => $request->nia, 'nama' => $request->nama, 'password' => $password ]); } return redirect('admin')->with('status','Data '.$request->nama.' berhasil di Ubah'); }
{ "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(Admin $admin) { $nama = $admin->nama; $id = $admin->id; Admin::destroy($id); return redirect('admin')->with('status','Data '.$nama.' berhasil dihapus'); }
{ "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
Styles CSS et Script JS
function womendevs_enqueue_style() { // Bootstrap CSS wp_enqueue_style( 'bootstrap', '//stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' , false ); // Google Font wp_enqueue_style( 'googlefont', '//fonts.googleapis.com/css?family=Roboto' , false ); // Font Awesome wp_enqueue_style( 'fontawesome', '//use.fontawesome.com/releases/v5.8.1/css/all.css' , false ); // Ma feuille CSS wp_enqueue_style( 'core', get_stylesheet_uri() , false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public function css();", "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "protected function renderJavaScriptAndCss() {}", "function css_js_dinamico () {\n $nombre = 'jonmircha';\n $color = 'greenyellow';\n $bg_color = '#333';\n\n echo \"\n <style>\n html {\n background-color: $bg_color;\n color: $color;\n }\n </style>\n <script>\n alert('Hola $nombre')\n </script>\n \";\n }", "public static function css();", "public function build_css() {\n\t\t\t\n\t\t}", "function add_style_script(){\r\n wp_enqueue_style('glv-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'glv-style.css');\r\n wp_enqueue_style('select2-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'select2.css');\r\n wp_enqueue_script('select-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'select2.js');\r\n wp_enqueue_script('glv-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'function.js');\r\n \r\n }", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "protected function generateCSS() {}", "function Serialize_description_shop_script_style(){\n if (get_admin_page_title() === 'Modifier la catégorie') {\n\twp_enqueue_style('Serialize_description_shop_style', get_template_directory_uri() . '-child/css/serialize-description-shop.css');\n \twp_enqueue_script( 'Serialize_description_shop_script', get_template_directory_uri(). '-child/js/serialize-description-shop.js', array('jquery', 'wp-color-picker') );\n }\n}", "function loadStyleScript() {\n # Sike\n}", "public static function getPageStylesJavascript()\n {\n return '<script type=\"text/javascript\">var site_styles=[\"' . implode( '\",\"', self::$pageStyles ) . '\"]</script>' . \"\\n\";\n }", "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "protected function addSystemCssJs()\n\t{\n\t\tglobal $cWebPath;\n\t\t\t\t\n\t\t$this->mStyles[] = $cWebPath . '/style/mainstyle.css';\n\t\t$this->mStyles[] = $cWebPath . '/style/svwp_style.css';\n\t\t\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.slideViewerPro.1.5.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.timers-1.2.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/imageslider.js';\n\t}", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "public function register_styles_scripts(){\n\t\t\tglobal $eventon_rs;\n\t\t\t\n\t\t\tif(is_admin()) return false;\n\t\t\t\n\t\t\t$evOpt = evo_get_options('1');\n\t\t\tif( evo_settings_val('evcal_concat_styles',$this->evoopt1, true))\n\t\t\t\twp_register_style( 'evo_RS_styles',$eventon_rs->assets_path.'RS_styles.css', '', $eventon_rs->version);\n\t\t\t\n\t\t\twp_register_script('evo_RS_script',$eventon_rs->assets_path.'RS_script.js', \n\t\t\t\tarray('jquery','jquery-ui-core'), \n\t\t\t\t$eventon_rs->version, true );\n\n\t\t\twp_localize_script( \n\t\t\t\t'evo_RS_script', \n\t\t\t\t'evors_ajax_script', \n\t\t\t\tarray( \n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ) , \n\t\t\t\t\t'postnonce' => wp_create_nonce( 'evors_nonce' )\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function ft_hook_add_css() {}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "private function _initJsCss(){\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCssFile(Yii::app()->baseUrl . '/css/admin/admin.css');\n\n\t}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "public function renderCSS()\n {\n }", "protected function doConcatenateCss() {}", "function addScriptsStyles(){\n\t\twp_enqueue_script( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/js/dashicons-picker.js' ), array( 'jquery' ) );\n\t\twp_enqueue_style( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/css/dashicons-picker.css' ), array( 'dashicons' ) );\n\t\twp_enqueue_script( 'post_icon_script', plugins_url( 'post_icon/js/post_icon.js' ), array( 'jquery' ) );\n\t}", "function css($arquivo);", "function onemax_vc_js_css()\n{\n if (!is_admin()) {\n wp_enqueue_style('onemax-interactive', ONEMAX_URI.'/css/interactive.css');\n wp_enqueue_script('onemax-aos', ONEMAX_URI.'/js/library/aos.js');\n wp_enqueue_script('onemax-owl-carousel', ONEMAX_URI.'/js/component/portfolio_carousel/owl.carousel.js');\n wp_enqueue_script('onemax-image-setting', ONEMAX_URI.'/js/component/image/image.js');\n wp_enqueue_script('onemax-conter', ONEMAX_URI.'/js/component/counters/conter.js', '', '', true);\n }\n}", "protected function _css()\n\t{\n\t\tif ( !self::$_firstRun ) return '';\n\t\tself::$_firstRun = FALSE;\n\n\t\t$dir = KINT_DIR . 'view/' . ( self::$devel ? 'src/' : '' ); // load uncompressed sources if in devel mode\n\n\t\treturn '<script>' . file_get_contents( $dir . 'kint.js' ) . '</script>'\n\t\t\t. '<style>' . file_get_contents( $dir . 'kint.css' ) . '</style>';\n\t}", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }", "function add_admin_styles(){\n\t?>\t\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>scripts.js\"></script>\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>smille-script.js\"></script>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>styles.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>simple-styles.css\" />\n\t<?php\n}", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "function register_style() {\n}", "function drawStyle()\r\n\t{\r\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function addCss($script) {\n\t\tLibraries::enqueueCss($script);\n\t}", "public function selloCSS() \n {\n \t$style = '.sello-module {\n\t\t\tposition: absolute;\n\t\t\ttop: 0%;\n\t\t\twidth: 20%;\n\t\t\theight: auto;\n\t\t\tright: 0;\n\t\t}\n\n\t\t.sello-module .img-sello-module {\n\t\t\twidth: 80%;\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 auto;\n\t\t}';\n\n\t\treturn $style;\n }", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function ra_builder_css()\n\t\t{\n\t\t\t$this->output('<meta name=\"generator\" content=\"rahularyan\">');\n\t\t\tif($this->template == 'user'){\n\t\t\t\tif(defined('QA_WORDPRESS_INTEGRATE_PATH')){\n\t\t\t\t\t$id = $this->content['raw']['userid'];\n\t\t\t\t\t$cover = get_user_meta( $id, 'cover' );\n\t\t\t\t\t$cover = $cover[0];\n\t\t\t\t}else{\n\t\t\t\t\t@$cover = ra_user_profile(@$this->content['raw']['account']['handle'], 'cover');\n\t\t\t\t}\n\t\t\t\tif($cover)\n\t\t\t\t\t$this->output('<style>#user .user-bar{background:url(\"'.qa_opt('site_url').'images/'.$cover.'\") no-repeat scroll 0 0 / cover;}</style>');\n\t\t\t\t\n\t\t\t}\n\t\t\tif(ra_is_home()){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_home').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'questions'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_questions').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'unanswered'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_unanswered').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'tags'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_tags').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'categories'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_categories').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'users'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_users').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'user'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_user').ra_db_builder('css_bottom').'</style>');\n\t\t\t}\n\t\t}", "function kmz_gr_css_js(){\n wp_enqueue_style('kmz_gr_style', plugin_dir_url(__FILE__) . 'css/style.css');\n wp_enqueue_script('kmz_gr_script', plugin_dir_url(__FILE__) . 'js/script.js', array('jquery'), '0.0.1', true);\n}", "function links_insert_head_css($flux) {\r\n\t$links = links_configuration();\r\n\r\n\t//Styles\r\n\tif($links['style'] == 'on'){\r\n\t\t$flux .= '<link rel=\"stylesheet\" href=\"'.find_in_path('css/links.css').'\" type=\"text/css\" media=\"all\" />';\r\n\t}\r\n\t//Ouverture d'une nouvelle fenetre : insertion des init js inline, en amont des CSS (perf issue)\r\n\tif($links['window'] == 'on'){\r\n\t\t$js = 'var js_nouvelle_fenetre=\\''._T('links:js_nouvelle_fenetre').'\\';';\r\n\t\t//Ouverture dune nouvelel fenetre sur les liens externes\r\n\t\tif($links['external'] == 'on'){\r\n\t\t\t// quand un site fait du multidomaine on prend en reference le domaine de la page concernee :\r\n\t\t\t// sur www.example.org : autre.example.org est external\r\n\t\t\t// sur autre.example.org : www.example.org est external\r\n\t\t\t// sur un site mono-domaine ca ne change rien :)\r\n\t\t\t// ca marche parce que le cache change quand le HTTP_HOST change (donc quand le domaine change)\r\n\t\t\t$js .= 'var links_site = \\'' . protocole_implicite(url_de_base()) . '\\';';\r\n\t\t}\r\n\t\t//Ouverture d'une nouvelle fenetre sur les documents (extensions a preciser)\r\n\t\tif(($links['download'] == 'on')&&($links['doc_list'])){\r\n\t\t\t$js .= 'var links_doc = \\''.$links['doc_list'].'\\';';\r\n\t\t}\r\n\t\t$flux = '<script type=\"text/javascript\">'.$js.'</script>' . \"\\n\" . $flux;\r\n\t}\r\n\r\n\treturn $flux;\r\n}", "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "function excalibur_css_js() {\n\tglobal $wp_styles;\n\t\t// register main stylesheet\n\t\twp_register_style('excalibur-stylesheet', get_stylesheet_directory_uri() . '/assets/css/styles.css', array(), '', 'all');\n\t\t\n\t\twp_enqueue_style( 'excalibur-stylesheet' );\n}", "function virustotalscan_replace_style()\r\n{\r\n global $mybb, $templates, $virustotalscan_url_css, $plugins;\r\n $groups = explode(\",\", $mybb->settings['virustotalscan_setting_url_groups']);\r\n // doar in cazul in care modulul de scanare al legaturilor este activ se trece la adaugarea codului CSS in forum\r\n if ($mybb->settings['virustotalscan_setting_url_enable'] && virustotalscan_check_server_load($mybb->settings['virustotalscan_setting_url_loadlimit']) && !empty($mybb->settings['virustotalscan_setting_key']) && !in_array($mybb->user['usergroup'], $groups))\r\n {\r\n eval(\"\\$virustotalscan_url_css = \\\"\".$templates->get(\"virustotalscan_url_css\").\"\\\";\"); \r\n // in acest caz va exista scanarea URL-urilor\r\n $plugins->add_hook('parse_message_end', 'virustotalscan_scan_url');\r\n }\r\n}", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "function styles() {\n\twp_register_style(\n\t\t'fontawesome',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/fontawesome/css/font-awesome.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'ionicons',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/ionicons/css/ionicons.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'bootstrap',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/bootstrap/dist/css/bootstrap.min.css\",\n\t\tarray( 'fontawesome' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'sanitize',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/sanitize/sanitize.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'vincentragosta',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/css/vincentragosta---twenty-seventeen.css\",\n\t\tarray( 'bootstrap', 'fontawesome', 'ionicons', 'sanitize' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n}", "public function run()\n {\n Style::create([\n 'type' => 'Masculino',\n 'description' => 'Produto para homem',\n ]);\n Style::create([\n 'type' => 'Feminino',\n 'description' => 'Produto para mulher',\n ]);\n Style::create([\n 'type' => 'Unisex',\n 'description' => 'Produto para homem ou mulher',\n ]);\n }", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "private function putResponsitiveStyles() {\n\n\t\t$bannerWidth = $this->slider->getParam( 'width' );\n\t\t$bannerHeight = $this->slider->getParam( 'height' );\n\n\t\t$arrItems = $this->getResponsitiveValues();\n\n\t\t?>\n\t\t<style type='text/css'>\n\t\t\t#<?php echo $this->sliderHtmlID?>, #<?php echo $this->sliderHtmlID_wrapper?> { width:<?php echo $bannerWidth?>px; height:<?php echo $bannerHeight?>px;}\n\t\t\t<?php\n\t\t\tforeach ( $arrItems as $item ) :\n\t\t\t\t$strMaxWidth = '';\n\n\t\t\t\tif ( $item['maxWidth'] >= 0 ) {\n\t\t\t\t\t$strMaxWidth = 'and (max-width: ' . $item['maxWidth'] . 'px)'; }\n\n\t\t\t?>\n\n\t\t\t @media only screen and (min-width: <?php echo $item['minWidth']?>px) <?php echo $strMaxWidth?> {\n\t\t\t \t\t #<?php echo $this->sliderHtmlID?>, #<?php echo $this->sliderHtmlID_wrapper?> { width:<?php echo $item['sliderWidth']?>px; height:<?php echo $item['sliderHeight']?>px;}\n\t\t\t }\n\n\t\t\t<?php\n\t\t\tendforeach;\n\t\t\techo '</style>';\n\t}", "function add_scripts_to_front() {\n $media = get_option('smfn_option_3') ? get_option('smfn_option_3') : \"1023\";\n wp_register_style('smfn-dynamic-css', plugin_dir_url(SMFN_FILE).'assets/css/dynamic.css.php?media=' . $media);\n wp_enqueue_style( 'smfn-dynamic-css');\n wp_enqueue_script('smfn-actions', plugin_dir_url(SMFN_FILE) . 'assets/js/smfnfunctions.js', array(), '1.0.0', true);\n }", "function jehaann_style(){\n wp_register_style('style', get_stylesheet_uri(),'','1.0','all');\n\n //cargando hojas de estilos\n\n wp_enqueue_style('style');\n}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function load_admin_scripts_styles(){\n\t\t\n\t}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "public function my_add_styles_admin() {\n\t\t//get the list of sliders\n\t\t$shortcode_list = get_option( 'slider_type' );\n\t\tif ( ! $shortcode_list || empty( $shortcode_list ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$shortcode_list = json_encode( $shortcode_list );\n\n\t\tglobal $current_screen;\n\t\t$type = $current_screen->post_type;\n\n\t\tif ( is_admin() && 'post' == $type || 'page' == $type ) {\n\n\t\t\tglobal $post;\n\t\t\tif ( ! is_object( $post ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//if any slider is already selected get the value\n\t\t\t$value = get_post_meta( $post->ID, '_slider_meta_value', true );\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar shortcodes = '<?php echo $shortcode_list; ?>';\n\t\t\t\tvar posts = '<?php global $post;echo $post->ID;?>';\n\t\t\t\tvar old_value = '<?php echo $value; ?>'; \n\t\t\t</script>\n\t\t\t<?php\n\n\t\t}\n\t}", "public function getConcatenateCss() {}", "function cc_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#content_commander_logo {\n\t\tfloat: $x;\n\t\tpadding-$x: 2px;\n\t\tpadding-top: 2px;\t\t\n\t\tmargin: 0;\n\t\theight: 22px;\n\t}\n #arb_html {\n width: 50%; \n min-height: 300px;\n }\n\t</style>\n\t\";\n}", "function style(){\r\n\t\t// Sorry mom :(\r\n\t\t$style=\"<style>\r\n\t\t\t.debug{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding: 15px;\r\n\t\t\t\tmargin: 15px;\r\n\t\t\t\tborder: 1px solid black;\r\n\t\t\t\tcolor: black;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tfont-family: monospace;\r\n\t\t\t\toverflow: auto;\r\n\t\t\t\t\r\n\t\t\t\ttext-align: left;\r\n\t\t\t\tline-height: 14px;\r\n\t\t\t\tborder-radius: 10px;\r\n\t\t\t\tmoz-border-radiuz: 10px;\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -o-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -moz-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -webkit-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -ms-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: -webkit-gradient(\r\n\t\t\t\t\tlinear,\r\n\t\t\t\t\tleft bottom,\r\n\t\t\t\t\tleft top,\r\n\t\t\t\t\tcolor-stop(0.9, rgb(251,255,199)),\r\n\t\t\t\t\tcolor-stop(1, rgb(227,222,157))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t</style>\r\n\t\t \";\r\n\t\treturn $style;\r\n\t}", "function add_css_js()\n\t{\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\tdefine('CSS_JS_PARSED', true);\n\t\t}\n\n\t\t// Include custom CSS from templates/CURRENT_TPL folder\n\t\tif(is_array($this->css_style_include) && !empty($this->css_style_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_style_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_style_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_style_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom CSS from templates/common folder\n\t\tif(is_array($this->css_include) && !empty($this->css_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom JS from templates/common folder\n\t\tif(is_array($this->js_include) && !empty($this->js_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->js_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('js_include', array(\n\t\t\t\t\t'JS_FILE' => $this->js_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function js2css($url, $condition = false)\n {\n bwHtml::js($url . '.js', $condition);\n bwHtml::css($url . '.css', $condition);\n }", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "function thmplt_carousel_add_jscss() {\r\n global $post;\r\n\t$url_to_here = str_replace( TEMPLATEPATH, get_bloginfo('template_url'), dirname(__FILE__) );\r\n\tif ('thmplt_carousel' === $post->post_type) {\t\t\r\n\t\techo \"<script type='text/javascript' src='\".$url_to_here. \"/carousel.js'></script>\\n\";\r\n\t\t#echo \"<link rel='stylesheet'href='\".$plugin_url.\"/editor.css' type='text/css' media='all' \\>\\n\";\t\t\r\n\t}\r\n}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}", "function perusecretland_css_js() {\n wp_enqueue_style( 'perusecretland-fonts', get_stylesheet_directory_uri() . '/css/fonts.css');\n wp_enqueue_style( 'perusecretland-responsive', get_stylesheet_directory_uri() . '/css/responsive.css');\n wp_enqueue_style( 'jquery-chosen', get_stylesheet_directory_uri() . '/css/chosen.min.css');\n wp_enqueue_script( 'perusecretland-easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.3.js', array('jquery'));\n wp_enqueue_script( 'jquery-chosen', get_stylesheet_directory_uri() . '/js/chosen.jquery.min.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-footer-scripts', get_stylesheet_directory_uri() . '/js/footer.scripts.js', array('jquery', 'jquery-chosen'), false, true );\n }", "function add_ordin_widget_style() {\n if( ! apply_filters( 'add_ordin_widget_style', true, $this->id_base ) )\n return;\n ?>\n <style type=\"text/css\">\n \n </style>\n <?php\n }", "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "function ufclas_matlab_scripts_styles( $hook ){\n\tif ( $hook == 'tools_page_ufclas-matlab-import' ){\n\t\t// Required to use all media JavaScript APIs.\n\t\twp_enqueue_media();\n\t\t\n\t\t// Add page css\n\t\t$custom_css = '#ufclas-matlab {max-width: 960px;}';\n\t\twp_add_inline_style('dashicons', $custom_css);\n\t}\n}", "function howes_scripts_styles() {\n\tglobal $howes;\n\t/*\n\t * Adds JavaScript to pages with the comment form to support\n\t * sites with threaded comments (when in use).\n\t */\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ){\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\t\n\t/*\n\t * Adds RTL CSS file\n\t */\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( 'howes-rtl', get_template_directory_uri() . '/rtl'.TM_MIN.'.css' );\n\t}\n\t\n\t// Add page translation effect\n\tif( isset($howes['pagetranslation']) && $howes['pagetranslation']!='no'){\n\t\twp_enqueue_script( 'animsition', get_template_directory_uri() . '/js/jquery.animsition'.TM_MIN.'.js', array( 'jquery' ) );\n\t\twp_enqueue_style( 'animsition', get_template_directory_uri() . '/css/animsition'.TM_MIN.'.css' );\n\t}\n\t\n\t// Loads JavaScript file with functionality specific to Howes.\n\twp_enqueue_script( 'howes-script', get_template_directory_uri() . '/js/functions'.TM_MIN.'.js', array( 'jquery', 'isotope' ), '2013-07-18', true );\n\t\n\t// Hover effect\n\twp_enqueue_style( 'hover', get_template_directory_uri() . '/css/hover'.TM_MIN.'.css' );\n\t\n\t// IsoTope\n\twp_enqueue_script( 'isotope', get_template_directory_uri() . '/js/jquery.isotope'.TM_MIN.'.js', array( 'jquery' ) );\n\t\n\t// Flex Slider\n\twp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider'.TM_MIN.'.css' );\n\t\n\t// Tooltip\n\twp_enqueue_script( 'bootstrap-tooltip', get_template_directory_uri() . '/js/bootstrap-tooltip'.TM_MIN.'.js', array( 'jquery', 'howes-script' ) );\n\t\n\t// Sticky\n\tif( $howes['stickyheader']=='y' ){\n\t\twp_enqueue_script( 'sticky', get_template_directory_uri() . '/js/jquery.sticky'.TM_MIN.'.js', array( 'jquery' ) );\n\t}\n\t\n\t// Load font icon library CSS files\n\tif( isset($howes['fonticonlibrary']) && is_array($howes['fonticonlibrary']) && count($howes['fonticonlibrary'])>0 ){\n\t\tforeach( $howes['fonticonlibrary'] as $library=>$val ){\n\t\t\tif( $library!='fontawesome' ){\n\t\t\t\tif( $val == '1' ){\n\t\t\t\t\twp_enqueue_style( $library, get_template_directory_uri() . '/css/fonticon-library/'.$library.'/css/thememount-'.$library.TM_MIN.'.css' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/fonticon-library/font-awesome/css/thememount-font-awesome'.TM_MIN.'.css' ); // Font Awesome\n\t\n\t// Nivo Slider\n\twp_enqueue_script( 'nivo-slider', get_template_directory_uri() . '/js/jquery.nivo.slider'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'nivo-slider-css', get_template_directory_uri() . '/css/nivo-slider'.TM_MIN.'.css' );\n\twp_enqueue_style( 'nivo-slider-theme', get_template_directory_uri() . '/css/nivo-default'.TM_MIN.'.css' );\n\t\n\t// Numinate plugin\n\tif ( !wp_script_is( 'waypoints', 'registered' ) ) { // If Waypoints library is not registered\n\t\twp_register_script( 'waypoints', get_template_directory_uri() . '/js/waypoints'.TM_MIN.'.js', array( 'jquery' ) );\n\t}\n\twp_register_script( 'numinate', get_template_directory_uri() . '/js/numinate'.TM_MIN.'.js', array( 'jquery' ) );\n\t\n\t// owl carousel\n\twp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/js/owl.carousel'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/css/owl.carousel'.TM_MIN.'.css' );\n\n\t\n\t// Swipebox\n\twp_enqueue_script( 'prettyphoto', get_template_directory_uri() . '/js/jquery.prettyPhoto'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'prettyphoto', get_template_directory_uri() . '/css/prettyPhoto'.TM_MIN.'.css' );\n\t\n\t// Pace Loader\n\t//wp_enqueue_script( 'pace', get_template_directory_uri() . '/js/pace'.TM_MIN.'.js', array( 'jquery' ) );\n\t//wp_enqueue_style( 'pace', get_template_directory_uri() . '/css/prettyPhoto'.TM_MIN.'.css' );\n\t\n\tglobal $howes;\n\tif( isset($howes['scroller_enable']) ){\n\t\tif( $howes['scroller_enable']=='1'){\n\t\t\t// NiceScroll\n\t\t\twp_enqueue_script( 'nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll'.TM_MIN.'.js', array( 'jquery' ) );\n\t\t\twp_enqueue_script( 'nicescroll-plus', get_template_directory_uri() . '/js/jquery.nicescroll.plus'.TM_MIN.'.js', array( 'jquery' , 'nicescroll' ) );\n\t\t} else if( $howes['scroller_enable']=='2'){\n\t\t\t// SmoothScroll\n\t\t\twp_enqueue_script( 'SmoothScroll', get_template_directory_uri() . '/js/SmoothScroll'.TM_MIN.'.js', array( 'jquery' ) );\n\t\t}\n\t}\n\t\n}", "private function render_css(): void {\r\n echo JKNCSS::tag('\r\n tr .'.self::cl_dropdown.' {\r\n display: inline-table;\r\n height: 80px;\r\n }\r\n\r\n tr .'.self::cl_dropdown.' th {\r\n width: auto;\r\n max-width: 180px;\r\n height: 40px;\r\n vertical-align: middle;\r\n padding-left: 10px;\r\n }\r\n\r\n .form-table tr {\r\n border-bottom: 1px dashed;\r\n margin-top: 0;\r\n }\r\n \r\n .'.self::cl_intro.' {\r\n background: #fdfdfd;\r\n border: 1px dashed #ddd;\r\n margin-bottom: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' {\r\n padding: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' .button {\r\n margin: 0 3px 0 3px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' .button:first-child {\r\n margin-left: 0;\r\n }\r\n\r\n .'.self::cl_p_report.' tr {\r\n height: 50px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' select {\r\n margin-left: 10px;\r\n margin-right: 25px;\r\n vertical-align: middle;\r\n }\r\n \r\n a.disabled, a.disabled:hover {\r\n color: #222;\r\n cursor: wait;\r\n }\r\n \r\n .'.self::cl_lg_report_true.' {\r\n color: #21a847;\r\n }\r\n \r\n .'.self::cl_lg_report_false.' {\r\n color: #ad0f0f;\r\n }\r\n \r\n #'.self::id_main.' {\r\n background: #dedede;\r\n }\r\n\r\n .'.self::cl_p_report_table.' {\r\n background: #fefefe;\r\n width: 100%;\r\n padding-bottom: 10px;\r\n padding-top: 10px;\r\n border-bottom: 5px solid #dedede;\r\n }\r\n\r\n #'.self::id_main.' {\r\n padding: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td,\r\n .'.self::cl_p_report.' tr:nth-child(4) td {\r\n border-top: 1px dashed #555;\r\n padding-top: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td {\r\n padding-bottom: 10px;\r\n }\r\n\r\n\r\n #'.self::id_main.' table:first-child {\r\n padding-top: 0;\r\n }\r\n\r\n .'.self::cl_p_report_table.':last-child {\r\n border-bottom: none;\r\n }\r\n .'.self::cl_preload_note.' {\r\n display: inline-block;\r\n padding: 10px;\r\n vertical-align: middle;\r\n border-left: 1px solid #ddd;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child {\r\n height: 30px;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child td {\r\n padding-top: 0;\r\n padding-bottom: 0;\r\n height: 15px;\r\n }\r\n\r\n #'.self::id_main.' h2 {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n }\r\n ');\r\n }", "function admin_include_scripts() {\n\n\t\t\twp_register_style('wa_wcc_admin',get_template_directory_uri().'/plugin/collapse/assets/css/admin.css');\n\t\t\twp_enqueue_style('wa_wcc_admin');\n\n\t}", "function sj_player_css(){\n $sjplayer_options = get_option( 'sjplayer-main-settings' );\n\n $sj_player_color=$sjplayer_options['sj-player-back-color']; /*background and progress bar player color*/\n if(empty($sj_player_color)){$sj_player_color=\"#ff9900\";}\n \n $sj_player_time_color=$sjplayer_options['sj-player-time-color']; /*current time and duration text color*/\n if(empty($sj_player_time_color)){$sj_player_time_color=\"#000000\";}\n \n $sj_player_shortcode_font_color=$sjplayer_options['sj_player_shortcode_color']; /*title and text description color*/\n if(empty($sj_player_shortcode_font_color)){$sj_player_shortcode_font_color=\"#000000\";}\n \n $sj_player_widget_font_color=$sjplayer_options['sj_player_widget_color']; /*title and text description color*/\n if(empty($sj_player_widget_font_color)){$sj_player_widget_font_color=\"#000000\";}\n\n $sj_player_title_font_size=$sjplayer_options['sj-player-title-font-size'];\n if(empty($sj_player_title_font_size)){$sj_player_title_font_size=\"10\";}\n\n $sj_player_description_font_size=$sjplayer_options['sj-player-description-font-size'];\n if(empty($sj_player_description_font_size)){$sj_player_description_font_size=\"10\";}\n\n $sj_player_time_font_size=$sjplayer_options['sj-player-time-font-size'];\n if(empty($sj_player_time_font_size)){$sj_player_time_font_size=\"10\";}\n\n\n sj_player_color_css_func($sj_player_color,$sj_player_time_color,$sj_player_shortcode_font_color,$sj_player_widget_font_color,$sj_player_title_font_size,$sj_player_description_font_size,$sj_player_time_font_size);\n \n }", "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "function voyage_mikado_design_styles() {\n\n $preload_background_styles = array();\n\n if(voyage_mikado_options()->getOptionValue('preload_pattern_image') !== \"\") {\n $preload_background_styles['background-image'] = 'url('.voyage_mikado_options()->getOptionValue('preload_pattern_image').') !important';\n } else {\n $preload_background_styles['background-image'] = 'url('.esc_url(MIKADO_ASSETS_ROOT.\"/img/preload_pattern.png\").') !important';\n }\n\n echo voyage_mikado_dynamic_css('.mkdf-preload-background', $preload_background_styles);\n\n if(voyage_mikado_options()->getOptionValue('google_fonts')) {\n $font_family = voyage_mikado_options()->getOptionValue('google_fonts');\n if(voyage_mikado_is_font_option_valid($font_family)) {\n echo voyage_mikado_dynamic_css('body', array('font-family' => voyage_mikado_get_font_option_val($font_family)));\n }\n }\n\n if(voyage_mikado_options()->getOptionValue('first_color') !== \"\") {\n $color_selector = array(\n\t\t\t\t'a',\n\t\t\t\t'h1 a:hover',\n\t\t\t\t'h2 a:hover',\n\t\t\t\t'h3 a:hover',\n\t\t\t\t'h4 a:hover',\n\t\t\t\t'h5 a:hover',\n\t\t\t\t'h6 a:hover',\n\t\t\t\t'p a',\n\t\t\t\t'.mkdf-pagination li.active span',\n\t\t\t\t'.mkdf-like.liked',\n\t\t\t\t'aside.mkdf-sidebar .widget .mkdf-blog-list-holder.mkdf-image-in-box h6.mkdf-item-title a:hover',\n\t\t\t\t'aside.mkdf-sidebar .widget ul li a:hover',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_categories li:hover a',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_nav_menu ul.menu li a:hover',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_nav_menu .current-menu-item>a',\n\t\t\t\t'#ui-datepicker-div .ui-datepicker-title',\n\t\t\t\t'.mkdf-main-menu ul .mkdf-menu-featured-icon',\n\t\t\t\t'.mkdf-drop-down .wide .second .inner>ul>li>a:hover',\n\t\t\t\t'.mkdf-drop-down .wide .second .inner ul li.sub .flexslider ul li a:hover',\n\t\t\t\t'.mkdf-drop-down .wide .second ul li .flexslider ul li a:hover',\n\t\t\t\t'.mkdf-drop-down .wide .second .inner ul li.sub .flexslider.widget_flexslider .menu_recent_post_text a:hover',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav a:hover',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav h4:hover',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-menu-opener a:hover',\n\t\t\t\t'.mkdf-page-header .mkdf-sticky-header .mkdf-main-menu>ul>li.mkdf-active-item>a:hover',\n\t\t\t\t'.mkdf-page-header .mkdf-sticky-header .mkdf-main-menu>ul>li:hover>a',\n\t\t\t\t'.mkdf-page-header .mkdf-sticky-header .mkdf-main-menu>ul>li>a:hover',\n\t\t\t\t'.mkdf-page-header .mkdf-sticky-header .mkdf-search-opener:hover',\n\t\t\t\t'.mkdf-page-header .mkdf-sticky-header .mkdf-side-menu-button-opener:hover',\n\t\t\t\t'body:not(.mkdf-menu-item-first-level-bg-color) .mkdf-page-header .mkdf-sticky-header .mkdf-main-menu>ul>li:hover>a',\n\t\t\t\t'body:not(.mkdf-menu-item-first-level-bg-color) .mkdf-page-header .mkdf-sticky-header .mkdf-main-menu>ul>li>a:hover',\n\t\t\t\t'.mkdf-page-header .mkdf-search-opener:hover',\n\t\t\t\t'.mkdf-side-menu-button-opener:hover',\n\t\t\t\t'.mkdf-counter-holder .mkdf-counter-icon',\n\t\t\t\t'.mkdf-message .mkdf-message-inner a.mkdf-close i:hover',\n\t\t\t\t'.mkdf-ordered-list ol>li:before',\n\t\t\t\t'.mkdf-icon-list-item .mkdf-icon-list-icon-holder-inner .font_elegant',\n\t\t\t\t'.mkdf-icon-list-item .mkdf-icon-list-icon-holder-inner i',\n\t\t\t\t'.mkdf-blog-slider-holder .mkdf-bs-item-date',\n\t\t\t\t'.mkdf-blog-slider-holder .mkdf-bs-item-bottom-section .mkdf-bs-item-author a:hover',\n\t\t\t\t'.mkdf-blog-slider-holder .mkdf-bs-item-bottom-section .mkdf-bs-item-categories a:hover',\n\t\t\t\t'.mkdf-blog-slider-holder .owl-next:hover',\n\t\t\t\t'.mkdf-blog-slider-holder .owl-prev:hover',\n\t\t\t\t'.mkdf-accordion-holder .mkdf-title-holder.ui-state-active',\n\t\t\t\t'.mkdf-accordion-holder .mkdf-title-holder.ui-state-hover',\n\t\t\t\t'.mkdf-accordion-holder.mkdf-boxed .mkdf-title-holder.ui-state-active',\n\t\t\t\t'.mkdf-accordion-holder.mkdf-boxed .mkdf-title-holder.ui-state-hover',\n\t\t\t\t'.mkdf-blog-list-holder .mkdf-item-info-section>div>a:hover',\n\t\t\t\t'.mkdf-blog-list-holder.mkdf-grid-type-2 .mkdf-post-item-author-holder a:hover',\n\t\t\t\t'.mkdf-blog-list-holder.mkdf-masonry .mkdf-post-item-author-holder a:hover',\n\t\t\t\t'.mkdf-blog-list-holder.mkdf-image-in-box h5.mkdf-item-title a:hover',\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline',\n\t\t\t\t'.post-password-form input.mkdf-btn-outline[type=submit]',\n\t\t\t\t'.woocommerce .mkdf-btn-outline.button',\n\t\t\t\t'input.mkdf-btn-outline.wpcf7-form-control.wpcf7-submit',\n\t\t\t\t'.mkdf-dropcaps',\n\t\t\t\t'.mkdf-iwt.mkdf-iwt-left-from-title .mkdf-iwt-icon-title-holder',\n\t\t\t\t'.mkdf-social-share-holder.mkdf-list li a:hover',\n\t\t\t\t'.mkdf-info-item-inner:hover h6',\n\t\t\t\t'.mkdf-icon-progress-bar .mkdf-ipb-active',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-masonry .format-quote .mkdf-post-content .mkdf-post-title a:hover',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-masonry .format-quote .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-masonry .format-link .mkdf-post-content .mkdf-post-title a:hover',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-masonry .format-link .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-date-on-side .format-link .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-date-on-side .format-quote .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-split-column article.format-link h3.mkdf-post-title a:hover',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-split-column article.format-link .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-split-column article.format-quote .mkdf-post-title h3 a:hover',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-standard .format-quote .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-standard .format-link .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-type-split-column article.format-quote .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-single.mkdf-blog-standard .format-quote .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-single.mkdf-blog-standard .format-link .mkdf-post-mark',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-single.mkdf-blog-standard article.format-link .mkdf-category a:hover',\n\t\t\t\t'.mkdf-blog-holder.mkdf-blog-single.mkdf-blog-standard article.format-quote .mkdf-category a:hover',\n\t\t\t\t'.mkdf-blog-holder article.sticky .mkdf-post-title a',\n\t\t\t\t'.mkdf-filter-blog-holder li.mkdf-active',\n\t\t\t\t'article .mkdf-category',\n\t\t\t\t'article .mkdf-category span.icon_tags',\n\t\t\t\t'.mejs-controls .mejs-button button:hover',\n\t\t\t\t'.woocommerce-pagination .page-numbers li a:hover',\n\t\t\t\t'.woocommerce-pagination .page-numbers li span.current',\n\t\t\t\t'.woocommerce-pagination .page-numbers li span.current:hover',\n\t\t\t\t'.woocommerce-pagination .page-numbers li span:hover',\n\t\t\t\t'.mkdf-woocommerce-page .select2-results .select2-highlighted',\n\t\t\t\t'.mkdf-woocommerce-page ul.products .product .added_to_cart',\n\t\t\t\t'.woocommerce ul.products .product .added_to_cart',\n\t\t\t\t'.mkdf-woocommerce-page ul.products .product .added_to_cart:hover',\n\t\t\t\t'.woocommerce ul.products .product .added_to_cart:hover',\n\t\t\t\t'.mkdf-woocommerce-page ul.products .add_to_cart_button',\n\t\t\t\t'.woocommerce ul.products .add_to_cart_button',\n\t\t\t\t'.mkdf-woocommerce-page .star-rating:before',\n\t\t\t\t'.woocommerce .star-rating:before',\n\t\t\t\t'.mkdf-woocommerce-page .star-rating span:before',\n\t\t\t\t'.woocommerce .star-rating span:before',\n\t\t\t\t'.mkdf-woocommerce-with-sidebar aside.mkdf-sidebar .widget.widget_product_categories ul.product-categories li:hover a',\n\t\t\t\t'.mkdf-shopping-cart-dropdown ul li a:hover',\n\t\t\t\t'.mkdf-shopping-cart-dropdown .mkdf-item-info-holder .mkdf-item-left a:hover',\n\t\t\t\t'.mkdf-shopping-cart-dropdown .mkdf-item-info-holder .mkdf-item-right .remove:hover',\n\t\t\t\t'.mkdf-shopping-cart-dropdown span.mkdf-total span',\n\t\t\t\t'.mkdf-shopping-cart-dropdown span.mkdf-quantity',\n\t\t\t\t'.woocommerce-cart .woocommerce form:not(.woocommerce-shipping-calculator) .product-name a:hover',\n\t\t\t\t'.woocommerce-cart .woocommerce .cart-collaterals .mkdf-shipping-calculator .woocommerce-shipping-calculator>p a:hover',\n\t\t\t\t'.mkdf-tour-item-label.mkdf-tour-item-label-skin2',\n\t\t\t\t'.mkdf-tours-standard-item .mkdf-tours-price-with-discount .mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tours-list-item .mkdf-tours-price-with-discount .mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tour-cover-boxes-holder span.mkdf-tours-item-discount-price.mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tour-type-list-holder li a:hover',\n\t\t\t\t'.mkdf-tours-top-reviews-carousel-holder .mkdf-tours-top-reviews-item-title a:hover',\n\t\t\t\t'.mkdf-tours-top-reviews-carousel-holder .mkdf-tour-reviews-criteria-holder .mkdf-tour-reviews-rating-holder',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-item-price-holder .mkdf-tours-price-with-discount .mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-main-info-holder li:hover .col6.mkdf-info',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-main-info-holder li.mkdf-tours-unchecked-attributes .mkdf-tour-main-info-attr:before',\n\t\t\t\t'.mkdf-tours-booking-form-holder .mkdf-tour-message-danger'\n );\n\n $color_important_selector = array(\n\t\t\t\t'.mkdf-icon-list-item a:hover .mkdf-icon-list-text',\n\t\t\t\t'.mkdf-btn.mkdf-btn-hover-outline:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.post-password-form input[type=submit]:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.woocommerce .button:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'input.mkdf-btn-hover-outline.wpcf7-form-control.wpcf7-submit:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.mkdf-btn.mkdf-btn-hover-white:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.post-password-form input.mkdf-btn-hover-white[type=submit]:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.woocommerce .mkdf-btn-hover-white.button:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'input.mkdf-btn-hover-white.wpcf7-form-control.wpcf7-submit:not(.mkdf-btn-custom-hover-color):hover',\n\t\t\t\t'.mkdf-tours-list-holder .mkdf-tour-list-filter-item.mkdf-tour-list-current-filter a'\n );\n\n $background_color_selector = array(\n\t\t\t\t'.mkdf-st-loader .pulse',\n\t\t\t\t'.mkdf-st-loader .double_pulse .double-bounce1',\n\t\t\t\t'.mkdf-st-loader .double_pulse .double-bounce2',\n\t\t\t\t'.mkdf-st-loader .cube',\n\t\t\t\t'.mkdf-st-loader .rotating_cubes .cube1',\n\t\t\t\t'.mkdf-st-loader .rotating_cubes .cube2',\n\t\t\t\t'.mkdf-st-loader .stripes>div',\n\t\t\t\t'.mkdf-st-loader .wave>div',\n\t\t\t\t'.mkdf-st-loader .two_rotating_circles .dot1',\n\t\t\t\t'.mkdf-st-loader .two_rotating_circles .dot2',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container1>div',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container2>div',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container3>div',\n\t\t\t\t'.mkdf-st-loader .atom .ball-1:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-2:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-3:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-4:before',\n\t\t\t\t'.mkdf-st-loader .clock .ball:before',\n\t\t\t\t'.mkdf-st-loader .mitosis .ball',\n\t\t\t\t'.mkdf-st-loader .lines .line1',\n\t\t\t\t'.mkdf-st-loader .lines .line2',\n\t\t\t\t'.mkdf-st-loader .lines .line3',\n\t\t\t\t'.mkdf-st-loader .lines .line4',\n\t\t\t\t'.mkdf-st-loader .fussion .ball',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-1',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-2',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-3',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-4',\n\t\t\t\t'.mkdf-st-loader .wave_circles .ball',\n\t\t\t\t'.mkdf-st-loader .pulse_circles .ball',\n\t\t\t\t'.mkdf-carousel-pagination .owl-page.active span',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_product_tag_cloud .tagcloud a',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_tag_cloud .tagcloud a',\n\t\t\t\t'#ui-datepicker-div table.ui-datepicker-calendar thead',\n\t\t\t\t'footer .mkdf-footer-top-holder .widget.widget_product_tag_cloud .tagcloud a',\n\t\t\t\t'footer .mkdf-footer-top-holder .widget.widget_tag_cloud .tagcloud a',\n\t\t\t\t'.mkdf-team.main-info-below-image .mkdf-icon-element',\n\t\t\t\t'.mkdf-icon-shortcode.circle',\n\t\t\t\t'.mkdf-icon-shortcode.square',\n\t\t\t\t'.mkdf-testimonials.owl-carousel .owl-dots .owl-dot.active span',\n\t\t\t\t'.mkdf-price-table .mkdf-price-table-inner .mkdf-pt-label-holder .mkdf-pt-label-inner',\n\t\t\t\t'.mkdf-price-table.mkdf-pt-active .mkdf-price-table-inner',\n\t\t\t\t'.mkdf-pie-chart-doughnut-holder .mkdf-pie-legend ul li .mkdf-pie-color-holder',\n\t\t\t\t'.mkdf-pie-chart-pie-holder .mkdf-pie-legend ul li .mkdf-pie-color-holder',\n\t\t\t\t'.mkdf-tabs .mkdf-tabs-nav .mkdf-tab-line',\n\t\t\t\t'.mkdf-btn.mkdf-btn-solid',\n\t\t\t\t'.post-password-form input[type=submit]',\n\t\t\t\t'.woocommerce .button',\n\t\t\t\t'input.wpcf7-form-control.wpcf7-submit',\n\t\t\t\t'.mkdf-dropcaps.mkdf-circle',\n\t\t\t\t'.mkdf-dropcaps.mkdf-square',\n\t\t\t\t'.mkdf-comparision-pricing-tables-holder .mkdf-cpt-table .mkdf-cpt-table-btn a',\n\t\t\t\t'.mkdf-vertical-progress-bar-holder .mkdf-vpb-active-bar',\n\t\t\t\t'.mkdf-weather-widget-holder .mkdf-date-format',\n\t\t\t\t'.widget_mkdf_call_to_action_button .mkdf-call-to-action-button',\n\t\t\t\t'.mkdf-blog-date-on-side .mkdf-date-format',\n\t\t\t\t'.single .mkdf-single-tags-holder .mkdf-tags a',\n\t\t\t\t'.mejs-controls .mejs-time-rail .mejs-time-current:after',\n\t\t\t\t'.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current',\n\t\t\t\t'.mejs-controls .mejs-time-rail .mejs-time-current',\n\t\t\t\t'.mkdf-woocommerce-page .woocommerce-info',\n\t\t\t\t'.mkdf-woocommerce-page .mkdf-onsale',\n\t\t\t\t'.mkdf-woocommerce-page .mkdf-out-of-stock',\n\t\t\t\t'.woocommerce .mkdf-onsale',\n\t\t\t\t'.woocommerce .mkdf-out-of-stock',\n\t\t\t\t'.single-product .mkdf-tabs.mkdf-horizontal .mkdf-tab-line',\n\t\t\t\t'.mkdf-woocommerce-with-sidebar aside.mkdf-sidebar .widget.widget_price_filter .ui-slider .ui-slider-handle',\n\t\t\t\t'.mkdf-shopping-cart-outer .mkdf-shopping-cart-header .mkdf-header-cart .mkdf-cart-count',\n\t\t\t\t'.mkdf-tour-item-label.mkdf-tour-item-label-skin1',\n\t\t\t\t'.mkdf-search-ordering-holder .mkdf-search-ordering-list .mkdf-tab-line',\n\t\t\t\t'.mkdf-membership-dashboard-nav .mkdf-tab-line',\n\t\t\t\t'.mkdf-content-inner>.mkdf-container .mkdf-login-register-content .mkdf-tab-line'\n );\n\n $background_color_important_selector = array(\n \t'.mkdf-woocommerce-page .price_slider_amount button.button',\n\t\t\t\t'.woocommerce .price_slider_amount button.button',\n\t\t\t\t'.mkdf-tours-booking-form-holder input[type=submit]:disabled:hover'\n );\n\n $border_color_selector = array(\n\t\t\t\t'.mkdf-st-loader .pulse_circles .ball',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_product_tag_cloud .tagcloud a',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_tag_cloud .tagcloud a',\n\t\t\t\t'footer .mkdf-footer-top-holder .widget.widget_product_tag_cloud .tagcloud a',\n\t\t\t\t'footer .mkdf-footer-top-holder .widget.widget_tag_cloud .tagcloud a',\n\t\t\t\t'.mkdf-team.main-info-below-image .mkdf-icon-element',\n\t\t\t\t'.mkdf-btn.mkdf-btn-solid',\n\t\t\t\t'.post-password-form input[type=submit]',\n\t\t\t\t'.woocommerce .button',\n\t\t\t\t'input.wpcf7-form-control.wpcf7-submit',\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline',\n\t\t\t\t'.post-password-form input.mkdf-btn-outline[type=submit]',\n\t\t\t\t'.woocommerce .mkdf-btn-outline.button',\n\t\t\t\t'input.mkdf-btn-outline.wpcf7-form-control.wpcf7-submit',\n\t\t\t\t'.single .mkdf-single-tags-holder .mkdf-tags a',\n\t\t\t\t'.mkdf-woocommerce-page .price_slider_amount button.button',\n\t\t\t\t'.woocommerce .price_slider_amount button.button',\n\t\t\t\t'.woocommerce-cart .woocommerce form:not(.woocommerce-shipping-calculator) .actions .coupon input[type=text]:focus'\n );\n\n $border_top_color_selector = array(\n '.mkdf-progress-bar .mkdf-progress-number-wrapper.mkdf-floating .mkdf-down-arrow'\n );\n\n $border_bottom_color_selector = array(\n );\n\n $border_left_color_selector = array(\n );\n\n $border_color_important_selector = array(\n\t\t\t\t'.mkdf-btn.mkdf-btn-hover-outline:not(.mkdf-btn-custom-border-hover):hover',\n\t\t\t\t'.post-password-form input[type=submit]:not(.mkdf-btn-custom-border-hover):hover',\n\t\t\t\t'.woocommerce .button:not(.mkdf-btn-custom-border-hover):hover',\n\t\t\t\t'input.mkdf-btn-hover-outline.wpcf7-form-control.wpcf7-submit:not(.mkdf-btn-custom-border-hover):hover'\n );\n\n $stroke_selector = array(\n \t'.mkdf-plane-holder .st0',\n \t'.mkdf-plane-holder .st1'\n \t);\n\n\t\t\t$first_color = voyage_mikado_options()->getOptionValue('first_color');\n\n echo voyage_mikado_dynamic_css($color_selector, array('color' => $first_color));\n echo voyage_mikado_dynamic_css($color_important_selector, array('color' => $first_color.'!important'));\n echo voyage_mikado_dynamic_css('::selection', array('background' => $first_color));\n echo voyage_mikado_dynamic_css('::-moz-selection', array('background' => $first_color));\n echo voyage_mikado_dynamic_css($background_color_selector, array('background-color' => $first_color));\n echo voyage_mikado_dynamic_css($background_color_important_selector, array('background-color' => $first_color.'!important'));\n echo voyage_mikado_dynamic_css($border_color_selector, array('border-color' => $first_color));\n echo voyage_mikado_dynamic_css($border_color_important_selector, array('border-color' => $first_color.'!important'));\n echo voyage_mikado_dynamic_css($border_top_color_selector, array('border-top-color' => $first_color));\n echo voyage_mikado_dynamic_css($border_bottom_color_selector, array('border-bottom-color' => $first_color));\n echo voyage_mikado_dynamic_css($border_left_color_selector, array('border-left-color' => $first_color));\n echo voyage_mikado_dynamic_css($stroke_selector, array('stroke' => $first_color));\n }\n\n if(voyage_mikado_options()->getOptionValue('second_color') !== \"\") {\n $color_selector = array(\n\t\t\t\t'#ui-datepicker-div a',\n\t\t\t\t'.mkdf-icon-list-item .mkdf-icon-list-icon-holder-inner',\n\t\t\t\t'.mkdf-image-gallery .mkdf-image-gallery-grid .mkdf-image-gallery-hover a.mkdf-gallery-link',\n\t\t\t\t'.mkdf-woocommerce-page ul.products .product .mkdf-woo-product-image-holder .add_to_cart_button',\n\t\t\t\t'.mkdf-woocommerce-page ul.products .product .mkdf-woo-product-image-holder .product_type_simple',\n\t\t\t\t'.woocommerce ul.products .product .mkdf-woo-product-image-holder .add_to_cart_button',\n\t\t\t\t'.woocommerce ul.products .product .mkdf-woo-product-image-holder .product_type_simple',\n\t\t\t\t'.mkdf-woocommerce-page .price',\n\t\t\t\t'.woocommerce .price',\n\t\t\t\t'.mkdf-woocommerce-page .price ins',\n\t\t\t\t'.woocommerce .price ins',\n\t\t\t\t'.single-product .mkdf-single-product-summary .price',\n\t\t\t\t'.mkdf-woocommerce-with-sidebar aside.mkdf-sidebar .widget .product_list_widget li .mkdf-woo-product-widget-content .amount',\n\t\t\t\t'.mkdf-woocommerce-with-sidebar aside.mkdf-sidebar .widget .product_list_widget li .mkdf-woo-product-widget-content ins',\n\t\t\t\t'.mkdf-tours-price-holder',\n\t\t\t\t'.mkdf-tours-list-item .mkdf-tours-price-with-discount .mkdf-tours-item-discount-price.mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-item-price-holder .mkdf-tours-item-discount-price.mkdf-tours-item-price',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-item-price-holder .mkdf-tour-item-price',\n\t\t\t\t'.mkdf-tour-item-single-holder article .mkdf-tour-main-info-holder li.mkdf-tours-checked-attributes .mkdf-tour-main-info-attr:before',\n\t\t\t\t'.mkdf-tour-reviews-display-wrapper .mkdf-tour-reviews-average-rating',\n\t\t\t\t'.mkdf-tours-booking-form-holder .mkdf-tour-message-success',\n\t\t\t\t'.mkdf-tours-my-booking-item .mkdf-tours-info-items .mkdf-tours-booking-price',\n\t\t\t\t'.mkdf-tours-search-main-filters-holder label:before',\n\t\t\t\t'.mkdf-tours-checkout-content-inner .mkdf-tours-info-holder .mkdf-tours-booking-price',\n\t\t\t\t'.mkdf-tours-checkout-content-inner h6'\n );\n\n $color_important_selector = array(\n \t'.mkdf-woocommerce-page ul.products .product .mkdf-woo-product-image-holder a:hover',\n \t'.woocommerce ul.products .product .mkdf-woo-product-image-holder a:hover',\n \t'.mkdf-tours-standard-item .mkdf-tours-item-discount-price.mkdf-tours-item-price'\n );\n\n $background_color_selector = array(\n\t\t\t\t'.mkdf-membership-response-holder .mkdf-membership-response.mkdf-membership-message-succes',\n\t\t\t\t'aside.mkdf-sidebar .widget .searchform input[type=submit]',\n\t\t\t\t'.mkdf-login-register-content ul li.ui-state-active',\n\t\t\t\t'.mkdf-top-bar .mkdf-top-bar-widget-inner .mkdf-search-opener',\n\t\t\t\t'.mkdf-progress-bar .mkdf-progress-content-outer .mkdf-progress-content',\n\t\t\t\t'.mkdf-tour-item-single-holder .mkdf-tour-item-section .mkdf-route-id',\n\t\t\t\t'.mkdf-tour-item-single-holder .mkdf-tour-item-section span.mkdf-line-between-icons-inner',\n\t\t\t\t'.mkdf-tour-reviews-display-wrapper .mkdf-tour-reviews-display-right .mkdf-tour-reviews-bar-holder .mkdf-tour-reviews-bar-progress',\n\t\t\t\t'.tt-suggestion.tt-cursor',\n\t\t\t\t'.tt-suggestion:hover',\n\t\t\t\t'.mkdf-search-ordering-holder .mkdf-tours-search-view-list li.mkdf-tours-search-view-item-active>a',\n\t\t\t\t'.mkdf-search-ordering-holder .mkdf-tours-search-view-list li>a:hover'\n );\n\n $background_color_important_selector = array(\n \t'#ui-datepicker-div .ui-datepicker-today',\n \t'.mkdf-shopping-cart-dropdown .mkdf-cart-bottom .mkdf-btns-holder .mkdf-btn.mkdf-btn-small.view-cart'\n );\n\n $border_color_selector = array(\n );\n\n $border_color_important_selector = array(\n \t'.mkdf-shopping-cart-dropdown .mkdf-cart-bottom .mkdf-btns-holder .mkdf-btn.mkdf-btn-small.view-cart'\n );\n\n\t\t\t$second_color = voyage_mikado_options()->getOptionValue('second_color');\n\n echo voyage_mikado_dynamic_css($color_selector, array('color' => $second_color));\n echo voyage_mikado_dynamic_css($color_important_selector, array('color' => $second_color.'!important'));\n echo voyage_mikado_dynamic_css('::selection', array('background' => $second_color));\n echo voyage_mikado_dynamic_css('::-moz-selection', array('background' => $second_color));\n echo voyage_mikado_dynamic_css($background_color_selector, array('background-color' => $second_color));\n echo voyage_mikado_dynamic_css($background_color_important_selector, array('background-color' => $second_color.'!important'));\n echo voyage_mikado_dynamic_css($border_color_selector, array('border-color' => $second_color));\n echo voyage_mikado_dynamic_css($border_color_important_selector, array('border-color' => $second_color.'!important'));\n }\n\n if(voyage_mikado_options()->getOptionValue('page_background_color')) {\n $background_color_selector = array(\n '.mkdf-wrapper-inner',\n '.mkdf-content',\n '.mkdf-content-inner > .mkdf-container'\n );\n echo voyage_mikado_dynamic_css($background_color_selector, array('background-color' => voyage_mikado_options()->getOptionValue('page_background_color')));\n }\n\n if(voyage_mikado_options()->getOptionValue('selection_color')) {\n echo voyage_mikado_dynamic_css('::selection', array('background' => voyage_mikado_options()->getOptionValue('selection_color')));\n echo voyage_mikado_dynamic_css('::-moz-selection', array('background' => voyage_mikado_options()->getOptionValue('selection_color')));\n }\n\n $boxed_background_style = array();\n if(voyage_mikado_options()->getOptionValue('page_background_color_in_box')) {\n $boxed_background_style['background-color'] = voyage_mikado_options()->getOptionValue('page_background_color_in_box');\n }\n\n if(voyage_mikado_options()->getOptionValue('boxed_background_image')) {\n $boxed_background_style['background-image'] = 'url('.esc_url(voyage_mikado_options()->getOptionValue('boxed_background_image')).')';\n $boxed_background_style['background-position'] = 'center 0px';\n $boxed_background_style['background-repeat'] = 'no-repeat';\n }\n\n if(voyage_mikado_options()->getOptionValue('boxed_pattern_background_image')) {\n $boxed_background_style['background-image'] = 'url('.esc_url(voyage_mikado_options()->getOptionValue('boxed_pattern_background_image')).')';\n $boxed_background_style['background-position'] = '0px 0px';\n $boxed_background_style['background-repeat'] = 'repeat';\n }\n\n if(voyage_mikado_options()->getOptionValue('boxed_background_image_attachment')) {\n $boxed_background_style['background-attachment'] = (voyage_mikado_options()->getOptionValue('boxed_background_image_attachment'));\n }\n\n echo voyage_mikado_dynamic_css('.mkdf-boxed .mkdf-wrapper', $boxed_background_style);\n }", "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "public function addStaticJavascript()\n {\n JHTML::_('behavior.mootools');\n\n $document = JFactory::getDocument();\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/jquery-ui-base-1.8.20.css\");\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/tagit-stylish-yellow.css\");\n\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery.1.7.2.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery-ui.1.8.20.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/tagit.js\");\n $document->addScriptDeclaration(\"jQuery.noConflict();\");\n }", "function lgmac_script(){\n\twp_enqueue_style('lgmac_bootstrap',get_template_directory_uri().'/css/bootstrap.min.css',array(),'4.3.1','all'); \t\n\twp_enqueue_style('lgmac_custom',get_template_directory_uri().'/style.css',array('lgmac_bootstrap'),LMAC_VERSION,'all');\n //chargement des Css du header1\n \t\twp_enqueue_style('lgmac_Flat_hedear',get_template_directory_uri().'/css/fontawesome.css',array(),LMAC_VERSION,'all');\n\t\twp_enqueue_style('lgmac_Fawsmin',get_template_directory_uri().'/css/font-awesome.min.css',array(),LMAC_VERSION,'all');\n\t\twp_enqueue_style('lgmac_matedeign',get_template_directory_uri().'/css/materieldesign.css',array(),LMAC_VERSION,'all');\n\t\t//wp_enqueue_style('lgmac_matekitign',get_template_directory_uri().'/assets/css/material-kit.css',array(),LMAC_VERSION,'all');\n\t\twp_enqueue_style('lgmac_Card_counter_card',get_template_directory_uri().'/css/card-counter-card.css',array(),LMAC_VERSION,'all');\n\t\twp_enqueue_style('lgmac_services',get_template_directory_uri().'/vc-elements/css/services.css',array(),LMAC_VERSION,'all');\n wp_enqueue_style('lgmac_carrouselside',get_template_directory_uri().'/vc-elements/css/Carousel_Side_Caption.css',array(),LMAC_VERSION,'all');\n wp_enqueue_style('lgmac-social',get_template_directory_uri().'/vc-elements/css/social.css',array(),LMAC_VERSION,'all');\n \n\t\t\n\t\t//interractive\n\t\twp_enqueue_style('lgmac_interractive',get_template_directory_uri().'/vc-elements/css/InteractiveSVG.css',array(),LMAC_VERSION,'all');\n //donut min jquery.DonutWidget\n\t\twp_enqueue_style('lgmac_jqueruDounutcss',get_template_directory_uri().'/vc-elements/css/jquery.DonutWidget.css',array(),LMAC_VERSION,'all');\n //Ourservices.css\n\t\twp_enqueue_style('lgmac_Ourservicescss',get_template_directory_uri().'/vc-elements/css/Ourservices.css',array(),LMAC_VERSION,'all');\n //timeline66.css\n\t\twp_enqueue_style('lgmac_timeline66',get_template_directory_uri().'/vc-elements/css/timeline66.css',array(),LMAC_VERSION,'all');\n\t\t//ServiceBox76.css\n\t\twp_enqueue_style('lgmac_service76',get_template_directory_uri().'/vc-elements/css/ServiceBox76.css',array(),LMAC_VERSION,'all');\n\t\t//project.css\n\t\twp_enqueue_style('lgmac-project',get_template_directory_uri().'/vc-elements/css/project.css',array(),LMAC_VERSION,'all');\n //carrouselmin.css\n\t wp_enqueue_style('lgmac-project2',get_template_directory_uri().'/vc-elements/css/project1.css',array(),LMAC_VERSION,'all');\n \n \n\n\n\t wp_enqueue_style('lgmac_menu1-css',get_template_directory_uri().'/Menu1/styles.css',array('jquery'),LMAC_VERSION,'all');\n //InteractiveSVG.js\n wp_enqueue_script('lg-services-jscript',get_template_directory_uri().'/vc-elements/Js/Services.js',array('jquery'),'4.1.4',false);\n wp_enqueue_script('lg-carousselside-jscript',get_template_directory_uri().'/vc-elements/Js/Carousel_Side_Caption.js',array('jquery'),'4.1.4',false);\n \n wp_enqueue_script('lg-jquerydonut',get_template_directory_uri().'/vc-elements/Js/jquery.DonutWidget.js',array('jquery'),'4.1.4',false);\n wp_enqueue_script('lg-Interactive',get_template_directory_uri().'/vc-elements/Js/InteractiveSVG.js',array('jquery','lg-jquerydonut'),'4.1.4',false);\n \n\t \n\t ///Carrousselmin.js\n\t //wp_enqueue_script('lg-carrousselmin',get_template_directory_uri().'/vc-elements/Js/Carrousselmin.js',array('jquery'),'1.3.3',false);\n \n\n\t //chargement des fichiers JS\n\t wp_enqueue_script('lg-bootstrapmin-jscript',get_template_directory_uri().'/js/bootstrap.min.js',array('jquery'),LMAC_VERSION,false);\n\t //wp_enqueue_script('lgmac_menu1-js',get_template_directory_uri().'/Menu1/script.js',array(),LMAC_VERSION,false);\n\t wp_enqueue_script('lgmac_jscript',get_template_directory_uri().'/js/Monfirst_template.js',array('jquery','lg-bootstrapmin-jscript'),LMAC_VERSION,false);\n\t//false : charger le script au debut du headder\n\t//true charger en fin de page : footer \n\t\n\t wp_enqueue_script('lg-bootstrapmin-momentjs-jscript',get_template_directory_uri().'/assets/js/plugins/moment.min.js',array('jquery'),LMAC_VERSION,false);\n\t wp_enqueue_script('lg-poperpmin-jscript',get_template_directory_uri().'/assets/js/core/popper.min.js',array('jquery'),LMAC_VERSION,false);\n\t wp_enqueue_script('lg-bootstrapmin-design-jscript',get_template_directory_uri().'/assets/js/core/bootstrap-material-design.min.js',array('jquery'),LMAC_VERSION,false);\n\t wp_enqueue_script('lg-bootstrapmin-datepicker-jscript',get_template_directory_uri().'/assets/js/plugins/bootstrap-datetimepicker.js',array('jquery'),LMAC_VERSION,false);\n\t wp_enqueue_script('lg-nouislider-jscript',get_template_directory_uri().'/assets/js/plugins/nouislider.min.js',LMAC_VERSION,false);\n\t wp_enqueue_script('lg-button-jscript',get_template_directory_uri().'/js/button.js',array('jquery'),LMAC_VERSION,false);\n\t wp_enqueue_script('lg-materielkit-jscript',get_template_directory_uri().'/assets/js/material-kit.js',array('jquery'),'2.0.5',false);\n\t\n\t\n\t///règles générale d'utilisations\n\t\n\twp_enqueue_style('lgmac_CookiesCss',get_template_directory_uri().'/css/CookieConscent.css',array(),'LMAC_VERSION','all'); \t\n wp_enqueue_script('lgmac_cookiesJs',get_template_directory_uri().'/js/CookieConsent.js',array('jquery'),'1.12.0',false);\t\t\n wp_enqueue_script('lgmac_popupGrpd',get_template_directory_uri().'/js/popup.js',array('jquery'),'1.12.0',false);\t\t\n\n\n \n}", "protected function loadCss() {}", "function cseas_simple_slider_enqueue_scripts_styles() {\n\t\twp_enqueue_script( 'cseas-simple-slider-js', plugins_url( 'slider.js', __FILE__ ), array( 'jquery' ) ); // slider.js\n\t\twp_enqueue_style( 'cseas-simple-slider-css', plugins_url( 'slider.css', __FILE__ ) );\n\t}", "function sj_player_color_css_func($sj_player_color,$sj_player_time_color,$sj_player_shortcode_font_color,$sj_player_widget_font_color,$sj_player_title_font_size,$sj_player_description_font_size,$sj_player_time_font_size){\n echo '<style type=\"text/css\">\n .cp-container{\n margin: 0 auto;\n }\n .cp-progress-1,\n .cp-progress-2 {\n background-color:'.$sj_player_color.';\n }\n .cp-controls .cp-play:hover{\n background-color: '.$sj_player_color.';\n }\n .cp-controls .cp-pause{\n background-color: '.$sj_player_color.';\n }\n\n .jp-current-time,.jp-duration{\n color: '.$sj_player_time_color.';\n font-size: '.$sj_player_time_font_size.'px;\n }\n\n .cp-jplayershortcode{\n color: '.$sj_player_shortcode_font_color.';\n\n }\n .cp-jplayerwidget{\n color: '.$sj_player_widget_font_color.';\n display: inline-block;\n }\n .sj-player-display-title{\n font-size:'.$sj_player_title_font_size.'px;\n }\n\n .sj-player-display-description{\n font-size:'.$sj_player_description_font_size.'px;\n }\n\n .time-duration-holder {\n background: none repeat scroll 0 0;\n height: auto;\n margin-top: 2%;\n padding: 0 0%;\n width: 100%;\n margin-bottom:2%;\n }\n .jp-current-time {\n background: none repeat scroll 0 0 ;\n width: 50%;\n float: left;\n }\n .jp-duration {\n float: right;\n }\n .sj-player-display li p {\n text-align:center;\n }\n </style>';\n\n }", "function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}", "public static function load_dynamic_css() {\n\t\t\tif ( ! isset( $_POST['vc_inline'] ) ) {\n\t\t\t\t\n\t\t\t\t// Custom styles\n\t\t\t\t$name = self::option( 'white_label_theme_name', 'xtra' );\n\t\t\t\t$handle = wp_style_is( 'codevz-plugin' ) ? 'codevz-plugin' : $name;\n\t\t\t\t$extra_css = '';\n\n\t\t\t\t// Dark\n\t\t\t\tif ( self::option( 'dark' ) ) {\n\t\t\t\t\t$extra_css .= \"/* Dark */\" . 'body{background-color:#171717;color:#fff}.layout_1,.layout_2{background:#191919}a,.woocommerce-error, .woocommerce-info, .woocommerce-message{color:#fff}.sf-menu li li a,.sf-menu .cz > h6{color: #000}.cz_quote_arrow blockquote{background:#272727}.search_style_icon_dropdown .outer_search, .cz_cart_items {background: #000;color: #c0c0c0 !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {color: #111}#bbpress-forums li{background:none!important}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer{background:#141414!important;color:#FFF;padding:10px 20px!important}.bbp-header a{color:#fff}.subscription-toggle,.favorite-toggle{padding: 1px 20px !important;}span#subscription-toggle{color: #000}#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a{background:#1D1E20!important;color:#FFF;opacity:1}#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic{padding:10px 20px!important}.bbp-search-form{margin:0 0 12px!important}.bbp-form .submit{margin:0 auto 20px}div.bbp-breadcrumb,div.bbp-topic-tags{line-height:36px}.bbp-breadcrumb-sep{padding:0 6px}#bbpress-forums li.bbp-header ul{font-size:14px}.bbp-forum-title,#bbpress-forums .bbp-topic-title .bbp-topic-permalink{font-size:16px;font-weight:700}#bbpress-forums .bbp-topic-started-by{display:inline-block}#bbpress-forums p.bbp-topic-meta a{margin:0 4px 0 0;display:inline-block}#bbpress-forums p.bbp-topic-meta img.avatar,#bbpress-forums ul.bbp-reply-revision-log img.avatar,#bbpress-forums ul.bbp-topic-revision-log img.avatar,#bbpress-forums div.bbp-template-notice img.avatar,#bbpress-forums .widget_display_topics img.avatar,#bbpress-forums .widget_display_replies img.avatar{margin-bottom:-2px;border:0}span.bbp-admin-links{color:#4F4F4F}span.bbp-admin-links a{color:#7C7C7C}.bbp-topic-revision-log-item *{display:inline-block}#bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log{border-top:1px dotted #474747;padding:10px 0 0;color:#888282}.bbp-topics,.bbp-replies,.topic{position:relative}#subscription-toggle,#favorite-toggle{float:right;line-height:34px;color:#DFDFDF;display:block;border:1px solid #DFDFDF;padding:0;margin:0;font-size:12px;border:0!important}.bbp-user-subscriptions #subscription-toggle,.bbp-user-favorites #favorite-toggle{position:absolute;top:0;right:0;line-height:20px}.bbp-reply-author br{display:none}#bbpress-forums li{text-align:left}li.bbp-forum-freshness,li.bbp-topic-freshness{width:23%}.bbp-topics-front ul.super-sticky,.bbp-topics ul.super-sticky,.bbp-topics ul.sticky,.bbp-forum-content ul.sticky{background-color:#2C2C2C!important;border-radius:0!important;font-size:1.1em}#bbpress-forums div.odd,#bbpress-forums ul.odd{background-color:#0D0D0D!important}div.bbp-template-notice a{display:inline-block}div.bbp-template-notice a:first-child,div.bbp-template-notice a:last-child{display:inline-block}#bbp_topic_title,#bbp_topic_tags{width:400px}#bbp_stick_topic_select,#bbp_topic_status_select,#display_name{width:200px}#bbpress-forums #bbp-your-profile fieldset span.description{color:#FFF;border:#353535 1px solid;background-color:#222!important;margin:16px 0}#bbpress-forums fieldset.bbp-form{margin-bottom:40px}.bbp-form .quicktags-toolbar{border:1px solid #EBEBEB}.bbp-form .bbp-the-content,#bbpress-forums #description{border-width:1px!important;height:200px!important}#bbpress-forums #bbp-single-user-details{width:100%;float:none;border-bottom:1px solid #080808;box-shadow:0 1px 0 rgba(34,34,34,0.8);margin:0 0 20px;padding:0 0 20px}#bbpress-forums #bbp-user-wrapper h2.entry-title{margin:-2px 0 20px;display:inline-block;border-bottom:1px solid #FF0078}#bbpress-forums #bbp-single-user-details #bbp-user-navigation a{padding:2px 8px}#bbpress-forums #bbp-single-user-details #bbp-user-navigation{display:inline-block}#bbpress-forums #bbp-user-body,.bbp-user-section p{margin:0}.bbp-user-section{margin:0 0 30px}#bbpress-forums #bbp-single-user-details #bbp-user-avatar{margin:0 20px 0 0;width:auto;display:inline-block}#bbpress-forums div.bbp-the-content-wrapper input{width:auto!important}input#bbp_topic_subscription{width:auto;display:inline-block;vertical-align:-webkit-baseline-middle}.widget_display_replies a,.widget_display_topics a{display:inline-block}.widget_display_replies li,.widget_display_forums li,.widget_display_views li,.widget_display_topics li{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_replies li div,.widget_display_topics li div{font-size:11px}.widget_display_stats dt{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_stats dd{float:right;margin:-40px 0 0;color:#5F5F5F}#bbpress-forums div.bbp-topic-content code,#bbpress-forums div.bbp-reply-content code,#bbpress-forums div.bbp-topic-content pre,#bbpress-forums div.bbp-reply-content pre{background-color:#FFF;padding:12px 20px;max-width:96%;margin-top:0}#bbpress-forums div.bbp-forum-author img.avatar,#bbpress-forums div.bbp-topic-author img.avatar,#bbpress-forums div.bbp-reply-author img.avatar{border-radius:100%}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer,#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic,div.bbp-forum-header,div.bbp-topic-header,div.bbp-reply-header{border-top:1px solid #252525!important}#bbpress-forums ul.bbp-lead-topic,#bbpress-forums ul.bbp-topics,#bbpress-forums ul.bbp-forums,#bbpress-forums ul.bbp-replies,#bbpress-forums ul.bbp-search-results,#bbpress-forums fieldset.bbp-form,#subscription-toggle,#favorite-toggle{border:1px solid #252525!important}#bbpress-forums div.bbp-forum-header,#bbpress-forums div.bbp-topic-header,#bbpress-forums div.bbp-reply-header{background-color:#1A1A1A!important}#bbpress-forums div.even,#bbpress-forums ul.even{background-color:#161616!important}.bbp-view-title{display:block}div.fixed_contact,i.backtotop,i.fixed_contact,.ajax_search_results{background:#151515}.nice-select{background-color:#fff;color:#000}.nice-select .list{background:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,.woocommerce div.product .woocommerce-tabs ul.tabs li a{color: inherit}.woocommerce #reviews #comments ol.commentlist li .comment-text{border-color:rgba(167, 167, 167, 0.2) !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:rgba(167, 167, 167, 0.2)}.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none!important}#comments .commentlist li .avatar{box-shadow: 1px 10px 10px rgba(167, 167, 167, 0.1) !important}.cz_line{background:#fff}.xtra-post-title span{color:rgba(255, 255, 255, 0.6)}.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg{background-color:#0b0b0b}.cz_popup_in{background:#171717;color:#fff}';\n\t\t\t\t}\n\n\t\t\t\t// Category page custom background\n\t\t\t\tif ( is_category() || is_tag() || is_tax() ) {\n\n\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t\tif ( ! empty( $wp_query->queried_object->term_id ) ) {\n\n\t\t\t\t\t\t$tax_meta = get_term_meta( $wp_query->queried_object->term_id, 'codevz_cat_meta', true );\n\n\t\t\t\t\t\tif ( ! empty( $tax_meta['_css_page_title'] ) ) {\n\n\t\t\t\t\t\t\t$extra_css .= '.page_title{' . str_replace( ';', ' !important;', $tax_meta['_css_page_title'] ) . '}';\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Theme styles\n\t\t\t\tif ( is_customize_preview() ) {\n\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css );\n\n\t\t\t\t} else {\n\t\t\t\t\t$ts = self::option( 'css_out' );\n\n\t\t\t\t\t// Fix for old users\n\t\t\t\t\tif ( ! $ts && self::$plugin ) {\n\t\t\t\t\t\t$ts = Codevz_Options::css_out();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add styles\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css . $ts );\n\n\t\t\t\t\t// Fonts\n\t\t\t\t\tforeach( (array) self::option( 'fonts_out' ) as $font ) {\n\t\t\t\t\t\tself::enqueue_font( $font );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function add_styles() {\n\n\t\t\t$current_page = isset( $_GET['page'] ) ? $_GET['page'] : null;\n\t\t\t$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : null;\n\n\t\t\t$page_ID = $this->translate_name_to_id( $this->page );\n\t\t\t$tab_ID = $this->translate_name_to_id( $this->tab );\n\t\t\t$settings_tab_ID = $this->translate_name_to_id( $this->settings_tab );\n\n\t\t\t// Only add style if on extension tab or on extension settings tab\n\t\t\tif ( ( $current_page == $page_ID && $current_tab == $tab_ID )\n\t\t\t || ( $current_page == 'cd_settings' && $current_tab == $settings_tab_ID )\n\t\t\t || ( $current_page == 'cd_account' && $current_tab == 'activity' )\n\t\t\t) {\n // Add stylesheet from this plugin\n\t\t\t\twp_enqueue_style( \"$this->ID-style\" );\n\n // Add Stream stuff\n wp_enqueue_style( 'wp-stream-admin', WP_STREAM_URL . 'ui/css/admin.css', array(), WP_Stream::VERSION );\n wp_enqueue_script( 'select2' );\n wp_enqueue_style( 'select2' );\n\n wp_enqueue_script( 'timeago' );\n wp_enqueue_script( 'timeago-locale' );\n\n wp_enqueue_script( 'wp-stream-admin', WP_STREAM_URL . 'ui/js/admin.js', array( 'jquery', 'select2' ), WP_Stream::VERSION );\n wp_enqueue_script( 'wp-stream-live-updates', WP_STREAM_URL . 'ui/js/live-updates.js', array( 'jquery', 'heartbeat' ), WP_Stream::VERSION );\n wp_localize_script(\n 'wp-stream-admin',\n 'wp_stream',\n array(\n 'i18n' => array(\n 'confirm_defaults' => __( 'Are you sure you want to reset all site settings to default? This cannot be undone.', 'stream' ),\n ),\n 'gmt_offset' => get_option( 'gmt_offset' ),\n )\n );\n wp_localize_script(\n 'wp-stream-live-updates',\n 'wp_stream_live_updates',\n array(\n 'current_screen' => $current_page,\n 'current_page' => $current_page,\n 'current_order' => isset( $_GET['order'] ) ? esc_js( $_GET['order'] ) : 'desc',\n 'current_query' => json_encode( $_GET ),\n )\n );\n }\n\t\t}", "public function getCss();", "public function getCss();", "function fiorello_mikado_content_elem_style_attr() {\n\t\t$styles = apply_filters( 'fiorello_mikado_filter_content_elem_style_attr', array() );\n\n\t\tfiorello_mikado_inline_style( $styles );\n\t}", "public function css() {\n $swpm_settings = get_option('swpm-settings');\n wp_register_style('swpm-jqueryui-css', apply_filters('swpm-date-picker-css', SWPM_FORM_BUILDER_URL . '/css/smoothness/jquery-ui-1.10.3.min.css'), array(), '20131203');\n\t//check if Light CSS option enabled\n\t$is_light=SwpmFbSettings::get_setting('enable-light-css')!==false ? '-light' : '';\n wp_register_style('swpm-form-builder-css', apply_filters('swpm-form-builder-css', SWPM_FORM_BUILDER_URL . \"/css/swpm-form-builder$is_light$this->load_dev_files.css\"), array(), '20140412');\n\n // Settings - Always load CSS\n //if (isset($swpm_settings['always-load-css'])) {\n wp_enqueue_style('swpm-form-builder-css');\n wp_enqueue_style('swpm-jqueryui-css');\n return;\n //}\n // Settings - Disable CSS\n if (isset($swpm_settings['disable-css']))\n return;\n\n // Get active widgets\n $widget = is_active_widget(false, false, 'swpm_widget');\n\n // If no widget is found, test for shortcode\n if (empty($widget)) {\n // If WordPress 3.6, use internal function. Otherwise, my own\n if (function_exists('has_shortcode')) {\n global $post;\n\n // If no post exists, exit\n if (!$post)\n return;\n\n if (!has_shortcode($post->post_content, 'swpm'))\n return;\n } elseif (!$this->has_shortcode('swpm')) {\n return;\n }\n }\n\n wp_enqueue_style('swpm-form-builder-css');\n wp_enqueue_style('swpm-jqueryui-css');\n }", "public function loadStyle(){\n \t\treturn null;\n \t}", "public static function setSiteStyling()\n {\n $styling = SiteManagement::getMetaValue('settings');\n if (!empty($styling[0]['enable_theme_color']) && $styling[0]['enable_theme_color'] == 'true') {\n if (!empty($styling[0]['primary_color'])) {\n ob_start(); ?>\n <style>\n /* Theme Text Color */\n a,\n p a,\n p a:hover,\n a:hover,\n a:focus,\n a:active,\n .wt-navigation>ul>li:hover>a,\n .wt-navigation>ul>li.current-menu-item>a,\n .wt-navarticletab li:hover a,\n .wt-navarticletab li a.active,\n .wt-categoriescontent li a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-effectivecontent li:hover a,\n .wt-articlesingle-content .wt-description .wt-blockquotevone q,\n .wt-filtertag li:hover a,\n .wt-userlisting-breadcrumb li .wt-clicksave,\n .wt-clicksave,\n .wt-qrcodefeat h3 span,\n .wt-comfollowers ul li:hover a span,\n .wt-postarticlemeta .wt-following span,\n .tg-qrcodefeat h3 span,\n .active-category {\n color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Background Color */\n .wt-btn:hover,\n .wt-dropdowarrow,\n .navbar-toggle,\n .wt-btn,\n .wt-navigationarea .wt-navigation>ul>li>a:after,\n .wt-searchbtn,\n .wt-sectiontitle:after,\n .wt-navarticletab li a:after,\n .wt-pagination ul li a:hover,\n .wt-pagination ul li.wt-active a,\n .wt-widgettag a:hover,\n .wt-articlesingle-content .wt-description blockquote span i,\n .wt-searchgbtn,\n .wt-filtertagclear a,\n .ui-slider-horizontal .ui-slider-range,\n .wt-btnsearch,\n .wt-newnoti a em,\n .wt-notificationicon>a:after,\n .wt-rightarea .wt-nav .navbar-toggler,\n .wt-usersidebaricon span,\n .wt-usersidebaricon span i,\n .wt-filtertag .wt-filtertagclear a,\n .loader:before,\n .wt-offersmessages .wt-ad:after,\n .wt-btnsendmsg,\n .wt-tabstitle li a:before,\n .wt-tabscontenttitle:before,\n .wt-tablecategories thead tr th:first-child:before,\n .wt-tablecategories tbody tr td:first-child:before,\n .wt-slidernav .wt-prev:hover,\n .wt-slidernav .wt-next:hover,\n .vb>.vb-dragger>.vb-dragger-styler,\n .wt-pagination ul li span,\n .la-banner-settings .wt-location h5:after,\n .la-section-settings .wt-location h6:after,\n .wt-forgotpassword-holder .card .card-body form .form-group button[type=submit] {\n background: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Border Color */\n input:focus,\n .select select:focus,\n .form-control:focus,\n .wt-navigation>ul>li>.sub-menu,\n .wt-pagination ul li a:hover,\n .wt-widgettag a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-filtertag li:hover a,\n .wt-filtertag .wt-filtertagclear a,\n .wt-themerangeslider .ui-slider-handle,\n .wt-clicksavebtn,\n .wt-pagination ul li.wt-active a,\n .wt-usernav>ul,\n .wt-pagination ul li span {\n border-color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* RGBA Background Color */\n .loader{\n background: <?php echo $styling[0]['primary_color'] ?>;\n background: -moz-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -webkit-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -o-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -ms-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: linear-gradient(to right, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n }\n </style>\n <?php return ob_get_clean();\n }\n }\n }", "public function get_custom_css()\n {\n }", "private function _handleStyleBased()\n {\n if (Theme::getComponent()) {\n $css = $this->styleBasedCss[Theme::getComponent()->style];\n $this->css = ArrayHelper::merge($css, $this->css);\n }\n }", "public static function wp_slim_styles(){\r\n\t echo '<style> \r\n\t .slim-btn-edit {\r\n\t background-image: url(\"'.plugin_dir_url(__FILE__).'assets/images/edit.png'.'\");\r\n\t } \r\n\t </style>';\r\n\t}", "function calvero_scripts() {\n \n wp_enqueue_style( 'style', get_stylesheet_uri() );\n \n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n \n wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n \n if ( is_singular() && wp_attachment_is_image() ) {\n wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n }\n \n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-1.11.3.min.js' , false , false , true );\n \n wp_enqueue_script( 'menu', get_template_directory_uri() . '/js/menu-funcao.js' , 'jquery' , false , true );\n}", "public function css($type = 'cdn', array $attributes = array());", "function ecomaster_scripts() {\n wp_enqueue_style( 'ecomaster-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n}", "public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_style( 'elementor-editor-style', plugins_url( '/assets/editor.css', __FILE__ ) ); // Editor Style\n\t\t\n\t}" ]
[ "0.7264032", "0.70890117", "0.70715135", "0.69279563", "0.67542344", "0.6696553", "0.6615371", "0.6590148", "0.6581412", "0.657947", "0.65727127", "0.6538414", "0.6409961", "0.64028174", "0.64023525", "0.6375011", "0.636637", "0.6331898", "0.63275564", "0.6312378", "0.6306614", "0.62998635", "0.62843764", "0.6283126", "0.62569535", "0.6254822", "0.62443435", "0.6227295", "0.6186575", "0.61816466", "0.6172044", "0.6161085", "0.6161085", "0.6161085", "0.6161085", "0.6161085", "0.6157893", "0.613016", "0.6129109", "0.61215454", "0.61027795", "0.60994405", "0.6093922", "0.6092418", "0.6041395", "0.60372823", "0.60143137", "0.6011091", "0.60059243", "0.6000022", "0.5992658", "0.5990858", "0.598511", "0.59790415", "0.5977205", "0.59673643", "0.5963088", "0.59571147", "0.5949996", "0.59497815", "0.5941233", "0.59363544", "0.59358305", "0.59210324", "0.5911116", "0.5910168", "0.5906106", "0.590523", "0.59031445", "0.59022737", "0.589689", "0.58926237", "0.58829063", "0.58813673", "0.58757025", "0.5874", "0.5873663", "0.5869718", "0.5869161", "0.58678794", "0.5867137", "0.58652806", "0.58595574", "0.5857635", "0.5855482", "0.5854346", "0.58473796", "0.5845681", "0.5831022", "0.5831022", "0.58300483", "0.58281684", "0.58181643", "0.5817965", "0.5817748", "0.5817065", "0.5812515", "0.581081", "0.5800338", "0.57967156", "0.579256" ]
0.0
-1
Create a new controller instance.
public function __construct(UserRepository $userRepo, UserService $userService) { $this->userRepo = $userRepo; $this->userService = $userService; $this->beforeFilter('permission:view_user', array('only' => array('index', 'show'))); $this->beforeFilter('permission:create_user', array('only' => array('create'))); $this->beforeFilter('permission:edit_user', array('only' => array('edit'))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display the user management list
public function index() { // $users = $this->userRepo->getPaginatedWhere(3, 'disabled', 1); $users = $this->userRepo->getUserIndex(Input::all()); return View::make('user.index')->with('users', $users); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "public function user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }", "public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }", "public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }", "public function index()\n {\n $this->user_list();\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function list ()\n {\n if (User::isLoggedIn() && User::getLoggedInUser()->is_admin === true) {\n\n // Alle User aus der DB laden\n $users = User::all();\n\n // Passenden View laden und User übergeben\n View::load('admin/users', [\n 'users' => $users\n ]);\n } else {\n \n // Wenn kein User eingeloggt ist, dann leider wir auf die Login Seite \n header(\"Location: login\");\n }\n }", "public function index()\n {\n $this->userlist();\n }", "public function display_admin_list() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '0') == TRUE) {\n\t\t\t if ($this->lang->line('admin_admin_users_list') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_admin_users_list')); \n\t\t else $this->data['heading'] = 'Admin Users List';\n $condition = array();\n $this->data['admin_users'] = $this->admin_model->get_all_details(ADMIN, $condition);\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/display_admin', $this->data);\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "protected function show()\n {\n $userModel = config('admin.database.users_model');\n\n $headers = ['User Name', 'Name', 'Roles', 'Permissions', 'Routes', 'Actions', 'Created', 'Updated'];\n\n $userslist = [];\n foreach ($userModel::all() as $user) {\n $roles = implode(',', $user->roles->pluck('name')->toArray());\n\n $userdata = [\n 'username' => $user->username,\n 'name' => $user->name,\n 'roles' => $roles,\n 'permission' => implode(\"\\n\", $user->allPermissions(true)->pluck('name')->toArray()),\n 'routes' => implode(\"\\n\", $user->allRoutes(true)->pluck('http_path')->toArray()),\n 'actions' => implode(\"\\n\", $user->allActions(true)->pluck('name')->toArray()),\n 'created_at' => date($user->created_at),\n 'updated_at' => date($user->updated_at),\n ];\n\n array_push($userslist, $userdata);\n }\n\n $this->table($headers, $userslist);\n }", "public function showUsers()\n {\n $userRepo = $this->getDoctrine()->getRepository(User::class);\n $users = $userRepo->getUsersOrderByAsc();\n\n return $this->render('admin/list-of-users.html.twig', [\n 'users' => $users\n ]);\n }", "public function getList()\n\t{\n\t\t//\n\t\t$user = Auth::user();\n\t\t\n\t\t$disableChange = DEFAULT_0;\n\t\t$headerShop = AuthController::checkUserURL();\n\t\tif ( empty($headerShop) ) {\n\t\t\treturn View::make('admin.manage.user.user', compact('user', 'disableChange'));\n\t\t} else {\n\t\t\treturn View::make('admin.manage.user.user', compact('headerShop', 'user', 'disableChange'));\n\t\t}\n\t}", "public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }", "function view() \n {\n $api = new Module_UserManagement_API();\n\n /* TODO: Check if administrator */\n $users = $api->getUsers();\n $view = Core_View::factory('users');\n\n $view->users = $users;\n echo $view->render();\n }", "public function index()\n {\n // show list user\n }", "public function list_user()\n\t{\n\t\tcheck_access_level_superuser();\n\t\t$data = [\n\t\t\t'list_user' => $this->user_m->get_cabang(),\n\t\t\t'list_cabang' => $this->data_m->get('tb_cabang')\n\t\t];\n\t\t$this->template->load('template2', 'user/list_user', $data);\n\t}", "function show_list() {\n\t\tif(!has_permission(3)) {\n\t\t\tset_warning_message('Sory you\\'re not allowed to access this page.');\n\t\t\tredirect('global/dashboard');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$this->output_head['function'] = __FUNCTION__;\n\n\t\t$this->output_head['style_extras'] = array(assets_url() . '/plugins/datatables/dataTables.bootstrap.css');\n\t\t$this->output_head['js_extras'] = array(assets_url() . '/plugins/datatables/jquery.dataTables.min.js',\n\t\t\t\t\t\t\t\t\t\t\t\tassets_url() . '/plugins/datatables/dataTables.bootstrap.min.js');\n\t\t$this->output_head['js_function'] = array();\n\t\t$this->load->model('user_model');\n\t\t\n\t\t$this->load->view('global/header', $this->output_head);\n\t\t\n\t\t$this->output_data['title'] = 'Users Manager';\n\t\t$this->load->view('users', $this->output_data);\n\t\t$this->load->view('global/footer');\n\t}", "public function indexAction() {\n $page = intval($this->getInput('page'));\n $perpage = $this->perpage;\n\n list($total, $users) = Admin_Service_User::getList($page, $perpage);\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $groups = Common::resetKey($groups, 'groupid');\n\n\n \n $this->assign('users', $users);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'] . '/?'));\n $this->assign(\"meunOn\", \"sys_user\");\n }", "public function listofUser()\n {\n return view('Admin.ShowallUser');\n }", "public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "public function index()\n\t{\t\n\t\t$users = \\App\\User::get();\n\n\t\t$this->data['users'] = $users; \n\n \t \treturn view('includes/admin/manage-users')->with($this->data);\n\t}", "public function users()\t{\n\n\t\tif (!$this->ion_auth->logged_in()) {\n\t\t\t// redirect them to the login page\n\t\t\tredirect('admin/login', 'refresh');\n\t\t} elseif (!$this->ion_auth->is_admin()) { // remove this elseif if you want to enable this for non-admins\n\t\t\t// redirect them to the home page because they must be an administrator to view this\n\t\t\treturn show_error('You must be an administrator to view this page.');\n\t\t} else\t{\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\n\t\t\t//list the users\n\t\t\t$this->data['users'] = $this->ion_auth->users()->result();\n\t\t\tforeach ($this->data['users'] as $k => $user)\n\t\t\t{\n\t\t\t\t$this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();\n\t\t\t}\n\n\t\t\t$this->template->set('title', 'Users');\n\t\t\t$this->template->load('admin/default_layout', 'contents' , 'admin/users', $this->data);\n\t\t}\n\t}", "public function index()\n {\n $users = User::active()\n ->get();\n\n return view('admin.userManager', compact('users'));\n }", "public function index()\n\t{\n\t\t$usuarios = User::paginate(10);\n\n\t\treturn view('backend.modules.usuarios.manage.index', compact('usuarios'));\n\t}", "public function index()\n {\n $this->global['pageTitle'] = '系统管理';\n\n $this->userListing();\n }", "public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }", "public function showUsers() { \n\t\n return View('admin.users');\n\t\t\t\n }", "public function index()\n {\n // Get all users\n $users = User::paginate(5);\n $objNav = new Navigation;\n $nav = $objNav->getParent();\n return View::make('admin.manage_user.index', ['users' => $users], ['nav' => $nav]);\n }", "public function listAction()\n\t{\n\t\t$em = $this -> getDoctrine()->getManager();\n\t\t$listUsers = $em -> getRepository('UserBundle:User') -> showNewUsers();\n\n\t\treturn $this -> render('FrontOfficeBundle:User:list.html.twig', \n\t\t\tarray('listUsers'=> $listUsers));\n\t}", "public function user_list()\n {\n \n \t$users = User::all();\n\n $data = array('users' => $users);\n\n return view('manage.user_list')->with($data);;\n }", "function managementUsersAll(){\n $Users = new \\Project\\Models\\ManagementUserManager();\n $allUser = $Users->allManagementUser();\n\n require 'app/views/back/managementUsers.php';\n }", "public function indexAction()\n {\n $manager = $this->container->get('app_manager_userlistkdo');\n $data = array(\n 'manager' => $manager,\n 'dir' => 'AppBundle:UserListKdo',\n 'show' => 'appbundle_userlistkdo_show',\n 'edit' => 'appbundle_userlistkdo_edit'\n );\n\n return $this->gridList($data);\n }", "public function showUsersList($pages){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('SHOWING_USER_LIST');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Get Top of pagelist\n\t\t$content = $this->openFile(\"core/fragments/admin_userslist.phtml\");\n\t\t\n\t\t//Creates a list from the supplied data\n\t\t$content .= $this->createUsersList($pages);\n\t\t\n\t\t//Print this dashboard\n\t\t$this->setContent($content);\t\n\t}", "public function viewEntri()\n {\n //\n \n return view('manageuser.list',[\n \n\n ]);\n }", "public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }", "public function index()\n {\n return view('backend.user.list_user');\n }", "public function display_all_supervisor()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 50)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits d\\'administrateur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des superviseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Superviseur\"');\n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "function manage_user(){\n\t\t$a['data']\t= $this->model_admin->tampil_user()->result_object();\n\t\t$a['page']\t= \"manage_user\";\n\t\t\n\t\t$this->load->view('admin/index', $a);\n\t}", "public function index()\n {\n\n //$users = User::paginate(10, ['*'], 'page', 15);\n return view('admin.pages.user_manage.list');\n }", "public function index()\n {\n return view('admin.users',[\n 'users'=>User::all(),\n 'currentPage'=>'Our Team',\n 'middlePage'=>null,\n 'job_titles'=>JobTitle::all(),\n 'polyvalent'=>PolyvalentToggle::first(),\n ]);\n }", "public function index()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.users');\n $users = User::with('roles')->paginate(10);\n\n $this->content = view('admin.users.index')->with(compact('users'))->render();\n return $this->renderOutput();\n }", "public function index()\n {\n $pagintaionEnabled = true;\n if ($pagintaionEnabled) {\n $users = User::paginate(config('usersmanagement.paginateListSize'));\n } else {\n $users = User::all();\n }\n $roles = Role::all();\n\n return View('pages.admin.users.show-users', compact('users', 'roles'));\n }", "public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }", "public function index()\n {\n return view('admin.users.index', ['users' => $this->repository->getSortableListViaPagination()]);\n }", "public function index()\n {\n $this->View->render('admin/index', array(\n 'users' => UserModel::getPublicProfilesOfAllUsers())\n );\n }", "private function userDisplay() {\n $showHandle = $this->get('username');\n if (isset($showHandle)) {\n echo '<li class=\"user-handle\">'.$showHandle.'</li>';\n }\n }", "public function listUser() {\n\t\t$users = new Model_Users();\n\t\t$listeUsers = $users->listUsers();\n\t\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/ecommerce/views/admin/users/liste_users.php\");\n\t}", "public function index()\n {\n if(Gate::denies('EDIT_USERS')){\n abort(403);\n }\n\n $this->title = 'Менеджер прав пользователей';\n\n $roles = $this->getRoles();\n $permitions = $this->getPermitions();\n \n $this->content = view(config('settings.theme') . '.admin.permitions_content', compact('roles', 'permitions'))->render();\n \n return $this->renderOutput();\n }", "public function index() {\n\n return view('admin.user_management.view');\n }", "public function list_page_content () {\n // Check permissions\n if ( ! current_user_can( 'list_users' ) ) {\n return;\n }\n\n // Main listing query\n $this->list_query_users();\n\n // Set urls for column sorting links.\n $sort_link_username = $this->sort_link( 'user_name', $this->orderby, $this->order );\n $sort_link_displayname = $this->sort_link( 'display_name', $this->orderby, $this->order );\n\n // Include template\n include CTAL_PATH.'/admin/templates/users-page.php';\n }", "public function index()\n {\n\n $users = User::paginate($this->pagination);\n\n $sno = (($users->CurrentPage() - 1) * $this->pagination) + 1;\n\n return view('admin.manage.users.index',[\n 'users' => $users,\n 'sno' => $sno,\n ]);\n }", "public function users()\n {\n \n\t $data['title'] = 'Admin | Users Page';\n\t $data['main'] = 'public/users';\n\t $data['all_users'] = $this->Product_model->admin_get_all_users();\n\t $this->load->view('templates/template_admin', $data); \n \n }", "public function index()\n {\n return view('master.list_user');\n }", "public function indexAction()\n {\n $this->get('Services')->setMenuItem('user');\n\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('WbcAdministratorBundle:User')->findAll();\n\n return $this->render('WbcAdministratorBundle:User:index.html.twig', array(\n 'users' => $users,\n ));\n }", "public function adminusers()\n\t{\n\n\t\t$data['pageTitle'] = 'Zingmobile-VPN New Admin Users List';\n\t\t$row=$this->model_users->adminuserList();\n\t\t$data['rows']=$row;\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('menu');\n\t\t$this->load->view('adminusers');\n\t\t$this->load->view('footer');\n\n\t}", "public function index()\n {\n $users = $this->users->with('roles')->get();\n return \\View::make('admin.users.index', [\n 'users' => $users,\n 'title' => 'list',\n ]);\n }", "public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}", "public function all_londontec_users(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/viewusers';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'londontec LMS users lists',\n\t\t\t'userslist' => $this->setting_model->Get_All('londontec_users'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function show() {\n $AdminuserList = DB::table('tbl_adminuser')->get();\n return view('admin/adminuserList', ['adminUserList' => $AdminuserList]);\n }", "public function list()\n {\n// $owner->name = 'admin';\n// $owner->display_name = 'Project Owner';\n// $owner->description = 'User is the owner of a given project';\n// $owner->save();\n//\n// $createPost = new Permission();\n// $createPost->name = 'create-post';\n// $createPost->display_name = 'Create Posts';\n// $createPost->description = 'create new blog posts';\n// $createPost->save();\n// $owner->attachPermission($createPost);\n\n// $admin = new Role();\n// $admin->name = '222';\n// $admin->display_name = 'User Administrator';\n// $admin->description = 'User is allowed to manage and edit other users';\n// $admin->save();\n//\n// $user = User::where('name', '=', '张洪波')->first();\n//\n// //调用EntrustUserTrait提供的attachRole方法\n// $user->attachRole($admin); // 参数可以是Role对象,数组或id\n//\n//// // 或者也可以使用Eloquent原生的方法\n//// $user->roles()->attach($admin->id); //只需传递id即可\n\n $list = UserRepository::getUserAll();\n return view('admin.user.list',compact('list'));\n }", "public function indexAction()\n {\n $data['users'] = User::getAll();\n View::render('Admin/Template/header.php');\n View::render('Admin/Users/list.php', $data);\n View::render('Admin/Template/footer.php');\n }", "public function index() {\n\n\t\t$conditions = array(\n\t\t\t'User.type !=' => NULL,\n\t\t\t'User.is_admin' => 0,\n\t\t\t'DATE(User.created) !=' => '0000-00-00'\n\t\t);\n\n\t\t$this->paginate = array(\n\t\t\t'limit' => UsersController::PAGE_LIMIT,\n\t\t\t'conditions' => $conditions,\n\t\t\t'fields' => array('User.id','User.username', 'User.first_name', 'User.last_name',\n\t\t\t\t'User.email', 'User.status', 'User.created', 'User.type'),\n\t\t\t'order' => array('User.username' => 'asc', 'User.first_name' => 'asc',\n\t\t\t\t'User.last_name' => 'asc')\n\t\t);\n\t\t$user_list = $this->paginate('User');\n\t\t$title_for_layout = 'Manage Users';\n \n\t\t$this->set(compact('user_list', 'title_for_layout'));\n\t}", "function admin_get_users()\n{\n global $app;\n\n $users = $app->bbs->users();\n $app->render('admin_users.html', [\n 'page' => mkPage(getMessageString('admin_users'), 0, 2),\n 'users' => $users,\n 'isadmin' => is_admin()]);\n}", "public function index()\n {\n $user = User::all();\n return view('admin.user.list',compact('user'));\n }", "public function index()\n {\n $user = User::find(Auth::id());\n return \\view('superadmin.profile.manage',\\compact('user'));\n }", "public function index() {\n \t$data = ['menu_users' => true]; \n return view('manage.users', $data);\n }", "public function index()\n {\n //\n $_users = User::all();\n return view('admin.users.list', ['users' => $_users ]);\n }", "public function listAction()\n {\n $users = $this->container->get( 'wg.openid.user_manager' )->findUsers();\n return $this->container->get('templating')->renderResponse(\n 'WGOpenIdUserBundle:Profile:list.html.twig', array(\n 'users' => $users,\n ));\n }", "function users(){\n\t\t\t$this->data[\"vista\"]\t=\t\"modules/administration/users\";\n\t\t\t$this->load->view(\"templates/template_main\", $this->data);\n\t\t}", "function abmUsuarios()\n {\n $this->checkCredentials();\n $users = $this->modelUser->getAllUsers();\n $this->view->showAbmUsuarios($users);\n }", "public function index()\n {\n $userdata = User::all()->toArray();\n \n return view('admins.userlist',compact('userdata'));\n }", "public function index() \n {\n $users = $this->userRepo->listUser();\n return view('backend.pages.user.list', compact('users'));\n }", "public function index()\n {\n $users = User::order('created_at')->get();\n\n return view('users.list', compact('users'))->with(['mainmenu' => $this->mainmenu, 'submenu' => $this->submenu]);\n }", "public function index() {\n\n if (!Auth::user()->hasPermissionTo('list.users') &&\n !Auth::user()->hasPermissionTo('create.users') &&\n !Auth::user()->hasPermissionTo('edit.users') &&\n !Auth::user()->hasPermissionTo('delete.users')) {\n Session::flash('error', trans('adminlte::adminlte.app_msj_not_permissions'));\n return redirect()->route('admin');\n }\n\n $permits = [];\n $permits['create'] = Auth::user()->hasPermissionTo('create.users');\n $permits['edit'] = Auth::user()->hasPermissionTo('edit.users');\n $permits['delete'] = Auth::user()->hasPermissionTo('delete.users');\n\n $users = \\App\\Models\\User::all();\n return view('Users::admin.users.index', compact('users', 'permits'));\n }", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "public function index()\n {\n \n $users = User::all()->toArray();\n return view('admin.manager' , compact('users'));\n\n }", "public function indexAction()\n {\n $listing = $this->listing( 'Panel\\Listing\\Users');\n\n return array( 'listing' => $listing );\n }", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "function userslist(){\n\t\t\tif(!Auth::check()){\n\t\t\t\tReturn Redirect::to('login');\n\t\t\t}\n\t\t\t$users = AdminUser::where('user_role_id',0)->orderBy('id','desc')->get();\n\t\t\treturn view('admin.pages.users.index', ['records' => $users]);\n\t\t}", "public function indexAction()\n {\n $userLogIn = $this->getUser();\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render(\n 'Ums/user/index.html.twig', \n array(\n 'users' => $users,\n 'sec' => array(\n 'role' => $userLogIn->getPru()->getPruName(),\n 'name' => $userLogIn->getUsrFullName(),\n 'grant' => $userLogIn->getUsrGrantList(),\n 'id' => $userLogIn->getUsrId(),\n )\n ));\n }", "public function admin_index() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'User.username' => 'asc',\n ) ,\n 'conditions' => array(\n 'User.status' => 1,\n ),\n );\n $users = $this->paginate('User');\n $this->set(compact('users'));\n }", "public function manageAction() {\n \n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getEntityManager();\n \n $repo = $em->getRepository('FenchyNoticeBundle:Notice');\n \n $listings = $repo->getUserNotices($user);\n \n $userId = $user->getId();\n $displayUser = false;\n \n if ( $userId != NULL ) {\n \n $userOther = $this->getDoctrine()->getManager()->getRepository('UserBundle:User')->getAllData( $userId );\n\n if ( ! $userOther instanceof \\Fenchy\\UserBundle\\Entity\\User )\n return new RedirectResponse($this->container->get('router')->generate('fenchy_frontend_homepage'));\n $displayUser = $userOther;\n\n }\n \n return $this->render('FenchyRegularUserBundle:Listing:manage.html.twig', array(\n 'listings' => $listings,\n 'displayUser' => $displayUser,\n 'usersOwnProfile' => true\n ));\n \n }", "public function index()\n {\n $listUser=User::all();\n return view('admin.user.list',compact('listUser'));\n }", "public function index()\n {\n $users = $this->cache->get('sm-users');\n\n return view(\"{$this->adminPath}.users.index\", compact('users'));\n }", "public function index()\n {\n $data['page_title'] = \"Users Management\";\n $data['page_description'] = \"\";\n $data['breadcrumbs'] = [\n [\n 'action' => '',\n 'title' => 'Users'\n ]\n ]; \n $data['users'] = \\DB::table('users')->paginate(10);\n \n return view('modules.users.index', $data);\n }", "public function admin_index() {\n\t\t\t$this->layout = \"default2\";\n\t\t\t$users = $this->User->find('all', array(\n\t\t\t\t'fields'=>array('id', 'username', 'mail', 'groups_id')\n\t\t\t\t)\n\t\t\t);\n\t \t\t$this->set(compact('users'));\n\t\t}", "public function index()\n {\n $users = User::latest()->paginate(10);\n $i = 1;\n return view('user_management.user', compact(['users', 'i']));\n }", "function users($limit = 20) {\n $this->auth(SUPPORT_ADM_LEVEL);\n $this->load->view('admin/support/v_list_users');\n }", "public function index()\n {\n if(!$GLOBALS['user_permission']['view']){\n access_denied('user');\n }\n \n /*SELF PAGE AJAX CALL\n if ($this->input->is_ajax_request()) {\n $this->app->get_table_data('users');\n }*/ \n $data['title'] = lang('page_users');\n $this->load->view('admin/users/manage', $data);\n }", "public function index()\n {\n $this->data['users'] = $this->model->getAllUsers();\n return view('pages.admin.users', $this->data);\n }", "public function list() {\n \t//get the users\n \t$users = User::get();\n \tforeach ($users as $key => $value) {\n\t if(!empty($value->user_id)) {\n\n\t \t//get the user information\n\t $user_details = UserDetails::where('user_id',$value->user_id)->first();\n\t if( count($user_details) > 0 ) {\n\t $users[$key]->department_id = $user_details->department_id; \n\t $users[$key]->group_id = $user_details->group_id; \n\t $users[$key]->role_id = $user_details->role_id; \n\t }\n\n //getting the company name\n $company_details = CompanyInformation::where('company_id',$user_details->company_id)->first();\n if( count($company_details) > 0 ) {\n $users[$key]->company_id = $company_details->company_name; \n }\n\t }\n\t }\n \treturn view('admin.user.list',['users'=>$users]);\n }", "public function index()\n {\n $users = $this->userService::getAll();\n\n return view('admin.pages.users')->with(compact('users'));\n }", "public function display_all()\n {\n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Membres'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_member();\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function showUsers()\r\n\t{\r\n\t\t$users = User::paginate(10);\r\n\r\n\t\treturn view('admin/users', compact('users'));\r\n\t}", "public function listUser()\n {\n $user = User::where('id', '=', 1)->first();\n return view('listUser', [\n 'user' => $user\n ]);\n }", "public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }" ]
[ "0.80328774", "0.79829454", "0.79617774", "0.7936461", "0.78770405", "0.78609973", "0.7753942", "0.7744209", "0.7698048", "0.76405257", "0.759406", "0.75901765", "0.7579566", "0.75531316", "0.7537325", "0.74891394", "0.74805313", "0.74687713", "0.7464593", "0.7462214", "0.7444297", "0.7431942", "0.73695594", "0.7364744", "0.7351355", "0.73203784", "0.73181444", "0.73125434", "0.73065495", "0.72920936", "0.7267509", "0.72564346", "0.72511095", "0.7235751", "0.7229916", "0.72114027", "0.7208817", "0.7199008", "0.71844876", "0.7183571", "0.71797776", "0.7179576", "0.7173592", "0.71664757", "0.7147679", "0.7144796", "0.7137982", "0.71268207", "0.71157604", "0.71087325", "0.7100551", "0.709947", "0.7097883", "0.70929885", "0.70923895", "0.7086202", "0.7075489", "0.7067458", "0.7064519", "0.7062988", "0.7061702", "0.7061482", "0.70543444", "0.7049444", "0.7042971", "0.7042256", "0.70320576", "0.7030835", "0.7023386", "0.7005781", "0.6993588", "0.6991599", "0.6985597", "0.69839174", "0.69783866", "0.69727045", "0.69698614", "0.6966512", "0.69592255", "0.69476974", "0.6946191", "0.6941565", "0.69390076", "0.69325244", "0.69282705", "0.69229263", "0.6917366", "0.6915339", "0.6913481", "0.69098246", "0.69065255", "0.6904433", "0.68991387", "0.6894075", "0.6885074", "0.68850124", "0.6879795", "0.6879756", "0.6874556", "0.68737197", "0.68725735" ]
0.0
-1
Show the form for creating a new user.
public function create() { $available_roles = $this->userService->getAvailableRolesForSelect(Auth::user()->getLevel()); return View::make('user.create', compact('available_roles')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newUserAction()\n {\n $user = new User();\n\n $form = $this->createForm(UserType::class, $user);\n\n return $this->render('GrtResBundle:User:form.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "public function showUserCreationForm()\n {\n return view('admin.user_create');\n }", "public function create()\n {\n // show form create user \n return view('user.create');\n }", "public function create()\n {\n return view(\"users.usersform\");\n }", "public function create()\n {\n return view('users.form', ['user' => new User]);\n }", "public function create()\n {\n return view('webcontrol.user.add');\n }", "public function newAction()\n {\n $entity = new User();\n $form = $this->createCreateForm($entity)\n ->add('create', 'submit', array('label' => 'c'));\n\n return $this->render(\n 'VipaAdminBundle:AdminUser:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "public function create()\n\t{\n\t\t$eloquent = App::make('orchestra.user');\n\t\t$form = $this->presenter->form($eloquent, 'create');\n\n\t\t$this->fireEvent('form', array($eloquent, $form));\n\t\tSite::set('title', trans('orchestra/foundation::title.users.create'));\n\n\t\treturn View::make('orchestra/foundation::users.edit', compact('eloquent', 'form'));\n\t}", "public function create()\n {\n return view('admin.adminuser.userForm', [\n\t\t\t'bdb'\t=> [['name'=>'后台用户管理'], ['name'=>'添加用户'],], \n\t\t\t'roles'\t=> Role::all(),\n\t\t\t]);\n }", "public function create()\n {\n $this->generateParams();\n return view('backend.pages.user._form', compact('gender', 'type', 'city'));\n }", "public function create()\n {\n $this->authorize('create', User::class);\n return view('user.form')->with('user', new User())->with('roles', UserRole::getRoleList());\n }", "public function create() // abre un formulario de creacion\n {\n \n return view('user.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.createuser');\n\t}", "public function create()\n {\n return view('administration::user.create');\n }", "public function create()\n {\n return view('Admin.user.useradd');\n }", "public function create()\n {\n return view('backend.pages.user.create-user');\n }", "public function create()\n {\n return view('users.newUser');\n }", "public function create()\n {\n return view('users.form');\n }", "public function create()\n {\n return view('users.form');\n }", "public function create()\n {\n return view(\"Admin/user_add\");\n }", "public function create() {\n $this->title = \"Add New User\";\n $arr = array('controller' => $this->controller, 'action' => $this->action, 'title' => $this->title);\n return view('user.add', $arr);\n }", "public function create()\n {\n return view(\"backend.user.create\");\n }", "public function create() {\n // TODO: Admin Policy\n return view('auth.user_add');\n }", "public function create()\n {\n return view('admin.user.user-add');\n }", "public function newUserAction()\n {\n $user = (new UserModel())->createUser();\n echo (new View('userCreated'))\n ->addData('user', $user)\n ->render();\n }", "public function createAction()\n {\n echo (new View('userCreate'))->render();\n }", "public function newAction()\n {\n $entity = new User();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SpaBackendBundle:User:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"user.create\");\n }", "public function create()\n\t{\n\t\treturn view('admin.user.create');\n\t}", "public function create()\n {\n return view('add_user');\n //\n }", "public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }", "public function create()\n\t{\n\t\treturn view('kagi::users.create');\n\t}", "public function create()\n {\n return view(\"admin.addUser\");\n }", "public function create()\n {\n //Create User Page\n return view('admin.user.create');\n }", "public function create()\n {\n return view(\"admin/useradd\");\n }", "function create() {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('sys_user.create');\n }", "public function create()//mostra formulário de criação de usuários\n {\n $form = \\FormBuilder::create(UserForm::class,[\n 'url' => route('admin.users.store'),\n 'method' => 'POST'\n ]); //classe de formulario, url de ação do formulario e método http\n\n return view('admin.users.create', compact('form'));\n }", "public function create()\n {\n //return view ('admin.user-table.new-user-form');\n }", "public function create()\n {\n return view('admin.user.add',[\n 'title'=>'添加管理员页面',\n ]);\n }", "public function actionCreate()\n {\n $model = new UserForm();\n $model->setScenario('create');\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n if (Yii::$app->request->isGet) {\n $model->status = User::STATUS_ACTIVE;\n $model->roles = User::ROLE_USER;\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'roles' => ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name')\n ]);\n }", "public function newAction()\n {\n $user = new User();\n $form = $this->createForm(UserType::class, $user, array(\n 'adminRequired' => true,\n ));\n\n return $this->render('AdminBundle:admin:new.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n\treturn view('user.createuser');\n }", "public function create()\n {\n Gate::authorize('app.users.create');\n\n $roles = Role::getForSelect();\n return view('layouts.backend.users.form', [\n 'roles'=> $roles,\n ]);\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n \treturn View::make(\"admin.UserAdd\");\n }", "public function create()\n {\n return view('admin.create-user');\n }", "public function create()\n {\n //添加用户页面\n return view('admin.user.add');\n }", "public function create()\r\n {\r\n return view('admin.user.create');\r\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.page.user.create');\n }", "public function create()\n\t{\n\t\treturn view('backend.users.create');\n\t}", "public function create()\n {\n return view(\"backend.users.create\");\n }", "public function create () {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('codeeduuser::users.create');\n }", "public function create()\n {\n\n // Load the page for adding users\n return view('users.create');\n }", "public function create()\n {\n $user = null;\n\n $title = 'Cadastrar Novo Usuário';\n\n return view('panel.users.create', compact('title', 'user'));\n }", "public function create()\n {\n MetaTag::setTags(['title' => 'Добавление пользователя']);\n\n return view('blog.admin.user.add');\n }", "public function create()\n\t{\n\t\t\n\t\t\treturn view('user/create');\n\t}", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user_create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create() {\n return view('admin.user.create');\n }", "public function newAction()\n {\n $user = new User();\n $form = $this->createCreateForm($user);\n\n return $this->render('BackendBundle:User:new.html.twig', array(\n 'entity' => $user,\n 'form' => $form->createView(),\n ));\n }", "public function create() {\n\t\treturn View::make('users.create')->with('user', new User());\n\t}", "public function create()\n {\n return view('manager.users.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.users.create');\n\t}", "public function create()\n {\n $form = $this->userForm->form();\n $organizationIdentifier = auth()->user()->organization->user_identifier;\n\n return view('lite.users.create', compact('form', 'organizationIdentifier'));\n }", "public function create()\n {\n return view('users.create_user');\n }", "public function create()\n {\n return view('customer.adduser');\n }", "public function create()\n {\n if ( Gate::denies('criar-user')){\n abort(403, 'Não tem Permissão para criar um utilizador');\n }\n return view('users.create');\n }", "public function create()\n {\n return view('backend::users.create');\n }", "public function create()\n\t{\n return View::make('user.create');\n\t}", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('admin::auth.users.create');\n }", "public function create()\n {\n $User = User::get();\n view()->share('elements', $User);\n\n $UserRoles = UserRoles::get();\n view()->share('UserRoles', $UserRoles);\n\n return view('users.form');\n }", "public function newAction() {\n $this->buildAssets();\n\n $this->persistent->conditions = null;\n\n\n if ($this->request->isPost()) {\n $this->createNew();\n } else {\n $view = $this->view;\n $this->ctx->pickView($view, 'users/new');\n \n $userForm = new UsersForm();\n $this->view->form = $userForm;\n }\n }", "public function create()\n {\n return view('CMS::users.create');\n }", "public function create()\n {\n return view('create_new_user');\n }", "public function create()\n {\n $roles = Role::all();\n\n $title = __('Crear Usuario');\n $user = new User;\n return view('user.form', compact('user', 'title','roles'));\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }" ]
[ "0.8325336", "0.8320299", "0.8224984", "0.8186878", "0.81729275", "0.8164761", "0.8090949", "0.80711204", "0.80502844", "0.80146444", "0.8013211", "0.8011888", "0.8008955", "0.800888", "0.79978997", "0.79958636", "0.7989843", "0.7989178", "0.7989178", "0.79677856", "0.79656", "0.7965076", "0.7962862", "0.7957229", "0.79565614", "0.79391885", "0.79326886", "0.7931051", "0.7924697", "0.7920319", "0.7907222", "0.78954846", "0.78904045", "0.78903794", "0.7889391", "0.7886818", "0.7884881", "0.7884881", "0.7884881", "0.78502715", "0.7848417", "0.7845521", "0.78400475", "0.78366345", "0.7830168", "0.7826756", "0.7823253", "0.78218377", "0.78218377", "0.78218377", "0.78218377", "0.7819821", "0.7815329", "0.7811454", "0.78101045", "0.7808489", "0.7803429", "0.7792207", "0.7791231", "0.7787943", "0.7786534", "0.7782983", "0.77747583", "0.7765579", "0.7761437", "0.7760664", "0.77552056", "0.77489173", "0.77489173", "0.77489173", "0.77489173", "0.77489173", "0.7745731", "0.7743941", "0.7739387", "0.7736926", "0.773443", "0.773443", "0.773443", "0.7731148", "0.7730341", "0.7726578", "0.77264154", "0.7726073", "0.77258444", "0.7720193", "0.77160656", "0.77160656", "0.77160656", "0.7713385", "0.7712508", "0.7710636", "0.7708313", "0.7704324", "0.77032477", "0.7698452", "0.7698452", "0.7698452", "0.7698452", "0.7698452", "0.7698452" ]
0.0
-1